/* ==============================================================
   KINDERS VAN DIE KONING — Design System
   Warm & Hopeful · Plus Jakarta Sans · Ivory / Gold / Navy
   ============================================================== */

:root {
  /* Fonts */
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  /* Palette */
  --bg-cream:       #FBF7EF;   /* page */
  --bg-ivory:       #FFFBF4;   /* cards */
  --bg-warm:        #F3EADA;   /* alt section */

  --gold:           #D4A24B;
  --gold-dark:      #B4862F;
  --gold-soft:      #F2E0B8;

  --navy:           #1B2A4E;
  --navy-dark:      #0F1B35;
  --navy-deep:      #080F21;

  --text-main:      #2F3A52;
  --text-muted:     #6B7689;
  --line:           rgba(27, 42, 78, 0.10);
  --line-soft:      rgba(27, 42, 78, 0.06);

  --shadow-sm:      0 2px 8px rgba(27, 42, 78, 0.04);
  --shadow-md:      0 8px 24px rgba(27, 42, 78, 0.08);
  --shadow-lg:      0 20px 48px rgba(27, 42, 78, 0.12);
  --shadow-gold:    0 10px 30px rgba(212, 162, 75, 0.25);

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

  --section-pad:    100px 0;
}

/* ==============================================================
   RESET & BASE
   ============================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-main);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-main);
  background: var(--bg-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main, #page { flex: 1 0 auto; }

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

a { color: var(--navy); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--gold-dark); }

/* ==============================================================
   TYPOGRAPHY
   ============================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--navy);
  margin: 0 0 .5em;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.8rem); font-weight: 700; }
h3 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); font-weight: 600; }
h4 { font-size: 1.15rem; font-weight: 600; }
h5 { font-size: 1rem; font-weight: 600; }
h6 { font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--gold-dark); }

p { margin: 0 0 1em; }
.lead { font-size: 1.15rem; line-height: 1.7; color: var(--text-main); }

.eyebrow {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 14px;
}

.eyebrow::before { content: "✦ "; color: var(--gold); }

.display-serif {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: -0.03em;
}

/* ==============================================================
   LAYOUT
   ============================================================== */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
}
.container-narrow { max-width: 820px; margin: 0 auto; padding: 0 28px; }

