html {
  scrollbar-width: none;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background-color: rgb(239, 237, 237);
  background-image: url("./fondos/líneas.png");
  width: 100%;
  text-transform: none;
  text-align: center;
}

/* Estilos para párrafos */
p,
h4,
h5,
h6 {
  font-family: "Dosis", serif;
  margin: 0.1rem 0;
}

/* Estilos para encabezados */
h1,
h2,
h3 {
  font-family: "Neucha", sans-serif;
  margin: 0.2rem 0; /* Espacio entre encabezados */
}

h1 {
  font-weight: 550; /* Peso de fuente semi-negrita */
  font-size: 3.3vw; /* Tamaño de fuente */
  color: #1d2461; /* Color del texto */
  line-height: 1; /* Altura de línea */
  text-align: center;
  line-break: auto;
}

h2 {
  font-weight: 500; /* Peso de fuente semi-negrita */
  font-size: 2.7vw; /* Tamaño de fuente */
  color: #6d2f1d; /* Color del texto */
  line-height: 0.9; /* Altura de línea */
  text-align: center;
}

h3 {
  font-weight: 250; /* Peso de fuente semi-negrita */
  font-size: 1.5vw; /* Tamaño de fuente */
  color: #4a5c5f; /* Color del texto */
  line-height: 1.1; /* Altura de línea */
  text-align: center;
}

/* Estilos para P en diferentes pesos y tamaños*/

p {
  font-weight: 350; /* Peso de fuente normal */ /* Color del texto */
  line-height: 1.3; /* Altura de línea */
  color: #272727;
  font-size: 1.5vw;
}

h4 {
  font-weight: 450; /* Peso de fuente */
  font-size: 1.5vw; /* Tamaño de fuente */
  color: #446248; /* Color del texto */
  text-align: center;
  width: 85vw;
  display: inline-block;
  text-align: justify;
  line-height: 1.3;
  margin: auto;
  line-break: strict;
}

h5 {
  font-weight: 400; /* Peso de fuente normal */
  font-size: 1.5vw; /* Tamaño de fuente */
  color: #0f1230; /* Color del texto */
  text-align: center;
  width: 75vw;
  display: inline-block;
  text-align: justify;
  line-height: 1.4;
  line-break: strict;
}

h6 {
  font-weight: 80; /* Peso de fuente normal */
  text-align: center;
  margin: 0.2rem 0 0.1rem 0;
  font-size: 1.1rem;
  color: #1d2461;
}

/* Estilos para enlaces */
a {
  margin: 0;
  font-weight: 600; /* Peso de fuente semi-negrita */
  color: #446248; /* Color del enlace */
  text-decoration: none; /* Sin subrayado */
}

a:visited,
a:hover {
  color: #172118;
  border-bottom: 2px solid currentColor;
  text-decoration: underline; /* Subrayado al pasar el mouse */
}

#intro {
  position: relative;
  overflow: auto;
  text-align: center;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  transition: height 1s cubic-bezier(0.4, 0.2, 0.2, 1);
  background-color: white; /* Color de fondo */
}
#intro-imagen {
  width: 80vw;
  max-width: 100vw;
  height: 80vh;
  max-height: 100vh;
  object-fit: contain;
  object-position: center;
  flex: none;
  margin: 0;
  position: relative;
  z-index: 0;
  /* Elimina top/left para que se ajuste a la columna */
  filter: blur(10px);
  opacity: 0;
  animation: intro-imagen-blur-clear 0.8s 0.1s ease-out forwards,
    intro-imagen-fade-in 1.5s 0.1s ease-out forwards;
}

.intro-imagen-small {
  width: 55vw !important;
  height: 55vh !important;
  transition: width 1.8s, height 1.8s;
}

.intro-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 50vh;
  margin-top: 3vh; /* Ajusta la posición vertical */
  margin-bottom: auto;
  opacity: 0;
  animation: intro-fade-in 0.8s 1.6s ease-out forwards;
}

