/* ==========================================================================
   MADRASA QASMIA BENIBAD - OFFICIAL DESIGN SYSTEM & STYLESHEET
   Production-Grade Architecture | WCAG 2.2 AA Compliant | Pure Bespoke Craft
   Eliminates all AI generic artifacts, artificial gradients, and uncurated visual noise
   ========================================================================== */

:root {
  /* ========================================================================
     COLOR SYSTEM (HERITAGE ARCHIVAL PALETTE)
     ======================================================================== */
  --color-primary-950: #071f16;
  --color-primary-900: #0b2e21;      /* Deep Forest Emerald */
  --color-primary-800: #114b35;      /* Canonical Madrasa Green */
  --color-primary-700: #176346;
  --color-primary-600: #1f7d59;
  --color-primary-100: #e7f3ec;      /* Soft Sage Tint */
  --color-primary-50:  #f2f8f4;      /* Paper Sage Background */

  --color-gold-900:    #594008;
  --color-gold-800:    #74540c;      /* High-contrast Gold (WCAG AAA) */
  --color-gold-700:    #926a11;      /* Medium Gold Accent */
  --color-gold-600:    #b58419;      /* Primary Gold */
  --color-gold-500:    #d4a22e;      /* Radiant Accent */
  --color-gold-100:    #fbf5e5;      /* Parchment Warm Tint */
  --color-gold-50:     #fdfbf3;

  --color-surface:     #ffffff;      /* Pure Card Surface */
  --color-surface-warm:#fbf9f4;      /* Archival Ivory Paper */
  --color-surface-dim: #f3efe6;      /* Secondary Neutral Surface */

  --color-text-main:   #152019;      /* Deep Slate Black (Contrast > 14:1) */
  --color-text-body:   #2a3b31;      /* Crisp Dark Green-Charcoal (Contrast > 9:1) */
  --color-text-muted:  #495b51;      /* Refined Supporting Copy (Contrast > 5.5:1) */
  --color-text-on-dark:#f7faf8;      /* Pure Contrast on Dark */

  --color-border-main: #d9d2c1;      /* Classical Bookbinding Border */
  --color-border-subtle: #eae4d5;    /* Hairline Partition */
  --color-border-dark: #274738;      /* Borders on Dark Surfaces */

  --focus-ring:        0 0 0 3px rgba(181, 132, 25, 0.45);

  /* ========================================================================
     TYPOGRAPHY TOKENS
     ======================================================================== */
  --font-urdu: 'Noto Nastaliq Urdu', 'Amiri', serif;
  --font-arabic: 'Amiri', serif;
  --font-heading: 'Cinzel', 'Amiri', serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  /* ========================================================================
     SPACING & ELEVATIONS
     ======================================================================== */
  --container-max: 1220px;
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 9999px;

  --shadow-xs: 0 1px 3px rgba(11, 46, 33, 0.04);
  --shadow-sm: 0 2px 8px rgba(11, 46, 33, 0.06);
  --shadow-md: 0 6px 18px rgba(11, 46, 33, 0.08);
  --shadow-lg: 0 14px 34px rgba(11, 46, 33, 0.11);
  --shadow-gold: 0 6px 20px rgba(146, 106, 17, 0.18);

  --transition-fast: 160ms cubic-bezier(0.2, 0, 0, 1);
  --transition-base: 240ms cubic-bezier(0.2, 0, 0, 1);
}

/* ==========================================================================
   RESET & SYSTEM BASE
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-surface-warm);
  color: var(--color-text-body);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

/* Skip to main content accessibility link */
.skip-link {
  position: absolute;
  top: -60px;
  right: 1.5rem;
  background: var(--color-gold-700);
  color: #fff;
  padding: 0.6rem 1.25rem;
  z-index: 10000;
  border-radius: var(--radius-xs);
  font-weight: 700;
  text-decoration: none;
  transition: top var(--transition-fast);
  box-shadow: var(--shadow-md);
}

.skip-link:focus {
  top: 1rem;
  outline: 3px solid #fff;
}

/* Accessible Keyboard Focus States */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Directional & Numerical Isolation */
.ltr, [dir="ltr"] {
  direction: ltr;
  text-align: left;
  display: inline-block;
}

.num, .bidi-isolate {
  unicode-bidi: isolate;
  direction: ltr;
  display: inline-block;
}

/* Typography Classes */
.urdu-text {
  font-family: var(--font-urdu);
  direction: rtl;
  line-height: 2.3;
  text-align: right;
}

.arabic-header {
  font-family: var(--font-arabic);
  color: var(--color-gold-800);
  font-size: 1.5rem;
  font-weight: 700;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-primary-950);
  line-height: 1.35;
  font-weight: 700;
}

a {
  color: var(--color-primary-800);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-gold-700);
}

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

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ==========================================================================
   AUTHENTIC ISLAMIC HERITAGE ORNAMENTS
   ========================================================================== */
.bismillah-container {
  text-align: center;
  padding: 0.5rem 0;
}

.bismillah-calligraphy {
  font-family: var(--font-arabic);
  font-size: 1.5rem;
  color: var(--color-gold-700);
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.bismillah-calligraphy::before,
.bismillah-calligraphy::after {
  content: "";
  display: inline-block;
  width: 32px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold-600), transparent);
}

.divider-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.25rem auto 2.25rem;
  max-width: 240px;
}

.divider-ornament span {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold-600), transparent);
  flex-grow: 1;
}

.divider-ornament-star {
  color: var(--color-gold-700);
  font-size: 0.9rem;
  line-height: 1;
}

/* ==========================================================================
   TOP BAR (ACCESSIBLE, SEMANTIC, HIGH CONTRAST)
   ========================================================================== */
.top-bar {
  background: var(--color-primary-950);
  color: #fff;
  font-size: 0.85rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--color-border-dark);
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.top-bar-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.top-bar-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  white-space: nowrap;
}

a.top-bar-item:hover {
  color: var(--color-gold-500);
}

.top-bar-item svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  color: var(--color-gold-500);
  flex-shrink: 0;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.top-badge {
  background: rgba(181, 132, 25, 0.15);
  border: 1px solid rgba(181, 132, 25, 0.4);
  color: var(--color-gold-500);
  padding: 0.2rem 0.8rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.top-bar-cta {
  background: linear-gradient(135deg, var(--color-gold-600), var(--color-gold-700));
  color: #fff !important;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.24rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
}

.top-bar-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(181, 132, 25, 0.35);
  color: #fff !important;
}

/* ==========================================================================
   MAIN HEADER & NAVIGATION (POLISHED & ACCESSIBLE)
   ========================================================================== */