section { padding: var(--section-pad); position: relative; }
section.alt { background: var(--bg-warm); }
section.dark { background: var(--navy-dark); color: #E8ECF5; }
section.dark h1, section.dark h2, section.dark h3, section.dark h4 { color: #fff; }

.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto-320 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid-auto-260 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ==============================================================
   BUTTONS
   ============================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-main);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .01em;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all .25s cubic-bezier(.4,0,.2,1);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.btn-primary { background: var(--gold); color: #fff; box-shadow: var(--shadow-gold); }
.btn-primary:hover { background: var(--gold-dark); transform: translateY(-2px); box-shadow: 0 14px 38px rgba(180, 134, 47, 0.3); color: #fff; }

.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-dark); transform: translateY(-2px); color: #fff; }

.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }

.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-outline-light:hover { background: #fff; color: var(--navy); border-color: #fff; }

.btn-ghost { background: transparent; color: var(--navy); padding: 10px 6px; }
.btn-ghost:hover { color: var(--gold-dark); }
.btn-ghost .arrow { transition: transform .25s ease; }
.btn-ghost:hover .arrow { transform: translateX(6px); }

.btn-sm { padding: 9px 18px; font-size: .85rem; }
.btn-lg { padding: 17px 34px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ==============================================================
   CARDS
   ============================================================== */
.card {
  background: var(--bg-ivory);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-soft);
  transition: transform .3s ease, box-shadow .3s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.card-compact { padding: 22px; }
.card-clean { background: #fff; }

/* Feature card with image at top */
.card-media {
  background: var(--bg-ivory);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-soft);
  transition: transform .3s ease, box-shadow .3s ease;
  display: flex;
  flex-direction: column;
}
.card-media:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.card-media-img {
  aspect-ratio: 4 / 3;
  background: var(--bg-warm);
  overflow: hidden;
}
.card-media-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.card-media:hover .card-media-img img { transform: scale(1.05); }
.card-media-body { padding: 26px 28px 30px; flex: 1; display: flex; flex-direction: column; }
.card-media-body h3 { margin-bottom: 10px; }
.card-media-body p { color: var(--text-muted); margin-bottom: 18px; }
.card-date {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 10px;
}

/* ==============================================================
   FORMS
   ============================================================== */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.input, .textarea, .select {
  width: 100%;
  font-family: var(--font-main);
  font-size: .95rem;
  color: var(--navy-dark);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 162, 75, 0.15);
}
.textarea { min-height: 140px; resize: vertical; }

/* Inline subscribe (footer, hero) */
.subscribe-row {
  display: flex;
  gap: 8px;
  max-width: 460px;
}
.subscribe-row .input { flex: 1; border-radius: var(--radius-pill); padding-left: 22px; }
.subscribe-row .btn { flex-shrink: 0; }

/* Minimal underline form */
.form-clean .input {
  background: transparent;
  border: none;
  border-bottom: 1.5px solid var(--line);
  border-radius: 0;
  padding: 14px 0;
  font-size: 1rem;
}
.form-clean .input:focus {
  border-bottom-color: var(--gold);
  box-shadow: none;
}

/* ==============================================================
   NAVBAR
   ============================================================== */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 14px 0;
  background: rgba(251, 247, 239, .96);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 var(--line-soft);
  transition: padding .25s ease, box-shadow .25s ease;
}
.site-nav.scrolled {
  padding: 8px 0;
  box-shadow: 0 2px 14px rgba(27, 42, 78, .08);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 40px;
}

.nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-logo img, .nav-logo svg { height: 50px; width: auto; display: block; object-fit: contain; }
.nav-logo-word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -.01em;
  color: var(--navy);
  line-height: 1.15;
  white-space: nowrap;
}
.nav-logo-word span { display: block; font-size: .62rem; font-weight: 600; color: var(--gold-dark); letter-spacing: .06em; text-transform: uppercase; margin-top: 2px; line-height: 1.4; }
@media (max-width: 520px) {
  .nav-logo img, .nav-logo svg { height: 42px; }
  .nav-logo-word { font-size: .88rem; }
  .nav-logo-word span { font-size: .6rem; }
}

.nav-links {
  display: flex;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: .92rem;
  font-weight: 500;
  color: var(--navy);
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  transition: background .2s ease, color .2s ease;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { background: rgba(212, 162, 75, .14); color: var(--gold-dark); }

.nav-cta { display: flex; gap: 12px; align-items: center; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--navy);
}
.nav-toggle svg { width: 26px; height: 26px; }

/* Mobile panel: hidden entirely on desktop */
.nav-mobile-panel, .nav-backdrop { display: none; }

@media (max-width: 1300px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: block; }

  .nav-mobile-panel {
    display: block;
    position: fixed;
    top: 0; right: -100%;
    width: 86%;
    max-width: 360px;
    height: 100vh;
    background: var(--bg-ivory);
    z-index: 1100;
    padding: 80px 30px 30px;
    transition: right .35s cubic-bezier(.4,0,.2,1);
    box-shadow: -20px 0 60px rgba(0,0,0,.15);
    overflow-y: auto;
  }
  .nav-mobile-panel.open { right: 0; }
  .nav-mobile-panel .nav-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
  }
  .nav-mobile-panel .nav-links a { font-size: 1.15rem; padding: 14px 18px; display: block; color: var(--navy); }
  .nav-mobile-panel .btn { margin-top: 10px; width: 100%; display: block; }
  .nav-mobile-close {
    position: absolute; top: 22px; right: 22px;
    background: none; border: none; cursor: pointer;
    color: var(--navy); padding: 8px;
  }
  .nav-backdrop {
    display: block;
    position: fixed; inset: 0;
    background: rgba(15, 27, 53, .45);
    z-index: 1050; opacity: 0; visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
  }
  .nav-backdrop.open { opacity: 1; visibility: visible; }
}