@keyframes intro-imagen-blur-clear {
  from {
    filter: blur(18px);
    opacity: 0;
  }
  60% {
    filter: blur(8px);
    opacity: 1;
  }
  to {
    filter: blur(0);
    opacity: 1;
  }
}

@keyframes intro-imagen-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Asegúrate que el contenido esté por encima del fondo animado */
#intro > * {
  position: relative;
  z-index: 1;
}

@keyframes intro-fade-in {
  to {
    opacity: 1;
  }
}

#outro {
  height: 50;
  padding: 50;
  line-height: 1.5;
  margin: 0 auto;
  background-color: #efb810;
  color: #272727;
  text-align: center;
}

#postIntro {
  display: none;
}

#scrolly {
  position: relative;
  display: flex;
  padding: 5vh;
}

#animaciones {
  position: sticky;
  width: 100%;
}

.step:not(:first-child) {
  margin-top: 1vh;
}

.step {
  background-color: #2c3691; /* Color cajitas de titulo */
  color: #ffffff;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
}

.step:last-child {
  margin-bottom: 0;
}

.step.is-active {
  background-color: rgb(255, 255, 255);
  color: #272727;
}

.step p {
  text-align: justify; /* Texto cajitas de titulo */
  margin-top: 0;
  padding: 2.5rem;
  font-size: 1.2rem;
  color: #2c3691; /* Color del texto */
}

#bajarParaAvanzar {
  height: 20vh;
  animation-duration: 2s; /* Duración de la animación */
  animation-name: slide-up-down;
  animation-iteration-count: infinite; /* Repite la animación indefinidamente */
  animation-direction: alternate; /* Alterna entre la animación hacia adelante y hacia atrás */
  animation-fill-mode: forwards; /* Mantiene el estado final de la animación */
  animation-timing-function: ease-in-out; /* Función de temporización para suavizar la animación */
}

@keyframes slide-up-down {
  from {
    translate: 0 -5px; /* Mueve hacia arriba */
  }

  to {
    translate: 0 5px; /* Mueve hacia abajo */
  }
}

#instrucciones {
  display: flex;
  flex-direction: column;
  justify-content: center; /* Centra verticalmente */
  align-items: center;
  width: 100vw;
  height: 100vh;
  min-height: 100vh; /* la sección llena la ventana */
  background-image: url("./fondos/antes_fondo.jpg");
  background-size: 100% 100%;
  overflow-y: auto;
  text-align: center;
  position: relative;
  padding: 1rem;
  box-sizing: border-box;
}

.instrucciones-content {
  display: block;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  overflow: hidden; /* Para contener el float */
}

.texto-instrucciones {
  width: 100%;
  text-align: left;
  margin-right: 280px; /* Margen derecho en lugar de padding-right */
}

/* Resetear estilos globales de h5 dentro de texto-instrucciones */
#instrucciones .texto-instrucciones h5 {
  display: block !important;
  width: auto !important;
  text-align: left !important;
  margin: 0.4rem 0;
  line-height: 1.4;
  font-size: 1.1rem;
}

.imagen-volumen {
  float: right;
  width: 260px;
  margin: 2rem 0 1rem 1.5rem; /* Añadir margin-top para bajar la imagen */
  display: block;
  clear: right;
}

.imagen-volumen img {
  width: 100%;
  max-width: 180px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer; /* Añadir cursor pointer para indicar que es clickeable */
}

.imagen-volumen img:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

/* Estilos para el enlace de la imagen */
.imagen-volumen a {
  display: block;
  text-decoration: none; /* Eliminar subrayado */
  border: none; /* Eliminar borde del enlace */
}

.imagen-volumen a:hover,
.imagen-volumen a:visited {
  border: none; /* Asegurar que no aparezca borde en estados hover/visited */
  text-decoration: none; /* Eliminar cualquier decoración */
}

