/* ==========================================================================
   Landing publica del hotel - mobile-first
   Paleta: azul marino profundo + dorado calido
   ========================================================================== */

:root {
  --color-primario: #0b4f6c;
  --color-primario-oscuro: #073549;
  --color-primario-claro: #1f8a9e;
  --color-acento: #c9a24b;
  --color-acento-oscuro: #a8842e;
  --color-texto: #23272b;
  --color-texto-claro: #6c7580;
  --color-fondo: #ffffff;
  --color-fondo-alterno: #eef7f7;
  --color-borde: #d9eaec;
  --color-footer-fondo: #0a3d52;
  --color-footer-texto: #d3e6ea;
  --color-whatsapp: #25d366;

  --fuente-base: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --espacio-seccion: 3rem;
  --radio-borde: 0.75rem;
  --sombra-suave: 0 0.5rem 1.5rem rgba(11, 79, 108, 0.12);
  --color-turquesa: #2bb3c0;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;          /* Referencia estable para height:100% de Bootstrap Modal */
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
}

body {
  font-family: var(--fuente-base);
  color: var(--color-texto);
  background-color: var(--color-fondo);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
}

.seccion {
  padding-top: var(--espacio-seccion);
  padding-bottom: var(--espacio-seccion);
}

.seccion-alterna {
  background-color: var(--color-fondo-alterno);
}

.titulo-seccion {
  font-weight: 700;
  color: var(--color-primario);
  margin-bottom: 0.5rem;
}

.subtitulo-seccion {
  color: var(--color-texto-claro);
  margin-bottom: 2rem;
}

.btn-primario-hotel {
  background-color: var(--color-acento);
  border-color: var(--color-acento);
  color: #ffffff;
  font-weight: 600;
  padding: 0.65rem 1.75rem;
  border-radius: var(--radio-borde);
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.btn-primario-hotel:hover,
.btn-primario-hotel:focus {
  background-color: var(--color-acento-oscuro);
  border-color: var(--color-acento-oscuro);
  color: #ffffff;
  transform: translateY(-1px);
}

/* ---------- Navbar ---------- */

.navbar-hotel {
  background-color: #ffffff;
  box-shadow: 0 0.125rem 0.5rem rgba(11, 79, 108, 0.08);
  border-bottom: 3px solid var(--color-turquesa);
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  transition: box-shadow 0.2s ease;
}

.navbar-hotel .navbar-brand {
  color: var(--color-primario);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.navbar-hotel .navbar-toggler {
  border-color: var(--color-borde);
}

.navbar-hotel .navbar-toggler-icon {
  filter: invert(1) brightness(0.35) sepia(1) hue-rotate(150deg) saturate(4);
}

.navbar-hotel .nav-link {
  color: var(--color-texto);
  font-weight: 500;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.navbar-hotel .nav-link:hover,
.navbar-hotel .nav-link:focus,
.navbar-hotel .nav-link.active {
  color: var(--color-primario-claro);
}

.navbar-hotel .dropdown-menu {
  border: none;
  box-shadow: var(--sombra-suave);
  border-radius: var(--radio-borde);
}

.navbar-hotel .dropdown-item:hover,
.navbar-hotel .dropdown-item:focus {
  background-color: var(--color-fondo-alterno);
  color: var(--color-primario);
}

.navbar-hotel.navbar-scrolled {
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.18);
}

.navbar-logo {
  height: 2.25rem;
  width: 2.25rem;
  object-fit: contain;
  border-radius: 0.25rem;
  background-color: transparent;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  color: #ffffff;
  background-color: var(--color-primario-oscuro);
  background-size: cover;
  background-position: center;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 53, 73, 0.6) 0%, rgba(31, 138, 158, 0.35) 100%);
}

.hero-contenido {
  position: relative;
  z-index: 1;
  padding: 2.5rem 1rem;
}