.main-header {
  background: #fff;
  box-shadow: 0 1px 0 rgba(11, 46, 33, 0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid var(--color-gold-600);
  transition: box-shadow 220ms ease;
}

.main-header.is-scrolled {
  box-shadow: 0 10px 28px rgba(11, 46, 33, 0.1);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.brand-logo-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid var(--color-gold-600);
  padding: 2px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title-urdu {
  font-family: var(--font-urdu);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary-900);
  line-height: 1.35;
}

.brand-subtitle-en {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-gold-800);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-main);
  position: relative;
  padding: 0.4rem 0.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.nav-link .nav-ur {
  font-family: var(--font-urdu);
  font-size: 1rem;
  line-height: 1.4;
}

.nav-link .nav-en {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.nav-link:hover {
  color: var(--color-primary-800);
}

.nav-link.active {
  color: var(--color-primary-900);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2.5px;
  background: var(--color-gold-600);
  border-radius: var(--radius-pill);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.btn-donate-nav::after {
  display: none;
}

.btn-donate-nav {
  background: var(--color-primary-800);
  color: #fff !important;
  padding: 0.35rem 1.05rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  border: 1px solid var(--color-gold-600);
  flex-direction: column;
  gap: 0;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
}

.btn-donate-nav .nav-en {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.68rem;
}

.btn-donate-nav:hover {
  background: var(--color-primary-900);
  color: #fff !important;
  border-color: var(--color-gold-500);
  box-shadow: var(--shadow-gold);
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--color-border-main);
  padding: 0.5rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  color: var(--color-primary-900);
}

.mobile-toggle svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: currentColor;
}

/* Mobile backdrop drawer */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  z-index: 850;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.nav-backdrop.active {
  display: block;
  opacity: 1;
}

/* ==========================================================================
   BUTTONS, BADGES & INTERACTIVE CONTROLS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  text-decoration: none;
}

.btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--color-primary-800);
  color: #fff;
  border-color: var(--color-gold-600);
}

.btn-primary:hover {
  background: var(--color-primary-950);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn-gold {
  background: var(--color-gold-600);
  color: var(--color-primary-950);
  font-weight: 800;
  border-color: var(--color-gold-700);
}

.btn-gold:hover {
  background: var(--color-gold-700);
  color: #fff;
  box-shadow: var(--shadow-gold);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary-900);
  border-color: var(--color-border-main);
}

.btn-outline:hover {
  background: var(--color-primary-50);
  border-color: var(--color-primary-800);
  color: var(--color-primary-900);
}

.btn-outline-white {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  background: var(--color-gold-100);
  color: var(--color-gold-800);
  border: 1px solid var(--color-gold-600);
  letter-spacing: 0.3px;
}

/* ==========================================================================
   HERO BANNER (AUTHENTIC, DIGNIFIED, NO ARTIFICIAL GLASSMORPHISM)
   ========================================================================== */
.hero-section {
  position: relative;
  background: var(--color-primary-950);
  color: #fff;
  padding: 4.5rem 0 4rem;
  border-bottom: 3px solid var(--color-gold-600);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: start;
  position: relative;
  z-index: 2;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(181, 132, 25, 0.15);
  border: 1px solid rgba(181, 132, 25, 0.45);
  color: var(--color-gold-500);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero-title-urdu {
  font-family: var(--font-urdu);
  font-size: clamp(1.8rem, 3.2vw + 0.6rem, 2.3rem);
  line-height: 1.6;
  color: #fff;
  margin-bottom: 1.15rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.hero-description {
  font-family: var(--font-urdu);
  font-size: clamp(1rem, 1.1vw + 0.5rem, 1.12rem);
  line-height: 2.1;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.85rem;
  max-width: 640px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-frame {
  background: #0f3929;
  border: 1px solid var(--color-gold-700);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-lg);
}

.hero-frame-img-box {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-frame-img {
  width: 100%;
  height: 270px;
  object-fit: cover;
}

.hero-frame-caption {
  font-family: var(--font-urdu);
  font-size: 0.95rem;
  color: var(--color-gold-100);
  margin-top: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==========================================================================
   STATISTICS STRIP (MEASURED, BALANCED, PRECISE)
   ========================================================================== */
.stats-strip {
  background: var(--color-surface);
  border: 1px solid var(--color-border-main);
  box-shadow: var(--shadow-sm);
  margin-top: -2rem;
  position: relative;
  z-index: 10;
  border-radius: var(--radius-md);
  padding: 1.75rem 1.5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  text-align: center;
}

.stat-item {
  position: relative;
  padding: 0.5rem 0.75rem;
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 1px;
  background-color: var(--color-border-subtle);
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-primary-800);
  font-family: var(--font-heading);
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.stat-urdu-title {
  font-family: var(--font-urdu);
  font-size: 1.15rem;
  color: var(--color-text-main);
  margin-bottom: 0.2rem;
}

.stat-en-subtitle {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--color-text-muted);
  letter-spacing: 0.5px;
  font-weight: 700;
}

/* ==========================================================================
   SECTION COMMON & HEADERS
   ========================================================================== */
.section-py {
  padding: 4.5rem 0;
}

.section-bg-light {
  background-color: var(--color-primary-50);
}

.section-bg-parchment {
  background-color: var(--color-gold-50);
}

.section-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 3rem;
}

.section-subtitle {
  color: var(--color-gold-800);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  display: block;
}

.section-title-urdu {
  font-family: var(--font-urdu);
  font-size: clamp(1.45rem, 2.2vw + 0.5rem, 1.95rem);
  color: var(--color-primary-900);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.section-lead {
  font-family: var(--font-urdu);
  font-size: 1.05rem;
  line-height: 2.05;
  color: var(--color-text-body);
}

/* ==========================================================================
   CARDS & GRIDS (ORGANIZED, ACCESSIBLE, BALANCED)
   ========================================================================== */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.pillar-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-main);
  padding: 2.25rem 1.75rem;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  display: flex;
  flex-direction: column;
}

.pillar-card:hover {
  border-color: var(--color-gold-600);
  box-shadow: var(--shadow-sm);
}

.pillar-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-primary-100);
  border: 1px solid var(--color-gold-600);
  color: var(--color-primary-800);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.pillar-icon-box svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.pillar-title-urdu {
  font-family: var(--font-urdu);
  font-size: 1.5rem;
  color: var(--color-primary-900);
  margin-bottom: 0.25rem;
}

.pillar-title-en {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-gold-800);
  margin-bottom: 1rem;
}

.pillar-desc-urdu {
  font-family: var(--font-urdu);
  font-size: 1.05rem;
  line-height: 2.2;
  color: var(--color-text-body);
  margin-bottom: 1rem;
}

.pillar-desc-en {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-top: auto;
}