.imagen-caption {
  margin-top: 1rem;
  font-family: "Dosis", serif;
  font-size: 0.9rem;
  color: #6d2f1d;
  text-align: center;
  line-height: 1.4;
  font-weight: 500;
}

/* Responsive para móviles */
@media (max-width: 768px) {
  .instrucciones-content {
    display: block;
  }

  .texto-instrucciones {
    margin-right: 0; /* Quitar margen derecho */
    text-align: center;
  }

  .texto-instrucciones h5 {
    text-align: center;
    margin: 0.8rem 0;
  }

  .imagen-volumen {
    float: none; /* Cancelar float */
    width: 100%;
    max-width: 250px;
    margin: 2rem auto 1rem auto; /* Centrar la imagen */
    text-align: center;
  }

  #instrucciones {
    padding: 1rem;
    height: auto;
    min-height: 100vh;
  }
}

#pasaralamesa {
  display: flex;
  flex-direction: row;
  justify-content: center; /* Centra horizontalmente */
  align-items: center; /* Centra verticalmente */
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  gap: 2vw; /* Espacio entre los botones */
}

.pasaralamesa h2 {
  font-size: 2.5vw;
}
#Pasaralamesabtn {
  width: 28vw; /* Ancho fijo para todos los botones */
  height: 3vw; /* Alto fijo para todos los botones */
  margin: 10px 0; /* Espaciado entre botones */
  background-color: #d95d39;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  text-align: center;
}

#Pasaralamesabtn:hover {
  background-color: #df785a;
}

#Ahoranobtn {
  width: 28vw; /* Ancho fijo para todos los botones */
  height: 3vw; /* Alto fijo para todos los botones */
  margin: 10px 0; /* Espaciado entre botones */
  background-color: #93bebe;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  text-align: center;
}

#Ahoranobtn:hover {
  background-color: #a5c3c9;
}

/* Clear floats after the columns */
.row:after {
  content: "";
  display: table;
  clear: both;
}

#mesa {
  display: flex;
  background-image: url("./fondos/Mesa.png");
  background-size: 100% 100%;
  width: 100vw;
  height: 100vh;
  scroll-snap-stop: normal;
  overflow: hidden;
}

/* PopUp de platos */

#innerMesa {
  width: 100%;
  padding: 14vh 15vw 16vh 19vw;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 7vw 3vw; /* Aumenta el espacio entre los botones de la mesa */
}

.grid-item {
  display: flex;
  justify-content: center;
  /* border: 1px solid #ccc; /* Debug grid */
  padding: 5vh 3vw; /* Aumenta el padding para más separación */
  min-height: 0; /* For some reason this avoids overflow */
}

.grid-item img {
  max-height: 100%;
  max-width: 90%;
  cursor: pointer;
}

.grid-item img:hover {
  opacity: 0.9;
}

#popUpPlatosClose {
  background-color: transparent;
  border: none;
  cursor: pointer;
  outline: none;
  z-index: 1001;
  position: absolute;
  top: 10vw;
  right: 10vw;
  width: 5em;
  height: 5em;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.18s, box-shadow 0.18s, transform 0.18s;
}
#popUpPlatosClose:hover {
  background: #939393;
  box-shadow: 0 1px 1px rgba(44, 54, 145, 0.13); /* Sombra más pequeña y sutil */
  transform: scale(0.7);
}
#popUpPlatosClose:active {
  background: #e2b5b3;
  transform: scale(0.97);
}
#popUpPlatosClose img,
#popUpPlatosClose svg {
  width: 1.5em;
  height: 1.5em;
  pointer-events: none;
}

#popUpPlatos {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  position: fixed;
  width: 90vw;
  left: 5vw;
  top: 5vh;
  height: 90vh;
  overflow: auto;
  scrollbar-width: none;
  background-color: white;
  border-radius: 4%;
  border-color: #a8201a;
  border-style: solid;
  border-width: 5px;
  z-index: 1000;
}

#popUpPlatos.show {
  display: block;
  opacity: 1;
}

