/* === ESTILOS GENERALES === */
body {
  /* background: linear-gradient(to bottom, #f1f1f1, #e0f7fa); */
  color: #333;
  cursor: none;
}

/* === ENCABEZADO === */

/* === SECCIÓN HISTORIA === */
section.history {
  max-width: 900px;
  margin: 3rem auto;
  padding: 2rem;
  background-color: #f9fbfc;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  font-family: 'Merriweather', serif;
  line-height: 1.7;
  color: #333;
  text-align: center;
}

/* === TÍTULO Y SUBTITULOS === */
section.history h1 {
  font-size: 2.5rem;
  color: #247c8c;
  margin-bottom: 1rem;
}

section.history h2 {
  font-size: 1.5rem;
  color: #247c8c;
  margin-bottom: 1rem;
}

section.history h1:hover,
section.history h2:hover{
  color:rgb(60, 54, 214);
    transition: color 0.3s ease;
}

/* === CONTENIDO 2 BLOQUES === */

.content-block {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
  margin: 2rem 0;
}

.text-block {
  flex: 1 1 60%;
  font-family: sans-serif;
}

.text-block h2 {
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

.text-block p {
  line-height: 1.6;
  margin-bottom: 1rem;
}

.image-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.image-block img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  cursor: pointer;
}

section.history p {
  margin-bottom: 1.2rem;
}

section.history strong {
  color: #1669b7;
}

/* Por defecto, ocultar imagen mobile, mostrar desktop */
.image-mobile {
  display: none;
}

.daniel-pic-desktop {
width: auto;
  max-width: 100%;
  max-height: 400px;
  height: auto;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
}

.scientist-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.scientist-link:hover .scientist {
  color: rgb(60, 54, 214);/* Cambia a un color destacado al pasar el cursor */
  text-decoration: underline; /* Opcional, puedes quitarlo si no lo quieres */
}

.scientist strong:hover {
 color: #1669b7;
}

section.history code {
  background-color: #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

/* === LISTA HORIZONTAL CON GIFS === */
.horizontal-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.animated-wrapper {
  position: relative;
  width: 160px; /* ajusta según tu diseño */
  height: auto;
  overflow: hidden;
  border-radius: 8px;
}

.animated-wrapper img,
.animated-wrapper iframe {
  width: 100%;
  display: block;
  border-radius: 8px;
  transition: opacity 0.3s ease;
}

.animated-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  display: none;
  pointer-events: none;
  z-index: 1;
}

.animated-wrapper:hover iframe {
  display: block;
}

.animated-wrapper:hover img {
  opacity: 0;
}

.horizontal-list li {
  margin: 0;
  padding: 0;
}

.horizontal-list .item {
  text-align: center;
  max-width: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem; /* más espacio que antes, menos que el original */
  transition: transform 0.3s ease;
  margin: 0;
  padding: 0;
}

.horizontal-list .item img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin: 0 0 0.4rem 0; /* margen abajo, para separar imagen y título */
}

.horizontal-list img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.horizontal-list .item h2 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin: 0 0 0.3rem 0; /* margen abajo para separar título y texto */
  padding: 0;
  line-height: 1.3;
}

.horizontal-list .item p {
  font-size: 0.95rem;
  line-height: 1.4;
  color: #444;
  font-weight: 400;
  margin: 0;
  padding: 0 4px;
  text-align: center;
}

/* === TARJETAS === */
 .horizontal-cards {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  max-width: 960px;
}

.horizontal-cards li {
  width: 240px; /* un pelín más ancho si quieres más aire */
  perspective: 1000px;
}


.flip-card {
  width: 100%;
  height: 300px;
  background-color: transparent;
  cursor: pointer;
  padding: 10px; /* ✅ Espacio interior para que no quede tan al ras */
  box-sizing: border-box;
  transition: transform 0.3s ease;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.7s;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.flip-card-front {
  background-color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* alineamos hacia arriba */
  align-items: center;
  padding: 1rem;
  height: 100%;
  box-sizing: border-box;
}

.flip-card-front img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 12px;
  margin-top: 10px;      /* ✅ espacio respecto al borde superior */
  margin-bottom: 0.75rem;
}

