/* DJA Hostel — Shared Design System
   Single source of truth for all pages.
   Page-specific overrides go in an inline <style> block on the page itself.
   ------------------------------------------------------------------ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=DM+Sans:wght@300;400;500;700&display=swap');

/* ── Variables ─────────────────────────────────────────────────── */
:root {
  /* ── Brand palette ──────────────────────────────────────────── */
  --green:        #2D5016;
  --green-light:  #4A7C2E;
  --yellow:       #F4D03F;
  --red:          #C0392B;
  --red-dark:     #922B21;
  --earth-dark:   #1C2416;
  --earth-med:    #3D3229;
  --earth-light:  #8B7355;
  --sand:         #F5F0E6;
  --cream:        #FAF8F3;
  --text:         #2C2416;
  --text-muted:   #4a4035;
  --border:       rgba(44, 36, 22, 0.12);

  /* ── Design tokens (mapped to brand) ───────────────────────── */
  --bg:            var(--cream);
  --surface:       rgba(250, 248, 243, 0.92);
  --surface-solid: var(--cream);
  --ink:           var(--earth-dark);
  --muted:         var(--text-muted);
  --line:          rgba(44, 36, 22, 0.15);
  --accent:        var(--green);
  --accent-strong: var(--earth-dark);
  --accent-soft:   var(--sand);
  --shadow:        0 18px 40px rgba(28, 36, 22, 0.10);
  --shadow-sm:     0 8px 18px rgba(28, 36, 22, 0.06);
  --radius-lg:     28px;
  --radius-md:     18px;
  --radius-sm:     12px;
  --container:     1080px;
}

/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

/* ── Base ───────────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
  border-radius: var(--radius-md);
}

/* ── Layout ─────────────────────────────────────────────────────── */
main {
  width: min(calc(100% - 1.5rem), var(--container));
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

main.wide {
  --container: 1180px;
}

section {
  padding: 2rem 0;
}

/* ── Typography ─────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  line-height: 1.1;
  margin: 0 0 0.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  margin-top: 1rem;
  font-size: clamp(2.4rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
}

h3 {
  font-size: 1.08rem;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

/* ── Navigation ─────────────────────────────────────────────────── */
.topbar {
  padding-top: 1rem;
  margin-bottom: 1rem;
  font-size: 0.94rem;
  color: var(--muted);
}

.topbar a {
  text-decoration-color: rgba(45, 80, 22, 0.35);
  text-underline-offset: 0.18em;
}

/* ── Eyebrow label ──────────────────────────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Cards ──────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid rgba(45, 80, 22, 0.14);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.card-sm {
  background: rgba(250, 248, 243, 0.82);
  border: 1px solid rgba(45, 80, 22, 0.14);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1.1rem 1.15rem;
}

/* Dark CTA card */
.card-dark {
  background:
    linear-gradient(135deg, rgba(31, 36, 30, 0.97), rgba(67, 52, 28, 0.97)),
    #1f241e;
  color: #fff8ef;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.card-dark p,
.card-dark .muted {
  color: rgba(255, 248, 239, 0.82);
}

.card-dark .card-sm {
  background: rgba(255, 248, 239, 0.08);
  border-color: rgba(255, 248, 239, 0.12);
  box-shadow: none;
}

/* ── Section intro ──────────────────────────────────────────────── */
.section-intro {
  max-width: 62ch;
  margin-bottom: 1.4rem;
  color: var(--muted);
  font-size: 1rem;
}

.lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 60ch;
  margin-bottom: 1.2rem;
}

.muted {
  color: var(--muted);
}

/* ── Grids ──────────────────────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

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

/* ── Buttons ────────────────────────────────────────────────────── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-family: inherit;
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  cursor: pointer;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--green);
  color: var(--yellow);
  box-shadow: 0 14px 26px rgba(28, 36, 22, 0.18);
}

.button-secondary {
  background: transparent;
  color: var(--ink);
  border-color: rgba(28, 36, 22, 0.18);
}

.card-dark .button-primary {
  background: #fff8ef;
  color: var(--ink);
  box-shadow: none;
}

.card-dark .button-secondary {
  color: #fff8ef;
  border-color: rgba(255, 248, 239, 0.25);
}

/* ── Pills (link row) ───────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 2.8rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid rgba(45, 80, 22, 0.18);
  background: var(--sand);
  font-weight: 700;
  font-size: 0.95rem;
}

.card-dark .pill {
  background: rgba(255, 248, 239, 0.1);
  border-color: rgba(255, 248, 239, 0.18);
  color: #fff8ef;
}

.pill-row,
.button-row,
.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* ── Fact inline tags ───────────────────────────────────────────── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0;
  list-style: none;
  margin: 0 0 1.2rem;
}

.tags li,
.tag {
  padding: 0.5rem 0.85rem;
  background: var(--sand);
  border: 1px solid rgba(45, 80, 22, 0.16);
  border-radius: 999px;
  font-size: 0.95rem;
}

/* ── Table ──────────────────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

th, td {
  padding: 0.95rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

tr.highlight td {
  background: var(--sand);
  font-weight: 700;
}

/* ── FAQ accordion (details/summary) ───────────────────────────── */
details {
  border-top: 1px solid var(--line);
  padding: 1rem 0;
}

details:first-of-type {
  border-top: none;
  padding-top: 0;
}

summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  font-size: 1.02rem;
}

summary::-webkit-details-marker {
  display: none;
}

details p {
  margin: 0.7rem 0 0;
  color: var(--muted);
}

/* ── FAQ list (h3/p style) ──────────────────────────────────────── */
.faq-item + .faq-item {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.faq-item h3 {
  margin-bottom: 0.35rem;
}

.faq-item p {
  color: var(--muted);
}

/* ── Location chips ─────────────────────────────────────────────── */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.chips span,
.chips a {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  background: var(--sand);
  border: 1px solid rgba(45, 80, 22, 0.16);
  text-decoration: none;
  font-size: 0.94rem;
}

/* ── Gallery grid ───────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 1rem;
  align-items: stretch;
}

.gallery-card {
  position: relative;
  min-height: 16rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background-size: cover;
  background-position: center;
}

.gallery-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(21, 21, 21, 0.03), rgba(21, 21, 21, 0.48));
}

.gallery-card span {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 1;
  color: #fff8ef;
  font-weight: 700;
}

/* ── Steps list ─────────────────────────────────────────────────── */
.steps {
  margin: 0;
  padding-left: 1.2rem;
}

.steps li + li {
  margin-top: 0.8rem;
}

/* ── Footer note ────────────────────────────────────────────────── */
.footer-note {
  padding: 1rem 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ── Minimal page (prices, booking-info, etc.) ──────────────────── */
.page-minimal {
  max-width: 720px;
}

.page-minimal h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-cols-1-1,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-card {
    min-height: 24rem;
  }
}

@media (max-width: 720px) {
  body {
    line-height: 1.55;
  }

  main {
    width: min(calc(100% - 1rem), var(--container));
    padding-bottom: 2rem;
  }

  section {
    padding: 1.5rem 0;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .card,
  .card-dark {
    padding: 1.15rem;
  }

  .card-sm {
    padding: 0.9rem;
  }

  th, td {
    padding: 0.8rem 0.55rem;
    font-size: 0.94rem;
  }

  h1 {
    font-size: clamp(2rem, 6vw, 3rem);
  }
}