/* ==============================================================
   HERO
   ============================================================== */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 100px;
  background: var(--navy-dark);
}
.hero-img, .hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(8,15,33,.92) 0%, rgba(8,15,33,.62) 30%, rgba(8,15,33,.22) 58%, rgba(8,15,33,.08) 100%),
    radial-gradient(ellipse at 18% 55%, rgba(212,162,75,.20) 0%, transparent 58%),
    linear-gradient(to right, rgba(8,15,33,.55) 0%, transparent 55%);
  z-index: 2;
}
.hero-inner {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 60px 28px;
  max-width: 860px;
}
.hero-inner .eyebrow { color: var(--gold-soft); }
.hero-inner h1 { color: #fff; margin-bottom: 20px; }
.hero-inner .lead { color: rgba(255,255,255,.88); font-size: 1.2rem; max-width: 620px; margin: 0 auto 38px; }

.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.hero-short {
  min-height: 55vh;
  padding-top: 140px;
  padding-bottom: 60px;
}
.hero-short .hero-inner .lead { margin-bottom: 10px; }

/* ==============================================================
   SECTION HEADERS
   ============================================================== */
.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 60px;
}
.section-head p { color: var(--text-muted); font-size: 1.08rem; }

.section-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 42px;
}

/* ==============================================================
   FOOTER
   ============================================================== */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,.7);
  padding: 80px 0 30px;
  margin-top: 80px;
}
.site-footer h6 {
  color: rgba(255,255,255,.4);
  font-size: .78rem;
  letter-spacing: .16em;
  margin-bottom: 22px;
}
.site-footer a {
  color: rgba(255,255,255,.78);
  display: block;
  padding: 5px 0;
  font-size: .95rem;
  transition: color .2s ease, transform .2s ease;
}
.site-footer a:hover { color: var(--gold); transform: translateX(4px); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
  gap: 50px;
  margin-bottom: 50px;
}
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 38px; }
  .footer-brand { grid-column: 1 / -1; }
}

.footer-logo-wrap {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  background: var(--bg-cream);
  border-radius: var(--radius);
  padding: 10px 16px 10px 10px;
  margin-bottom: 20px;
}
.footer-brand .footer-logo {
  height: 52px;
  width: auto;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}
.footer-logo-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .95rem;
  color: var(--navy-dark);
  line-height: 1.2;
  letter-spacing: -.01em;
}
.footer-logo-name span {
  display: block;
  font-size: .62rem;
  font-weight: 600;
  color: var(--gold-dark);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-top: 3px;
}
.footer-brand p { color: rgba(255,255,255,.55); max-width: 320px; font-size: .92rem; }

.footer-subscribe input {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  color: #fff;
}
.footer-subscribe input::placeholder { color: rgba(255,255,255,.4); }
.footer-subscribe input:focus { border-color: var(--gold); background: rgba(255,255,255,.1); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-size: .78rem;
  color: rgba(255,255,255,.35);
  letter-spacing: .04em;
}

.social-icons { display: flex; gap: 12px; margin-top: 18px; }
.social-icons a {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  padding: 0 !important;
  transition: background .2s ease, transform .2s ease;
}
.social-icons a:hover { background: var(--gold); transform: translateY(-3px); color: var(--navy-dark); }
.social-icons svg { width: 18px; height: 18px; }

/* ==============================================================
   UTILITIES
   ============================================================== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-gold { color: var(--gold-dark); }
.text-white { color: #fff; }

.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; } .mt-5 { margin-top: 56px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 36px; } .mb-5 { margin-bottom: 56px; }

.pill {
  display: inline-block;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .05em;
  background: var(--gold-soft);
  color: var(--gold-dark);
  text-transform: uppercase;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 60px 0;
}

.anchor-top { position: absolute; top: -80px; visibility: hidden; }

/* ==============================================================
   SCROLL REVEAL
   ============================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ==============================================================
   TOAST / NOTICE
   ============================================================== */
