/* ============================================================
   Sombras del Aguaribay — sitio público
   Escrito mobile-first: la mayoría entra desde el celular, así que
   todo empieza en una columna y recién se abre en pantallas grandes.
   ============================================================ */

:root {
  /* Paleta sacada del lugar: monte, piedra y el naranja del atardecer serrano. */
  --verde-hondo:  #16301f;
  --verde:        #2f5a3d;
  --verde-suave:  #e6ede2;
  --musgo:        #7a8b5c;
  --terracota:    #c2643a;
  --arena:        #d9cdb6;
  --hueso:        #f5f1e8;
  --papel:        #fffdf8;
  --tinta:        #22201c;
  --tinta-suave:  #6b665c;
  --borde:        #e3ddd0;

  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;

  --sombra-baja: 0 1px 2px rgba(34, 32, 28, .05), 0 6px 18px -10px rgba(34, 32, 28, .2);
  --sombra-alta: 0 24px 60px -24px rgba(22, 48, 31, .45);

  --header-h: 68px;

  /* Curva suave y con algo de inercia, para que nada se sienta mecánico. */
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Los anclajes no quedan tapados por el header fijo. */
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Karla', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--tinta);
  background: var(--hueso);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.sin-scroll { overflow: hidden; }

img, video, iframe { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.01em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1rem; text-wrap: pretty; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--terracota);
  outline-offset: 3px;
  border-radius: 4px;
}

.container { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }

@media (min-width: 768px) {
  .container { width: min(1200px, 100% - 5rem); }
}

/* Grano tenue sobre todo el sitio: le saca el plano digital y lo acerca al papel. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: .03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 120px 120px;
}

/* ============================================================
   Header
   ============================================================ */

.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background .4s var(--ease), box-shadow .4s var(--ease);
}

/* Arranca transparente sobre el video y se vuelve sólido al bajar.
   En la versión anterior era opaco desde el principio y se comía el título. */
.header.solido {
  background: rgba(245, 241, 232, .92);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--borde);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-container { display: flex; align-items: center; gap: .7rem; text-decoration: none; }

.logo-image {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: contain;
  background: var(--papel);
  padding: 3px;
  flex-shrink: 0;
}

.logo-text h1,
.logo-text .logo-nombre {
  margin: 0;
  font-size: .82rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--papel);
  transition: color .4s var(--ease);
}

.tagline {
  margin: 0;
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 253, 248, .7);
  transition: color .4s var(--ease);
}

.header.solido .logo-text h1,
.header.solido .logo-text .logo-nombre { color: var(--verde-hondo); }
.header.solido .tagline { color: var(--tinta-suave); }

/* --- navegación de escritorio --- */

.nav { display: none; }

@media (min-width: 940px) {
  .nav {
    display: flex;
    align-items: center;
    gap: 1.9rem;
  }

  .nav-link {
    position: relative;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--papel);
    padding: .3rem 0;
    transition: color .4s var(--ease);
  }

  /* Subrayado que crece desde el centro. */
  .nav-link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 1.5px;
    background: var(--terracota);
    transform: translateX(-50%);
    transition: width .3s var(--ease);
  }

  .nav-link:hover::after { width: 100%; }

  .header.solido .nav-link { color: var(--verde-hondo); }

  .nav-link.destacado {
    background: var(--terracota);
    color: var(--papel) !important;
    padding: .5rem 1.1rem;
    border-radius: 999px;
  }

  .nav-link.destacado::after { display: none; }
  .nav-link.destacado:hover { filter: brightness(1.08); }
}

/* --- botón hamburguesa --- */

.nav-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  z-index: 120;
}

@media (min-width: 940px) { .nav-toggle { display: none; } }

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--papel);
  border-radius: 2px;
  transition: transform .35s var(--ease), opacity .2s, background .4s var(--ease);
}

.nav-toggle span + span { margin-top: 6px; }

.header.solido .nav-toggle span { background: var(--verde-hondo); }

.nav-toggle[aria-expanded='true'] span { background: var(--papel); }
.nav-toggle[aria-expanded='true'] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded='true'] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* --- panel móvil --- */

.nav-movil {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: var(--verde-hondo);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .35rem;
  padding: 2rem 2.5rem;
  transform: translateY(-100%);
  transition: transform .5s var(--ease);
}

.nav-movil.abierto { transform: translateY(0); }

@media (min-width: 940px) { .nav-movil { display: none; } }

