/* ==========================================================================
   GICC — components.css
   Buttons · Badges · Cards · Header/Nav · Footer · Forms · Tables · Misc
   ========================================================================== */

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  --btn-bg: var(--action-secondary);
  --btn-fg: var(--action-secondary-fg);
  --btn-bd: transparent;
  --btn-pad-y: 0.8125rem;
  --btn-pad-x: 1.5rem;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--btn-pad-y) var(--btn-pad-x);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  border: 1.5px solid var(--btn-bd);
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  cursor: pointer;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              background-color var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out);
}
.btn:hover { color: var(--btn-fg); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled='true'] {
  opacity: 0.5; pointer-events: none;
}

/* Sheen sweep on hover — subtle premium cue */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(115deg, transparent 30%,
              rgba(255, 255, 255, 0.28) 48%, transparent 66%);
  transform: translateX(-120%);
  transition: transform var(--dur-slow) var(--ease-out);
}
.btn:hover::after { transform: translateX(120%); }
@media (prefers-reduced-motion: reduce) { .btn::after { display: none; } }

/* --- Variants --- */
.btn--primary {
  --btn-bg: var(--action-primary);
  --btn-fg: var(--action-primary-fg);
  box-shadow: var(--sh-gold);
}
.btn--primary:hover {
  --btn-bg: var(--action-primary-hover);
  box-shadow: 0 14px 38px rgba(200, 145, 47, 0.38);
  transform: translateY(-2px);
}
.btn--primary:active { --btn-bg: var(--action-primary-active); transform: translateY(0); }

.btn--secondary {
  --btn-bg: var(--navy-850);
  --btn-fg: var(--white);
  box-shadow: var(--sh-sm);
}
.btn--secondary:hover { --btn-bg: var(--navy-700); transform: translateY(-2px); box-shadow: var(--sh-md); }

.btn--outline {
  --btn-bg: transparent;
  --btn-fg: var(--fg-strong);
  --btn-bd: var(--border-default);
}
.btn--outline:hover {
  --btn-bd: var(--navy-850);
  --btn-bg: var(--navy-850);
  --btn-fg: var(--white);
  transform: translateY(-2px);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--fg-strong);
  --btn-bd: transparent;
  --btn-pad-x: 1rem;
}
.btn--ghost:hover { --btn-bg: var(--ink-100); }
.on-dark .btn--ghost:hover { --btn-bg: rgba(255, 255, 255, 0.1); }

/* On dark surfaces */
.on-dark .btn--outline {
  --btn-fg: var(--white);
  --btn-bd: rgba(255, 255, 255, 0.34);
}
.on-dark .btn--outline:hover {
  --btn-bg: var(--white);
  --btn-fg: var(--navy-950);
  --btn-bd: var(--white);
}

/* --- Sizes --- */
.btn--sm { --btn-pad-y: 0.5rem; --btn-pad-x: 1rem; font-size: var(--fs-xs); }
.btn--lg { --btn-pad-y: 1.0625rem; --btn-pad-x: 2.125rem; font-size: var(--fs-base); }
.btn--block { display: flex; width: 100%; }

/* Icon-only and icon+label buttons: give inline SVGs a definite box so they
   never collapse inside a flex button. */
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--sm svg { width: 16px; height: 16px; }
.btn--icon { --btn-pad-x: 0; width: 44px; flex: none; }
.btn--sm.btn--icon { width: 38px; }

/* Arrow that nudges on hover */
.btn__arrow {
  display: inline-block;
  transition: transform var(--dur-base) var(--ease-out);
  flex: none;
}
.btn:hover .btn__arrow { transform: translateX(4px); }

/* Text link with arrow — used for "read more" affordances */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  letter-spacing: 0.01em;
  color: var(--navy-700);
  text-decoration: none;
}
.link-arrow svg, .link-arrow .btn__arrow { transition: transform var(--dur-base) var(--ease-out); }
.link-arrow:hover { color: var(--gold-700); }
.link-arrow:hover svg, .link-arrow:hover .btn__arrow { transform: translateX(4px); }
.on-dark .link-arrow { color: var(--gold-300); }

