/* =============================================================
   AFRICANPEDIA — Design System v1.0
   Single source of truth. Replaces: style.css, styles.css,
   dashboard.css, detail.css, list.css, form.css, base.css
   ============================================================= */

/* ── 1. DESIGN TOKENS ─────────────────────────────────────── */
:root {
  /* Pan-African Palette */
  --ap-green-deep:      #1B4332;
  --ap-green-mid:       #2D6A4F;
  --ap-green-light:     #40916C;
  --ap-green-pale:      #D8F3DC;
  --ap-terracotta:      #B83A2B;
  --ap-terracotta-dk:   #922E21;
  --ap-gold:            #C8860A;
  --ap-gold-lt:         #F4D03F;
  --ap-parchment:       #FAF7F0;
  --ap-parchment-dk:    #EDE0C8;
  --ap-charcoal:        #1C1C1E;
  --ap-muted:           #5C5C5C;
  --ap-border:          #D4C9B0;
  --ap-white:           #FFFFFF;

  /* Shadows */
  --ap-shadow:          0 2px 12px rgba(27,67,50,.10);
  --ap-shadow-hover:    0 6px 24px rgba(27,67,50,.18);
  --ap-shadow-cta:      0 4px 18px rgba(200,134,10,.40);
  --ap-shadow-cta-hover:0 6px 24px rgba(200,134,10,.50);

  /* Semantic aliases */
  --color-primary:           var(--ap-green-deep);
  --color-primary-hover:     var(--ap-green-mid);
  --color-accent:            var(--ap-terracotta);
  --color-accent-hover:      var(--ap-terracotta-dk);
  --color-highlight:         var(--ap-gold);
  --color-highlight-lt:      var(--ap-gold-lt);
  --color-bg:                var(--ap-parchment);
  --color-bg-alt:            var(--ap-parchment-dk);
  --color-surface:           var(--ap-white);
  --color-surface-dark:      var(--ap-green-deep);
  --color-text:              var(--ap-charcoal);
  --color-text-muted:        var(--ap-muted);
  --color-text-on-dark:      var(--ap-white);
  --color-text-on-dark-muted:rgba(255,255,255,.75);
  --color-border:            var(--ap-border);
  --color-rule:              rgba(255,255,255,.12);

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono:    ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

  /* Fluid type scale */
  --fs-display: clamp(2rem, 5vw, 3.8rem);
  --fs-section: clamp(1.5rem, 3vw, 2.2rem);
  --fs-lead:    clamp(1rem, 2vw, 1.3rem);
  --fs-h3:      1.5rem;
  --fs-h4:      1.25rem;
  --fs-h5:      1rem;
  --fs-body:    1rem;
  --fs-sm:      .9rem;
  --fs-xs:      .82rem;
  --fs-micro:   .72rem;

  /* Line heights */
  --lh-tight: 1.25;
  --lh-body:  1.7;

  /* Letter spacing */
  --ls-kicker:    .18em;
  --ls-uppercase: .04em;
  --ls-display:   -.02em;

  /* Spacing scale */
  --space-xs:  .25rem;
  --space-sm:  .5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2.5rem;
  --space-2xl: 4rem;

  /* Border radius */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   16px;
  --radius-pill: 50px;
  --radius-full: 50%;

  /* Transitions */
  --transition:      .2s ease;
  --transition-slow: .4s ease;
}

/* ── 2. GLOBAL RESET & BASE ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--ap-gold-lt);
  color: var(--ap-charcoal);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text);
}

.kicker {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--ls-kicker);
  color: var(--color-highlight-lt);
}

a {
  color: var(--ap-green-mid);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--ap-terracotta); }

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

/* ── 3. SKIP LINK (ACCESSIBILITY) ────────────────────────── */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--ap-gold);
  color: var(--ap-charcoal);
  padding: .5rem 1rem;
  font-weight: 600;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  z-index: 9999;
  transition: top .2s;
}
.skip-to-content:focus { top: 0; }

/* ── 4. NAVIGATION ───────────────────────────────────────── */
.navbar {
  background-color: var(--ap-green-deep) !important;
  border-bottom: 3px solid var(--ap-gold);
  padding: .75rem 0;
}

.navbar-brand {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ap-white) !important;
  letter-spacing: -.02em;
}
.navbar-brand span {
  color: var(--ap-gold-lt);
}
.navbar-brand:hover { color: var(--ap-parchment) !important; }

