/* ==========================================================================
   Arain Community Pakistan — public stylesheet
   Colours come from Admin > Settings (printed as CSS variables in <head>):
     --primary  leaf green     --accent  saffron     --ink  logo navy
   ========================================================================== */

:root {
  --primary: #1F6B35; --primary-rgb: 31,107,53;
  --accent:  #F2A51A; --accent-rgb: 242,165,26;
  --ink:     #1E2A5A; --ink-rgb: 30,42,90;

  --bg: #FBF8F2;
  --surface: #FFFFFF;
  --tint: #F4EFE4;
  --line: #E7DFCF;
  --text: #2B2F3A;
  --muted: #5E6371;

  --font-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-head: "Lora", Georgia, "Times New Roman", serif;
  --font-urdu: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", serif;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(30,42,90,.05), 0 8px 24px -12px rgba(30,42,90,.18);
  --container: 1180px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 .5em;
  letter-spacing: -.005em;
}
h1 { font-size: clamp(1.65rem, 3.2vw, 2.35rem); }
h2 { font-size: clamp(1.3rem, 2.3vw, 1.65rem); }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid rgba(var(--accent-rgb), .9); outline-offset: 2px; border-radius: 3px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 780px; }
.center { text-align: center; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 600 .98rem/1.2 var(--font-body);
  padding: .72em 1.2em;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-lg { font-size: .98rem; padding: .8em 1.4em; }
.btn-sm { font-size: .88rem; padding: .5em .9em; }
.btn-block { width: 100%; }
.btn-register { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.btn-register:hover { color: var(--ink); background: #fff; border-color: var(--accent); box-shadow: 0 6px 18px -8px rgba(var(--accent-rgb), .9); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-outline { background: transparent; color: var(--ink); border-color: rgba(var(--ink-rgb), .35); }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); background: rgba(var(--ink-rgb), .04); }

.text-link { font-weight: 600; text-decoration: none; color: var(--primary); }
.text-link span { display: inline-block; transition: transform .2s var(--ease); }
.text-link:hover span { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s var(--ease);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(255,255,255,.88); backdrop-filter: saturate(1.4) blur(10px); }
}
.site-header.is-scrolled { box-shadow: 0 6px 20px -16px rgba(30,42,90,.45); }
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 72px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); margin-right: auto; min-width: 0; }
.brand-logo { width: 58px; height: auto; border-radius: 6px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text strong { font-family: var(--font-head); font-weight: 600; font-size: .98rem; }
.brand-text small { font-size: .8rem; color: var(--primary); letter-spacing: .04em; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-link { display: inline-flex; padding: 8px; color: var(--ink); border-radius: var(--radius-sm); }
.icon-link:hover { background: var(--tint); }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--radius-sm); cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s;
  position: relative;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Mobile navigation (default) */
.main-nav {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 30px -24px rgba(30,42,90,.45);
  padding: 8px 20px 24px;
  display: none;
  max-height: calc(100vh - 72px); overflow-y: auto;
}
.main-nav.is-open { display: block; animation: navIn .25s var(--ease); }
@keyframes navIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list > li { border-bottom: 1px solid var(--line); }
.nav-list a, .sub-toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 13px 2px; color: var(--ink); text-decoration: none; font: 500 1.02rem var(--font-body);
  background: none; border: 0; cursor: pointer; text-align: left;
}
.nav-list a[aria-current="page"] { color: var(--primary); font-weight: 600; }
.caret { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.sub-toggle[aria-expanded="true"] .caret { transform: rotate(-135deg) translateY(-2px); }
.sub-menu { list-style: none; margin: 0 0 8px; padding: 0 0 0 14px; display: none; border-left: 2px solid rgba(var(--primary-rgb), .25); }
.sub-menu.is-open { display: block; }
.sub-menu a { padding: 9px 2px; font-size: .98rem; }
.nav-search { display: flex; gap: 8px; margin: 18px 0 14px; }
.nav-search input { flex: 1; min-width: 0; }
.nav-register { width: 100%; }
.header-register { display: none; }

@media (min-width: 640px) {
  .header-register { display: inline-flex; }
  .nav-register { display: none; }
}

/* Desktop navigation */
@media (min-width: 1200px) {
  .nav-toggle, .nav-search { display: none; }
  .main-nav {
    position: static; display: block; padding: 0; border: 0; box-shadow: none;
    background: transparent; max-height: none; overflow: visible; animation: none;
  }
  .nav-list { display: flex; align-items: center; gap: 2px; }
  .nav-list > li { border: 0; position: relative; }
  .nav-list a, .sub-toggle { padding: 8px 9px; font-size: .95rem; border-radius: var(--radius-sm); width: auto; gap: 6px; white-space: nowrap; }
  .brand-text strong { white-space: nowrap; }
  .brand { flex-shrink: 0; }
  .header-inner { gap: 14px; }
  .nav-list > li > a::after {
    content: ""; position: absolute; left: 9px; right: 9px; bottom: 2px; height: 2px;
    background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
  }
  .nav-list > li > a:hover::after, .nav-list > li > a[aria-current="page"]::after { transform: scaleX(1); }
  .nav-list a[aria-current="page"] { color: var(--ink); font-weight: 600; }
  .has-sub.is-active > .sub-toggle { font-weight: 600; }
  .sub-menu {
    position: absolute; top: calc(100% + 6px); left: 0; min-width: 230px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 8px; margin: 0;
  }
  .has-sub:hover .sub-menu, .has-sub:focus-within .sub-menu { display: block; }
  .sub-menu a { padding: 9px 12px; }
  .sub-menu a:hover { background: var(--tint); }
}

/* ---------- Hero ---------- */
.hero { padding: 56px 0 64px; border-bottom: 1px solid var(--line); background: var(--bg); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: auto -10% -60% auto; width: 520px; height: 520px; border-radius: 50%;
  border: 1px dashed rgba(var(--primary-rgb), .18);
  pointer-events: none;
}
.hero-grid { display: grid; gap: 40px; align-items: center; position: relative; }
.hero-urdu {
  font-family: var(--font-urdu); font-size: 1.25rem; line-height: 2.1; color: var(--ink);
  margin: 0 0 4px; text-align: left; direction: rtl; display: inline-block;
}
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: .82rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--accent); }
.hero h1 { max-width: 15ch; }
.hero-text { font-size: 1.02rem; color: var(--muted); max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-emblem { display: flex; justify-content: center; }
.emblem-frame { position: relative; max-width: 440px; width: 100%; }
@media (max-width: 899px) { .emblem-frame { max-width: 320px; } }
@media (max-width: 600px) { .emblem-frame::before { inset: 10px -6px -10px 10px !important; } }
.emblem-frame::before {
  content: ""; position: absolute; inset: 14px -14px -14px 14px;
  border: 1.5px solid rgba(var(--primary-rgb), .35); border-radius: 16px;
}
.emblem-frame img { position: relative; border-radius: 14px; box-shadow: var(--shadow); width: 100%; }

@media (min-width: 900px) {
  .hero { padding: 64px 0 72px; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 64px; }
}

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-tint { background: var(--tint); }
.section-title { margin-bottom: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
@media (min-width: 900px) { .section { padding: 64px 0; } }

.intro-grid { display: grid; gap: 20px; }
.intro-text p { font-size: 1.06rem; line-height: 1.75; color: var(--text); }
@media (min-width: 900px) { .intro-grid { grid-template-columns: 1fr 2fr; gap: 64px; } }

.pillars-section { padding-top: 0; }
.pillars { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.pillar { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--primary); border-radius: var(--radius); padding: 24px; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.pillar:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.pillar-num { font-family: var(--font-head); color: var(--accent); font-size: 1.05rem; font-weight: 600; display: block; margin-bottom: 8px; filter: brightness(.85); }
.pillar h3 { margin-bottom: 6px; }
.pillar p { margin: 0; color: var(--muted); font-size: 1rem; }
@media (min-width: 640px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .pillars { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: 40px 0 36px; background: var(--tint); border-bottom: 1px solid var(--line); }
.page-hero h1 { margin-bottom: .25em; max-width: 26ch; }
.page-hero .lead { font-size: 1.02rem; color: var(--muted); max-width: 62ch; margin: 0; }
@media (min-width: 900px) { .page-hero { padding: 44px 0 38px; } }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; font-size: .9rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); color: rgba(var(--ink-rgb), .3); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary); text-decoration: underline; }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: 24px; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-media { display: block; text-decoration: none; aspect-ratio: 16 / 10; background: var(--tint); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-media img { transform: scale(1.03); }
.card-placeholder {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  font: 600 2.2rem var(--font-head); letter-spacing: .2em; color: rgba(var(--primary-rgb), .35);
  background: linear-gradient(135deg, rgba(var(--primary-rgb), .06), rgba(var(--accent-rgb), .12));
}
.card-body { padding: 20px 22px 24px; }
.card-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.card-meta span { color: var(--primary); font-weight: 600; }
.card-title { font-size: 1.05rem; margin-bottom: 8px; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--primary); }
.card-text { color: var(--muted); font-size: 1rem; margin: 0; }

/* ---------- Events ---------- */
.event-list { display: grid; gap: 16px; }
.event-item { display: flex; gap: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; transition: box-shadow .25s var(--ease); }
.event-item:hover { box-shadow: var(--shadow); }
.event-date {
  flex-shrink: 0; width: 76px; text-align: center; border-radius: var(--radius-sm);
  border: 1px solid rgba(var(--primary-rgb), .25); padding: 8px 4px; align-self: flex-start; background: rgba(var(--primary-rgb), .04);
}
.event-date span { display: block; line-height: 1.15; }
.event-date .d { font: 600 1.8rem var(--font-head); color: var(--primary); }
.event-date .m { text-transform: uppercase; font-weight: 600; letter-spacing: .1em; font-size: .8rem; color: var(--ink); }
.event-date .y { font-size: .78rem; color: var(--muted); }
.event-body h3 { margin-bottom: 4px; }
.event-body h3 a { color: var(--ink); text-decoration: none; }
.event-body h3 a:hover { color: var(--primary); }
.event-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .92rem; color: var(--muted); margin-bottom: 6px; }
.event-meta span::before { content: "·"; margin-right: 14px; }
.event-text { margin: 0; font-size: 1rem; }

