/* Fondo del index: va en `html`, NO en el body — el porqué, en manu_dev/_estado */
html {
  background-image: var(--fondo-index-img, url(/images/fondo.webp));
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center;
}

.index {
  width: 100%;
  /* min-height (no height fija): si el contenido pasa de 100dvh, el .index CRECE */
  min-height: 100dvh;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Transparente: el fondo lo pinta el html (ver arriba) */
  background-color: transparent;
}

/* HEADER */
/* `display:flex` y `align-items` los pone estructura-base.css junto con */
.index__header {
  width: 100%;
  max-width: 50rem;
  padding: 0.5rem;
  gap: 0.5rem;
  z-index: 3;
  justify-content: space-between;
  /* Animaciones */
  animation: rotation 2s;
}

/* Botón RESERVAR del header — color/background/animación en styles1.css */
.index__boton-reservar {
  padding: 0.3em 0.5rem;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 800;
  border-radius: var(--border-radius);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.index__header-banderas {
  width: 100%;
  display: flex;
  justify-content: end;
  align-items: center;
  gap: 0.7rem;
}
.index_header-banderas-flag {
  width: 2.2rem;
  border-radius: 50%;
  box-shadow: var(--sombra);
  cursor: pointer;
}
/* HERO */
/* La imagen de cabecera (.hero-img) es un componente COMPARTIDO: su aspecto vive */
/* Posición del hero: la pone estructura-base (hero único de flota) */

/* BOTONES */
/* La separación entre botones la controla --btn-index-sep (default de flota */
.index__buttons {
  width: 100%;
  max-width: 50rem;
  padding-left: 1rem; /* aire a la izquierda (convención de flota) */
  display: flex;
  flex-direction: column;
  z-index: 1;
}
.index__buttons > :nth-child(1) {
  width: 95%;
  /* Animaciones */
  animation: rotation 2s;
}
.index__buttons > :nth-child(2) {
  width: 85%;
  animation: rotation 2s;
}
.index__buttons > :nth-child(3) {
  width: 75%;
  animation: rotation 2s;
}
.index__buttons > :nth-child(4) {
  width: 65%;
  animation: rotation 2s;
}
.index__buttons > :nth-child(5) {
  width: 55%;
  animation: rotation 2s;
}
.index__buttons > :nth-child(6) {
  width: 45%;
  animation: rotation 2s;
}
.index__buttons-btn {
  width: 100%;
  border-radius: var(--border-radius);
  box-shadow: var(--sombra);
  cursor: pointer;
  /* Icono + texto alineados a la IZQUIERDA en una fila. El PADDING y el GAP */
  display: flex;
  align-items: center;
  justify-content: flex-start;
  /* El cristal (Liquid Glass) lo aporta liquid-glass.css */
  /* Degradado de marca por token (convención): en apps CLARAS pinta */
  background-image: var(--color-degradado2);
}
/* Mismos estilos que los nombres de familia (.platos__familia-h2): */
.index__buttons-texto {
  font-size: 1.5rem;
  /* El texto de los botones del index va DEL MISMO color que sus iconos */
  color: var(--color-icono-nav);
}
/* Botón @easybooking flotante del index: oculto (en el index la reserva se hace */
.easy-index {
  display: none;
}

/* MODAL GOOGLE MAPS */

/* Bloquear scroll cuando el modal está abierto */
body.menu-open {
  overflow: hidden;
}

/* Overlay del modal */
.maps-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(0.3125rem);
  z-index: 15;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.3s ease-out,
    visibility 0.3s ease-out;
}

.maps-modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

/* Contenido del modal */
/* El CRECIMIENTO al abrir (transform + transition, con rebote) lo pone */
.maps-modal-content {
  position: relative;
  width: 100%;
  max-width: 56.25rem;
  height: 80vh;
  max-height: 37.5rem;
  background: #fff;
  border-radius: 0.9375rem;
  overflow: hidden;
  box-shadow: 0 0.625rem 2.5rem rgba(0, 0, 0, 0.5);
  opacity: 0;
}

.maps-modal.active .maps-modal-content {
  opacity: 1;
}

/* Botón cerrar (X) */
.maps-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  background: linear-gradient(-55deg, #333 0%, #000 55%);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 16;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0.125rem 0.625rem rgba(0, 0, 0, 0.3);
  transition:
    transform 0.3s ease,
    background 0.3s ease;
}

.maps-modal-close:hover {
  transform: rotate(90deg) scale(1.1);
}

/* Iframe del mapa */
.maps-container {
  width: 100%;
  height: 100%;
}

.maps-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Botón "Cómo llegar" */
.maps-directions-btn {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  background: linear-gradient(-55deg, #333 0%, #000 55%);
  color: #fff;
  text-decoration: none;
  border-radius: 3.125rem;
  font-weight: 400;
  font-size: 1rem;
  box-shadow: 0 0.25rem 0.9375rem rgba(0, 0, 0, 0.3);
  transition:
    transform 0.3s ease,
    background 0.3s ease;
  z-index: 16;
}

.maps-directions-btn:hover {
  transform: translateX(-50%) scale(1.05);
  color: #fff;
}

/* Animación rotate-scale-up-diag-2 */
@-webkit-keyframes rotate-scale-up-diag-2 {
  0% {
    -webkit-transform: scale(1) rotate3d(-1, 1, 0, 0deg);
    transform: scale(1) rotate3d(-1, 1, 0, 0deg);
  }
  50% {
    -webkit-transform: scale(2) rotate3d(-1, 1, 0, 180deg);
    transform: scale(2) rotate3d(-1, 1, 0, 180deg);
  }
  100% {
    -webkit-transform: scale(1) rotate3d(-1, 1, 0, 360deg);
    transform: scale(1) rotate3d(-1, 1, 0, 360deg);
  }
}
@keyframes rotate-scale-up-diag-2 {
  0% {
    -webkit-transform: scale(1) rotate3d(-1, 1, 0, 0deg);
    transform: scale(1) rotate3d(-1, 1, 0, 0deg);
  }
  50% {
    -webkit-transform: scale(2) rotate3d(-1, 1, 0, 180deg);
    transform: scale(2) rotate3d(-1, 1, 0, 180deg);
  }
  100% {
    -webkit-transform: scale(1) rotate3d(-1, 1, 0, 360deg);
    transform: scale(1) rotate3d(-1, 1, 0, 360deg);
  }
}

/* MOVIMIENTO — animación del logo del index */
.movimiento {
  animation: rotate-scale-up-diag-2 2s linear both;
  width: 70dvw;
  max-width: 30rem;
  position: fixed;
  bottom: 8dvh;
  left: 30%;
  margin: auto;
  /* Decorativo: por detrás del contenido (-2, nunca -1 = nivel de .wrapper) */
  z-index: -2;
  pointer-events: none;
  @media (width > 60rem) {
    right: 0;
  }
}