.flip-card-front item h2{
  margin: 0;
  color: rgb(60, 54, 214);
  font-weight: 600;
  text-align: center;
}

.flip-card-back {
  background-color: #b2ebf2;
  color: #0e4da4;
  transform: rotateY(180deg);
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.95rem;
  border-radius: 12px;
}

/*pulsar para girar la tarjeta en responsive*/
.tap-to-go { 
  display: none;
  font-size: 0.9rem;
  color: #0e4da4;
  margin-top: 0.3rem;
  font-style: italic;
  user-select: none;
  text-align: center;
}

/* === CITA + 2 FOTOS LATERALES === */

section.history .quote-container {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  gap: 2rem;
  max-width: 900px;
  margin: 1.5rem auto;
  text-align: center;
}

section.history blockquote {
  background-color: rgb(154, 197, 232);
  padding: 1rem;
  margin: 1.5rem auto;
  border-left: 5px solid #402dcf;
  font-style: italic;
  text-align: center;
  max-width: 500px;
  border-radius: 12px;
}

section.history blockquote:hover {
  background: #b2ebf2;
  transition: background-color 0.3s ease;
}

.quote-img {
  width: 100%;
  max-width: 150px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  object-fit: cover;
  background-color: #fff;
  display: block;
  margin: 0 auto;
  cursor: pointer;
}

.scientist {
  margin-top: 0.5rem;
  font-size: 1rem;
  font-family: monospace;
  cursor: pointer;
}

/* === Mostrar/Ocultar según dispositivo == */
.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
  text-align: center;
}


/* === CONTENEDOR DE REACCIÓN HABER-BOSCH === */
.reaction-container {
  background: rgb(176, 213, 241);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  text-align: center;
  max-width: 400px;
  margin: 2rem auto;
}

.reaction-container h3 {
  color: #3319a7;
  margin-bottom: 1rem;
}
button {
  background-color: #2d78ba;
  color: white;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s ease;
}

button:hover {
  background-color: #1f43e3;
  transform: scale(1.08); /* efecto de zoom suave */
}

.reaction-container:hover {
  background: #b2ebf2;
}

.reaction-list {
  list-style-type: none;
  padding: 0;
  margin-top: 1rem;
  font-weight: bold;
}

.reaction-list li {
  background-color: #89c6dc;
  margin: 0.5rem 0;
  padding: 0.8rem;
  border-radius: 0.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease-out;
  position: relative;
}

.reaction-list li::before {
  content: "🧪";
  margin-right: 0.5rem;
  animation: blink 1.5s infinite;
}

