/* =====================================================================
   PIWDO — public site styles (Bootstrap 5 + custom tokens)
   Palette taken from the PIWDO emblem: bottle green, brass gold, leaf.
   ===================================================================== */
:root {
  --ink: #18261d;
  --ink-2: #4a5a4f;
  --green: #134a2c;
  --green-2: #1c6139;
  --forest: #0c2e1b;
  --gold: #b8902f;
  --gold-ink: #7e5f14;
  --gold-soft: #f3e9cb;
  --leaf: #5e9a3a;
  --mist: #f2f5f0;
  --line: #dce3d8;
  --white: #fff;
  --serif: 'Spectral', Georgia, 'Times New Roman', serif;
  --sans: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --urdu: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', 'Urdu Typesetting', serif;
  --r-sm: 6px;
  --r: 12px;
  --shadow: 0 1px 2px rgba(12, 46, 27, .06), 0 8px 24px -12px rgba(12, 46, 27, .18);

  --bs-body-font-family: var(--sans);
  --bs-body-color: var(--ink);
  --bs-link-color-rgb: 19, 74, 44;
  --bs-link-hover-color-rgb: 12, 46, 27;
  --bs-border-color: var(--line);
  --bs-primary-rgb: 19, 74, 44;
}

html { scroll-padding-top: 96px; }
body { font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65; color: var(--ink); background: var(--white); -webkit-font-smoothing: antialiased; }
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; color: var(--forest); }
h4, h5, h6 { font-family: var(--sans); font-weight: 700; color: var(--forest); }
a { text-underline-offset: .18em; }
img { max-width: 100%; height: auto; }
[lang="ur"] { font-family: var(--urdu); line-height: 2.1; }
.text-green { color: var(--green) !important; }
.text-muted-2 { color: var(--ink-2) !important; }
::selection { background: var(--gold-soft); color: var(--forest); }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.form-control:focus, .form-select:focus, .form-check-input:focus, .btn:focus-visible, .accordion-button:focus {
  border-color: var(--green-2); box-shadow: 0 0 0 .25rem rgba(184, 144, 47, .35); outline: 0;
}
.skip-link { position: absolute; left: 1rem; top: -60px; z-index: 2000; background: var(--forest); color: #fff; padding: .6rem 1rem; border-radius: var(--r-sm); text-decoration: none; }
.skip-link:focus { top: 1rem; }
#main:focus { outline: none; }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Buttons & links ---------- */
.btn { font-weight: 600; border-radius: 999px; padding: .6rem 1.35rem; letter-spacing: .005em; }
.btn-lg { padding: .8rem 1.75rem; font-size: 1.05rem; }
.btn-sm { padding: .35rem .9rem; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #1b1404; }
.btn-gold:hover, .btn-gold:focus { background: #a37e25; border-color: #a37e25; color: #fff; }
.btn-green { background: var(--green); border-color: var(--green); color: #fff; }
.btn-green:hover, .btn-green:focus { background: var(--forest); border-color: var(--forest); color: #fff; }
.btn-outline-green { border: 1.5px solid var(--green); color: var(--green); background: transparent; }
.btn-outline-green:hover, .btn-outline-green:focus { background: var(--green); color: #fff; }
.link-green { color: var(--green); font-weight: 600; }
.link-green:hover { color: var(--forest); }
.btn-link.link-green { text-decoration: underline; }

/* ---------- Top bar & header ---------- */
.topbar { background: var(--forest); color: #d8e4d9; font-size: .85rem; }
.topbar a { color: #e8efe8; text-decoration: none; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar-list { list-style: none; display: flex; gap: 1.25rem; margin: 0; padding: .45rem 0; align-items: center; }
.topbar-list li { display: flex; align-items: center; gap: .4rem; }
.topbar-list i { color: var(--gold); }

.site-header { position: sticky; top: 0; z-index: 1030; background: rgba(255, 255, 255, .97); border-bottom: 1px solid transparent; transition: box-shadow .2s, border-color .2s; }
.site-header.is-scrolled { box-shadow: 0 6px 20px -14px rgba(12, 46, 27, .45); border-color: var(--line); }
.navbar { padding: .6rem 0; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; margin-right: 1.5rem; }
.brand-mark { width: 58px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-short { font-family: var(--serif); font-weight: 700; font-size: 1.55rem; color: var(--green); letter-spacing: .02em; }
.brand-long { font-size: .68rem; color: var(--ink-2); line-height: 1.25; }
.navbar-nav .nav-link { color: var(--ink); font-weight: 500; font-size: .97rem; padding: .5rem .8rem !important; border-radius: 8px; }
.navbar-nav .nav-link:hover { color: var(--green); background: var(--mist); }
.navbar-nav .nav-link.active { color: var(--green); font-weight: 700; }
.navbar-nav .nav-link.active::after { content: none; }
.dropdown-menu { border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: .4rem; }
.dropdown-item { border-radius: 8px; padding: .5rem .85rem; font-size: .95rem; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--mist); color: var(--green); }
.dropdown-item.active, .dropdown-item:active { background: var(--green); color: #fff; }
.nav-cta { margin-left: .75rem; }
.navbar-toggler { border: 0; padding: .5rem; display: flex; flex-direction: column; gap: 5px; }
.navbar-toggler:focus { box-shadow: none; }
.toggler-bar { width: 26px; height: 2px; background: var(--green); border-radius: 2px; transition: transform .2s, opacity .2s; }
.navbar-toggler[aria-expanded="true"] .toggler-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar-toggler[aria-expanded="true"] .toggler-bar:nth-child(2) { opacity: 0; }
.navbar-toggler[aria-expanded="true"] .toggler-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 1199.98px) {
  .navbar-collapse { border-top: 1px solid var(--line); margin-top: .6rem; padding: .5rem 0 1rem; max-height: calc(100vh - 90px); overflow-y: auto; }
  .nav-cta { margin: .75rem 0 0; }
  .dropdown-menu { box-shadow: none; border: 0; padding-left: 1rem; }
}
@media (max-width: 400px) { .brand-long { display: none; } }

.flash-wrap { padding-top: 1rem; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--mist); padding: clamp(2.5rem, 6vw, 5.5rem) 0 clamp(3rem, 6vw, 5.5rem); }
.hero-pattern { position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: radial-gradient(circle at 85% 30%, rgba(184, 144, 47, .12), transparent 45%), radial-gradient(circle at 10% 90%, rgba(94, 154, 58, .12), transparent 40%); }
.hero-urdu { font-family: var(--urdu); color: var(--gold-ink); font-size: clamp(1.2rem, 2.2vw, 1.6rem); line-height: 2.3; margin: 0 0 .25rem; text-align: left; }
.hero-title { font-size: clamp(2.3rem, 5vw, 3.9rem); line-height: 1.06; font-weight: 700; color: var(--green); margin-bottom: 1.1rem; max-width: 15ch; text-wrap: balance; }
.hero-lead { font-family: var(--serif); font-size: clamp(1.15rem, 1.8vw, 1.45rem); line-height: 1.5; color: var(--ink); max-width: 36ch; margin-bottom: 1.75rem; font-style: italic; font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.75rem; }
.hero-tagline { font-size: .95rem; color: var(--ink-2); border-left: 3px solid var(--gold); padding-left: .85rem; margin: 0; max-width: 46ch; }
.hero-emblem { position: relative; width: min(100%, 440px); aspect-ratio: 1; margin: 0 auto; display: grid; place-items: center; }
.hero-emblem::before { content: ''; position: absolute; inset: 7%; background: #fff; border-radius: 50%; box-shadow: 0 30px 60px -30px rgba(12, 46, 27, .35); }
.hero-arc { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-110deg); }
.arc-track { fill: none; stroke: var(--line); stroke-width: 1.5; }
.arc-draw { fill: none; stroke: var(--gold); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; }
.motion-ok .hero.is-ready .arc-draw { transition: stroke-dashoffset 1.8s cubic-bezier(.65, 0, .35, 1) .2s; stroke-dashoffset: 28; }
.reduce-motion .arc-draw { stroke-dashoffset: 28; }
.hero-mark { position: relative; width: 74%; height: auto; }
.hero-photo { position: relative; width: 86%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.motion-ok .hero-mark, .motion-ok .hero-photo { opacity: 0; transform: scale(.96); transition: opacity .8s ease .1s, transform 1s ease .1s; }
.motion-ok .hero.is-ready .hero-mark, .motion-ok .hero.is-ready .hero-photo { opacity: 1; transform: none; }
@media (max-width: 991.98px) { .hero-emblem { width: min(70%, 300px); } .hero-title { max-width: none; } }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-mist { background: var(--mist); }
.section-head { max-width: 760px; margin-bottom: 2.5rem; }
.section-title { font-size: clamp(1.8rem, 3.2vw, 2.55rem); line-height: 1.15; margin-bottom: .85rem; text-wrap: balance; }
.section-title.h3 { font-size: 1.6rem; }
.section-lead { font-size: 1.12rem; color: var(--ink-2); max-width: 62ch; }
.h-sub { font-family: var(--sans); font-size: 1.05rem; font-weight: 700; color: var(--forest); margin: 1.75rem 0 .9rem; }
.group-h { font-size: 1.5rem; margin: 0 0 1.25rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line); }

/* Mission band */
.band-green { background: var(--green); color: #e9f1ea; padding: clamp(3.5rem, 7vw, 5.5rem) 0; position: relative; overflow: hidden; }
.band-green::after { content: ''; position: absolute; right: -120px; top: -120px; width: 380px; height: 380px; border: 2px solid rgba(184, 144, 47, .35); border-radius: 50%; }
.band-h { color: #fff; font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 1rem; }
.mission-quote { margin: 0; position: relative; z-index: 1; }
.mission-quote p { font-family: var(--serif); font-size: clamp(1.3rem, 2.4vw, 1.95rem); line-height: 1.45; color: #fff; font-weight: 500; margin: 0; text-wrap: pretty; }
.band-body { margin-top: 1.25rem; color: #d6e4d8; }
.link-light-arrow { color: var(--gold-soft); font-weight: 600; }
.link-light-arrow:hover { color: #fff; }

/* Aims index */
.aim-index { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
@media (min-width: 992px) { .aim-index { grid-template-columns: 1fr 1fr; column-gap: 3rem; } }
.aim-row { border-bottom: 1px solid var(--line); }
.aim-row a { display: grid; grid-template-columns: 2.4rem 2.75rem 1fr; gap: .9rem; align-items: start; padding: 1.25rem .25rem; text-decoration: none; color: inherit; transition: background-color .15s; border-radius: 8px; }
.aim-row a:hover { background: var(--mist); }
.aim-row a:hover .aim-title { color: var(--green); text-decoration: underline; text-decoration-color: var(--gold); }
.aim-no { font-family: var(--serif); font-size: 1.05rem; color: var(--gold-ink); font-weight: 600; padding-top: .55rem; font-variant-numeric: tabular-nums; }
.aim-icon { width: 2.75rem; height: 2.75rem; border-radius: 50%; display: grid; place-items: center; background: var(--gold-soft); color: var(--green); font-size: 1.2rem; flex-shrink: 0; }
.aim-icon-lg { width: 3.5rem; height: 3.5rem; font-size: 1.5rem; }
.aim-text { display: flex; flex-direction: column; gap: .2rem; }
.aim-title { font-family: var(--serif); font-size: 1.22rem; font-weight: 600; color: var(--forest); line-height: 1.3; }
.aim-sum { color: var(--ink-2); font-size: .97rem; line-height: 1.55; }
.motion-ok .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease var(--d, 0ms), transform .7s cubic-bezier(.2, .7, .2, 1) var(--d, 0ms); }
.motion-ok .reveal.is-in { opacity: 1; transform: none; }

/* Stats + hierarchy chain */
.stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 2rem; margin: 3rem 0 2.5rem; }
@media (min-width: 768px) { .stat-row { grid-template-columns: repeat(5, 1fr); } }
.stat { display: flex; flex-direction: column-reverse; border-top: 3px solid var(--gold); padding-top: .9rem; margin: 0; }
.stat-num { font-family: var(--serif); font-size: clamp(2.6rem, 5vw, 3.6rem); line-height: 1; color: var(--green); font-weight: 700; margin: 0 0 .4rem; font-variant-numeric: tabular-nums; }
.stat-label { font-weight: 500; color: var(--ink-2); font-size: .95rem; line-height: 1.35; }
.chain { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.chain li { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .35rem .9rem; font-size: .88rem; font-weight: 500; color: var(--forest); position: relative; }
.chain li:not(:last-child)::after { content: '\F285'; font-family: 'bootstrap-icons'; position: absolute; right: -.62rem; top: 50%; transform: translateY(-50%); color: var(--gold); font-size: .7rem; }
.chain li:not(:last-child) { margin-right: .35rem; }
.leader-line { list-style: none; margin: 0; padding: 1.25rem 1.5rem; background: #fff; border-radius: var(--r); border-left: 4px solid var(--gold); }
.leader-line li { display: flex; flex-direction: column; }
.leader-line li + li { margin-top: .75rem; }
.leader-role { font-size: .88rem; color: var(--ink-2); }
.leader-name { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; color: var(--green); }

/* Membership fees */
.fee-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 576px) { .fee-grid { grid-template-columns: 1fr 1fr; } }
.fee { border: 1px solid var(--line); border-radius: var(--r); padding: 1.6rem 1.5rem; background: #fff; position: relative; }
.fee:first-child { border-top: 4px solid var(--leaf); }
.fee:nth-child(2) { border-top: 4px solid var(--gold); }
.fee-wide { grid-column: 1 / -1; background: var(--mist); }
.fee-name { font-family: var(--sans); font-size: 1rem; font-weight: 700; color: var(--forest); margin-bottom: .5rem; }
.fee-amount { font-family: var(--serif); font-size: 2.3rem; font-weight: 700; color: var(--green); line-height: 1.1; margin-bottom: .6rem; }
.fee-amount .cur { font-size: 1rem; font-family: var(--sans); font-weight: 700; color: var(--gold-ink); vertical-align: .9em; }
.fee-amount .per { font-size: 1rem; font-family: var(--sans); font-weight: 500; color: var(--ink-2); }
.fee-ask { font-family: var(--sans); font-size: 1rem; font-weight: 600; color: var(--ink-2); }
.fee-desc { color: var(--ink-2); font-size: .95rem; margin: 0; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 1rem 2.75rem; min-height: 2rem; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 1.95rem; height: 1.95rem; border-radius: 50%; background: var(--green); color: #fff; font-weight: 700; font-size: .9rem; display: grid; place-items: center; }
.steps li:not(:last-child)::after { content: ''; position: absolute; left: .95rem; top: 2.1rem; bottom: .2rem; width: 1px; background: var(--line); }
.doc-list { padding-left: 1.25rem; }
.doc-list li { margin-bottom: .4rem; }
.fee-table th, .fee-table td { padding: 1rem .75rem; }
.fee-table thead th { font-size: .85rem; color: var(--ink-2); font-weight: 600; border-bottom-width: 2px; }
.fee-cell { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; color: var(--green); white-space: nowrap; }
.apply-card { background: var(--mist); border-radius: var(--r); padding: 1.75rem; }
.note-box { background: var(--gold-soft); border-radius: var(--r); padding: 1.1rem 1.25rem; margin-top: 2rem; }

/* Posts / events */
.post { height: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 1.4rem; display: flex; flex-direction: column; }
.post-img { width: calc(100% + 2.8rem); max-width: none; margin: -1.4rem -1.4rem 1.1rem; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r) var(--r) 0 0; }
.post-date { font-size: .87rem; color: var(--ink-2); margin-bottom: .5rem; }
.post-title { font-size: 1.25rem; line-height: 1.3; margin-bottom: .5rem; }
.post-title a { color: var(--forest); text-decoration: none; }
.post-title a:hover { color: var(--green); text-decoration: underline; }
.post-ex { color: var(--ink-2); font-size: .97rem; }
.event-row { display: grid; grid-template-columns: 5rem 1fr; gap: 1.25rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.event-date { background: var(--green); color: #fff; border-radius: var(--r); text-align: center; padding: .6rem .3rem; height: fit-content; }
.event-date .d { display: block; font-family: var(--serif); font-size: 1.9rem; font-weight: 700; line-height: 1; }
.event-date .m { font-size: .78rem; }
.event-dl dt { font-size: .82rem; color: var(--ink-2); font-weight: 600; }
.event-dl dd { margin-bottom: .8rem; }

/* CTA strip */
.cta-strip { background: var(--forest); color: #d8e4d9; padding: 3rem 0; }
.cta-title { color: #fff; font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: .5rem; }
.cta-contacts { list-style: none; display: flex; flex-wrap: wrap; gap: 1rem 1.75rem; align-items: center; justify-content: flex-start; margin: 0; padding: 0; }
@media (min-width: 992px) { .cta-contacts { justify-content: flex-end; } }
.cta-contacts a:not(.btn) { color: #fff; text-decoration: none; font-weight: 600; display: inline-flex; gap: .5rem; align-items: center; }
.cta-contacts a:not(.btn):hover { text-decoration: underline; }
.cta-contacts i { color: var(--gold); }

/* ---------- Footer ---------- */
.site-footer { background: #0a2616; color: #c7d6ca; padding: 4rem 0 1.5rem; font-size: .95rem; }
.site-footer a { color: #e6efe7; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-logo { display: inline-grid; place-items: center; background: #fff; border-radius: 50%; width: 150px; height: 150px; padding: 12px; margin-bottom: 1rem; }
.footer-logo img { width: 112px; height: auto; }
.footer-urdu { font-family: var(--urdu); color: var(--gold-soft); font-size: 1.15rem; margin: 0 0 .5rem; text-align: left; }
.footer-tag { max-width: 34ch; }
.footer-h { font-family: var(--sans); font-size: .95rem; font-weight: 700; color: #fff; margin-bottom: 1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .5rem; }
.footer-contact { font-style: normal; }
.footer-contact p { display: flex; gap: .7rem; margin-bottom: .8rem; }
.footer-contact i { color: var(--gold); padding-top: .1rem; }
.footer-social { list-style: none; display: flex; gap: .5rem; padding: 0; margin: 1rem 0 0; }
.footer-social a { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); }
.footer-social a:hover { background: var(--gold); border-color: var(--gold); color: #1b1404; text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 3rem; padding-top: 1.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; font-size: .87rem; }
.footer-bottom p { margin: 0; }
.footer-slogan { color: var(--gold-soft); font-family: var(--serif); font-style: italic; font-size: 1rem; }

/* ---------- Inner pages ---------- */
.page-head { background: var(--mist); padding: 2.25rem 0 2.5rem; border-bottom: 1px solid var(--line); }
.breadcrumb { font-size: .88rem; margin-bottom: .9rem; --bs-breadcrumb-divider-color: var(--ink-2); }
.breadcrumb a { color: var(--green); }
.breadcrumb-item.active { color: var(--ink-2); }
.page-title { font-size: clamp(2rem, 4vw, 3rem); color: var(--green); font-weight: 700; margin: 0 0 .6rem; text-wrap: balance; }
.page-lead { font-size: 1.12rem; color: var(--ink-2); max-width: 64ch; margin: 0; }
.prose { max-width: 70ch; font-size: 1.08rem; }
.prose h2 { font-size: 1.6rem; margin: 2.2rem 0 .8rem; }
.prose h3 { font-size: 1.3rem; margin: 1.8rem 0 .6rem; }
.prose p, .prose ul, .prose ol { margin-bottom: 1.1rem; }
.prose img { border-radius: var(--r); }
.prose blockquote { border-left: 3px solid var(--gold); padding-left: 1rem; font-family: var(--serif); font-size: 1.2rem; color: var(--forest); }
.prose .ql-align-center { text-align: center; } .prose .ql-align-right { text-align: right; } .prose .ql-align-justify { text-align: justify; }
.prose-structure { max-width: none; columns: 3 300px; column-gap: 3rem; }
.prose-structure h2 { font-size: 1.2rem; margin: 0 0 .6rem; padding-top: 1rem; border-top: 2px solid var(--gold); break-after: avoid; }
.prose-structure ul { padding-left: 1.1rem; font-size: .98rem; break-inside: avoid; margin-bottom: 1.75rem; }
.prose-structure p { break-inside: avoid; }
.vm-stack { display: grid; gap: 1.25rem; }
.vm { background: var(--green); color: #fff; border-radius: var(--r); padding: 1.75rem; margin: 0; }
.vm + .vm { background: var(--forest); }
.vm-h { font-weight: 700; color: var(--gold-soft); font-size: .95rem; margin-bottom: .6rem; }
.vm blockquote { margin: 0; }
.vm blockquote p { font-family: var(--serif); font-size: 1.25rem; line-height: 1.5; margin: 0; }
.program-lead { display: flex; gap: 1.1rem; align-items: flex-start; font-family: var(--serif); font-size: 1.35rem; line-height: 1.5; color: var(--forest); }
.side-list { list-style: none; padding: 0; margin: 0 0 1.25rem; border-top: 1px solid var(--line); }
.side-list a { display: flex; gap: .6rem; padding: .6rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: .95rem; }
.side-list a:hover { color: var(--green); }
.side-list i { color: var(--gold-ink); }
.member { text-align: left; }
.member-photo { width: 100%; aspect-ratio: 5 / 6; object-fit: cover; border-radius: var(--r); background: var(--mist); margin-bottom: 1rem; }
.member-initials { display: grid; place-items: center; font-family: var(--serif); font-size: 4rem; color: var(--green); background: linear-gradient(160deg, var(--gold-soft), var(--mist)); }
.member-name { font-size: 1.25rem; margin-bottom: .15rem; }
.member-role { color: var(--gold-ink); font-weight: 600; font-size: .95rem; margin-bottom: .5rem; }
.member-bio { font-size: .95rem; color: var(--ink-2); }
.empty { background: var(--mist); border: 1px dashed #c4d0c2; border-radius: var(--r); padding: 2rem; text-align: center; color: var(--ink-2); }
.empty p { margin: 0; }

/* Forms */
.form-label { font-weight: 600; font-size: .95rem; margin-bottom: .35rem; }
.form-control, .form-select { border-radius: 8px; padding: .65rem .85rem; border-color: #c9d3c6; }
.form-check-input:checked { background-color: var(--green); border-color: var(--green); }
.form-block { border: 1px solid var(--line); border-radius: var(--r); padding: 1.5rem; margin-bottom: 1.5rem; background: #fff; }
.form-block legend { float: none; width: auto; font-family: var(--serif); font-weight: 600; font-size: 1.3rem; color: var(--green); padding: 0 .4rem; margin: 0 0 .75rem -.4rem; }
.app-form { max-width: 960px; }
.cat-pick { display: grid; gap: .75rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .cat-pick { grid-template-columns: repeat(3, 1fr); } }
.cat-option { border: 1.5px solid var(--line); border-radius: var(--r); padding: 1rem 1rem 1rem 2.5rem; margin: 0; }
.cat-option:has(input:checked) { border-color: var(--green); background: var(--mist); }
.cat-option label { display: flex; flex-direction: column; cursor: pointer; }
.cat-option label span { color: var(--ink-2); font-size: .9rem; }
.cat-pick.is-invalid .cat-option { border-color: #dc3545; }
.interest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .4rem 1rem; }
.thanks { max-width: 640px; }
.thanks-icon { font-size: 3rem; color: var(--leaf); }
.ref { font-family: var(--serif); color: var(--green); letter-spacing: .03em; }

/* Verify */
.verify-wrap { max-width: 640px; }
.verify-result { margin-top: 1.75rem; border-radius: var(--r); padding: 1.5rem; border: 1px solid var(--line); }
.verify-result.is-valid { border-left: 5px solid var(--leaf); background: #f3f9ef; }
.verify-result.is-expired { border-left: 5px solid var(--gold); background: #fdf8ea; }
.verify-result.is-missing { border-left: 5px solid #9aa79c; background: var(--mist); }
.verify-status { font-weight: 700; font-size: 1.15rem; display: flex; align-items: center; gap: .5rem; color: var(--forest); }
.is-valid .verify-status i { color: var(--leaf); } .is-expired .verify-status i { color: var(--gold-ink); }
.verify-dl { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.5rem; margin: 0; }
.verify-dl dt { color: var(--ink-2); font-weight: 500; }
.verify-dl dd { margin: 0; font-weight: 600; }

/* Downloads, contact, gallery, FAQ */
.dl-list { list-style: none; padding: 0; margin: 0 0 3rem; }
.dl-list li { display: flex; gap: 1rem; align-items: center; padding: 1.1rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.dl-icon { font-size: 2rem; color: #b3261e; }
.dl-text { flex: 1 1 260px; }
.dl-title { font-family: var(--sans); font-size: 1.05rem; font-weight: 700; margin: 0 0 .2rem; }
.dl-meta { font-weight: 400; opacity: .75; margin-left: .35rem; font-size: .85em; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: flex; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.contact-list > li > i { font-size: 1.3rem; color: var(--green); width: 2.75rem; height: 2.75rem; display: grid; place-items: center; background: var(--gold-soft); border-radius: 50%; flex-shrink: 0; }
.contact-list h2 { margin-bottom: .2rem; }
.map-wrap iframe { display: block; width: 100%; height: 380px; border: 0; filter: saturate(.85); }
.album-filter { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.75rem; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: .35rem .95rem; text-decoration: none; color: var(--ink); font-size: .92rem; }
.chip:hover { border-color: var(--green); color: var(--green); }
.chip.active { background: var(--green); color: #fff; border-color: var(--green); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.g-item { margin: 0; }
.g-open { border: 0; padding: 0; background: none; width: 100%; border-radius: var(--r); overflow: hidden; display: block; }
.g-open img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .35s ease; }
.g-open:hover img { transform: scale(1.04); }
.g-item figcaption { font-size: .9rem; color: var(--ink-2); margin-top: .4rem; }
.faq-acc .accordion-item { border: 0; border-bottom: 1px solid var(--line); background: transparent; }
.faq-acc .accordion-button { font-family: var(--serif); font-size: 1.18rem; font-weight: 600; color: var(--forest); background: transparent; padding: 1.2rem 0; box-shadow: none; }
.faq-acc .accordion-button:not(.collapsed) { color: var(--green); }
.faq-acc .accordion-button::after { background-image: none; content: '\F64D'; font-family: 'bootstrap-icons'; color: var(--gold-ink); transform: none; width: auto; height: auto; }
.faq-acc .accordion-button:not(.collapsed)::after { content: '\F63B'; }
.faq-acc .accordion-body { padding: 0 0 1.4rem; color: var(--ink); max-width: 75ch; }
.faq-ur { margin-top: 1rem; padding: .75rem 1rem; background: var(--mist); border-radius: var(--r-sm); text-align: right; }
.faq-ur-q { font-weight: 700; margin-bottom: .25rem; }

/* ---------- Chatbot ---------- */
.chat { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1080; }
.chat-launcher { display: inline-flex; align-items: center; gap: .55rem; background: var(--green); color: #fff; border: 0; border-radius: 999px; padding: .85rem 1.25rem; font-weight: 600; box-shadow: 0 12px 28px -10px rgba(12, 46, 27, .6); transition: transform .2s, opacity .2s, background-color .2s; }
.chat-launcher:hover { background: var(--forest); transform: translateY(-2px); }
.chat-launcher i { font-size: 1.2rem; color: var(--gold-soft); }
.chat-launcher.is-hidden { opacity: 0; pointer-events: none; transform: scale(.9); }
.chat-panel { position: absolute; right: 0; bottom: 0; width: min(380px, calc(100vw - 2rem)); height: min(600px, calc(100vh - 2.5rem)); background: #fff; border-radius: 16px; box-shadow: 0 24px 60px -18px rgba(12, 46, 27, .45), 0 0 0 1px rgba(12, 46, 27, .08); display: flex; flex-direction: column; overflow: hidden; opacity: 0; transform: translateY(12px) scale(.98); transform-origin: bottom right; transition: opacity .18s ease, transform .18s ease; }
.chat-panel.is-open { opacity: 1; transform: none; }
.chat-panel[hidden] { display: none; }
.chat-head { display: flex; align-items: center; gap: .65rem; padding: .8rem .9rem; background: var(--green); color: #fff; }
.chat-head img { background: #fff; border-radius: 50%; padding: 3px; width: 40px; height: 40px; object-fit: contain; }
.chat-head-text { flex: 1; min-width: 0; }
.chat-title { font-family: var(--sans); font-size: 1rem; font-weight: 700; margin: 0; color: #fff; }
.chat-sub { font-size: .76rem; margin: 0; color: #cfe0d2; line-height: 1.5; }
.chat-lang { display: inline-flex; background: rgba(255, 255, 255, .12); border-radius: 999px; padding: 2px; }
.chat-lang button { border: 0; background: transparent; color: #fff; font-size: .78rem; font-weight: 600; padding: .2rem .55rem; border-radius: 999px; line-height: 1.6; }
.chat-lang button[lang="ur"] { font-family: var(--urdu); line-height: 1.9; padding-top: 0; padding-bottom: 0; }
.chat-lang button[aria-pressed="true"] { background: var(--gold); color: #1b1404; }
.chat-close { border: 0; background: transparent; color: #fff; padding: .3rem .4rem; border-radius: 6px; }
.chat-close:hover { background: rgba(255, 255, 255, .15); }
.chat-log { flex: 1; overflow-y: auto; padding: 1rem; background: var(--mist); display: flex; flex-direction: column; gap: .65rem; }
.msg { display: flex; flex-direction: column; max-width: 88%; }
.msg-user { align-self: flex-end; align-items: flex-end; }
.msg-bot { align-self: flex-start; align-items: flex-start; }
.chat-panel[dir="rtl"] .msg-user { align-self: flex-start; align-items: flex-start; }
.chat-panel[dir="rtl"] .msg-bot { align-self: flex-end; align-items: flex-end; }
.bubble { padding: .6rem .85rem; border-radius: 14px; font-size: .94rem; line-height: 1.55; word-wrap: break-word; overflow-wrap: anywhere; }
.msg-bot .bubble { background: #fff; color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg-user .bubble { background: var(--green); color: #fff; border-bottom-right-radius: 4px; }
.msg.is-ur .bubble { font-family: var(--urdu); font-size: 1rem; line-height: 2.15; text-align: right; }
.bubble a { color: var(--green); font-weight: 600; word-break: break-all; }
.msg-user .bubble a { color: #fff; }
.msg-tag { font-size: .7rem; color: var(--ink-2); margin-top: .2rem; }
.msg-actions { display: flex; gap: .4rem; margin-top: .35rem; }
.msg-typing .bubble { display: inline-flex; gap: 4px; padding: .8rem .9rem; }
.msg-typing .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-2); opacity: .4; animation: blink 1.2s infinite; }
.msg-typing .dot:nth-child(2) { animation-delay: .2s; } .msg-typing .dot:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: .9; transform: translateY(-2px); } }
.chat-sugg { display: flex; flex-wrap: wrap; gap: .4rem; padding: .6rem .9rem 0; background: #fff; }
.chat-chip { border: 1px solid var(--line); background: #fff; color: var(--green); border-radius: 999px; padding: .3rem .75rem; font-size: .82rem; font-weight: 600; }
.chat-chip:hover { border-color: var(--green); background: var(--mist); }
.chat-panel[lang="ur"] .chat-chip { font-family: var(--urdu); font-weight: 500; line-height: 2; padding: .1rem .75rem; }
.chat-form { display: flex; gap: .5rem; padding: .7rem .9rem; background: #fff; align-items: flex-end; }
.chat-form textarea { flex: 1; resize: none; border: 1px solid #c9d3c6; border-radius: 12px; padding: .55rem .75rem; font-size: .95rem; max-height: 120px; line-height: 1.45; }
.chat-form textarea:focus { outline: 0; border-color: var(--green-2); box-shadow: 0 0 0 .2rem rgba(184, 144, 47, .3); }
.chat-panel[lang="ur"] .chat-form textarea { font-family: var(--urdu); line-height: 2; }
.chat-send { border: 0; background: var(--gold); color: #1b1404; width: 2.6rem; height: 2.6rem; border-radius: 50%; flex-shrink: 0; }
.chat-send:hover { background: #a37e25; color: #fff; }
.chat-send:disabled { opacity: .5; }
.chat-note { font-size: .7rem; color: var(--ink-2); padding: 0 .9rem .7rem; margin: 0; background: #fff; line-height: 1.45; }
.chat-panel[lang="ur"] .chat-note, .chat-panel[lang="ur"] .chat-sub { font-family: var(--urdu); line-height: 2; }
@media (max-width: 575.98px) {
  .chat { right: .75rem; bottom: .75rem; }
  .chat-launcher-text { display: none; }
  .chat-launcher { padding: .95rem; }
  .chat-panel { position: fixed; inset: auto .5rem .5rem .5rem; width: auto; height: min(78vh, 620px); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .topbar, .site-header, .chat, .site-footer, .cta-strip { display: none !important; }
}

/* ---------- Layout fixes ---------- */
@media (max-width: 767.98px) {
  .container { padding-left: 1rem; padding-right: 1rem; }
  .row.g-5, .row.g-4 { --bs-gutter-x: 2rem; }
}
.navbar-nav .nav-link, .nav-cta .btn { white-space: nowrap; }
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .navbar-nav .nav-link { padding: .5rem .55rem !important; font-size: .93rem; }
  .brand { margin-right: .75rem; }
  .nav-cta { margin-left: .4rem; }
}
.footer-contact a, .contact-list a { overflow-wrap: anywhere; }
.member-initials { aspect-ratio: 1; max-width: 150px; font-size: 3rem; }
.chat-panel [lang="en"], .chat-panel [lang="en"] .bubble { font-family: var(--sans); line-height: 1.55; }
.form-check-input { border-color: #7d8f82; }
.form-control::placeholder { color: #8a978e; }
.topbar-list a { display: inline-flex; gap: .4rem; align-items: center; }

/* =====================================================================
   Motion layer (all disabled automatically under prefers-reduced-motion)
   ===================================================================== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes spinSlow { to { transform: rotate(250deg); } }
@keyframes ripple { 0% { box-shadow: 0 0 0 0 rgba(184, 144, 47, .55); } 100% { box-shadow: 0 0 0 18px rgba(184, 144, 47, 0); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* Hero: staggered entrance, floating emblem, slowly turning arc */
.motion-ok .hero .hero-urdu, .motion-ok .hero .hero-title, .motion-ok .hero .hero-lead, .motion-ok .hero .hero-actions, .motion-ok .hero .hero-tagline { opacity: 0; }
.motion-ok .hero.is-ready .hero-urdu { animation: fadeUp .7s ease .05s both; }
.motion-ok .hero.is-ready .hero-title { animation: fadeUp .8s cubic-bezier(.2, .7, .2, 1) .18s both; }
.motion-ok .hero.is-ready .hero-lead { animation: fadeUp .8s ease .34s both; }
.motion-ok .hero.is-ready .hero-actions { animation: fadeUp .8s ease .5s both; }
.motion-ok .hero.is-ready .hero-tagline { animation: fadeUp .8s ease .64s both; }
.motion-ok .hero.is-ready .hero-mark { animation: floatY 6s ease-in-out 1.4s infinite; }
.motion-ok .hero.is-ready .hero-arc { animation: spinSlow 60s linear 2s infinite alternate; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .motion-ok .hero-title { background: linear-gradient(90deg, var(--green) 0%, var(--green) 40%, var(--leaf) 50%, var(--green) 60%, var(--green) 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }
}
.motion-ok .hero.is-ready .hero-title { animation: fadeUp .8s cubic-bezier(.2, .7, .2, 1) .18s both, shimmer 3.5s ease-in-out 1.2s 1; }

/* Inner page header */
.motion-ok .page-head .breadcrumb { animation: fadeIn .5s ease both; }
.motion-ok .page-head .page-title { animation: fadeUp .7s cubic-bezier(.2, .7, .2, 1) .08s both; }
.motion-ok .page-head .page-lead { animation: fadeUp .7s ease .2s both; }

/* Navigation: underline slide + animated dropdown */
.navbar-nav .nav-link { box-shadow: none !important; }
.navbar-nav .nav-link:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }
@media (min-width: 1200px) {
.navbar-nav .nav-link:not(.dropdown-toggle):not(.btn) { position: relative; }
.navbar-nav .nav-link:not(.dropdown-toggle)::before { content: ''; position: absolute; left: .7rem; right: .7rem; bottom: .25rem; height: 2px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.navbar-nav .nav-link:not(.dropdown-toggle):hover::before, .navbar-nav .nav-link.active::before { transform: scaleX(1); }
}
@media (min-width: 1200px) {
  .navbar .dropdown-menu { margin-top: 0; }
  .navbar .dropdown-menu.show { animation: fadeUp .22s ease both; }
  .navbar .dropdown:hover > .nav-link { color: var(--green); background: var(--mist); }
}
.dropdown-item { transition: background-color .15s, color .15s, padding-left .2s; }
.dropdown-item:hover { padding-left: 1.1rem; }

/* Cards & interactive blocks: gentle lift */
.fee, .post, .member, .apply-card, .vm, .stat-card, .dl-list li, .contact-list li { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, opacity .6s ease var(--d, 0ms); }
.fee:hover, .post:hover, .apply-card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px -22px rgba(12, 46, 27, .45); border-color: #c9d6c6; }
.member:hover .member-photo { transform: scale(1.02); }
.member-photo { transition: transform .35s ease; }
.vm:hover { transform: translateY(-3px); }
.aim-row a:hover .aim-icon { transform: rotate(-8deg) scale(1.08); background: var(--gold); color: #fff; }
.aim-icon { transition: transform .25s ease, background-color .25s, color .25s; }
.btn { transition: transform .15s ease, background-color .2s, border-color .2s, color .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.chain li { transition: background-color .2s, color .2s; }
.chain li:hover { background: var(--green); color: #fff; }

/* Chat launcher: one gentle ripple to signal it exists */
.motion-ok .chat-launcher { animation: ripple 1.6s ease-out 3s 2; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* Follow-us band */
.social-band { background: linear-gradient(180deg, #fff, var(--mist)); }
.social-handle { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--gold-ink); margin: -.25rem 0 .6rem; }
.social-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 576px) { .social-grid { grid-template-columns: repeat(4, 1fr); } }
.social-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .45rem; padding: 1.1rem .5rem; border-radius: var(--r); background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--forest); font-weight: 600; font-size: .92rem; transition: transform .2s ease, box-shadow .2s ease, background-color .2s, color .2s; }
.social-tile i { font-size: 1.6rem; color: var(--green); transition: color .2s, transform .25s; }
.social-tile:hover, .social-tile:focus-visible { background: var(--green); color: #fff; transform: translateY(-4px); box-shadow: 0 16px 30px -18px rgba(12, 46, 27, .55); }
.social-tile:hover i, .social-tile:focus-visible i { color: var(--gold-soft); transform: scale(1.12); }
.footer-social { flex-wrap: wrap; }
.footer-bottom .footer-credit { width: 100%; text-align: center; margin-top: .75rem; padding-top: .75rem; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .85rem; color: #9fb5a6; }
.footer-bottom .footer-credit a { color: var(--gold-soft); font-weight: 600; }
.footer-bottom .footer-credit a:hover { color: #fff; }
