/* ========================================
   CABAÑAS BUENA VISTA — Glifo Sites
   Paleta: crema · marrón · verde sierra · terracota · dorado
   ======================================== */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── Core palette ── */
  --bg:          #FAFAF8;
  --bg-alt:      #F0EDE8;
  --bg-dark:     #2D2A26;
  --text:        #2D2A26;
  --text-muted:  #6B6560;
  --green:       #4A7C59;
  --green-light: #5A9C6D;
  --green-dark:  #3A6347;
  --terra:       #C67B5C;
  --gold:        #C9A96E;
  --gold-light:  #E8D5A3;
  --white:       #FFFFFF;
  --border:      #E5E0DB;
  --shadow:      0 2px 20px rgba(45,42,38,.08);
  --shadow-md:   0 8px 40px rgba(45,42,38,.12);

  /* ── Brand token aliases (per brand-tokens.md) ── */
  --color-bg:           var(--bg);
  --color-bg-alt:       var(--bg-alt);
  --color-bg-dark:      var(--bg-dark);
  --color-text:         var(--text);
  --color-text-light:   var(--text-muted);
  --color-primary:      var(--green);
  --color-primary-light: var(--green-light);
  --color-secondary:    var(--terra);
  --color-accent:       var(--gold);

  /* ── Typography ── */
  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  /* ── Spacing scale (8/16/24/48/80/120) ── */
  --space-xs:      8px;
  --space-sm:      16px;
  --space-md:      24px;
  --space-lg:      48px;
  --space-xl:      80px;
  --space-section: 120px;

  /* ── Border radius ── */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius:      12px;
  --radius-lg:   16px;
  --radius-xl:   20px;
  --radius-full: 9999px;

  /* ── Motion ── */
  --trans:      0.3s ease;
  --trans-slow: 0.6s ease;

  --section-gap: var(--space-section);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---------- Skip link (a11y) ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: var(--green);
  color: var(--white);
  padding: .625rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .9rem;
  transition: top .2s ease;
}
.skip-link:focus { top: 1rem; }

/* ---------- Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .fade-in { opacity: 1; transform: none; }
  .fade-in.visible { opacity: 1; transform: none; }
}

/* ---------- Typography ---------- */
h1,h2,h3,h4 {
  font-family: var(--font-head);
  line-height: 1.2;
  text-wrap: balance;
}
h1 { font-size: clamp(2.8rem, 7vw, 5rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
p  { color: var(--text-muted); }

.lead {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text);
}

/* Label / eyebrow: green per brand spec, not terra */
.label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: .75rem;
}

/* ---------- Layout ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--section-gap) 0;
}

/* scroll-margin-top: compensate for fixed navbar on anchor jumps */
section[id] {
  scroll-margin-top: 80px;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3.5rem;
}
.section-header p { margin-top: .75rem; font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--trans), border-color var(--trans),
              color var(--trans), transform var(--trans), box-shadow var(--trans);
}

.btn:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--green);
  color: var(--white);
  border: 2px solid var(--green);
}
.btn-primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(74,124,89,.3);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,.6);
}
.btn-outline:hover {
  background: rgba(255,255,255,.15);
  border-color: var(--white);
}
.btn-outline:focus-visible {
  outline-color: var(--white);
}

.btn-outline-dark {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border);
}
.btn-outline-dark:hover {
  border-color: var(--green);
  color: var(--green);
}

.btn-full { width: 100%; justify-content: center; }

/* ---------- Animations ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays need to override only opacity/transform, not hover transitions */
/* Applied directly to individual selectors below */

/* ---------- NAVBAR ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: background-color .4s ease, padding .4s ease, box-shadow .4s ease;
}

.navbar.scrolled {
  background: rgba(250,250,248,.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: .75rem 0;
  box-shadow: var(--shadow);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: .625rem;
}

.logo-img {
  height: 40px;
  width: auto;
  filter: brightness(0) invert(1);
  transition: filter var(--trans);
  /* Explicit width/height for CLS prevention */
  aspect-ratio: auto;
}

