/* ==========================================================================
   Inside Burkina — Design System
   ========================================================================== */

:root {
  /* Palette — inspired by Burkinabè earth, harvest gold and savanna green */
  --ink: #201a12;
  --ink-soft: #4a4133;
  --muted: #85795f;
  --line: #e7dfcd;
  --line-soft: #f0ead9;
  --paper: #fdfbf6;
  --paper-alt: #f7f1e4;
  --paper-raised: #ffffff;

  --terracotta: #c15a2c;
  --terracotta-dark: #9c4420;
  --terracotta-light: #f3ddce;
  --gold: #dba227;
  --gold-dark: #b7811a;
  --gold-light: #f8e8bf;
  --forest: #2a5138;
  --forest-dark: #1c3a27;
  --forest-light: #dbe8dd;

  --success: #2a5138;
  --danger: #b23b2f;

  --shadow-sm: 0 1px 2px rgba(32, 26, 18, 0.06), 0 1px 1px rgba(32, 26, 18, 0.04);
  --shadow-md: 0 6px 16px rgba(32, 26, 18, 0.10), 0 2px 6px rgba(32, 26, 18, 0.06);
  --shadow-lg: 0 20px 48px rgba(32, 26, 18, 0.16), 0 6px 16px rgba(32, 26, 18, 0.08);
  --shadow-inset: inset 0 0 0 1px rgba(32, 26, 18, 0.08);

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

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1320px;
  --header-h: 76px;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; margin: 0 0 0.4em; letter-spacing: -0.01em; color: var(--ink); }
p { margin: 0 0 1em; }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--terracotta);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--terracotta-dark); box-shadow: var(--shadow-md); }
.btn-dark {
  background: var(--ink);
  color: #fff;
}
.btn-dark:hover { background: #000; }
.btn-outline {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-outline:hover { border-color: var(--ink); background: var(--paper-alt); }
.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
}
.btn-ghost:hover { background: var(--paper-alt); color: var(--ink); }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }
.btn-lg { padding: 16px 30px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon {
  width: 42px; height: 42px; padding: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--paper-raised); border: 1px solid var(--line); color: var(--ink-soft);
}
.btn-icon:hover { border-color: var(--ink); color: var(--ink); }
.btn-icon.is-active { background: var(--terracotta-light); border-color: var(--terracotta); color: var(--terracotta-dark); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.icon { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(253, 251, 246, 0.86);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line-soft);
  height: var(--header-h);
  display: flex;
  align-items: center;
}
.site-header .container { display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 21px; color: var(--ink); flex-shrink: 0; }
.brand .mark { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--terracotta), var(--gold)); display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.brand small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 10.5px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); margin-top: 1px; }

.nav-search { flex: 1; max-width: 480px; }
.search-field { position: relative; }
.search-field input {
  width: 100%; padding: 12px 16px 12px 42px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: var(--paper-raised); color: var(--ink); font-size: 14.5px;
  transition: border-color .15s, box-shadow .15s;
}
.search-field input:focus { outline: none; border-color: var(--terracotta); box-shadow: 0 0 0 4px var(--terracotta-light); }
.search-field .icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  padding: 9px 14px; border-radius: var(--radius-pill); font-size: 14.5px; font-weight: 500; color: var(--ink-soft);
  transition: background .15s, color .15s;
}
.main-nav a:hover, .main-nav a.is-active { background: var(--paper-alt); color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--paper-raised); font-size: 14px; font-weight: 600; }
.user-chip .avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--forest); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; font-family: var(--font-display); }
.notif-badge {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px;
  background: var(--terracotta); color: #fff; font-size: 10.5px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--paper); line-height: 1;
}

