/* ==========================
   TIPOGRAFÍAS Y BASE
========================== */
body {
  font-family: 'Montserrat', sans-serif;
  color: #2B2B2B;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}
h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  color: #2B2B2B;
}

/* ==========================
   COLORES DE MARCA
========================== */
:root {
  --color-primario: #C89200;   /* Ámbar */
  --color-secundario: #2F4A7E; /* Azul Colonial */
  --color-fondo-claro: #F7F7F7;
  --color-texto: #2B2B2B;
}

/* ==========================
   NAVBAR
========================== */
.navbar { background-color: #fff !important; font-weight: 500; }
.navbar-brand { display: flex; align-items: center; padding: 0; }
.nav-link { color: var(--color-texto) !important; transition: color .3s; }
.nav-link:hover { color: var(--color-primario) !important; }
.btn-primary {
  background-color: var(--color-primario);
  border-color: var(--color-primario);
  color: #fff;
}
.btn-primary:hover {
  background-color: #A87500;
  border-color: #A87500;
}

/* Navbar mejorado */
#mainNav {
  transition: box-shadow .25s ease, padding .25s ease, background-color .25s ease;
  padding: .7rem 0;
  background-color: #fff !important;
  border-bottom: 1px solid rgba(0,0,0,.05);
}
#mainNav.navbar-scrolled { box-shadow: 0 8px 20px rgba(0,0,0,.08); padding: .4rem 0; }

/* Logo en navbar (fluido) */
.brand-logo { display:block; height:42px; width:auto; object-fit:contain; }
.only-logo{ max-height:none; }
@media (min-width:576px){ .brand-logo{ height:50px; } }
@media (min-width:992px){ .brand-logo{ height:60px; } }
#mainNav.navbar-scrolled .brand-logo{ height:46px; }

/* Link activo del menú */
.navbar .nav-link.active { color: var(--color-primario) !important; }

/* ==========================
   SECCIONES
========================== */
section { padding: 60px 0; scroll-margin-top: 90px; }
section h2 { color: var(--color-secundario); margin-bottom: 30px; font-weight: 700; }

/* ==========================
   HERO (con AVIF/WebP)
========================== */
.hero {
  position: relative;
  min-height: 92vh;
  /* Fallback JPG para navegadores sin image-set */
  background: url('../img/fachada.jpg') no-repeat center center / cover;
  color: #fff;
}

/* Sobrescribe con AVIF/WebP si el navegador lo soporta */
.hero {
  background-image: image-set(
    url('../img/fachada.avif') type('image/avif'),
    url('../img/fachada.webp') type('image/webp'),
    url('../img/fachada.jpg')  type('image/jpeg')
  );
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* WebKit antiguo (Safari viejito) */
@supports (-webkit-image-set(url("") 1x)) {
  .hero {
    background-image: -webkit-image-set(
      url('../img/fachada.avif') type('image/avif'),
      url('../img/fachada.webp') type('image/webp'),
      url('../img/fachada.jpg')  type('image/jpeg')
    );
  }
}
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.35)); }
.hero-title {
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  letter-spacing: .5px;
  text-shadow: 0 2px 6px rgba(0,0,0,.45);
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  color: #fff;
}
.hero-subtitle {
  margin: .75rem auto 1.5rem; max-width: 720px;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  text-shadow: 0 2px 6px rgba(0,0,0,.45);
  color: #f5f5f5;
}
.hero .btn { margin-top: 20px; }
@media (max-width: 576px) { .hero { min-height: 86vh; } }

/* ==========================
   NOSOTROS
========================== */
.about-list li { margin-bottom: .5rem; color: #555; }
.about-img-wrapper { position: relative; border-radius: 14px; overflow: hidden; }
.about-img { width: 100%; height: 360px; object-fit: cover; display: block; }
.about-badge {
  position: absolute; left: 12px; bottom: 12px;
  background: rgba(0,0,0,.55); color: #fff; padding: .4rem .7rem;
  border-radius: 999px; font-size: .95rem; display: inline-flex; align-items: center; gap: .45rem;
  backdrop-filter: blur(2px);
}
@media (max-width: 576px){ .about-img { height: 280px; } }

/* ==========================
   HABITACIONES (tarjetas y modales)
========================== */
#habitaciones .card{ transition: transform .2s ease, box-shadow .2s ease; }
#habitaciones .card:hover{ transform: translateY(-2px); box-shadow: 0 12px 24px rgba(0,0,0,.12); }
#habitaciones .card-title { color: var(--color-secundario); font-weight: 700; }
#habitaciones .card ul { font-size: 0.95rem; color: #555; }

/* Ratio consistente en imágenes de tarjetas */
#habitaciones .card-img-top{
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  height: auto;
}

.modal-content { border: none; border-radius: 12px; overflow: hidden; }
.modal .btn-close { position: absolute; right: 8px; top: 8px; z-index: 2; }
.carousel-item img { max-height: 70vh; object-fit: cover; }

/* ==========================
   SERVICIOS
========================== */
#servicios i { color: var(--color-secundario); }
#servicios h5 { font-weight: 600; margin-top: 15px; }
#servicios p { font-size: 0.95rem; color: #555; }

