/* ==========================================================================
   Dinajpur Pally Unnayan Prochesta (DPUP) - Official Stylesheet
   Designed strictly following DPUP_Design_Brain.md & DPUP_Information.md
   Grounded, Authentic, Rural Bangladeshi NGO Identity
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Hind+Siliguri:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=Noto+Sans+Bengali:wght@400;500;600;700&family=Noto+Serif+Bengali:ital,wght@0,600;0,700;1,600&display=swap');

:root {
  /* Brand color tokens strictly derived from the official logo */
  --primary: #1A3B8B;          /* Indigo Blue from central pitcher & seal */
  --primary-dark: #122970;     /* Deep Indigo for footers & hover states */
  --accent-red: #C8202B;       /* Crimson Red from logo outer ring & sun */
  --accent-red-soft: #FDF1F2;  /* Soft red tint for tags & badges */
  --green: #1A7E3C;            /* Laurel wreath green */
  --green-soft: #EBF7F0;       /* Soft green tint for cards & agricultural areas */
  --earth-warm: #8B5E3C;       /* Terracotta / North Bengal rural pottery clay */
  --earth-light: #F5EFE8;      /* Warm sand alternate section background */
  --earth-border: #E5DDD3;     /* Warm border for rustic authenticity */
  
  --text-primary: #1A1A1A;     /* Charcoal black for crisp readability */
  --text-secondary: #4A4A4A;   /* Soft slate for meta descriptions */
  --text-muted: #6B7280;       /* Muted text */
  --border: #D9CFC5;           /* Warm-toned grey border */
  --white: #FFFFFF;
  
  /* Soft, warm-toned shadows (avoids cold corporate grey) */
  --shadow-sm: 0 1px 3px rgba(26, 59, 139, 0.06);
  --shadow-card: 0 3px 16px rgba(26, 59, 139, 0.08);
  --shadow-hover: 0 8px 26px rgba(26, 59, 139, 0.14);
  
  /* Typography stacks */
  --font-bangla-head: 'Hind Siliguri', sans-serif;
  --font-bangla-body: 'Noto Sans Bengali', sans-serif;
  --font-bangla-motto: 'Noto Serif Bengali', serif;
  --font-en-display: 'DM Serif Display', Georgia, serif;
  --font-en-body: 'Inter', system-ui, sans-serif;
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 9999px;
  
  --transition: all 0.25s ease-in-out;
  --container-max: 1200px;
}

/* --------------------------------------------------------------------------
   Reset & Base Elements
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 85px;
}

body {
  font-family: var(--font-bangla-body);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-primary);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Bilingual switching system */
body.lang-en {
  font-family: var(--font-en-body);
  line-height: 1.65;
}

body.lang-bn .en-only { display: none !important; }
body.lang-en .bn-only { display: none !important; }
body.lang-en .brand-name-bn { display: none !important; }
body.lang-en .brand-name-en { font-size: 1.15rem; color: var(--primary); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-bangla-head);
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary);
}

body.lang-en h1, body.lang-en h2, body.lang-en h3 {
  font-family: var(--font-en-display);
}

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

a:hover {
  color: var(--accent-red);
}

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

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

/* --------------------------------------------------------------------------
   Top Notice / Gov Accreditation Ribbon
   -------------------------------------------------------------------------- */
.top-notice-bar {
  background-color: var(--primary-dark);
  color: #E2E8F0;
  font-size: 0.825rem;
  padding: 6px 0;
  border-bottom: 2px solid var(--accent-red);
}

.top-notice-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.top-notice-badges {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.top-notice-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.12);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.top-notice-badge i {
  color: #38BDF8;
}

.top-notice-contact {
  display: flex;
  align-items: center;
  gap: 15px;
}

.top-notice-contact a {
  color: #E2E8F0;
  font-size: 0.825rem;
}

.top-notice-contact a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Header & Main Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.site-header.scrolled {
  box-shadow: var(--shadow-card);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  height: 80px;
}

.brand-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

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

.brand-name-bn {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.brand-name-en {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--accent-red);
  letter-spacing: 0.5px;
}

.brand-motto {
  font-family: var(--font-bangla-motto);
  font-size: 0.75rem;
  color: var(--green);
  font-style: italic;
}