#popUpPlatosClose {
  position: absolute;
  top: 0;
  right: 0;
}

#popUpPlatosClose.pulse {
  animation: pulse-popUpClose 2s cubic-bezier(0.23, 1, 0.32, 1) 0s 3;
}
@keyframes pulse-popUpClose {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(44, 54, 145, 0.13);
  }
  30% {
    transform: scale(1.11); /* antes 1.18 */
    box-shadow: 0 0 12px 4px #54100d;
  }
  50% {
    transform: scale(0.96); /* antes 0.92 */
    box-shadow: 0 0 0 0 rgba(44, 54, 145, 0.13);
  }
  70% {
    transform: scale(1.08); /* antes 1.12 */
    box-shadow: 0 0 10px 2px #54100d;
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(44, 54, 145, 0.13);
  }
}

#popUpPlatosImg {
  width: 60%;
}
.overlay-instruccion {
  position: absolute;
  top: 0;
  left: 0;
  width: 40%; /* Ocupa toda la columna izquierda */
  height: 100%;
  background: #a8201a;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.overlay-mensaje {
  max-width: 90%;
  width: 100%;
  height: 100%;
  text-align: center;
  background: #f1dad9;
  border: 1px solid #ccc;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  margin: 0 auto;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2vw 3vw;
}

.cerrarOverlay {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: #333;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 5px;
}

.cerrarOverlay span {
  font-family: "Neucha", sans-serif;
  font-size: 1.3rem;
  font-weight: 420;
  letter-spacing: 0.01em;
  color: white; /* Color del texto del botón */
}

.puzzle-container {
  max-width: min(90vw, 800px); /* Máximo 800px o 90% del viewport */
  max-height: min(80vh, 600px); /* Máximo 600px o 80% del viewport */
  margin: 0 auto;
  aspect-ratio: 1/1; /* Mantiene proporción cuadrada */
  position: relative;
}

.individual[data-plato] {
  position: relative;
  width: 90%;
  aspect-ratio: 16/9;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border: 2px dashed #ccc;
  margin: 1rem auto;
  z-index: 1;
  box-sizing: border-box;
  display: block;
}

.dropzone-plato {
  position: absolute;
  width: 80px; /* dropzoneRadius * 2, aumentado para mayor área */
  height: 80px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.18;
  background: #c3e1c7;
  z-index: 1;
  border: 2px dashed #4fc3f7;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
  /* Separación extra entre zonas: usa box-shadow para dar efecto de separación visual */
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.7);
}

/* Resalta la zona de drop cuando una pieza está cerca */
.dropzone-plato.proximidad {
  background: #4fc3f7;
  opacity: 0.32;
  border-color: #1976d2;
  box-shadow: 0 0 0 12px rgba(79, 195, 247, 0.18), 0 0 16px 4px #4fc3f7;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
}

/* Estilo para cada pedazo del plato (ajustado) */
.pieza-plato {
  width: 18%;
  height: auto;
  cursor: grabbing;
  position: absolute;
  z-index: 2; /* Subido para estar sobre las dropzones */
  transition: transform 0.1s ease;
  margin: 0;
  padding: 0;
}

.pieza-plato.colocada {
  filter: drop-shadow(0 0 12px #9f7b0b) brightness(1.08);
  animation: pieza-colocada-pop 1.1s cubic-bezier(0.23, 1, 0.32, 1);
  cursor: default !important;
  z-index: 2;
}

@keyframes pieza-colocada-pop {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 0px #9f7b0b) brightness(1);
    border-color: transparent;
  }
  60% {
    transform: scale(1.12);
    filter: drop-shadow(0 0 18px #9f7b0b) brightness(1.12);
    border-color: #9f7b0b;
  }
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0px #9f7b0b) brightness(1.08);
    border-color: #9f7b0b;
  }
}