.nav-link {
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 500;
  color: rgba(255,255,255,.88) !important;
  padding: .45rem .85rem !important;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.nav-link:hover,
.nav-item.active .nav-link {
  background: rgba(255,255,255,.15);
  color: var(--ap-white) !important;
}

/* Dropdowns */
.dropdown-menu {
  background: var(--ap-green-deep);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-md);
  box-shadow: var(--ap-shadow);
  padding: .5rem;
  margin-top: .25rem;
}
.dropdown-item {
  color: rgba(255,255,255,.85);
  font-size: .9rem;
  border-radius: var(--radius-sm);
  padding: .45rem .9rem;
  transition: background var(--transition);
}
.dropdown-item:hover {
  background: rgba(255,255,255,.15);
  color: var(--ap-white);
}

/* Language switcher */
.lang-switcher select {
  background: transparent;
  border: 1px solid rgba(255,255,255,.4);
  color: rgba(255,255,255,.9);
  padding: .3rem .6rem;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  cursor: pointer;
}
.lang-switcher select option {
  background: var(--ap-green-deep);
  color: var(--ap-white);
}

/* Mobile hamburger */
.navbar-toggler {
  border: 1px solid rgba(255,255,255,.4);
  padding: .35rem .6rem;
}
.navbar-toggler-icon {
  filter: invert(1);
}

/* ── 5. HERO SECTION ─────────────────────────────────────── */
.hero-section {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--ap-white);
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(27,67,50,.82) 0%,
    rgba(15,25,30,.65) 100%
  );
}

.hero-section .hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding: 2rem;
}

.hero-section h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 700;
  color: var(--ap-white);
  text-shadow: 0 2px 16px rgba(0,0,0,.4);
  margin-bottom: 1rem;
}

.hero-section .lead {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: rgba(255,255,255,.9);
  margin-bottom: 2rem;
  font-weight: 400;
}

/* ── 6. BUTTONS ──────────────────────────────────────────── */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  letter-spacing: .02em;
}

.btn-primary {
  background: var(--ap-terracotta);
  border-color: var(--ap-terracotta);
  color: var(--ap-white);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--ap-terracotta-dk);
  border-color: var(--ap-terracotta-dk);
  color: var(--ap-white);
  box-shadow: 0 4px 14px rgba(184,58,43,.35);
}

.btn-outline-primary {
  border: 2px solid var(--ap-green-deep);
  color: var(--ap-green-deep);
  background: transparent;
}
.btn-outline-primary:hover {
  background: var(--ap-green-deep);
  color: var(--ap-white);
  border-color: var(--ap-green-deep);
}

.btn-outline-secondary {
  border: 2px solid var(--ap-border);
  color: var(--color-text-muted);
}
.btn-outline-secondary:hover {
  background: var(--ap-parchment-dk);
  color: var(--color-text);
  border-color: var(--ap-border);
}

.btn-gold {
  background: var(--ap-gold);
  border-color: var(--ap-gold);
  color: var(--ap-charcoal);
}
.btn-gold:hover {
  background: #a86e08;
  border-color: #a86e08;
  color: var(--ap-white);
}

/* Hero CTA */
.btn-hero {
  background: var(--ap-gold);
  border-color: var(--ap-gold);
  color: var(--ap-charcoal);
  padding: .85rem 2.2rem;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 50px;
  letter-spacing: .04em;
  text-transform: uppercase;
  box-shadow: 0 4px 18px rgba(200,134,10,.4);
}
.btn-hero:hover {
  background: #a86e08;
  border-color: #a86e08;
  color: var(--ap-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(200,134,10,.5);
}

/* ── 7. SECTION TITLES ───────────────────────────────────── */
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--ap-green-deep);
  margin-bottom: .5rem;
}

.section-title::after {
  content: '';
  display: block;
  width: 56px;
  height: 3px;
  background: var(--ap-gold);
  margin: .6rem auto 0;
  border-radius: 2px;
}

.section-title.text-start::after { margin-left: 0; }

.section-subtitle {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}

/* ── 8. CARDS ────────────────────────────────────────────── */
.card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--ap-white);
  box-shadow: var(--ap-shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ap-shadow-hover);
}

.card-img-top {
  object-fit: cover;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ap-green-deep);
}

/* Category cards (homepage sections) */
.category-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  display: block;
  text-decoration: none;
}
.category-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform .4s ease;
  display: block;
}
.category-card:hover img { transform: scale(1.06); }
.category-card .category-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(27,67,50,.88));
  color: var(--ap-white);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 2rem 1rem .9rem;
  text-align: center;
}
.category-card:hover .category-label { color: var(--ap-gold-lt); }

/* ── 9. SECTION BACKGROUNDS ──────────────────────────────── */
.bg-parchment { background-color: var(--ap-parchment) !important; }
.bg-parchment-dk { background-color: var(--ap-parchment-dk) !important; }
.bg-forest { background-color: var(--ap-green-deep) !important; }

section { position: relative; }