.event-layout { display: grid; gap: 36px; }
@media (min-width: 900px) { .event-layout { grid-template-columns: 1fr 320px; align-items: start; } }
.event-details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 12px; position: sticky; top: 96px; }
.event-details h2 { font-size: 1.2rem; margin: 0; }
.event-details dl { margin: 0; }
.event-details dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.event-details dd { margin: 2px 0 12px; }
.badge { display: inline-block; background: var(--tint); color: var(--ink); font-size: .85rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; margin: 0; justify-self: start; }

/* ---------- Leadership ---------- */
.leader-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.leader { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-align: center; }
.leader h2, .leader h3 { font-size: 1.15rem; margin: 14px 0 2px; }
.leader-photo { width: 132px; height: 132px; margin: 0 auto; border-radius: 50%; overflow: hidden; background: var(--tint); border: 3px solid #fff; box-shadow: 0 0 0 1.5px rgba(var(--primary-rgb), .35); }
.leader-photo img { width: 100%; height: 100%; object-fit: cover; }
.leader-initials { display: flex; align-items: center; justify-content: center; height: 100%; font: 600 2.2rem var(--font-head); color: var(--primary); }
.leader-position { color: var(--primary); font-weight: 600; font-size: .95rem; margin: 0; }
.leader-bio { margin-top: 12px; text-align: left; font-size: .97rem; }
.leader-bio summary { cursor: pointer; color: var(--ink); font-weight: 600; text-align: center; list-style-position: inside; }
.leader-bio p { margin: 10px 0 0; color: var(--muted); }
.leader-links { display: flex; justify-content: center; gap: 14px; margin: 12px 0 0; font-size: .92rem; }

/* ---------- Gallery ---------- */
.gallery-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }
.gallery-item { display: block; position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-sm); background: var(--tint); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 10px; color: #fff; font-size: .9rem;
  background: linear-gradient(transparent, rgba(20,24,40,.7)); opacity: 0; transition: opacity .25s;
}
.gallery-item:hover .gallery-caption, .gallery-item:focus-visible .gallery-caption { opacity: 1; }