.nav-movil a {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.9rem, 9vw, 2.6rem);
  color: var(--hueso);
  text-decoration: none;
  padding: .35rem 0;
  opacity: 0;
  transform: translateY(14px);
}

.nav-movil.abierto a {
  animation: entrar .5s var(--ease) forwards;
}

/* Escalonado: cada ítem entra un pelín después del anterior. */
.nav-movil.abierto a:nth-child(1) { animation-delay: .10s; }
.nav-movil.abierto a:nth-child(2) { animation-delay: .16s; }
.nav-movil.abierto a:nth-child(3) { animation-delay: .22s; }
.nav-movil.abierto a:nth-child(4) { animation-delay: .28s; }
.nav-movil.abierto a:nth-child(5) { animation-delay: .34s; }

.nav-movil a.destacado { color: var(--terracota); }

@keyframes entrar {
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  padding: calc(var(--header-h) + 2rem) 1.25rem 4rem;
}

/* Tres capas, de atrás para adelante:
     -3  la foto (se ve al instante, y queda de red por si el video falla)
     -2  el video (se funde encima cuando tiene cuadros para mostrar)
     -1  el velo oscuro que da contraste al texto

   Antes la foto y el video compartían el z-index -2. Como el video se
   inserta con prepend, quedaba primero en el DOM y con el mismo nivel
   gana el último: la foto lo tapaba. El video se reproducía perfecto,
   pero abajo de la foto, así que no se veía nunca. */
.hero-fondo {
  position: absolute;
  inset: 0;
  z-index: -3;
  background: var(--verde-hondo) url('/img/hero.jpg') center/cover no-repeat;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}

/* Recién cuando el video tiene cuadros para mostrar se funde sobre la foto,
   así no hay un parpadeo negro mientras carga. */
.hero-video.listo { opacity: 1; }

/* Doble velo: uno parejo para el contraste del texto y otro desde abajo
   para fundir el video con el hueso de la sección siguiente. */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(22, 48, 31, .55) 0%, rgba(22, 48, 31, .3) 40%, rgba(22, 48, 31, .75) 100%),
    linear-gradient(0deg, var(--hueso) 0%, transparent 22%);
}

.hero-content { max-width: 62rem; }

.hero-kicker {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--arena);
  margin-bottom: 1.4rem;
  opacity: 0;
  animation: entrar .9s var(--ease) .15s forwards;
}

.hero h1,
.hero h2 {
  font-size: clamp(2.4rem, 9vw, 5.5rem);
  color: var(--papel);
  font-weight: 500;
  line-height: 1.02;
  margin-bottom: 1.2rem;
  opacity: 0;
  animation: entrar 1s var(--ease) .3s forwards;
}

.hero h1 em,
.hero h2 em {
  font-style: italic;
  color: var(--arena);
}

.hero-sub {
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  color: rgba(255, 253, 248, .88);
  max-width: 34rem;
  margin: 0 auto 2.4rem;
  opacity: 0;
  animation: entrar 1s var(--ease) .45s forwards;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  justify-content: center;
  opacity: 0;
  animation: entrar 1s var(--ease) .6s forwards;
}

.hero-scroll {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: .66rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255, 253, 248, .65);
  display: grid;
  justify-items: center;
  gap: .5rem;
  opacity: 0;
  animation: entrar 1s var(--ease) .9s forwards;
}

.hero-scroll::after {
  content: '';
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--arena), transparent);
  animation: latir 2.4s var(--ease) infinite;
}

@keyframes latir {
  0%, 100% { opacity: .3; transform: scaleY(.6); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}

/* ============================================================
   Botones
   ============================================================ */

.btn {
  font-family: inherit;
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: .95rem 1.9rem;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  transition: transform .25s var(--ease), background .25s, color .25s, box-shadow .25s;
}

.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--terracota);
  color: var(--papel);
  box-shadow: 0 10px 30px -12px rgba(194, 100, 58, .8);
}

