:root {
  --brand: #4fa873;
  --brand-dark: #2f7a52;
  --brand-light: #eaf7ef;
  --accent: #3f8f5e;
  --ink: #333333;
  --ink-soft: #666666;
  --surface: #ffffff;
  --bg: #f7f8f6;
  --radius: 14px;
  --sidebar-w: 264px;
}

body {
  font-family: 'Open Sans', Arial, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

h1, h2, h3, h4, h5, .brand-font {
  font-family: 'Roboto Condensed', Arial, sans-serif;
  font-weight: 700;
}

/* ===== Layout shell ===== */
.site-shell {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}
.main-column {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.main-column > main {
  flex: 1 0 auto;
}

/* ===== Sidebar ===== */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid rgba(0,0,0,.08);
}
.sidebar .offcanvas-header { border-bottom: 1px solid rgba(0,0,0,.08); }
.sidebar-body {
  display: flex;
  flex-direction: column;
  padding: 1.75rem 1.25rem;
  height: 100%;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
  margin-bottom: 1.5rem;
}
.sidebar-brand:hover { color: var(--brand-dark); }

.sidebar-search { position: relative; margin-bottom: 1.5rem; }
.sidebar-search i {
  position: absolute;
  left: .85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-soft);
  font-size: .9rem;
}
.sidebar-search input {
  width: 100%;
  background: var(--bg);
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 999px;
  color: var(--ink);
  padding: .55rem .9rem .55rem 2.2rem;
  font-size: .88rem;
}
.sidebar-search input::placeholder { color: var(--ink-soft); }
.sidebar-search input:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand);
}

.sidebar-nav { flex: 1; display: flex; flex-direction: column; }
.sidebar-nav .nav-link {
  color: var(--ink-soft);
  font-weight: 500;
  padding: .6rem .75rem;
  border-radius: 8px;
  margin-bottom: .15rem;
}
.sidebar-nav .nav-link:hover { color: var(--brand-dark); background: var(--brand-light); }
.sidebar-nav .nav-link.active { color: var(--brand-dark); background: var(--brand-light); font-weight: 700; }
.sidebar-nav .btn-brand { border-radius: 10px; }

/* ===== Mobile top bar ===== */
.mobile-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  padding: .85rem 1.1rem;
  position: sticky;
  top: 0;
  z-index: 1030;
  border-bottom: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.mobile-brand { color: var(--ink); text-decoration: none; font-size: 1.05rem; display: flex; align-items: center; }
.mobile-toggle { color: var(--ink); font-size: 1.3rem; border: none; background: transparent; padding: .25rem .5rem; }

.btn-brand {
  background: var(--accent);
  border: none;
  color: #fff;
  font-weight: 600;
  border-radius: 999px;
  padding: .5rem 1.1rem;
}
.btn-brand:hover { background: #c07f24; color: #fff; }
.btn-cta-orange {
  background: #e8720c;
  border: none;
  color: #fff;
  font-weight: 600;
  border-radius: 999px;
  padding: .5rem 1.1rem;
}
.btn-cta-orange:hover { background: #c05f09; color: #fff; }

/* Hero */
.hero {
  position: relative;
  padding: 5.5rem 0 6.5rem;
  background-color: var(--brand-dark);
  background-image: linear-gradient(rgba(20,40,30,.72), rgba(20,40,30,.72)), var(--hero-img, none);
  background-size: cover;
  background-position: center;
  color: #fff;
  text-align: center;
}
.hero.hero-sm { padding: 2.25rem 0 2.75rem; }
.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: .75rem;
}
.hero p.lead {
  color: rgba(255,255,255,.9);
  max-width: 42rem;
  margin: 0 auto 2rem;
}
.hero-cta { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* Section headings */
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.section-heading a { font-weight: 600; text-decoration: none; }

/* Quick link cards (legacy, still used on some pages) */
.quick-card {
  display: block;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.75rem 1.25rem;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  border: 1px solid rgba(0,0,0,.05);
  transition: transform .15s ease, box-shadow .15s ease;
  height: 100%;
}
.quick-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px -14px rgba(0,0,0,.18);
  color: var(--brand-dark);
}
.quick-card .icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto .9rem;
  font-size: 1.4rem;
}

/* Photo tiles (homepage topic grid) */
.tile-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
@media (max-width: 992px) { .tile-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 576px) { .tile-grid { grid-template-columns: repeat(2, 1fr); } }

.photo-tile {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 190px;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(160deg, var(--tile-color-1, #2f6d4f), var(--tile-color-2, #1f4c37));
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  transition: transform .15s ease, box-shadow .15s ease;
}
.photo-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 32px -14px rgba(0,0,0,.35);
  color: #fff;
}
.photo-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 60%);
}
.photo-tile .tile-icon {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.6rem;
  opacity: .55;
}
.photo-tile .tile-label {
  position: relative;
  padding: 1rem;
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.25;
}