/* ==========================================================================
   BADGES / PILLS / TAGS
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.3125rem 0.75rem;
  font-family: var(--font-display);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  line-height: 1.3;
  border-radius: var(--r-pill);
  background: var(--navy-100);
  color: var(--navy-800);
  white-space: nowrap;
}
.badge--gold    { background: var(--gold-100); color: var(--gold-900); }
.badge--success { background: var(--success-100); color: var(--success-700); }
.badge--warning { background: var(--warning-100); color: var(--warning-700); }
.badge--danger  { background: var(--danger-100); color: var(--danger-700); }
.badge--info    { background: var(--info-100); color: var(--info-700); }
.badge--solid   { background: var(--navy-850); color: var(--white); }
.badge--ghana   { background: rgba(206, 17, 38, 0.1); color: #a30d1e; }
.badge--india   { background: rgba(255, 153, 51, 0.16); color: #a85c05; }
.badge--outline { background: transparent; border: 1px solid var(--border-default); color: var(--fg-muted); }
.on-dark .badge { background: rgba(255, 255, 255, 0.1); color: var(--fg-onDark); }
.on-dark .badge--gold { background: rgba(200, 145, 47, 0.2); color: var(--gold-300); }

/* Verified member badge — ties to Spec §19 verification system */
.badge--verified {
  background: var(--success-100);
  color: var(--success-700);
}
.badge--verified::before {
  content: '';
  width: 12px; height: 12px;
  flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Country chip with flag swatch */
.chip-country {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--fg-muted);
}
.chip-country::before {
  content: '';
  width: 18px; height: 12px;
  border-radius: 2px;
  flex: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}
.chip-country[data-country='ghana']::before {
  background: linear-gradient(var(--gh-red) 33.3%, var(--gh-gold) 33.3% 66.6%, var(--gh-green) 66.6%);
}
.chip-country[data-country='india']::before {
  background: linear-gradient(var(--in-saffron) 33.3%, var(--in-white) 33.3% 66.6%, var(--in-green) 66.6%);
}

/* Tag list */
.tags { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.tag {
  padding: 0.25rem 0.625rem;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
  border-radius: var(--r-xs);
  background: var(--ink-100);
  color: var(--fg-muted);
  text-decoration: none;
}
a.tag:hover { background: var(--navy-100); color: var(--navy-800); }

/* ==========================================================================
   CARDS
   ========================================================================== */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
}
.card--hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-lg);
  border-color: var(--border-strong);
}
.card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--navy-100);
}
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slower) var(--ease-out);
}
.card--hover:hover .card__media img { transform: scale(1.055); }
.card__media--tall { aspect-ratio: 3 / 4; }
.card__media--square { aspect-ratio: 1; }

.card__body {
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  flex: 1;
}
.card__body--tight { padding: var(--sp-5); }
.card__title {
  font-size: var(--fs-lg);
  line-height: var(--lh-snug);
  font-weight: var(--fw-bold);
  color: var(--fg-strong);
}
.card__title a { color: inherit; text-decoration: none; }
.card__title a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.card__text { font-size: var(--fs-sm); color: var(--fg-muted); line-height: var(--lh-normal); }
.card__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--fg-subtle);
}
.card__meta > * + *::before { content: '·'; margin-right: var(--sp-2); opacity: 0.6; }
.card__footer {
  margin-top: auto;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
}

/* Line clamping */
.clamp-1, .clamp-2, .clamp-3, .clamp-4 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.clamp-1 { -webkit-line-clamp: 1; line-clamp: 1; }
.clamp-2 { -webkit-line-clamp: 2; line-clamp: 2; }
.clamp-3 { -webkit-line-clamp: 3; line-clamp: 3; }
.clamp-4 { -webkit-line-clamp: 4; line-clamp: 4; }