.btn-primary:hover { background: #b0592f; box-shadow: 0 14px 34px -12px rgba(194, 100, 58, .9); }

.btn-fantasma {
  background: rgba(255, 253, 248, .1);
  color: var(--papel);
  border-color: rgba(255, 253, 248, .45);
  backdrop-filter: blur(6px);
}

.btn-fantasma:hover { background: var(--papel); color: var(--verde-hondo); }

.btn-verde { background: var(--verde-hondo); color: var(--hueso); }
.btn-verde:hover { background: var(--verde); }

.btn-texto {
  background: none;
  border: 0;
  padding: .5rem;
  min-height: 44px;
  font-size: .82rem;
  color: var(--tinta-suave);
  text-transform: none;
  letter-spacing: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.btn-texto:hover { color: var(--terracota); }

.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:active { transform: none; }

/* ============================================================
   Secciones
   ============================================================ */

section { padding: clamp(4rem, 11vw, 8rem) 0; }

.section-header { margin-bottom: clamp(2rem, 5vw, 3.5rem); max-width: 44rem; }

.section-kicker {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--terracota);
  margin-bottom: .9rem;
}

.section-header h2 {
  font-size: clamp(2rem, 5.5vw, 3.2rem);
  color: var(--verde-hondo);
  margin-bottom: .7rem;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--tinta-suave);
  margin: 0;
}

/* Aparición al hacer scroll. */
.revelar {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}

.revelar.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .revelar { opacity: 1; transform: none; }
}

/* ============================================================
   Domos
   ============================================================ */

.domos-grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .domos-grid { grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }
}

.domo-card {
  background: var(--papel);
  border: 1px solid var(--borde);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}

@media (hover: hover) {
  .domo-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--sombra-alta);
  }
  .domo-card:hover .domo-foto img { transform: scale(1.06); }
}

.domo-foto {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--verde-suave);
}

.domo-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}

.domo-capacidad {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  background: rgba(22, 48, 31, .82);
  backdrop-filter: blur(8px);
  color: var(--papel);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: .4rem .85rem;
  border-radius: 999px;
}

.domo-body {
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  flex: 1;
}

.domo-body h3 {
  font-size: 1.55rem;
  color: var(--verde-hondo);
}

.domo-body p {
  color: var(--tinta-suave);
  font-size: .96rem;
  margin: 0;
  flex: 1;
}

.domo-comodidades {
  font-size: .8rem !important;
  color: var(--musgo) !important;
  letter-spacing: .01em;
  flex: 0 !important;
  border-top: 1px solid var(--borde);
  padding-top: .8rem;
}

.domo-body .btn { margin-top: .9rem; width: 100%; }

/* --- domo en refacción --- */

.domo-card.inactivo { opacity: .85; }
.domo-card.inactivo .domo-foto img { filter: grayscale(1) contrast(.9); }

@media (hover: hover) {
  .domo-card.inactivo:hover { transform: none; box-shadow: none; }
  .domo-card.inactivo:hover .domo-foto img { transform: none; }
}

.domo-card.inactivo .domo-body h3 { color: var(--tinta-suave); }

.cinta-inactivo {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(34, 32, 28, .45);
  backdrop-filter: blur(2px);
}

.cinta-inactivo span {
  background: var(--hueso);
  color: var(--verde-hondo);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: .55rem 1.2rem;
  border-radius: 999px;
  transform: rotate(-4deg);
  box-shadow: var(--sombra-baja);
}

/* ============================================================
   Galería
   ============================================================ */

.galeria-section { background: var(--papel); }

.galeria-grid {
  display: grid;
  gap: .8rem;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 760px) {
  .galeria-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
  }
  /* Primera foto grande: rompe la grilla y evita el mosaico parejo y aburrido. */
  .galeria-grid > *:first-child {
    grid-column: span 2;
    grid-row: span 2;
  }
}

.galeria-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-md);
  aspect-ratio: 1;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: var(--verde-suave);
}

@media (min-width: 760px) { .galeria-item { aspect-ratio: auto; height: 100%; } }

.galeria-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease), filter .5s;
}

.galeria-item:hover img { transform: scale(1.07); }

/* ============================================================
   Promociones
   ============================================================ */

.promociones-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .promociones-grid { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
}

.promo-card {
  background: var(--verde-hondo);
  color: var(--hueso);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.promo-card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }

.promo-body { padding: 1.6rem; }

.promo-body h3 {
  font-size: 1.4rem;
  margin-bottom: .5rem;
  color: var(--papel);
}

.promo-body p { color: rgba(245, 241, 232, .8); font-size: .95rem; margin-bottom: .6rem; }

.promo-detalle {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--arena);
  border-top: 1px solid rgba(217, 205, 182, .3);
  padding-top: .7rem;
  margin-top: .3rem;
}

