/* ================================================
   អនុវិទ្យាល័យមាត់ក្រាស់ - Main Stylesheet
   Moat Kras Secondary School
   ================================================ */

/* ===== CSS VARIABLES ===== */
:root {
  --navy:      #0f2347;
  --primary:   #1a3a6b;
  --primary-l: #2756a8;
  --gold:      #f5a623;
  --gold-d:    #d48a10;
  --gold-l:    #ffd166;
  --red:       #e74c3c;
  --green:     #2ecc71;
  --bg:        #f0f4f8;
  --bg-alt:    #e4ecf4;
  --white:     #ffffff;
  --text:      #2c3e50;
  --text-m:    #546e7a;
  --text-l:    #90a4ae;
  --border:    #cfd8dc;
  --shadow-s:  0 4px 16px rgba(15,35,71,0.1);
  --shadow-m:  0 8px 32px rgba(15,35,71,0.14);
  --shadow-l:  0 20px 60px rgba(15,35,71,0.2);
  --r:         16px;
  --r-s:       8px;
  --r-xl:      24px;
  --ease:      cubic-bezier(0.4,0,0.2,1);
  --t:         0.3s var(--ease);
  --font:      'Battambang', 'Kantumruy Pro', serif;
}

/* Dark Mode Variables */
body.dark {
  --bg:      #0d1b2a;
  --bg-alt:  #112131;
  --white:   #1a2c3d;
  --text:    #e0e8f0;
  --text-m:  #a0b4c4;
  --text-l:  #607080;
  --border:  #1e3a52;
  --shadow-s: 0 4px 16px rgba(0,0,0,0.3);
  --shadow-m: 0 8px 32px rgba(0,0,0,0.4);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.75; overflow-x: hidden; transition: background var(--t), color var(--t); }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: var(--font); }
input, select, textarea { font-family: var(--font); }

/* ===== PRELOADER ===== */
#preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--navy);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 20px;
  transition: opacity 0.6s, visibility 0.6s;
}
#preloader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-inner { position: relative; width: 80px; height: 80px; display: flex; align-items: center; justify-content: center; }
.loader-ring {
  position: absolute; inset: 0;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.ring2 { inset: 10px; border-top-color: rgba(245,166,35,0.4); animation-duration: 1.5s; animation-direction: reverse; }
.loader-logo { font-size: 2rem; color: var(--gold); z-index: 1; }
.loader-text { color: white; font-size: 1rem; font-weight: 700; }
.loader-sub { color: rgba(255,255,255,0.4); font-size: 0.75rem; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== NAVBAR ===== */
#navbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000; transition: all var(--t);
}
#navbar.scrolled {
  background: rgba(15,35,71,0.97);
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 32px rgba(0,0,0,0.3);
}
.nav-container {
  max-width: 1400px; margin: 0 auto;
  padding: 0 24px;
  display: flex; align-items: center;
  height: 72px; gap: 16px;
}
.nav-logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo-icon {
  width: 44px; height: 44px;
  background: var(--gold);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: var(--navy);
  transition: var(--t);
}
.logo-icon:hover { transform: rotate(-10deg) scale(1.05); }
.logo-kh { display: block; color: white; font-weight: 700; font-size: 0.9rem; line-height: 1.2; }
.logo-en { display: block; color: rgba(255,255,255,0.5); font-size: 0.6rem; }
.nav-center { flex: 1; display: flex; justify-content: center; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link {
  color: rgba(255,255,255,0.75); padding: 8px 14px;
  border-radius: 8px; font-size: 0.85rem;
  transition: var(--t); white-space: nowrap;
  position: relative;
}
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,0.12); color: white; }
.nav-link.active::after {
  content: ''; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 20px; height: 2px; background: var(--gold); border-radius: 2px;
}
/* Dropdown */
.nav-dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 0;
  background: var(--navy); border-radius: var(--r-s);
  min-width: 200px; padding: 8px;
  box-shadow: var(--shadow-l);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: var(--t);
}
.nav-dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a {
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,0.8); padding: 10px 14px;
  border-radius: var(--r-s); font-size: 0.85rem;
  transition: var(--t);
}
.dropdown-menu a:hover { background: rgba(255,255,255,0.1); color: var(--gold); }
.nav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.icon-btn {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.1);
  border: none; border-radius: 8px;
  color: white; cursor: pointer; font-size: 0.9rem;
  transition: var(--t); display: flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: rgba(255,255,255,0.2); }