.notice {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: .9rem;
  margin-bottom: 18px;
}
.notice.info { background: rgba(212, 162, 75, .12); color: var(--gold-dark); border: 1px solid var(--gold-soft); }
.notice.success { background: rgba(34, 139, 95, .1); color: #156440; border: 1px solid rgba(34, 139, 95, .25); }
.notice.error { background: rgba(217, 69, 69, .08); color: #9b1c1c; border: 1px solid rgba(217, 69, 69, .22); }

/* ==============================================================
   HERO VARIANTS FOR INNER PAGES
   ============================================================== */
.page-hero {
  position: relative;
  padding: 160px 0 80px;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(212,162,75,.18) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 60%, rgba(27,42,78,.08) 0%, transparent 55%),
    var(--bg-cream);
  text-align: center;
  border-bottom: 1px solid var(--line-soft);
}
.page-hero h1 { margin-bottom: 16px; }
.page-hero p { color: var(--text-muted); max-width: 620px; margin: 0 auto; font-size: 1.1rem; }

/* ==============================================================
   ADMIN
   ============================================================== */
.admin-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.admin-sidebar {
  background: var(--navy-dark);
  color: rgba(255,255,255,.85);
  padding: 30px 22px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.admin-sidebar .brand { display: flex; gap: 10px; align-items: center; margin-bottom: 36px; }
.admin-sidebar .brand-text { color: #fff; font-weight: 700; font-size: 1rem; line-height: 1.1; }
.admin-sidebar .brand-text small { display: block; font-size: .68rem; color: var(--gold); letter-spacing: .15em; font-weight: 500; text-transform: uppercase; margin-top: 3px; }
.admin-sidebar nav a {
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,.7);
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: .92rem;
  margin-bottom: 4px;
  transition: background .18s ease, color .18s ease;
  cursor: pointer;
}
.admin-sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-sidebar nav a.active { background: var(--gold); color: var(--navy-dark); font-weight: 600; }
.admin-sidebar nav { flex: 1 1 auto; }
.admin-sidebar .logout {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.admin-sidebar .logout .btn {
  width: 100%;
  background: var(--gold);
  color: var(--navy-dark);
  border: none;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: background .2s ease, transform .1s ease;
}
.admin-sidebar .logout .btn:hover { background: var(--gold-dark); color: #fff; }
.admin-sidebar .logout .btn:active { transform: translateY(1px); }

.admin-main { padding: 40px 48px; background: var(--bg-cream); }
.admin-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 30px; padding-bottom: 22px; border-bottom: 1px solid var(--line-soft);
}
.admin-header h2 { margin-bottom: 4px; }
.admin-header p { color: var(--text-muted); margin: 0; font-size: .9rem; }

.admin-panel { display: none; }
.admin-panel.active { display: block; animation: fadeUp .35s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px);} to { opacity: 1; transform: translateY(0);} }

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.data-table th, .data-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line-soft); font-size: .92rem; }
.data-table th { background: var(--bg-warm); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--navy); font-weight: 600; }
.data-table tr:last-child td { border-bottom: none; }
.data-table .row-actions { display: flex; gap: 8px; }
.data-table button {
  background: none; border: 1px solid var(--line);
  padding: 6px 12px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: .8rem; color: var(--navy);
  font-family: var(--font-main);
}
.data-table button:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.data-table button.danger:hover { background: #b02020; border-color: #b02020; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; margin-bottom: 32px; }
.stat-card {
  background: #fff;
  padding: 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-soft);
}
.stat-card .num { font-size: 2.1rem; font-weight: 700; color: var(--navy); line-height: 1; margin-bottom: 4px; }
.stat-card .label { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold-dark); font-weight: 600; }

/* ── ADMIN MOBILE TOP BAR (hidden on desktop) ─────────────── */
.admin-mobile-bar { display: none; }

/* ── ADMIN SIDEBAR BACKDROP (hidden on desktop) ───────────── */
.admin-sidebar-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(8,15,33,.55);
  z-index: 250;
  opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.admin-sidebar-backdrop.open { opacity: 1; visibility: visible; }