.vacio {
  color: var(--tinta-suave);
  font-style: italic;
  grid-column: 1 / -1;
}

/* ============================================================
   Ubicación
   ============================================================ */

.map-section {
  background: var(--verde-hondo);
  color: var(--hueso);
}

.map-section .section-header h2 { color: var(--papel); }
.map-section .section-header p { color: rgba(245, 241, 232, .72); }

.map-container {
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sombra-alta);
  border: 1px solid rgba(217, 205, 182, .2);
}

.map-container iframe {
  width: 100%;
  height: clamp(300px, 52vw, 480px);
  border: 0;
  display: block;
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
  background: #101f15;
  color: rgba(245, 241, 232, .75);
  padding: clamp(3rem, 7vw, 4.5rem) 0 2rem;
  font-size: .94rem;
}

.footer-content {
  display: grid;
  gap: 2.25rem;
  grid-template-columns: 1fr;
  margin-bottom: 2.5rem;
}

@media (min-width: 640px) {
  .footer-content { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}

.footer-section h4 {
  font-family: 'Karla', sans-serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--arena);
  margin-bottom: .9rem;
}

.footer-section p { margin: 0 0 .3rem; }

.footer-link {
  display: inline-block;
  color: var(--hueso);
  text-decoration: none;
  padding: .2rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color .3s, color .3s;
}

.footer-link:hover { border-color: var(--terracota); color: var(--terracota); }

.footer-bottom {
  border-top: 1px solid rgba(245, 241, 232, .12);
  padding-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: space-between;
  align-items: center;
  font-size: .82rem;
  color: rgba(245, 241, 232, .5);
}

.footer-bottom p { margin: 0; }
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: var(--arena); }

/* ============================================================
   Botón flotante de WhatsApp
   ============================================================ */

.wsp-flotante {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #1fa855;
  color: #fff;
  box-shadow: 0 12px 28px -8px rgba(31, 168, 85, .7);
  transition: transform .3s var(--ease);
}

.wsp-flotante:hover { transform: scale(1.08); }
.wsp-flotante svg { width: 28px; height: 28px; fill: currentColor; }

@media (min-width: 768px) {
  .wsp-flotante { right: 1.75rem; bottom: 1.75rem; }
}

/* ============================================================
   Modales
   ============================================================ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  background: rgba(22, 32, 24, .6);
  backdrop-filter: blur(5px);
}

.modal.abierto { display: grid; }

/* En celular sale como hoja desde abajo, que es el gesto natural del pulgar. */
.modal { align-items: end; justify-items: stretch; }

.modal-content {
  background: var(--hueso);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  width: 100%;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.5rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom));
  animation: subir .4s var(--ease);
}

@keyframes subir {
  from { transform: translateY(3%); opacity: .6; }
  to { transform: translateY(0); opacity: 1; }
}

@media (min-width: 720px) {
  .modal { align-items: center; justify-items: center; padding: 2rem; }
  .modal-content {
    max-width: 620px;
    border-radius: var(--r-lg);
    max-height: 88dvh;
    padding: 2rem;
    box-shadow: var(--sombra-alta);
  }
  @keyframes subir {
    from { transform: translateY(14px) scale(.98); opacity: 0; }
    to { transform: none; opacity: 1; }
  }
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.modal-header h2 {
  font-size: 1.6rem;
  color: var(--verde-hondo);
}

.modal-header p {
  margin: .2rem 0 0;
  font-size: .9rem;
  color: var(--tinta-suave);
}

.close-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--verde-suave);
  color: var(--verde-hondo);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background .25s;
}

.close-btn:hover { background: var(--arena); }

/* ============================================================
   Calendario
   ============================================================ */

.calendario-container {
  background: var(--papel);
  border: 1px solid var(--borde);
  border-radius: var(--r-md);
  padding: 1rem .85rem;
  user-select: none;
}

.calendario-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: 1rem;
}

.calendario-header h3 {
  font-size: 1.05rem;
  color: var(--verde-hondo);
  text-align: center;
  flex: 1;
}

.cal-nav {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: 1px solid var(--borde);
  border-radius: 50%;
  background: var(--papel);
  color: var(--verde-hondo);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .2s, border-color .2s;
}

.cal-nav:hover:not(:disabled) { background: var(--verde-suave); border-color: var(--musgo); }
.cal-nav:disabled { opacity: .3; cursor: not-allowed; }

.calendario-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: .35rem;
}

