/* ==========================================================================
   PETATS - Telangana State
   Layered on top of Bootstrap 5.3. Sections:
   1 tokens  2 base  3 buttons  4 navbar  5 hero  6 sections & cards
   7 people  8 districts  9 achievements  10 forms & misc  11 footer  12 motion
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --navy-950: #060f26;
  --navy-900: #0b1f4b;
  --navy-800: #11306b;
  --brand: #2457f5;
  --brand-600: #1c47d3;
  --brand-50: #eef3ff;
  --accent: #ff7a1a;
  --accent-600: #ea6a0c;
  --accent-50: #fff2e6;
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e5e9f2;
  --bg: #f5f7fc;
  --card: #ffffff;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 2px 6px rgba(15, 23, 42, .05);
  --shadow-md: 0 14px 34px -14px rgba(15, 23, 42, .25);
  --shadow-lg: 0 30px 60px -24px rgba(11, 31, 75, .35);
  --nav-h: 76px;

  --bs-primary: var(--brand);
  --bs-link-color: var(--brand);
  --bs-link-hover-color: var(--brand-600);
  --bs-body-font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bs-body-color: var(--ink-soft);
}

/* 2. Base ------------------------------------------------------------------ */
/* Rows use the wide g-5 gutter, so the container needs matching side padding
   or the page scrolls sideways on narrow screens. */