/* Nav Menu */
.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.mobile-drawer-cta-wrap {
  display: none;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 22px;
}

.nav-link {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-primary);
  position: relative;
  padding: 6px 0;
}

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

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent-red);
  border-radius: 2px;
}

/* Nav Controls */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-toggle-btn {
  background: var(--earth-light);
  border: 1px solid var(--border);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.lang-toggle-btn:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.lang-toggle-btn .badge-soon {
  background: rgba(220, 38, 38, 0.12);
  color: #B91C1C;
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 5px;
  font-weight: 600;
  border: 1px solid rgba(220, 38, 38, 0.25);
}

.btn-nav-cta,
.btn-donate {
  background-color: var(--accent-red);
  color: var(--white) !important;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 2px 8px rgba(200, 32, 43, 0.25);
  transition: var(--transition);
  text-decoration: none;
}

.btn-nav-cta:hover,
.btn-donate:hover {
  background-color: #A0151E;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(200, 32, 43, 0.35);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary);
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Hero Section - Authentic Real Photo Grounded
   -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  min-height: 540px;
  background-color: #111827;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.85);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Non-generic directional gradient: deep indigo on left fading smoothly into real photograph */
  background: linear-gradient(90deg, rgba(18, 41, 112, 0.94) 0%, rgba(26, 59, 139, 0.82) 42%, rgba(18, 41, 112, 0.35) 85%, rgba(0, 0, 0, 0.15) 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 680px;
  color: var(--white);
  padding: 60px 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(4px);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: #FEF08A; /* Warm golden dawn highlight */
}

.hero-title {
  font-size: 2.65rem;
  color: var(--white);
  line-height: 1.22;
  margin-bottom: 16px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.hero-motto-ribbon {
  font-family: var(--font-bangla-motto);
  font-size: 1.35rem;
  color: #F87171;
  background: rgba(0, 0, 0, 0.3);
  display: inline-block;
  padding: 2px 14px;
  border-left: 3px solid var(--accent-red);
  margin-bottom: 18px;
  font-style: italic;
}

.hero-lead {
  font-size: 1.15rem;
  line-height: 1.7;
  color: #E2E8F0;
  margin-bottom: 28px;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-primary {
  background-color: var(--accent-red);
  color: var(--white) !important;
  font-weight: 600;
  padding: 12px 26px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(200, 32, 43, 0.3);
  transition: var(--transition);
}

.btn-primary:hover {
  background-color: #A0151E;
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--white) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: var(--white);
}

/* --------------------------------------------------------------------------
   Impact Numbers Strip
   -------------------------------------------------------------------------- */
.stats-strip {
  background-color: var(--primary);
  color: var(--white);
  padding: 38px 0;
  border-bottom: 3px solid var(--green);
  position: relative;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.stat-item {
  text-align: center;
  position: relative;
  padding: 0 15px;
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 15%;
  height: 70%;
  width: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.stat-number {
  font-family: var(--font-en-display);
  font-size: 2.85rem;
  font-weight: 700;
  line-height: 1;
  color: #FFFFFF;
  margin-bottom: 6px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}

.stat-number span.unit {
  font-size: 1.4rem;
  font-family: var(--font-bangla-head);
  color: #93C5FD;
}

.stat-label {
  font-size: 0.95rem;
  color: #BFDBFE;
  font-weight: 500;
}

/* Animated Statistics Number Enhancements */
.stat-number .counter-val,
.mf-stat-num .counter-val {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

body.lang-bn .stat-number {
  font-family: var(--font-bangla-head);
}

body.lang-en .stat-number {
  font-family: var(--font-en-display);
}

.mf-stat-num span.unit {
  font-size: 1rem;
  font-weight: 600;
  color: var(--green);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   Section Common Styles
   -------------------------------------------------------------------------- */
.section-padding {
  padding: 70px 0;
}

.section-bg-white { background-color: var(--white); }
.section-bg-earth { background-color: var(--earth-light); }
.section-bg-green { background-color: var(--green-soft); }
.section-bg-dark { background-color: var(--primary-dark); color: var(--white); }

.section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 50px auto;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-red);
  margin-bottom: 8px;
}

.section-title {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 12px;
  position: relative;
  padding-bottom: 14px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 55px;
  height: 3px;
  background: var(--green);
  border-radius: 2px;
}

.section-title.text-left::after {
  left: 0;
  transform: none;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   About Snapshot Section
   -------------------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}

.about-text-col p {
  margin-bottom: 16px;
  color: var(--text-primary);
}

.ed-quote-box {
  background-color: var(--white);
  border-left: 4px solid var(--green);
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
}

.ed-quote-text {
  font-family: var(--font-bangla-motto);
  font-size: 1.08rem;
  font-style: italic;
  color: var(--primary-dark);
  line-height: 1.7;
  margin-bottom: 10px;
}

.ed-quote-author {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-red);
  display: flex;
  align-items: center;
  gap: 8px;
}

.about-badges-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.about-badge-card {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
}

.about-badge-card i {
  font-size: 1.3rem;
  color: var(--green);
}

.about-badge-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.about-badge-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.about-image-card {
  background: var(--white);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.about-card-img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.about-meta-list {
  text-align: left;
  border-top: 1px dashed var(--border);
  padding-top: 12px;
}

.about-meta-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.875rem;
}

.about-meta-row strong {
  color: var(--primary);
}

/* --------------------------------------------------------------------------
   Programmes Cards Grid
   -------------------------------------------------------------------------- */
.programmes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.prog-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.prog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--green);
}

.prog-img-box {
  position: relative;
  height: 220px;
  overflow: hidden;
  background-color: var(--earth-light);
}

.prog-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  transition: transform 0.4s ease;
}

.prog-card:hover .prog-img-box img {
  transform: scale(1.03);
}

.prog-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
}