.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); max-height: 92vh; overflow: visible; }
.lightbox::backdrop { background: rgba(15,18,32,.88); }
.lightbox figure { margin: 0; }
.lightbox img { max-height: 82vh; width: auto; margin: 0 auto; border-radius: var(--radius-sm); }
.lightbox figcaption { color: #fff; text-align: center; padding-top: 10px; }
.lightbox-close { position: absolute; top: -44px; right: 0; width: 40px; height: 40px; font-size: 1.8rem; line-height: 1; color: #fff; background: transparent; border: 0; cursor: pointer; }

/* ---------- Article & prose ---------- */
.article-meta { display: flex; gap: 14px; color: var(--muted); font-size: .95rem; margin-bottom: 10px; }
.article-meta span { color: var(--primary); font-weight: 600; }
.feature-image { margin: 0 0 32px; }
.feature-image img { width: 100%; border-radius: var(--radius); }
.prose { font-size: 1.02rem; line-height: 1.8; }
.prose h2 { font-size: 1.35rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.15rem; margin-top: 1.4em; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--primary); }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--accent); font-family: var(--font-head); font-size: 1.2rem; color: var(--ink); }
.prose img { border-radius: var(--radius-sm); margin: 1.5em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 1rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.prose th { background: var(--tint); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.updated-note { margin-top: 32px; color: var(--muted); font-size: .9rem; }

.article-footer { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.tag-list a { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--tint); text-decoration: none; font-size: .92rem; color: var(--ink); }
.tag-list a:hover { background: rgba(var(--primary-rgb), .12); }
.share { display: flex; gap: 14px; align-items: center; font-size: .95rem; }
.share span { color: var(--muted); }

.inline-cta { margin-top: 40px; padding: 24px; border-radius: var(--radius); background: rgba(var(--primary-rgb), .06); border: 1px solid rgba(var(--primary-rgb), .18); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.inline-cta p { margin: 0; font-weight: 600; color: var(--ink); }

/* ---------- Chips / filters ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chips a { padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); font-size: .95rem; transition: all .2s; }
.chips a:hover { border-color: var(--primary); }
.chips a[aria-current="page"] { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Pagination ---------- */
.pagination ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 40px 0 0; padding: 0; }
.pagination a, .pagination span { display: inline-flex; min-width: 42px; height: 42px; align-items: center; justify-content: center; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); text-decoration: none; color: var(--ink); background: var(--surface); }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination span[aria-current] { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination .gap { align-self: center; color: var(--muted); }

/* ---------- Forms ---------- */
input[type=text], input[type=email], input[type=tel], input[type=search], textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  padding: 11px 14px; border: 1px solid #D9D1C0; border-radius: var(--radius-sm); background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .15); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #B3261E; }
.form { display: grid; gap: 18px; }
.form > .btn { justify-self: start; }
.form-row { display: grid; gap: 18px; }
@media (min-width: 640px) { .form-row.two { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-weight: 600; color: var(--ink); margin-bottom: 6px; font-size: .97rem; }
.optional { color: var(--muted); font-weight: 400; }
.field-error { color: #B3261E; font-size: .9rem; margin: 6px 0 0; }
.form-note { font-size: .92rem; color: var(--muted); margin: 0; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; border: 1px solid; }
.alert-success { background: #EEF6EF; border-color: #BFD9C4; color: #1D4D2A; }
.alert-error { background: #FBEEEC; border-color: #EDC4BE; color: #7A1F17; }
.alert-warning { background: #FFF6E5; border-color: #F2D9A6; color: #6B4A06; }

.contact-layout { display: grid; gap: 40px; }
@media (min-width: 900px) { .contact-layout { grid-template-columns: 340px 1fr; gap: 64px; } }
.contact-info dl { margin: 0 0 28px; }
.contact-info dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; margin-top: 14px; }
.contact-info dd { margin: 2px 0 0; }
.contact-register { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.contact-register h3 { margin-bottom: 4px; }
.contact-form-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
@media (min-width: 640px) { .contact-form-wrap { padding: 36px; } }

.search-form { display: flex; gap: 10px; margin-bottom: 32px; }
.search-form input { flex: 1; min-width: 0; }
.results { list-style: none; margin: 0 0 32px; padding: 0; }
.results li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.results li > a { font: 600 1.15rem var(--font-head); text-decoration: none; color: var(--ink); }
.results li > a:hover { color: var(--primary); }
.results p { margin: 4px 0 0; color: var(--muted); }
.results-meta { display: block; font-size: .88rem; color: var(--muted); }
.results-title { font-size: 1.2rem; margin-top: 12px; }

/* ---------- Empty / 404 ---------- */
.empty-state { text-align: center; padding: 48px 20px; border: 1px dashed var(--line); border-radius: var(--radius); background: rgba(255,255,255,.6); }
.empty-title { font: 600 1.15rem var(--font-head); color: var(--ink); margin-bottom: 4px; }
.empty-state p:last-child { margin: 0; color: var(--muted); }
.not-found { padding: 80px 0 100px; }
.not-found-code { font: 600 4rem/1 var(--font-head); color: rgba(var(--primary-rgb), .25); margin: 0 0 10px; }
.not-found .search-form { max-width: 480px; margin: 28px auto; }
.not-found-links { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--primary); color: #fff; padding: 56px 0; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); }
.cta-inner { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.cta-band h2 { color: #fff; margin-bottom: 6px; }
.cta-band p { margin: 0; color: rgba(255,255,255,.85); max-width: 58ch; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.78); font-size: .98rem; }
.footer-grid { display: grid; gap: 36px; padding-top: 56px; padding-bottom: 48px; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 48px; } }
.footer-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; font: 600 1.15rem var(--font-head); margin-bottom: 14px; }
.footer-brand img { width: 64px; border-radius: 6px; }
.footer-about p { max-width: 38ch; }
.footer-title { font: 600 .82rem var(--font-body); text-transform: uppercase; letter-spacing: .14em; color: var(--accent); margin-bottom: 14px; }
.footer-links, .footer-contact, .footer-social { list-style: none; margin: 0; padding: 0; }
.footer-links li, .footer-contact li { margin-bottom: 8px; }
.site-footer a { color: rgba(255,255,255,.85); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .btn-register { color: var(--ink); text-decoration: none; }
.footer-social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.footer-social a { display: inline-block; padding: 5px 12px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; font-size: .9rem; }
.footer-social a:hover { border-color: var(--accent); text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; font-size: .9rem; }
.footer-bottom-inner { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; align-items: center; }
.footer-bottom p { margin: 0; }
.footer-bottom ul { list-style: none; display: flex; flex-wrap: wrap; gap: 18px; margin: 0; padding: 0; }

/* ---------- Offices map & organizational structure ---------- */
.office-map-wrap { display: grid; gap: 28px; align-items: start; }
@media (min-width: 960px) { .office-map-wrap:not(.no-map) { grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); } }
.office-map {
  position: relative; margin: 0; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden;
}
.office-map > img { width: 100%; height: auto; display: block; }
.js .office-map > img { opacity: 0; transform: scale(1.02); transition: opacity .9s var(--ease), transform 1.2s var(--ease); }
.js .office-map.is-visible > img { opacity: 1; transform: none; }

.pin {
  position: absolute; width: 30px; height: 30px; padding: 0; margin: 0; border: 0; background: transparent;
  transform: translate(-50%, -50%); cursor: pointer; z-index: 2; border-radius: 50%;
}
.pin-dot {
  position: absolute; inset: 8px; border-radius: 50%; background: var(--primary);
  border: 2px solid #fff; box-shadow: 0 2px 6px rgba(20,24,40,.35); transition: transform .2s var(--ease);
}
.pin-pulse { position: absolute; inset: 8px; border-radius: 50%; background: rgba(var(--primary-rgb), .45); }
.pin-head { width: 40px; height: 40px; z-index: 3; }
.pin-head .pin-dot { inset: 10px; background: var(--accent); border-color: var(--ink); border-width: 3px; }
.pin-head .pin-pulse { inset: 10px; background: rgba(var(--accent-rgb), .55); }
.pin-provincial .pin-dot { background: var(--ink); }
.pin-provincial .pin-pulse { background: rgba(var(--ink-rgb), .35); }
.pin:hover .pin-dot, .pin.is-active .pin-dot, .pin:focus-visible .pin-dot { transform: scale(1.35); }
.pin.is-active { z-index: 5; }

/* Pins drop in one after another, then breathe gently. */
.js .office-map .pin { opacity: 0; }
.js .office-map.is-visible .pin { animation: pinDrop .7s var(--ease) both; animation-delay: calc(.35s + var(--i, 0) * 90ms); }
.office-map.is-visible .pin-pulse { animation: pinPulse 2.6s ease-out infinite; animation-delay: calc(1s + var(--i, 0) * 180ms); }
@keyframes pinDrop {
  0%   { opacity: 0; transform: translate(-50%, -160%) scale(.6); }
  60%  { opacity: 1; transform: translate(-50%, -40%) scale(1.08); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes pinPulse {
  0%   { transform: scale(1); opacity: .8; }
  70%  { transform: scale(3.2); opacity: 0; }
  100% { transform: scale(3.2); opacity: 0; }
}

.map-card {
  position: absolute; z-index: 10; width: min(290px, 78%); background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 18px 40px -16px rgba(20,24,40,.45);
  padding: 16px 18px; font-size: .95rem; animation: cardIn .25s var(--ease);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.map-card h3 { font-size: 1.1rem; margin: 0 26px 2px 0; }
.map-card .mc-level { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--primary); margin: 0 0 6px; }
.map-card p { margin: 0 0 4px; }
.map-card .mc-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.map-card .mc-links a { font-weight: 600; font-size: .9rem; }
.map-card .mc-close { position: absolute; top: 8px; right: 10px; border: 0; background: none; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--muted); }

.office-list { display: grid; gap: 18px; max-height: 640px; overflow-y: auto; padding-right: 4px; }
.no-map .office-list { max-height: none; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.office-group h3 { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin: 0 0 8px; }
.office-group h3 span { font: 600 .75rem var(--font-body); background: rgba(var(--primary-rgb), .1); color: var(--primary); border-radius: 999px; padding: 2px 8px; }
.office-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.office-group li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; transition: border-color .2s, box-shadow .2s; }
.office-group li:hover, .office-group li.is-active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .1); }
.office-item { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit; }
.no-map .office-item { cursor: default; }
.office-item-name { display: block; font-weight: 600; color: var(--ink); }
.office-item-meta { display: block; font-size: .88rem; color: var(--muted); }
.office-item-contact { margin: 6px 0 0; font-size: .9rem; }
.map-credit { font-size: .82rem; color: var(--muted); margin: 10px 0 0; }
.office-stats { margin: 0; color: var(--muted); }
.office-stats strong { color: var(--ink); }

.home-offices-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 960px) { .home-offices-grid:not(.list-only) { grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); } }
.home-offices-grid .office-map-wrap { grid-template-columns: 1fr; }
.office-big-num { font: 600 2.4rem/1 var(--font-head); color: var(--ink); margin: 0 0 4px; }
.office-sub { color: var(--primary); font-weight: 600; margin-bottom: 14px; }
.lead-muted { color: var(--muted); margin-bottom: 28px; }

/* Organizational tree */
.org-tree { overflow-x: auto; padding-bottom: 8px; }
.org-tree ul { list-style: none; margin: 0; padding: 0 0 0 26px; position: relative; }
.org-tree > ul { padding-left: 0; }
.org-tree li { position: relative; padding: 8px 0 0 0; }
.org-tree ul ul li::before { content: ""; position: absolute; left: -16px; top: 0; bottom: 0; border-left: 2px solid rgba(var(--primary-rgb), .25); }
.org-tree ul ul li:last-child::before { bottom: auto; height: 30px; }
.org-tree ul ul li::after { content: ""; position: absolute; left: -16px; top: 30px; width: 14px; border-top: 2px solid rgba(var(--primary-rgb), .25); }
.tree-node { display: inline-flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: var(--radius-sm); padding: 10px 14px; min-width: 220px; }
.tree-head { border-left-color: var(--accent); }
.tree-provincial { border-left-color: var(--ink); }
.tree-level { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.tree-node strong { color: var(--ink); }
.tree-person { font-size: .9rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .js .office-map .pin { opacity: 1; }
  .js .office-map > img { opacity: 1; transform: none; }
}

/* ---------- آج کی معلومات (Today's information, Urdu RTL) ---------- */
.today { padding: 48px 0 56px; background: var(--surface); border-bottom: 1px solid var(--line); font-family: "Noto Naskh Arabic", var(--font-body); }
.today h2, .today h3, .today h4 { font-family: var(--font-urdu); font-weight: 600; line-height: 1.9; }
.today-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 18px; }
.today-head h2 { margin: 0; font-size: clamp(1.3rem, 2.4vw, 1.6rem); color: var(--ink); }
.today-city { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); }
.today-city select {
  font: 600 1rem "Noto Naskh Arabic", var(--font-body); padding: 8px 36px 8px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid rgba(var(--primary-rgb), .35); background: #fff; color: var(--ink); min-width: 170px; cursor: pointer;
}
.today-city select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .15); }
.today-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .today-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .today-grid { grid-template-columns: repeat(4, 1fr); } }
.today-card {
  position: relative; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px 20px; overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.today-card::before { content: ""; position: absolute; top: 0; right: 0; left: 0; height: 3px; background: linear-gradient(to left, var(--primary), var(--accent)); }
.today-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.today-card h3 { font-size: 1.1rem; margin: 0; color: var(--ink); }
.today-sub { color: var(--primary); font-size: .95rem; margin: 0 0 12px; }
.today-muted { color: var(--muted); }
.small-note { font-size: .85rem; margin: 10px 0 0; }

.weather { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; min-height: 120px; }
.weather-icon { width: 58px; height: 58px; color: var(--accent); grid-row: span 2; }
.weather-icon svg { width: 100%; height: 100%; }
.weather-temp { font: 600 2rem/1 var(--font-head); color: var(--ink); direction: ltr; text-align: right; }
.weather-text { margin: 0; font-weight: 600; color: var(--ink); }
.weather-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .9rem; color: var(--muted); margin: 6px 0 0; }
.weather-meta span { white-space: nowrap; }
.weather .anim-spin { animation: spinSlow 18s linear infinite; transform-origin: 50% 50%; transform-box: fill-box; }
.weather .anim-float { animation: floatY 4s ease-in-out infinite; }
@keyframes spinSlow { to { transform: rotate(360deg); } }
@keyframes floatY { 50% { transform: translateY(-3px); } }