.calendario-weekdays div {
  text-align: center;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--tinta-suave);
  padding-bottom: .35rem;
}

.calendario-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.calendario-day {
  position: relative;
  /* Altura fija en vez de aspect-ratio: con relación de aspecto, las celdas
     vacías del comienzo del mes no tienen contenido del que deducir el ancho
     y se estiraban a lo alto de todo el contenedor. 44px es además el mínimo
     recomendado para tocar cómodo con el dedo. */
  height: 44px;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 500;
  color: var(--tinta);
  cursor: pointer;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  transition: background .18s, color .18s;
}

.calendario-day:hover:not(:disabled) { background: var(--verde-suave); }

.calendario-day.sin-dia { visibility: hidden; cursor: default; }

/* Días que no se pueden elegir: se ven apagados y no responden al toque.
   Antes eran clicables y no pasaba nada, que era la mayor fuente de confusión. */
.calendario-day:disabled {
  color: var(--borde);
  cursor: not-allowed;
  background: transparent;
}

.calendario-day.ocupada {
  color: #c9bfae;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

/* Extremos del rango elegido. */
.calendario-day.inicio,
.calendario-day.fin {
  background: var(--verde-hondo);
  color: var(--papel);
  font-weight: 700;
}

.calendario-day.inicio { border-radius: var(--r-sm) 4px 4px var(--r-sm); }
.calendario-day.fin { border-radius: 4px var(--r-sm) var(--r-sm) 4px; }
.calendario-day.inicio.fin { border-radius: var(--r-sm); }

/* Noches intermedias, incluida la previsualización mientras se elige la salida. */
.calendario-day.entre {
  background: var(--verde-suave);
  color: var(--verde-hondo);
  border-radius: 0;
}

.calendario-day.previa {
  background: var(--verde-suave);
  color: var(--verde-hondo);
  border-radius: 0;
  opacity: .75;
}

.calendario-day.hoy::after {
  content: '';
  position: absolute;
  bottom: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--terracota);
}

.calendario-day.inicio.hoy::after,
.calendario-day.fin.hoy::after { background: var(--arena); }

/* --- resumen y leyenda --- */

.cal-resumen {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: 1rem;
  padding: .85rem 1rem;
  background: var(--verde-suave);
  border-radius: var(--r-md);
  font-size: .92rem;
}

.cal-resumen.pidiendo {
  background: transparent;
  border: 1px dashed var(--borde);
  color: var(--tinta-suave);
  justify-content: center;
  font-style: italic;
}

.cal-fechas { flex: 1; display: flex; gap: 1.25rem; }

.cal-fecha-bloque { display: grid; gap: .1rem; }

.cal-fecha-bloque span {
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--tinta-suave);
}

.cal-fecha-bloque strong {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--verde-hondo);
}

.cal-noches {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--papel);
  background: var(--verde-hondo);
  padding: .35rem .75rem;
  border-radius: 999px;
  white-space: nowrap;
}

.calendario-leyenda {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  margin-top: .9rem;
  font-size: .78rem;
  color: var(--tinta-suave);
}

.leyenda-item { display: flex; align-items: center; gap: .45rem; }

.leyenda-color {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  flex-shrink: 0;
}

.leyenda-color.libre { background: var(--papel); border: 1px solid var(--borde); }
.leyenda-color.no-disp { background: repeating-linear-gradient(-45deg, #efe9dd, #efe9dd 3px, #e0d8c8 3px, #e0d8c8 6px); }
.leyenda-color.elegida { background: var(--verde-hondo); }

/* ============================================================
   Formulario de reserva
   ============================================================ */

.form { display: grid; gap: 1.1rem; }

.form-group { display: grid; gap: .4rem; }

.form label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--tinta-suave);
}

.form label .opcional { color: var(--borde); font-weight: 500; letter-spacing: 0; text-transform: none; }

.input {
  font-family: inherit;
  font-size: 1rem; /* 16px evita que iOS haga zoom al enfocar */
  padding: .85rem 1rem;
  min-height: 48px;
  border: 1px solid var(--borde);
  border-radius: var(--r-sm);
  background: var(--papel);
  color: var(--tinta);
  width: 100%;
  transition: border-color .2s, box-shadow .2s;
}

.input:focus {
  outline: 0;
  border-color: var(--musgo);
  box-shadow: 0 0 0 3px rgba(122, 139, 92, .18);
}