/* Feature card — icon + title + text, no image */
.card-feature {
  position: relative;
  padding: var(--sp-8);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
}
.card-feature::before {
  content: '';
  position: absolute;
  inset: auto auto 0 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--gold-600), var(--gold-300));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-slow) var(--ease-out);
}
.card-feature:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); border-color: var(--border-strong); }
.card-feature:hover::before { transform: scaleX(1); }
.card-feature__icon {
  display: grid;
  place-items: center;
  width: 54px; height: 54px;
  border-radius: var(--r-md);
  background: linear-gradient(145deg, var(--navy-850), var(--navy-700));
  color: var(--gold-400);
  margin-bottom: var(--sp-5);
  box-shadow: var(--sh-sm), var(--sh-inset-top);
  transition: transform var(--dur-base) var(--ease-spring);
}
.card-feature:hover .card-feature__icon { transform: scale(1.08) rotate(-4deg); }
.card-feature__icon svg { width: 26px; height: 26px; }
.card-feature__title { font-size: var(--fs-lg); margin-bottom: var(--sp-3); }
.card-feature__text { font-size: var(--fs-sm); color: var(--fg-muted); line-height: var(--lh-normal); }
.card-feature__list {
  margin-top: var(--sp-4);
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--fg-muted);
}
.card-feature__list li {
  position: relative;
  padding-left: var(--sp-6);
}
.card-feature__list li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.55em;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--gold-500);
  transform: rotate(45deg);
}

.on-dark .card,
.on-dark .card-feature {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}
.on-dark .card--hover:hover,
.on-dark .card-feature:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
}

/* ==========================================================================
   STAT TILE (Spec §5 — admin-driven live statistics)
   ========================================================================== */
.stat {
  position: relative;
  padding: var(--sp-7) var(--sp-6);
  border-radius: var(--r-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  text-align: center;
  overflow: hidden;
}
.stat::after {
  content: '';
  position: absolute;
  inset: 0 auto auto 50%;
  transform: translateX(-50%);
  width: 46px; height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--gold-500);
}
.stat__value {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-extra);
  letter-spacing: var(--ls-tighter);
  line-height: 1;
  color: var(--fg-strong);
  font-variant-numeric: tabular-nums;
}
.stat__suffix { color: var(--gold-600); }
.stat__label {
  display: block;
  margin-top: var(--sp-3);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--fg-subtle);
}
.on-dark .stat {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}
.on-dark .stat__value { color: var(--white); }
.on-dark .stat__suffix { color: var(--gold-400); }

/* ==========================================================================
   SITE HEADER + NAVIGATION
   ========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-header);
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  transition: height var(--dur-base) var(--ease-out),
              background-color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
  border-bottom: 1px solid transparent;
}
/* Transparent-over-hero state */
.site-header--overlay { color: var(--white); }
.site-header--overlay .nav__link { color: rgba(255, 255, 255, 0.88); }
.site-header--overlay .brand__name { color: var(--white); }
.site-header--overlay .brand__tag { color: rgba(255, 255, 255, 0.6); }
.site-header--overlay .nav-toggle__bar { background: var(--white); }

/* Scrolled / solid state */
.site-header--solid,
.site-header.is-stuck {
  height: var(--header-h-sticky);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--border-subtle);
  box-shadow: var(--sh-sm);
  color: var(--fg-default);
}
.site-header--solid .nav__link,
.site-header.is-stuck .nav__link { color: var(--fg-default); }
.site-header--solid .brand__name,
.site-header.is-stuck .brand__name { color: var(--navy-950); }
.site-header--solid .brand__tag,
.site-header.is-stuck .brand__tag { color: var(--fg-subtle); }
.site-header--solid .nav-toggle__bar,
.site-header.is-stuck .nav-toggle__bar { background: var(--navy-950); }

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  width: 100%;
  min-width: 0;
}
/* The IA has nine top-level items (Spec §3) plus a persistent CTA, so the
   header needs the wide container and tight nav metrics to fit at 1280–1440
   without overflowing. Below 1120px it collapses to the drawer. */
.site-header .container { max-width: var(--container-wide); }

/* --- Brand --- */
.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  flex: none;
}
.brand__mark {
  width: 46px; height: 46px;
  flex: none;
  border-radius: var(--r-sm);
  object-fit: contain;
  transition: transform var(--dur-base) var(--ease-spring);
}
.brand:hover .brand__mark { transform: scale(1.06); }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: var(--fw-extra);
  letter-spacing: var(--ls-tight);
  color: var(--navy-950);
  white-space: nowrap;
}
.brand__tag {
  font-size: 0.625rem;
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--fg-subtle);
  white-space: nowrap;
  margin-top: 2px;
}

