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

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;
}

/* Navbar */
.main-navbar {
  background: var(--surface);
  border-bottom: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.main-navbar .navbar-brand {
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
}
.main-navbar .nav-link {
  color: var(--ink-soft);
  font-weight: 500;
}
.main-navbar .nav-link:hover { color: var(--brand-dark); }
.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; }

/* 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 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-search {
  max-width: 42rem;
  margin: 0 auto;
  background: #fff;
  border-radius: 999px;
  padding: .4rem;
  box-shadow: 0 20px 40px -12px rgba(0,0,0,.35);
}
.hero-search input {
  border: none;
  border-radius: 999px;
  padding: .7rem 1.3rem;
}
.hero-search input:focus { box-shadow: none; outline: none; }
.hero-search button {
  border-radius: 999px;
  font-weight: 600;
}
.hero-stats {
  margin-top: 2rem;
  display: flex;
  gap: 2.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-stats .stat-num {
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  display: block;
}
.hero-stats .stat-label {
  color: rgba(255,255,255,.8);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Category grid */
.category-card {
  display: block;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem 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%;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px -14px rgba(0,0,0,.18);
  color: var(--brand-dark);
}
.category-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;
}
.category-card .cat-count {
  color: var(--ink-soft);
  font-size: .82rem;
}

/* 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; }

/* Listing cards */
.listing-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);
  transition: transform .15s ease, box-shadow .15s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 5px;
}
.listing-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 32px -16px rgba(0,0,0,.2);
}
.listing-card .card-img-top {
  height: 150px;
  object-fit: cover;
  background: var(--brand-light);
  border-radius: calc(var(--radius) - 5px);
}
.listing-card .card-name-top {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1.25rem;
  border-radius: calc(var(--radius) - 5px);
}
.listing-card .card-name-top-text {
  color: #fff;
  font-weight: 700;
  font-size: .92rem;
  line-height: 1.3;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,.15);
}
.listing-card .card-body { flex: 1; display: flex; flex-direction: column; }
.listing-card .cat-badge {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--brand);
  background: var(--brand-light);
  border-radius: 999px;
  padding: .2rem .6rem;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  width: fit-content;
}
.listing-card .featured-badge {
  position: absolute;
  top: .75rem;
  right: .75rem;
  background: var(--accent);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: .25rem .55rem;
  border-radius: 999px;
}
.listing-card .card-title { margin: .6rem 0 .3rem; font-size: 1.05rem; }
.listing-card .card-text.summary {
  color: var(--ink-soft);
  font-size: .9rem;
  flex: 1;
}
.listing-card .meta-line {
  color: var(--ink-soft);
  font-size: .85rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-top: .3rem;
}

/* Filter bar */
.filter-bar {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  margin-bottom: 1.75rem;
}
.chip {
  border: 1px solid var(--chip-color, rgba(0,0,0,.12));
  background: #fff;
  border-radius: 999px;
  padding: .35rem .9rem;
  font-size: .85rem;
  font-weight: 500;
  color: var(--chip-color, var(--ink-soft));
  text-decoration: none;
  display: inline-block;
}
.chip.active, .chip:hover {
  background: var(--chip-color, var(--brand));
  border-color: var(--chip-color, var(--brand));
  color: #fff;
}

/* Listing detail page */
.listing-hero-img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--brand-light);
}
.detail-panel {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.detail-panel .list-group-item {
  border: none;
  padding: .6rem 0;
  display: flex;
  gap: .7rem;
}
.detail-panel .list-group-item i { color: var(--brand); margin-top: .15rem; }

/* 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; }

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef1ee;
    --ink-soft: #a9b3ac;
    --surface: #1c231f;
    --bg: #141915;
    --brand-light: #22332a;
  }
  .category-card, .listing-card, .filter-bar, .detail-panel, .form-card {
    border-color: rgba(255,255,255,.06);
  }
  .chip { background: #1c231f; border-color: rgba(255,255,255,.12); }
}