.navbar.scrolled .logo-img { filter: none; }

.logo-text {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--white);
  transition: color var(--trans);
}
.navbar.scrolled .logo-text { color: var(--text); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-size: .9rem;
  font-weight: 500;
  color: rgba(255,255,255,.9);
  transition: color var(--trans);
  position: relative;
  padding-bottom: 2px;
}

.nav-links a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 2px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform var(--trans);
}

.nav-links a:hover::after { transform: scaleX(1); }

.navbar.scrolled .nav-links a { color: var(--text); }

.nav-cta {
  background: var(--green) !important;
  color: var(--white) !important;
  padding: .5rem 1.25rem;
  border-radius: var(--radius-full);
  touch-action: manipulation;
}
.nav-cta:hover { background: var(--green-dark) !important; }
.nav-cta::after { display: none !important; }
.nav-cta:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: .5rem;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--trans);
  border-radius: var(--radius-sm);
}
.nav-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.navbar.scrolled .nav-toggle { color: var(--text); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(30,28,25,.3) 0%,
    rgba(30,28,25,.5) 50%,
    rgba(30,28,25,.7) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--white);
  max-width: 800px;
  padding: 0 1.5rem;
}

.hero-eyebrow {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1.25rem;
}

.hero-title {
  color: var(--white);
  text-shadow: 0 2px 20px rgba(0,0,0,.3);
  margin-bottom: .875rem;
  line-height: 1.05;
}

.hero-sub {
  font-family: var(--font-head);
  font-style: italic;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: rgba(255,255,255,.85);
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  color: rgba(255,255,255,.7);
  font-size: 1.5rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounce 2s infinite;
  transition: color var(--trans);
  border-radius: var(--radius-full);
  touch-action: manipulation;
}
.hero-scroll:hover { color: var(--white); }
.hero-scroll:focus-visible {
  outline: 2px solid rgba(255,255,255,.7);
  outline-offset: 4px;
  color: var(--white);
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* Hero fade in */
.hero .fade-in {
  animation: heroIn 1.2s ease .4s both;
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- NOSOTROS ---------- */
.nosotros { background: var(--bg-alt); }

.nosotros-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.nosotros-text h2 { margin-bottom: 1.25rem; }
.nosotros-text .lead { margin-bottom: 1rem; }
.nosotros-text p { margin-bottom: 1.5rem; }

.nosotros-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.stat-label {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: .2rem;
}

.img-stack {
  position: relative;
  /* Extra padding at bottom so the absolutely-positioned accent doesn't clip */
  padding-bottom: 2.5rem;
}

.img-main {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-xl);
}

.img-accent {
  position: absolute;
  bottom: 0;
  left: -2rem;
  width: 55%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 4px solid var(--bg-alt);
  box-shadow: var(--shadow-md);
}

/* ---------- SERVICIOS ---------- */
.servicios { background: var(--white); }

.servicios-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.servicio-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  border: 1px solid var(--border);
  transition: transform var(--trans), box-shadow var(--trans), border-color var(--trans);
}

.servicio-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--green);
}

.servicio-icon {
  width: 56px;
  height: 56px;
  background: var(--gold-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  color: var(--terra);
}

.servicio-card h3 { margin-bottom: .5rem; font-size: 1rem; }
.servicio-card p  { font-size: .875rem; }

/* ---------- CABAÑAS ---------- */
.cabanas { background: var(--bg-alt); }

.cabanas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.cabana-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
  transition: transform var(--trans), box-shadow var(--trans);
}

.cabana-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
}

.cabana-img-wrap {
  overflow: hidden;
  aspect-ratio: 4/3;
}

.cabana-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}

.cabana-card:hover .cabana-img-wrap img { transform: scale(1.05); }

.cabana-info {
  padding: 1.5rem;
}

.cabana-info h3 { margin-bottom: .5rem; }
.cabana-info p  { font-size: .9rem; }

