/* ── Reset & Base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: #F8F5EE;
  color: #1A1208;
  line-height: 1.7;
  font-size: 15px;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ── Tokens ───────────────────────────────────────── */
:root {
  --olive: #2C4A2E;
  --olive2: #3A6140;
  --olive3: #4E7D52;
  --gold: #C8973A;
  --gold-lt: #EDD9A3;
  --cream: #F8F5EE;
  --cream2: #F2EDE2;
  --ink: #1A1208;
  --ink2: #3D3220;
  --muted: #7A6E5F;
  --border: #DDD7C8;
  --card: #FFFFFF;
  --soft-grn: #EEF4EC;
  --shadow: 0 10px 30px rgba(26, 18, 8, 0.10);
  --shadow-soft: 0 4px 14px rgba(26, 18, 8, 0.06);
  --radius: 18px;
  --radius-sm: 12px;
}

/* ── Layout ───────────────────────────────────────── */
.wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Header ───────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(160deg, #1e3d20 0%, #2C4A2E 60%, #243d26 100%);
  box-shadow: 0 1px 0 rgba(200,151,58,.30), 0 6px 32px rgba(0,0,0,.22);
}

header::before {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, rgba(200,151,58,0) 0%, rgba(200,151,58,.9) 50%, rgba(200,151,58,0) 100%);
}

.top {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0;
}

.brand-text h1 {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.05;
  letter-spacing: .01em;
}

.brand-sub {
  margin-top: 3px;
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.76);
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 .88rem 'DM Sans', sans-serif;
  cursor: pointer;
  transition: .2s ease;
}

.btn-ghost {
  background: rgba(255,255,255,.10);
  color: #fff;
  border-color: rgba(255,255,255,.16);
  backdrop-filter: blur(6px);
}

.btn-ghost:hover {
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.24);
}

.btn-gold {
  background: var(--olive3);
  color: #fff;
  border-color: rgba(255,255,255,.08);
  box-shadow: var(--shadow-soft);
}

.btn-gold:hover {
  background: #5b8d60;
  transform: translateY(-1px);
}

.header-login {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-login input {
  min-width: 220px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  color: #fff;
  font: 400 .9rem 'DM Sans', sans-serif;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.header-login input::placeholder {
  color: rgba(255,255,255,.68);
}

.header-login input:focus {
  outline: none;
  border-color: rgba(237,217,163,.45);
  box-shadow: 0 0 0 4px rgba(237,217,163,.12);
  background: rgba(255,255,255,.14);
}

.header-login button {
  height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--gold);
  color: #fff;
  font: 700 .88rem 'DM Sans', sans-serif;
  cursor: pointer;
  transition: .2s ease;
}

.header-login button:hover {
  background: #b7852a;
}

/* ── Hero ─────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(78,125,82,.18), transparent 35%),
    radial-gradient(circle at bottom right, rgba(200,151,58,.10), transparent 28%),
    linear-gradient(180deg, #f7f7f2 0%, #eef4ec 100%);
  padding: 78px 0 84px;
  border-bottom: 1px solid rgba(44,74,46,.08);
}

.hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 70px;
  background: linear-gradient(to bottom, rgba(248,245,238,0), #F8F5EE);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(200,151,58,.10);
  border: 1px solid rgba(200,151,58,.18);
  color: var(--olive);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero h2 {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  line-height: .98;
  color: var(--olive);
}

.hero h2 em {
  font-style: italic;
  color: var(--olive3);
}

.hero p {
  margin: 18px auto 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 1.05rem;
}

.ornament {
  margin-top: 24px;
  color: var(--gold);
  font-size: .95rem;
  letter-spacing: .45em;
}

/* ── Main ─────────────────────────────────────────── */
main {
  padding: 34px 0 80px;
}

.mb1 {
  margin-bottom: 16px;
}

/* ── Section label ───────────────────────────────── */
.section-label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
}

.section-label::before,
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(44,74,46,.16), transparent);
}

.section-label span {
  color: var(--olive);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── Panels / cards ──────────────────────────────── */
.panel,
.login-note,
.form-panel,
.post,
.feature {
  border-radius: var(--radius);
}

.panel,
.login-note,
.form-panel,
.post {
  background: var(--card);
  border: 1px solid rgba(44,74,46,.08);
  box-shadow: var(--shadow-soft);
}

.panel.pad,
.login-note,
.form-panel {
  padding: 18px;
}

/* ── Search form ─────────────────────────────────── */
.search-form {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto auto;
  gap: 10px;
}

.search-form input,
.search-form select,
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid rgba(44,74,46,.12);
  border-radius: 14px;
  background: #FCFDFC;
  color: var(--ink);
  font: 400 .95rem 'DM Sans', sans-serif;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.search-form input:focus,
.search-form select:focus,
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--olive3);
  box-shadow: 0 0 0 4px rgba(78,125,82,.12);
  background: #fff;
}

.search-form button,
.login-row button,
.form-submit {
  border: 0;
  border-radius: 14px;
  min-height: 46px;
  padding: 12px 18px;
  background: var(--olive);
  color: #fff;
  font: 700 .92rem 'DM Sans', sans-serif;
  cursor: pointer;
  transition: .2s ease;
}

.search-form button:hover,
.login-row button:hover,
.form-submit:hover {
  background: var(--olive2);
  transform: translateY(-1px);
}

.search-form .reset {
  min-height: 46px;
  padding: 12px 16px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cream2);
  border: 1px solid rgba(44,74,46,.10);
  color: var(--olive);
  font-weight: 600;
}

