/* Costa Rica Directory design tokens (see WEB_STANDARDS_MASTER.md section 23) */
:root {
  --c-dark: #15332b;
  --c-dark-deep: #0d231d;
  --c-accent: #c9a14f;
  --c-accent-deep: #a07c33;
  --c-link: #1d6a54;
  --c-surface: #f2efe7;
  --c-paper: #fffdf8;
  --c-ink: #232a2d;
  --c-ink-soft: rgba(35, 42, 45, 0.72);
  --c-on-accent: #15332b;
  --font-head: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, sans-serif;
  --head-weight: 500;
  --radius: 6px;
  --shadow: 0 2px 14px rgba(13, 35, 29, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--c-ink);
  background: var(--c-paper);
  line-height: 1.6;
  padding-top: 70px;
}

h1, h2, h3 { font-family: var(--font-head); font-weight: var(--head-weight); line-height: 1.2; color: var(--c-dark); }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }

a { color: var(--c-link); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--c-accent-deep); outline-offset: 3px; border-radius: 2px; }

.skip-link { position: absolute; top: -100px; left: 1rem; background: var(--c-dark); color: #fff; padding: 0.6rem 1rem; z-index: 200; border-radius: var(--radius); }
.skip-link:focus { top: 0.5rem; }

/* Nav */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 70px; padding: 0 5%;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(13, 35, 29, 0.97);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}
.nav-logo { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: #fff; }
.nav-logo-mark {
  display: grid; place-items: center; width: 36px; height: 36px;
  background: var(--c-accent); color: var(--c-on-accent);
  font-family: var(--font-head); font-weight: 600; border-radius: 4px; font-size: 0.95rem;
}
.nav-logo-text { font-size: 0.95rem; letter-spacing: 0.04em; font-weight: 400; }
.nav-logo-text strong { font-weight: 600; }
.nav-links { display: flex; gap: 1.8rem; list-style: none; align-items: center; }
.nav-links a {
  color: rgba(255, 255, 255, 0.85); text-decoration: none;
  font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; transition: color 0.2s;
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--c-accent); }
.nav-cta {
  background: var(--c-accent); color: var(--c-on-accent) !important;
  padding: 0.55rem 1.2rem; border-radius: 2px; font-weight: 500;
}
.nav-cta:hover { background: #dbb568; color: var(--c-on-accent) !important; }
.nav-hamburger { display: none; background: none; border: none; color: #fff; cursor: pointer; padding: 0.4rem; }

@media (max-width: 860px) {
  .nav-hamburger { display: block; }
  .nav-links {
    display: none; position: absolute; top: 70px; left: 0; right: 0;
    background: var(--c-dark-deep); flex-direction: column; gap: 0;
    padding: 0.5rem 0 1rem; box-shadow: 0 12px 20px rgba(0, 0, 0, 0.25);
  }
  .nav-links.is-open { display: flex; }
  .nav-links li { width: 100%; text-align: center; }
  .nav-links a { display: block; padding: 0.85rem 1rem; }
  .nav-cta { margin: 0.5rem 1.5rem 0; }
}

/* Hero */
.hero {
  background: linear-gradient(160deg, var(--c-dark) 0%, var(--c-dark-deep) 100%);
  color: #fff; text-align: center; padding: 5.5rem 5% 4.5rem;
}
.hero h1 { color: #fff; max-width: 22ch; margin: 0 auto; }
.hero-sub { max-width: 58ch; margin: 1.2rem auto 2rem; color: rgba(255, 255, 255, 0.82); font-size: 1.05rem; }
.hero-trust { margin-top: 1.4rem; font-size: 0.85rem; color: rgba(255, 255, 255, 0.6); }
.hero-trust a { color: var(--c-accent); }
.hero-sm { padding: 3.5rem 5% 3rem; text-align: left; }
.hero-sm h1, .hero-sm .hero-sub { margin-left: 0; }

/* Buttons */
.btn {
  display: inline-block; text-decoration: none; border-radius: 2px;
  font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.6rem 1.3rem; transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-lg { padding: 0.85rem 1.8rem; font-size: 0.9rem; }
.btn-solid { background: var(--c-accent); color: var(--c-on-accent); font-weight: 500; }
.btn-solid:hover { background: #dbb568; }
.btn-ghost { border: 1px solid var(--c-dark); color: var(--c-dark); }
.btn-ghost:hover { background: var(--c-dark); color: #fff; }

/* Sections */
.section { padding: 3.5rem 5%; max-width: 1200px; margin: 0 auto; }
.section h2 { margin-bottom: 0.6rem; }
.section-sub { color: var(--c-ink-soft); margin-bottom: 2rem; max-width: 70ch; }
.section-alt { max-width: none; background: var(--c-surface); }
.section-alt > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
.section-alt h2, .section-alt .section-sub { text-align: center; }

/* Tiles */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.2rem; margin-top: 1.8rem; }
.tile {
  display: block; text-decoration: none; color: var(--c-ink);
  background: var(--c-paper); border: 1px solid rgba(21, 51, 43, 0.14);
  border-top: 4px solid var(--c-accent); border-radius: var(--radius);
  padding: 1.5rem 1.4rem; box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.tile img { width: 100%; height: auto; border-radius: 4px; margin-bottom: 1rem; display: block; }
.area-poster { max-width: 1200px; margin: 0.5rem auto 0; padding: 0 5%; }
.area-poster img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); display: block; }
.tile:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(13, 35, 29, 0.14); }
.tile h3 { font-size: 1.4rem; margin-bottom: 0.4rem; }
.tile p { font-size: 0.9rem; color: var(--c-ink-soft); margin-bottom: 1rem; }
.tile-count { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-accent-deep); font-weight: 600; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.4rem; }
.card {
  background: var(--c-paper); border: 1px solid rgba(21, 51, 43, 0.14);
  border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 0.55rem;
}
.card-top { display: flex; justify-content: space-between; align-items: center; }
.card h3 a { color: var(--c-dark); text-decoration: none; }
.card h3 a:hover { color: var(--c-link); text-decoration: underline; }
.card-town { font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-ink-soft); }
.card-desc {
  font-size: 0.92rem; color: var(--c-ink-soft); flex-grow: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-price { color: var(--c-accent-deep); font-weight: 600; letter-spacing: 0.1em; }
.card-actions { display: flex; gap: 0.7rem; margin-top: 0.4rem; flex-wrap: wrap; }
.card-actions .btn { font-size: 0.72rem; padding: 0.5rem 0.95rem; }
.btn-wa { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #1faa53; color: #fff; }
.btn-wa:hover { background: #178a43; }

/* Chips and tags */
.chip {
  display: inline-block; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.25rem 0.65rem; border-radius: 100px; font-weight: 600;
}
.chip-stay { background: rgba(29, 106, 84, 0.12); color: #175343; }
.chip-eat { background: rgba(201, 161, 79, 0.18); color: #7c5e22; }
.chip-do { background: rgba(36, 99, 142, 0.12); color: #1d5174; }
.chip-services { background: rgba(21, 51, 43, 0.1); color: var(--c-dark); }
.tag-row { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin-top: 1.5rem; }
.tag { background: var(--c-surface); border: 1px solid rgba(21, 51, 43, 0.12); font-size: 0.78rem; padding: 0.25rem 0.7rem; border-radius: 100px; }

/* Filter bar */
.filter-bar { margin-bottom: 1.8rem; display: grid; gap: 0.6rem; }
.filter-row { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.filter-chip {
  background: var(--c-paper); border: 1px solid rgba(21, 51, 43, 0.2); color: var(--c-ink);
  font-family: var(--font-body); font-size: 0.8rem; padding: 0.35rem 0.85rem;
  border-radius: 100px; cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.filter-chip:hover { border-color: var(--c-accent-deep); }
.filter-chip.is-active { background: var(--c-dark); color: #fff; border-color: var(--c-dark); }
.filter-divider { width: 1px; height: 1.2rem; background: rgba(21, 51, 43, 0.2); margin: 0 0.3rem; }
.filter-count { font-size: 0.82rem; color: var(--c-ink-soft); margin: 0; }

/* Breadcrumbs */
.breadcrumbs { padding: 1rem 5%; max-width: 1200px; margin: 0 auto; font-size: 0.82rem; color: var(--c-ink-soft); }
.breadcrumbs a { color: var(--c-link); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs span[aria-hidden] { margin: 0 0.35rem; }

/* Listing detail */
.listing-detail { max-width: 760px; margin: 0 auto; padding: 1.5rem 5% 3rem; }
.listing-header h1 { margin: 0.6rem 0 0.3rem; }
.listing-meta { color: var(--c-ink-soft); font-size: 0.92rem; }
.listing-verified { display: inline-block; margin-top: 0.6rem; font-size: 0.8rem; font-weight: 600; color: #175343; background: rgba(29, 106, 84, 0.1); padding: 0.25rem 0.7rem; border-radius: 100px; }
.listing-pick { color: #7c5e22; background: rgba(201, 161, 79, 0.18); margin-left: 0.4rem; }
.pick-badge { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; color: var(--c-on-accent); background: var(--c-accent); padding: 0.25rem 0.6rem; border-radius: 100px; }
.listing-desc { font-size: 1.08rem; margin: 1.5rem 0; }
.listing-notable {
  border-left: 4px solid var(--c-accent); background: var(--c-surface);
  padding: 1.1rem 1.3rem; border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: 1.5rem;
}
.listing-notable h2 { font-size: 1rem; margin-bottom: 0.3rem; }
.listing-contact { background: var(--c-paper); border: 1px solid rgba(21, 51, 43, 0.14); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); }
.listing-contact h2 { font-size: 1.1rem; margin-bottom: 0.8rem; }
.listing-contact ul { list-style: none; display: grid; gap: 0.55rem; }
.listing-contact li { font-size: 0.95rem; overflow-wrap: anywhere; }

/* Prose pages (about, faq) */
.prose-page { max-width: 760px; margin: 0 auto; padding: 1.5rem 5% 2rem; }
.prose-page h2 { margin: 2.2rem 0 0.8rem; }
.prose-page p { margin-bottom: 1rem; }
.faq-jump { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.5rem 0 1.5rem; }
.faq-jump a { background: var(--c-surface); border: 1px solid rgba(21, 51, 43, 0.14); padding: 0.35rem 0.9rem; border-radius: 100px; font-size: 0.85rem; text-decoration: none; color: var(--c-dark); }
.faq-jump a:hover { border-color: var(--c-accent-deep); }
.faq-group h2 { margin-top: 2.5rem; }
.faq-item { background: var(--c-paper); border: 1px solid rgba(21, 51, 43, 0.14); border-radius: var(--radius); margin-bottom: 0.7rem; }
.faq-item summary { padding: 0.9rem 1.2rem; cursor: pointer; }
.faq-item summary h3 { display: inline; font-size: 1rem; font-family: var(--font-body); font-weight: 600; color: var(--c-ink); }
.faq-item[open] summary h3 { color: var(--c-dark); }
.faq-item p { padding: 0 1.2rem 1rem; margin: 0; color: var(--c-ink-soft); }

/* CTA band */
.cta-band { text-align: center; }
.cta-band p { color: var(--c-ink-soft); max-width: 60ch; margin: 0.6rem auto 0; }

/* Search (Pagefind overrides) */
#search { max-width: 760px; margin: 0 auto; --pagefind-ui-primary: var(--c-dark); --pagefind-ui-text: var(--c-ink); --pagefind-ui-border: rgba(21, 51, 43, 0.2); --pagefind-ui-background: var(--c-paper); --pagefind-ui-font: var(--font-body); }

/* Footer */
footer { background: var(--c-dark-deep); color: rgba(255, 255, 255, 0.78); margin-top: 3rem; padding: 3rem 5% 1.5rem; }
.footer-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; max-width: 1200px; margin: 0 auto; }
.footer-logo { font-family: var(--font-head); font-size: 1.2rem; color: #fff; margin-bottom: 0.6rem; }
.footer-brand p { font-size: 0.88rem; }
.footer-col h2 { color: var(--c-accent); font-size: 0.85rem; font-family: var(--font-body); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.8rem; }
.footer-col ul { list-style: none; display: grid; gap: 0.45rem; }
.footer-col a { color: rgba(255, 255, 255, 0.78); text-decoration: none; font-size: 0.9rem; }
.footer-col a:hover { color: var(--c-accent); }
.footer-fineprint { text-align: center; font-size: 0.78rem; color: rgba(255, 255, 255, 0.45); margin-top: 2.5rem; max-width: 1200px; margin-left: auto; margin-right: auto; }

/* Cookie banner */
.cookie-banner {
  position: fixed; bottom: 1.2rem; left: 1.2rem; z-index: 95;
  max-width: 360px; background: var(--c-paper); border: 1px solid rgba(21, 51, 43, 0.2);
  border-radius: var(--radius); box-shadow: 0 8px 28px rgba(13, 35, 29, 0.25);
  padding: 1.1rem 1.2rem;
}
.cookie-banner p { font-size: 0.85rem; margin-bottom: 0.8rem; }
.cookie-actions { display: flex; gap: 0.6rem; }
.cookie-actions .btn { font-size: 0.72rem; padding: 0.5rem 0.9rem; }

/* Floating WhatsApp button */
.whatsapp-float {
  position: fixed; bottom: 1.4rem; right: 1.4rem; z-index: 90;
  display: grid; place-items: center; width: 56px; height: 56px;
  background: #1faa53; color: #fff; border-radius: 50%;
  box-shadow: 0 4px 16px rgba(13, 35, 29, 0.3);
  animation: wa-pulse 2.2s infinite;
}
.whatsapp-float:hover { background: #178a43; }
@keyframes wa-pulse {
  0% { box-shadow: 0 4px 16px rgba(13, 35, 29, 0.3), 0 0 0 0 rgba(31, 170, 83, 0.45); }
  70% { box-shadow: 0 4px 16px rgba(13, 35, 29, 0.3), 0 0 0 16px rgba(31, 170, 83, 0); }
  100% { box-shadow: 0 4px 16px rgba(13, 35, 29, 0.3), 0 0 0 0 rgba(31, 170, 83, 0); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