/* Post cards (news/events) */
.post-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.05);
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  height: 100%;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 18px 32px -16px rgba(0,0,0,.2); color: var(--ink); }
.post-card .card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.post-card .post-date {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--accent);
  margin-bottom: .5rem;
}
.post-card h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.post-card p { color: var(--ink-soft); font-size: .92rem; flex: 1; margin-bottom: 0; }
.event-date-badge {
  background: var(--brand-light);
  color: var(--brand-dark);
  border-radius: 10px;
  padding: .5rem .75rem;
  text-align: center;
  min-width: 62px;
  font-weight: 700;
  line-height: 1.1;
}
.event-date-badge .month { display: block; font-size: .65rem; text-transform: uppercase; letter-spacing: .04em; }
.event-date-badge .day { display: block; font-size: 1.3rem; }

/* Category listing groups (community/visit pages) */
.cat-group-heading { display: flex; align-items: center; gap: .6rem; margin: 2.5rem 0 1rem; }
.cat-group-heading .icon-wrap {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--brand-light); color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.mini-listing-card {
  background: var(--surface);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(0,0,0,.05);
}
.mini-listing-card h4 { font-size: .98rem; margin-bottom: .25rem; }
.mini-listing-card p { font-size: .85rem; color: var(--ink-soft); margin-bottom: .35rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini-listing-card .meta-line { font-size: .82rem; color: var(--ink-soft); display: flex; align-items: center; gap: .35rem; }

/* Content pages (about) */
.content-panel {
  background: var(--surface);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.content-panel h2 { margin-top: 2rem; }
.content-panel h2:first-child { margin-top: 0; }
.fact-strip { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 1.5rem 0; }
.fact-strip .fact { background: var(--brand-light); border-radius: 10px; padding: .9rem 1.3rem; }
.fact-strip .fact .num { font-family: 'Roboto Condensed', sans-serif; font-weight: 700; font-size: 1.3rem; color: var(--brand-dark); display: block; }
.fact-strip .fact .label { font-size: .78rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .03em; }

/* Forms */
.form-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

/* Footer */
.site-footer { background: var(--brand-dark); }
.footer-links a { color: rgba(255,255,255,.75); text-decoration: none; display: block; margin-bottom: .4rem; font-size: .92rem; }
.footer-links a:hover { color: #fff; }

/* Empty state */
.empty-state { text-align: center; padding: 3.5rem 1rem; color: var(--ink-soft); }
.empty-state i { font-size: 2.5rem; color: var(--brand); margin-bottom: 1rem; display: block; }

/* Events calendar */
.events-calendar-wrap {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  border: 1px solid rgba(0,0,0,.05);
  margin-bottom: 2.5rem;
  overflow: hidden;
}
.events-calendar-scroll {
  max-height: 480px;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
}
.cal-month { margin-bottom: 1.75rem; padding: .75rem; border-radius: 10px; }
.cal-month:last-child { margin-bottom: 0; }
.cal-month:nth-child(odd) { background: rgba(47,109,79,.06); }
.cal-month:nth-child(even) { background: rgba(224,168,50,.08); }
.cal-month-title { font-size: 1.05rem; margin-bottom: .75rem; }
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--ink-soft);
  margin-bottom: .35rem;
  text-align: center;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-day {
  height: 24px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: .68rem;
  color: var(--ink-soft);
  text-decoration: none;
  width: 100%;
  border: 0;
  background: none;
  font-family: inherit;
  padding: 0;
  gap: 3px;
}
.cal-day.empty { visibility: hidden; }
.cal-day.today { border: 1px solid var(--brand); font-weight: 700; color: var(--ink); }
.cal-day.has-event {
  background: #ffe600;
  color: #1f4c37;
  font-weight: 700;
  cursor: pointer;
}
.cal-day.has-event:hover { background: #f0d500; color: #1f4c37; }
.cal-day.has-event.today { border-color: var(--brand-dark); }
.cal-day-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; margin-top: 2px; }
.cal-legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: #ffe600; margin-right: 4px; vertical-align: middle; }

.popover { max-width: 260px; }
.cal-popover-event { font-size: .85rem; }
.cal-popover-event:not(:last-child) { margin-bottom: .6rem; padding-bottom: .6rem; border-bottom: 1px solid rgba(0,0,0,.08); }
.cal-popover-event a { color: var(--brand-dark); text-decoration: none; }
.cal-popover-event a:hover { text-decoration: underline; }

.event-row:target .post-card {
  box-shadow: 0 0 0 3px var(--brand);
}
.example-listing {
  border: 1px dashed rgba(0,0,0,.18);
  box-shadow: none;
  opacity: .85;
}
.annual-event-box {
  background: rgba(224,168,50,.12);
  border: 1px solid rgba(224,168,50,.4);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

/* Search results */
.search-result-item { padding: 1.1rem 0; border-bottom: 1px solid rgba(0,0,0,.06); }
.search-result-item:last-child { border-bottom: none; }
.search-result-item .result-type {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--accent);
}
.search-result-item h3 { font-size: 1.05rem; margin: .25rem 0 .35rem; }
.search-result-item h3 a { color: var(--ink); text-decoration: none; }
.search-result-item h3 a:hover { color: var(--brand); }
.search-result-item p { color: var(--ink-soft); margin-bottom: 0; font-size: .92rem; }

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef1ee;
    --ink-soft: #a9b3ac;
    --surface: #1c231f;
    --bg: #141915;
    --brand-light: #22332a;
  }
  .quick-card, .post-card, .mini-listing-card, .content-panel, .form-card {
    border-color: rgba(255,255,255,.06);
  }
}
