/* ── AIRE DE BABIA — HOJA DE ESTILOS PRINCIPAL (SHARED CSS) ── */

/* ── RESET & VARIABLES ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:       #243D1A;
  --green-mid:   #355929;
  --green-light: #4A7C3F;
  --gold:        #B8882A;
  --gold-light:  #D4A84B;
  --gold-text:   #9A6F1D; /* Optimización para accesibilidad WCAG AA */
  --stone:       #8A7A6A;
  --cream:       #F7F4EF;
  --white:       #FFFFFF;
  --text:        #1A1A1A;
  --text-muted:  #6A6A6A;
  --border:      #DDD8D0;
  --radius:      3px;
  --T:           0.3s ease;
  --shadow:      0 6px 30px rgba(0,0,0,0.09);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  color: var(--text);
  background: var(--cream);
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: 'Playfair Display', serif; line-height: 1.15; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 28px; }

.label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--gold-text); margin-bottom: 14px; display: block;
}
.title { font-size: clamp(1.9rem, 4vw, 2.9rem); color: var(--green); margin-bottom: 22px; }
.body-text { color: var(--text-muted); font-size: 1.05rem; line-height: 1.8; }

/* ── BOTONES ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 34px; border-radius: var(--radius);
  font-family: 'Lato', sans-serif; font-weight: 700;
  font-size: 0.82rem; letter-spacing: 0.07em; text-transform: uppercase;
  cursor: pointer; transition: var(--T); border: 2px solid transparent;
  touch-action: manipulation;
}
.btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
.btn-dark  { background: var(--green); color: var(--white); }
.btn-dark:hover { background: var(--green-mid); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,0.7); color: var(--white); }
.btn-ghost:hover { background: rgba(255,255,255,0.15); border-color: var(--white); }
.btn-gold  { background: var(--gold); color: var(--white); }
.btn-gold:hover { background: var(--gold-light); }
.btn-wa    { background: #25D366; color: var(--white); }
.btn-wa:hover { background: #1fbe5a; }

/* ── NAVEGACIÓN GLOBAL ───────────────────────────────────────── */
#nav {
  position: fixed; inset: 0 0 auto; z-index: 900;
  padding: 22px 0;
  transition: background var(--T), padding var(--T), box-shadow var(--T);
}
#nav.solid { background: var(--white); padding: 14px 0; box-shadow: 0 2px 24px rgba(0,0,0,0.07); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.nav-logo { display: inline-flex; align-items: center; text-decoration: none; transition: opacity var(--T); }
.nav-logo:hover { opacity: 0.9; }
.nav-logo-img { height: 48px; width: auto; max-height: 52px; object-fit: contain; border-radius: 4px; transition: height var(--T), transform var(--T); }
#nav.solid .nav-logo-img { height: 42px; }
.nav-links { display: flex; align-items: center; gap: 36px; list-style: none; }
.nav-links a { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: rgba(255,255,255,0.88); transition: color var(--T); }
#nav.solid .nav-links a { color: var(--text); }
.nav-links a:hover, #nav.solid .nav-links a:hover { color: var(--gold-text); }
.nav-cta { background: var(--gold); color: var(--white) !important; padding: 10px 26px; border-radius: var(--radius); }
.nav-cta:hover { background: var(--gold-light) !important; color: var(--white) !important; }
.nav-right { display: flex; align-items: center; gap: 14px; }

/* Menú Desplegable en Nav (ej. Experiencia) */
.nav-dropdown { position: relative; }

/* EL PUENTE. El menú se abre 12 px por debajo del enlace, y ese hueco no es
   de nadie: al bajar el ratón hacia una opción se pierde el :hover del
   enlace, el menú se cierra y no da tiempo a pulsar nada. Pasaba en
   servicios.html y en las páginas legales.

   Esta franja invisible cubre el hueco y mantiene vivo el :hover mientras
   se cruza. Estaba escrita a mano en index, rutas, actividades y
   alrededores, pero no aquí, así que las páginas que solo usan esta hoja se
   quedaban con el menú inalcanzable. Al ponerla aquí la heredan todas.

   El alto está medido, no elegido a ojo: con esta hoja el menú cae 23 px
   por debajo del enlace, así que 16 px se quedaban cortos y seguía sin
   poder pulsarse. 28 px lo cubren con margen. */