.mobile-menu-btn { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
}
.hero-bg { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; z-index: 0; }
.hero-bg div { background-size: cover; background-position: center; filter: saturate(1.05); }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(20, 15, 8, 0.55) 0%, rgba(20, 15, 8, 0.72) 55%, rgba(20, 15, 8, 0.92) 100%);
}
.hero-content { position: relative; z-index: 2; width: 100%; text-align: center; padding: 90px 24px; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.28); font-size: 13px; font-weight: 600;
  letter-spacing: 0.03em; margin-bottom: 26px; backdrop-filter: blur(6px);
}
.hero h1 { font-size: clamp(38px, 5.4vw, 68px); line-height: 1.06; margin: 0 auto 20px; max-width: 900px; color: #fff; }
.hero h1 em { font-style: italic; color: var(--gold-light); }
.hero-sub { font-size: clamp(15px, 1.7vw, 19px); color: rgba(255,255,255,0.86); max-width: 620px; margin: 0 auto 40px; }

.hero-search {
  max-width: 720px; margin: 0 auto 26px; background: #fff; border-radius: var(--radius-pill);
  padding: 8px; display: flex; align-items: center; gap: 8px; box-shadow: var(--shadow-lg);
}
.hero-search .icon { color: var(--muted); margin-left: 12px; flex-shrink: 0; }
.hero-search input { flex: 1; border: none; background: transparent; padding: 12px 4px; font-size: 16px; color: var(--ink); }
.hero-search input:focus { outline: none; }
.hero-search button { flex-shrink: 0; }

.hero-tags { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin-bottom: 46px; }
.hero-tags a {
  padding: 7px 15px; border-radius: var(--radius-pill); border: 1px solid rgba(255,255,255,0.32);
  font-size: 13.5px; color: #fff; background: rgba(255,255,255,0.08); transition: background .15s, border-color .15s;
}
.hero-tags a:hover { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.5); }

.hero-stats { display: flex; justify-content: center; gap: 56px; flex-wrap: wrap; }
.hero-stats .stat { text-align: center; }
.hero-stats .stat strong { display: block; font-family: var(--font-display); font-size: 30px; font-weight: 700; color: #fff; }
.hero-stats .stat span { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.7); }

/* ---------- Section headers ---------- */
.section { padding: 84px 0; }
.section-tight { padding: 56px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head .eyebrow { display: block; font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--terracotta); margin-bottom: 10px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); margin: 0; }
.section-head p { color: var(--muted); max-width: 520px; margin: 10px 0 0; }
.section-alt { background: var(--paper-alt); }

/* ---------- Category grid ---------- */
.category-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.category-card {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/5;
  box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .25s ease;
}
.category-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.category-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.category-card:hover img { transform: scale(1.08); }
.category-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,15,8,0) 30%, rgba(20,15,8,0.86) 100%); }
.category-card .cc-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px; z-index: 2; color: #fff; }
.category-card .cc-count { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold-light); font-weight: 600; margin-bottom: 4px; }
.category-card h3 { color: #fff; font-size: 19px; margin: 0; }

/* ---------- Masonry gallery ---------- */
.masonry {
  column-count: 4; column-gap: 20px;
}
.masonry .photo-card { break-inside: avoid; margin-bottom: 20px; }

.grid-uniform {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}

.photo-card {
  position: relative; border-radius: var(--radius-md); overflow: hidden; background: var(--paper-raised);
  box-shadow: var(--shadow-sm); transition: box-shadow .2s ease, transform .2s ease;
}
.photo-card:hover { box-shadow: var(--shadow-lg); }
.photo-card .pc-media { position: relative; overflow: hidden; display: block; background: var(--paper-alt); }
.photo-card .pc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; display: block; }
.photo-card:hover .pc-media img { transform: scale(1.05); }
.photo-card[data-aspect="portrait"] .pc-media { aspect-ratio: 3/4; }
.photo-card[data-aspect="landscape"] .pc-media { aspect-ratio: 4/3; }
.photo-card[data-aspect="square"] .pc-media { aspect-ratio: 1/1; }
.photo-card[data-aspect="wide"] .pc-media { aspect-ratio: 16/9; }

.masonry .photo-card .pc-media { aspect-ratio: auto; }
.masonry .photo-card[data-aspect="portrait"] .pc-media { aspect-ratio: 3/4.1; }
.masonry .photo-card[data-aspect="landscape"] .pc-media { aspect-ratio: 4/3.1; }
.masonry .photo-card[data-aspect="wide"] .pc-media { aspect-ratio: 16/9.4; }
.masonry .photo-card[data-aspect="square"] .pc-media { aspect-ratio: 1/1.05; }

