/* ==========================================================================
   Backpacker Directory — shared design system
   Palette: warm sunset orange accent, deep travel-navy text, warm off-white bg
   ========================================================================== */

:root {
  --color-bg: #FBF7F1;
  --color-surface: #FFFFFF;
  --color-surface-alt: #FFF3E9;
  --color-text: #1E2430;
  --color-text-muted: #5B6472;
  --color-border: #EAE2D6;

  --color-accent: #F2782E;
  --color-accent-dark: #D9631E;
  --color-accent-light: #FCE3D0;

  --color-navy: #16213A;
  --color-navy-light: #24304D;

  --color-success: #2E9E63;
  --color-warning: #E0A422;
  --color-danger: #D6473C;

  --font-heading: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 2px 8px rgba(30, 36, 48, 0.06);
  --shadow-md: 0 8px 24px rgba(30, 36, 48, 0.10);
  --shadow-lg: 0 16px 40px rgba(30, 36, 48, 0.16);

  --container-max: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--color-navy);
}

h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--color-text-muted); }
a { color: var(--color-accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 247, 241, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--container-max);
  margin: 0 auto;
}
.nav-logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--color-navy);
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo span { color: var(--color-accent); }
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--color-accent-dark); text-decoration: none; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-links {
    position: fixed; inset: 64px 0 auto 0; background: var(--color-surface);
    flex-direction: column; padding: 20px 24px; gap: 16px;
    box-shadow: var(--shadow-md); transform: translateY(-140%); transition: transform .25s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-toggle { display: block; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--color-navy); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--color-accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--color-accent-dark); }
.btn-outline { background: transparent; color: var(--color-navy); border: 1.5px solid var(--color-border); }
.btn-outline:hover { border-color: var(--color-accent); color: var(--color-accent-dark); }
.btn-ghost { background: transparent; color: var(--color-navy); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 120px 24px;
  text-align: center;
  background: linear-gradient(180deg, rgba(22,33,58,.72), rgba(22,33,58,.82)),
              url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="700"><rect width="1200" height="700" fill="%2316213A"/></svg>');
  background-size: cover;
  background-position: center;
  color: #fff;
}
.hero.hero-compact { padding: 72px 24px; }
.hero h1 { color: #fff; max-width: 780px; margin-inline: auto; }
.hero p.lead { color: rgba(255,255,255,.85); max-width: 640px; margin: 0 auto 28px; font-size: 1.1rem; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Cards / Sections ---------- */
.section { padding: 72px 0; }
.section-tight { padding: 40px 0; }
.section-header { text-align: center; max-width: 640px; margin: 0 auto 44px; }

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.card-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--color-accent-light); color: var(--color-accent-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 16px;
}

.badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: .02em;
  background: var(--color-accent-light); color: var(--color-accent-dark);
}
.badge-success { background: #DDF3E7; color: var(--color-success); }
.badge-warning { background: #FBEDCF; color: var(--color-warning); }
.badge-muted { background: #EEF0F3; color: var(--color-text-muted); }

/* ---------- Forms ---------- */
.form-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-md);
  max-width: 560px;
  margin: 0 auto;
}
label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; color: var(--color-navy); }
.field { margin-bottom: 18px; }
input, select, textarea {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border); font-family: var(--font-body);
  font-size: 0.95rem; background: #fff; color: var(--color-text);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--color-accent); }
textarea { resize: vertical; min-height: 90px; }
.field-hint { font-size: 0.8rem; color: var(--color-text-muted); margin-top: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.9rem; margin-bottom: 18px; display: none; }
.alert.show { display: block; }
.alert-error { background: #FBEAE8; color: var(--color-danger); }
.alert-success { background: #E4F5EB; color: var(--color-success); }

/* ---------- Directory ---------- */
.search-bar {
  display: flex; gap: 12px; flex-wrap: wrap; background: var(--color-surface);
  padding: 16px; border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  margin-top: -56px; position: relative; z-index: 5;
}
.search-bar input, .search-bar select { flex: 1; min-width: 160px; }

.listing-card { display: flex; flex-direction: column; height: 100%; }
.listing-card h3 { margin-bottom: 4px; }
.listing-meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.listing-card .desc { flex: 1; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--color-text-muted); }

/* ---------- Table ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--color-border); font-size: 0.9rem; }
th { color: var(--color-text-muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: .03em; }
.table-wrap { overflow-x: auto; background: var(--color-surface); border-radius: var(--radius-md); border: 1px solid var(--color-border); }

/* ---------- Stat tiles ---------- */
.stat-tile { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 22px; }
.stat-tile .num { font-family: var(--font-heading); font-size: 2rem; font-weight: 800; color: var(--color-navy); }
.stat-tile .label { color: var(--color-text-muted); font-size: 0.85rem; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--color-border); padding: 18px 0; }
.faq-q { display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-weight: 600; color: var(--color-navy); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-item.open .faq-a { max-height: 400px; margin-top: 10px; }
.faq-plus { transition: transform .2s ease; }
.faq-item.open .faq-plus { transform: rotate(45deg); }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-navy); color: rgba(255,255,255,.75); padding: 56px 0 28px; margin-top: 80px; }
.site-footer h4 { color: #fff; font-size: 0.95rem; }
.site-footer a { color: rgba(255,255,255,.75); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 20px; font-size: 0.82rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.muted { color: var(--color-text-muted); }
.mt-0 { margin-top: 0; }
.flex { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.hidden { display: none !important; }
.pill-group { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--color-border);
  font-size: 0.82rem; cursor: pointer; background: #fff; color: var(--color-text);
}
.pill.active { background: var(--color-navy); color: #fff; border-color: var(--color-navy); }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