.search-form .reset:hover {
  background: var(--soft-grn);
}

/* ── Form area ───────────────────────────────────── */
.form-panel h3 {
  margin: 0 0 14px;
  font: 800 1.35rem 'Playfair Display', serif;
  color: var(--olive);
}

.form-grid {
  display: grid;
  gap: 12px;
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hint,
.small {
  font-size: .84rem;
  color: var(--muted);
}

.guest-note {
  margin-top: 10px;
}

.login-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.login-row input {
  flex: 1 1 230px;
}

/* ── Success banner ──────────────────────────────── */
.banner-ok {
  background: var(--soft-grn);
  border: 1px solid rgba(78,125,82,.20);
  border-radius: 16px;
  padding: 15px 18px;
  color: var(--olive);
  box-shadow: var(--shadow-soft);
}

/* ── Feature article ─────────────────────────────── */
.feature {
  background: linear-gradient(145deg, #315336 0%, #244227 100%);
  color: #fff;
  padding: 28px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.feature::before {
  content: '';
  position: absolute;
  right: -60px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
}

.feature-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tag-hl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.feature-meta time,
.feature .author {
  color: rgba(255,255,255,.78);
}

.feature h3 {
  margin: 0 0 10px;
  font: 800 2rem 'Playfair Display', serif;
  line-height: 1.1;
}

.feature .txt {
  color: rgba(255,255,255,.93);
  font-size: 1rem;
  white-space: pre-line;
}

/* ── Link button for entries ─────────────────────── */
.entry-link-wrap {
  margin-top: 10px;
}

.entry-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(200,151,58,.12);
  border: 1px solid rgba(200,151,58,.26);
  color: var(--olive);
  font-size: .88rem;
  font-weight: 700;
  transition: .18s ease;
}

.entry-link:hover {
  background: rgba(200,151,58,.18);
  transform: translateY(-1px);
}

.feature .entry-link {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.20);
  color: #fff;
}

.feature .entry-link:hover {
  background: rgba(255,255,255,.20);
}

/* ── Images ──────────────────────────────────────── */
.feature-imgs,
.post-imgs,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.feature-imgs {
  margin-top: 18px;
}

.feature-imgs img,
.post-imgs img {
  object-fit: cover;
  border-radius: 14px;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

.feature-imgs img {
  width: 160px;
  height: 118px;
  border: 2px solid rgba(255,255,255,.12);
}

.feature-imgs img:hover,
.post-imgs img:hover {
  transform: translateY(-2px);
}

/* ── Posts ───────────────────────────────────────── */
.posts {
  display: grid;
  gap: 16px;
}

.post {
  padding: 20px;
  position: relative;
}

.post::before {
  content: '';
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 4px;
  border-radius: 0 6px 6px 0;
  background: linear-gradient(180deg, var(--olive3), var(--gold));
}

.post-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.post h4 {
  margin: 0;
  font: 800 1.25rem 'Playfair Display', serif;
  color: var(--olive);
  line-height: 1.2;
}

.cat-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #F6F3EA;
  color: var(--olive);
  border: 1px solid rgba(200,151,58,.18);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.post-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: .84rem;
}

.post-meta strong {
  color: var(--olive);
}

.post-meta .dot {
  color: #b9b19f;
}

.post-body {
  margin-top: 10px;
  color: var(--ink);
  font-size: .96rem;
  white-space: pre-line;
}

.post-imgs {
  margin-top: 16px;
}

.post-imgs img {
  width: 220px;
  height: 160px;
  border: 1px solid rgba(44,74,46,.10);
}

/* ── Actions ─────────────────────────────────────── */
.actions {
  margin-top: 16px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 999px;
  font: 700 .84rem 'DM Sans', sans-serif;
  transition: .2s ease;
}

.pill-grn {
  background: var(--soft-grn);
  color: var(--olive);
}

.pill-red {
  background: #FFF1F0;
  color: #B03933;
}

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

/* ── Pager ───────────────────────────────────────── */
.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.pager a,
.pager span {
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1px solid rgba(44,74,46,.10);
  color: var(--olive);
  box-shadow: var(--shadow-soft);
}

.pager a:hover {
  background: var(--soft-grn);
}

.pager .cur {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

/* ── Footer ──────────────────────────────────────── */
.foot {
  padding: 32px 0 40px;
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
  border-top: 1px solid rgba(44,74,46,.08);
}

.foot a {
  color: var(--olive);
  font-weight: 700;
}

/* ── Lightbox ────────────────────────────────────── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 22, 15, .92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#lightboxImg {
  max-width: 95vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(0,0,0,.45);
  cursor: zoom-out;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 900px) {
  .search-form {
    grid-template-columns: 1fr 1fr;
  }

  .row2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .top {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
  }

  .header-login {
    width: 100%;
    justify-content: flex-start;
  }

  .header-login input {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 680px) {
  header {
    position: static;
  }

  .hero {
    padding: 52px 0 64px;
  }

  .hero h2 {
    font-size: 2.6rem;
  }

  .hero p {
    font-size: .98rem;
  }

  .brand-sub {
    display: none;
  }

  .feature {
    padding: 22px 18px;
  }

  .feature h3 {
    font-size: 1.6rem;
  }

  .post {
    padding: 18px 16px 18px 18px;
  }

  .post-imgs img,
  .feature-imgs img {
    width: 132px;
    height: 96px;
  }
}