/* ========================================================
   ZAHURUL ISLAM TRUST - OFFICIAL STYLESHEET
   Islamic Modern Theme: Royal Purple, Rich Gold & Lavender
   ======================================================== */

/* Fonts are loaded via <link> tags in index.html */

:root {
  --font-main: 'Montserrat', 'Noto Sans Bengali', sans-serif;
  --font-arabic: 'Amiri', 'Traditional Arabic', 'Noto Sans Bengali', serif;

  --primary: #3a1f5c;
  --primary-light: #553182;
  --primary-dark: #24123b;
  --secondary: #e9b949;
  --secondary-light: #f5c96a;
  --secondary-dark: #a7780f;
  --accent: #7b4fb0;
  --accent-light: #f1ebf8;
  
  --bg-main: #f8f5fb;
  --bg-card: #ffffff;
  --bg-dark: #1d0f30;
  
  --text-dark: #1f1530;
  --text-muted: #66597a;
  --text-light: #f3f0f7;
  --border-color: #e6dff0;
  --border-gold: rgba(233, 185, 73, 0.4);
  
  --shadow-sm: 0 2px 8px rgba(58, 31, 92, 0.06);
  --shadow-md: 0 8px 24px rgba(58, 31, 92, 0.08);
  --shadow-lg: 0 16px 40px rgba(58, 31, 92, 0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

  /* Royal purple panels with a faint Islamic geometric lattice */
  --gradient-royal: linear-gradient(135deg, #2e1849 0%, #3a1f5c 55%, #44266b 100%);
  --pattern-lattice: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.06' stroke-width='1.2'%3E%3Ccircle cx='48' cy='36' r='14'/%3E%3Ccircle cx='48' cy='60' r='14'/%3E%3Ccircle cx='36' cy='48' r='14'/%3E%3Ccircle cx='60' cy='48' r='14'/%3E%3Ccircle cx='0' cy='0' r='22'/%3E%3Ccircle cx='96' cy='0' r='22'/%3E%3Ccircle cx='0' cy='96' r='22'/%3E%3Ccircle cx='96' cy='96' r='22'/%3E%3C/g%3E%3C/svg%3E");
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

button, input, select, textarea {
  font-family: inherit;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.65;
  overflow-x: hidden;
}

h1, h2, h3, h4, .font-serif {
  font-family: var(--font-main);
  font-weight: 700;
  color: var(--primary);
  line-height: 1.3;
}

.arabic-text {
  font-family: var(--font-arabic);
  direction: rtl;
}

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

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

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ================= TOP NOTIFICATION / CONTACT BAR ================= */
.top-bar {
  background: var(--primary-dark);
  color: #d9cfe6;
  font-size: 0.86rem;
  padding: 8px 0;
  border-bottom: 2px solid var(--secondary);
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.top-bar-contact {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.top-bar-contact a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #e3d9ef;
}

.top-bar-contact a:hover {
  color: var(--secondary-light);
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ================= LANGUAGE SWITCHER ================= */
.lang-switch-box {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(233, 185, 73, 0.4);
  border-radius: 20px;
  padding: 2px;
  gap: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: #d9cfe6;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.lang-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.lang-btn.active {
  background: var(--secondary);
  color: var(--primary-dark);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.admin-link-btn {
  background: rgba(233, 185, 73, 0.2);
  border: 1px solid var(--secondary);
  color: var(--secondary-light) !important;
  padding: 4px 12px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.admin-link-btn:hover {
  background: var(--secondary);
  color: var(--primary-dark) !important;
}

/* ================= ARABIC & RTL SUPPORT ================= */
html[dir="rtl"] body {
  font-family: var(--font-arabic);
}

html[dir="rtl"] h1, 
html[dir="rtl"] h2, 
html[dir="rtl"] h3, 
html[dir="rtl"] h4, 
html[dir="rtl"] .font-serif {
  font-family: var(--font-arabic);
  letter-spacing: 0;
}

html[dir="rtl"] .top-bar-contact {
  direction: rtl;
}

html[dir="rtl"] .founder-bio-quote {
  border-left: none;
  border-right: 3px solid var(--secondary);
  padding-left: 0;
  padding-right: 18px;
}

html[dir="rtl"] .bio-list li {
  padding-left: 0;
  padding-right: 28px;
}

html[dir="rtl"] .bio-list li::before {
  left: auto;
  right: 8px;
}

html[dir="rtl"] .footer-links a:hover {
  transform: translateX(-4px);
}

html[dir="rtl"] .footer-col h4::after {
  left: auto;
  right: 0;
}

html[dir="rtl"] .toast-msg {
  right: auto;
  left: 24px;
  border-left: none;
  border-right: 4px solid var(--secondary);
}

html[dir="rtl"] .styled-bio-table th,
html[dir="rtl"] .styled-bio-table td {
  text-align: right;
}

/* ================= HEADER & NAVIGATION ================= */
.main-header {
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.main-header .container {
  max-width: 1440px;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 12px 0;
}

.brand-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  min-width: 0;
}

.brand-emblem {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: 2px solid var(--secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-light);
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(58, 31, 92, 0.15);
}

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

.brand-titles h1 {
  font-size: 1.2rem;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
  white-space: nowrap;
}

.brand-titles .subtitle {
  font-size: 0.7rem;
  color: var(--secondary-dark);
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-titles .bengali-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  flex-wrap: nowrap;
}

.nav-menu li {
  flex-shrink: 0;
}

.nav-link {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-dark);
  padding: 8px 9px;
  border-radius: 6px;
  position: relative;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: rgba(58, 31, 92, 0.05);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 70%;
  height: 2px;
  background: var(--secondary);
  transition: transform 0.3s ease;
}

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

.donate-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-inline-start: 8px;
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  color: #fff !important;
  padding: 9px 18px;
  border-radius: 30px;
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(233, 185, 73, 0.3);
}

.donate-nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(233, 185, 73, 0.4);
}

.mobile-toggle {
  display: none;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: rgba(58, 31, 92, 0.06);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 1.3rem;
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
}

.mobile-toggle:hover {
  background: rgba(58, 31, 92, 0.12);
}

/* Collapsed (drawer) navigation: applied by JS (setupNavigation) on narrow
   screens or whenever the full menu does not fit in the active language */
.nav-compact .mobile-toggle {
  display: inline-flex;
}

.nav-compact .nav-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 12px 20px 20px;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  max-height: calc(100vh - 80px);
  max-height: calc(100dvh - 80px);
  overflow-y: auto;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: var(--transition);
}

.nav-compact .nav-menu.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nav-compact .nav-link {
  padding: 12px 14px;
  font-size: 1rem;
}

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

.nav-compact .nav-link.active {
  background: rgba(58, 31, 92, 0.08);
  box-shadow: inset 3px 0 0 var(--secondary);
}

html[dir="rtl"] .nav-compact .nav-link.active {
  box-shadow: inset -3px 0 0 var(--secondary);
}

.nav-compact .donate-nav-btn {
  display: flex;
  justify-content: center;
  margin: 8px 0 0;
  padding: 12px 18px;
  font-size: 1rem;
}

@media (max-width: 576px) {
  .navbar {
    gap: 12px;
    padding: 10px 0;
  }

  .brand-identity {
    flex-shrink: 1;
    gap: 10px;
  }

  .brand-emblem {
    width: 42px;
    height: 42px;
    font-size: 1.15rem;
  }

  .brand-titles h1 {
    font-size: 1.05rem;
    white-space: normal;
  }

  .brand-titles .subtitle {
    font-size: 0.66rem;
    letter-spacing: 0.5px;
    white-space: normal;
  }

  .brand-titles .bengali-sub {
    display: none;
  }

  .nav-menu {
    padding: 8px 16px 16px;
  }
}

/* ================= HERO SLIDER ================= */
.hero-slider-section {
  position: relative;
  background: #000;
  color: #fff;
  height: 560px;
  overflow: hidden;
}

.slider-track {
  height: 100%;
  position: relative;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
  background-size: cover;
  background-position: center;
}

.slide.active {
  opacity: 1;
  visibility: visible;
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(36, 18, 59, 0.92) 0%, rgba(58, 31, 92, 0.75) 50%, rgba(0, 0, 0, 0.4) 100%);
  display: flex;
  align-items: center;
}

.slide-content {
  max-width: 720px;
  padding: 40px 0;
  animation: slideFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideFadeIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-tag {
  display: inline-block;
  background: var(--secondary);
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 5px 14px;
  border-radius: 4px;
  margin-bottom: 18px;
}

.slide-title {
  color: #ffffff;
  font-size: 2.8rem;
  line-height: 1.2;
  margin-bottom: 16px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.slide-subtitle {
  font-size: 1.15rem;
  color: #e9e1f3;
  margin-bottom: 28px;
  line-height: 1.6;
}

.slide-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 30px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(233, 185, 73, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(233, 185, 73, 0.45);
}

.btn-outline-white {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.7);
  color: #ffffff;
}

.btn-outline-white:hover {
  background: #ffffff;
  color: var(--primary-dark);
}

.btn-secondary {
  background: var(--primary);
  color: #fff;
}

.btn-secondary:hover {
  background: var(--primary-light);
}

/* Slider Controls */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(58, 31, 92, 0.65);
  border: 1px solid rgba(233, 185, 73, 0.5);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
}

.slider-arrow:hover {
  background: var(--secondary);
  color: var(--primary-dark);
}

.slider-prev {
  left: 20px;
}

.slider-next {
  right: 20px;
}

.slider-dots {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: var(--transition);
}

.slider-dot.active {
  width: 32px;
  background: var(--secondary);
}

/* ================= SECTION HEADINGS ================= */
.section {
  padding: 80px 0;
}

.section-bg-alt {
  background: #ffffff;
}

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

.section-badge {
  display: inline-block;
  color: var(--secondary-dark);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
  padding: 4px 14px;
  background: rgba(233, 185, 73, 0.12);
  border-radius: 20px;
}

.section-title {
  font-size: 2.3rem;
  margin-bottom: 14px;
  position: relative;
}

.section-divider {
  width: 70px;
  height: 3px;
  background: linear-gradient(90deg, var(--secondary-light), var(--primary));
  margin: 14px auto;
  border-radius: 2px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ================= CORE MISSION PILLARS ================= */
.mission-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.mission-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 36px 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  border-top: 4px solid var(--secondary);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

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

.mission-card-icon {
  width: 68px;
  height: 68px;
  background: var(--accent-light);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.8rem;
  margin-bottom: 22px;
  transition: var(--transition);
}

.mission-card:hover .mission-card-icon {
  background: var(--primary);
  color: var(--secondary-light);
}

.mission-card h3 {
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.mission-card .bengali-title {
  font-size: 0.95rem;
  color: var(--secondary-dark);
  font-weight: 700;
  margin-bottom: 14px;
}

.mission-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ================= VALUES & TRAINING EMPHASIS ================= */
.philosophy-banner {
  background: var(--pattern-lattice), var(--gradient-royal);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 50px 40px;
  box-shadow: var(--shadow-md);
  margin-bottom: 50px;
  position: relative;
  border: 1px solid var(--border-gold);
}

.philosophy-banner h3 {
  color: var(--secondary-light);
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.philosophy-banner p {
  font-size: 1.15rem;
  line-height: 1.7;
  max-width: 900px;
  color: #eee7f6;
}

.emphasis-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.emphasis-card {
  background: var(--bg-card);
  padding: 26px 20px;
  border-radius: var(--radius-md);
  text-align: center;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.emphasis-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px auto;
  border-radius: 50%;
  background: rgba(233, 185, 73, 0.15);
  color: var(--primary);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emphasis-card h4 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.emphasis-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ================= INSTITUTIONS SHOWCASE ================= */
.institution-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 40px;
  transition: var(--transition);
}

.institution-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-gold);
}

.inst-grid-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
}

.inst-image-col {
  position: relative;
  min-height: 320px;
  overflow: hidden;
}

.inst-image-col img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.institution-card:hover .inst-image-col img {
  transform: scale(1.04);
}

.inst-badge-category {
  position: absolute;
  top: 18px;
  left: 18px;
  background: rgba(36, 18, 59, 0.9);
  color: var(--secondary-light);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  border: 1px solid var(--secondary);
}

.inst-content-col {
  padding: 36px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.inst-header h3 {
  font-size: 1.6rem;
  margin-bottom: 6px;
  color: var(--primary);
}

.inst-bengali-name {
  font-size: 1rem;
  color: var(--secondary-dark);
  font-weight: 700;
  margin-bottom: 14px;
}

.inst-summary {
  color: var(--text-muted);
  font-size: 0.96rem;
  line-height: 1.65;
  margin-bottom: 20px;
}

.inst-focus-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.focus-tag {
  background: var(--accent-light);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 16px;
  border: 1px solid rgba(123, 79, 176, 0.2);
}

.inst-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 18px;
  margin-top: auto;
}

.gallery-count-pill {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.view-gallery-btn {
  background: var(--primary);
  color: #fff;
  padding: 8px 18px;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.view-gallery-btn:hover {
  background: var(--secondary);
  color: var(--primary-dark);
}

/* ================= SEPARATE PHOTO GALLERIES INTERFACE ================= */
.galleries-section {
  background: #f6f3f9;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.gallery-nav-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

.gallery-tab-btn {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-dark);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.gallery-tab-btn:hover {
  border-color: var(--secondary);
  color: var(--primary);
}

.gallery-tab-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(58, 31, 92, 0.25);
}

.gallery-tab-btn .badge-pill {
  background: rgba(255, 255, 255, 0.25);
  color: inherit;
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: 10px;
}

.gallery-tab-btn.active .badge-pill {
  background: var(--secondary);
  color: var(--primary-dark);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.gallery-item-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}

.gallery-item-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--secondary);
}

.gallery-img-wrapper {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #eee;
}

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

.gallery-item-card:hover .gallery-img-wrapper img {
  transform: scale(1.08);
}

.gallery-zoom-overlay {
  position: absolute;
  inset: 0;
  background: rgba(58, 31, 92, 0.6);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.8rem;
}

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

.gallery-item-details {
  padding: 16px;
  flex-grow: 1;
}

.gallery-item-details h4 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--primary);
}