.nav-portal-btn {
  background: var(--gold); color: var(--navy);
  padding: 8px 18px; border-radius: 50px;
  font-weight: 700; font-size: 0.82rem;
  transition: var(--t); display: flex; align-items: center; gap: 6px;
}
.nav-portal-btn:hover { background: var(--gold-d); transform: translateY(-1px); }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 2px; background: white; border-radius: 2px; transition: var(--t); }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* Search Bar */
.search-bar {
  background: var(--navy); padding: 0 24px;
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s var(--ease), padding 0.4s;
}
.search-bar.open { max-height: 200px; padding: 16px 24px; }
.search-inner {
  max-width: 700px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.1); border-radius: 50px;
  padding: 0 16px;
}
.search-inner i { color: rgba(255,255,255,0.5); }
.search-inner input {
  flex: 1; background: none; border: none; outline: none;
  color: white; padding: 14px 0; font-size: 0.95rem;
}
.search-inner input::placeholder { color: rgba(255,255,255,0.4); }
#searchClose { background: none; border: none; color: rgba(255,255,255,0.5); cursor: pointer; font-size: 1rem; }
.search-results { max-width: 700px; margin: 8px auto 0; }
.sr-item {
  background: rgba(255,255,255,0.08); padding: 10px 16px;
  border-radius: 8px; color: rgba(255,255,255,0.8);
  cursor: pointer; margin-bottom: 4px; font-size: 0.85rem;
  transition: var(--t);
}
.sr-item:hover { background: rgba(245,166,35,0.2); color: var(--gold); }

/* ===== HERO ===== */
.hero {
  min-height: 100vh; position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; text-align: center;
}
.hero-bg { position: absolute; inset: 0; background: linear-gradient(150deg, #040d1a 0%, #0f2347 45%, #1a4a8a 100%); }
.hero-shapes .shape {
  position: absolute; border-radius: 50%;
  background: rgba(245,166,35,0.04);
  animation: shape-float linear infinite;
}
.shape1 { width: 500px; height: 500px; top: -100px; right: -100px; animation-duration: 20s; }
.shape2 { width: 300px; height: 300px; bottom: 50px; left: -50px; animation-duration: 15s; background: rgba(39,86,168,0.08); }
.shape3 { width: 200px; height: 200px; top: 40%; right: 10%; animation-duration: 25s; animation-direction: reverse; }
@keyframes shape-float {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-30px) rotate(180deg); }
}
.hero-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.5) 100%);
}
#particles-container { position: absolute; inset: 0; overflow: hidden; }
.pt {
  position: absolute; width: 3px; height: 3px;
  background: rgba(245,166,35,0.7); border-radius: 50%;
  animation: pt-float linear infinite;
}
@keyframes pt-float {
  0% { transform: translateY(110vh) scale(0); opacity: 0; }
  5% { opacity: 1; transform: translateY(105vh) scale(1); }
  95% { opacity: 1; }
  100% { transform: translateY(-10vh) scale(0.5); opacity: 0; }
}
.hero-content { position: relative; z-index: 2; padding: 100px 24px 80px; max-width: 960px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(245,166,35,0.15); border: 1px solid rgba(245,166,35,0.4);
  color: var(--gold); padding: 8px 20px; border-radius: 50px;
  font-size: 0.82rem; margin-bottom: 28px;
}
.badge-dot { width: 8px; height: 8px; background: var(--gold); border-radius: 50%; animation: blink 1.5s ease infinite; }
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:0;} }
.hero-title { margin-bottom: 16px; }
.title-top { display: block; color: rgba(255,255,255,0.7); font-size: clamp(1.2rem,3.5vw,2rem); font-weight: 400; margin-bottom: 4px; }
.title-main {
  display: block; font-size: clamp(3rem,8vw,5.5rem); font-weight: 700;
  color: white; line-height: 1; letter-spacing: -1px;
  text-shadow: 0 4px 32px rgba(0,0,0,0.4);
  background: linear-gradient(135deg, white 30%, var(--gold-l) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.title-en { display: block; color: rgba(255,255,255,0.5); font-size: clamp(0.75rem,2vw,1rem); margin-top: 8px; letter-spacing: 0.05em; }
.hero-motto {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  color: rgba(255,255,255,0.7); margin-bottom: 36px; font-size: 0.9rem;
}
.hero-motto .dot { color: var(--gold); }
.hero-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 64px; }
/* Hero Stats */
.hero-stats {
  display: flex; gap: 0; justify-content: center;
  background: rgba(255,255,255,0.07); backdrop-filter: blur(10px);
  border-radius: var(--r-xl); border: 1px solid rgba(255,255,255,0.1);
  padding: 24px 40px; flex-wrap: wrap;
}
.hstat { text-align: center; padding: 0 32px; }
.hstat i { color: var(--gold); font-size: 1.2rem; margin-bottom: 8px; }
.hstat-num { font-size: 2.2rem; font-weight: 700; color: white; line-height: 1; }
.hstat-label { font-size: 0.75rem; color: rgba(255,255,255,0.6); margin-top: 4px; }
.hstat-div { width: 1px; background: rgba(255,255,255,0.15); margin: 8px 0; align-self: stretch; }
/* Scroll hint */
.hero-scroll-hint {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.4); font-size: 0.7rem;
}
.scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
  animation: scroll-drop 2s ease-in-out infinite;
}
@keyframes scroll-drop { 0%,100%{opacity:1;transform:scaleY(1);transform-origin:top} 50%{opacity:0.3;transform:scaleY(0.5);transform-origin:top} }