/* ==========================================================================
   DEPARTMENTS GRID
   ========================================================================== */
.dept-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.dept-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-main);
  border-radius: var(--radius-md);
  padding: 2.25rem;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition-fast);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.dept-card:hover {
  border-color: var(--color-gold-600);
}

.dept-title-urdu {
  font-family: var(--font-urdu);
  font-size: 1.55rem;
  color: var(--color-primary-900);
  margin-bottom: 0.25rem;
}

.dept-title-en {
  font-size: 1rem;
  color: var(--color-gold-800);
  font-weight: 700;
  margin-bottom: 1rem;
}

.dept-content-urdu {
  font-family: var(--font-urdu);
  font-size: 1.05rem;
  line-height: 2.2;
  color: var(--color-text-body);
  margin-bottom: 1.25rem;
}

/* ==========================================================================
   FUTURE GOALS GRID (مستقبل کے ۱۰ عزائم)
   ========================================================================== */
.goals-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.goal-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-main);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.6rem;
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  transition: border-color var(--transition-fast);
}

.goal-card:hover {
  border-color: var(--color-gold-600);
}

.goal-num {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary-100);
  color: var(--color-primary-800);
  border: 1px solid var(--color-gold-600);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.goal-body-urdu {
  font-family: var(--font-urdu);
  font-size: 1.15rem;
  color: var(--color-primary-900);
  line-height: 2;
  margin-bottom: 0.25rem;
}

.goal-body-en {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ==========================================================================
   TARANA (ANTHEM) PLAYER & CALLIGRAPHY SHOWCASE
   ========================================================================== */
.tarana-container {
  background: var(--color-primary-950);
  color: #fff;
  border: 2px solid var(--color-gold-700);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2.25rem;
  box-shadow: var(--shadow-md);
  position: relative;
}

.tarana-header {
  text-align: center;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--color-border-dark);
  padding-bottom: 1.5rem;
}

.tarana-title-urdu {
  font-family: var(--font-urdu);
  font-size: 2.5rem;
  color: #fff;
  line-height: 1.8;
  margin-bottom: 0.5rem;
}

.tarana-poet {
  font-size: 1.1rem;
  color: var(--color-gold-500);
  font-family: var(--font-urdu);
}

.tarana-player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.tarana-progress-bar-container {
  max-width: 420px;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin: 1rem auto 0;
}

.tarana-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--color-gold-500);
  transition: width 0.3s ease;
}

.tarana-verses-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 840px;
  margin: 0 auto;
}

.tarana-verse-card {
  background: #0f3929;
  border: 1px solid var(--color-border-dark);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
  text-align: center;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.tarana-verse-card:hover {
  background: #144934;
  border-color: var(--color-gold-600);
}

.tarana-verse-card.active-verse {
  background: #17543c;
  border-color: var(--color-gold-500);
  box-shadow: 0 0 16px rgba(212, 162, 46, 0.25);
}

.verse-misra-urdu {
  font-family: var(--font-urdu);
  font-size: 1.35rem;
  line-height: 2.3;
  color: #fff;
  margin-bottom: 0.25rem;
}

.verse-translation-en {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.78);
  font-style: italic;
  margin-top: 0.6rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
  padding-top: 0.5rem;
}

/* ==========================================================================
   DONATIONS & BANKING
   ========================================================================== */
.donation-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin-bottom: 3.5rem;
}

.donation-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-main);
  border-radius: var(--radius-md);
  padding: 2.25rem 1.75rem;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color var(--transition-fast);
  position: relative;
}

.donation-card.featured {
  border: 2px solid var(--color-gold-600);
  background: linear-gradient(180deg, #ffffff 0%, var(--color-gold-50) 100%);
}

.donation-card.featured .sadaqah-tag {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--color-gold-600);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.2rem 0.75rem;
  border-radius: var(--radius-pill);
}

.donation-card:hover {
  border-color: var(--color-gold-700);
}

.donation-amount {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: var(--color-primary-800);
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.donation-period {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.75px;
  font-weight: 700;
}

.donation-title-urdu {
  font-family: var(--font-urdu);
  font-size: 1.35rem;
  color: var(--color-primary-900);
  line-height: 2;
  margin: 0.85rem 0 0.45rem;
}

.donation-desc-en {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.bank-details-box {
  background: var(--color-surface);
  border: 2px solid var(--color-gold-600);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-sm);
}

.bank-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.bank-info-table {
  width: 100%;
  border-collapse: collapse;
}

.bank-info-table tr {
  border-bottom: 1px solid var(--color-border-subtle);
}

.bank-info-table td {
  padding: 0.95rem 0;
}

.bank-info-label {
  font-weight: 700;
  color: var(--color-primary-950);
  width: 38%;
  font-size: 0.95rem;
}

.bank-info-value {
  font-family: var(--font-heading);
  color: var(--color-primary-800);
  font-weight: 700;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.copy-btn {
  background: var(--color-primary-50);
  border: 1px solid var(--color-border-main);
  color: var(--color-primary-900);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
}

.copy-btn svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.copy-btn:hover {
  background: var(--color-gold-600);
  border-color: var(--color-gold-700);
  color: #fff;
}

.qr-card {
  text-align: center;
  background: var(--color-surface-warm);
  border: 1px solid var(--color-border-main);
  border-radius: var(--radius-md);
  padding: 2rem;
}

.qr-image {
  width: 220px;
  height: 220px;
  object-fit: contain;
  margin: 0 auto 1.25rem;
  background: #fff;
  padding: 0.5rem;
  border: 1px solid var(--color-border-main);
  border-radius: var(--radius-xs);
}

/* ==========================================================================
   TESTIMONIALS (AKABIREEN FILTERABLE DIRECTORY)
   ========================================================================== */
.testimonials-filter-bar {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 2.75rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--color-surface);
  border: 1px solid var(--color-border-main);
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--color-text-main);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  border-color: var(--color-primary-800);
}

.filter-btn.active {
  background: var(--color-primary-800);
  color: #fff;
  border-color: var(--color-primary-800);
}

.scholar-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.scholar-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-main);
  border-radius: var(--radius-md);
  padding: 2.25rem;
  box-shadow: var(--shadow-xs);
  position: relative;
  transition: border-color var(--transition-fast);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.scholar-card:hover {
  border-color: var(--color-gold-600);
}

.scholar-quote-mark {
  font-family: var(--font-heading);
  font-size: 3rem;
  color: var(--color-gold-500);
  line-height: 1;
  position: absolute;
  top: 1.25rem;
  left: 1.75rem;
  opacity: 0.35;
}