/* --- Primary nav --- */
.nav { margin-left: auto; min-width: 0; }
.nav__list {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0; padding: 0;
}
.nav__item { position: relative; }
.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.625rem clamp(0.4rem, 0.7vw, 0.75rem);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.005em;
  color: var(--fg-default);
  text-decoration: none;
  border-radius: var(--r-sm);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out);
}
.nav__link:hover,
.nav__item.is-open > .nav__link { color: var(--gold-600); }
.nav__link[aria-current='page'] { color: var(--gold-600); }
.nav__link[aria-current='page']::after {
  content: '';
  position: absolute;
  left: 0.5rem; right: 0.5rem;
  bottom: 0.25rem;
  height: 2px;
  border-radius: 2px;
  background: var(--gold-600);
}
.nav__caret {
  width: 9px; height: 9px;
  flex: none;
  transition: transform var(--dur-base) var(--ease-out);
  opacity: 0.65;
}
.nav__item.is-open .nav__caret { transform: rotate(180deg); }

/* --- Dropdown --- */
.nav__panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translate(-50%, 8px);
  min-width: 250px;
  padding: var(--sp-3);
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xl);
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out),
              visibility var(--dur-base);
  z-index: var(--z-dropdown);
}
.nav__item.is-open > .nav__panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.nav__panel::before {
  content: '';
  position: absolute;
  top: -6px; left: 50%;
  width: 12px; height: 12px;
  transform: translateX(-50%) rotate(45deg);
  background: var(--white);
  border-left: 1px solid var(--border-subtle);
  border-top: 1px solid var(--border-subtle);
  border-radius: 2px 0 0 0;
}
.nav__panel a {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 0.5625rem var(--sp-3);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--fg-default);
  text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              padding-left var(--dur-fast) var(--ease-out);
}
.nav__panel a:hover {
  background: var(--navy-050);
  color: var(--navy-850);
  padding-left: var(--sp-4);
}
.nav__panel a::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold-500);
  flex: none;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
}
.nav__panel a:hover::before { opacity: 1; }

/* Header actions */
.header-actions { display: flex; align-items: center; gap: var(--sp-3); flex: none; }

/* Mobile toggle */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  flex: none;
  border-radius: var(--r-sm);
  position: relative;
}
.nav-toggle__bar {
  position: absolute;
  left: 11px;
  width: 22px; height: 2px;
  border-radius: 2px;
  background: var(--navy-950);
  transition: transform var(--dur-base) var(--ease-out),
              opacity var(--dur-fast) var(--ease-out),
              width var(--dur-base) var(--ease-out);
}
.nav-toggle__bar:nth-child(1) { top: 15px; }
.nav-toggle__bar:nth-child(2) { top: 21px; width: 16px; }
.nav-toggle__bar:nth-child(3) { top: 27px; }
.nav-toggle[aria-expanded='true'] .nav-toggle__bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded='true'] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded='true'] .nav-toggle__bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* --- Mobile drawer --- */
@media (max-width: 1120px) {
  .nav-toggle { display: block; }
  .header-actions .btn--nav { --btn-pad-x: 0.875rem; font-size: var(--fs-2xs); }

  .nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: 84px; /* Default header height */
    margin: 0;
    background: var(--navy-950);
    padding: var(--sp-6) var(--gutter) var(--sp-16);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform var(--dur-slow) var(--ease-out), visibility var(--dur-slow);
    z-index: var(--z-overlay);
    height: calc(100vh - 84px); /* Full viewport height minus header */
  }
  
  .nav.is-open {
    transform: translateX(0);
    visibility: visible;
  }

  /* Force nav to adjust when header is sticky */
  .site-header.is-stuck .nav,
  .site-header--solid .nav {
    top: 68px;
    height: calc(100vh - 68px);
  }

  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__item { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
  .nav__link {
    width: 100%;
    justify-content: space-between;
    padding: var(--sp-4) 0;
    font-size: var(--fs-md);
    font-weight: var(--fw-bold);
    color: rgba(255, 255, 255, 0.92) !important;
    border-radius: 0;
  }
  .nav__link[aria-current='page'] { color: var(--gold-400) !important; }
  .nav__link[aria-current='page']::after { display: none; }
  .nav__caret { width: 12px; height: 12px; }

  .nav__panel {
    position: static;
    transform: none;
    min-width: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0 0 var(--sp-4) var(--sp-4);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    display: none;
  }
  .nav__panel::before { display: none; }
  .nav__item.is-open > .nav__panel { display: block; transform: none; }
  .nav__panel a { color: rgba(255, 255, 255, 0.7); padding: var(--sp-2) var(--sp-2); }
  .nav__panel a:hover { background: rgba(255, 255, 255, 0.08); color: var(--white); }

  .nav__mobile-cta { margin-top: var(--sp-8); display: grid; gap: var(--sp-3); }
}