/* Dropzones invisibles por defecto, solo resaltan al arrastrar una pieza cerca */
.dropzone-plato {
  opacity: 0;
  transition: box-shadow 0.2s, opacity 0.2s;
  pointer-events: none;
}
.dropzone-plato.proximidad {
  opacity: 1 !important;
  box-shadow: 0 0 0 6px rgba(255, 255, 0, 0.25),
    0 0 16px 8px rgba(255, 255, 0, 0.1);
  background: rgba(255, 255, 200, 0.1);
}

/* Popup de platos: organización en dos columnas */
.popUpPlatos-content {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: stretch;
  gap: 2vw;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

.hidden {
  display: none;
}

.popup-left,
.popup-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 0 0 60%;
  max-width: 60%;
  min-width: 0;
}

.popup-left {
  align-items: center;
  text-align: center;
  background-color: #f4eded;
  border-right: 2px solid #eee;
  flex: 0 0 40%;
  max-width: 40%;
  min-width: 0;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  box-sizing: border-box;
  padding: 2vw 1vw;
  overflow: hidden;
  margin: 0 auto;
  position: relative; /* Permite que el overlay-instruccion se posicione dentro */
}

.popup-left p,
.popup-left .texto-fragmento {
  font-size: 1rem;
  color: #1c0504;
  margin-bottom: 1vw;
  line-break: strict;
  width: 80%;
  max-width: 100%;
  display: block;
  text-align: justify;
  margin-left: auto;
  margin-right: auto;
  overflow-wrap: break-word;
  word-break: break-word;
  box-sizing: border-box;
}

.popup-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  min-height: 40vh;
  text-align: center;
}

/* Mueve las instrucciones debajo del individual */
.popup-instrucciones {
  font-size: 1rem;
  color: #9f7b0b;
  text-align: center;
  font-weight: 450;
  width: 100%;
  display: block;
}

.individual[data-plato] {
  order: 1;
}

.popup-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  min-height: 40vh;
}

/* Efecto de revelado del texto */
.popup-left {
  opacity: 0.2;
  transition: opacity 0.6s ease;
}

.popup-left.revelado {
  opacity: 1;
}

/* Elimino los estilos con #popup-right-btn para evitar conflicto con la clase */
.dropzone-plato {
  width: 30px; /* ajusta según tu dropzoneRadius */
  height: 30px;
  border-radius: 50%;
  border: 1px dashed #4fc3f7;
  background: rgba(79, 195, 247, 0.15);
  pointer-events: none;
  position: absolute;
  z-index: 1;
  transition: background 0.2s, border-color 0.2s;
}

@media (max-width: 900px) {
  .popUpPlatos-content {
    flex-direction: column;
    gap: 1vw;
  }
  .popup-left,
  .popup-right {
    align-items: center;
    text-align: center;
    border: none;
    padding: 2vw 0.5vw;
  }
  .popup-right img {
    max-width: 90vw;
  }
}

.reintentarPuzzle {
  pointer-events: auto;
  width: 14vw;
  height: 3vw;
  background-color: #54100d;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}
.reintentarPuzzle:hover {
  background-color: #6b1a16; /* Color al pasar el mouse */
}

.reintentarPuzzle span {
  font-family: "Neucha", sans-serif;
  font-size: 1rem;
  font-weight: 420;
  letter-spacing: 0.01em;
  color: white; /* Color del texto del botón */
}

#avisoPuzzlecompleto .reintentarPuzzle {
  position: static;
  margin: 2vw auto 0 auto;
  display: flex;
  justify-content: center;
  right: unset;
  bottom: unset;
}

/* Aviso de puzzle completado */

.aviso-completado {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80%;
  height: 80%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.95);
  color: #2c3691;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 2rem;
  box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.12);
  z-index: 10;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 2s;
}
.aviso-completado.visible {
  opacity: 1;
}

.aviso-completado h2 {
  font-size: 2.5vw;
  color: #2c3691;
}

.texto-fragmento ul {
  margin-left: 1.5em;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}
.texto-fragmento li {
  font-size: 0.9em;
  margin-bottom: 0.3em;
  font-family: dosis, sans-serif;
  line-break: auto;
}