.pc-overlay {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(20,15,8,0.02) 0%, rgba(20,15,8,0) 34%, rgba(20,15,8,0) 55%, rgba(20,15,8,0.82) 100%);
  opacity: 0; transition: opacity .22s ease; display: flex; flex-direction: column; justify-content: space-between; padding: 14px;
}
.photo-card:hover .pc-overlay { opacity: 1; }
.pc-top { display: flex; justify-content: flex-end; gap: 8px; pointer-events: none; }
.pc-top button { pointer-events: auto; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.92); border: none; display: flex; align-items: center; justify-content: center; color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .15s, background .15s, color .15s; }
.pc-top button:hover { transform: scale(1.08); }
.pc-top button.is-liked { background: var(--terracotta); color: #fff; }
.pc-top button .icon { width: 17px; height: 17px; }
.pc-bottom { pointer-events: auto; color: #fff; }
.pc-bottom .pc-title { font-family: var(--font-body); font-weight: 600; font-size: 14.5px; margin-bottom: 3px; text-shadow: 0 1px 3px rgba(0,0,0,0.4); }
.pc-bottom .pc-loc { font-size: 12px; opacity: 0.88; display: flex; align-items: center; gap: 4px; }
.pc-bottom .pc-loc .icon { width: 12px; height: 12px; }
.pc-cat-badge {
  position: absolute; top: 12px; left: 12px; z-index: 3;
  background: rgba(253,251,246,0.94); color: var(--ink); font-size: 11px; font-weight: 700;
  padding: 5px 11px; border-radius: var(--radius-pill); text-transform: uppercase; letter-spacing: 0.04em;
}

.gallery-empty { text-align: center; padding: 90px 24px; color: var(--muted); }
.gallery-empty h3 { color: var(--ink); margin-bottom: 8px; }

/* ---------- Filter bar (Explore page) ---------- */
.filter-bar {
  position: sticky; top: var(--header-h); z-index: 40; background: var(--paper);
  border-bottom: 1px solid var(--line-soft); padding: 20px 0; margin-bottom: 40px;
}
.filter-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.chip-group { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.chip {
  padding: 9px 17px; border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--paper-raised);
  font-size: 13.5px; font-weight: 600; color: var(--ink-soft); transition: all .15s ease; display: inline-flex; align-items: center; gap: 6px;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.filter-select {
  padding: 10px 34px 10px 16px; border-radius: var(--radius-pill); border: 1px solid var(--line);
  background: var(--paper-raised) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2385795f' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
  appearance: none; font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
}
.results-count { font-size: 13.5px; color: var(--muted); white-space: nowrap; }

/* ---------- Forms ---------- */
.field { margin-bottom: 22px; }
.field label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 8px; color: var(--ink); }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field textarea, .field select {
  width: 100%; padding: 13px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--paper-raised); color: var(--ink); font-size: 15px; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--terracotta); box-shadow: 0 0 0 4px var(--terracotta-light);
}
.field textarea { resize: vertical; min-height: 110px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.tag-input-wrap { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper-raised); }
.tag-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; background: var(--paper-alt); border-radius: var(--radius-pill); font-size: 13px; font-weight: 600; }
.tag-pill button { background: none; border: none; color: var(--muted); font-size: 14px; line-height: 1; padding: 0; }
.tag-input-wrap input { border: none; flex: 1; min-width: 120px; padding: 5px; background: transparent; }
.tag-input-wrap input:focus { outline: none; }