.reaction-list li:hover {
  background: #b2ebf2;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* === REPERCUSIÓN === */
.consequences-list {
  list-style: none;
  padding: 0;
  max-width: 500px;
  margin: 20px auto;
  font-size: 1.1rem;
  color: #333;
}

.consequences-list li {
  position: relative;
  background: rgb(176, 213, 241);
  margin-bottom: 15px;
  padding: 15px 20px 15px 50px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgb(0 0 0 / 0.1);
  transition: background-color 0.3s ease;
  font-weight: bold;
}

.consequences-list li:hover {
  background: #b2ebf2;
}

.consequences-list li::before {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
}

/* === BOTONES DE NAVEGACIÓN === */
.buttons {
  width: 100%;
  padding: 24px 0;
  position: relative;
}

.btn-horizontal {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.btn i {
  font-size: 30px;
  color: rgb(73, 72, 72);
}

.btn-up {
  position: absolute;
  bottom: 24px;
  right: 24px;
}

/* === FOOTER === */

.hover-sound {
  cursor: pointer;
  color: #c01677;
  transition: color 0.3s ease;
}

.hover-sound:hover {
  color: #661040;
}

/* === CURSOR HUMO === */
.cursor-trail {
  position: fixed;
  width: 16px;
  height: 16px;
  /* background: rgba(168, 207, 239, 0.25);  */
  background: rgba(255, 209, 85, 0.15);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  /* box-shadow: 0 0 15px rgba(146, 183, 246, 0.4); */
  box-shadow: 0 0 10px rgba(255, 209, 85, 0.25);
  transform: translate(-50%, -50%);
  animation: fadeOut 0.7s ease-out forwards;
}

#emoji-cursor {
  position: fixed;
  font-size: 24px;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: transform 0.05s linear;
}

@keyframes fadeOut {
  0% {
    opacity: 1;
    transform: scale(1) translate(-50%, -50%);
  }
  100% {
    opacity: 0;
    transform: scale(2.2) translate(-50%, -50%);
  }
}

/* RESPONSIVE */

@media only screen and (max-width: 945px) {

      #top {
        font-size: 55%;
        position: relative;
        z-index: 1;
    }
    
    label #btn {
        display: block;
    }
    
    .menu-item .menu-links {
        display: none;
    }
    
        /**/
    .menu {
        display: block;
        position: absolute;
        width: 100%;
        box-sizing: border-box;
        top: 100%;
        left: 0;
        display: none;
        text-align: center;
        transition: all .5s;
        z-index: 100;
    }
    
    .top .menu li {
        display: block;
        margin: 50px 0;
        line-height: 30px;
    }
    
    .menu li a {
        font-size: 20px;
    }
    
    .menu-item {
        background: #c4d4e9;
    }
    
    .menu-item:hover {
        background-color: #c8cdd1;
    }
    
    #check:checked~.menu {
        display: block;
    }
    
    label #cancel {
        display: none;
    }

    #check:checked~ul {
        width: 100%;
    }
    
    #check:checked~label #btn {
        display: none;
    }
    
    #check:checked~label #cancel {
        display: block;
    }
    
  }
 @media only screen and (max-width: 870px){

  .content-block {
    flex-direction: column;
    gap: 1rem;
  }

    section.history {
    padding: 1rem;
  }

  /*  ===  FOTO DANIEL(Ocultar Desktop y mostrar mobile) === */

   .image-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
    text-align: center;
  }

  .daniel-pic-mobile {
    width: 50%;       /* ancho máximo razonable */
    height: auto;     /* alto automático para mantener proporción */
    object-fit: contain;  /* muestra la imagen completa, sin recortar */
    border-radius: 12px;
  }

  .scientist-mobile {
    margin-top: 0.5rem;
    font-size: 1rem;
    color: #0077cc;
    text-decoration: underline;
  }

  .image-block {
    display: none;
  }

  /* === columna para responsive de imagenes y gifs === */
  
  .horizontal-list {
    flex-direction: column;
    align-items: center;
  }

  /* === flip-cards responsive === */

  .horizontal-cards {
    flex-direction: column;
    grid-template-columns: 1fr; /*cambia de 2 a una carta por fila*/
  }

  .flip-card {
    width: 90%;
    height: auto;
  }

   .tap-to-go {
    display: block;
  }

  .text-block, .image-block {
    flex: 1 1 100%;
  }

  .reaction-container ul.reaction-list {
    padding-left: 1rem;
  }
  
  section.history {
  width: 100%;
  margin: auto;
  padding: 2rem;
  }

  html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

  .flip-card {
    width: 90%;
    height: 300px;
  }

     section.history .quote-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    max-width: 100%;
  }

  .desktop-only {
    display: none;
  }

  .mobile-only {
    display: block;
    margin-bottom: 1rem;
  }

  .quote-img {
    max-width: 120px;
  }

  .scientist {
    font-size: 0.9rem;
  }
}

@media (max-width: 600px) {
  #emoji-cursor {
    display: none;
  }
}


  


