/* BAGU · Paleta del logotipo: verde profundo, marfil y acentos dorados. */

:root {
  --bg-ivory: #FAF9F4;
  --bg-champagne-soft: #F1F2E9;
  --bg-warm-white: #FFFEFA;
  --bg-moka-deep: #132A22;
  --bg-moka-card: #213C30;
  --text-moka: #193027;
  --text-moka-muted: #59644E;
  --accent-honey: #B58B36;
  --accent-honey-dark: #8B692B;
  --accent-copper: #365742;
  --accent-copper-dark: #294735;
  --accent-champagne: #D3B46A;
  --accent-champagne-light: #E8D9AE;
  --border-honey-soft: rgba(181, 139, 54, 0.28);
  --border-honey-hover: rgba(181, 139, 54, 0.52);
  --ease-luxury: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-safe-offset: 6.25rem;
}

/* Compensación global para la barra de navegación fija */
html {
  scroll-padding-top: var(--nav-safe-offset);
}

#home-welcome,
#home-departamentos-preview,
#home-cuenca-location,
#home-final-cta,
#espacios-departamento-01,
#espacios-departamento-02,
#view-espacios,
#view-ubicacion,
#view-reservar {
  scroll-margin-top: var(--nav-safe-offset);
}

em {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
}

/* Textura sutil cálida de lino y papel algodón */
.ambient-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9990;
  opacity: 0.018;
  background-image: radial-gradient(#294538 1px, transparent 0);
  background-size: 22px 22px;
}

/* Atmósfera luminosa en marfil y champán suave */
.cuenca-ambient-bg {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 14%, rgba(211, 180, 106, 0.22) 0%, transparent 44%),
    radial-gradient(circle at 88% 20%, rgba(181, 139, 54, 0.10) 0%, transparent 46%),
    linear-gradient(180deg, #FAF9F4 0%, #F1F2E9 100%);
}

/* ==========================================================================
   PRELOADER CÁLIDO
   ========================================================================== */
.preloader {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #203D30 0%, #10251D 100%);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 1s var(--ease-luxury);
}

.preloader.loaded {
  transform: translateY(-100%);
  pointer-events: none;
}

.preloader-progress {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #D3B46A, #B58B36, #365742);
  transition: width 0.8s var(--ease-luxury);
}

/* ==========================================================================
   1. NAVBAR HOTEL BOUTIQUE — CRISTAL CAFÉ CÁLIDO TRANSLÚCIDO (GLASSMORPHISM REAL)
   ========================================================================== */
/* Respaldo cálido sólido si el navegador no soporta backdrop-filter */
.navbar-glass-shell {
  background-color: rgba(41, 69, 56, 0.94);
  border: 1px solid rgba(211, 180, 106, 0.42);
  box-shadow:
    0 12px 30px -6px rgba(19, 42, 34, 0.22),
    inset 0 1px 0 rgba(255, 248, 234, 0.28);
  transition:
    background 0.35s var(--ease-luxury),
    border-color 0.35s var(--ease-luxury),
    box-shadow 0.35s var(--ease-luxury);
}

/* Glassmorphism real cuando el navegador admite backdrop-filter */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .navbar-glass-shell {
    background: linear-gradient(
      135deg,
      rgba(41, 69, 56, 0.44) 0%,
      rgba(19, 42, 34, 0.54) 100%
    );
    backdrop-filter: blur(20px) saturate(165%);
    -webkit-backdrop-filter: blur(20px) saturate(165%);
    border: 1px solid rgba(211, 180, 106, 0.44);
    box-shadow:
      0 14px 34px -8px rgba(19, 42, 34, 0.24),
      inset 0 1px 0 rgba(255, 248, 234, 0.34),
      inset 0 -1px 0 rgba(211, 180, 106, 0.14);
  }

  /* Al desplazarse o cambiar a vistas con fondo marfil: cristal café cálido translúcido con legibilidad garantizada */
  .navbar.solid-nav .navbar-glass-shell,
  .navbar.scrolled .navbar-glass-shell {
    background: linear-gradient(
      135deg,
      rgba(41, 69, 56, 0.72) 0%,
      rgba(19, 42, 34, 0.78) 100%
    );
    backdrop-filter: blur(22px) saturate(175%);
    -webkit-backdrop-filter: blur(22px) saturate(175%);
    border-color: rgba(211, 180, 106, 0.50);
    box-shadow:
      0 16px 36px -8px rgba(19, 42, 34, 0.24),
      inset 0 1px 0 rgba(255, 248, 234, 0.32);
  }
}

