@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
}

body {
  background-color: #f7f9fc;
  color: #333;
}

/* ===== HEADER ===== */
.header {
  background: linear-gradient(135deg, #007bff, #00c6ff);
  color: white;
  text-align: center;
  padding: 50px 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 600;
}

.header p {
  margin-top: 10px;
  font-size: 1.1rem;
  opacity: 0.9;
}

/* ===== ANUNCIOS ===== */
.ad-space {
  background: #e0e0e0;
  text-align: center;
  margin: 30px auto;
  padding: 40px;
  width: 85%;
  border-radius: 12px;
  color: #555;
  font-size: 1.1rem;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.1);
}

/* ===== MAIN ===== */
.main {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 20px;
}

/* ===== CALCULADORA ===== */
.calculator {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  width: 90%;
  max-width: 400px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.calculator:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

#display {
  width: 100%;
  padding: 1rem;
  font-size: 1.5rem;
  text-align: right;
  border: none;
  border-radius: 10px;
  background-color: #eef5ff;
  margin-bottom: 1rem;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.05);
}

/* ===== BOTONES ===== */
.buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}

.btn {
  padding: 1rem;
  font-size: 1.2rem;
  border: none;
  border-radius: 10px;
  background-color: #f0f4ff;
  color: #333;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn:hover {
  background-color: #dce9ff;
  transform: scale(1.05);
}

.operator {
  background-color: #007bff;
  color: white;
}

.operator:hover {
  background-color: #0056b3;
}

.equal {
  grid-column: span 4;
  background: linear-gradient(135deg, #007bff, #00c6ff);
  color: white;
  font-weight: 600;
  font-size: 1.3rem;
}

.equal:hover {
  background: linear-gradient(135deg, #0056b3, #0099ff);
}

.clear {
  background-color: #ff4d4d;
  color: white;
}

.clear:hover {
  background-color: #cc0000;
}

/* ===== MODO CIENTÍFICO ===== */
.toggle-btn {
  width: 100%;
  margin-bottom: 1rem;
  padding: 0.7rem;
  border: none;
  border-radius: 8px;
  background-color: #00c6ff;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.toggle-btn:hover {
  background-color: #007bff;
}

.scientific-buttons {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}

.hidden {
  display: none;
}

/* ===== FOOTER ===== */
footer {
  background: #339ce8d9;
  color: white;
  text-align: center;
  padding: 25px;
  margin-top: 60px;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  box-shadow: 0 -4px 15px rgba(0,0,0,0.2);

}

/* ===== FOOTER SEO ===== */
.footer-seo {
  background: linear-gradient(135deg, #0077ff, #00c6ff);
  color: white;
  padding: 40px 20px;
  text-align: center;
  margin-top: 60px;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}

/* Texto informativo */
.footer-info {
  max-width: 900px;
  margin: 0 auto 25px;
}

.footer-info h2 {
  font-size: 1.8rem;
  margin-bottom: 12px;
  font-weight: 600;
}

.footer-info p {
  font-size: 1rem;
  line-height: 1.7;
  opacity: 0.95;
}
.footer-info a{
  color: white;
  text-decoration: none;
  font-weight: 600;
}
.footer-info a:hover{
  text-decoration: underline;
  opacity: 0.9;
}

/* Enlaces legales */
#list-links {
  list-style: none;
  margin: 25px 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
}

#list-links li a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background 0.3s ease, transform 0.2s ease;
}

#list-links li a:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-3px);
}

/* Copyright */
.footer-copy {
  margin-top: 30px;
  font-size: 0.9rem;
  opacity: 0.9;
}
.footer-copy a.footer-link {
  color: white;
  text-decoration: none;
  font-weight: 600;
}

.footer-copy a.footer-link:hover {
  text-decoration: underline;
  opacity: 0.9;
}


/* 📱 RESPONSIVE PARA MÓVILES */
@media (max-width: 768px) {

    /* ===== HEADER ===== */
    .header {
        padding: 35px 15px;
    }

    .header h1 {
        font-size: 1.9rem;
    }

    .header p {
        font-size: 0.95rem;
    }

    /* ===== CALCULADORA ===== */
    .calculator {
        width: 100%;
        padding: 1.5rem;
        border-radius: 14px;
    }

    #display {
        font-size: 1.3rem;
        padding: 0.8rem;
    }

    /* ===== BOTONES ===== */
    .buttons {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.6rem;
    }

    .btn {
        padding: 0.8rem;
        font-size: 1.1rem;
        border-radius: 8px;
    }

    .equal {
        font-size: 1.2rem;
        padding: 1rem;
    }

    /* ===== MODO CIENTÍFICO ===== */
    .toggle-btn {
        padding: 0.6rem;
        font-size: 0.95rem;
    }

    .scientific-buttons {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.6rem;
    }

    .sci {
        padding: 0.7rem;
        font-size: 1rem;
    }
  }