.form-card {
  background: var(--paper-raised); border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  padding: 40px; box-shadow: var(--shadow-sm);
}
.form-error { background: #fbeae7; border: 1px solid #f0c4ba; color: var(--danger); padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 20px; display: none; }
.form-error.is-visible { display: block; }
.form-success { background: var(--forest-light); border: 1px solid #b9d3c0; color: var(--forest-dark); padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 20px; display: none; }
.form-success.is-visible { display: block; }

.dropzone {
  border: 2px dashed var(--line); border-radius: var(--radius-md); padding: 44px 24px; text-align: center; background: var(--paper-alt);
  cursor: pointer; transition: border-color .15s, background .15s; position: relative; overflow: hidden;
}
.dropzone:hover, .dropzone.is-dragover { border-color: var(--terracotta); background: var(--terracotta-light); }
.dropzone .icon { width: 34px; height: 34px; color: var(--terracotta); margin: 0 auto 14px; }
.dropzone strong { display: block; margin-bottom: 4px; }
.dropzone span { font-size: 13px; color: var(--muted); }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone-preview { position: relative; border-radius: var(--radius-md); overflow: hidden; }
.dropzone-preview img { width: 100%; max-height: 360px; object-fit: cover; }
.dropzone-preview button { position: absolute; top: 12px; right: 12px; }

/* ---------- Auth ---------- */
.auth-shell { max-width: 440px; margin: 70px auto; padding: 0 24px; }
.auth-tabs { display: flex; gap: 6px; background: var(--paper-alt); padding: 5px; border-radius: var(--radius-pill); margin-bottom: 28px; }
.auth-tabs button { flex: 1; padding: 11px; border-radius: var(--radius-pill); border: none; background: transparent; font-weight: 700; font-size: 14px; color: var(--muted); }
.auth-tabs button.is-active { background: var(--paper-raised); color: var(--ink); box-shadow: var(--shadow-sm); }

/* ---------- Detail page ---------- */
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; align-items: start; }
.detail-media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); background: var(--paper-alt); position: relative; }
.detail-media img { width: 100%; max-height: 82vh; object-fit: contain; background: var(--ink); }
.detail-side { position: sticky; top: calc(var(--header-h) + 24px); }
.detail-cat { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: var(--radius-pill); background: var(--terracotta-light); color: var(--terracotta-dark); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 16px; }
.detail-side h1 { font-size: 28px; margin-bottom: 12px; }
.detail-loc { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14.5px; margin-bottom: 20px; }
.detail-desc { color: var(--ink-soft); line-height: 1.75; margin-bottom: 26px; }
.detail-actions { display: flex; gap: 10px; margin-bottom: 26px; }
.detail-actions .btn-primary { flex: 1; }
.detail-stats { display: flex; gap: 22px; padding: 18px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); margin-bottom: 26px; }
.detail-stats div { text-align: left; }
.detail-stats strong { display: block; font-family: var(--font-display); font-size: 19px; }
.detail-stats span { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.detail-tags a { padding: 6px 13px; background: var(--paper-alt); border-radius: var(--radius-pill); font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.detail-tags a:hover { background: var(--line-soft); }
.uploader-card { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--line-soft); border-radius: var(--radius-md); }
.uploader-card .avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--forest); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; flex-shrink: 0; }
.uploader-card strong { display: block; font-size: 14.5px; }
.uploader-card span { font-size: 12.5px; color: var(--muted); }
.credit-note { font-size: 12px; color: var(--muted); margin-top: 14px; line-height: 1.6; }

/* ---------- Comments ---------- */
.comments-section { max-width: 760px; margin: 0 auto; }
.comment-form { display: flex; gap: 12px; margin-bottom: 34px; }
.comment-form .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--forest); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; flex-shrink: 0; }
.comment-form-body { flex: 1; }
.comment-form textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px 14px; font-size: 14.5px; resize: vertical; min-height: 66px; }
.comment-form textarea:focus { outline: none; border-color: var(--terracotta); box-shadow: 0 0 0 4px var(--terracotta-light); }
.comment-form-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
.comment-item { display: flex; gap: 12px; padding: 20px 0; border-bottom: 1px solid var(--line-soft); }
.comment-item .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--paper-alt); color: var(--ink-soft); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; flex-shrink: 0; }
.comment-item .c-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.comment-item .c-author { font-weight: 700; font-size: 14.5px; }
.comment-item .c-date { font-size: 12px; color: var(--muted); }
.comment-item .c-text { color: var(--ink-soft); font-size: 14.5px; line-height: 1.6; }
.login-prompt { text-align: center; padding: 26px; background: var(--paper-alt); border-radius: var(--radius-md); color: var(--muted); font-size: 14.5px; }
.login-prompt a { color: var(--terracotta); font-weight: 700; }