.scholar-quote-urdu {
  font-family: var(--font-urdu);
  font-size: 1.2rem;
  line-height: 2.4;
  color: var(--color-text-main);
  margin-bottom: 1.25rem;
  direction: rtl;
  text-align: right;
  border-bottom: 1px solid var(--color-border-subtle);
  padding-bottom: 1.25rem;
}

.scholar-quote-en {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.scholar-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.scholar-avatar-initial {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary-100);
  color: var(--color-primary-800);
  border: 1px solid var(--color-gold-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  font-family: var(--font-urdu);
}

.scholar-details {
  display: flex;
  flex-direction: column;
}

.scholar-name-urdu {
  font-family: var(--font-urdu);
  font-size: 1.15rem;
  color: var(--color-primary-950);
  font-weight: 700;
}

.scholar-title-en {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

/* ==========================================================================
   GALLERY (AUTHENTIC HISTORIC PHOTOGRAPHS)
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.gallery-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border-main);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.gallery-img {
  width: 100%;
  height: 230px;
  object-fit: cover;
}

.gallery-info {
  padding: 1.25rem;
}

.gallery-title-urdu {
  font-family: var(--font-urdu);
  font-size: 1.15rem;
  color: var(--color-primary-900);
  margin-bottom: 0.25rem;
}

.gallery-desc-en {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

/* ==========================================================================
   FOOTER (REGAL, ARCHIVAL, DIGNIFIED)
   ========================================================================== */
.main-footer {
  background: var(--color-primary-950);
  color: #fff;
  padding: 4.5rem 0 2rem;
  border-top: 3px solid var(--color-gold-600);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
  gap: 2.75rem;
  margin-bottom: 3.5rem;
}

.footer-col-title {
  color: var(--color-gold-500);
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border-dark);
}

.footer-desc {
  font-family: var(--font-urdu);
  font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 2.2;
  margin-bottom: 1.5rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.65rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-gold-500);
}

.footer-contact-item {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
}

.footer-contact-item svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  color: var(--color-gold-500);
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.footer-bottom {
  border-top: 1px solid var(--color-border-dark);
  padding-top: 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.65);
}

/* ==========================================================================
   RESPONSIVE DESIGN (REAL BREAKPOINTS & CLEAN TOUCH ADAPTATIONS)
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .stat-item:nth-child(2)::after {
    display: none;
  }

  .pillars-grid,
  .donation-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bank-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   READING PROGRESS BAR (HAIRLINE GOLD INDICATOR)
   ========================================================================== */
.reading-progress-track {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(11, 46, 33, 0.1);
  z-index: 1001;
  pointer-events: none;
}

.reading-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-gold-600), var(--color-gold-400, #e2b74c));
  box-shadow: 0 0 8px rgba(181, 132, 25, 0.55);
  transition: width 90ms ease-out;
}

/* ==========================================================================
   SCROLL REVEAL ANIMATIONS (HARDWARE-ACCELERATED FOR MOBILE & DESKTOP)
   ========================================================================== */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 520ms cubic-bezier(0.16, 1, 0.3, 1), transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Tactile Active States on Touch Devices */
.btn:active,
.copy-btn:active,
.filter-btn:active,
.tarana-verse-card:active {
  transform: scale(0.98);
}

/* ==========================================================================
   LIGHTBOX MODAL & ZOOMABLE ASSETS
   ========================================================================== */
[data-lightbox="true"] {
  cursor: zoom-in;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

[data-lightbox="true"]:hover {
  transform: scale(1.015);
}

.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(7, 31, 22, 0.94);
  backdrop-filter: blur(8px);
  z-index: 1050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity 220ms ease;
}

.lightbox-modal.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 860px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-gold-600);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: modalPop 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-img {
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  background: #061911;
}

.lightbox-caption {
  padding: 1.15rem 1.25rem;
  text-align: center;
  width: 100%;
  background: var(--color-surface-warm);
  border-top: 1px solid var(--color-border-main);
}

.lightbox-caption-title {
  font-family: var(--font-urdu);
  font-size: 1.25rem;
  color: var(--color-primary-900);
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.lightbox-caption-sub {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.lightbox-caption-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

.lightbox-counter-badge {
  background: var(--color-primary-100);
  color: var(--color-primary-800);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  direction: ltr;
  display: inline-block;
}

.lightbox-close-btn {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(7, 31, 22, 0.85);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  font-size: 1.25rem;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.lightbox-close-btn:hover {
  background: var(--color-gold-600);
  transform: scale(1.08);
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(7, 31, 22, 0.82);
  color: #fff;
  border: 1px solid rgba(212, 162, 46, 0.45);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  font-size: 1.5rem;
  transition: all var(--transition-fast);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

.lightbox-nav-btn:hover {
  background: var(--color-gold-600);
  border-color: var(--color-gold-400);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev-btn {
  right: 1.25rem;
}

.lightbox-next-btn {
  left: 1.25rem;
}

@media (max-width: 768px) {
  .lightbox-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 1.15rem;
  }
  .lightbox-prev-btn { right: 0.5rem; }
  .lightbox-next-btn { left: 0.5rem; }
}

/* ==========================================================================
   VIDEO MODAL & RESPONSIVE VIDEO PLAYER
   ========================================================================== */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity 220ms ease;
}

.video-modal.active {
  display: flex;
  opacity: 1;
}

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 31, 22, 0.94);
  backdrop-filter: blur(10px);
}

.video-modal-content {
  position: relative;
  z-index: 10;
  max-width: 920px;
  width: 100%;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-gold-600);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65);
  overflow: hidden;
  animation: modalPop 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

.video-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--color-primary-950);
  color: #fff;
  border-bottom: 1px solid var(--color-border-dark);
}

.video-modal-title {
  font-family: var(--font-urdu);
  font-size: 1.25rem;
  color: var(--color-gold-500);
  font-weight: 700;
  margin: 0;
}

.video-modal-close {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.video-modal-close:hover {
  background: var(--color-gold-600);
  transform: scale(1.08);
}

.video-frame-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  position: relative;
  overflow: hidden;
}

.video-frame-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.video-modal-footer {
  padding: 1rem 1.5rem;
  background: var(--color-surface-warm);
  border-top: 1px solid var(--color-border-main);
}

.video-modal-desc {
  font-family: var(--font-urdu);
  font-size: 1rem;
  line-height: 2;
  color: var(--color-text-body);
  margin: 0;
}

/* ==========================================================================
   VIDEO CARDS & SHOWCASE GRID
   ========================================================================== */
.video-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
  margin-top: 2rem;
}

.video-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-main);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
  display: flex;
  flex-direction: column;
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-gold-600);
}

.video-card-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0b2e21;
  cursor: pointer;
}