.prog-body {
  padding: 22px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.prog-title {
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 10px;
}

.prog-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 18px;
  flex-grow: 1;
}

.prog-link {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.prog-link:hover {
  color: var(--accent-red);
}

/* --------------------------------------------------------------------------
   Featured Microfinance Deep Dive
   -------------------------------------------------------------------------- */
.mf-feature-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.mf-feature-media {
  position: relative;
  min-height: 380px;
}

.mf-feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mf-feature-badge {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: rgba(18, 41, 112, 0.92);
  color: var(--white);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  backdrop-filter: blur(4px);
}

.mf-feature-content {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mf-stat-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.mf-stat-card {
  background: var(--green-soft);
  border-left: 3px solid var(--green);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
}

.mf-stat-num {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.mf-stat-lbl {
  font-size: 0.825rem;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Filterable Real Photo Gallery
   -------------------------------------------------------------------------- */
.gallery-filter-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 35px;
}

.filter-tab {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition);
}

.filter-tab:hover, .filter-tab.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.gallery-item {
  position: relative;
  height: 230px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-item-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 30px 14px 12px 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
  color: var(--white);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

.gallery-item-title {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.3;
}

.gallery-item-category {
  font-size: 0.725rem;
  color: #38BDF8;
}

/* Lightbox Modal */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.lightbox-content {
  max-width: 900px;
  max-height: 88vh;
  position: relative;
  text-align: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: var(--radius-sm);
  margin: 0 auto;
}

.lightbox-caption {
  color: var(--white);
  margin-top: 12px;
  font-size: 1rem;
}

.lightbox-close {
  position: absolute;
  top: -38px;
  right: 0;
  color: var(--white);
  font-size: 2rem;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Leadership & Governance
   -------------------------------------------------------------------------- */
.gov-table-container {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
  margin-bottom: 35px;
}

.gov-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.gov-table th {
  background: var(--primary);
  color: var(--white);
  padding: 14px 18px;
  font-size: 0.95rem;
  font-weight: 600;
}

.gov-table td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.gov-table tr:last-child td {
  border-bottom: none;
}

.gov-table tr:nth-child(even) {
  background: var(--earth-light);
}

.gov-table td.role {
  color: var(--primary);
  font-weight: 600;
}

.ed-profile-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 28px;
  align-items: center;
}

.ed-avatar-box {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--green);
  box-shadow: var(--shadow-sm);
}

.ed-avatar-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ed-profile-info h3 {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 4px;
}

.ed-profile-info .title {
  color: var(--accent-red);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.ed-profile-info p {
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.65;
}

.member-email {
  display: block;
  font-size: 0.82rem;
  color: var(--primary);
  margin-top: 4px;
  font-weight: 500;
}

.member-email a {
  color: inherit;
  text-decoration: none;
}

.member-email a:hover {
  text-decoration: underline;
  color: var(--primary-light);
}

.staff-section-subtitle {
  margin-top: 35px;
  margin-bottom: 20px;
  font-size: 1.25rem;
  color: var(--primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.staff-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.staff-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.staff-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--green);
  flex-shrink: 0;
  background: var(--earth-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.staff-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.staff-avatar i {
  font-size: 1.8rem;
  color: var(--text-muted);
}

.staff-info h4 {
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.staff-info .staff-role {
  font-size: 0.85rem;
  color: var(--accent-red);
  font-weight: 600;
  margin-bottom: 5px;
}

.staff-info .staff-meta {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.staff-info .staff-meta a {
  color: var(--primary);
  text-decoration: none;
}

.staff-info .staff-meta a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Accreditation Strip
   -------------------------------------------------------------------------- */
.accreditation-strip {
  background: var(--primary-dark);
  color: var(--white);
  padding: 40px 0;
  border-top: 3px solid var(--accent-red);
}

.accred-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  text-align: center;
}

.accred-item {
  padding: 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.accred-item:last-child {
  border-right: none;
}

.accred-icon {
  font-size: 1.8rem;
  color: #FEF08A;
  margin-bottom: 8px;
}

.accred-name {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
}

.accred-year {
  font-size: 0.78rem;
  color: #93C5FD;
}

/* --------------------------------------------------------------------------
   News & Events
   -------------------------------------------------------------------------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.news-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.news-img {
  height: 180px;
  object-fit: cover;
  width: 100%;
}

.news-body {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.news-date {
  font-size: 0.8rem;
  color: var(--accent-red);
  font-weight: 600;
  margin-bottom: 8px;
}

.news-title {
  font-size: 1.15rem;
  color: var(--primary);
  line-height: 1.4;
  margin-bottom: 12px;
}

.news-snippet {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  flex-grow: 1;
}

/* --------------------------------------------------------------------------
   Contact Section
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

.contact-info-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.contact-item {
  display: flex;
  gap: 16px;
  margin-bottom: 22px;
}

.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--green-soft);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.contact-detail h4 {
  font-size: 1.05rem;
  margin-bottom: 4px;
  color: var(--primary);
}

.contact-detail p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.contact-form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 59, 139, 0.12);
}

textarea.form-control {
  resize: vertical;
  min-height: 110px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--primary-dark);
  color: #E2E8F0;
  padding: 60px 0 20px 0;
  border-top: 4px solid var(--accent-red);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 36px;
  margin-bottom: 45px;
}

.footer-brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.footer-brand-logo img {
  width: 52px;
  height: 52px;
  background: #FFF;
  border-radius: 50%;
  padding: 2px;
}

.footer-desc {
  font-size: 0.9rem;
  line-height: 1.65;
  color: #CBD5E1;
  margin-bottom: 16px;
}

.footer-col-title {
  color: #FFFFFF;
  font-size: 1.15rem;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 8px;
}

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

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

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #CBD5E1;
  font-size: 0.92rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: #FEF08A;
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: #94A3B8;
}

/* --------------------------------------------------------------------------
   Responsive Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .hero-title { font-size: 2.15rem; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .stat-item:not(:last-child)::after { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .programmes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mf-feature-box { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-grid { grid-template-columns: 1fr; }
  .accred-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .top-notice-bar {
    padding: 6px 0;
  }
  .top-notice-inner {
    flex-direction: column;
    text-align: center;
    gap: 6px;
    padding: 4px 12px;
  }
  .top-notice-badges {
    justify-content: center;
    gap: 5px;
  }
  .top-notice-badge {
    font-size: 0.72rem;
    padding: 2px 6px;
  }
  .top-notice-contact {
    justify-content: center;
    gap: 12px;
    font-size: 0.78rem;
  }
  .site-header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
  }
  .nav-container {
    height: auto;
    min-height: 62px;
    padding: 8px 14px;
    position: relative;
  }
  .brand-identity {
    gap: 8px;
    flex: 1;
    min-width: 0;
    max-width: none;
    overflow: hidden;
  }
  .brand-logo-img {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
  }
  .brand-titles {
    min-width: 0;
    overflow: hidden;
  }
  .brand-name-bn {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
  }
  .brand-name-en {
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
  }
  body.lang-en .brand-name-en {
    font-size: 0.95rem;
  }
  .brand-motto {
    display: none;
  }
  .nav-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }
  #navContactCta {
    display: none; /* Accessible inside mobile drawer dropdown */
  }
  .lang-toggle-btn {
    padding: 6px 9px;
    font-size: 0.78rem;
    min-height: 38px;
    border-radius: var(--radius-pill);
    white-space: nowrap;
  }
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    font-size: 1.3rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--earth-light);
    color: var(--primary);
    cursor: pointer;
    transition: var(--transition);
  }
  .mobile-menu-toggle:hover,
  .mobile-menu-toggle:focus {
    background: var(--primary);
    color: var(--white);
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: calc(100vh - 65px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--white);
    flex-direction: column;
    padding: 16px 20px 24px;
    border-bottom: 2px solid var(--border);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    z-index: 1001;
  }
  .main-nav.active {
    display: flex;
  }
  .nav-links {
    flex-direction: column;
    width: 100%;
    text-align: left;
    gap: 4px;
    margin-bottom: 16px;
  }
  .nav-links li {
    width: 100%;
    border-bottom: 1px solid #F1F5F9;
  }
  .nav-links a {
    display: block;
    padding: 12px 6px;
    font-size: 1.05rem;
    font-weight: 600;
  }
  .mobile-drawer-cta-wrap {
    display: block;
    width: 100%;
    padding-top: 8px;
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding: 48px 0 42px;
  }
  .hero-overlay {
    background: linear-gradient(180deg, rgba(17, 30, 23, 0.88) 0%, rgba(17, 30, 23, 0.82) 50%, rgba(17, 30, 23, 0.92) 100%);
  }
  .hero-title {
    font-size: 1.8rem;
    line-height: 1.3;
  }
  .hero-badge {
    font-size: 0.78rem;
    padding: 6px 10px;
    display: inline-block;
  }
  .hero-lead {
    font-size: 0.95rem;
    line-height: 1.6;
  }
  .hero-ctas {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }
  .hero-ctas .btn-primary,
  .hero-ctas .btn-secondary {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }
  .programmes-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .prog-img-box {
    height: 210px;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .gallery-item-overlay {
    opacity: 1;
    background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.85) 100%);
  }
  .gov-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: inset 0 0 4px rgba(0,0,0,0.05);
  }
  .gov-table {
    min-width: 600px;
  }
  .ed-profile-card {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
    padding: 24px 16px;
  }
  .staff-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
}

/* --------------------------------------------------------------------------
   Narrow Mobile (< 480px / 360px / 320px) Optimized Styles (FEAT-RESP-01)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .container {
    padding-left: 14px;
    padding-right: 14px;
  }
  .section-padding {
    padding-top: 40px;
    padding-bottom: 40px;
  }
  .section-title {
    font-size: 1.5rem;
  }
  .hero-title {
    font-size: 1.55rem;
  }
  .hero-badge {
    font-size: 0.74rem;
    padding: 4px 8px;
  }
  .hero-motto-ribbon {
    font-size: 0.92rem;
    padding: 5px 12px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .stat-item {
    padding: 16px 14px;
  }
  .stat-number {
    font-size: 1.8rem;
  }
  .mf-stat-cards {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .accred-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .contact-info-card,
  .contact-form-card {
    padding: 18px 14px;
  }
  .form-control {
    font-size: 16px; /* Prevents auto-zoom on iOS mobile */
    min-height: 44px;
  }
  .btn-primary,
  .btn-secondary {
    min-height: 46px;
    font-size: 0.95rem;
  }
}