.texto-fragmento.hidden {
  display: none;
}

/* --- Animación para texto-fragmento al aparecer --- */
.texto-fragmento.fragmento-animado {
  animation: fragmentoFadeInScaleGlow 0.85s cubic-bezier(0.5, 1, 0.5, 1);
  background: #d1b8b7; /* fondo suave temporal */
  box-shadow: 0 0 25px 2px #9b7c7b, 0 0 0 0 #fff0; /* resplandor dorado */
  border-radius: 0.8em;
  position: relative;
  z-index: 2;
  padding: 0.8em 1.2em;
}
@keyframes fragmentoFadeInScaleGlow {
  0% {
    opacity: 0;
    transform: scale(0.85);
    box-shadow: 0 0 0 0 #9b7c7b;
    background: #d1b8b7;
  }
  60% {
    opacity: 1;
    transform: scale(1.08);
    box-shadow: 0 0 24px 8px #9b7c7b;
    background: #d1b8b7;
  }
  85% {
    opacity: 1;
    transform: scale(0.98);
    box-shadow: 0 0 10px 2px #9b7c7b;
    background: #d1b8b7;
  }
  100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 0 #fff0;
    background: transparent;
  }
}

/* fin PopUp de platos */

/* página Ahora no */

#ahorano {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center; /* Opcional: Centra verticalmente */
  background-color: #dbe7e9;
  text-align: center;

  position: relative; /* Necesario para posicionar el botón de cerrar */
  overflow: hidden; /* Evita el desbordamiento */
}

#menurecursos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 20px 0 0 0;
  z-index: 2;
}

#menurecursos .btn {
  width: 200px; /* Ancho fijo para todos los botones */
  height: 50px; /* Alto fijo para todos los botones */
  margin: 10px 0; /* Espaciado entre botones */
  background-color: #93b7be;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  text-align: center;
}

#menurecursos .btn:hover {
  background-color: #a5c3c9; /* Color al pasar el mouse */
}

#menurecursos .btn.active {
  background-color: #2c3691; /* Color del botón activo */
  color: white; /* Color del texto del botón activo */
}

.galeria-recursos {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: auto;
  gap: 16px 16px;
  margin-top: 24px;
  justify-items: center;
  align-items: start;
  width: fit-content;
  max-width: 100vw;
  margin-left: auto;
  margin-right: auto;
  z-index: 1;
  overflow-x: auto;
}
.columna-recurso {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 210;
  height: auto;
  min-height: 110px;
  background: #edf3f4;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s;
  margin-bottom: 8px;
  justify-content: flex-start;
  box-sizing: border-box;
}
.columna-recurso img {
  width: 80%;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 7px;
}
.columna-recurso.show {
  display: flex;
}

.columna-recurso h3 {
  font-size: 0.92rem;
  line-height: 1.22;
  margin: 0.15em 0 0.08em 0;
  text-align: center;
  word-break: break-word;
  max-width: 96%;
  overflow-wrap: break-word;
}

.columna-recurso p,
.columna-recurso {
  font-size: 0.7rem;
  line-height: 1.22;
  margin: 0.15em 0 0.08em 0;
  text-align: center;
  word-break: break-word;
  max-width: 96%;
  overflow-wrap: break-word;
}

#cerrarAhoraNo {
  width: 28vw; /* Ancho fijo para todos los botones */
  height: 3vw; /* Alto fijo para todos los botones */
  margin: 10px 0; /* Espaciado entre botones */
  background-color: #d95d39;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  text-align: center;
}

#ahorano.row {
  margin: 8px -16px;
}

/* Add padding BETWEEN each column (if you want) */
#ahorano.row,
.rowAhorano > .column {
  padding: 8px;
}

/* Create three equal columns that floats next to each other */
#ahorano.column {
  float: left;
  width: 33.33%;
  display: none; /* Hide columns by default */
}

