/* indexBollywood.css — index propio de Bollywood (botones-imagen en escudo) */

.index {
  width: 100%;
  height: 100dvh;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

/* Fondo del index: el div .logo__fondo a una pantalla dinámica (receta de la flota para Safari iOS) */
.index .logo__fondo {
  width: 100dvw;
  height: 100dvh;
  z-index: -3;
  background-image: var(--fondo-index-img, url(/images/fondo.webp));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Cabecera: idioma elegido a la izquierda, pastilla a la derecha */
.index .index__header {
  width: 100%;
  max-width: 50rem;
  padding-top: 0.5rem;
  gap: 0.5rem;
  z-index: 3;
  animation: rotation 2s;
  display: flex;
  justify-content: space-between;
}
.idioma__seleccionado {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  color: var(--negro);
}
.idioma__seleccionado img {
  width: 1.5rem;
  border-radius: 50%;
}
.index__header-banderas {
  display: flex;
  justify-content: end;
  align-items: center;
}

/* Hero */
.index__hero {
  width: calc(min(100%, 30rem) / 2 + clamp(9rem, 25vw, 10.5rem) - 1rem);
  padding: 0.2rem 0.4rem;
  background: linear-gradient(to bottom right, #fffcfa 0%, #fdf0e4 40%, #fcd8bc 70%, #ff9a5c 100%);
  border-radius: 0.75rem;
  box-shadow: 0 3px 8px rgba(37, 37, 37, 0.75);
  animation:
    crecerLogo 0.9s cubic-bezier(0.22, 1, 0.36, 1) both,
    glowLight 4s ease-in-out infinite;
}
.index__hero-img {
  width: 100%;
  height: auto;
  max-height: 10rem;
  margin: 0 auto;
  object-fit: contain;
}
@keyframes crecerLogo {
  from {
    opacity: 0;
    transform: scale(0);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Botones-imagen */
.cont__botones {
  width: 100%;
}
.cont__img {
  width: 100%;
  max-width: 30rem;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.cont__img:nth-child(2) {
  justify-content: center;
}

/* Entrada de los botones: llegan desde abajo a la izquierda y giran al colocarse */
.cont__img > * {
  animation: subirBoton 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--orden, 0) * 0.15s + 0.2s);
}
.cont__img:nth-child(1) > :nth-child(2) { --orden: 1; }
.cont__img:nth-child(2) > * { --orden: 2; }
.cont__img:nth-child(3) > :nth-child(1) { --orden: 3; }
.cont__img:nth-child(3) > :nth-child(2) { --orden: 4; }
.cont__img .index__img {
  animation:
    glowLight 4s ease-in-out infinite,
    girarBoton 2s ease calc(var(--orden, 0) * 0.15s + 0.8s);
}
@keyframes girarBoton {
  from {
    transform: rotateX(0deg);
  }
  to {
    transform: rotateX(360deg);
  }
}
@keyframes subirBoton {
  from {
    opacity: 0;
    transform: translate(-100vw, 60vh);
  }
  to {
    opacity: 1;
    transform: translate(0, 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .cont__img > * { animation: none; }
  .cont__img .index__img { animation: glowLight 4s ease-in-out infinite; }
  .index__hero { animation: glowLight 4s ease-in-out infinite; }
}

.index__boton-mapa {
  display: inline-block;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}
.index__img {
  width: clamp(9rem, 25vw, 10.5rem);
  display: inline-block;
  margin: 0 auto;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.2));
  animation: glowLight 4s ease-in-out infinite;
}

@keyframes glowLight {
  0%,
  100% {
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
  }
  25% {
    filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 2px #fff)
      drop-shadow(0 0 4px rgba(255, 255, 255, 0.6))
      drop-shadow(0 0 8px rgba(255, 255, 255, 0.3))
      drop-shadow(0 0 15px rgba(255, 255, 255, 0.1)) brightness(1.2);
  }
  50% {
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
  }
}
@keyframes rotation {
  from {
    transform: rotateX(180deg);
  }
  to {
    transform: rotateX(360deg);
  }
}

/* Modal de Google Maps */
.maps-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  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;
}
.maps-modal-content {
  position: relative;
  width: 100%;
  max-width: 900px;
  height: 80vh;
  max-height: 600px;
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
}
.maps-modal.active .maps-modal-content {
  opacity: 1;
}
.maps-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  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 2px 10px 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);
}
.maps-container {
  width: 100%;
  height: 100%;
}
.maps-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}
.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: 50px;
  font-weight: 400;
  font-size: 1rem;
  box-shadow: 0 4px 15px 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);
}
body.menu-open {
  overflow: hidden;
}