/* Animate-in classes */
.animate-in { opacity: 0; transform: translateY(24px); animation: fade-up 0.7s var(--ease) var(--delay,0s) forwards; }
@keyframes fade-up { to { opacity:1; transform:translateY(0); } }

/* ===== BUTTONS ===== */
.btn-gold {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--gold); color: var(--navy);
  padding: 14px 32px; border-radius: 50px;
  font-weight: 700; font-size: 0.95rem;
  transition: var(--t); border: none; cursor: pointer;
  box-shadow: 0 4px 20px rgba(245,166,35,0.3);
}
.btn-gold:hover { background: var(--gold-d); transform: translateY(-3px); box-shadow: 0 8px 30px rgba(245,166,35,0.4); }
.btn-outline-white {
  display: inline-flex; align-items: center; gap: 10px;
  border: 2px solid rgba(255,255,255,0.4); color: white;
  padding: 12px 32px; border-radius: 50px;
  font-weight: 600; font-size: 0.95rem; transition: var(--t);
}
.btn-outline-white:hover { background: rgba(255,255,255,0.1); border-color: white; transform: translateY(-3px); }
.full-w { width: 100%; justify-content: center; }

/* ===== TICKER ===== */
.ticker-bar {
  display: flex; align-items: center; height: 46px;
  background: var(--primary); overflow: hidden;
}
.ticker-label {
  background: var(--gold); color: var(--navy);
  padding: 0 20px; height: 100%;
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 0.82rem;
  flex-shrink: 0; white-space: nowrap;
}
.ticker-track { flex: 1; overflow: hidden; position: relative; }
.ticker-inner {
  display: inline-flex; gap: 64px;
  animation: ticker-scroll 35s linear infinite;
  white-space: nowrap; padding-left: 40px;
}
.ticker-inner:hover { animation-play-state: paused; }
.ticker-inner span { color: rgba(255,255,255,0.85); font-size: 0.82rem; }
@keyframes ticker-scroll { from{transform:translateX(0)} to{transform:translateX(-50%)} }

/* ===== SECTIONS ===== */
.section { padding: 96px 0; }
.bg-alt { background: var(--bg-alt); }
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.section-badge {
  display: inline-block;
  background: rgba(26,58,107,0.1); color: var(--primary);
  padding: 5px 16px; border-radius: 50px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em;
  margin-bottom: 12px; text-transform: uppercase;
}
body.dark .section-badge { background: rgba(245,166,35,0.15); color: var(--gold); }
.section-title { font-size: clamp(1.8rem,4vw,2.8rem); color: var(--text); margin-bottom: 12px; line-height: 1.2; }
.section-sub { color: var(--text-m); max-width: 520px; margin: 0 auto 56px; font-size: 0.95rem; }

/* ===== REVEAL ANIMATIONS ===== */
.reveal-up, .reveal-left, .reveal-right {
  opacity: 0; transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: calc(var(--i,0) * 0.08s);
}
.reveal-up { transform: translateY(40px); }
.reveal-left { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }
.revealed { opacity: 1 !important; transform: none !important; }

