@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+Bengali:wght@400;500;600;700;800;900&family=Tiro+Bangla:ital@0;1&family=Sora:wght@300;400;500;600;700;800&display=swap');

:root {
  --forest: #0d4a2f;
  --emerald: #1a7a4a;
  --mint: #2eb872;
  --sky: #1a7a4a;
  --deep: #072b1a;
  --royal: #0d4a2f;
  --azure: #2eb872;
  --light-sky: #e8f7ee;
  --pale: #f0faf4;
  --gold: #c9961f;
  --gold-light: #f5c842;
  --white: #ffffff;
  --cream: #f8fdf9;
  --dark: #061a0d;
  --text: #0d2118;
  --text-soft: #3d6b50;
  --border: rgba(13,74,47,0.12);
  --shadow-sm: 0 4px 16px rgba(13,74,47,0.10);
  --shadow: 0 16px 48px rgba(13,74,47,0.14);
  --shadow-lg: 0 32px 80px rgba(13,74,47,0.18);
  --radius: 24px;
  --radius-sm: 14px;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Sora', 'Noto Serif Bengali', sans-serif;
  background: var(--cream);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--pale); }
::-webkit-scrollbar-thumb { background: var(--emerald); border-radius: 10px; }

.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  height: 62px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  background: rgba(248,253,249,0.88);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.4s;
}
.topbar.scrolled { box-shadow: 0 4px 24px rgba(13,74,47,0.10); }

.topbar-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.topbar-logo { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; background: white; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.topbar-name { font-family: 'Noto Serif Bengali', serif; font-size: 0.82rem; font-weight: 700; color: var(--forest); line-height: 1.3; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.dots-btn {
  width: 40px; height: 40px; background: var(--forest);
  border: none; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; gap: 3px; flex-direction: column;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.dots-btn:hover { transform: scale(1.08); background: var(--deep); }
.dots-btn span { width: 4px; height: 4px; background: white; border-radius: 50%; display: block; }

.drawer-overlay {
  position: fixed; inset: 0; background: rgba(6,26,13,0.55);
  z-index: 990; opacity: 0; pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.4,0,0.2,1);
  backdrop-filter: blur(4px);
}
.drawer-overlay.open { opacity: 1; pointer-events: all; }

.drawer {
  position: fixed; top: 0; right: -340px; bottom: 0; width: 320px; z-index: 995;
  background: white; box-shadow: -20px 0 60px rgba(6,26,13,0.15);
  border-radius: 28px 0 0 28px;
  transition: right 0.5s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column; overflow: hidden;
}
.drawer.open { right: 0; }

.drawer-header {
  background: linear-gradient(145deg, var(--deep), var(--forest));
  padding: 56px 24px 24px; position: relative;
}
.drawer-close {
  position: absolute; top: 16px; right: 16px; width: 32px; height: 32px;
  background: rgba(255,255,255,0.15); border: none; border-radius: 8px;
  cursor: pointer; color: white; font-size: 1rem;
  display: flex; align-items: center; justify-content: center; transition: background 0.2s;
}
.drawer-close:hover { background: rgba(255,255,255,0.25); }
.drawer-school-name { font-family: 'Noto Serif Bengali', serif; color: white; font-size: 1.1rem; font-weight: 700; line-height: 1.3; }
.drawer-school-sub { color: rgba(255,255,255,0.6); font-size: 0.75rem; margin-top: 4px; }

.drawer-nav { padding: 16px 12px; flex: 1; overflow-y: auto; }
.drawer-nav a {
  display: flex; align-items: center; gap: 14px; padding: 13px 14px;
  text-decoration: none; color: var(--text); border-radius: 14px;
  font-size: 0.92rem; font-weight: 500; margin-bottom: 4px;
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
}
.drawer-nav a:hover { background: var(--light-sky); color: var(--forest); transform: translateX(4px); }
.drawer-nav a .nav-icon {
  width: 36px; height: 36px; background: var(--pale); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0; transition: all 0.25s;
}
.drawer-nav a:hover .nav-icon { background: var(--forest); }
.drawer-nav a:hover .nav-icon i { color: white; }
.drawer-nav a i { color: var(--emerald); }
.drawer-divider { height: 1px; background: var(--border); margin: 8px 14px; }

.floating-btns { position: fixed; bottom: 28px; right: 20px; display: flex; flex-direction: column; gap: 12px; z-index: 800; }
.fab {
  width: 52px; height: 52px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; font-size: 1.3rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
  border: none; cursor: pointer;
}
.fab:hover { transform: translateY(-4px) scale(1.08); }
.fab-wp  { background: #25D366; color: white; }
.fab-fb  { background: #1877F2; color: white; }
.fab-map { background: var(--forest); color: white; }

.page-hero {
  min-height: 38vh;
  background: linear-gradient(150deg, var(--dark) 0%, var(--deep) 50%, var(--forest) 100%);
  display: flex; align-items: flex-end; padding-top: 62px;
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 90% 10%, rgba(201,150,31,0.15) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 5% 90%, rgba(46,184,114,0.2) 0%, transparent 50%);
}
.page-hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 44px 44px;
}
.page-hero-content { position: relative; z-index: 2; padding: 48px 24px 40px; max-width: 1200px; margin: 0 auto; width: 100%; }
.page-hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.85); padding: 5px 14px; border-radius: 50px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; margin-bottom: 14px;
}
.page-hero h1 { font-family: 'Noto Serif Bengali', serif; color: white; font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 800; line-height: 1.2; }
.page-hero h1 em { font-style: normal; color: var(--gold-light); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }

.sec-tag {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(13,74,47,0.08); color: var(--forest);
  padding: 5px 14px; border-radius: 50px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 14px;
}
.sec-title { font-family: 'Noto Serif Bengali', serif; font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; color: var(--dark); line-height: 1.25; margin-bottom: 12px; }
.sec-desc { font-size: 0.97rem; color: var(--text-soft); line-height: 1.75; }

.card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); transition: all 0.4s cubic-bezier(0.4,0,0.2,1); }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: 50px; font-size: 0.92rem; font-weight: 600; text-decoration: none; border: none; cursor: pointer; transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1); font-family: 'Sora','Noto Serif Bengali',sans-serif; }
.btn-primary { background: linear-gradient(135deg, var(--forest), var(--emerald)); color: white; box-shadow: 0 8px 24px rgba(13,74,47,0.35); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(13,74,47,0.45); }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: var(--dark); box-shadow: 0 8px 24px rgba(201,150,31,0.35); }
.btn-gold:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(201,150,31,0.45); }
.btn-ghost { background: rgba(13,74,47,0.08); color: var(--forest); border: 1.5px solid rgba(13,74,47,0.2); }
.btn-ghost:hover { background: rgba(13,74,47,0.14); transform: translateY(-2px); }

footer { background: var(--dark); padding: 48px 20px 28px; text-align: center; }
.footer-logo-row { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 12px; }
.footer-logo-img { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; background: white; padding: 4px; }
.footer-school-name { font-family: 'Noto Serif Bengali', serif; color: white; font-size: 1rem; font-weight: 700; text-align: left; line-height: 1.3; }
.footer-tagline { color: rgba(255,255,255,0.38); font-size: 0.82rem; margin-bottom: 24px; }
.footer-div { height: 1px; background: rgba(255,255,255,0.07); margin: 20px auto; max-width: 400px; }
.footer-bottom { color: rgba(255,255,255,0.28); font-size: 0.76rem; line-height: 1.7; }
.footer-dev { display: inline-block; margin-top: 12px; font-size: 0.78rem; color: rgba(255,255,255,0.25); }
.footer-dev span { font-weight: 700; background: linear-gradient(90deg, var(--gold-light), #fff); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 0.92rem; letter-spacing: 0.5px; }

/* ===== APPLE-STYLE SCROLL ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(44px);
  transition: opacity 0.8s cubic-bezier(0.4,0,0.2,1),
              transform 0.8s cubic-bezier(0.4,0,0.2,1);
}
.reveal.left  { transform: translateX(-44px); }
.reveal.right { transform: translateX(44px); }
.reveal.scale { transform: scale(0.9) translateY(20px); }
.reveal.visible { opacity: 1 !important; transform: none !important; }

/* Staggered children */
[data-stagger] > * {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.65s cubic-bezier(0.4,0,0.2,1),
              transform 0.65s cubic-bezier(0.4,0,0.2,1);
}
[data-stagger].visible > *:nth-child(1) { opacity:1; transform:none; transition-delay:0ms; }
[data-stagger].visible > *:nth-child(2) { opacity:1; transform:none; transition-delay:100ms; }
[data-stagger].visible > *:nth-child(3) { opacity:1; transform:none; transition-delay:200ms; }
[data-stagger].visible > *:nth-child(4) { opacity:1; transform:none; transition-delay:300ms; }
[data-stagger].visible > *:nth-child(5) { opacity:1; transform:none; transition-delay:400ms; }
[data-stagger].visible > *:nth-child(6) { opacity:1; transform:none; transition-delay:500ms; }
[data-stagger].visible > *:nth-child(7) { opacity:1; transform:none; transition-delay:600ms; }
[data-stagger].visible > *:nth-child(8) { opacity:1; transform:none; transition-delay:700ms; }

.empty-state { text-align: center; padding: 80px 20px; background: white; border-radius: var(--radius); border: 2px dashed var(--border); }
.empty-icon { font-size: 3.5rem; margin-bottom: 16px; opacity: 0.5; }
.empty-title { font-family: 'Noto Serif Bengali', serif; font-size: 1.2rem; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.empty-desc { color: var(--text-soft); font-size: 0.88rem; }

@media (max-width: 600px) {
  .section { padding: 52px 0; }
  .page-hero { min-height: 30vh; }
}

/* ===== DARK MODE ===== */
body.dark {
  --cream: #0e1a14;
  --pale: #152010;
  --light-sky: #0f2518;
  --dark: #e8f5ed;
  --text: #d4eddc;
  --text-soft: #7eb891;
  --border: rgba(120,200,140,0.12);
  --shadow-sm: 0 4px 16px rgba(0,0,0,0.35);
  --shadow: 0 16px 48px rgba(0,0,0,0.45);
  background: #0e1a14;
}
body.dark .topbar { background: rgba(14,26,20,0.92); border-bottom-color: rgba(120,200,140,0.1); }
body.dark .card,
body.dark .gallery-item,
body.dark .notice-card { background: #152010; }
body.dark .drawer { background: #0f1d12; }
body.dark .gallery-filter-btn { background: #152010; color: #7eb891; border-color: rgba(120,200,140,0.2); }
body.dark .gallery-filter-btn.active { background: var(--forest); color: white; }
body.dark footer { background: #080f0a; }
body.dark .notice-tag-pill { background: #0f2518; }

/* ===== DARK TOGGLE BUTTON ===== */
.dark-toggle {
  width: 40px; height: 40px;
  background: var(--pale); border: 1.5px solid var(--border);
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.05rem; color: var(--forest);
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.dark-toggle:hover { transform: scale(1.1); background: var(--light-sky); }

/* ===== SCROLL TO TOP ===== */
.scroll-top {
  position: fixed; bottom: 28px; left: 20px;
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--forest), var(--emerald));
  color: white; border: none; border-radius: 14px;
  font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(13,74,47,0.35);
  opacity: 0; pointer-events: none;
  transform: translateY(16px);
  transition: all 0.4s cubic-bezier(0.34,1.56,0.64,1);
  z-index: 800;
}
.scroll-top.show { opacity: 1; pointer-events: all; transform: translateY(0); }
.scroll-top:hover { transform: translateY(-4px) scale(1.08); }

/* ===== NOTICE POPUP ===== */
.notice-popup-overlay {
  position: fixed; inset: 0;
  background: rgba(6,26,13,0.7);
  z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.4,0,0.2,1);
  backdrop-filter: blur(6px);
}
.notice-popup-overlay.open { opacity: 1; pointer-events: all; }
.notice-popup {
  background: white; border-radius: 28px; max-width: 420px; width: 100%;
  box-shadow: 0 40px 80px rgba(0,0,0,0.3); overflow: hidden;
  transform: scale(0.88) translateY(24px);
  transition: transform 0.45s cubic-bezier(0.34,1.56,0.64,1);
}
.notice-popup-overlay.open .notice-popup { transform: scale(1) translateY(0); }
body.dark .notice-popup { background: #152010; }
.notice-popup-header {
  background: linear-gradient(135deg, var(--deep), var(--forest));
  padding: 24px 24px 20px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.notice-popup-icon {
  width: 44px; height: 44px; border-radius: 14px;
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: var(--gold-light); flex-shrink: 0;
}
.notice-popup-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,0.55); margin-bottom: 4px; }
.notice-popup-title { font-family: 'Noto Serif Bengali', serif; font-size: 1rem; font-weight: 700; color: white; line-height: 1.35; }
.notice-popup-close {
  width: 32px; height: 32px; flex-shrink: 0;
  background: rgba(255,255,255,0.12); border: none; border-radius: 10px;
  color: white; font-size: 0.9rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background 0.2s;
}
.notice-popup-close:hover { background: rgba(255,255,255,0.22); }
.notice-popup-body { padding: 20px 24px 24px; }
.notice-popup-text { font-size: 0.88rem; color: var(--text-soft); line-height: 1.8; margin-bottom: 14px; }
body.dark .notice-popup-text { color: #7eb891; }
.notice-popup-date {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.75rem; color: var(--text-soft);
  background: var(--pale); padding: 4px 12px; border-radius: 50px; margin-bottom: 18px;
}
body.dark .notice-popup-date { background: #0f2518; }
.notice-popup-footer { display: flex; gap: 10px; }
.notice-popup-btn-main {
  flex: 1; padding: 11px; border-radius: 14px;
  background: linear-gradient(135deg, var(--forest), var(--emerald));
  color: white; border: none; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; text-decoration: none;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-family: 'Sora','Noto Serif Bengali',sans-serif;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.notice-popup-btn-main:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(13,74,47,0.35); }
.notice-popup-btn-dismiss {
  padding: 11px 16px; border-radius: 14px;
  background: var(--pale); color: var(--text-soft);
  border: 1.5px solid var(--border); font-size: 0.83rem; font-weight: 600;
  cursor: pointer; font-family: 'Sora','Noto Serif Bengali',sans-serif; transition: all 0.2s;
}
body.dark .notice-popup-btn-dismiss { background: #0f2518; border-color: rgba(120,200,140,0.15); }
.notice-popup-btn-dismiss:hover { background: var(--light-sky); }

/* ===== LOADING SCREEN ===== */
#loadingScreen {
  position: fixed; inset: 0; z-index: 99999;
  background: linear-gradient(135deg, var(--deep) 0%, var(--forest) 60%, var(--emerald) 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 20px;
  transition: opacity 0.6s cubic-bezier(0.4,0,0.2,1), visibility 0.6s;
}
#loadingScreen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-logo {
  width: 80px; height: 80px; border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
  animation: loadPulse 1.4s ease-in-out infinite;
}
.loading-title {
  font-family: 'Noto Serif Bengali', serif;
  font-size: 1.1rem; font-weight: 700; color: white;
  text-align: center; line-height: 1.5;
  opacity: 0.9;
}
.loading-bar-wrap {
  width: 180px; height: 4px;
  background: rgba(255,255,255,0.2); border-radius: 99px; overflow: hidden;
}
.loading-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--gold-light), white);
  border-radius: 99px;
  animation: loadBar 1.6s cubic-bezier(0.4,0,0.2,1) forwards;
}
@keyframes loadPulse {
  0%,100% { transform: scale(1); box-shadow: 0 16px 48px rgba(0,0,0,0.3); }
  50% { transform: scale(1.06); box-shadow: 0 24px 60px rgba(0,0,0,0.4); }
}
@keyframes loadBar {
  0% { width: 0%; } 60% { width: 80%; } 100% { width: 100%; }
}

/* ===== LANGUAGE TOGGLE ===== */
.lang-toggle {
  width: 40px; height: 40px;
  background: var(--pale); border: 1.5px solid var(--border);
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 0.72rem; font-weight: 800;
  color: var(--forest); letter-spacing: 0.5px;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  font-family: 'Sora', sans-serif;
}
.lang-toggle:hover { transform: scale(1.1); background: var(--light-sky); }