@media (min-width: 1121px) { .nav__mobile-cta { display: none; } }

/* Below ~380px the brand lock-up needs the room back. */
@media (max-width: 380px) {
  .header-actions .btn--nav { display: none; }
  .brand__tag { display: none; }
}

body.is-nav-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}
/* ==========================================================================
   SITE FOOTER
   ========================================================================== */
.site-footer {
  background: var(--navy-950);
  color: var(--fg-onDark);
  padding-top: var(--sp-20);
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg,
    var(--gh-red) 0%, var(--gh-gold) 20%, var(--gh-green) 40%,
    var(--in-saffron) 60%, var(--in-white) 80%, var(--in-green) 100%);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: var(--sp-10);
  padding-bottom: var(--sp-16);
}
@media (max-width: 980px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-8); } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-col__title {
  font-family: var(--font-display);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: var(--sp-5);
}
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-3); }
.footer-links a {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.64);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out), padding-left var(--dur-fast) var(--ease-out);
}
.footer-links a:hover { color: var(--white); padding-left: 4px; }

.footer-brand__logo { width: 60px; height: 60px; margin-bottom: var(--sp-5); }
.footer-brand__text { font-size: var(--fs-sm); color: rgba(255, 255, 255, 0.6); line-height: var(--lh-relaxed); max-width: 38ch; }

/* Despite the name, this list is also used on the Contact and Secretariat
   pages, which sit on WHITE. Hardcoding rgba(255,255,255,…) here made the
   address, email, phone and opening hours invisible on all three. Using the
   palette tokens instead lets `.on-dark` (which the footer carries) flip them
   automatically — the mechanism tokens.css already provides. */
.footer-contact { list-style: none; padding: 0; margin: var(--sp-6) 0 0; display: grid; gap: var(--sp-3); }
.footer-contact li { display: flex; gap: var(--sp-3); font-size: var(--fs-sm); color: var(--fg-muted); }
.footer-contact svg { width: 17px; height: 17px; flex: none; margin-top: 3px; color: var(--fg-accent, var(--gold-500)); }
.footer-contact a { color: inherit; text-decoration: none; }
.footer-contact a:hover { color: var(--fg-strong); text-decoration: underline; }

.social { display: flex; gap: var(--sp-2); margin-top: var(--sp-6); }
/* Same story as .footer-contact: on a white page a translucent-white pill with
   white glyphs is an invisible button. Tokens make it correct on both grounds. */
.social a {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--ink-100);
  color: var(--fg-muted);
  border: 1px solid var(--border-subtle);
  transition: background-color var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-spring);
}
.social a:hover { background: var(--gold-600); color: var(--navy-950); border-color: var(--gold-600); transform: translateY(-3px); }

/* The footer is the dark ground this component was originally written for. */
.on-dark .social a {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  border-color: rgba(255, 255, 255, 0.12);
}
.on-dark .social a:hover { background: var(--gold-600); color: var(--navy-950); border-color: var(--gold-600); }
.social svg { width: 17px; height: 17px; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-block: var(--sp-6);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.45);
}
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: var(--sp-5); }
.footer-bottom a { color: inherit; text-decoration: none; }
.footer-bottom a:hover { color: var(--white); }

/* Newsletter inline form */
.newsletter { margin-top: var(--sp-6); }
.newsletter__row { display: flex; gap: var(--sp-2); align-items: stretch; }
.newsletter__row .field-input { min-width: 0; }
.newsletter__row .field-input {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--white);
}
.newsletter__row .field-input::placeholder { color: rgba(255, 255, 255, 0.4); }

/* ==========================================================================
   FORMS
   ========================================================================== */