.gallery-item-details p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.empty-gallery-msg {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: #ffffff;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  border: 1px dashed var(--border-color);
}

/* ================= LIGHTBOX MODAL ================= */
.lightbox-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(22, 10, 40, 0.92);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(6px);
}

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

.lightbox-content {
  max-width: 900px;
  width: 100%;
  background: #2a1645;
  border: 1px solid var(--secondary);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  position: relative;
  animation: modalScale 0.3s ease;
}

@keyframes modalScale {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  z-index: 10;
}

.lightbox-img-box {
  max-height: 540px;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img-box img {
  max-height: 540px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.lightbox-caption-box {
  padding: 20px 24px;
  color: #fff;
}

.lightbox-caption-box h3 {
  color: var(--secondary-light);
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.lightbox-caption-box p {
  color: #d9cfe6;
  font-size: 0.95rem;
}

/* ================= FOUNDER MEMORIAL SECTION ================= */
.founder-section {
  background: #ffffff;
  position: relative;
  overflow: hidden;
}

.founder-hero-card {
  background: var(--pattern-lattice), var(--gradient-royal);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-gold);
  color: #ffffff;
  padding: 44px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: center;
}

.founder-avatar-box {
  text-align: center;
}

.founder-portrait {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px auto;
  border: 4px solid var(--secondary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.founder-hero-details h2 {
  color: var(--secondary-light);
  font-size: 2.1rem;
  margin-bottom: 4px;
}

.founder-hero-details .bengali-title {
  font-size: 1.25rem;
  color: #dcd2e8;
  font-weight: 600;
  margin-bottom: 18px;
}

.founder-bio-quote {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #ebe3f4;
  border-left: 3px solid var(--secondary);
  padding-left: 18px;
  margin-bottom: 24px;
  font-style: italic;
}

.founder-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  font-size: 0.92rem;
  color: #d8cde6;
}

.founder-meta-item strong {
  color: var(--secondary-light);
}

/* Bio Content Tabs & Accordions */
.bio-accordion-group {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bio-card {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.bio-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.35rem;
  color: var(--primary);
  margin-bottom: 20px;
  border-bottom: 2px solid rgba(58, 31, 92, 0.1);
  padding-bottom: 12px;
}

.bio-card-title i {
  color: var(--secondary);
}

/* Tables in Founder Bio */
.table-responsive {
  overflow-x: auto;
  width: 100%;
}

.styled-bio-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 10px;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.styled-bio-table th {
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  text-align: left;
  padding: 12px 16px;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.styled-bio-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-dark);
}

.styled-bio-table tr:hover td {
  background: rgba(233, 185, 73, 0.05);
}

.bio-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bio-list li {
  position: relative;
  padding-left: 28px;
  font-size: 0.94rem;
  color: var(--text-dark);
  line-height: 1.6;
}

.bio-list li::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  background: var(--secondary);
  transform: rotate(45deg);
}

/* ================= BOARD OF TRUSTEES / COMMITTEE ================= */
.committee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 26px;
}

.member-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 28px 22px;
  text-align: center;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
}