.video-card-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 450ms cubic-bezier(0.16, 1, 0.3, 1);
}

.video-card:hover .video-card-poster {
  transform: scale(1.06);
}

.video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 31, 22, 0.42);
  transition: background var(--transition-fast);
}

.video-card:hover .video-play-overlay {
  background: rgba(7, 31, 22, 0.25);
}

.video-play-circle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--color-gold-600);
  border: 3px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  color: #fff;
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.video-card:hover .video-play-circle {
  transform: scale(1.15);
  background: var(--color-gold-500);
}

.video-play-circle svg {
  width: 22px;
  height: 22px;
  fill: #fff;
  margin-left: 3px;
}

.video-time-pill {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-xs);
  letter-spacing: 0.5px;
  direction: ltr;
}

.video-badge-pill {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(11, 46, 33, 0.9);
  color: var(--color-gold-500);
  border: 1px solid var(--color-gold-600);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
}

.video-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.video-card-title-ur {
  font-family: var(--font-urdu);
  font-size: 1.22rem;
  color: var(--color-primary-950);
  font-weight: 700;
  line-height: 1.7;
  margin-bottom: 0.4rem;
}

.video-card-title-en {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--color-gold-800);
  letter-spacing: 0.5px;
  margin-bottom: 0.65rem;
}

.video-card-desc {
  font-family: var(--font-urdu);
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--color-text-muted);
  margin-top: auto;
}

/* ==========================================================================
   GALLERY FILTER TABS & MEDIA CARDS
   ========================================================================== */
.gallery-tab-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.5rem 0 2.5rem;
}

.gallery-tab-btn {
  background: var(--color-surface);
  color: var(--color-text-body);
  border: 1px solid var(--color-border-main);
  border-radius: var(--radius-pill);
  padding: 0.6rem 1.25rem;
  font-family: var(--font-urdu);
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: var(--shadow-xs);
}

.gallery-tab-btn:hover {
  background: var(--color-primary-50);
  border-color: var(--color-gold-600);
  color: var(--color-primary-900);
  transform: translateY(-2px);
}

.gallery-tab-btn.active {
  background: var(--color-primary-900);
  color: #fff;
  border-color: var(--color-gold-600);
  box-shadow: 0 4px 14px rgba(11, 46, 33, 0.25);
}

.gallery-tab-btn.active .tab-count {
  background: var(--color-gold-600);
  color: #fff;
}

.tab-count {
  background: var(--color-surface-dim);
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-pill);
  direction: ltr;
}

.media-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.media-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-main);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
  display: flex;
  flex-direction: column;
}

.media-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-gold-600);
}

.media-card-thumb {
  position: relative;
  height: 240px;
  overflow: hidden;
  background: #071f16;
  cursor: zoom-in;
}

.media-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 450ms cubic-bezier(0.16, 1, 0.3, 1);
}

.media-card:hover .media-card-img {
  transform: scale(1.07);
}

.media-card-badge {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  background: rgba(7, 31, 22, 0.88);
  color: var(--color-gold-500);
  border: 1px solid rgba(212, 162, 46, 0.4);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(4px);
}

.media-card-zoom-icon {
  position: absolute;
  bottom: 0.65rem;
  left: 0.65rem;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  opacity: 0.85;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.media-card:hover .media-card-zoom-icon {
  opacity: 1;
  transform: scale(1.1);
  background: var(--color-gold-600);
}

.media-card-body {
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.media-card-title {
  font-family: var(--font-urdu);
  font-size: 1.08rem;
  color: var(--color-primary-950);
  font-weight: 700;
  line-height: 1.7;
  margin-bottom: 0.35rem;
}

.media-card-sub {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin-top: auto;
}

/* ==========================================================================
   HAMBURGER ANIMATION & ACCESSIBLE MOBILE DRAWER
   ========================================================================== */
.hamburger-box {
  width: 24px;
  height: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2.5px;
  background-color: var(--color-primary-900);
  border-radius: 2px;
  transition: transform 260ms ease, opacity 260ms ease;
}

.mobile-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(7.75px) rotate(45deg);
  background-color: var(--color-gold-500);
}

.mobile-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-7.75px) rotate(-45deg);
  background-color: var(--color-gold-500);
}

/* Footer styling refinements */
.footer-col-title {
  font-family: var(--font-urdu);
  font-size: 1.25rem;
  color: var(--color-gold-500);
  margin-bottom: 1.15rem;
  position: relative;
  padding-bottom: 0.4rem;
}

.footer-col-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 32px;
  height: 2px;
  background: var(--color-gold-600);
}

.footer-brand-box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}

.footer-logo-img {
  border-radius: 50%;
  border: 1.5px solid var(--color-gold-500);
  box-shadow: 0 0 10px rgba(212, 162, 46, 0.3);
}

.footer-brand-title {
  color: #fff;
  font-family: var(--font-urdu);
  font-size: 1.3rem;
  line-height: 1.5;
  margin: 0;
}

.footer-brand-location {
  font-size: 0.78rem;
  color: var(--color-gold-500);
  display: block;
}

.footer-reg-pill {
  display: inline-block;
  background: rgba(212, 162, 46, 0.12);
  color: var(--color-gold-500);
  border: 1px solid rgba(212, 162, 46, 0.3);
  font-size: 0.78rem;
  font-family: var(--font-urdu);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  margin-top: 1rem;
}

.footer-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #25d366;
  color: #fff;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: 0 3px 10px rgba(37, 211, 102, 0.3);
}

.footer-wa-btn:hover {
  background: #1ebc59;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.45);
}


/* Tarana Controls Upgrade */
.tarana-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.85rem;
}

.tarana-speed-selector {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  cursor: pointer;
}

.verse-copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-gold-800);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-xs);
  transition: background 150ms ease;
  margin-top: 0.45rem;
}

.verse-copy-btn:hover {
  background: var(--color-gold-100);
}