.hero-titulo {
  font-size: 1.9rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.hero-subtitulo {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.75rem;
}

.hero-texto {
  max-width: 45rem;
  margin: 0 auto 1.75rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
}

@media (min-width: 768px) {
  .hero {
    min-height: 70vh;
  }

  .hero-titulo {
    font-size: 2.75rem;
  }

  .hero-subtitulo {
    font-size: 1.25rem;
  }
}

@media (min-width: 992px) {
  .hero-titulo {
    font-size: 3.25rem;
  }
}

/* ---------- Carrusel (enmarcado, distinto del hero) ---------- */

.carrusel-marco {
  position: relative;
  max-width: 62rem;
  margin: 0 auto;
  padding: 0.6rem;
  background-color: #ffffff;
  border: 2px solid var(--color-acento);
  border-radius: 1.25rem;
  box-shadow: 0.75rem 0.75rem 0 rgba(43, 179, 192, 0.35), var(--sombra-suave);
}

.carrusel-hotel .carousel {
  border-radius: 0.8rem;
  overflow: hidden;
}

.carrusel-hotel .carousel-item {
  height: 40vh;
  min-height: 240px;
  background-size: cover;
  background-position: center;
}

.carrusel-hotel .carousel-caption {
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2.5rem 1.5rem 2.75rem;
  background: linear-gradient(0deg, rgba(7, 53, 73, 0.85) 0%, rgba(7, 53, 73, 0) 100%);
}

@media (min-width: 768px) {
  .carrusel-hotel .carousel-item {
    height: 55vh;
  }
}

/* ---------- Tarjetas ---------- */

.tarjeta-hotel {
  border: 1px solid var(--color-borde);
  border-radius: var(--radio-borde);
  overflow: hidden;
  height: 100%;
  background-color: var(--color-fondo);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tarjeta-hotel:hover {
  transform: translateY(-4px);
  box-shadow: var(--sombra-suave);
}

.tarjeta-hotel-imagen {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background-color: var(--color-fondo-alterno);
}

.tarjeta-hotel-imagen-placeholder {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-fondo-alterno);
  color: var(--color-texto-claro);
  font-size: 2.5rem;
}

.tarjeta-hotel-cuerpo {
  padding: 1.1rem 1.25rem 1.4rem;
}

.tarjeta-hotel-precio {
  color: var(--color-acento-oscuro);
  font-weight: 700;
}

.tarjeta-servicio {
  text-align: center;
  padding: 1.25rem 0.75rem;
}

.tarjeta-servicio-icono {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: #ffffff;
  border: 1px solid var(--color-borde);
  color: var(--color-primario-claro);
  font-size: 1.5rem;
}

/* ---------- Nosotros / contenido de texto ---------- */

.contenido-texto {
  line-height: 1.75;
  color: var(--color-texto);
}

.seccion-imagen {
  max-height: 22rem;
  object-fit: cover;
  border-radius: 0.5rem;
}

/* ---------- Ubicaciones ---------- */

.tarjeta-ubicacion i {
  color: var(--color-acento-oscuro);
  width: 1.25rem;
}

/* ---------- Footer ---------- */

.footer-hotel {
  background-color: var(--color-footer-fondo);
  color: var(--color-footer-texto);
  padding-top: 2.5rem;
  padding-bottom: 1.5rem;
}

.footer-hotel h5 {
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-logo {
  height: 2.5rem;
  width: 2.5rem;
  object-fit: contain;
  border-radius: 0.25rem;
  background-color: transparent;
}

.footer-hotel a {
  color: var(--color-footer-texto);
}

.footer-hotel a:hover {
  color: var(--color-acento);
}

.footer-hotel .redes-sociales a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.08);
  margin-right: 0.5rem;
  transition: background-color 0.2s ease;
}

.footer-hotel .redes-sociales a:hover {
  background-color: var(--color-acento);
  color: #ffffff;
}

.footer-hotel hr {
  border-color: rgba(255, 255, 255, 0.12);
}

.footer-copyright {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
}