.member-card:hover {
  transform: translateY(-5px);
  border-color: var(--secondary);
  box-shadow: var(--shadow-md);
}

.member-photo-frame {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 18px auto;
  border: 3px solid var(--secondary);
  overflow: hidden;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 2.5rem;
}

.member-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-card .member-role {
  display: inline-block;
  background: rgba(58, 31, 92, 0.08);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.member-card .member-name {
  font-size: 1.2rem;
  margin-bottom: 6px;
  color: var(--primary);
}

.member-card .member-name.blank-name {
  color: var(--text-muted);
  font-style: italic;
  font-size: 1rem;
}

.member-card .member-bio {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 10px;
}

/* ================= BANK & DONATION SECTION ================= */
.donation-banner-card {
  background: var(--pattern-lattice), var(--gradient-royal);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-gold);
  color: #fff;
  padding: 46px;
  box-shadow: var(--shadow-lg);
}

.donation-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: center;
}

.donation-info h3 {
  color: var(--secondary-light);
  font-size: 1.9rem;
  margin-bottom: 14px;
}

.donation-info p {
  color: #e4daf0;
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

.bank-account-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(233, 185, 73, 0.35);
  border-radius: var(--radius-md);
  padding: 24px;
  backdrop-filter: blur(8px);
}

.bank-account-box h4 {
  color: var(--secondary-light);
  font-size: 1.2rem;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(233, 185, 73, 0.25);
  padding-bottom: 8px;
}