/* ===== ABOUT ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.about-card-main {
  height: 280px; border-radius: var(--r);
  background: linear-gradient(135deg, var(--primary), var(--primary-l));
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem; color: rgba(255,255,255,0.25);
  position: relative; overflow: hidden;
}
.about-card-main::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(245,166,35,0.05), transparent);
}
.acm-icon { font-size: 5rem; color: rgba(255,255,255,0.2); }
.acm-badge {
  position: absolute; bottom: -12px; right: 20px;
  background: var(--gold); color: var(--navy);
  padding: 10px 16px; border-radius: var(--r-s);
  font-size: 0.82rem; font-weight: 700;
  display: flex; align-items: center; gap: 6px;
  box-shadow: var(--shadow-m);
}
.about-mini-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.mini-card {
  background: var(--white); padding: 14px 16px;
  border-radius: var(--r-s); display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-s); font-size: 0.85rem; font-weight: 600;
  transition: var(--t); color: var(--text);
}
.mini-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-m); }
.mini-card i { font-size: 1.1rem; }
.mc-blue i { color: #3498db; }
.mc-green i { color: #2ecc71; }
.mc-red i { color: #e74c3c; }
.mc-orange i { color: #e67e22; }

/* Tab Nav */
.tab-nav { display: flex; background: var(--bg-alt); padding: 4px; border-radius: var(--r-s); margin-bottom: 24px; flex-wrap: wrap; gap: 2px; }
.tabnav-btn {
  flex: 1; padding: 9px 12px; border: none; background: none;
  border-radius: 6px; cursor: pointer; font-size: 0.82rem;
  color: var(--text-m); transition: var(--t); white-space: nowrap;
}
.tabnav-btn.active { background: var(--white); color: var(--primary); font-weight: 700; box-shadow: var(--shadow-s); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade-in 0.3s ease; }
@keyframes fade-in { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
.tab-panel h3 { color: var(--primary); margin-bottom: 12px; font-size: 1.1rem; }
.tab-panel p { color: var(--text-m); margin-bottom: 12px; font-size: 0.92rem; }
.check-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.check-list li { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
.check-list i { color: var(--green); flex-shrink: 0; }
.timeline { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.tl-item { display: flex; align-items: center; gap: 12px; font-size: 0.85rem; }
.tl-year { background: var(--primary); color: white; padding: 4px 10px; border-radius: 50px; font-size: 0.75rem; font-weight: 700; flex-shrink: 0; }
.tl-item p { color: var(--text-m); }
.vision-roadmap { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.vr-item { display: flex; align-items: center; gap: 16px; padding: 12px; background: var(--bg-alt); border-radius: var(--r-s); }
.vr-year { font-weight: 700; color: var(--gold); font-size: 1rem; min-width: 56px; }
.vr-text { font-size: 0.88rem; color: var(--text-m); }
.values-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.val-item { padding: 16px; background: var(--bg-alt); border-radius: var(--r-s); text-align: center; }
.val-item i { font-size: 1.5rem; margin-bottom: 6px; }
.val-item h4 { font-size: 0.88rem; color: var(--text); margin-bottom: 4px; }
.val-item p { font-size: 0.78rem; color: var(--text-m); }

/* ===== PROGRAMS ===== */
.programs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.prog-card {
  background: var(--white); border-radius: var(--r); padding: 28px;
  box-shadow: var(--shadow-s); transition: var(--t);
  position: relative; overflow: hidden;
  border-bottom: 4px solid transparent;
}
.prog-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(var(--c-rgb,0,0,0),0.03), transparent);
  opacity: 0; transition: var(--t);
}
.prog-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-l); border-bottom-color: var(--c, var(--primary)); }
.prog-card:hover::before { opacity: 1; }
.prog-icon {
  width: 60px; height: 60px;
  background: color-mix(in srgb, var(--c,#1a3a6b) 12%, white);
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: var(--c, var(--primary));
  margin-bottom: 16px; transition: var(--t);
}
.prog-card:hover .prog-icon { transform: scale(1.1) rotate(-5deg); }
.prog-card h3 { font-size: 1rem; color: var(--text); margin-bottom: 8px; }
.prog-card p { font-size: 0.82rem; color: var(--text-m); margin-bottom: 14px; line-height: 1.6; }
.prog-tags { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.prog-tags span { background: var(--bg-alt); color: var(--text-m); padding: 3px 10px; border-radius: 50px; font-size: 0.72rem; }
.prog-arrow {
  width: 36px; height: 36px; background: var(--bg-alt);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--text-m); transition: var(--t);
}
.prog-card:hover .prog-arrow { background: var(--gold); color: var(--navy); transform: rotate(-45deg); }

/* ===== SCHEDULE ===== */
.schedule-wrap { background: var(--white); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-m); }
.grade-tabs { display: flex; background: var(--navy); }
.gtab { flex: 1; padding: 16px; border: none; background: none; color: rgba(255,255,255,0.5); font-family: var(--font); font-size: 0.9rem; cursor: pointer; transition: var(--t); }
.gtab.active { background: var(--gold); color: var(--navy); font-weight: 700; }
.gtab:hover:not(.active) { background: rgba(255,255,255,0.07); color: white; }
.table-wrap { overflow-x: auto; }
.sched-table { width: 100%; border-collapse: collapse; min-width: 700px; }
.sched-table th { background: var(--primary); color: white; padding: 14px 12px; text-align: center; font-size: 0.8rem; white-space: nowrap; }
.sched-table td { padding: 12px; text-align: center; border-bottom: 1px solid var(--border); font-size: 0.82rem; vertical-align: middle; }
.sched-table tr:nth-child(even) { background: var(--bg); }
.sched-table tr:hover { background: rgba(26,58,107,0.04); }
.sched-table td:first-child { font-weight: 700; color: var(--primary); white-space: nowrap; }
.stag { display: inline-block; padding: 4px 10px; border-radius: 50px; font-size: 0.72rem; font-weight: 600; white-space: nowrap; }
.math   { background: #fff3cd; color: #856404; }
.science{ background: #d1ecf1; color: #0c5460; }
.khmer  { background: #f8d7da; color: #721c24; }
.english{ background: #d4edda; color: #155724; }
.history{ background: #e2d9f3; color: #432874; }
.sport  { background: #d1ecf1; color: #0c5460; }
.it     { background: #fff3e0; color: #e65100; }
.sched-legend { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 20px; border-top: 1px solid var(--border); }
.leg { font-size: 0.72rem; font-weight: 600; padding: 4px 12px; border-radius: 50px; }

/* ===== TEACHERS ===== */
.teachers-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 48px; }
.teacher-card { background: var(--white); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-s); transition: var(--t); }
.teacher-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-l); }
.tc-banner { background: var(--bg, linear-gradient(135deg,#1a3a6b,#2756a8)); height: 120px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 0; position: relative; }
.tc-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: rgba(255,255,255,0.2); backdrop-filter: blur(10px);
  border: 3px solid rgba(255,255,255,0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 700; color: white;
  position: absolute; bottom: -40px;
}
.tc-body { padding: 52px 20px 24px; text-align: center; }
.tc-body h3 { font-size: 0.95rem; color: var(--text); margin-bottom: 6px; }
.tc-role { display: inline-block; padding: 3px 12px; border-radius: 50px; font-size: 0.72rem; font-weight: 700; margin-bottom: 10px; }
.tc-role.director { background: rgba(15,35,71,0.1); color: var(--navy); }
.tc-role.math { background: #fff3cd; color: #856404; }
.tc-role.science { background: #d1ecf1; color: #0c5460; }
.tc-role.english { background: #d4edda; color: #155724; }
.tc-role.khmer { background: #f8d7da; color: #721c24; }
.tc-role.it { background: #fff3e0; color: #e65100; }
.tc-body p { font-size: 0.8rem; color: var(--text-m); margin-bottom: 12px; }
.tc-stats { display: flex; justify-content: center; gap: 16px; margin-bottom: 14px; font-size: 0.78rem; color: var(--text-l); }
.tc-stats i { margin-right: 4px; color: var(--gold); }
.tc-social { display: flex; justify-content: center; gap: 8px; }
.tc-social a { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-alt); display: flex; align-items: center; justify-content: center; font-size: 0.8rem; color: var(--text-m); transition: var(--t); }
.tc-social a:hover { background: var(--primary); color: white; }
.center-action { text-align: center; }

/* ===== NEWS ===== */
.news-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; }
.nm-img { position: relative; height: 240px; border-radius: var(--r) var(--r) 0 0; overflow: hidden; }
.nm-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg,var(--primary),var(--primary-l)); display: flex; align-items: center; justify-content: center; font-size: 4rem; color: rgba(255,255,255,0.2); }
.nm-tag { position: absolute; top: 16px; left: 16px; background: var(--gold); color: var(--navy); padding: 4px 12px; border-radius: 50px; font-size: 0.72rem; font-weight: 700; }
.nm-date { position: absolute; bottom: 16px; left: 16px; color: rgba(255,255,255,0.8); font-size: 0.78rem; background: rgba(0,0,0,0.4); padding: 4px 10px; border-radius: 50px; }
.news-main { background: var(--white); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-s); transition: var(--t); }
.news-main:hover { box-shadow: var(--shadow-l); transform: translateY(-4px); }
.nm-body { padding: 24px; }
.nm-body h3 { color: var(--text); font-size: 1.1rem; margin-bottom: 10px; line-height: 1.4; }
.nm-body p { color: var(--text-m); font-size: 0.88rem; margin-bottom: 16px; line-height: 1.7; }
.read-more-btn { display: inline-flex; align-items: center; gap: 8px; color: var(--primary); font-weight: 700; font-size: 0.88rem; transition: var(--t); }
.read-more-btn:hover { color: var(--gold-d); gap: 12px; }
.news-sidebar { display: flex; flex-direction: column; gap: 0; }
.sidebar-title { font-size: 1rem; color: var(--text); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--border); }
.ns-list { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.ns-item { display: flex; gap: 14px; padding: 14px; border-radius: var(--r-s); transition: var(--t); background: var(--white); margin-bottom: 4px; box-shadow: var(--shadow-s); }
.ns-item:hover { background: rgba(26,58,107,0.04); transform: translateX(4px); }
.ns-icon { width: 44px; height: 44px; border-radius: 10px; background: color-mix(in srgb, var(--c,#1a3a6b) 12%, white); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--c,var(--primary)); flex-shrink: 0; }
.ns-body { flex: 1; min-width: 0; }
.ns-cat { font-size: 0.68rem; font-weight: 700; color: var(--text-l); text-transform: uppercase; letter-spacing: 0.06em; }
.ns-body h5 { font-size: 0.84rem; color: var(--text); margin: 3px 0; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ns-date { font-size: 0.72rem; color: var(--text-l); }
.view-all-link { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-size: 0.85rem; font-weight: 700; margin-top: 12px; transition: var(--t); }
.view-all-link:hover { color: var(--gold-d); }

/* ===== GALLERY ===== */
.gal-filter { display: flex; gap: 8px; justify-content: center; margin-bottom: 32px; flex-wrap: wrap; }
.gf-btn { background: var(--white); border: 2px solid var(--border); color: var(--text-m); padding: 8px 20px; border-radius: 50px; cursor: pointer; font-size: 0.85rem; transition: var(--t); }
.gf-btn.active, .gf-btn:hover { background: var(--primary); border-color: var(--primary); color: white; }
.gal-grid { display: grid; grid-template-columns: repeat(4,1fr); grid-auto-rows: 200px; gap: 12px; }
.gi { position: relative; border-radius: var(--r-s); overflow: hidden; cursor: pointer; }
.gi-wide { grid-column: span 2; }
.gi-tall { grid-row: span 2; }
.gi-bg {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--c1,#1a3a6b), var(--c2,#2756a8));
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; color: rgba(255,255,255,0.2);
  transition: transform 0.4s var(--ease);
}
.gi:hover .gi-bg { transform: scale(1.06); }
.gi-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 12px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: white; font-size: 0.82rem;
  transform: translateY(100%); transition: var(--t);
}
.gi:hover .gi-label { transform: translateY(0); }
.gi.hidden { display: none; }

/* ===== EVENTS ===== */
.events-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.event-item {
  background: var(--white); border-radius: var(--r);
  display: flex; gap: 16px; padding: 20px;
  box-shadow: var(--shadow-s); transition: var(--t);
  border-left: 4px solid var(--border);
}
.event-item:hover { transform: translateX(4px); box-shadow: var(--shadow-m); }
.ei-upcoming { border-left-color: var(--gold); }
.ei-date { text-align: center; flex-shrink: 0; min-width: 48px; }
.ei-day { display: block; font-size: 1.8rem; font-weight: 700; color: var(--primary); line-height: 1; }
.ei-mon { display: block; font-size: 0.72rem; color: var(--text-l); }
.ei-body { flex: 1; }
.ei-tag { display: inline-block; padding: 2px 10px; border-radius: 50px; font-size: 0.68rem; font-weight: 700; margin-bottom: 6px; text-transform: uppercase; }
.ei-tag.exam { background: #fff3cd; color: #856404; }
.ei-tag.ceremony { background: #d1ecf1; color: #0c5460; }
.ei-tag.register { background: #d4edda; color: #155724; }
.ei-tag.sport { background: #f8d7da; color: #721c24; }
.ei-tag.meeting { background: #e2d9f3; color: #432874; }
.ei-body h4 { font-size: 0.88rem; color: var(--text); margin-bottom: 6px; }
.ei-body p { font-size: 0.75rem; color: var(--text-m); }
.ei-body p i { margin-right: 4px; }

/* ===== CONTACT ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; }
.cl-map { height: 200px; border-radius: var(--r); overflow: hidden; margin-bottom: 24px; }
.map-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg,var(--primary),var(--primary-l)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: rgba(255,255,255,0.4); font-size: 2rem; }
.map-placeholder p { font-size: 0.85rem; }
.cl-info { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.cli-row { display: flex; gap: 14px; align-items: flex-start; }
.cli-icon { width: 40px; height: 40px; border-radius: 10px; background: rgba(26,58,107,0.1); display: flex; align-items: center; justify-content: center; color: var(--primary); flex-shrink: 0; }
.cli-row h5 { font-size: 0.82rem; color: var(--text); margin-bottom: 2px; }
.cli-row p { font-size: 0.82rem; color: var(--text-m); }
.social-row { display: flex; gap: 12px; }
.soc-btn { display: flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 50px; font-size: 0.82rem; font-weight: 600; transition: var(--t); }
.soc-btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-m); }
.soc-btn.fb { background: #1877f2; color: white; }
.soc-btn.tg { background: #0088cc; color: white; }
.soc-btn.yt { background: #ff0000; color: white; }
.contact-form-card { background: var(--white); border-radius: var(--r-xl); padding: 40px; box-shadow: var(--shadow-m); }
.contact-form-card h3 { font-size: 1.1rem; color: var(--text); margin-bottom: 28px; display: flex; align-items: center; gap: 10px; }
.contact-form-card h3 i { color: var(--gold); }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cf-group { margin-bottom: 16px; }
.cf-group label { display: block; margin-bottom: 6px; font-size: 0.82rem; font-weight: 600; color: var(--text); }
.cf-group input, .cf-group select, .cf-group textarea {
  width: 100%; padding: 12px 16px;
  border: 2px solid var(--border); border-radius: var(--r-s);
  background: var(--bg); color: var(--text);
  font-size: 0.88rem; outline: none; transition: var(--t);
}
.cf-group input:focus, .cf-group select:focus, .cf-group textarea:focus { border-color: var(--primary); background: var(--white); }
.cf-group textarea { resize: vertical; }

/* ===== FOOTER ===== */
.footer { background: var(--navy); color: rgba(255,255,255,0.8); }
.footer-wave { margin-bottom: -4px; line-height: 0; }
.footer-wave svg { display: block; }
.footer-main { padding: 60px 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 2fr; gap: 48px; }
.fg-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.fg-logo i { font-size: 2rem; color: var(--gold); }
.fg-logo span { color: white; font-weight: 700; font-size: 0.95rem; line-height: 1.3; }
.fg-brand p { font-size: 0.82rem; margin-bottom: 20px; line-height: 1.8; }
.fg-social { display: flex; gap: 10px; }
.fg-social a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; transition: var(--t); }
.fg-social a:hover { background: var(--gold); color: var(--navy); transform: translateY(-3px); }
.fg-links h4 { color: white; margin-bottom: 16px; font-size: 0.9rem; border-bottom: 2px solid rgba(245,166,35,0.3); padding-bottom: 8px; }
.fg-links ul { display: flex; flex-direction: column; gap: 8px; }
.fg-links a { font-size: 0.82rem; color: rgba(255,255,255,0.6); transition: var(--t); display: flex; align-items: center; gap: 6px; }
.fg-links a:hover { color: var(--gold); padding-left: 4px; }
.fg-links i { font-size: 0.6rem; }
.fg-newsletter h4 { color: white; margin-bottom: 8px; }
.fg-newsletter p { font-size: 0.82rem; margin-bottom: 14px; }
.nl-form { display: flex; margin-bottom: 20px; }
.nl-form input { flex: 1; padding: 10px 14px; border: none; border-radius: 8px 0 0 8px; font-family: var(--font); font-size: 0.82rem; outline: none; }
.nl-form button { background: var(--gold); color: var(--navy); border: none; padding: 0 16px; border-radius: 0 8px 8px 0; cursor: pointer; transition: var(--t); }
.nl-form button:hover { background: var(--gold-d); }
.fg-app p { font-size: 0.78rem; color: rgba(255,255,255,0.5); margin-bottom: 8px; }
.app-btn { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.1); color: white; padding: 6px 14px; border-radius: 6px; font-size: 0.78rem; margin-right: 8px; margin-bottom: 8px; transition: var(--t); }
.app-btn:hover { background: rgba(255,255,255,0.2); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 16px 0; }
.footer-bottom .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer-bottom p { font-size: 0.75rem; color: rgba(255,255,255,0.4); }
.footer-bottom a { color: var(--gold); }

/* ===== MISC UI ===== */
#backTop {
  position: fixed; bottom: 32px; right: 32px; z-index: 800;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--gold); color: var(--navy); border: none;
  font-size: 1rem; cursor: pointer; box-shadow: var(--shadow-m);
  transition: var(--t); opacity: 0; visibility: hidden;
}
#backTop.show { opacity: 1; visibility: visible; }
#backTop:hover { transform: translateY(-4px); }
.lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,0.92); opacity: 0; visibility: hidden; display: flex; align-items: center; justify-content: center; transition: var(--t); }
.lightbox.open { opacity: 1; visibility: visible; }
.lb-close { position: absolute; top: 20px; right: 20px; background: rgba(255,255,255,0.15); border: none; color: white; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; transition: var(--t); }
.lb-close:hover { background: rgba(255,255,255,0.25); }
.lb-body { color: white; text-align: center; padding: 40px; }
.cookie-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 999;
  background: var(--navy); color: rgba(255,255,255,0.8);
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; font-size: 0.82rem; transform: translateY(100%);
  transition: transform 0.4s var(--ease);
}
.cookie-bar.show { transform: translateY(0); }
.cookie-bar button { background: var(--gold); color: var(--navy); border: none; padding: 8px 20px; border-radius: 50px; font-weight: 700; cursor: pointer; font-family: var(--font); }

/* TOAST */
.toast {
  position: fixed; bottom: 100px; right: 24px; z-index: 3000;
  background: #2ecc71; color: white;
  padding: 14px 20px; border-radius: 12px;
  font-size: 0.88rem; box-shadow: var(--shadow-l);
  display: flex; align-items: center; gap: 10px;
  transform: translateX(200%); transition: transform 0.4s var(--ease);
}
.toast.show { transform: translateX(0); }
.toast.error { background: #e74c3c; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .programs-grid { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .nav-center { display: none; }
  .hamburger { display: flex; }
  .nav-links.mobile-open {
    display: flex; flex-direction: column;
    position: absolute; top: 72px; left: 0; right: 0;
    background: rgba(15,35,71,0.98); padding: 16px 24px 24px;
    gap: 4px;
  }
  .nav-center.mobile-open { display: flex; }
  .dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; background: rgba(255,255,255,0.05); margin-top: 4px; }
  .about-grid, .news-layout, .contact-grid { grid-template-columns: 1fr; }
  .events-grid { grid-template-columns: 1fr 1fr; }
  .teachers-grid { grid-template-columns: repeat(2,1fr); }
  .hero-stats { padding: 16px 24px; }
  .hstat { padding: 0 16px; }
}
@media (max-width: 600px) {
  .section { padding: 64px 0; }
  .programs-grid, .teachers-grid, .events-grid { grid-template-columns: 1fr; }
  .gal-grid { grid-template-columns: 1fr 1fr; }
  .gi-wide { grid-column: span 1; }
  .gi-tall { grid-row: span 1; }
  .hero-stats { flex-direction: column; gap: 16px; }
  .hstat-div { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .cf-row { grid-template-columns: 1fr; }
  .social-row { flex-direction: column; }
  .cookie-bar { flex-direction: column; gap: 10px; text-align: center; }
}