/* ==========================
   GALERÍA
========================== */
#galeria .gallery-img {
  width: 100%;
  aspect-ratio: 4 / 3;   /* consistente con 600x450 y 400x300 */
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  transition: transform .35s ease, box-shadow .35s ease;
  display: block;
}
#galeria a:hover .gallery-img {
  transform: scale(1.02);
  box-shadow: 0 10px 26px rgba(0,0,0,.15);
}

/* Fallback si no hay soporte de aspect-ratio */
@supports not (aspect-ratio: 1 / 1){
  #habitaciones .card-img-top{ height: 180px; }
  #galeria .gallery-img{ height: 220px; }
  @media (max-width: 576px){
    #galeria .gallery-img{ height: 180px; }
  }
}

/* ==========================
   CONTACTO
========================== */
.contact-card {
  background: var(--color-fondo-claro);
  border-left: 5px solid var(--color-primario);
  border-radius: 10px;
}
#contacto .social-link {
  color: var(--color-texto);
  opacity: 0.85;
  transition: opacity .2s ease, color .2s ease;
}
#contacto .social-link:hover { color: var(--color-primario); opacity: 1; }
.map-embed { border-radius: 10px; }

/* Botón flotante de WhatsApp */
.whatsapp-float {
  position: fixed; right: 16px; bottom: 16px;
  background: #25D366; color: #fff; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.6rem; box-shadow: 0 8px 18px rgba(0,0,0,.2);
  z-index: 1030;
}
.whatsapp-float:hover { color: #fff; filter: brightness(0.95); }

/* ==========================
   FOOTER
========================== */
.footer { background-color: var(--color-secundario); color: #fff; font-size: 0.95rem; }
.footer-logo { max-width: clamp(160px, 18vw, 240px); height: auto; }
@media (max-width: 576px){ .footer-logo { max-width: 180px; } }
.footer a.footer-link,
.footer a.footer-legal,
.footer a.footer-social {
  color: #ffffff; opacity: 0.9; text-decoration: none;
  transition: opacity .2s ease, color .2s ease, text-decoration-color .2s ease;
}
.footer a.footer-link:hover,
.footer a.footer-legal:hover,
.footer a.footer-social:hover {
  opacity: 1; color: #ffffff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.8);
}
.footer-divider { border-color: rgba(255,255,255,.15); }
.footer h6 { letter-spacing: .04em; }

/* ==========================
   MODAL PDF (aviso)
========================== */
@media (min-width: 992px){
  #avisoModal .modal-body { height: 80vh; }
  #avisoModal .ratio { height: 100%; }
}



/* ==========================
   ACCESIBILIDAD
========================== */
.skip-link{
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus{
  left: 16px; top: 16px; width: auto; height: auto; padding: .5rem .75rem;
  background: #000; color: #fff; z-index: 1100; border-radius: 8px; text-decoration: none;
}

/* ===== Modal de promoción ===== */
.promo-modal .modal-content {
  background: transparent;      /* la imagen toma todo */
  border-radius: 12px;
}
.promo-modal .btn-close {
  filter: invert(1);            /* visible sobre fotos oscuras */
}
/* En móviles, que el modal no ocupe todo el alto visual */
@media (max-width: 576px){
  .promo-modal .modal-dialog {
    margin: 1rem;
  }
}

/* ===== Tamaño más contenido para el modal de promo ===== */
.promo-modal .modal-dialog{
  /* ancho máximo en desktop; elige el que te guste entre 520–720px */
  max-width: clamp(420px, 50vw, 640px);
  width: auto;
}

.promo-modal .modal-content{
  border-radius: 14px;
  overflow: hidden;
  background: transparent;
}

/* la imagen nunca debe ocupar más de X% del alto de la ventana */
.promo-modal picture,
.promo-modal img{
  display: block;
  width: 100%;
  height: auto;
  max-height: 75vh;        /* no más del 75% de la altura de la pantalla */
  object-fit: contain;     /* sin recortes; la imagen se ajusta */
}

/* pie del modal más compacto */
.promo-modal .p-3{
  padding: .75rem !important;
}

/* móviles: que respire y no choque con bordes */
@media (max-width: 576px){
  .promo-modal .modal-dialog{ 
    margin: 1rem;
    max-width: 92vw;
  }
  .promo-modal img{ 
    max-height: 78vh; 
  }
}

/* botón cerrar visible sobre fondos claros/oscursos */
.promo-modal .btn-close{ 
  filter: invert(1); 
}

/* tamaño final (desktop) */
.promo-modal .modal-dialog{
  max-width: clamp(420px, 46vw, 560px); /* antes 640px */
}

/* sombra y bordes */
.promo-modal .modal-content{
  border-radius: 16px;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

/* pie más compacto */
.promo-modal .p-3{
  padding: .65rem .9rem !important;
}

/* un poco más contenido en desktop */
.promo-modal .modal-dialog{
  max-width: clamp(420px, 42vw, 520px); /* antes 560–640 */
}
.promo-modal picture,
.promo-modal img{
  max-height: 72vh;     /* baja de 75vh a 72vh para +aire */
  object-fit: contain;  /* mantener SIN recorte (recomendado para promos con texto) */
}
/* CTA más cómodo en móvil */
@media (max-width: 576px){
  .promo-modal .p-3 .btn { width: 100%; }
}