.bank-field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
  font-size: 0.92rem;
}

.bank-field-label {
  color: #c4b3da;
  font-weight: 500;
}

.bank-field-val {
  color: #ffffff;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.copy-btn {
  background: rgba(233, 185, 73, 0.2);
  border: 1px solid var(--secondary);
  color: var(--secondary-light);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
}

.copy-btn:hover {
  background: var(--secondary);
  color: var(--primary-dark);
}

/* ================= CONTACT & LOCATION ================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
}

.contact-info-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-item-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  gap: 18px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.contact-item-card:hover {
  border-color: var(--secondary);
  transform: translateY(-3px);
}

.contact-item-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--accent-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.contact-item-text h4 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.contact-item-text p, .contact-item-text a {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.contact-form-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 34px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.contact-form-card h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.contact-form-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 22px;
}

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

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

.form-input, .form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(58, 31, 92, 0.1);
}

/* ================= FOOTER ================= */
.main-footer {
  background: var(--pattern-lattice), linear-gradient(180deg, #24123b 0%, #1d0f30 100%);
  color: #c3b6d4;
  padding: 60px 0 20px 0;
  border-top: 4px solid var(--secondary);
}

.footer-top-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 36px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: var(--secondary-light);
  font-size: 1.15rem;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 10px;
}

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