/* ---------- GALERÍA ---------- */
.galeria { background: var(--white); }

.galeria-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: var(--space-xs);
  padding: 0 var(--space-md);
  max-width: 1200px;
  margin: 0 auto;
}

.galeria-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
  /* keyboard accessibility */
  outline-offset: 3px;
}

.galeria-item:focus-visible {
  outline: 3px solid var(--green);
}

/* Feature some items as bigger */
.galeria-item:nth-child(1) {
  grid-column: span 2;
  grid-row: span 2;
}
.galeria-item:nth-child(6) {
  grid-column: span 2;
}

.galeria-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.galeria-item:hover img,
.galeria-item:focus-visible img { transform: scale(1.08); }

.galeria-overlay {
  position: absolute;
  inset: 0;
  background: rgba(30,28,25,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--trans);
  font-size: 2rem;
  color: var(--white);
  pointer-events: none;
}

.galeria-item:hover .galeria-overlay,
.galeria-item:focus-visible .galeria-overlay { opacity: 1; }

/* ---------- LIGHTBOX ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(10,10,10,.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  overscroll-behavior: contain;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  text-align: center;
  /* prevent touches on content from triggering backdrop close */
  touch-action: pan-y;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox-caption {
  color: rgba(255,255,255,.7);
  margin-top: .75rem;
  font-size: .875rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  background: rgba(255,255,255,.1);
  border: none;
  color: var(--white);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--trans);
  font-size: 1.25rem;
  width: 48px;
  height: 48px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev  { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 1rem; top: 50%; transform: translateY(-50%); }

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,.25); }

.lightbox-close:focus-visible,
.lightbox-prev:focus-visible,
.lightbox-next:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

/* Mobile: move prev/next away from edges, above WA float */
@media (max-width: 768px) {
  .lightbox-prev { left: .5rem; }
  .lightbox-next { right: .5rem; }
  .lightbox-close { top: .75rem; right: .75rem; }
}

/* ---------- TESTIMONIOS ---------- */
.testimonios { background: var(--bg-dark); }

.testimonios .section-header .label { color: var(--gold); }
.testimonios .section-header h2     { color: var(--white); }
.testimonios .section-header p      { color: rgba(255,255,255,.6); }

.testimonios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.testimonio-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-xl);
  padding: var(--space-lg) var(--space-md);
  transition: background-color var(--trans), transform var(--trans);
}

.testimonio-card:hover {
  background: rgba(255,255,255,.1);
  transform: translateY(-4px);
}

.testimonio-stars {
  color: var(--gold);
  font-size: 1rem;
  margin-bottom: var(--space-md);
  display: flex;
  gap: .2rem;
}
.testimonio-stars i { aria-hidden: true; }

.testimonio-card blockquote {
  font-family: var(--font-head);
  font-style: italic;
  font-size: 1.1rem;
  color: rgba(255,255,255,.9);
  line-height: 1.6;
  margin-bottom: var(--space-md);
  /* No CSS quotes — HTML already wraps content in curly quotes */
  quotes: none;
}

.testimonio-card cite {
  font-style: normal;
  font-size: .875rem;
  color: var(--gold);
  font-weight: 600;
}

/* ---------- UBICACIÓN ---------- */
.ubicacion { background: var(--bg-alt); }

.ubicacion-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-lg);
  align-items: start;
}

.mapa-wrap {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.distancias h3 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.dist-list { display: flex; flex-direction: column; gap: .875rem; margin-bottom: 1.5rem; }

.dist-list li {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--text-muted);
}