/* ==========================================================================
   TABLET & INTERMEDIATE BREAKPOINTS (769px to 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-frame {
    max-width: 580px;
    margin: 0 auto;
  }

  .pillars-grid,
  .dept-grid,
  .scholar-cards-grid,
  .donation-grid,
  .goals-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .history-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ==========================================================================
   MOBILE VIEWPORT & TOUCH ARCHITECTURE (max-width: 768px)
   Ultra Clean, Silky Animations, Zero Clutter
   ========================================================================== */
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  /* Top Bar on Mobile */
  .top-bar {
    padding: 0.35rem 0;
  }

  .top-bar-inner {
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    text-align: center;
  }

  .top-bar-info {
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.78rem;
    flex-wrap: wrap;
  }

  .top-bar-actions {
    justify-content: center;
    gap: 0.5rem;
  }

  .top-badge {
    font-size: 0.72rem;
    padding: 0.15rem 0.65rem;
  }

  /* Main Nav Container & Branding */
  .nav-container {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }

  .logo-seal-nav {
    width: 56px;
    height: 56px;
  }

  .brand-logo-img {
    width: 44px;
    height: 44px;
  }

  .brand-title-urdu {
    font-size: 1.25rem;
  }

  .brand-subtitle-en {
    font-size: 0.65rem;
    letter-spacing: 1px;
  }

  /* Mobile Hamburger Toggle */
  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--color-primary-50);
    border: 1px solid var(--color-border-main);
    border-radius: var(--radius-sm);
    color: var(--color-primary-900);
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
  }

  .mobile-toggle:hover {
    background: var(--color-primary-100);
    border-color: var(--color-gold-600);
  }

  /* Hardware-Accelerated Sliding Drawer */
  .main-nav {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width: min(320px, 86vw);
    background: #ffffff !important;
    flex-direction: column;
    padding: 1.75rem 1.35rem 2.5rem;
    box-shadow: -10px 0 40px rgba(7, 31, 22, 0.35);
    border-left: 3px solid var(--color-gold-600);
    z-index: 1050;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .main-nav.active {
    transform: translateX(0);
  }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(7, 31, 22, 0.65);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    z-index: 995;
    transition: opacity 280ms ease;
  }

  .nav-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    align-items: flex-start;
    width: 100%;
    padding: 0.85rem 0.75rem;
    border-bottom: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-xs);
    background: transparent;
    transition: background 140ms ease;
  }

  .nav-link .nav-ur {
    color: var(--color-primary-950);
    font-size: 1.25rem;
    font-weight: 700;
  }

  .nav-link .nav-en {
    color: var(--color-text-muted);
    font-size: 0.82rem;
  }

  .nav-link:hover {
    background: var(--color-primary-50);
  }

  .nav-link.active::after {
    display: none;
  }

  .nav-link.active {
    background: var(--color-primary-50);
    border-right: 4px solid var(--color-gold-600);
  }

  .nav-link.active .nav-ur {
    color: var(--color-primary-900);
  }

  .btn-donate-nav {
    margin-top: 1rem;
    width: 100%;
    text-align: center;
    border-radius: var(--radius-sm);
  }

  /* Grids on Mobile: 2x2 for stats, 1 col for content */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.85rem !important;
  }

  .stat-item {
    padding: 1.15rem 0.75rem !important;
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-sm);
    background: #fff;
  }

  .stat-item::after {
    display: none !important;
  }

  .stat-number {
    font-size: 1.75rem !important;
  }

  .stat-urdu-title {
    font-size: 0.92rem !important;
  }

  .stat-en-subtitle {
    font-size: 0.68rem !important;
  }

  .pillars-grid,
  .dept-grid,
  .goals-grid,
  .donation-grid,
  .scholar-cards-grid,
  .gallery-grid,
  .footer-grid,
  .tarbiyah-grid,
  .halaqa-grid,
  .anjuman-grid,
  .admin-grid,
  .other-support-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  .section-py {
    padding: 2.75rem 0;
  }

  .hero-section {
    padding: 3rem 0 2.5rem;
  }

  .hero-title-urdu {
    font-size: 1.75rem;
    line-height: 1.55;
  }

  .section-title-urdu {
    font-size: 1.5rem;
    line-height: 1.5;
  }

  .hero-description {
    font-size: 1.02rem;
    line-height: 2.05;
  }

  .bank-details-box {
    padding: 1.25rem 1rem;
  }

  .bank-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .bank-info-label {
    width: 38%;
    font-size: 0.85rem;
  }

  .bank-info-value {
    font-size: 0.95rem;
  }
}

/* ==========================================================================
   SMALL SMARTPHONES (max-width: 480px)
   ========================================================================== */