.nav-brand-btn,
.nav-tab-pill {
  text-shadow: 0 1px 3px rgba(20, 11, 5, 0.38);
}

.nav-tab-pill {
  position: relative;
  border: 1px solid transparent;
  transition: all 0.26s var(--ease-luxury);
}

.nav-tab-pill:hover {
  background: rgba(211, 180, 106, 0.16);
  border-color: rgba(211, 180, 106, 0.34);
}

.nav-tab-pill.active-tab {
  background: linear-gradient(135deg, #365742 0%, #193027 100%);
  color: #FFFFFF !important;
  font-weight: 600;
  border: 1px solid rgba(255, 242, 220, 0.52);
  box-shadow:
    0 6px 16px rgba(181, 139, 54, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.nav-tab-pill:focus-visible,
.nav-brand-btn:focus-visible {
  outline: 2px solid #D3B46A;
  outline-offset: 2px;
}

.view-panel.is-hidden {
  display: none !important;
}

.view-panel.active-view {
  animation: viewFadeIn 0.42s var(--ease-luxury) forwards;
}

@keyframes viewFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   MICROANIMACIONES ELEGANTES DE PORTADA
   ========================================================================== */
.reveal-up {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s var(--ease-luxury), transform 0.8s var(--ease-luxury);
}

.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.line-wrap {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}

.line-inner {
  display: block;
  transform: translateY(105%);
  transition: transform 0.9s var(--ease-luxury);
}

.line-inner.is-visible {
  transform: translateY(0%);
}

/* ==========================================================================
   2. HERO MÁS LUMINOSO: CIELO Y CÚPULAS DE CUENCA + FORMULARIO DE CRISTAL CÁLIDO
   ========================================================================== */
.hero-bg-wrapper {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-bg-image {
  position: absolute;
  inset: -4%;
  background-image: url('cupulas-cuenca.jpg');
  background-size: cover;
  background-position: center 30%;
  /* Mayor luz natural para destacar el azul del cielo y la cerámica de las cúpulas */
  filter: brightness(1.06) saturate(1.08) contrast(1.02);
  transform: scale(1.03);
  will-change: transform, filter;
}

@media (max-width: 768px) {
  .hero-bg-image {
    background-position: 54% 28%;
  }
}

/* Degradado cálido en tonos café/ámbar (sin negros grisáceos), dejando libre y luminoso el cielo y las cúpulas */
.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(19, 42, 34, 0.56) 0%,
      rgba(41, 69, 56, 0.28) 42%,
      rgba(41, 69, 56, 0.04) 72%,
      rgba(41, 69, 56, 0.0) 100%
    ),
    linear-gradient(
      180deg,
      rgba(19, 42, 34, 0.20) 0%,
      rgba(19, 42, 34, 0.0) 34%,
      rgba(19, 42, 34, 0.14) 74%,
      rgba(19, 42, 34, 0.48) 100%
    );
}

.hero-scroll-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(250, 246, 238, 0.2) 0%,
    rgba(250, 246, 238, 0.82) 68%,
    #FAF9F4 100%
  );
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}

.hero-headline {
  text-shadow:
    0 6px 26px rgba(19, 42, 34, 0.52),
    0 2px 6px rgba(19, 42, 34, 0.36);
}

.hero-subtitle-clean {
  text-shadow:
    0 2px 14px rgba(19, 42, 34, 0.75),
    0 1px 3px rgba(19, 42, 34, 0.58);
}

