/* cuerpo y objetos principales de la página */
body {
  background-color: #F9FAFB;
  color: #0F172A;
  font: 200 14px 'Poppins', sans-serif;
  margin-top: 0;
  padding-top: 90px;
}

/*Animación para TODO el código*/
@keyframes aparecer {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
* {
  animation: aparecer 0.6s ease-out forwards;
}
input, textarea, button {
  animation: none !important;
}
#area_calculo { animation-delay: 0.1s; }
#resultado { animation-delay: 0.2s; }
#historial { animation-delay: 0.3s; }
#bloque-explicacion { animation-delay: 0.4s; }
#contactar { animation-delay: 0.5s; }

#titulo-principal {
  text-align: center;
  margin: 60px auto 120px;
  padding: 0 40px 20px;
  font-size: 36px;
  font-weight: 600;
  color: #065F46;
  max-width: 900px;
  border-bottom: 3px solid #10B981;
  letter-spacing: 0.5px;
}

/* cabecero */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background-color: #ffffff; /* fondo blanco */
  color: #000000; /* texto negro */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05); /* sombra suave */
  border-bottom: 3px solid #10B981; /* línea verde */
}


nav {
  width: 100%;
  padding: 10px 0;
  font-family: 'Poppins', sans-serif;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 35px;
}

nav ul li a {
  text-decoration: none;
  padding: 10px 25px;
  font-weight: 400;
  font-size: 17px;
  transition: 0.2s ease;
  color: #065F46;
  transform: translateY(-2px);
}

nav ul li a:hover {
  color: #10B981;
  transform: translateY(-2px);
}

nav ul li#logo img {
  height: 55px;
  width: 55px;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #10B981;
}

/* layout principal */
#contenedor-flex {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 90px;
  margin-top: 60px;
  padding-left: 90px;
}

#columna-izquierda {
  flex: 1;
}

#columna-derecha {
  flex: 2;
  margin-right: 90px;
}

/* títulos alineados */
#titulo_regla,
#titulo-explicacion {
  font-size: 32px;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 30px;
  color: #065F46;
}

/* área de cálculo */
#area_calculo {
  max-width: 700px;
  font-size: 18px;
}

.ecuacion {
  display: flex;
  align-items: center;
  gap: 2.5em;
  margin-bottom: 1.2em;
}

input[type="number"] {
  width: 110px;
  padding: 0.6em;
  font-size: 16px;
  border: 2px solid #10B981;
  border-radius: 6px;
  background-color: #ffffff;
  color: #0F172A;
  transition: 0.2s ease;
}

input[type="number"]:focus {
  outline: none;
  border-color: #3B82F6;
  box-shadow: 0 0 6px rgba(59,130,246,0.4);
}

button {
  padding: 0.7em 1.4em;
  font-size: 16px;
  margin-top: 5px;
  cursor: pointer;
  background-color: #10B981;
  border: none;
  color: white;
  border-radius: 6px;
  transition: 0.2s ease;
}

button:hover {
  background-color: #059669;
  transform: translateY(-2px);
}

/* resultado e historial */
#titulo-resultado,
#titulo-historial {
  font-size: 26px;
  font-weight: 600;
  color: #065F46;
  margin-top: 60px;
  margin-bottom: 15px;
}

#resultado,
#historial {
  padding: 25px 30px;
  background-color: #ffffff;
  border-left: 5px solid #10B981;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  font-size: 18px;
  line-height: 1.7;
  max-width: 350px;
  margin-bottom: 40px;
}

/* historial scroll */
#historial {
  max-height: 250px;
  overflow-y: auto;
}

#historial p {
  margin-bottom: 12px;
}

/* explicación derecha */
#bloque-explicacion {
  position: relative;
  padding: 25px 30px;
  background-color: #ffffff;
  border-left: 5px solid #3B82F6;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  font-size: 18px;
  line-height: 1.7;
  max-height: 69vh;
  overflow-y: auto;
  text-align: center;
  overflow-x: hidden;
  overflow: visible
}


#bloque-explicacion ul {
  list-style-type: none;
  padding-left: 0;
    position: relative;
    overflow: visible;
}
/* Mascota sobresaliendo */

#mascota-explicacion {
  position: absolute;
  width: 180px;
  bottom: -40px;
  right: -30px;
  z-index: 10;
  pointer-events: none;
  filter: drop-shadow(6px 6px 4px rgba(0, 0, 0, 0.2));
  transform: translateZ(0);
}




/* formulario */
#contactar {
  background-color: #ffffff;
  padding: 60px 90px;
  border-radius: 10px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
  border-top: 3px solid #10B981;
  margin-top: 150px;
}

#contactar h2,
#contactar .txtcontacto {
  text-align: center;
  margin: 20px auto;
  color: #065F46;
}

#contactar input[type="text"],
#contactar input[type="email"] {
  border: 2px solid #10B981;
  background-color: #ffffff;
  color: #0F172A;
  padding: 10px;
  border-radius: 6px;
  transition: 0.2s ease;
}

#contactar input[type="text"]:focus,
#contactar input[type="email"]:focus {
  outline: none;
  border-color: #3B82F6;
  box-shadow: 0 0 6px rgba(59,130,246,0.4);
}

.itemform {
  display: grid;
  grid-template-columns: 150px 350px;
  justify-content: center;
  margin-bottom: 25px;
}

.itemform label {
  font-weight: 600;
  color: #065F46;
}

.itemform textarea {
  background-color: #ffffff;
  color: #0F172A;
  padding: 12px;
  border: 2px solid #10B981;
  border-radius: 6px;
  resize: none;
  width: 100%;
  max-width: 350px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  transition: 0.2s ease;
  box-sizing: border-box;
}

.itemform textarea:focus {
  outline: none;
  border-color: #3B82F6;
  box-shadow: 0 0 6px rgba(59,130,246,0.4);
}

input[type="submit"] {
  background-color: #10B981;
  border: none;
  color: white;
  padding: 12px 24px;
  border-radius: 6px;
  grid-column: 1 / span 2;
  justify-self: right;
  margin-top: 15px;
  cursor: pointer;
  transition: 0.2s ease;
}

input[type="submit"]:hover {
  background-color: #059669;
  transform: translateY(-2px);
}

.final {
  padding-left: 40%;
}