@media (max-width: 480px) {
  html {
    font-size: 14.5px;
  }

  .hero-title-urdu {
    font-size: 1.55rem;
    line-height: 1.5;
  }

  .section-title-urdu {
    font-size: 1.38rem;
    line-height: 1.45;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .tarana-player-controls {
    flex-direction: column;
    width: 100%;
  }

  .tarana-player-controls .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   LANDSCAPE ORIENTATION ON MOBILE (max-height: 520px)
   ========================================================================== */
@media (max-height: 520px) and (orientation: landscape) {
  .hero-section {
    padding: 2rem 0 1.5rem;
  }

  .section-py {
    padding: 2rem 0;
  }

  .main-nav {
    max-height: 100vh;
    overflow-y: auto;
  }

  .lightbox-content {
    max-height: 94vh;
  }

  .lightbox-img {
    max-height: 56vh;
  }
}

/* Reduced Motion Mode */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   EXPLICIT RESPONSIVE VIEWPORT BREAKPOINTS (320px to 1920px)
   ========================================================================== */

/* 1. ULTRA-COMPACT MOBILE (320px - 360px) */
@media (max-width: 360px) {
  html {
    font-size: 13.5px;
  }
  .container {
    padding: 0 0.75rem !important;
  }
  .top-bar {
    display: none; /* Hide top bar on ultra-small screens to preserve screen estate */
  }
  .logo-seal-nav {
    width: 58px !important;
    height: 58px !important;
  }

  .brand-logo-img {
    width: 42px !important;
    height: 42px !important;
  }
  .brand-title-urdu {
    font-size: 1.15rem !important;
  }
  .brand-subtitle-en {
    font-size: 0.65rem !important;
  }
  .hero-title-urdu {
    font-size: 1.45rem !important;
    line-height: 1.5 !important;
  }
  .stats-grid {
    grid-template-columns: 1fr !important; /* Stack stats vertically on <=360px */
  }
  .bank-info-label {
    width: 44% !important;
    font-size: 0.78rem !important;
  }
  .bank-info-value {
    font-size: 0.85rem !important;
  }
  .copy-btn {
    padding: 0.2rem 0.45rem !important;
    font-size: 0.72rem !important;
  }
  .gallery-tab-btn {
    padding: 0.45rem 0.85rem !important;
    font-size: 0.85rem !important;
  }
}

/* 2. STANDARD SMARTPHONES (361px - 425px) */
@media (min-width: 361px) and (max-width: 425px) {
  html {
    font-size: 14px;
  }
  .container {
    padding: 0 1rem !important;
  }
  .hero-title-urdu {
    font-size: 1.6rem;
  }
  .video-showcase-grid {
    grid-template-columns: 1fr;
  }
  .media-gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* 3. TABLETS & SMALL SCREENS (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .project-spotlight-grid {
    grid-template-columns: 1fr !important;
  }
  .video-showcase-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .media-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bank-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 2rem !important;
  }
}

/* 4. LAPTOPS & DESKTOPS (1024px - 1366px) */
@media (min-width: 1024px) {
  .video-showcase-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .media-gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 5. LARGE & ULTRA-WIDE FULL HD (1367px - 1920px+) */
@media (min-width: 1367px) {
  :root {
    --container-max: 1260px;
  }
  .container {
    max-width: 1260px;
  }
  .media-gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ==========================================================================
   OFFICIAL SEAL, PAGE HEROES, AND RESPONSIVE LAYOUT FIXES
   ========================================================================== */
.logo-seal {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: #fff;
  overflow: hidden;
  line-height: 0;
}

.logo-seal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.logo-seal-nav {
  width: 72px;
  height: 72px;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px var(--color-gold-600),
    0 8px 18px rgba(7, 31, 22, 0.16);
}

.logo-seal-footer {
  width: 68px;
  height: 68px;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.9),
    0 0 0 4px var(--color-gold-500),
    0 8px 20px rgba(0, 0, 0, 0.35);
}

.nav-drawer-brand {
  display: none;
}

.hero-section {
  background-image:
    radial-gradient(circle at 12% 18%, rgba(212, 162, 46, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(7, 31, 22, 0.2), rgba(7, 31, 22, 0.2));
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-content .hero-description,
.hero-content .hero-title-urdu {
  margin-inline: auto;
}

.hero-content .hero-actions,
.hero-content .hero-pill-badge {
  justify-content: center;
}

.hero-frame {
  border-width: 1px;
  box-shadow:
    0 0 0 1px rgba(212, 162, 46, 0.35),
    var(--shadow-lg);
}

.stats-strip {
  border-top: 3px solid var(--color-gold-600);
}

.pillar-card,
.dept-card,
.scholar-card,
.media-card,
.video-card {
  border-top: 3px solid transparent;
}

.pillar-card:hover,
.dept-card:hover,
.scholar-card:hover,
.media-card:hover,
.video-card:hover {
  border-top-color: var(--color-gold-600);
}

.hero-crest {
  width: 118px;
  height: 118px;
  margin: 0 0 1rem;
  border-radius: 50%;
  background: #fff;
  padding: 4px;
  box-shadow:
    0 0 0 3px rgba(212, 162, 46, 0.85),
    0 12px 28px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.page-hero-inner .hero-crest {
  margin-inline: auto;
}

.hero-crest img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.page-hero-inner {
  text-align: center;
  position: relative;
  z-index: 2;
}

.project-spotlight-grid {
  background: var(--color-surface);
  border: 2px solid var(--color-gold-600);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

.project-spotlight-copy {
  padding: clamp(1.35rem, 3vw, 2.75rem);
}

.project-spotlight-visual {
  position: relative;
  min-height: 280px;
  background: #111;
}

.project-spotlight-visual img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  display: block;
}

.media-card-thumb img,
.video-card-poster,
.hero-frame-img {
  max-width: 100%;
}

.bank-info-value {
  gap: 0.65rem;
  flex-wrap: wrap;
}

.qr-image {
  max-width: 100%;
  height: auto;
}

@media (max-width: 900px) {
  .project-spotlight-grid,
  .history-grid,
  .admin-grid,
  .tarbiyah-grid,
  .halaqa-grid,
  .anjuman-grid,
  .calc-grid {
    grid-template-columns: 1fr !important;
  }

  .project-spotlight-visual,
  .project-spotlight-visual img {
    min-height: 220px;
    height: 240px;
  }

  .project-spotlight-visual > div {
    flex-wrap: wrap;
    gap: 0.45rem;
    font-size: 0.95rem;
  }

  .hero-frame-caption,
  .media-card-body {
    align-items: flex-start;
  }

  .hero-frame-caption {
    flex-direction: column;
    gap: 0.55rem;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    position: relative;
    z-index: 1100;
  }

  .nav-drawer-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    padding: 0.35rem 0.35rem 1rem;
    margin-bottom: 0.35rem;
    border-bottom: 1px solid var(--color-border-main);
  }

  .nav-drawer-brand strong {
    display: block;
    font-family: var(--font-urdu);
    font-size: 1.15rem;
    color: var(--color-primary-950);
    line-height: 1.6;
  }

  .nav-drawer-brand span {
    display: block;
    font-size: 0.78rem;
    color: var(--color-gold-800);
    font-weight: 700;
  }

  .hero-crest {
    width: 96px;
    height: 96px;
  }

  .hero-section .hero-title-urdu {
    font-size: clamp(1.45rem, 5.4vw, 2rem) !important;
  }

  .bank-info-table,
  .bank-info-table tbody,
  .bank-info-table tr,
  .bank-info-table td {
    display: block;
    width: 100% !important;
  }

  .bank-info-label {
    padding-bottom: 0.15rem;
  }

  .bank-info-value {
    padding-top: 0.15rem;
    padding-bottom: 0.85rem;
    justify-content: flex-start;
  }

  .footer-brand-box {
    align-items: flex-start;
  }

  .btn,
  .footer-wa-btn {
    max-width: 100%;
  }
}

@media (max-width: 980px) {
  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    position: relative;
    z-index: 1100;
    background: var(--color-primary-50);
    border: 1px solid var(--color-border-main);
    border-radius: var(--radius-sm);
    color: var(--color-primary-900);
    cursor: pointer;
  }

  .main-nav {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width: min(340px, 86vw);
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem 1.2rem 2rem;
    box-shadow: -10px 0 40px rgba(7, 31, 22, 0.35);
    border-left: 3px solid var(--color-gold-600);
    z-index: 1050;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
    gap: 0.15rem;
  }

  .main-nav.active {
    transform: translateX(0);
  }

  .nav-drawer-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding-bottom: 1rem;
    margin-bottom: 0.35rem;
    border-bottom: 1px solid var(--color-border-main);
  }

  .nav-drawer-brand strong {
    display: block;
    font-family: var(--font-urdu);
    color: var(--color-primary-950);
    font-size: 1.15rem;
    line-height: 1.6;
  }

  .nav-drawer-brand span {
    display: block;
    color: var(--color-gold-800);
    font-size: 0.78rem;
    font-weight: 700;
  }

  .nav-link {
    align-items: flex-start;
    width: 100%;
    padding: 0.8rem 0.7rem;
    border-bottom: 1px solid var(--color-border-subtle);
  }

  .nav-link.active::after {
    display: none;
  }

  .btn-donate-nav {
    width: 100%;
    justify-content: center;
    margin-top: 0.75rem;
  }
}

@media (max-width: 480px) {
  .brand-wrapper {
    gap: 0.6rem;
  }

  .brand-subtitle-en {
    display: none;
  }

  .hero-crest {
    width: 84px;
    height: 84px;
  }

  .logo-seal-footer {
    width: 58px;
    height: 58px;
  }

  .top-bar-item {
    text-align: center;
  }

  .gallery-tab-nav,
  .testimonials-filter-bar {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    -webkit-overflow-scrolling: touch;
  }

  .gallery-tab-btn,
  .filter-btn {
    flex: 0 0 auto;
  }
}

.upi-pay-card {
  width: 100%;
  max-width: 440px;
  margin-inline: auto;
  background: #fff;
  border: 2px solid var(--color-gold-600);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1rem 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.upi-pay-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  text-align: right;
  margin-bottom: 0.9rem;
}

.upi-pay-titles {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-width: 0;
}

.upi-pay-titles strong {
  font-family: var(--font-urdu);
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--color-primary-950);
}

.upi-pay-titles span:last-child {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-gold-800);
}

.logo-seal-qr {
  width: 64px;
  height: 64px;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 3px var(--color-gold-600);
}

.upi-qr-frame {
  width: min(100%, 340px);
  margin: 0 auto 0.85rem;
  padding: 0.45rem;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--color-border-main);
  box-shadow:
    inset 0 0 0 8px #fff,
    0 0 0 1px var(--color-primary-900);
}