/* Clear floats after rows */
#ahorano.row:after {
  content: "";
  display: table;
  clear: both;
}

/* Content */
#ahorano.content {
  background-color: white;
  padding: 10px;
}

/* The "show" class is added to the filtered elements */
#ahorano.show {
  display: block;
}

/* fin página Ahora no */

/* Menú de navegación información proyecto */
#tablinks {
  display: flex;
  width: 100%;
}

.tablink {
  background-color: #ba9593;
  color: white;
  border: none;
  outline: none;
  cursor: pointer;
  font-size: 28px;
  width: 25%;
  font-family: "Neucha", sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
}

.tablink:hover {
  background-color: #d1b8b7;
}

/* Style the tab content (and add height:100% for full page content) */
.tabcontent {
  background-color: #f4eded;
  display: none;
  padding: 8%;
  height: 100%;
}

/* fin Menú de navegación información proyecto */

/* Estilos para el equipo */
.equipo-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 2rem;
  overflow: hidden;
}
.miembro {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(44, 54, 145, 0.1);
  padding: 1.2rem 1rem 1.5rem 1rem;
  width: 220px;
  min-width: 200px;
  max-width: 240px;
  text-align: center;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  transition: transform 0.18s, box-shadow 0.18s;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.miembro:hover {
  transform: translateY(-6px) scale(1.08);
  box-shadow: 0 6px 18px rgba(44, 54, 145, 0.18);
}
.miembro img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.7rem;
  border: 3px solid #87c38f;
  background: #ebf5ec;
}

.miembro h4 {
  display: block;
  width: 100%;
  font-weight: 350;
  text-align: center;
  font-size: 0.9rem;
  color: #2d4130;
  margin: 0.2rem 0 0.1rem 0;
}
.miembro p {
  font-size: 0.8rem;
  line-break: strict;
  text-align: justify;
  margin: auto;
  color: #627a7f;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
}
.equipo-carrusel-viewport {
  width: 1000px; /* 4 tarjetas de 220px + gaps */
  max-width: 98vw;
  overflow: hidden;
  margin: 0 auto 2rem auto;
  position: relative;
  box-sizing: border-box;
}
.equipo-carrusel-track {
  display: flex;
  transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
  will-change: transform;
  gap: 1.1rem;
}
@media (max-width: 900px) {
  .equipo-carrusel-viewport {
    width: 98vw;
    max-width: 98vw;
  }
  .equipo-carrusel-track {
    gap: 0.7rem;
  }
}
@media (max-width: 700px) {
  .equipo-container {
    gap: 0.7rem;
  }
  .miembro {
    width: 145px;
    min-width: 120px;
    max-width: 170px;
    padding: 0.9rem 0.4rem 1.2rem 0.4rem;
  }
  .miembro img {
    width: 56px;
    height: 56px;
  }
  .miembro h4 {
    font-size: 1.08rem;
  }
  .miembro p {
    font-size: 0.92rem;
  }
}

.carrusel-flecha {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  border-radius: 0;
  width: 40px;
  height: 40px;
  box-shadow: none;
  cursor: pointer;
  z-index: 2;
  opacity: 0.85;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carrusel-flecha img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(44, 54, 145, 0.1));
  transition: filter 0.2s;
}
.carrusel-flecha:hover {
  opacity: 1;
  background: transparent;
}
.carrusel-flecha:hover img {
  filter: drop-shadow(0 2px 8px #272727);
}
.carrusel-flecha-izq {
  left: 16px;
}
.carrusel-flecha-der {
  right: 16px;
}
@media (max-width: 900px) {
  .carrusel-flecha-izq {
    left: 4vw;
  }
  .carrusel-flecha-der {
    right: 4vw;
  }
}

#Epistolas img {
  display: block;
  margin: 2rem auto;
  max-width: 120px;
  width: 35vw;
  height: auto;
  border: none; /* Elimina el borde */
  background: none; /* Elimina el fondo */
}
#Recursos img {
  display: block;
  margin: 2rem auto;
  max-width: 120px;
  width: 35vw;
  height: auto;
  border: none; /* Elimina el borde */
  background: none; /* Elimina el fondo */
}