/* ── 10. FEATURES ROW (Homepage intro) ───────────────────── */
.feature-icon {
  width: 56px;
  height: 56px;
  background: var(--ap-green-pale);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.feature-icon img { width: 28px; }
.feature-icon i {
  font-size: 1.4rem;
  color: var(--ap-green-deep);
}

/* ── 11. CAROUSEL ────────────────────────────────────────── */
.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-color: rgba(27,67,50,.65);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  background-size: 55%;
}

/* ── 12. FORMS ───────────────────────────────────────────── */
.form-control {
  border-color: var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
  border-color: var(--ap-green-mid);
  box-shadow: 0 0 0 3px rgba(45,106,79,.18);
  outline: none;
}

/* Search bars */
.search-form .form-control {
  border-radius: 50px 0 0 50px;
  padding-left: 1.25rem;
}
.search-form .btn {
  border-radius: 0 50px 50px 0;
}

/* ── 13. PAGINATION ──────────────────────────────────────── */
.pagination .page-link {
  color: var(--ap-green-deep);
  border-color: var(--color-border);
  font-weight: 500;
  transition: all var(--transition);
}
.pagination .page-link:hover {
  background: var(--ap-green-deep);
  color: var(--ap-white);
  border-color: var(--ap-green-deep);
}
.pagination .page-item.active .page-link {
  background: var(--ap-terracotta);
  border-color: var(--ap-terracotta);
  color: var(--ap-white);
}

/* ── 14. BADGES & TAGS ───────────────────────────────────── */
.badge-region {
  background: var(--ap-green-pale);
  color: var(--ap-green-deep);
  font-size: .72rem;
  font-weight: 600;
  padding: .3em .7em;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge-era {
  background: var(--ap-parchment-dk);
  color: var(--ap-muted);
  font-size: .72rem;
  font-weight: 500;
  padding: .3em .7em;
  border-radius: 50px;
}

/* ── 15. FOOTER ──────────────────────────────────────────── */
.site-footer {
  background: var(--ap-charcoal);
  color: rgba(255,255,255,.75);
  padding: 3.5rem 0 1.5rem;
}

.site-footer h5 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ap-gold-lt);
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .4rem; }
.site-footer a {
  color: rgba(255,255,255,.65);
  font-size: .9rem;
  transition: color var(--transition);
}
.site-footer a:hover { color: var(--ap-gold-lt); }

.site-footer .footer-brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ap-white);
  display: block;
  margin-bottom: .5rem;
}

.site-footer hr {
  border-color: rgba(255,255,255,.12);
  margin: 2rem 0 1.5rem;
}

.site-footer .copyright {
  font-size: .82rem;
  color: rgba(255,255,255,.4);
  text-align: center;
}

/* ── 16. SCROLL-TO-TOP ───────────────────────────────────── */
#scrollUp {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--ap-green-deep);
  color: var(--ap-white);
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(27,67,50,.35);
  transition: background var(--transition), transform var(--transition);
  z-index: 1000;
  text-decoration: none;
}
#scrollUp:hover {
  background: var(--ap-terracotta);
  transform: translateY(-3px);
  color: var(--ap-white);
}

/* ── 17. JOIN COMMUNITY SECTION ──────────────────────────── */
.join-community {
  background: linear-gradient(135deg, var(--ap-green-deep) 0%, #0f2318 100%);
  color: var(--ap-white);
  text-align: center;
}
.join-community h2 {
  font-family: var(--font-heading);
  color: var(--ap-white);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}
.join-community p { color: rgba(255,255,255,.8); font-size: 1.05rem; }

/* ── 18. MAIN CONTENT SPACING ────────────────────────────── */
main { margin-bottom: 3rem; }

/* ── 19. UTILITY ─────────────────────────────────────────── */
.text-gold { color: var(--ap-gold) !important; }
.text-forest { color: var(--ap-green-deep) !important; }
.text-terracotta { color: var(--ap-terracotta) !important; }
.fw-heading { font-family: var(--font-heading); }

/* No-image placeholder */
.img-placeholder {
  background: linear-gradient(135deg, var(--ap-parchment-dk) 0%, var(--ap-border) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ap-muted);
  font-size: .85rem;
}

/* ── 20. RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 991px) {
  .navbar-collapse {
    background: var(--ap-green-deep);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-top: .5rem;
  }
  .dropdown-menu {
    background: rgba(255,255,255,.08);
    border: none;
    box-shadow: none;
  }
}

@media (max-width: 767px) {
  .hero-section { min-height: 70vh; }
  .section-title { font-size: 1.5rem; }
  .category-card img { height: 160px; }
}

/* ── 21. PRINT ───────────────────────────────────────────── */
@media print {
  .navbar, .site-footer, #scrollUp, .yt-card { display: none !important; }
  body { background: white; color: black; font-size: 12pt; }
  a { color: black; }
}

/* ── 22. BREADCRUMBS ─────────────────────────────────────── */
.breadcrumb-bar {
  background: var(--ap-parchment-dk);
  border-bottom: 1px solid var(--color-border);
  min-height: 0;
}
.breadcrumb-bar:empty { display: none; }
.breadcrumb {
  font-size: .82rem;
  padding: 0;
  margin: 0;
  background: transparent;
}
.breadcrumb-item a {
  color: var(--ap-green-mid);
  font-weight: 500;
}
.breadcrumb-item a:hover { color: var(--ap-terracotta); }
.breadcrumb-item.active { color: var(--ap-muted); }
.breadcrumb-item + .breadcrumb-item::before {
  color: var(--ap-muted);
  content: "›";
}

/* ── 23. NAVBAR SEARCH ───────────────────────────────────── */
.nav-search-wrap {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50px;
  overflow: hidden;
  transition: background .2s, border-color .2s;
}
.nav-search-wrap:focus-within {
  background: rgba(255,255,255,.22);
  border-color: rgba(255,255,255,.55);
}
.nav-search-input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: .85rem;
  padding: .35rem .9rem;
  width: 130px;
  transition: width .3s ease;
}
.nav-search-input::placeholder { color: rgba(255,255,255,.55); }
.nav-search-input:focus { width: 190px; }
.nav-search-btn {
  background: transparent;
  border: none;
  color: rgba(255,255,255,.75);
  padding: .35rem .75rem;
  cursor: pointer;
  font-size: .85rem;
  transition: color .2s;
}
.nav-search-btn:hover { color: var(--ap-gold-lt); }