.prayers { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.prayers li { display: flex; justify-content: space-between; align-items: center; padding: 5px 10px; border-radius: 6px; transition: background .3s; }
.prayers li span:last-child { direction: ltr; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; font-family: var(--font-body); }
.prayers li.is-next { background: rgba(var(--primary-rgb), .1); color: var(--primary); font-weight: 600; }
.prayers li.is-next span:last-child { color: var(--primary); }
.prayers li.is-past { color: var(--muted); }
.prayers li.is-past span:last-child { color: var(--muted); font-weight: 400; }
.today-next { margin: 10px 0 0; font-size: .9rem; color: var(--muted); }
.today-next strong { color: var(--primary); }

.gold { margin: 0; display: grid; gap: 4px; }
.gold div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.gold div:last-child { border-bottom: 0; }
.gold dt { color: var(--text); }
.gold dd { margin: 0; font: 600 1rem var(--font-body); color: var(--ink); white-space: nowrap; }

.date-big { font: 600 1.08rem/1.9 var(--font-urdu); color: var(--ink); margin: 0; }
.date-hijri { font-size: 1.15rem; color: var(--primary); font-weight: 600; margin: 4px 0 8px; }
.clock { font: 600 1.6rem/1 var(--font-head); color: var(--ink); margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

.today-news { margin-top: 18px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.today-news-head h3 { margin: 0; font-size: 1.3rem; color: var(--ink); }
.today-news-cols { display: grid; gap: 20px; }
@media (min-width: 900px) { .today-news-cols { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); } }
.today-news h4 { font-size: 1.05rem; margin: 0 0 6px; color: var(--primary); }
.news-ticker { list-style: none; margin: 0 0 10px; padding: 0; }
.news-ticker li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.news-ticker li:last-child { border-bottom: 0; }
.news-ticker a { color: var(--ink); text-decoration: none; font-weight: 600; }
.news-ticker a:hover { color: var(--primary); text-decoration: underline; }
.news-ticker time { color: var(--muted); font-size: .85rem; white-space: nowrap; font-family: var(--font-body); }
.today-credit { margin: 14px 0 0; font-size: .82rem; color: var(--muted); }
.today .text-link span { display: inline-block; }
.today .text-link:hover span { transform: translateX(-4px); }

.page-extra { margin-top: 36px; }

/* ---------- Urdu articles ---------- */
.article.is-urdu .page-hero h1, .article.is-urdu .lead { font-family: var(--font-urdu); line-height: 2; text-align: right; }
.article.is-urdu .page-hero h1 { font-size: clamp(1.4rem, 2.8vw, 2rem); }
.article.is-urdu .prose { font-family: "Noto Naskh Arabic", var(--font-body); font-size: 1.12rem; line-height: 2.1; text-align: right; }
.article.is-urdu .prose h2, .article.is-urdu .prose h3 { font-family: var(--font-urdu); line-height: 2; }
.article.is-urdu .prose ul, .article.is-urdu .prose ol { padding-left: 0; padding-right: 1.3em; }
.article.is-urdu .prose blockquote { border-left: 0; border-right: 3px solid var(--accent); padding: 4px 22px 4px 0; }
.is-urdu-text { font-family: "Noto Naskh Arabic", var(--font-body); text-align: right; line-height: 1.9; }
h3.is-urdu-text { font-family: var(--font-urdu); }

/* ---------- Videos ---------- */
.video-player { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #111; box-shadow: var(--shadow); }
.video-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-poster { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; display: block; }
.video-badge { position: absolute; left: 14px; bottom: 14px; background: rgba(0,0,0,.72); color: #fff; font-size: .82rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; transition: background .2s; }
.video-poster:hover .video-badge { background: #E53935; }
.video-links { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.video-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), filter .3s; }
.video-poster:hover img { transform: scale(1.03); filter: brightness(.92); }
.video-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); transition: transform .25s var(--ease); filter: drop-shadow(0 6px 16px rgba(0,0,0,.35)); }
.video-poster:hover .video-play, .video-poster:focus-visible .video-play { transform: translate(-50%, -50%) scale(1.12); }
.video-play::after { content: ""; position: absolute; inset: -10px; border-radius: 18px; border: 2px solid rgba(255,255,255,.7); animation: playPulse 2.4s ease-out infinite; }
@keyframes playPulse { 0% { opacity: .9; transform: scale(.9); } 80%, 100% { opacity: 0; transform: scale(1.35); } }
.video-feature { display: grid; gap: 28px; align-items: center; }
@media (min-width: 960px) { .video-feature { grid-template-columns: 1.4fr 1fr; gap: 48px; } }
.video-feature-text h2 { margin-bottom: 10px; }
.video-feature-text p { color: var(--muted); }
.home-video { background: var(--surface); border-bottom: 1px solid var(--line); }
.video-grid { display: grid; gap: 24px; margin-top: 48px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.video-card h3 { font-size: 1.1rem; margin: 14px 0 4px; }
.video-card p { color: var(--muted); font-size: .97rem; margin: 0; }

/* ---------- Advertising & cookie notice ---------- */
.ad-wrap { margin: 32px auto; max-width: 970px; text-align: center; min-height: 100px; }
.ad-label { display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.container > .ad-wrap, .home-ad { padding: 0 20px; }
.cookie-notice {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 640px; margin: 0 auto;
  display: flex; align-items: center; gap: 14px; background: var(--ink); color: #fff; padding: 14px 18px;
  border-radius: var(--radius); box-shadow: 0 18px 40px -16px rgba(0,0,0,.5); font-size: .95rem;
}
.cookie-notice[hidden] { display: none; }
.cookie-notice p { margin: 0; flex: 1; }
.cookie-notice a { color: var(--accent); }

/* =====================================================================
   Motion & visual polish
   ===================================================================== */

/* Reading progress bar */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120; pointer-events: none;
  background: linear-gradient(90deg, var(--accent), #FFD54A, var(--accent));
  transform-origin: 0 50%; transform: scaleX(0);
}

/* Latest-news ticker under the header */
.ticker { background: var(--accent); color: var(--ink); font-size: .88rem; overflow: hidden; border-bottom: 1px solid rgba(var(--ink-rgb), .12); }
.ticker-inner { display: flex; align-items: center; gap: 14px; height: 36px; }
.ticker-label {
  flex-shrink: 0; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .74rem;
  background: var(--ink); color: #FFD54A; padding: 4px 10px; border-radius: 4px; position: relative;
}
.ticker-label::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #FF5A4E; margin-right: 6px; vertical-align: 1px; animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .2; } }
.ticker-track { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-list { display: inline-flex; gap: 42px; white-space: nowrap; list-style: none; margin: 0; padding: 0; animation: tick var(--ticker-duration, 40s) linear infinite; }
.ticker:hover .ticker-list, .ticker:focus-within .ticker-list { animation-play-state: paused; }
.ticker-list a { color: var(--ink); text-decoration: none; font-weight: 600; }
.ticker-list a:hover { text-decoration: underline; }
.ticker-list li::before { content: "◆"; color: var(--ink); opacity: .35; margin-right: 12px; font-size: .7em; vertical-align: 2px; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Hero entrance + living background */
.hero { background: radial-gradient(1200px 500px at 85% 0%, rgba(var(--accent-rgb), .14), transparent 60%), radial-gradient(800px 400px at 0% 100%, rgba(var(--primary-rgb), .08), transparent 60%), var(--bg); }
.hero-copy > * { animation: riseIn .8s var(--ease) both; }
.hero-copy > *:nth-child(1) { animation-delay: .05s; }
.hero-copy > *:nth-child(2) { animation-delay: .15s; }
.hero-copy > *:nth-child(3) { animation-delay: .25s; }
.hero-copy > *:nth-child(4) { animation-delay: .35s; }
.hero-copy > *:nth-child(5) { animation-delay: .45s; }
@keyframes riseIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero h1 .hl { color: var(--primary); position: relative; white-space: nowrap; isolation: isolate; }
.hero h1 .hl::after { content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .28em; background: rgba(var(--accent-rgb), .45); z-index: -1; border-radius: 3px; transform-origin: left; animation: markIn 1s .7s var(--ease) both; }
@keyframes markIn { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.emblem-frame { animation: riseIn 1s .2s var(--ease) both; }
.emblem-frame img { animation: floatY2 6s ease-in-out infinite; }
@keyframes floatY2 { 50% { transform: translateY(-10px); } }
.emblem-frame::after {
  content: ""; position: absolute; inset: -26px; border-radius: 50%; border: 2px dashed rgba(var(--accent-rgb), .55);
  animation: spin 40s linear infinite; pointer-events: none; z-index: -1;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hero-sparkles span {
  position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); opacity: .5;
  animation: drift 9s ease-in-out infinite; pointer-events: none;
}
.hero-sparkles span:nth-child(1) { top: 18%; left: 52%; animation-delay: 0s; }
.hero-sparkles span:nth-child(2) { top: 70%; left: 46%; width: 6px; height: 6px; animation-delay: -3s; background: var(--primary); }
.hero-sparkles span:nth-child(3) { top: 30%; left: 92%; width: 14px; height: 14px; animation-delay: -5s; opacity: .35; }
.hero-sparkles span:nth-child(4) { top: 82%; left: 88%; width: 7px; height: 7px; animation-delay: -1.5s; }
.hero-sparkles span:nth-child(5) { top: 10%; left: 8%; width: 6px; height: 6px; animation-delay: -6s; background: var(--primary); opacity: .3; }
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(14px, -18px); } 66% { transform: translate(-10px, 10px); } }

/* Shine sweep on registration buttons */
.btn-register { position: relative; overflow: hidden; isolation: isolate; }
.btn-register::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.65), transparent);
  transform: skewX(-20deg); animation: shine 4.5s ease-in-out infinite;
}
@keyframes shine { 0%, 60% { left: -60%; } 85%, 100% { left: 130%; } }

/* Section titles get an animated accent line */
.section-title::after { content: ""; display: block; width: 42px; height: 3px; border-radius: 2px; background: var(--accent); margin-top: 10px; transform-origin: left; transition: transform .8s .15s var(--ease); }
.js .section-title.reveal:not(.is-visible)::after { transform: scaleX(0); }
.today .section-title::after, .cta-band .section-title::after { display: none; }

/* Pillars: number badges and hover */
.pillar { position: relative; overflow: hidden; }
.pillar::before { content: ""; position: absolute; left: 0; right: 0; top: -3px; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.pillar:hover::before { transform: scaleX(1); }
.pillar-num {
  display: inline-flex !important; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(var(--accent-rgb), .18); color: var(--ink) !important; filter: none !important; font-size: .95rem !important;
  transition: background .3s, transform .3s var(--ease);
}
.pillar:hover .pillar-num { background: var(--accent); transform: rotate(-8deg) scale(1.08); }

/* Cards: lift with a warm glow */
.card:hover { box-shadow: 0 18px 36px -20px rgba(var(--ink-rgb), .45), 0 0 0 1px rgba(var(--accent-rgb), .55); }

/* CTA band: slowly moving dotted pattern */
.cta-band { background-color: var(--primary); background-image: radial-gradient(rgba(255,255,255,.12) 1.2px, transparent 1.3px); background-size: 22px 22px; animation: bgPan 30s linear infinite; }
@keyframes bgPan { to { background-position: 220px 110px; } }

/* Back to top */
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 55; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: var(--ink); color: #FFD54A; cursor: pointer; box-shadow: var(--shadow); font-size: 1.2rem;
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .3s, transform .3s var(--ease);
}
.to-top.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--accent); color: var(--ink); }