/* botones e inconos generales */
#startButtonImg {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  align-items: center;
  animation: intro-imagen-blur-clear 1.6s 0.1s ease-out forwards,
    intro-imagen-fade-in 1.6s 0.1s ease-out forwards;
}

#pasaralamesaButton {
  position: relative;
  top: 3.3vw;
  width: 28vw; /* Ancho fijo para todos los botones */
  height: 3vw; /* Alto fijo para todos los botones */
  margin: 10px 0; /* Espaciado entre botones */
  background-color: #93bebe;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  text-align: center;
  animation: intro-imagen-blur-clear 1.6s 0.1s ease-out forwards,
    intro-imagen-fade-in 1.6s 0.1s ease-out forwards;
}
#pasaralamesaButton:hover {
  background-color: #a5c3c9; /* Color al pasar el mouse */
}

#activasonidoButtonImg {
  position: absolute;
  top: 0.8vw;
  right: 84vw;
  max-width: 14vw; /* Ajusta el ancho del botón */
  height: auto; /* Lo coloco a la derecha del activasonidoButton, que está en left:10px */
  outline: none; /* Elimina el contorno al hacer clic */
  border: none; /* Elimina el borde */
  background: none; /* Elimina el fondo */
}

@media screen and (max-width: 1000px) {
  #activasonidoButtonImg {
    width: 50px; /* Reduce aún más el tamaño en pantallas pequeñas */
    top: 5px; /* Ajusta la posición superior */
    right: 5%; /* Ajusta la posición derecha */
  }
}

/* Botón Volver a intro: alineado a la izquierda del activasonidoButton */
#VolverintroButton {
  cursor: pointer;
  position: fixed;
  top: 1.3vw;
  left: 90vw; /* Lo coloco a la derecha del activasonidoButton, que está en left:10px */
  outline: none; /* Elimina el contorno al hacer clic */
  border: none; /* Elimina el borde */
  background: none; /* Elimina el fondo */
}
#VolverintroButton img {
  width: 48px;
  height: 48px;
  display: block;
  position: static;
}
@media (max-width: 600px) {
  #VolverintroButton {
    top: 2vw;
    left: 18vw;
    width: 40px;
    height: 40px;
  }
  #VolverintroButton img {
    width: 32px;
    height: 32px;
  }
}

#muteButton {
  cursor: pointer;
  position: fixed;
  top: 1.3vw;
  left: 94vw;
  outline: none; /* Elimina el contorno al hacer clic */
  border: none; /* Elimina el borde */
  background: none; /* Elimina el fondo */
}

#goToTopButton {
  display: none;
  background-color: transparent; /* Fondo transparente */
  border: none; /* Sin borde */
  cursor: pointer; /* Cambia el cursor al pasar el mouse */
  outline: none; /* Elimina el contorno al hacer clic */
}

/* fin botones e inconos generales */

.desktop-warning {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  background: rgba(255, 255, 255, 0.97);
  color: #191f20;
  font-weight: bold;
  font-family: "Dosis", sans-serif;
  text-align: center;
  padding: 1em 0.5em;
  z-index: 100;
  border-bottom: 2px solid #191f20;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(44, 54, 145, 0.07);
}
@media (max-width: 900px) {
  .desktop-warning {
    display: block;
  }
}

.CloseDesktopWarning {
  background: none;
  border: none;
  position: absolute;
  top: 8px;
  right: 18px;
  font-size: 1.5em;
  cursor: pointer;
  color: #191f20;
}

#pasaralamesaButton span,
#Pasaralamesabtn span,
#Ahoranobtn span,
#cerrarAhoraNo span {
  font-family: "Neucha", sans-serif;
  font-size: 1.3rem;
  font-weight: 420;
  letter-spacing: 0.01em;
}