/* ---------- Boton flotante de WhatsApp ---------- */

.boton-whatsapp-flotante {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: var(--color-whatsapp);
  color: #ffffff;
  font-size: 1.75rem;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.3);
  z-index: 1030;
  transition: transform 0.2s ease;
}

.boton-whatsapp-flotante:hover {
  color: #ffffff;
  transform: scale(1.08);
}

/* ---------- Contacto ---------- */

.tarjeta-contacto-aviso {
  border: 1px dashed var(--color-borde);
  border-radius: var(--radio-borde);
  padding: 1.25rem;
  background-color: var(--color-fondo-alterno);
}

.formulario-contacto .form-label {
  font-weight: 600;
  color: var(--color-primario);
}

/* ---------- Galeria / Lightbox ---------- */

.galeria-miniaturas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.galeria-miniatura-btn {
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
  border-radius: var(--radio-borde);
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.galeria-miniatura-imagen {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.galeria-miniatura-btn:hover .galeria-miniatura-imagen,
.galeria-miniatura-btn:focus .galeria-miniatura-imagen {
  transform: scale(1.06);
}

.modal-lightbox {
  /*
   * Altura y desbordamiento fijos contra el viewport.
   *
   * Bootstrap establece .modal { height:100%; overflow-y:auto }.
   * Sin html { height:100% } ese porcentaje se resuelve contra la altura
   * de CONTENIDO del documento (no del viewport), y el overflow-y:auto
   * detecta/descarta scrollbar en cada mousemove, disparando un bucle
   * de recalculo de layout que hace oscilar la posicion del dialog
   * (arriba-centro <-> abajo-izquierda) mientras el cursor esta en la pagina.
   *
   * Soluciones aplicadas:
   *   1. html { height:100% } da a Bootstrap una referencia estable.
   *   2. height:100vh calcula directo contra el viewport, sin ambiguedad.
   *   3. overflow:hidden elimina el bucle de deteccion de scrollbar.
   *   4. overflow-anchor:none evita que el scroll anchoring de Chrome
   *      salte cuando la imagen del lightbox cambia de tamano al cargar.
   */
  height: 100vh;
  overflow: hidden;
  overflow-anchor: none;
}

.modal-lightbox .modal-dialog {
  max-width: 90vw;
}

/*
 * modal-dialog-centered usa min-height:calc(100% - 1rem).
 * Si la altura del .modal padre oscila, el dialog salta.
 * Forzamos la referencia directamente al viewport.
 */
.modal-lightbox .modal-dialog-centered {
  min-height: calc(100vh - 2rem);
}

.modal-lightbox-imagen {
  max-width: 100%;
  max-height: 85vh;
  border-radius: var(--radio-borde);
}

.modal-lightbox-cerrar {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  z-index: 1;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  padding: 0.5rem;
}

/* ---------- Habitaciones (pagina detalle) ---------- */

.tarjeta-habitacion-detalle .lista-comodidades i {
  color: var(--color-acento-oscuro);
  width: 1.25rem;
}

/* ---------- Ofertas ---------- */

.tarjeta-oferta .galeria-miniaturas {
  padding: 0.75rem 0.75rem 0;
}

/* ---------- Modal de reserva en linea ---------- */

.reserva-en-linea-pasos {
  border-bottom: 1px solid var(--color-borde);
  padding-bottom: 0.75rem;
}

.reserva-en-linea-paso {
  color: var(--color-texto-claro);
  font-weight: 600;
  font-size: 0.9rem;
}

.reserva-en-linea-paso.activo {
  color: var(--color-primario);
  border-bottom: 2px solid var(--color-acento);
  padding-bottom: 0.5rem;
}

/* ---------- Mapa embebido (sucursal unica) ---------- */

.mapa-ubicacion-inline {
  height: 20rem;
  border-radius: var(--radio-borde);
  border: 1px solid var(--color-borde);
  box-shadow: var(--sombra-suave);
  z-index: 0;
}