.field { display: grid; gap: var(--sp-2); }
.field__label {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--fg-muted);
}
.field__label .req { color: var(--danger-600); margin-left: 2px; }
.field__hint { font-size: var(--fs-xs); color: var(--fg-subtle); }
.field__error { font-size: var(--fs-xs); color: var(--danger-700); font-weight: var(--fw-medium); }

.field-input,
.field-select,
.field-textarea {
  width: 100%;
  padding: 0.8125rem var(--sp-4);
  font-size: var(--fs-sm);
  font-family: var(--font-body);
  color: var(--fg-strong);
  background: var(--white);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--r-sm);
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out);
  -webkit-appearance: none;
  appearance: none;
}
.field-input::placeholder, .field-textarea::placeholder { color: var(--ink-400); }
.field-input:hover, .field-select:hover, .field-textarea:hover { border-color: var(--border-default); }
.field-input:focus, .field-select:focus, .field-textarea:focus {
  outline: none;
  border-color: var(--navy-600);
  box-shadow: 0 0 0 4px rgba(35, 90, 140, 0.13);
}
.field-input[aria-invalid='true'],
.field-select[aria-invalid='true'],
.field-textarea[aria-invalid='true'] {
  border-color: var(--danger-600);
  box-shadow: 0 0 0 4px rgba(200, 56, 76, 0.12);
}
.field-textarea { min-height: 140px; resize: vertical; line-height: var(--lh-normal); }

.field-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%234c5b6b' d='M6 8.5 1.5 4h9z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--sp-4) center;
  background-size: 11px;
  padding-right: var(--sp-10);
  cursor: pointer;
}

/* Search input with leading icon */
.field-search { position: relative; }
.field-search .field-input { padding-left: var(--sp-12); }
.field-search__icon {
  position: absolute;
  left: var(--sp-4); top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--ink-400);
  pointer-events: none;
}
.field-search--lg .field-input {
  padding: var(--sp-5) var(--sp-5) var(--sp-5) var(--sp-14);
  font-size: var(--fs-md);
  border-radius: var(--r-pill);
  box-shadow: var(--sh-md);
  border-color: transparent;
}
.field-search--lg .field-search__icon { left: var(--sp-6); width: 22px; height: 22px; }

/* Checkbox / radio */
.choice { display: flex; align-items: flex-start; gap: var(--sp-3); cursor: pointer; font-size: var(--fs-sm); }
.choice input {
  appearance: none; -webkit-appearance: none;
  width: 20px; height: 20px; flex: none; margin-top: 1px;
  border: 1.5px solid var(--border-default);
  border-radius: var(--r-xs);
  background: var(--white);
  cursor: pointer;
  display: grid; place-content: center;
  transition: background-color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.choice input[type='radio'] { border-radius: 50%; }
.choice input::before {
  content: '';
  width: 11px; height: 11px;
  transform: scale(0);
  transition: transform var(--dur-fast) var(--ease-spring);
  background: var(--white);
  clip-path: polygon(14% 44%, 0 65%, 40% 100%, 100% 16%, 82% 0, 38% 65%);
}
.choice input[type='radio']::before { clip-path: none; border-radius: 50%; width: 8px; height: 8px; }
.choice input:checked { background: var(--navy-850); border-color: var(--navy-850); }
.choice input:checked::before { transform: scale(1); }

/* Filter pill group (directory / opportunities) */
.filter-pills { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.filter-pill {
  padding: 0.5rem 1rem;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  border-radius: var(--r-pill);
  border: 1.5px solid var(--border-subtle);
  background: var(--white);
  color: var(--fg-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--dur-fast) var(--ease-out);
}
.filter-pill:hover { border-color: var(--navy-400); color: var(--navy-800); }
.filter-pill.is-active,
.filter-pill[aria-pressed='true'] {
  background: var(--navy-850);
  border-color: var(--navy-850);
  color: var(--white);
}

/* Form layout helpers */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5); }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } .form-grid .span-2 { grid-column: auto; } }

.fieldset {
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: var(--sp-8);
  background: var(--white);
}
.fieldset + .fieldset { margin-top: var(--sp-6); }
.fieldset__legend {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: var(--fg-strong);
  padding: 0 var(--sp-3);
  margin-left: calc(var(--sp-3) * -1);
}