.container-xxl { --bs-gutter-x: 3rem; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body { background: #fff; color: var(--ink-soft); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { color: var(--ink); font-weight: 800; letter-spacing: -.02em; }
a { text-decoration: none; }
::selection { background: var(--accent); color: #fff; }

.skip-link { position: fixed; top: 8px; left: 8px; z-index: 2000; background: #fff; padding: .5rem 1rem; border-radius: 8px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 60%, white); outline-offset: 2px; border-radius: 6px; }

#page-progress {
  position: fixed; inset: 0 auto auto 0; height: 3px; width: 0; z-index: 3000;
  background: linear-gradient(90deg, var(--brand), var(--accent)); transition: width .3s ease, opacity .3s ease; opacity: 0;
}
#page-progress.active { opacity: 1; width: 70%; transition-duration: 8s; }
#page-progress.done { opacity: 0; width: 100%; transition-duration: .2s; }

.demo-banner {
  background: #fff8e1; color: #6b4e00; border-bottom: 1px solid #f3dc8a;
  font-size: .82rem; text-align: center; padding: .45rem 1rem;
}
.demo-banner code { background: rgba(0, 0, 0, .06); padding: .1rem .4rem; border-radius: 6px; color: inherit; }

/* 3. Buttons --------------------------------------------------------------- */
.btn { font-weight: 700; border-radius: 999px; padding: .6rem 1.35rem; transition: transform .2s, box-shadow .2s, background .2s, color .2s; }
.btn-lg { padding: .8rem 1.7rem; font-size: 1rem; }
.btn i { margin-left: .35rem; transition: transform .2s; }
.btn:hover i.bi-arrow-right { transform: translateX(3px); }
.btn-brand { background: var(--brand); border: 0; color: #fff; box-shadow: 0 10px 24px -10px var(--brand); }
.btn-brand:hover { background: var(--brand-600); color: #fff; transform: translateY(-2px); }
.btn-accent { background: var(--accent); border: 0; color: #fff; box-shadow: 0 12px 28px -10px var(--accent); }
.btn-accent:hover { background: var(--accent-600); color: #fff; transform: translateY(-2px); }
.btn-ghost { background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .28); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255, 255, 255, .18); color: #fff; transform: translateY(-2px); }
.btn-outline-brand { color: var(--brand); border: 1.5px solid color-mix(in srgb, var(--brand) 35%, white); background: #fff; }
.btn-outline-brand:hover { background: var(--brand); border-color: var(--brand); color: #fff; transform: translateY(-2px); }

/* 4. Navbar ---------------------------------------------------------------- */
.site-nav {
  background: rgba(255, 255, 255, .86); backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent; transition: box-shadow .25s, border-color .25s; z-index: 1030;
}
.site-nav.scrolled { border-color: var(--line); box-shadow: 0 8px 28px -18px rgba(15, 23, 42, .35); }
.site-nav .navbar { min-height: var(--nav-h); padding-block: .5rem; }

.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; color: #fff;
  font-weight: 800; letter-spacing: .02em; font-size: 1.05rem;
  background: linear-gradient(135deg, var(--brand), var(--navy-900)); box-shadow: 0 10px 22px -10px var(--brand);
  position: relative; overflow: hidden;
}
.brand-mark::after { content: ""; position: absolute; width: 26px; height: 26px; right: -9px; top: -9px; border-radius: 50%; background: var(--accent); opacity: .9; }
.brand-mark { isolation: isolate; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1.15rem; font-weight: 800; letter-spacing: .04em; }
.brand-text small { font-size: .68rem; color: var(--muted); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.brand--light, .brand--light:hover { color: #fff; }
.brand--light .brand-text small { color: rgba(255, 255, 255, .65); }

.navbar-toggler { border: 1px solid var(--line); border-radius: 12px; padding: .3rem .6rem; font-size: 1.6rem; line-height: 1; color: var(--ink); }
.navbar-toggler:focus { box-shadow: none; }

.site-nav .nav-link { font-weight: 600; color: var(--ink-soft); padding: .55rem .95rem !important; border-radius: 999px; transition: background .2s, color .2s; }
.site-nav .nav-link:hover { background: var(--brand-50); color: var(--brand); }
.site-nav .nav-link.active { background: var(--brand-50); color: var(--brand); }
.site-nav .dropdown-toggle::after { vertical-align: .15em; }

.mega-menu { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 1rem 1.1rem; margin-top: .6rem !important; }
.mega-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .15rem .5rem .75rem; margin-bottom: .5rem; border-bottom: 1px solid var(--line); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.mega-head a { text-transform: none; letter-spacing: 0; font-size: .85rem; }
.mega-list { list-style: none; margin: 0; padding: 0; columns: 3; column-gap: .5rem; }
.mega-list li { break-inside: avoid; }
.mega-menu .dropdown-item { border-radius: 10px; font-size: .9rem; font-weight: 500; padding: .38rem .7rem; white-space: nowrap; }
.mega-menu .dropdown-item:hover { background: var(--brand-50); color: var(--brand); }

.nav-leaders { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.leader-chip {
  display: flex; align-items: center; gap: .6rem; padding: .28rem .95rem .28rem .3rem; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--ink); max-width: 230px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.leader-chip:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--ink); }
.leader-chip--president:hover { border-color: var(--brand); }
.leader-chip--secretary:hover { border-color: var(--accent); }
.leader-chip__text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.leader-chip__text small { font-size: .62rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.leader-chip--president small { color: var(--brand); }
.leader-chip--secretary small { color: var(--accent-600); }
.leader-chip__text strong { font-size: .83rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leader-chip--president .avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--brand); }
.leader-chip--secretary .avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent); }

/* State login / main admin button at the end of the navbar */
.nav-login {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .6rem 1.1rem; border-radius: 999px;
  background: var(--navy-900); border: 1px solid var(--navy-900); color: #fff; font-weight: 700; font-size: .9rem; white-space: nowrap;
  transition: background .2s, border-color .2s, transform .2s;
}
.nav-login:hover, .nav-login:focus-visible { background: var(--brand); border-color: var(--brand); color: #fff; transform: translateY(-2px); }
.nav-login--in { background: var(--brand); border-color: var(--brand); }
.nav-login--in:hover { background: var(--navy-900); border-color: var(--navy-900); }

.nav-leaders-mini { display: flex; margin-left: auto; margin-right: .85rem; }
.mini-leader { display: block; border-radius: 50%; transition: transform .2s; }
.mini-leader:hover { transform: translateY(-2px); }
.mini-leader + .mini-leader { margin-left: -8px; }
.mini-leader .avatar { box-shadow: 0 0 0 2px #fff; }
.mini-leader--president .avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--brand); }
.mini-leader--secretary .avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent); }

@media (min-width: 1200px) {
  .dropdown:hover > .dropdown-menu { display: block; }
  .mega-menu { width: 640px; }
  /* Room for the login button: slimmer links, and the leader chips stay on one line (names shorten with an ellipsis if ever needed). */
  .site-nav .nav-link { padding-inline: .7rem !important; white-space: nowrap; }
  .nav-leaders { flex-wrap: nowrap; min-width: 0; }
  .leader-chip { min-width: 0; }
  .nav-login-wrap { margin-left: .75rem; flex: none; }
}
@media (min-width: 1200px) and (max-width: 1299.98px) {
  .site-nav .nav-link { padding-inline: .55rem !important; }
}
/* The bar is full between 1200px and 1399px: keep just the icon (the title says what it is). */
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .nav-login { width: 44px; height: 44px; padding: 0; }
  .nav-login__text { display: none; }
}
@media (max-width: 1199.98px) {
  .navbar-collapse { padding: 1rem 0 1.25rem; }
  .navbar-nav { gap: .15rem; }
  .nav-leaders { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
  .nav-login-wrap { margin-top: 1rem; }
  .nav-login { width: 100%; padding: .8rem 1.1rem; }
  .mega-menu { box-shadow: none; border: 0; padding: .25rem 0 .5rem .5rem; background: transparent; }
  .mega-list { columns: 2; }
  .mega-head { display: none; }
}
@media (max-width: 575.98px) {
  .brand-text small { display: none; }
  .leader-chip { flex: 1 1 100%; max-width: none; }
}

/* Avatars ------------------------------------------------------------------ */
.avatar {
  --size: 64px;
  display: inline-grid; place-items: center; flex: none; width: var(--size); height: var(--size); border-radius: 50%;
  overflow: hidden; color: #fff; font-weight: 800; font-size: calc(var(--size) * .36); letter-spacing: .02em; background: var(--navy-800);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.avatar-nav { --size: 42px; }
.avatar-sm { --size: 44px; }
.avatar-md { --size: 64px; }
.avatar-lg { --size: 88px; }
.avatar-xl { --size: 124px; }
.tone-0 { background: linear-gradient(135deg, #2457f5, #0b1f4b); }
.tone-1 { background: linear-gradient(135deg, #ff7a1a, #d4480a); }
.tone-2 { background: linear-gradient(135deg, #0ea5a4, #0b5e73); }
.tone-3 { background: linear-gradient(135deg, #8b5cf6, #4c1d95); }
.tone-4 { background: linear-gradient(135deg, #ec4899, #9d174d); }
.tone-5 { background: linear-gradient(135deg, #16a34a, #14532d); }

/* 5. Hero ------------------------------------------------------------------ */
.hero {
  position: relative; overflow: hidden; color: #fff; padding: 5.5rem 0 9rem;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(36, 87, 245, .55), transparent 60%),
    linear-gradient(160deg, var(--navy-950), var(--navy-900) 55%, var(--navy-800));
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
}
.hero__glow { position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; }
.hero__glow--a { width: 340px; height: 340px; background: rgba(255, 122, 26, .35); left: -90px; bottom: -120px; }
.hero__glow--b { width: 380px; height: 380px; background: rgba(36, 87, 245, .45); right: 8%; top: -140px; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: .45rem .95rem; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); margin-bottom: 1.5rem;
}
.hero__eyebrow i { color: var(--accent); }
.hero__title { color: #fff; font-size: clamp(2.3rem, 5vw, 4rem); line-height: 1.05; margin-bottom: 1.25rem; max-width: 16ch; }
.hero__lead { font-size: 1.15rem; color: rgba(255, 255, 255, .78); max-width: 52ch; margin-bottom: 2rem; }

.hero-visual { position: relative; width: 100%; aspect-ratio: 1; max-width: 440px; margin-inline: auto; }
.hero-visual__ring { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, .25); animation: spin 60s linear infinite; }
.hero-visual__ring--2 { inset: 14%; border-style: solid; border-color: rgba(255, 255, 255, .12); animation-direction: reverse; animation-duration: 45s; }
.hero-visual__core {
  position: absolute; inset: 29%; border-radius: 50%; display: grid; place-items: center; font-size: 4.2rem; color: #fff;
  background: linear-gradient(145deg, var(--accent), #ff4d6d); box-shadow: 0 30px 80px -20px rgba(255, 122, 26, .7), inset 0 0 0 8px rgba(255, 255, 255, .12);
}
.float-chip {
  position: absolute; display: flex; align-items: center; gap: .5rem; padding: .6rem 1rem; border-radius: 14px; font-size: .85rem; font-weight: 600;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(12px); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .5);
  animation: float 6s ease-in-out infinite;
}
.float-chip strong { font-size: 1.15rem; }
.float-chip i { color: var(--accent); }
.float-chip--1 { top: 6%; left: -2%; }
.float-chip--2 { top: 44%; right: -6%; animation-delay: -2s; }
.float-chip--3 { bottom: 4%; left: 6%; animation-delay: -4s; }

.stats-band { margin-top: -4.5rem; position: relative; z-index: 2; }
.stats-card {
  display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border: 1px solid var(--line); border-radius: 24px;
  box-shadow: var(--shadow-lg); padding: 1.6rem 1rem;
}
.stat { text-align: center; padding: .4rem 1rem; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat__num { display: block; font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 800; color: var(--ink); letter-spacing: -.03em; line-height: 1.1;
  background: linear-gradient(135deg, var(--brand), var(--navy-900)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat__label { font-size: .85rem; font-weight: 600; color: var(--muted); }
@media (max-width: 767.98px) {
  .stats-card { grid-template-columns: repeat(2, 1fr); row-gap: 1rem; }
  .stat:nth-child(3) { border-left: 0; }
  .hero { padding: 3.5rem 0 7.5rem; }
}

/* Inner page hero */
.page-hero {
  position: relative; overflow: hidden; color: #fff; padding: 3.5rem 0 3.75rem;
  background: radial-gradient(900px 380px at 90% -20%, rgba(36, 87, 245, .55), transparent 60%), linear-gradient(160deg, var(--navy-950), var(--navy-900));
}
.page-hero::after { content: ""; position: absolute; width: 280px; height: 280px; border-radius: 50%; right: -60px; bottom: -150px; background: rgba(255, 122, 26, .4); filter: blur(60px); }
.page-hero .container-xxl { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 3rem); margin-bottom: .6rem; }
.page-hero .lead { color: rgba(255, 255, 255, .78); max-width: 62ch; margin: 0; font-size: 1.1rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0 0 1.25rem; font-size: .85rem; color: rgba(255, 255, 255, .65); }
.crumbs li + li::before { content: "/"; margin-right: .4rem; opacity: .5; }
.crumbs a { color: rgba(255, 255, 255, .9); }
.crumbs a:hover { color: var(--accent); }

.hero-facts { list-style: none; margin: 0; padding: 1rem 1.2rem; display: grid; gap: .85rem; border-radius: var(--radius); background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(10px); }
.hero-facts li { display: flex; gap: .8rem; align-items: center; font-weight: 600; }
.hero-facts i { color: var(--accent); font-size: 1.1rem; }
.hero-facts small { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .6); font-weight: 700; }
.hero-facts a { color: #fff; word-break: break-all; }

/* 6. Sections & shared cards ------------------------------------------------ */
.section { padding: 5rem 0; }
.section--tint { background: var(--bg); }
.section-head { max-width: 680px; margin-bottom: 2.75rem; }
.section-head--split { max-width: none; display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: .6rem; }
.section-head p { color: var(--muted); font-size: 1.05rem; margin: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: .6rem; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-600); margin-bottom: .7rem; }
.eyebrow::before { content: ""; width: 26px; height: 3px; border-radius: 3px; background: var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2.5rem; }
.chip {
  display: inline-flex; align-items: center; gap: .5rem; padding: .5rem 1.05rem; border-radius: 999px; font-weight: 600; font-size: .9rem;
  color: var(--ink-soft); background: #fff; border: 1px solid var(--line); transition: all .2s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip__count { font-size: .72rem; background: rgba(15, 23, 42, .08); border-radius: 999px; padding: .08rem .5rem; }
.chip.active .chip__count { background: rgba(255, 255, 255, .22); }

.empty-state { text-align: center; padding: 3.5rem 1rem; color: var(--muted); border: 2px dashed var(--line); border-radius: var(--radius); }
.empty-state i { font-size: 2.4rem; color: var(--brand); opacity: .6; }
.empty-state h3 { font-size: 1.2rem; margin: .8rem 0 .3rem; }

.value-card { height: 100%; padding: 2rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); transition: transform .25s, box-shadow .25s; }
.value-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.value-card__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; font-size: 1.5rem; color: var(--brand); background: var(--brand-50); margin-bottom: 1.2rem; }
.value-card h3 { font-size: 1.2rem; }
.value-card p { margin: 0; color: var(--muted); }

.structure-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; }
.structure-card h3 { font-size: 1.15rem; margin-bottom: 1.25rem; }
.structure { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 1.1rem; }
.structure li { display: flex; gap: .9rem; }
.structure__dot { flex: none; width: 14px; height: 14px; border-radius: 50%; margin-top: .35rem; background: var(--accent); box-shadow: 0 0 0 5px var(--accent-50); }
.structure strong { display: block; color: var(--ink); }
.structure small { color: var(--muted); font-size: .9rem; }
.prose { font-size: 1.08rem; line-height: 1.8; color: var(--ink-soft); }
.prose--lead { font-size: 1.25rem; font-weight: 500; color: var(--ink); }

.cta-band { padding: 0 0 5rem; }
.cta-card {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
  padding: 3rem; border-radius: 28px; color: #fff;
  background: radial-gradient(500px 240px at 100% 0, rgba(255, 122, 26, .5), transparent 70%), linear-gradient(135deg, var(--navy-900), var(--brand));
}
.cta-card h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); max-width: 22ch; }
.cta-card p { color: rgba(255, 255, 255, .8); margin: 0; max-width: 46ch; }
@media (max-width: 575.98px) { .cta-card { padding: 2rem 1.5rem; } }

/* 7. People ---------------------------------------------------------------- */
.member-group + .member-group { margin-top: 3.25rem; }
.group-title { font-size: 1.3rem; display: flex; align-items: center; gap: .8rem; margin-bottom: 1.4rem; }
.group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.person-card {
  position: relative; height: 100%; text-align: center; padding: 1.75rem 1.25rem 1.5rem; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); transition: transform .25s, box-shadow .25s, border-color .25s; overflow: hidden;
}
.person-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: transparent; }
.person-card .avatar { margin-bottom: 1rem; box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--line); }
.person-card__name { font-size: 1.08rem; margin-bottom: .45rem; }
.person-card__meta { margin: .8rem 0 0; font-size: .85rem; color: var(--muted); display: flex; gap: .4rem; justify-content: center; }
.person-card__actions { display: flex; justify-content: center; gap: .5rem; margin-top: 1rem; }
.person-card--compact { padding: 1.3rem 1rem 1.2rem; }
.person-card--compact .person-card__name { font-size: .98rem; }

.person-card--featured { padding-top: 2.5rem; }
.person-card--featured::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 78px; background: linear-gradient(135deg, var(--brand), var(--navy-900)); }
.person-card--secretary.person-card--featured::before { background: linear-gradient(135deg, var(--accent), #d4480a); }
.person-card--featured .avatar { position: relative; box-shadow: 0 0 0 5px #fff; }

.role-badge {
  display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: .3rem .75rem; border-radius: 999px; color: var(--brand); background: var(--brand-50);
}
.role-badge--secretary, .role-badge--joint_secretary { color: var(--accent-600); background: var(--accent-50); }
.role-badge--treasurer { color: #0b7a75; background: #e2f6f5; }
.role-badge--executive { color: #475569; background: #eef1f6; }
.role-badge--onDark { color: #fff; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); }

.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--brand); background: var(--brand-50); transition: all .2s; }
.icon-btn:hover { background: var(--brand); color: #fff; transform: translateY(-2px); }

/* 8. Districts ------------------------------------------------------------- */
.search-box { position: relative; max-width: 560px; margin-bottom: 1.25rem; }
.search-box i { position: absolute; left: 1.15rem; top: 50%; transform: translateY(-50%); color: var(--muted); z-index: 2; }
.search-box .form-control { padding-left: 3rem; border-radius: 999px; border: 1.5px solid var(--line); box-shadow: var(--shadow-sm); }
.search-box .form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 .25rem rgba(36, 87, 245, .15); }
.result-count { color: var(--muted); font-size: .9rem; font-weight: 600; margin-bottom: 1.25rem; }

.district-card {
  display: flex; flex-direction: column; height: 100%; padding: 1.4rem; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--ink-soft); transition: transform .25s, box-shadow .25s, border-color .25s;
}
.district-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--brand) 40%, white); color: var(--ink-soft); }
.district-card__top { display: flex; gap: .9rem; align-items: center; margin-bottom: 1.1rem; }
.district-card__icon { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 14px; font-size: 1.25rem; color: #fff; background: linear-gradient(135deg, var(--brand), var(--navy-900)); }
.district-card h3 { font-size: 1.15rem; margin: 0; }
.district-card__top p { margin: 0; font-size: .82rem; color: var(--muted); }
.district-leads { list-style: none; padding: 0; margin: 0 0 1.2rem; display: grid; gap: .65rem; }
.district-leads li { display: flex; align-items: center; gap: .75rem; padding: .55rem .7rem; background: var(--bg); border-radius: var(--radius-sm); min-height: 60px; }
.district-leads span { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.district-leads small { font-size: .65rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.district-leads strong { color: var(--ink); font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.district-leads .avatar { --size: 38px; }
.district-leads .vacant { color: var(--muted); font-size: .85rem; font-style: italic; }
.district-card__foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-size: .85rem; font-weight: 600; color: var(--muted); padding-top: 1rem; border-top: 1px solid var(--line); }
.go { color: var(--brand); font-weight: 700; }
.go i { display: inline-block; transition: transform .2s; }
.district-card:hover .go i, .achv-card:hover .go i { transform: translateX(4px); }

.district-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .75rem; }
.district-chip {
  display: flex; align-items: center; gap: .75rem; padding: .7rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  font-weight: 600; color: var(--ink); transition: all .2s;
}
.district-chip span { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 9px; font-size: .75rem; font-weight: 800; color: var(--brand); background: var(--brand-50); transition: all .2s; }
.district-chip:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--shadow-md); color: var(--brand); }
.district-chip:hover span { background: var(--brand); color: #fff; }

.district-pager { padding: 0 0 4rem; }
.section--tint + .district-pager, .section + .district-pager { padding-top: 0; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 2rem; border-top: 1px solid var(--line); }
.pager__link { display: inline-flex; align-items: center; gap: .9rem; padding: .8rem 1.2rem; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); font-weight: 700; transition: all .2s; }
.pager__link small { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.pager__link:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }
.pager__link--next { text-align: right; }
.pager__all { font-weight: 700; font-size: .9rem; color: var(--muted); }

/* 9. Achievements ---------------------------------------------------------- */
.achv-card { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink-soft); transition: transform .25s, box-shadow .25s; }
.achv-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); color: var(--ink-soft); }
.achv-card__media { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; color: rgba(255, 255, 255, .92); font-size: 3.2rem; }
.achv-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.achv-card:hover .achv-card__media img { transform: scale(1.05); }
.achv-card__cat { position: absolute; left: 1rem; top: 1rem; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: .3rem .75rem; border-radius: 999px; background: rgba(255, 255, 255, .95); color: var(--ink); }
.cat-sports { background: linear-gradient(135deg, #2457f5, #0b1f4b); }
.cat-training { background: linear-gradient(135deg, #0ea5a4, #0b5e73); }
.cat-welfare { background: linear-gradient(135deg, #ec4899, #9d174d); }
.cat-advocacy { background: linear-gradient(135deg, #8b5cf6, #4c1d95); }
.cat-recognition { background: linear-gradient(135deg, #ff7a1a, #d4480a); }
.achv-card__body { display: flex; flex-direction: column; flex: 1; padding: 1.35rem 1.4rem 1.5rem; }
.achv-card__meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: .6rem; }
.achv-card h3 { font-size: 1.12rem; line-height: 1.35; margin-bottom: .55rem; }
.achv-card p { color: var(--muted); font-size: .95rem; margin-bottom: 1rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.achv-card .go { margin-top: auto; }
.article-image { width: 100%; border-radius: var(--radius); margin-bottom: 2rem; box-shadow: var(--shadow-md); }

/* 10. Forms & contact ------------------------------------------------------ */
.form-card { padding: 2.25rem; background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-md); }
.form-card .form-control { border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); font-size: 1rem; }
.form-card .form-control:focus { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 .25rem rgba(36, 87, 245, .15); }
.form-card .is-invalid { border-color: #dc3545; background-image: none; }
.field-error { color: #dc3545; font-size: .85rem; font-weight: 600; margin-top: .35rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.success-card { display: flex; gap: 1rem; align-items: flex-start; padding: 1.1rem 1.3rem; margin-bottom: 1.5rem; border-radius: var(--radius-sm); background: #e8f8ee; color: #14532d; }
.success-card i { font-size: 1.6rem; color: #16a34a; }
.success-card h3 { font-size: 1.05rem; color: inherit; margin: 0 0 .15rem; }
.success-card p { margin: 0; }
.info-stack { display: grid; gap: 1rem; }
.info-card { display: flex; gap: 1rem; align-items: center; padding: 1.1rem 1.25rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); font-weight: 600; color: var(--ink); }
.info-card > i { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 14px; font-size: 1.15rem; color: var(--brand); background: var(--brand-50); }
.info-card small { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.htmx-request .btn[type="submit"] { opacity: .7; pointer-events: none; }
@media (max-width: 575.98px) { .form-card { padding: 1.4rem; } }

/* 11. Footer --------------------------------------------------------------- */
.site-footer { background: var(--navy-950); color: rgba(255, 255, 255, .72); padding: 4.5rem 0 1.75rem; }
.footer-about { margin: 1.25rem 0 1.5rem; max-width: 46ch; }
.footer-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: #fff; margin-bottom: 1.1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.footer-links a { color: rgba(255, 255, 255, .72); }
.footer-links a:hover { color: var(--accent); }
.footer-links li { min-width: 0; overflow-wrap: anywhere; }
.footer-contact li { display: flex; gap: .7rem; }
.footer-contact i { color: var(--accent); }
.social { display: flex; gap: .6rem; }
.social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; background: rgba(255, 255, 255, .08); transition: all .2s; }
.social a:hover { background: var(--accent); transform: translateY(-2px); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .75rem; margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .85rem; }
.footer-bottom a { color: rgba(255, 255, 255, .8); }
.footer-bottom a:hover { color: var(--accent); }

/* 11c. News ticker (top of every public page) -------------------------------- */
.news-ticker { background: var(--navy-950); color: #fff; font-size: .9rem; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.news-ticker__inner { display: flex; align-items: center; gap: .9rem; min-height: 42px; }
.news-ticker__label {
  display: inline-flex; align-items: center; gap: .5rem; flex: none; padding: .3rem .85rem; border-radius: 999px;
  background: var(--accent); color: #fff; font-weight: 800; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
}
.news-ticker__viewport {
  flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
}
.news-ticker__viewport::-webkit-scrollbar { display: none; }
.news-ticker__track { display: flex; width: max-content; will-change: transform; }
.news-ticker__group { display: flex; flex: none; align-items: center; list-style: none; margin: 0; padding: 0; min-width: var(--ticker-view, 0px); }
.news-ticker__item { display: flex; align-items: center; gap: .55rem; padding: .6rem 0; white-space: nowrap; }
.news-ticker__item::after { content: "\25C6"; margin: 0 1.6rem; color: var(--accent); font-size: .55rem; }
.news-ticker__item a, .news-ticker__item > span:not(.news-ticker__new) { color: #fff; font-weight: 500; }
.news-ticker__item a:hover, .news-ticker__item a:focus-visible { color: var(--accent); text-decoration: underline; }
.news-ticker__new { background: var(--accent); color: #fff; font-size: .6rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: .08rem .45rem; border-radius: 999px; }
.news-ticker__toggle { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 1rem; }
.news-ticker__toggle:hover, .news-ticker__toggle:focus-visible { background: var(--brand); }
.news-ticker--running .news-ticker__viewport { overflow: hidden; }
.news-ticker--running .news-ticker__track { animation: ticker-scroll var(--ticker-duration, 40s) linear infinite; }
.news-ticker--running:hover .news-ticker__track,
.news-ticker--running:focus-within .news-ticker__track,
.news-ticker.is-paused .news-ticker__track { animation-play-state: paused; }
@keyframes ticker-scroll { to { transform: translateX(calc(-1 * var(--ticker-shift, 0px))); } }
@media (prefers-reduced-motion: reduce) { .news-ticker__track { animation: none !important; } }
@media (max-width: 575.98px) {
  .news-ticker__inner { gap: .6rem; }
  .news-ticker__label { padding: .35rem .6rem; }
  .news-ticker__label span { display: none; }
  .news-ticker { font-size: .85rem; }
}

/* 11a. Home page carousel ---------------------------------------------------- */
.carousel-band { padding: 3.5rem 0 0; }
.home-carousel { position: relative; border-radius: 26px; overflow: hidden; background: var(--navy-900); box-shadow: var(--shadow-lg); }
.home-carousel__img { display: block; width: 100%; aspect-ratio: 5 / 2; object-fit: cover; }
.home-carousel__caption {
  position: absolute; inset: auto 0 0 0; padding: 4.5rem clamp(4.75rem, 7vw, 5.75rem) 2.75rem; color: #fff; /* side room for the arrows */
  background: linear-gradient(to top, rgba(6, 15, 38, .88) 0%, rgba(6, 15, 38, .55) 55%, rgba(6, 15, 38, 0) 100%);
}
.home-carousel__caption h2 { color: #fff; font-size: clamp(1.35rem, 3.2vw, 2.4rem); max-width: 22ch; margin-bottom: .5rem; text-shadow: 0 2px 18px rgba(0, 0, 0, .35); }
.home-carousel__caption p { max-width: 56ch; margin: 0 0 1.1rem; font-size: clamp(.95rem, 1.5vw, 1.15rem); color: rgba(255, 255, 255, .88); }
.home-carousel .carousel-indicators { justify-content: flex-end; margin: 0 clamp(1.25rem, 4vw, 3.5rem) 1.2rem; z-index: 3; }
.home-carousel .carousel-indicators [data-bs-target] { width: 10px; height: 10px; border: 0; border-radius: 50%; margin: 0 4px; background: #fff; opacity: .5; }
.home-carousel .carousel-indicators .active { opacity: 1; width: 28px; border-radius: 999px; background: var(--accent); }
.home-carousel .carousel-control-prev, .home-carousel .carousel-control-next { width: 5.5rem; opacity: 1; z-index: 2; }
.home-carousel__arrow {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; font-size: 1.15rem; color: #fff;
  background: rgba(6, 15, 38, .55); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .35); transition: background .2s, transform .2s;
}
.home-carousel .carousel-control-prev:hover .home-carousel__arrow, .home-carousel .carousel-control-next:hover .home-carousel__arrow,
.home-carousel .carousel-control-prev:focus-visible .home-carousel__arrow, .home-carousel .carousel-control-next:focus-visible .home-carousel__arrow { background: var(--brand); transform: scale(1.08); }
.home-carousel__pause {
  position: absolute; z-index: 3; top: 1rem; right: 1rem; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; background: rgba(6, 15, 38, .55); border: 1px solid rgba(255, 255, 255, .35); backdrop-filter: blur(6px);
}
.home-carousel__pause:hover, .home-carousel__pause:focus-visible { background: var(--brand); }
@media (max-width: 767.98px) {
  .carousel-band { padding-top: 2.25rem; }
  .home-carousel { border-radius: 18px; }
  .home-carousel__img { aspect-ratio: 4 / 3; }
  .home-carousel__caption { padding: 3rem 1.15rem 2.6rem; }
  .home-carousel__caption p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: .8rem; }
  /* On phones the arrows would sit on top of the text: swiping, the dots and the pause button do the job. */
  .home-carousel .carousel-control-prev, .home-carousel .carousel-control-next { display: none; }
  .home-carousel .carousel-indicators { margin-bottom: .8rem; }
}
@media (prefers-reduced-motion: reduce) { .home-carousel .carousel-item { transition: none !important; } }

/* 11b. Registered members -------------------------------------------------- */
.district-card__foot { flex-wrap: wrap; gap: .35rem 1rem; }
.district-card__foot .go { margin-left: auto; }

.reg-teaser {
  display: flex; align-items: center; gap: 1.75rem; flex-wrap: wrap; padding: 2rem 2.25rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.reg-teaser__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; font-size: 1.8rem; color: var(--brand); background: var(--brand-50); flex: none; }
.reg-teaser__text { flex: 1 1 320px; min-width: 0; }
.reg-teaser__text h2 { font-size: clamp(1.3rem, 2.4vw, 1.8rem); margin-bottom: .3rem; }
.reg-teaser__text p { margin: 0; color: var(--muted); }

.login-box {
  margin-top: 1.5rem; display: flex; align-items: center; gap: 1.5rem 2rem; flex-wrap: wrap; padding: 1.75rem 2.25rem;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-800)); color: rgba(255, 255, 255, .8);
  border-radius: var(--radius); box-shadow: var(--shadow-md);
}
.login-box__intro { display: flex; align-items: center; gap: 1.1rem; flex: 1 1 280px; min-width: 0; }
.login-box__icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; font-size: 1.5rem; color: #fff; background: var(--accent); flex: none; }
.login-box h2 { color: #fff; font-size: 1.3rem; margin: 0 0 .25rem; }
.login-box p { margin: 0; font-size: .95rem; }
.login-box__creds { display: flex; gap: 1.25rem 2rem; flex-wrap: wrap; margin: 0; }
.login-box__creds dt { font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; color: rgba(255, 255, 255, .6); font-weight: 700; margin-bottom: .3rem; }
.login-box__creds dd { margin: 0; display: flex; flex-direction: column; gap: .3rem; }
.login-box__creds code { display: inline-block; width: fit-content; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); color: #fff; font-size: 1.05rem; font-weight: 700; padding: .3rem .75rem; border-radius: 10px; user-select: all; }
.login-box__creds small { color: rgba(255, 255, 255, .6); font-size: .75rem; }
.login-box__changed { color: #7ee2a8; font-weight: 700; }
.login-box__actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.login-box__actions form { margin: 0; }
.login-box__who { font-size: .9rem; }
.login-box__who strong { color: #fff; }
.login-box .btn-outline-brand { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .4); }
.login-box .btn-outline-brand:hover { background: #fff; color: var(--navy-900); border-color: #fff; }
@media (max-width: 575.98px) { .login-box { padding: 1.5rem 1.25rem; } }

.reg-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.reg-table { width: 100%; border-collapse: collapse; }
.reg-table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: .9rem 1.2rem; background: #fafbfe; border-bottom: 1px solid var(--line); white-space: nowrap; }
.reg-table td { padding: .85rem 1.2rem; border-bottom: 1px solid var(--line); }
.reg-table tbody tr:last-child td { border-bottom: 0; }
.reg-table tbody tr:hover { background: #fafbff; }
.reg-num { color: var(--muted); width: 1%; font-variant-numeric: tabular-nums; }
.reg-name { font-weight: 700; color: var(--ink); }
.reg-pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border-top: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: .9rem; }
@media (max-width: 575.98px) { .reg-teaser { padding: 1.5rem 1.25rem; } .reg-table td, .reg-table th { padding: .75rem .85rem; } }

/* 12. Motion --------------------------------------------------------------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.htmx-added.reveal { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