.upi-qr-img {
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 1480;
  object-fit: contain;
  background: #fff;
  display: block;
  cursor: zoom-in;
}

.upi-scan-hint,
.upi-tap {
  font-family: var(--font-urdu);
  line-height: 1.9;
  color: var(--color-text-body);
}

.upi-scan-hint {
  font-size: 0.98rem;
  margin-bottom: 0.75rem;
}

.upi-meta {
  display: grid;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
  text-align: left;
}

.upi-meta div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  background: var(--color-primary-50);
  border-radius: var(--radius-xs);
  padding: 0.4rem 0.7rem;
}

.upi-meta dt {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.upi-meta dd {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--color-primary-900);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  text-align: left;
}

.upi-meta .copy-btn {
  flex: 0 0 auto;
  padding: 0.15rem 0.45rem;
  font-size: 0.72rem;
}

.upi-tap {
  font-size: 0.88rem;
  color: var(--color-gold-800);
  font-weight: 700;
}

@media (max-width: 900px) {
  .bank-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .upi-pay-card {
    order: -1;
  }
}

@media (max-width: 480px) {
  .upi-pay-card {
    padding: 1rem 0.75rem 1.1rem;
  }

  .upi-qr-frame {
    width: min(100%, 320px);
    padding: 0.35rem;
  }

  .logo-seal-qr {
    width: 56px;
    height: 56px;
  }

  .upi-pay-titles strong {
    font-size: 1.05rem;
  }

  .hero-crest {
    width: 92px;
    height: 92px;
  }
}

@media (min-width: 981px) {
  .nav-container {
    flex-wrap: nowrap;
    align-items: center;
    gap: 1.5rem;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
  }

  .brand-wrapper {
    gap: 0.85rem;
  }

  .logo-seal-nav {
    width: 64px;
    height: 64px;
  }

  .brand-title-urdu {
    font-size: 1.28rem;
    line-height: 1.45;
  }

  .brand-subtitle-en {
    letter-spacing: 0.08em;
    margin-top: 0.1rem;
  }

  .main-nav {
    flex: 1 1 auto;
    justify-content: flex-end;
    gap: 0.15rem 0.55rem;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
  }

  .nav-link,
  .btn-donate-nav {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .nav-link {
    padding: 0.28rem 0.45rem;
  }

  .nav-link .nav-ur {
    font-size: 1.02rem;
  }

  .btn-donate-nav {
    margin-inline-start: 0.35rem;
    padding: 0.32rem 0.95rem;
  }
}

@media (min-width: 1280px) {
  .logo-seal-nav {
    width: 72px;
    height: 72px;
  }

  .brand-title-urdu {
    font-size: 1.45rem;
  }

  .main-nav {
    gap: 0.2rem 1.05rem;
  }

  .nav-link .nav-ur {
    font-size: 1.08rem;
  }
}

.brand-wrapper {
  min-width: 0;
}

@media (max-width: 980px) {
  .brand-title-urdu {
    font-size: clamp(1.08rem, 4.2vw, 1.35rem);
  }
}

.page-hero-inner .hero-title-urdu {
  font-size: clamp(1.65rem, 3vw, 2.35rem) !important;
}

.footer-pay-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.footer-qr-link {
  display: block;
  width: min(100%, 210px);
  background: #fff;
  padding: 0.45rem;
  border-radius: 12px;
  border: 2px solid var(--color-gold-600);
  line-height: 0;
}

.footer-qr-link img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  background: #fff;
}

.footer-pay-line {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0;
  color: var(--color-gold-100);
  font-size: 0.84rem;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

a.footer-contact-item {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  margin-bottom: 0.35rem;
}

a.footer-contact-item:hover {
  color: var(--color-gold-500);
}

.footer-bottom {
  align-items: flex-start;
}

@media (max-width: 700px) {
  .footer-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (min-width: 701px) and (max-width: 1023px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 768px) {
  .footer-pay-col {
    align-items: center;
    text-align: center;
  }

  .footer-qr-link {
    width: min(100%, 240px);
  }

  .footer-bottom {
    justify-content: center;
    text-align: center;
  }

  .main-header {
    border-bottom-width: 2px;
  }
}

@media (max-width: 980px) {
  .main-nav .nav-link::after {
    display: none;
  }

  .main-nav .btn-donate-nav {
    align-items: center;
    background: var(--color-primary-800);
    color: #fff;
  }

  .main-nav .btn-donate-nav .nav-ur,
  .main-nav .btn-donate-nav .nav-en {
    color: #fff;
  }
}

@keyframes sealIn {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: none; }
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.logo-seal-nav {
  transition: transform 240ms ease;
  animation: sealIn 640ms cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.brand-text {
  animation: riseIn 560ms cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.hero-crest {
  animation: sealIn 720ms cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.hero-content > :not(.hero-crest) {
  animation: riseIn 640ms cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.hero-content > :nth-child(2) { animation-delay: 70ms; }
.hero-content > :nth-child(3) { animation-delay: 120ms; }
.hero-content > :nth-child(4) { animation-delay: 170ms; }
.hero-content > :nth-child(5) { animation-delay: 210ms; }

.brand-wrapper:hover .logo-seal-nav {
  transform: scale(1.035);
}

.footer-links a {
  transition: color 160ms ease, padding-inline-start 160ms ease;
}

.footer-links a:hover {
  padding-inline-start: 0.2rem;
}