/* ==========================================================================
   ALERTS
   ========================================================================== */
.alert {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-md);
  border-left: 4px solid;
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
}
.alert--success { background: var(--success-100); border-color: var(--success-600); color: var(--success-700); }
.alert--warning { background: var(--warning-100); border-color: var(--warning-600); color: var(--warning-700); }
.alert--danger  { background: var(--danger-100);  border-color: var(--danger-600);  color: var(--danger-700); }
.alert--info    { background: var(--info-100);    border-color: var(--info-600);    color: var(--info-700); }
.alert svg { width: 19px; height: 19px; flex: none; margin-top: 1px; }

/* ==========================================================================
   BREADCRUMBS (Spec §21 — BreadcrumbList schema pairs with this)
   ========================================================================== */
.breadcrumbs { font-size: var(--fs-xs); color: var(--fg-subtle); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: var(--sp-2); list-style: none; padding: 0; margin: 0; }
.breadcrumbs li { display: flex; align-items: center; gap: var(--sp-2); }
.breadcrumbs li + li::before { content: '/'; opacity: 0.5; }
.breadcrumbs a { color: inherit; text-decoration: none; }
.breadcrumbs a:hover { color: var(--gold-700); }
.breadcrumbs [aria-current='page'] { color: var(--fg-default); font-weight: var(--fw-medium); }
.on-dark .breadcrumbs { color: rgba(255, 255, 255, 0.55); }
.on-dark .breadcrumbs [aria-current='page'] { color: var(--white); }

/* ==========================================================================
   PAGINATION (Spec §23 — required for directory / news / events)
   ========================================================================== */
.pagination { display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: center; margin-top: var(--sp-12); }
.pagination a, .pagination span {
  display: grid; place-items: center;
  min-width: 42px; height: 42px;
  padding-inline: var(--sp-3);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  border-radius: var(--r-sm);
  border: 1px solid var(--border-subtle);
  color: var(--fg-muted);
  text-decoration: none;
  transition: all var(--dur-fast) var(--ease-out);
}
.pagination a:hover { border-color: var(--navy-600); color: var(--navy-800); }
.pagination .current { background: var(--navy-850); border-color: var(--navy-850); color: var(--white); }
.pagination .disabled { opacity: 0.4; pointer-events: none; }

/* ==========================================================================
   TABLE
   ========================================================================== */
.table-wrap { overflow-x: auto; border: 1px solid var(--border-subtle); border-radius: var(--r-lg); }
.table { width: 100%; font-size: var(--fs-sm); background: var(--white); }
.table th {
  text-align: left;
  padding: var(--sp-4) var(--sp-5);
  font-family: var(--font-display);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--white);
  background: var(--navy-850);
  white-space: nowrap;
}
.table td { padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--border-subtle); vertical-align: top; }
.table tbody tr:nth-child(even) { background: var(--ink-050); }
.table tbody tr:hover { background: var(--navy-050); }

/* ==========================================================================
   EMPTY STATE
   ========================================================================== */
.empty-state {
  text-align: center;
  padding: var(--sp-16) var(--sp-6);
  border: 1.5px dashed var(--border-default);
  border-radius: var(--r-lg);
  background: var(--bg-subtle);
}
.empty-state__icon { width: 52px; height: 52px; margin: 0 auto var(--sp-5); color: var(--ink-300); }
.empty-state__title { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.empty-state__text { font-size: var(--fs-sm); color: var(--fg-muted); max-width: 44ch; margin-inline: auto; }

/* ==========================================================================
   BACK TO TOP
   ========================================================================== */
.to-top {
  position: fixed;
  right: var(--sp-6); bottom: var(--sp-6);
  z-index: var(--z-sticky);
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--navy-850);
  color: var(--white);
  box-shadow: var(--sh-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out),
              visibility var(--dur-base),
              background-color var(--dur-base) var(--ease-out);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--gold-600); color: var(--navy-950); }
.to-top svg { width: 19px; height: 19px; }
@media (max-width: 640px) { .to-top { right: var(--sp-4); bottom: var(--sp-4); } }

/* ==========================================================================
   SECTION SUB-NAVIGATION
   Sticky pill row beneath the page header on cluster pages
   (About, Membership, Business & Trade, Media).
   ========================================================================== */