/* Formulario flotante de la portada con verdadero efecto cristal cálido */
.quick-search-bar {
  /* Respaldo sólido cálido si el navegador no soporta backdrop-filter */
  background-color: rgba(41, 69, 56, 0.92);
  border: 1px solid rgba(211, 180, 106, 0.45);
  box-shadow:
    0 20px 44px -10px rgba(19, 42, 34, 0.30),
    inset 0 1px 0 rgba(255, 248, 234, 0.28);
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .quick-search-bar {
    background: linear-gradient(
      135deg,
      rgba(41, 69, 56, 0.48) 0%,
      rgba(19, 42, 34, 0.58) 100%
    );
    backdrop-filter: blur(22px) saturate(170%);
    -webkit-backdrop-filter: blur(22px) saturate(170%);
    border: 1px solid rgba(211, 180, 106, 0.46);
    box-shadow:
      0 22px 48px -10px rgba(26, 15, 7, 0.30),
      inset 0 1px 0 rgba(255, 248, 234, 0.34),
      inset 0 -1px 0 rgba(211, 180, 106, 0.14);
  }
}

.hero-form-label {
  text-shadow: 0 1px 3px rgba(20, 11, 5, 0.48);
}

.hero-compact-field {
  background: transparent;
  border: 0;
  color: #FFFFFF;
  color-scheme: dark;
  text-shadow: 0 1px 3px rgba(20, 11, 5, 0.42);
  transition: color 0.2s ease;
}

.hero-compact-field::-webkit-calendar-picker-indicator {
  opacity: 0.94;
  filter: brightness(1.15) contrast(1.1);
  cursor: pointer;
}

.hero-compact-field:focus {
  color: #E8D9AE;
}

.hero-compact-field option {
  background-color: #193027;
  color: #FAF9F4;
}

@media (max-width: 1023px) {
  .hero-compact-field {
    background: rgba(255, 248, 236, 0.12);
    border: 1px solid rgba(211, 180, 106, 0.28);
    border-radius: 0.65rem;
    padding: 0.5rem 0.75rem;
  }
}

/* Botones Caramelo / Roble Miel con alto contraste y reflejo champán */
.hero-cta-btn {
  background: linear-gradient(135deg, #365742 0%, #193027 100%);
  border: 1px solid rgba(255, 242, 222, 0.48);
  box-shadow:
    0 10px 22px -4px rgba(181, 139, 54, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: all 0.26s var(--ease-luxury);
}

.hero-cta-btn:hover {
  background: linear-gradient(135deg, #42654C 0%, #294735 100%);
  transform: translateY(-1px);
  box-shadow:
    0 14px 26px -4px rgba(181, 139, 54, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}


/* Visor de fotografías: estructura y animaciones */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 11000;
  background: rgba(30, 19, 11, 0.84);
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-luxury);
}

.lightbox-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-glass-frame {
  background: linear-gradient(145deg, rgba(41, 69, 56, 0.90), rgba(19, 42, 34, 0.96));
  border: 1px solid rgba(211, 180, 106, 0.42);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 244, 224, 0.26);
  transform: scale(0.94);
  transition: transform 0.4s var(--ease-luxury);
}

.lightbox-backdrop.is-open .lightbox-glass-frame {
  transform: scale(1);
}

.lightbox-nav-btn {
  background: rgba(19, 42, 34, 0.74);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(211, 180, 106, 0.38);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 244, 224, 0.22);
  transition: all 0.25s ease;
}

.lightbox-nav-btn:hover {
  background: #B58B36;
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.06);
}