@media (max-width: 360px) {
  .hero-title {
    font-size: 1.38rem;
  }
  .brand-logo-img {
    width: 36px;
    height: 36px;
  }
  .brand-name-bn {
    font-size: 0.88rem;
  }
  .brand-name-en {
    font-size: 0.65rem;
  }
  body.lang-en .brand-name-en {
    font-size: 0.86rem;
  }
  .lang-toggle-btn {
    padding: 4px 7px;
    font-size: 0.72rem;
  }
  .mobile-menu-toggle {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }
}

/* Flexible content, accessible controls and device-specific refinements. */
:root { --header-offset: 96px; }
html { scroll-padding-top: var(--header-offset); }
[id] { scroll-margin-top: 12px; }
main:focus { outline: none; }
.container, .nav-container > *, .brand-titles, .contact-detail,
.about-grid > *, .programmes-grid > *, .mf-feature-box > *,
.contact-grid > *, .footer-grid > *, .staff-grid > *, .ed-profile-info {
  min-width: 0;
}
body { overflow-wrap: anywhere; }
.brand-identity { min-width: 0; }
.brand-logo-img, .nav-actions { flex-shrink: 0; }
.nav-container { gap: 16px; height: auto; min-height: 80px; }
.nav-links { flex-shrink: 0; }
.nav-link { white-space: nowrap; }
.hero-badge { max-width: 100%; }
.hero-content { width: 100%; }
.hero-lead, .section-subtitle, .about-text p { max-width: 72ch; }
.stat-number { flex-wrap: wrap; line-height: 1.2; }
.top-notice-contact { flex-wrap: wrap; }
button, input, select, textarea { font: inherit; }
button, .btn-primary, .btn-secondary, .btn-nav-cta, .filter-tab,
.lang-toggle-btn, .mobile-menu-toggle { min-height: 44px; }
button { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--accent-red); outline-offset: 4px; }
.site-footer :focus-visible, .hero-section :focus-visible,
.top-notice-bar :focus-visible { outline-color: #FEF08A; }
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 3000;
  background: var(--white); color: var(--primary); padding: 10px 16px;
  transform: translateY(-160%); border: 2px solid var(--primary);
}
.skip-link:focus { transform: translateY(0); }
.gov-table-container { max-width: 100%; overscroll-behavior-inline: contain; }
.lightbox-modal { height: 100dvh; overflow-y: auto; }
.lightbox-content { width: 100%; max-height: calc(100dvh - 80px); }
.lightbox-img { width: auto; height: auto; max-height: calc(100dvh - 160px); object-fit: contain; }
.lightbox-close {
  width: 44px; height: 44px; top: -44px; display: grid; place-items: center;
  background: transparent; border: 0; line-height: 1;
}
@media (max-width: 1100px) {
  .main-nav { max-height: var(--nav-space, calc(100dvh - var(--header-offset))); overscroll-behavior: contain; }
  .nav-container { min-height: 64px; }
  .mobile-menu-toggle { width: 44px; min-width: 44px; height: 44px; }
  .main-nav .nav-link { white-space: normal; }
  .brand-identity { overflow: visible; }
}
@media (min-width: 769px) and (max-width: 1100px) {
  .brand-name-bn, body.lang-en .brand-name-en { font-size: 1.15rem; }
  .brand-name-en { font-size: .825rem; }
}
@media (min-width: 601px) and (max-width: 768px) {
  .programmes-grid, .gallery-grid, .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .mf-feature-content { padding: 24px 18px; }
  .mf-feature-media { min-height: 240px; }
  .mf-feature-media img { position: absolute; inset: 0; }
  .hero-content { padding: 20px 0; }
  .brand-name-bn, .brand-name-en, body.lang-en .brand-name-en {
    white-space: normal; overflow: visible; text-overflow: clip;
    line-height: 1.35; letter-spacing: 0;
  }
  .brand-name-en { font-size: .68rem; }
  body.lang-en .brand-name-en { font-size: .85rem; }
  .footer-links a { display: inline-block; padding-block: 6px; }
  .filter-tab { padding: 8px 14px; }
  .top-notice-contact { column-gap: 10px; row-gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* Content and navigation stay readable if scripting is unavailable. */
@media (max-width: 1100px) {
  html.no-js .nav-container { flex-wrap: wrap; }
  html.no-js .main-nav { display: flex; position: static; max-height: none; box-shadow: none; }
  html.no-js .mobile-menu-toggle, html.no-js .lang-toggle-btn { display: none; }
}

.form-help, .form-feedback { font-size: .9rem; margin-bottom: 18px; }
.form-feedback { margin-block: 16px 8px; }
#emailDraftLink:not([hidden]) { display: inline-block; min-height: 44px; padding-block: 8px; text-decoration: underline; }