.nav-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -20px;
  right: -20px;
  height: 28px;
}
.nav-dropdown-menu {
  position: absolute; top: calc(100% + 12px); left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 0;
  min-width: 170px; box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  list-style: none; opacity: 0; pointer-events: none;
  transition: opacity var(--T), transform var(--T); z-index: 950;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1; pointer-events: all; transform: translateX(-50%) translateY(0);
}
.nav-dropdown-menu li a {
  display: block; padding: 8px 20px; font-size: 0.78rem; font-weight: 700;
  color: var(--text-muted) !important; transition: background var(--T), color var(--T);
  white-space: nowrap; text-transform: none; letter-spacing: 0.04em;
}
.nav-dropdown-menu li a:hover { background: var(--cream); color: var(--green) !important; }

/* ── DROPDOWN DE IDIOMA ──────────────────────────────────────── */
.lang-dropdown { position: relative; }
.lang-btn {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em;
  border: 1px solid rgba(255,255,255,0.45); border-radius: 20px;
  padding: 6px 10px 6px 14px; color: rgba(255,255,255,0.85);
  background: transparent; cursor: pointer; transition: var(--T);
  display: flex; align-items: center; gap: 5px;
}
#nav.solid .lang-btn { border-color: var(--border); color: var(--text); }
.lang-btn:hover { background: rgba(255,255,255,0.15); }
#nav.solid .lang-btn:hover { background: var(--cream); }
.lang-caret { font-size: 0.58rem; transition: transform var(--T); }
.lang-dropdown.open .lang-caret { transform: rotate(180deg); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  min-width: 68px; box-shadow: 0 8px 24px rgba(0,0,0,0.13);
  list-style: none; padding: 4px 0;
  opacity: 0; pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 300;
}
.lang-dropdown.open .lang-menu { opacity: 1; pointer-events: all; transform: translateY(0); }
.lang-menu li {
  padding: 9px 18px; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.06em; cursor: pointer; color: var(--text-muted);
  transition: background var(--T), color var(--T);
}
.lang-menu li:hover { background: var(--cream); color: var(--green); }
.lang-menu li.active { color: var(--gold-text); font-weight: 900; }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; }
.hamburger span { display: block; width: 25px; height: 2px; background: var(--white); border-radius: 2px; transition: var(--T); }
#nav.solid .hamburger span { background: var(--text); }