.dist-list li i {
  color: var(--terra);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.dist-list li strong { color: var(--text); }

.coordenadas {
  display: flex;
  align-items: center;
  gap: .625rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .875rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: .875rem;
  color: var(--text-muted);
  font-family: monospace;
}

.coordenadas i { color: var(--green); font-size: 1.1rem; }

/* ---------- CONTACTO ---------- */
.contacto { background: var(--white); }

.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.contacto-info h2 { margin-top: .5rem; margin-bottom: 1rem; }
.contacto-info > p { margin-bottom: 2rem; font-size: 1rem; }

.contacto-datos {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dato-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: border-color var(--trans), background-color var(--trans);
}

.dato-item:hover {
  border-color: var(--green);
  background: rgba(74,124,89,.04);
}

.dato-item:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

.dato-icon {
  width: 40px;
  height: 40px;
  background: var(--gold-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--terra);
  flex-shrink: 0;
}

.dato-label {
  display: block;
  font-size: .75rem;
  color: var(--text-muted);
  margin-bottom: .15rem;
}

.dato-val {
  display: block;
  font-weight: 600;
  color: var(--text);
  font-size: .95rem;
}

/* Form */
.contacto-form {
  background: var(--bg);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  border: 1px solid var(--border);
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: .5rem;
  color: var(--text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: .875rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--text);
  /* Replace outline:none with a visible focus indicator */
  outline: none;
  transition: border-color var(--trans), box-shadow var(--trans);
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(74,124,89,.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: #B8B4AE; }

/* Inline error states */
.form-group input[aria-invalid="true"],
.form-group textarea[aria-invalid="true"] {
  border-color: var(--terra);
  box-shadow: 0 0 0 3px rgba(198,123,92,.12);
}

.field-error {
  display: block;
  font-size: .8rem;
  color: var(--terra);
  margin-top: .375rem;
}

.form-note {
  margin-top: var(--space-sm);
  font-size: .8rem;
  text-align: center;
}

.form-note a {
  color: var(--green);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.form-note a:hover { color: var(--green-dark); }

/* ---------- FOOTER ---------- */
.footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,.7);
  padding: var(--space-xl) 0 var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-logo {
  height: 48px;
  width: auto;
  margin-bottom: 1rem;
  filter: brightness(0) invert(1);
  opacity: .8;
}

.footer-brand p { font-size: .9rem; line-height: 1.7; }

.footer h4 {
  font-family: var(--font-head);
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

.footer-links ul { display: flex; flex-direction: column; gap: .625rem; }

.footer-links a {
  font-size: .875rem;
  transition: color var(--trans);
}
.footer-links a:hover { color: var(--gold); }

.footer-contacto p { font-size: .875rem; line-height: 1.8; margin-bottom: .75rem; }
.footer-contacto a { transition: color var(--trans); }
.footer-contacto a:hover { color: var(--gold); }

.footer-social {
  display: flex;
  gap: .875rem;
  margin-top: 1rem;
}

.footer-social a {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: background-color var(--trans);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.footer-social a:hover { background: var(--green); color: var(--white); }
.footer-social a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .8rem;
  color: rgba(255,255,255,.4);
}

.footer-credit a { color: var(--gold); transition: color var(--trans); }
.footer-credit a:hover { color: var(--gold-light); }

/* ---------- WhatsApp Float ---------- */
.wa-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 900;
  width: 58px;
  height: 58px;
  background: #25D366;
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  box-shadow: 0 4px 20px rgba(37,211,102,.4);
  transition: transform var(--trans), box-shadow var(--trans);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.wa-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37,211,102,.55);
}

.wa-float:focus-visible {
  outline: 3px solid #25D366;
  outline-offset: 4px;
}

/* ---------- Stagger delays (fade-in only, not hover) ---------- */
/* Use animation-delay via a CSS-only animation stagger trick:
   The fade-in transition is already on opacity/transform.
   We override the delay only for the initial reveal (before .visible is added).
   Once .visible is applied, transition-delay resets to 0 for smooth hover. */

.servicios-grid .servicio-card:nth-child(1).fade-in  { transition-delay: .05s; }
.servicios-grid .servicio-card:nth-child(2).fade-in  { transition-delay: .10s; }
.servicios-grid .servicio-card:nth-child(3).fade-in  { transition-delay: .15s; }
.servicios-grid .servicio-card:nth-child(4).fade-in  { transition-delay: .20s; }
.servicios-grid .servicio-card:nth-child(5).fade-in  { transition-delay: .25s; }
.servicios-grid .servicio-card:nth-child(6).fade-in  { transition-delay: .30s; }
.servicios-grid .servicio-card:nth-child(7).fade-in  { transition-delay: .35s; }
.servicios-grid .servicio-card:nth-child(8).fade-in  { transition-delay: .40s; }

/* Once visible, clear delay so hover is instant */
.servicios-grid .servicio-card.visible { transition-delay: 0s; }

.testimonios-grid .testimonio-card:nth-child(2).fade-in { transition-delay: .15s; }
.testimonios-grid .testimonio-card:nth-child(3).fade-in { transition-delay: .30s; }
.testimonios-grid .testimonio-card.visible { transition-delay: 0s; }

/* ==========================================
   RESPONSIVE
   ========================================== */

/* Tablet (< 1024px) */
@media (max-width: 1024px) {
  :root { --section-gap: 80px; }

  .nosotros-grid    { gap: 3rem; }
  .servicios-grid   { grid-template-columns: repeat(3, 1fr); }
  .cabanas-grid     { grid-template-columns: repeat(2, 1fr); }
  .galeria-grid     { grid-template-columns: repeat(3, 1fr); }
  .testimonios-grid { gap: var(--space-md); }
  .ubicacion-grid   { grid-template-columns: 1fr; }
  .contacto-grid    { gap: var(--space-lg); }
  .footer-grid      { grid-template-columns: 1fr 1fr; }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
  :root { --section-gap: 64px; }

  /* Nav */
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    bottom: 0;
    width: 280px;
    background: var(--bg-dark);
    flex-direction: column;
    padding: 5rem var(--space-lg) var(--space-lg);
    gap: var(--space-md);
    transition: right .35s ease;
    z-index: 999;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .nav-links.open { right: 0; }

  .nav-links a {
    font-size: 1.1rem;
    color: rgba(255,255,255,.85) !important;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .nav-cta {
    width: 100%;
    text-align: center;
    justify-content: center;
    min-height: 48px;
  }

  /* Hero */
  .hero-actions { flex-direction: column; align-items: center; }
  .btn { width: min(300px, 100%); justify-content: center; }

  /* Nosotros */
  .nosotros-grid   { grid-template-columns: 1fr; gap: var(--space-lg); }
  .nosotros-images { order: -1; padding-bottom: 0; }
  .img-accent      { display: none; }
  .nosotros-stats  { flex-direction: column; gap: var(--space-sm); }

  /* Servicios */
  .servicios-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); }

  /* Cabañas */
  .cabanas-grid { grid-template-columns: 1fr; }

  /* Galería */
  .galeria-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 160px;
    padding: 0 var(--space-sm);
  }
  .galeria-item:nth-child(1) { grid-column: span 2; }
  .galeria-item:nth-child(6) { grid-column: span 1; }

  /* Testimonios */
  .testimonios-grid { grid-template-columns: 1fr; }

  /* Ubicación */
  .ubicacion-grid { grid-template-columns: 1fr; }

  /* Contacto */
  .contacto-grid { grid-template-columns: 1fr; gap: var(--space-lg); }
  .contacto-form { padding: var(--space-md); }

  /* Footer */
  .footer-grid   { grid-template-columns: 1fr; gap: var(--space-lg); }
  .footer-bottom { flex-direction: column; gap: .5rem; text-align: center; }

  /* WA float — ensure doesn't overlap form submit area */
  .wa-float {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 52px;
    height: 52px;
    font-size: 1.5rem;
  }
}

/* Small mobile (< 480px) */
@media (max-width: 480px) {
  :root { --section-gap: 56px; }

  .container { padding: 0 var(--space-sm); }
  .servicios-grid { grid-template-columns: 1fr 1fr; gap: var(--space-sm); }
  .galeria-grid   {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 130px;
    padding: 0 var(--space-sm);
  }
  .testimonio-card { padding: var(--space-md) var(--space-sm); }
}