@media (max-width: 860px) {
  /* Stack shell to single column, sidebar occupies no grid space */
  .admin-shell { grid-template-columns: 1fr; }
  .admin-shell > aside { grid-row: 1; }

  /* Sidebar becomes a slide-in drawer */
  .admin-sidebar {
    position: fixed;
    top: 0; left: -100%;
    width: 285px;
    height: 100vh;
    z-index: 300;
    padding: 28px 22px 22px;
    transition: left .3s cubic-bezier(.4,0,.2,1);
    box-shadow: 6px 0 30px rgba(0,0,0,.22);
    overflow-y: auto;
  }
  .admin-sidebar.open { left: 0; }
  .admin-sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 12px;
  }
  .admin-sidebar nav a { flex: none; min-width: unset; font-size: .97rem; padding: 13px 16px; }
  .admin-sidebar .logout { margin-top: auto; }

  /* Backdrop visible on mobile */
  .admin-sidebar-backdrop { display: block; }

  /* Mobile top bar */
  .admin-mobile-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--navy-dark);
    padding: 13px 16px;
    position: sticky;
    top: 0;
    z-index: 200;
  }
  .admin-mobile-bar .mob-brand { color: #fff; font-size: .95rem; font-weight: 700; flex: 1; line-height: 1.2; }
  .admin-mobile-bar .mob-brand small { display: block; font-size: .62rem; color: var(--gold); letter-spacing: .12em; text-transform: uppercase; }
  .admin-hamburger {
    background: none; border: none; cursor: pointer;
    color: #fff; padding: 6px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    transition: background .2s ease;
  }
  .admin-hamburger:hover { background: rgba(255,255,255,.1); }
  .admin-hamburger svg { width: 24px; height: 24px; display: block; }

  /* Main area padding — clamp width to viewport so nothing overflows */
  .admin-main {
    padding: 22px 16px;
    overflow-x: hidden;
    max-width: 100vw;
    min-width: 0;
    box-sizing: border-box;
  }

  /* Every panel is also clamped */
  .admin-panel { max-width: 100%; min-width: 0; overflow-x: hidden; }

  /* Header stack on small screens */
  .admin-header { flex-direction: column; align-items: flex-start; gap: 8px; }

  /* Tables: wrap in scroll container */
  .data-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    width: 100%;
    max-width: 100%;
  }
  .data-table th, .data-table td { white-space: nowrap; }

  /* Subscriber/query action rows */
  .admin-panel > div[style*="display:flex"],
  .admin-panel > div[style*="display: flex"] { flex-wrap: wrap; }

  /* Forms: single column */
  .admin-panel .grid-2 { grid-template-columns: 1fr; }

  /* Gallery stays 2-col on mobile */
  .gallery-upload-grid { grid-template-columns: repeat(2, 1fr); }

  /* Stats wrap nicely */
  .stat-grid { grid-template-columns: repeat(2, 1fr); }

  /* Prevent button overflow in rows */
  .admin-panel [style*="display:flex"] { flex-wrap: wrap; }

  /* Card inner padding */
  .admin-panel .card { padding: 20px 16px; }

  /* Responsive header actions */
  .admin-header > div:last-child { font-size: .8rem; }

  /* Queries list: email addresses can be long */
  #queries-list .card { word-break: break-word; overflow-wrap: anywhere; }
}

/* Very small screens (≤420px): tighter still */
@media (max-width: 420px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 16px 14px; }
  .stat-card .num { font-size: 1.7rem; }
  .admin-mobile-bar { padding: 11px 12px; }
  .admin-main { padding: 16px 10px; max-width: 100vw; }
}

/* ── ADMIN PHOTO PREVIEWS ──────────────────────────────────── */
.field-photo-preview {
  display: none;
  width: auto;
  max-width: 180px;
  height: 130px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  margin-top: 10px;
  border: 1.5px solid var(--line);
  background: var(--bg-warm);
  padding: 4px;
}
.photo-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.photo-upload-row .btn { flex-shrink: 0; }

/* ── PDF CHIP (admin newsletter form) ────────────────────── */
.pdf-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 10px;
  background: var(--gold-soft);
  border: 1.5px solid var(--gold);
  border-radius: var(--radius-pill);
  font-size: .78rem;
  font-weight: 600;
  color: var(--gold-dark);
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pdf-chip-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gold-dark);
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  margin-left: 2px;
  flex-shrink: 0;
}

/* ── PDF VIEWER (public newsletters modal) ───────────────── */
.nl-pdf-wrap {
  margin: 4px 0 22px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1.5px solid var(--line-soft);
  background: var(--bg-warm);
}
.nl-pdf-viewer {
  width: 100%;
  height: 72vh;
  min-height: 420px;
  border: none;
  display: block;
}
.nl-pdf-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 12px 16px;
  border-top: 1px solid var(--line-soft);
  flex-wrap: wrap;
}
@media (max-width: 600px) {
  .nl-pdf-viewer { height: 55vh; min-height: 320px; }
  .nl-pdf-actions { justify-content: stretch; }
  .nl-pdf-actions .btn { flex: 1; text-align: center; }
}