/* ---------- Related ---------- */
.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ---------- CTA banner ---------- */
.cta-banner {
  border-radius: var(--radius-lg); background: linear-gradient(120deg, var(--forest-dark), var(--forest));
  color: #fff; padding: 64px; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.cta-banner::before { content: ""; position: absolute; width: 420px; height: 420px; background: radial-gradient(circle, rgba(219,162,39,0.25), transparent 70%); top: -160px; right: -100px; }
.cta-banner h2 { color: #fff; font-size: clamp(26px, 3vw, 36px); max-width: 520px; position: relative; }
.cta-banner p { color: rgba(255,255,255,0.78); max-width: 480px; position: relative; }
.cta-banner .btn-primary { position: relative; background: var(--gold); color: var(--ink); }
.cta-banner .btn-primary:hover { background: var(--gold-dark); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.72); padding: 70px 0 30px; margin-top: 100px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 50px; }
.footer-brand .brand { color: #fff; }
.footer-brand .brand .mark { }
.footer-brand p { margin-top: 16px; font-size: 14px; line-height: 1.7; max-width: 320px; color: rgba(255,255,255,0.6); }
.footer-col h4 { color: #fff; font-family: var(--font-body); font-size: 13px; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 18px; }
.footer-col ul li { margin-bottom: 11px; }
.footer-col a { font-size: 14.5px; color: rgba(255,255,255,0.62); transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 13px; color: rgba(255,255,255,0.5); flex-wrap: wrap; gap: 12px; }
.social-row { display: flex; gap: 10px; }
.social-row a { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; }
.social-row a:hover { background: rgba(255,255,255,0.1); }

/* ---------- Lightbox / Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(20,15,8,0.72); backdrop-filter: blur(6px); z-index: 300;
  display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.modal-backdrop.is-open { opacity: 1; pointer-events: auto; }
.modal-box { background: var(--paper-raised); border-radius: var(--radius-lg); max-width: 460px; width: 100%; padding: 34px; box-shadow: var(--shadow-lg); position: relative; }
.modal-close { position: absolute; top: 18px; right: 18px; }

/* ---------- Toasts ---------- */
.toast-stack { position: fixed; bottom: 24px; right: 24px; z-index: 400; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--ink); color: #fff; padding: 14px 20px; border-radius: var(--radius-md); font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px; animation: toast-in .25s ease;
  max-width: 320px;
}
.toast.is-error { background: var(--danger); }
.toast.is-success { background: var(--forest); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Page header (Explore/About) ---------- */
.page-header { padding: 56px 0 20px; text-align: center; }
.page-header .eyebrow { display: block; font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--terracotta); margin-bottom: 12px; }
.page-header h1 { font-size: clamp(30px, 4vw, 46px); }
.page-header p { color: var(--muted); max-width: 600px; margin: 12px auto 0; }

.breadcrumb { font-size: 13.5px; color: var(--muted); margin-bottom: 22px; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }

.skeleton { background: linear-gradient(90deg, var(--paper-alt) 25%, var(--line-soft) 37%, var(--paper-alt) 63%); background-size: 400% 100%; animation: skeleton-loading 1.4s ease infinite; border-radius: var(--radius-md); }
@keyframes skeleton-loading { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.spinner-dark { border-color: rgba(32,26,18,0.2); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- About page ---------- */
.about-content { max-width: 760px; margin: 0 auto; }
.about-content h2 { margin-top: 46px; font-size: 24px; }
.about-content p { color: var(--ink-soft); line-height: 1.8; }
.stat-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 50px 0; }
.stat-band .sb-item { text-align: center; padding: 30px 16px; border-radius: var(--radius-md); background: var(--paper-alt); }
.stat-band .sb-item strong { display: block; font-family: var(--font-display); font-size: 32px; color: var(--terracotta); }
.stat-band .sb-item span { font-size: 13px; color: var(--muted); }

/* ---------- Admin ---------- */
.admin-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 30px; flex-wrap: wrap; }
.admin-tabs button { padding: 12px 18px; font-weight: 700; font-size: 14.5px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; border-top: none; border-left: none; border-right: none; }
.admin-tabs button.is-active { color: var(--ink); border-bottom-color: var(--terracotta); }
.admin-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 40px; }
.admin-stat-card { padding: 22px; border-radius: var(--radius-md); background: var(--paper-raised); border: 1px solid var(--line-soft); box-shadow: var(--shadow-sm); }
.admin-stat-card strong { display: block; font-family: var(--font-display); font-size: 28px; }
.admin-stat-card span { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.admin-cat-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 40px; }
.admin-cat-row { display: flex; align-items: center; gap: 12px; font-size: 13.5px; }
.admin-cat-row .bar-track { flex: 1; height: 8px; border-radius: 999px; background: var(--paper-alt); overflow: hidden; }
.admin-cat-row .bar-fill { height: 100%; background: var(--terracotta); border-radius: 999px; }
.admin-cat-row .bar-label { width: 200px; flex-shrink: 0; color: var(--ink-soft); font-weight: 600; }
.admin-cat-row .bar-count { width: 40px; text-align: right; color: var(--muted); flex-shrink: 0; }

.data-table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--radius-md); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.8px; min-width: 640px; }
.data-table th { text-align: left; padding: 12px 16px; background: var(--paper-alt); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); white-space: nowrap; }
.data-table td { padding: 12px 16px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
.data-table tr:hover td { background: var(--paper-alt); }
.data-table .thumb { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; display: block; }
.data-table .cell-title { font-weight: 600; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-table .cell-muted { color: var(--muted); font-size: 12.8px; }
.admin-badge { display: inline-flex; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--forest-light); color: var(--forest-dark); }
.admin-badge.is-admin { background: var(--gold-light); color: var(--gold-dark); }
.btn-danger-sm { padding: 7px 12px; border-radius: var(--radius-pill); border: 1px solid #f0c4ba; background: #fbeae7; color: var(--danger); font-size: 12.5px; font-weight: 700; }
.btn-danger-sm:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.admin-gate { max-width: 480px; margin: 100px auto; text-align: center; }

.review-list { display: flex; flex-direction: column; gap: 20px; }
.review-card { display: grid; grid-template-columns: 220px 1fr; gap: 22px; padding: 20px; border: 1px solid var(--line-soft); border-radius: var(--radius-md); background: var(--paper-raised); box-shadow: var(--shadow-sm); }
.review-card img { width: 100%; height: 160px; object-fit: cover; border-radius: var(--radius-sm); }
.review-meta h4 { margin-bottom: 4px; font-size: 17px; }
.review-meta .rm-row { font-size: 13px; color: var(--muted); margin-bottom: 3px; }
.review-meta p.rm-desc { font-size: 13.5px; color: var(--ink-soft); margin: 10px 0; line-height: 1.6; }
.review-actions { display: flex; gap: 10px; margin-top: 14px; align-items: flex-start; flex-wrap: wrap; }
.reject-box { display: none; gap: 8px; width: 100%; margin-top: 10px; }
.reject-box.is-open { display: flex; flex-wrap: wrap; }
.reject-box textarea { flex: 1; min-width: 220px; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); font-size: 13.5px; min-height: 46px; }
.btn-approve { background: var(--forest); color: #fff; border: none; padding: 10px 18px; border-radius: var(--radius-pill); font-weight: 700; font-size: 13.5px; }
.btn-approve:hover { background: var(--forest-dark); }
.btn-reject { background: #fbeae7; color: var(--danger); border: 1px solid #f0c4ba; padding: 10px 18px; border-radius: var(--radius-pill); font-weight: 700; font-size: 13.5px; }
.btn-reject:hover { background: var(--danger); color: #fff; }
.empty-note { color: var(--muted); text-align: center; padding: 50px 20px; }

.messenger-layout { display: grid; grid-template-columns: 300px 1fr; gap: 0; border: 1px solid var(--line-soft); border-radius: var(--radius-md); overflow: hidden; min-height: 480px; }
.conversation-list { border-right: 1px solid var(--line-soft); overflow-y: auto; max-height: 620px; }
.conv-item { display: block; width: 100%; text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); background: none; }
.conv-item:hover { background: var(--paper-alt); }
.conv-item.is-active { background: var(--terracotta-light); }
.conv-item strong { display: block; font-size: 14px; margin-bottom: 2px; }
.conv-item span.preview { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-item .conv-badge { float: right; background: var(--terracotta); color: #fff; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.conversation-thread { display: flex; flex-direction: column; padding: 20px; }
.thread-messages { flex: 1; overflow-y: auto; max-height: 460px; margin-bottom: 14px; }
.thread-reply { display: flex; gap: 8px; }
.thread-reply textarea { flex: 1; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); min-height: 44px; font-size: 13.5px; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 140px 24px; }
.notfound .big { font-family: var(--font-display); font-size: 100px; color: var(--terracotta); line-height: 1; margin-bottom: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .masonry { column-count: 3; }
  .grid-uniform, .related-grid { grid-template-columns: repeat(3, 1fr); }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-search { display: none; }
  .main-nav { display: none; }
  /* Everything the header buttons offer (contribute, admin, messages, account) lives in
     the drawer below this width — there simply isn't room for it next to the logo. */
  .header-actions { display: none; }
  .mobile-menu-btn { display: inline-flex; }
  .site-header .container { gap: 14px; }
  .brand small { display: none; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .masonry { column-count: 2; }
  .grid-uniform, .related-grid { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr; }
  .cta-banner { flex-direction: column; text-align: center; padding: 44px 28px; }
  .stat-band { grid-template-columns: repeat(2, 1fr); }
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-cat-row .bar-label { width: 120px; }
  .review-card { grid-template-columns: 1fr; }
  .review-card img { height: 200px; }
  .messenger-layout { grid-template-columns: 1fr; }
  .conversation-list { max-height: 220px; }
  .form-card { padding: 28px 22px; }
  .hero-search { flex-wrap: wrap; }
  /* 16px minimum keeps iOS Safari from auto-zooming the page on input focus. */
  input[type="text"], input[type="email"], input[type="password"], input[type="search"], textarea, select {
    font-size: 16px;
  }
}
@media (max-width: 560px) {
  .container { padding: 0 18px; }
  .category-grid, .masonry, .grid-uniform, .related-grid { grid-template-columns: repeat(1, 1fr); column-count: 1; }
  .hero { min-height: 520px; }
  .hero-content { padding: 60px 18px; }
  .hero-stats { gap: 30px; }
  .hero-search { padding: 6px; border-radius: var(--radius-md); }
  .hero-search .icon { display: none; }
  .hero-search input { padding: 10px 4px; }
  .hero-search button { padding: 12px 16px; }
  .section { padding: 56px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .brand { font-size: 17px; }
  .brand .mark { width: 30px; height: 30px; font-size: 15px; }
  .form-card { padding: 22px 16px; }
  .auth-shell { margin: 36px auto; }
  .page-header { padding: 40px 0 16px; }
  .detail-actions { flex-wrap: wrap; }
  .detail-actions .btn-primary { flex-basis: 100%; }
  .review-actions { flex-direction: column; align-items: stretch; }
  .review-actions button { width: 100%; justify-content: center; }
  .reject-box textarea { min-width: 100%; }
  .data-table { min-width: 560px; }
  .admin-stats-grid { grid-template-columns: 1fr 1fr; }
  .admin-tabs { gap: 2px; }
  .admin-tabs button { padding: 10px 12px; font-size: 13px; }
}
@media (max-width: 400px) {
  .hero-stats { gap: 20px 26px; }
  .hero-stats .stat strong { font-size: 24px; }
  .admin-stats-grid { grid-template-columns: 1fr; }
}

/* ---------- Mobile nav drawer ---------- */
.mobile-drawer {
  position: fixed; inset: 0; z-index: 200; display: none;
}
.mobile-drawer.is-open { display: block; }
.mobile-drawer .drawer-backdrop { position: absolute; inset: 0; background: rgba(20,15,8,0.5); }
.mobile-drawer .drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 86%; max-width: 340px; background: var(--paper);
  padding: 24px; overflow-y: auto; box-shadow: var(--shadow-lg);
}
.mobile-drawer .drawer-panel a { display: flex; align-items: center; gap: 8px; padding: 14px 4px; font-size: 16px; font-weight: 600; border-bottom: 1px solid var(--line-soft); position: relative; }
.mobile-drawer .drawer-panel a .icon { width: 19px; height: 19px; flex-shrink: 0; }
.drawer-search { margin-bottom: 18px; }
.drawer-search input { width: 100%; padding: 12px 16px 12px 42px; border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--paper-raised); font-size: 16px; }
.drawer-search input:focus { outline: none; border-color: var(--terracotta); }
.drawer-auth-slot { margin-top: 8px; }
.drawer-auth-slot .notif-badge { position: static; margin-left: auto; }