.subnav {
  position: sticky;
  top: var(--header-h-sticky);
  z-index: var(--z-sticky);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.subnav__list {
  display: flex;
  gap: var(--sp-1);
  list-style: none;
  margin: 0; padding: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.subnav__list::-webkit-scrollbar { height: 3px; }
.subnav__list::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 3px; }

.subnav__link {
  display: block;
  padding: var(--sp-4) var(--sp-4);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--fg-muted);
  text-decoration: none;
  white-space: nowrap;
  scroll-snap-align: start;
  border-bottom: 2px solid transparent;
  transition: color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.subnav__link:hover { color: var(--navy-850); }
.subnav__link.is-active { color: var(--gold-700); border-bottom-color: var(--gold-600); }

/* ==========================================================================
   DEFINITION / SPEC LIST — used on member profiles and event detail
   ========================================================================== */
.deflist { display: grid; gap: var(--sp-4); }
.deflist__row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: var(--sp-5);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--border-subtle);
}
.deflist__row:last-child { border-bottom: none; padding-bottom: 0; }
.deflist dt {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--fg-subtle);
}
.deflist dd { margin: 0; font-size: var(--fs-sm); color: var(--fg-default); }
@media (max-width: 620px) {
  .deflist__row { grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); }
}

/* ==========================================================================
   STICKY ASIDE — article sidebars, event registration panel
   ========================================================================== */
.aside-sticky { position: sticky; top: calc(var(--header-h-sticky) + var(--sp-6)); }
.aside-card {
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  box-shadow: var(--sh-sm);
}
.aside-card + .aside-card { margin-top: var(--sp-5); }
.aside-card__title {
  font-family: var(--font-display);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin-bottom: var(--sp-4);
}

/* ==========================================================================
   RESULT COUNT / TOOLBAR SUMMARY
   ========================================================================== */
.result-count {
  font-size: var(--fs-sm);
  color: var(--fg-muted);
}
.result-count strong { color: var(--fg-strong); }

/* ==========================================================================
   STEPPED PROCESS (market entry, joining, matchmaking)
   ========================================================================== */
.steps { display: grid; gap: var(--sp-6); counter-reset: step; }
.steps--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.steps--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 940px) { .steps--3, .steps--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps--3, .steps--4 { grid-template-columns: minmax(0, 1fr); } }

.step { position: relative; padding-top: var(--sp-8); }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 0; left: 0;
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: var(--fw-extra);
  letter-spacing: var(--ls-tighter);
  color: var(--gold-500);
  line-height: 1;
}
.step::after {
  content: '';
  position: absolute;
  top: 0.35em; left: 3.1em; right: 0;
  height: 1px;
  background: var(--border-subtle);
}
.step:last-child::after { display: none; }
.step__title { font-family: var(--font-display); font-size: var(--fs-base); font-weight: var(--fw-bold); color: var(--fg-strong); margin-bottom: var(--sp-2); }
.step__text { font-size: var(--fs-sm); color: var(--fg-muted); line-height: var(--lh-normal); }
.on-dark .step::after { background: rgba(255, 255, 255, 0.14); }

/* --------------------------------------------------------------------------
   Definition list used on confirmation screens
   -------------------------------------------------------------------------- */
.detail-list { display: grid; gap: var(--sp-3); margin: var(--sp-6) 0; }
.detail-list > div {
  display: grid; grid-template-columns: 8rem 1fr; gap: var(--sp-4);
  padding-bottom: var(--sp-3); border-bottom: 1px solid var(--border-subtle);
}
.detail-list dt { color: var(--fg-subtle); font-size: .88rem; }
.detail-list dd { margin: 0; color: var(--fg-strong); font-weight: 600; }
@media (max-width: 540px) { .detail-list > div { grid-template-columns: 1fr; gap: var(--sp-1); } }

/* Optional per-service photograph (Admin → Content → Services).
   Sits above the icon; cards without one are unchanged. */
.card-feature__media {
  margin: calc(var(--sp-6) * -1) calc(var(--sp-6) * -1) var(--sp-5);
  border-radius: var(--r-md) var(--r-md) 0 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--ink-050);
}
.card-feature__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