.footer-col p {
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.9rem;
  color: #c3b6d4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-links a:hover {
  color: var(--secondary-light);
  transform: translateX(4px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.85rem;
}

/* ================= TOAST NOTIFICATION ================= */
.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--primary-dark);
  color: #fff;
  border-left: 4px solid var(--secondary);
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}

.toast-msg.show {
  transform: translateY(0);
  opacity: 1;
}

/* ================= RESPONSIVE MEDIA QUERIES ================= */
@media (max-width: 1024px) {
  .inst-grid-layout {
    grid-template-columns: 1fr;
  }
  .founder-hero-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .founder-meta-grid {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .donation-grid, .contact-grid {
    grid-template-columns: 1fr;
  }
  .footer-top-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .slide-title {
    font-size: 1.9rem;
  }
  .hero-slider-section {
    height: 480px;
  }
  .mission-cards-grid {
    grid-template-columns: 1fr;
  }
  .emphasis-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-top-grid {
    grid-template-columns: 1fr;
  }
  .top-bar {
    font-size: 0.8rem;
    padding: 6px 0;
  }
  .top-bar .container {
    justify-content: center;
    gap: 6px 12px;
  }
  .top-bar-contact {
    justify-content: center;
    gap: 4px 16px;
  }
}

@media (max-width: 576px) {
  /* Keep the top bar short on phones: location is already in the contact section */
  .top-bar-contact > span {
    display: none;
  }
}