/* ── GALLERY UPLOAD SLOTS ─────────────────────────────────── */
.gallery-upload-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 8px;
}
@media (max-width: 860px) {
  .gallery-upload-grid { grid-template-columns: repeat(2, 1fr); }
}
.gallery-slot {
  aspect-ratio: 4 / 3;
  border: 2px dashed rgba(27,42,78,.18);
  border-radius: var(--radius);
  background: var(--bg-warm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow: hidden;
  position: relative;
  transition: border-color .2s ease, background .2s ease;
}
.gallery-slot:hover { border-color: var(--gold); background: var(--gold-soft); }
.gallery-slot.filled { border-style: solid; border-color: var(--line); background: transparent; }
.gallery-slot-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}
.gallery-slot.filled .gallery-slot-img { display: block; }
.gallery-slot-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: rgba(27,42,78,.28);
  font-size: .7rem;
  font-weight: 600;
  text-align: center;
  padding: 8px;
  pointer-events: none;
  line-height: 1.3;
}
.gallery-slot.filled .gallery-slot-placeholder { display: none; }
.gallery-slot .upload-btn {
  font-size: .75rem;
  padding: 5px 13px;
  position: relative;
  z-index: 2;
  pointer-events: all;
}
.gallery-slot.filled .upload-btn {
  position: absolute;
  bottom: 7px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,.88);
  color: var(--navy);
  border-color: transparent;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .2s ease;
  backdrop-filter: blur(6px);
}
.gallery-slot.filled:hover .upload-btn { opacity: 1; }

/* ── SITE IMAGE HERO PREVIEWS ─────────────────────────────── */
.site-img-preview {
  display: none;
  margin-top: 10px;
  height: 150px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--bg-warm);
  border: 1.5px solid var(--line);
  padding: 4px;
}

/* ── DISPLAY ORDER FIELD ──────────────────────────────────── */
.display-order-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.display-order-wrap .input { width: 90px; text-align: center; }
.display-order-hint {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: 5px;
}

/* ==============================================================
   MISC PAGE PIECES
   ============================================================== */

/* Staff grid */
.staff-card {
  text-align: center;
  background: var(--bg-ivory);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  border: 1px solid var(--line-soft);
  transition: transform .3s ease, box-shadow .3s ease;
}
.staff-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.staff-avatar {
  width: 160px; height: 180px;
  border-radius: var(--radius-lg);
  margin: 0 auto 20px;
  overflow: hidden;
  background: var(--bg-warm);
  border: 3px solid #fff;
  box-shadow: 0 8px 22px rgba(27,42,78,.12);
}
.staff-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.staff-name { font-size: 1.15rem; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.staff-role {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gold-dark);
  font-weight: 600;
  margin-bottom: 14px;
}
.staff-bio { font-size: .92rem; color: var(--text-muted); line-height: 1.6; }

/* Event card */
.event-card {
  display: flex;
  gap: 24px;
  background: var(--bg-ivory);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--line-soft);
  transition: box-shadow .3s ease, transform .3s ease;
  margin-bottom: 18px;
}
.event-card:hover { box-shadow: var(--shadow-md); transform: translateX(4px); }
.event-date-badge {
  flex-shrink: 0;
  width: 88px;
  background: var(--gold-soft);
  color: var(--gold-dark);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 14px 6px;
  text-align: center;
}
.event-date-badge .day { font-size: 2rem; font-weight: 800; line-height: 1; color: var(--navy); }
.event-date-badge .month { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; margin-top: 4px; }
.event-body { flex: 1; }
.event-body h3 { margin-bottom: 6px; font-size: 1.2rem; }
.event-body .meta { font-size: .82rem; color: var(--text-muted); margin-bottom: 10px; }
.event-body .meta span { margin-right: 18px; }
@media (max-width: 600px) {
  .event-card { flex-direction: column; gap: 16px; }
  .event-date-badge { width: auto; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 10px 16px; }
}

/* Progress timeline */
.timeline { position: relative; padding-left: 40px; }
.timeline::before {
  content: "";
  position: absolute;
  top: 8px; bottom: 8px; left: 12px;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold) 0%, var(--gold-soft) 100%);
}
.timeline-item { position: relative; margin-bottom: 44px; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -34px; top: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--bg-cream);
  box-shadow: 0 0 0 2px var(--gold);
}
.timeline-date {
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--gold-dark); margin-bottom: 6px;
}
.timeline-item h3 { font-size: 1.25rem; margin-bottom: 8px; }
.timeline-item p { color: var(--text-muted); margin-bottom: 14px; }
.timeline-img { border-radius: var(--radius); overflow: hidden; max-width: 540px; box-shadow: var(--shadow-sm); }
.timeline-img img { width: 100%; display: block; }