/* ── BOTÓN BACK TO TOP ───────────────────────────────────────── */
#backToTop {
  position: fixed; bottom: 28px; right: 28px; z-index: 800;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--green); color: var(--white); border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; cursor: pointer; shadow: var(--shadow);
  opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: opacity var(--T), transform var(--T), background var(--T);
}
#backToTop.visible { opacity: 1; pointer-events: all; transform: translateY(0); }
#backToTop:hover { background: var(--gold); }
#backToTop:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ── WHATSAPP POPUP WIDGET ───────────────────────────────────── */
.wa-wrap { position: fixed; bottom: 84px; right: 28px; z-index: 850; }
.wa-float {
  width: 52px; height: 52px; border-radius: 50%; background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
  box-shadow: 0 6px 24px rgba(37,211,102,0.4); cursor: pointer; border: none;
  transition: transform var(--T), box-shadow var(--T);
}
.wa-float:hover { transform: scale(1.08); box-shadow: 0 8px 30px rgba(37,211,102,0.55); }
.wa-popup {
  position: absolute; bottom: 64px; right: 0; width: 290px;
  background: var(--white); border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18); border: 1px solid var(--border);
  overflow: hidden; opacity: 0; pointer-events: none; transform: translateY(10px) scale(0.96);
  transition: opacity var(--T), transform var(--T);
}
.wa-popup.on { opacity: 1; pointer-events: all; transform: translateY(0) scale(1); }
.wa-header { background: #075E54; color: #fff; padding: 14px 18px; }
.wa-header h4 { font-size: 0.95rem; font-family: 'Lato', sans-serif; font-weight: 700; margin-bottom: 2px; }
.wa-header p  { font-size: 0.76rem; opacity: 0.85; margin: 0; }
.wa-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.wa-option {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 8px; background: var(--cream); border: 1px solid var(--border);
  transition: background var(--T), border-color var(--T); text-decoration: none; color: var(--text);
}
.wa-option:hover { background: #eef7ed; border-color: #25D366; }
.wa-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0;
}
.wa-name { font-weight: 700; font-size: 0.84rem; }
.wa-num  { font-size: 0.74rem; color: var(--text-muted); }

/* ── MODAL Y LIGHTBOX ────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 999;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity var(--T);
}
.modal-overlay.on { opacity: 1; pointer-events: all; }
.modal-content {
  background: var(--white); border-radius: var(--radius); width: 100%; max-width: 900px;
  max-height: 90vh; overflow: hidden; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.modal-close {
  position: absolute; top: 14px; right: 18px; font-size: 1.4rem; color: #fff;
  background: rgba(0,0,0,0.5); width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  z-index: 10; border: none; transition: background var(--T);
}
.modal-close:hover { background: rgba(0,0,0,0.8); }

.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity var(--T);
}
.lightbox.on { opacity: 1; pointer-events: all; }
.lightbox img { max-width: 90vw; max-height: 85vh; object-fit: contain; border-radius: 2px; }
.lb-close {
  position: absolute; top: 20px; right: 24px; color: #fff; font-size: 1.8rem;
  cursor: pointer; opacity: 0.8; transition: opacity var(--T); background: none; border: none;
}
.lb-close:hover { opacity: 1; }
.lb-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); color: #fff;
  font-size: 2rem; cursor: pointer; opacity: 0.7; padding: 16px;
  transition: opacity var(--T); background: none; border: none;
}
.lb-arrow:hover { opacity: 1; }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

/* ── COOKIE BANNER ───────────────────────────────────────────── */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 990;
  background: var(--green); color: var(--white);
  padding: 16px 28px; display: flex; align-items: center; justify-content: space-between;
  gap: 20px; box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
  transform: translateY(100%); transition: transform 0.4s ease;
}
.cookie-banner.show { transform: translateY(0); }
.cookie-text { font-size: 0.83rem; color: rgba(255,255,255,0.9); line-height: 1.5; }
.cookie-text a { color: var(--gold-light); text-decoration: underline; }
.cookie-btns { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-btn-ess {
  background: transparent; border: 1px solid rgba(255,255,255,0.4);
  color: #fff; padding: 8px 18px; border-radius: var(--radius); font-size: 0.78rem;
  font-weight: 700; cursor: pointer; transition: var(--T);
}
.cookie-btn-ess:hover { background: rgba(255,255,255,0.15); }
.cookie-btn-all {
  background: var(--gold); border: none; color: #fff; padding: 8px 22px;
  border-radius: var(--radius); font-size: 0.78rem; font-weight: 700;
  cursor: pointer; transition: var(--T);
}
.cookie-btn-all:hover { background: var(--gold-light); }

/* ── ANIMACIÓN SCROLL REVEAL ─────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── FOOTER GLOBAL ───────────────────────────────────────────── */
footer { background: #182A12; color: rgba(255,255,255,0.7); padding: 60px 0 30px; font-size: 0.88rem; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 50px; }
.footer-logo { font-family: 'Playfair Display', serif; font-size: 1.4rem; color: #fff; margin-bottom: 14px; }
.footer-col h5 { font-family: 'Lato', sans-serif; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold-light); margin-bottom: 18px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a { transition: color var(--T); }
.footer-col ul a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 28px; display: flex; align-items: center; justify-content: space-between; font-size: 0.78rem; }
.footer-credit { margin-top: 24px; text-align: center; display: flex; justify-content: center; align-items: center; gap: 26px; }
.footer-credit img { max-height: 50px; width: auto; opacity: 0.9; transition: opacity var(--T); }

/* El número del Registro de Turismo. Va en el pie de TODAS las páginas porque
   la Ley 14/2010 de Castilla y León (art. 20.2) lo exige en toda la
   publicidad, y una web lo es. Se pone en su propia línea y con el número en
   negrita: tiene que poder leerse, no esconderse. */
.footer-registro { display: block; margin-top: 6px; font-size: 0.82rem; opacity: 0.75; }
.footer-registro b { font-weight: 700; letter-spacing: 0.06em; }

/* El logo va MÁS ALTO que la placa AT, y no por darle importancia: el dibujo
   es apaisado (1,89:1), así que con los 50 px de la placa se queda en 95 px
   de ancho y no se distingue ni el pájaro ni el texto. A 84 px ya se lee.
   La placa aguanta pequeña porque son dos letras grandes. */
.footer-credit .footer-logo { max-height: 84px; }
.footer-credit img:hover { opacity: 1; }

/* ── RESPONSIVE MOBILE BASE ─────────────────────────────────── */
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  .hamburger { display: flex; }

  /* Animación hamburger → X */
  .hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Overlay de menú a pantalla completa con scroll */
  .nav-links {
    display: flex !important;
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: #1a3a1a;
    flex-direction: column; justify-content: flex-start; align-items: center;
    gap: 24px; list-style: none;
    opacity: 0; pointer-events: none; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 950;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 90px 20px 50px !important;
  }
  .nav-links.open { opacity: 1 !important; pointer-events: all !important; visibility: visible !important; }
  .nav-links > li { text-align: center; width: 100%; max-width: 320px; }
  .nav-links a {
    font-size: 1.15rem !important; color: #ffffff !important;
    letter-spacing: 0.06em; padding: 10px 0 !important; display: block !important;
  }
  .nav-links a:hover { color: #c8a96e !important; }
  .nav-caret { color: #c8a96e !important; }

  /* Menú "Reservar" dentro del overlay */
  .nav-cta {
    background: #b8873a !important; color: #fff !important;
    padding: 12px 36px !important; border-radius: 6px !important;
    font-size: 0.9rem !important; display: inline-block !important; margin-top: 6px;
  }

  /* Submenú desplegable en móvil */
  .nav-dropdown-menu {
    position: static !important; opacity: 1 !important; pointer-events: all !important;
    transform: none !important; display: none;
    background: rgba(0,0,0,0.3) !important; border: none !important;
    box-shadow: none !important; border-radius: 8px !important;
    padding: 8px 0 !important; margin-top: 8px;
    min-width: 200px; visibility: visible !important;
  }
  .nav-dropdown-menu::before { display: none !important; }
  .nav-dropdown.open .nav-dropdown-menu { display: block !important; }
  .nav-dropdown-menu li a {
    color: rgba(255,255,255,0.92) !important; font-size: 0.95rem !important;
    padding: 10px 20px !important; text-align: center;
    justify-content: center;
  }
  .nav-dropdown-menu li a:hover { background: rgba(255,255,255,0.12) !important; color: #c8a96e !important; }
  .nav-dropdown-menu li a i { color: #c8a96e !important; }

  /* Caret del dropdown en móvil */
  .nav-caret { display: inline-block; margin-left: 4px; transition: transform 0.3s ease; }
  .nav-dropdown.open .nav-caret { transform: rotate(180deg); }

  /* Selector de idioma en el overlay */
  .nav-right { z-index: 950; position: relative; }

  .cookie-banner { flex-direction: column; text-align: center; }
  .cookie-btns { width: 100%; justify-content: center; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}


/* ══════════════════════════════════════════════════════════════════════
   ACCESIBILIDAD — elementos que antes eran <div>/<span> con onclick
   ──────────────────────────────────────────────────────────────────────
   Ahora son <button>, así que se pueden usar con teclado (Tab + Enter).
   Estas reglas quitan la apariencia por defecto del botón para que se
   sigan viendo exactamente igual que antes.
   ══════════════════════════════════════════════════════════════════════ */
.hamburger,
.faq-q,
.g-item,
.map-modal-close {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.faq-q {
  width: 100%;
  text-align: left;
}

.g-item {
  padding: 0;
  display: block;
  width: 100%;
}

.map-modal-close {
  padding: 0;
}

/* Anillo de foco visible solo para quien navega con teclado */
.hamburger:focus-visible,
.faq-q:focus-visible,
.g-item:focus-visible,
.map-modal-close:focus-visible,
.lb-close:focus-visible,
.lb-arrow:focus-visible,
.album-tab:focus-visible,
.cal-tab:focus-visible {
  outline: 2px solid #B8882A;
  outline-offset: 3px;
}