@media (max-width: 991px) {
  .nav-search-wrap { width: 100%; border-radius: var(--radius-sm); }
  .nav-search-input { width: 100% !important; }
}

/* ── 24. DETAIL PAGES ────────────────────────────────────── */
.detail-photo {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  object-position: top;
  border-radius: var(--radius-md);
  box-shadow: var(--ap-shadow);
  display: block;
}

.detail-photo-placeholder {
  width: 100%;
  height: 280px;
  border-radius: var(--radius-md);
  box-shadow: var(--ap-shadow);
  background: var(--ap-green-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-photo-placeholder span {
  font-family: var(--font-heading);
  font-size: 4.5rem;
  color: var(--ap-gold-lt);
  font-weight: 700;
  line-height: 1;
}

.detail-hero-banner {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-md);
  box-shadow: var(--ap-shadow);
  display: block;
  margin-bottom: 1.5rem;
}

.fact-table { width: 100%; }
.fact-table dt {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--ls-kicker);
  color: var(--color-text-muted);
  font-weight: 600;
  padding-top: .7rem;
}
.fact-table dd {
  font-size: var(--fs-sm);
  color: var(--color-text);
  padding-bottom: .55rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 0;
  margin-left: 0;
}
.fact-table dd:last-child { border-bottom: none; }

.detail-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0 .5rem;
  border-top: 1px solid var(--color-border);
  margin-top: 2rem;
  gap: 1rem;
}
.detail-nav .btn {
  max-width: 44%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detail-section-title {
  font-family: var(--font-heading);
  font-size: var(--fs-h4);
  color: var(--color-text);
  border-left: 3px solid var(--ap-gold);
  padding-left: .75rem;
  margin: 1.5rem 0 .75rem;
}

/* ── 25. AUTOCOMPLETE DROPDOWN ───────────────────────────── */
.nav-autocomplete {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 320px;
  background: var(--ap-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--ap-shadow-hover);
  z-index: 1100;
  overflow: hidden;
}
.nav-autocomplete.open { display: block; }

.nav-autocomplete-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .55rem .9rem;
  text-decoration: none;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition);
}
.nav-autocomplete-item:last-child { border-bottom: none; }
.nav-autocomplete-item:hover { background: var(--ap-parchment); }

.nav-ac-thumb {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.nav-ac-initial {
  background: var(--ap-green-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ap-gold-lt);
  border-radius: var(--radius-sm);
}
.nav-ac-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.nav-ac-title {
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-text);
}
.nav-ac-meta {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 26. SEARCH FILTER PILLS ─────────────────────────────── */
.search-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--ap-white);
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1;
}
.search-filter-pill:hover {
  border-color: var(--ap-green-mid);
  color: var(--ap-green-deep);
}
.search-filter-pill.active {
  background: var(--ap-green-deep);
  border-color: var(--ap-green-deep);
  color: var(--ap-white);
}
.search-filter-count {
  background: rgba(0,0,0,.12);
  border-radius: 50px;
  padding: .1rem .45rem;
  font-size: .72rem;
  font-weight: 700;
}
.search-filter-pill.active .search-filter-count {
  background: rgba(255,255,255,.25);
}

@media (max-width: 575px) {
  .nav-autocomplete { min-width: calc(100vw - 2rem); right: -1rem; }
}