/* ---------- Worldwide globe section ---------- */
.world {
  position: relative; overflow: hidden; color: #E9ECF5;
  background: radial-gradient(900px 420px at 70% 110%, rgba(var(--accent-rgb), .22), transparent 70%),
              linear-gradient(180deg, #13204A 0%, #0D1735 100%);
  padding: 56px 0 0;
}
.world::before { /* faint stars */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: radial-gradient(1px 1px at 12% 22%, #fff, transparent), radial-gradient(1px 1px at 32% 68%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 58% 14%, #FFD54A, transparent), radial-gradient(1px 1px at 78% 38%, #fff, transparent),
    radial-gradient(1px 1px at 88% 12%, #fff, transparent), radial-gradient(1.5px 1.5px at 6% 80%, #FFD54A, transparent),
    radial-gradient(1px 1px at 46% 40%, #fff, transparent), radial-gradient(1px 1px at 94% 70%, #fff, transparent);
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { to { opacity: .25; } }
.world-grid { position: relative; display: grid; gap: 8px; align-items: end; }
@media (min-width: 960px) { .world-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 24px; } }
.world-copy { padding-bottom: 48px; }
.world .eyebrow { color: #FFD54A; }
.world h2 { color: #fff; font-size: clamp(1.45rem, 2.6vw, 1.95rem); }
.world h2 em { font-style: normal; color: #FFD54A; }
.world p { color: rgba(233,236,245,.82); max-width: 52ch; }
.world-stats { display: flex; flex-wrap: wrap; gap: 26px; margin: 22px 0 26px; }
.world-stats div { min-width: 0; }
@media (max-width: 480px) { .world-stats { gap: 20px; } .world-stats strong { font-size: 1.6rem; } }
.world-stats strong { display: block; font: 600 1.9rem/1 var(--font-head); color: #FFD54A; }
.world-stats span { font-size: .85rem; color: rgba(233,236,245,.7); }
.world-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.world .btn-outline { color: #fff; border-color: rgba(255,255,255,.4); }
.world .btn-outline:hover { background: rgba(255,255,255,.08); color: #fff; border-color: #fff; }
.globe-wrap { position: relative; width: 100%; aspect-ratio: 1.45 / 1; max-height: 460px; }
.globe-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.globe-wrap::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: -30px; height: 60px; background: radial-gradient(closest-side, rgba(var(--accent-rgb), .35), transparent); filter: blur(10px); }
@media (max-width: 959px) { .world-copy { padding-bottom: 8px; } }

@media (prefers-reduced-motion: reduce) {
  .ticker-list { animation: none; }
  .emblem-frame, .emblem-frame img, .emblem-frame::after, .hero-sparkles span, .btn-register::after, .cta-band, .world::before { animation: none !important; }
}

/* ---------- Gentle reveal on scroll (only when JS is active) ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

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

@media (max-width: 420px) {
  .brand-text small { display: none; }
  .brand-text strong { font-size: .95rem; }
  .brand-logo { width: 50px; }
}

@media print {
  .site-header, .site-footer, .cta-band, .share, .inline-cta { display: none !important; }
  body { background: #fff; }
}