.input::placeholder { color: #b8b1a3; }

.domo-elegido {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .85rem 1rem;
  background: var(--verde-suave);
  border-radius: var(--r-md);
}

.domo-elegido img {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.domo-elegido div { display: grid; gap: .05rem; }

.domo-elegido span {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--tinta-suave);
}

.domo-elegido strong {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--verde-hondo);
}

.nota-precio {
  display: flex;
  gap: .7rem;
  padding: .9rem 1rem;
  background: rgba(194, 100, 58, .08);
  border: 1px solid rgba(194, 100, 58, .25);
  border-radius: var(--r-md);
  font-size: .9rem;
  color: var(--tinta);
  line-height: 1.5;
}

.nota-precio strong { color: var(--terracota); }

.form-error {
  background: #f7e0da;
  color: #a2381f;
  padding: .8rem 1rem;
  border-radius: var(--r-sm);
  font-size: .9rem;
  font-weight: 600;
}

.form .btn-primary { width: 100%; }

/* ============================================================
   Modales de resultado
   ============================================================ */

.modal-icono {
  width: 68px;
  height: 68px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2rem;
}

.modal-icono.ok { background: var(--verde-suave); color: var(--verde); }
.modal-icono.mal { background: #f7e0da; color: #a2381f; }

.modal-centrado { text-align: center; }
.modal-centrado h2 { font-size: 1.7rem; color: var(--verde-hondo); margin-bottom: .75rem; }
.modal-centrado p { color: var(--tinta-suave); margin-bottom: 1.75rem; }
.modal-centrado .btn { width: 100%; }

/* ============================================================
   Lightbox
   ============================================================ */

.lightbox {
  position: fixed;
  inset: 0;

  /* Por qué se cortaba la foto abajo en el celular:
     un elemento fijo con inset:0 se mide contra el viewport GRANDE, el que
     existe cuando la barra del navegador está escondida. Pero la barra casi
     siempre está a la vista, así que el visor terminaba siendo más alto que
     lo que se ve, y el pedazo de abajo quedaba tapado. Como el fondo está
     bloqueado, tampoco se podía scrollear para alcanzarlo.

     100dvh (dynamic viewport height) sí mide el alto realmente visible y se
     reajusta cuando la barra aparece o desaparece. El 100vh de arriba queda
     como respaldo para navegadores viejos. */
  height: 100vh;
  height: 100dvh;

  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(16, 31, 21, .95);

  /* Arriba deja lugar para el botón de cerrar; abajo alcanza con un margen
     chico. env(safe-area-inset-*) esquiva el notch y la barra de gestos. */
  padding:
    calc(3.5rem + env(safe-area-inset-top, 0px))
    1rem
    calc(1.25rem + env(safe-area-inset-bottom, 0px));

  overflow: hidden;
}

.lightbox.abierto { display: flex; }

.lightbox img {
  /* La causa real de que la foto se saliera de la pantalla:
     el visor era `display: grid` y la foto, como único hijo, formaba una
     fila de alto automático. Esa fila se estiraba al alto natural de la
     imagen (2000px o los que fueran), y entonces `max-height: 100%` se
     medía contra esa fila gigante en vez de contra la pantalla: no
     limitaba absolutamente nada.

     Dos cambios para que no vuelva a pasar:
       1) flex en vez de grid, que no infla el contenedor;
       2) los topes van contra el viewport directamente, sin depender de
          cómo el padre resuelva su altura.
     Los 5rem son el espacio del botón de cerrar arriba y el margen abajo. */
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 5rem);
  max-height: calc(100dvh - 5rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--r-sm);
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: 0;
  background: rgba(245, 241, 232, .12);
  color: var(--hueso);
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(6px);
  transition: background .25s;
}

.lightbox-close:hover,
.lightbox-nav:hover { background: rgba(245, 241, 232, .3); }

.lightbox-close {
  top: 1rem;
  right: 1rem;
  width: 46px;
  height: 46px;
  font-size: 1.6rem;
  line-height: 1;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 2rem;
  line-height: 1;
}

.lightbox-nav.prev { left: .75rem; }
.lightbox-nav.next { right: .75rem; }

@media (min-width: 768px) {
  .lightbox-nav.prev { left: 2rem; }
  .lightbox-nav.next { right: 2rem; }
}

/* ============================================================
   Utilidades
   ============================================================ */

.loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--tinta-suave);
  font-style: italic;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