/* ── NEWSLETTER YEAR FILTER TABS ─────────────────────────── */
.nl-year-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.nl-year-tab {
  padding: 7px 20px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--line);
  background: none;
  font-family: var(--font-main);
  font-size: .86rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.nl-year-tab:hover { border-color: var(--gold); color: var(--gold-dark); }
.nl-year-tab.active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ── NEWSLETTER PREVIEW CARDS ────────────────────────────── */
.nl-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.nl-preview-card {
  display: flex;
  background: var(--bg-ivory);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--line-soft);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .22s ease, transform .22s ease;
  min-height: 160px;
}
.nl-preview-card:hover,
.nl-preview-card:focus-visible { box-shadow: var(--shadow-md); transform: translateY(-3px); outline: none; }

/* Thumbnail side — image OR date block */
.nl-preview-thumb {
  width: 190px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.nl-preview-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.nl-preview-thumb-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 24px 16px;
  background: linear-gradient(145deg, var(--navy) 0%, var(--navy-dark) 100%);
  gap: 4px;
}
.nl-thumb-month {
  font-size: .68rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .18em;
  text-align: center;
}
.nl-thumb-year {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  text-align: center;
}

/* Content side */
.nl-preview-content {
  flex: 1;
  padding: 26px 30px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.nl-preview-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.nl-preview-date {
  font-size: .76rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .1em;
}
.nl-preview-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy-dark);
  line-height: 1.3;
}
.nl-preview-summary {
  margin: 0;
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nl-preview-footer {
  margin-top: 6px;
}

/* Featured (first) card is slightly larger */
.nl-preview-card.nl-featured .nl-preview-thumb { width: 240px; }
.nl-preview-card.nl-featured .nl-thumb-year { font-size: 2.4rem; }
.nl-preview-card.nl-featured .nl-preview-title { font-size: 1.38rem; }
.nl-preview-card.nl-featured .nl-preview-content { padding: 30px 34px; }

/* Show-more button row */
.nl-show-more-wrap {
  text-align: center;
  margin-top: 32px;
}

/* Empty state */
.nl-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: .95rem;
}

/* Mobile */
@media (max-width: 620px) {
  .nl-preview-card,
  .nl-preview-card.nl-featured { flex-direction: column; min-height: auto; }
  .nl-preview-thumb,
  .nl-preview-card.nl-featured .nl-preview-thumb { width: 100%; height: 110px; }
  .nl-preview-thumb-date { flex-direction: row; gap: 10px; height: 110px; padding: 0 20px; }
  .nl-thumb-year { font-size: 1.6rem; }
  .nl-preview-content,
  .nl-preview-card.nl-featured .nl-preview-content { padding: 18px 20px; }
  .nl-preview-card.nl-featured .nl-preview-title { font-size: 1.2rem; }
}

/* Quote block */
.quote-block {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.45;
  color: var(--navy);
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 0;
  position: relative;
  letter-spacing: -.01em;
}
.quote-block::before {
  content: "\201C";
  font-family: Georgia, serif;
  font-size: 5rem;
  color: var(--gold);
  line-height: .5;
  position: absolute;
  top: 30px; left: 50%;
  transform: translateX(-50%);
  opacity: .35;
}
.quote-block + .quote-attr {
  text-align: center;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--gold-dark);
  font-weight: 600;
}

/* Donate / CTA block */
.cta-block {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 60%, var(--navy-deep) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 60px 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-block::before {
  content: "";
  position: absolute;
  top: -100px; right: -100px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,162,75,.25), transparent 70%);
}
.cta-block h2 { color: #fff; margin-bottom: 14px; position: relative; }
.cta-block p { color: rgba(255,255,255,.78); max-width: 620px; margin: 0 auto 28px; position: relative; }
.cta-block .btn { position: relative; }

/* Responsive page hero */
@media (max-width: 680px) {
  .page-hero { padding: 130px 0 60px; }
  section { padding: 70px 0; }
  .site-footer { padding: 60px 0 26px; }
  .card { padding: 24px; }
}