/* Contenedor del Mapa y Puntos de Interés (Superficie Marfil Sólida) */
.map-boutique-card {
  background: linear-gradient(180deg, #FFFEFA 0%, #F7F7F0 100%);
  border: 1px solid var(--border-honey-soft);
  box-shadow:
    0 12px 30px -10px rgba(41, 69, 56, 0.07),
    inset 0 1px 0 #FFFFFF;
}

.poi-item {
  background: #FFFEFA;
  border: 1px solid var(--border-honey-soft);
  box-shadow:
    0 4px 12px rgba(41, 69, 56, 0.04),
    inset 0 1px 0 #FFFFFF;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.poi-item .poi-time {
  background: linear-gradient(135deg, #F7F7F0 0%, #EDEEDF 100%);
  border: 1px solid rgba(181, 139, 54, 0.32);
}

.poi-item:hover,
.poi-item.active {
  background: #FFFFFF;
  border-color: #B58B36;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(41, 69, 56, 0.11);
}

.poi-item.active .poi-time {
  background: linear-gradient(135deg, #365742 0%, #193027 100%);
  border-color: #B58B36;
  color: #FFFFFF;
}

.btn-ubicacion-maps {
  background: linear-gradient(135deg, #294538 0%, #193027 100%);
  border: 1px solid rgba(211, 180, 106, 0.40);
  box-shadow:
    0 8px 18px -4px rgba(19, 42, 34, 0.20),
    inset 0 1px 0 rgba(255, 244, 224, 0.22);
  transition: all 0.28s var(--ease-luxury);
}

.btn-ubicacion-maps:hover {
  background: linear-gradient(135deg, #365742 0%, #203D30 100%);
  border-color: rgba(211, 180, 106, 0.60);
  box-shadow: 0 12px 24px -4px rgba(19, 42, 34, 0.28);
  transform: translateY(-1px);
}

/* ==========================================================================
   VISTA RESERVAR: FORMULARIO EN MARFIL SÓLIDO & RESUMEN HOTEL BOUTIQUE CÁLIDO
   ========================================================================== */
.booking-form-card {
  background: #FFFEFA;
  border: 1px solid rgba(181, 139, 54, 0.30);
  box-shadow:
    0 14px 34px -10px rgba(41, 69, 56, 0.07),
    inset 0 1px 0 #FFFFFF;
}

.roi-pill {
  background: #F7F7F0;
  border: 1px solid rgba(181, 139, 54, 0.32);
  transition: all 0.25s ease;
}

.roi-pill:hover {
  background: #FFFFFF;
  border-color: #B58B36;
  box-shadow: 0 6px 16px rgba(181, 139, 54, 0.11);
}

.departamento-radio-dot {
  width: 18px;
  height: 18px;
  border-radius: 9999px;
  border: 1.5px solid rgba(41, 69, 56, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.departamento-radio-dot::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: transparent;
  transition: background-color 0.25s ease;
}

.roi-pill.active {
  background: linear-gradient(135deg, #294538 0%, #193027 100%);
  color: #FAF9F4;
  border-color: #B58B36;
  box-shadow:
    0 10px 22px -4px rgba(41, 69, 56, 0.22),
    inset 0 1px 0 rgba(255, 244, 224, 0.24);
}

.roi-pill.active small {
  color: #E8D9AE;
}

.roi-pill.active .departamento-radio-dot {
  border-color: #D3B46A;
}

.roi-pill.active .departamento-radio-dot::after {
  background: #D3B46A;
}


/* Campos de Fecha Claros y Legibles */
.booking-field-light {
  background: #FFFFFF;
  border: 1px solid rgba(181, 139, 54, 0.36);
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.booking-field-light:hover {
  border-color: #B58B36;
}

.booking-field-light:focus {
  border-color: #B58B36;
  box-shadow: 0 0 0 3px rgba(181, 139, 54, 0.18);
}

.booking-field-light::-webkit-calendar-picker-indicator {
  opacity: 0.78;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.booking-field-light:hover::-webkit-calendar-picker-indicator {
  opacity: 1;
}

/* Tarjeta Derecha de Resumen (Café Moka / Nogal Tostado con Reflejo Dorado Champán) */
.booking-summary-card {
  background:
    radial-gradient(circle at 85% 12%, rgba(181, 139, 54, 0.22), transparent 48%),
    linear-gradient(160deg, #294538 0%, #132A22 100%);
  border: 1px solid rgba(211, 180, 106, 0.42);
  box-shadow:
    0 20px 44px -10px rgba(19, 42, 34, 0.24),
    inset 0 1px 0 rgba(255, 248, 234, 0.26);
}

.summary-total-box {
  background: linear-gradient(135deg, rgba(211, 180, 106, 0.14) 0%, rgba(181, 139, 54, 0.08) 100%);
  border: 1px solid rgba(211, 180, 106, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 248, 235, 0.20);
}

.booking-dark-input {
  background: rgba(255, 248, 236, 0.09);
  border: 1px solid rgba(211, 180, 106, 0.30);
  color: #FFFFFF;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.booking-dark-input::placeholder {
  color: rgba(211, 180, 106, 0.55);
}

.booking-dark-input:focus {
  background: rgba(255, 248, 236, 0.14);
  border-color: #D3B46A;
  box-shadow: 0 0 0 3px rgba(211, 180, 106, 0.20);
}

.btn-booking-whatsapp {
  background: linear-gradient(135deg, #365742 0%, #193027 100%);
  border: 1px solid rgba(255, 242, 222, 0.46);
  box-shadow:
    0 10px 22px -4px rgba(181, 139, 54, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: all 0.25s var(--ease-luxury);
}

.btn-booking-whatsapp:hover {
  background: linear-gradient(135deg, #42654C 0%, #294735 100%);
  transform: translateY(-1px);
  box-shadow:
    0 14px 26px -4px rgba(181, 139, 54, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

/* ==========================================================================
   SECCIONES NARRATIVAS DE INICIO (ESPACIADO REFINADO Y TARJETAS MARFIL SÓLIDAS)
   ========================================================================== */
.home-scroll-hint {
  opacity: 0.88;
  text-shadow: 0 1px 4px rgba(24, 14, 7, 0.55);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.home-scroll-hint:hover {
  opacity: 1;
  transform: translateY(2px);
}

/* Tarjetas de vista previa de Departamentos en Inicio sobre Marfil Sólido Luminoso */
.home-departamento-card {
  background: linear-gradient(180deg, #FFFEFA 0%, #F7F7F0 100%);
  border: 1px solid var(--border-honey-soft);
  box-shadow:
    0 14px 32px -12px rgba(41, 69, 56, 0.08),
    inset 0 1px 0 #FFFFFF;
  transition: transform 0.32s var(--ease-luxury), box-shadow 0.32s var(--ease-luxury), border-color 0.32s var(--ease-luxury);
}

.home-departamento-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-honey-hover);
  box-shadow:
    0 20px 40px -12px rgba(41, 69, 56, 0.13),
    inset 0 1px 0 #FFFFFF;
}


/* Botón outline cálido en Roble Miel / Café Moka para "Descubrir este departamento" */
.btn-home-outline {
  color: #203D30;
  background: linear-gradient(135deg, #FFFEFA 0%, #F4E7D2 100%);
  border: 1px solid rgba(181, 139, 54, 0.42);
  box-shadow: inset 0 1px 0 #FFFFFF;
  transition: all 0.26s var(--ease-luxury);
}

.btn-home-outline:hover {
  background: linear-gradient(135deg, #365742 0%, #193027 100%);
  color: #FFFFFF;
  border-color: #B58B36;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -4px rgba(181, 139, 54, 0.28);
}

/* Cierre de invitación a reservar en Café Moka con reflejo Champán */
.home-closing-cta {
  background:
    radial-gradient(circle at 50% 0%, rgba(181, 139, 54, 0.25), transparent 62%),
    linear-gradient(180deg, #213C30 0%, #132A22 100%);
  border-top: 1px solid rgba(211, 180, 106, 0.34);
}

/* Animaciones suaves de aparición al hacer scroll en Inicio */
.scroll-reveal-item {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease-luxury), transform 0.6s var(--ease-luxury);
}

.scroll-reveal-item.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Pulso sutil cuando el usuario llega a un departamento específica en Espacios desde Inicio */
@keyframes suiteTargetHighlight {
  0% {
    box-shadow: 0 0 0 0 rgba(181, 139, 54, 0.42);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(181, 139, 54, 0.22);
  }
  100% {
    box-shadow: 0 18px 42px -15px rgba(41, 69, 56, 0.08);
  }
}

.departamento-card-highlighted {
  animation: suiteTargetHighlight 1.4s ease-out;
}

/* Respeto estricto a prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .scroll-reveal-item {
    opacity: 1 !important;
    transform: none !important;
  }
}
