/* ==========================================================
   E-School v2 — WordPress theme stylesheet (same UI as the static v2)
   ========================================================== */
:root {
  --primary: #1d4ed8;
  --primary-600: #1e40af;
  --primary-50: #eff4ff;
  --accent: #f59e0b;
  --accent-600: #d97706;
  --success: #059669;
  --danger: #e11d48;
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --surface: #f8fafc;
  --card: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
  --shadow-lg: 0 20px 45px rgba(15,23,42,.12);
  --font-bn: 'Hind Siliguri', sans-serif;
  --font-en: 'Poppins', 'Hind Siliguri', sans-serif;
  --header-h: 64px;
  --cta-img: url('https://picsum.photos/seed/eschool-cta/1600/600');
  --page-hero-img: url('https://picsum.photos/seed/eschool-pagehero/1600/500');
  --space-section: 56px;  /* gap between sections */
  --space-head: 28px;     /* heading → content */
  --space-block: 24px;    /* gap between blocks inside a section */
}
:root[data-theme="dark"] {
  --primary: #60a5fa;
  --primary-600: #3b82f6;
  --primary-50: #172554;
  --ink: #f1f5f9;
  --text: #cbd5e1;
  --muted: #94a3b8;
  --line: #1e293b;
  --bg: #0b1120;
  --surface: #0f172a;
  --card: #111a2e;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  --shadow-lg: 0 20px 45px rgba(0,0,0,.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { font-family: var(--font-bn); color: var(--text); background: var(--bg); font-size: 16px; line-height: 1.7; transition: background .3s, color .3s; }
a { color: inherit; text-decoration: none; transition: .25s; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button, input, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
.en { font-family: var(--font-en); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.section { padding: var(--space-section) 0; }
/* two neighbouring sections with the same background share one gap */
.section:not(.alt):not(.video-sec) + .section:not(.alt):not(.video-sec),
.section.alt + .section.alt { padding-top: 0; }
.section.alt { background: var(--surface); }
.grid { display: grid; gap: 24px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.g-6 { grid-template-columns: repeat(6, 1fr); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 24px; font-weight: 600; font-size: 15px; line-height: 1.2; transition: .25s; white-space: nowrap; }
.btn i { font-size: 18px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px rgba(29,78,216,.25); }
.btn-primary:hover { background: var(--primary-600); transform: translateY(-2px); }
.btn-accent { background: var(--accent); color: #111; box-shadow: 0 8px 20px rgba(245,158,11,.3); }
.btn-accent:hover { background: var(--accent-600); transform: translateY(-2px); }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn.added { background: var(--success); color: #fff; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; font-size: 20px; color: var(--ink); }
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- top bar ---------- */
.topbar { background: var(--ink); color: #cbd5e1; font-size: 14px; }
:root[data-theme="dark"] .topbar { background: #020617; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 42px; }
.topbar .info { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar .info span { display: flex; align-items: center; gap: 6px; }
.topbar .info i { color: var(--accent); font-size: 16px; }
.topbar .right { display: flex; align-items: center; gap: 14px; }
.topbar .right a:hover { color: #fff; }
.topbar .lang { border: 1px solid #334155; border-radius: 999px; padding: 2px 12px; font-family: var(--font-en); font-size: 13px; }

/* ---------- header ---------- */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand .emblem { width: 62px; height: 62px; flex-shrink: 0; }
.brand b { display: block; font-size: 26px; font-weight: 700; color: var(--ink); line-height: 1.15; }
.brand small { display: block; color: var(--muted); font-size: 14px; }
.header-actions { display: flex; align-items: center; gap: 10px; }

/* ---------- navigation ---------- */
.navbar { position: sticky; top: 0; z-index: 60; background: var(--card); border-bottom: 1px solid var(--line); transition: box-shadow .3s; }
.navbar.scrolled { box-shadow: 0 10px 30px rgba(15,23,42,.08); }
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.main-nav > ul { display: flex; align-items: center; height: var(--header-h); }
.main-nav li { position: relative; }
.main-nav > ul > li { height: 100%; display: flex; align-items: center; }
.main-nav > ul > li > a { display: flex; align-items: center; gap: 4px; padding: 8px 11px; font-size: 16px; font-weight: 500; color: var(--ink); border-radius: 8px; position: relative; }
.main-nav > ul > li > a::before { content: ""; position: absolute; left: 11px; right: 11px; bottom: -12px; height: 3px; border-radius: 3px; background: var(--primary); transform: scaleX(0); transition: .3s; }
.main-nav > ul > li:hover > a, .main-nav > ul > li.active > a { color: var(--primary); }
.main-nav > ul > li.active > a::before, .main-nav > ul > li:hover > a::before { transform: scaleX(1); }
.main-nav li.has-sub > a::after { content: "\f107"; font-family: 'Line Awesome Free'; font-weight: 900; font-size: 13px; }
.main-nav ul ul { position: absolute; top: calc(100% - 4px); left: 0; min-width: 230px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(12px); transition: .25s; }
.main-nav ul ul ul { top: -9px; left: calc(100% + 8px); }
.main-nav li:hover > ul, .main-nav li:focus-within > ul { opacity: 1; visibility: visible; transform: none; }
.main-nav ul ul a { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-radius: 8px; font-size: 15px; color: var(--text); }
.main-nav ul ul a:hover { background: var(--primary-50); color: var(--primary); }
.main-nav ul ul li.has-sub > a::after { content: "\f105"; }
/* mega menu */
.main-nav li.mega { position: static; }
.main-nav li.mega > ul { left: 50%; transform: translate(-50%, 12px); width: min(900px, 94vw); display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px 18px; padding: 22px; }
.main-nav li.mega:hover > ul, .main-nav li.mega:focus-within > ul { transform: translate(-50%, 0); }
.main-nav li.mega > ul > li > a { font-weight: 600; color: var(--ink); }
.main-nav li.mega > ul > li > a::after { display: none; }
.main-nav li.mega > ul ul { position: static; opacity: 1; visibility: inherit; transform: none; box-shadow: none; border: 0; padding: 0 0 6px; min-width: 0; background: transparent; }
.main-nav li.mega > ul ul a { padding: 5px 12px; font-size: 14.5px; }
.main-nav li.mega > ul ul a::before { content: "\f105"; font-family: 'Line Awesome Free'; font-weight: 900; margin-right: 6px; color: var(--accent); }
.main-nav li.mega > ul ul a { justify-content: flex-start; }
.nav-tools { display: flex; gap: 8px; }
.nav-toggle { display: none; }
.drawer-head, .drawer-backdrop { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; height: min(78vh, 680px); min-height: 480px; overflow: hidden; background: #0f172a; }
.hero .slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
.hero .slide.active { opacity: 1; z-index: 1; }
.hero .slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 7s ease; }
.hero .slide.active img { transform: scale(1); }
.hero .slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(15,23,42,.88) 0%, rgba(15,23,42,.55) 50%, rgba(15,23,42,.1) 100%); }
.hero-content { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; }
.hero-text { max-width: 640px; color: #fff; }
.hero-text .eyebrow { display: inline-flex; align-items: center; gap: 8px; background: rgba(245,158,11,.15); color: #fcd34d; border: 1px solid rgba(245,158,11,.4); border-radius: 999px; padding: 4px 14px; font-size: 14px; margin-bottom: 18px; }
.hero-text h1 { font-size: 54px; line-height: 1.2; font-weight: 700; margin-bottom: 16px; min-height: 130px; }
.hero-text p { font-size: 18px; color: #cbd5e1; margin-bottom: 30px; max-width: 520px; }
.hero-text .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-text h1 span { display: block; animation: rise .8s ease both; }
.hero-text h1 span[hidden] { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.hero-controls { position: absolute; z-index: 3; right: max(20px, calc((100vw - 1240px) / 2 + 20px)); bottom: 130px; display: flex; align-items: center; gap: 12px; color: #fff; font-family: var(--font-en); }
.hero-controls button { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); color: #fff; font-size: 20px; backdrop-filter: blur(6px); }
.hero-controls button:hover { background: #fff; color: var(--ink); }
.hero-progress { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--accent); z-index: 3; width: 0; }
.hero-progress.run { animation: progress 6s linear forwards; }
@keyframes progress { to { width: 100%; } }

/* quick access tiles */
.quick { position: relative; z-index: 5; margin-top: -80px; }
.quick .grid { background: var(--card); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 14px; gap: 6px; }
.quick-tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 18px 8px; border-radius: 14px; font-weight: 600; color: var(--ink); }
.quick-tile i { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; transition: .3s; }
.quick-tile:hover { background: var(--surface); transform: translateY(-3px); }
.quick-tile:hover i { transform: scale(1.08) rotate(-4deg); }
.t1 i { background: #dbeafe; color: #1d4ed8; } .t2 i { background: #fef3c7; color: #b45309; }
.t3 i { background: #dcfce7; color: #15803d; } .t4 i { background: #fce7f3; color: #be185d; }
.t5 i { background: #ede9fe; color: #6d28d9; } .t6 i { background: #cffafe; color: #0e7490; }
:root[data-theme="dark"] .quick-tile i { filter: saturate(1.2) brightness(.9); }

/* ticker */
.ticker { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 6px 6px 6px; margin-top: 28px; box-shadow: var(--shadow); }
.ticker .label { display: inline-flex; align-items: center; gap: 6px; background: var(--danger); color: #fff; border-radius: 999px; padding: 4px 14px; font-weight: 600; white-space: nowrap; font-size: 14px; }
.ticker .label::before { content: ""; width: 8px; height: 8px; background: #fff; border-radius: 50%; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .2; } }
.ticker .track { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.ticker .track span { display: inline-block; white-space: nowrap; padding-left: 100%; animation: ticker 30s linear infinite; }
.ticker:hover .track span { animation-play-state: paused; }
.ticker .close { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--surface); font-size: 18px; flex-shrink: 0; }
@keyframes ticker { to { transform: translateX(-100%); } }

/* ---------- section heading ---------- */
.sec-head { text-align: center; max-width: 640px; margin: 0 auto var(--space-head); }
.sec-head.left { text-align: left; margin-left: 0; }
.kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--primary); font-family: var(--font-en); font-weight: 600; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 10px; }
.kicker::before { content: ""; width: 28px; height: 2px; background: var(--accent); }
.sec-head h2 { font-size: 38px; line-height: 1.25; color: var(--ink); font-weight: 700; }
.sec-head p { color: var(--muted); margin-top: 10px; }
.sec-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: var(--space-head); }
.sec-head-row .sec-head { margin: 0; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: 1.05fr 1fr; gap: 60px; align-items: center; }
.about-media { position: relative; }
.about-media img { border-radius: 24px; width: 100%; height: 480px; object-fit: cover; }
.about-media .badge { position: absolute; right: -20px; bottom: 30px; background: var(--card); border-radius: 18px; padding: 18px 22px; box-shadow: var(--shadow-lg); display: flex; gap: 12px; align-items: center; }
.about-media .badge i { width: 48px; height: 48px; border-radius: 12px; background: var(--accent); color: #111; display: grid; place-items: center; font-size: 26px; }
.about-media .badge b { display: block; font-size: 26px; color: var(--ink); line-height: 1; font-family: var(--font-en); }
.about-media .badge small { color: var(--muted); }
.about-text p { margin-bottom: 18px; text-align: justify; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 26px; }
.checks li { display: flex; gap: 8px; align-items: center; font-weight: 500; color: var(--ink); }
.checks li i { color: var(--success); font-size: 20px; }

/* stats */
.stats { background: linear-gradient(120deg, var(--primary-600), #4338ca); border-radius: 24px; color: #fff; padding: 36px 40px; margin-top: var(--space-section); position: relative; overflow: hidden; }
.stats::after { content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.08); }
.stat { text-align: center; }
.stat i { font-size: 34px; color: #fcd34d; }
.stat b { display: block; font-family: var(--font-en); font-size: 40px; font-weight: 700; line-height: 1.2; }
.stat span { color: #c7d2fe; }

/* ---------- speech ---------- */
.speech { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; position: relative; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.speech::before { content: "\201C"; position: absolute; right: 24px; top: -10px; font-size: 120px; font-family: Georgia, serif; color: var(--primary); opacity: .12; line-height: 1; }
.speech-person { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.speech-person img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: 3px solid var(--primary-50); }
.speech-person b { display: block; font-size: 20px; color: var(--ink); }
.speech-person small { color: var(--primary); font-weight: 600; }
.speech p { flex: 1; text-align: justify; margin-bottom: 16px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-weight: 600; }
.link-arrow i { transition: .25s; }
.link-arrow:hover i { transform: translateX(4px); }

/* ---------- notice board + links ---------- */
.board-wrap { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.panel-head h3 { display: flex; align-items: center; gap: 10px; font-size: 20px; color: var(--ink); }
.panel-head h3 i { color: var(--primary); font-size: 24px; }
.panel-head a { font-size: 14px; color: var(--primary); font-weight: 600; }
.notice-item { display: flex; gap: 16px; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.notice-item:last-child { border-bottom: 0; }
.notice-item:hover { background: var(--surface); }
.date-badge { width: 58px; flex-shrink: 0; text-align: center; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); font-family: var(--font-en); background: var(--card); }
.date-badge b { display: block; font-size: 20px; color: var(--ink); padding-top: 4px; line-height: 1.2; }
.date-badge small { display: block; background: var(--primary); color: #fff; font-size: 11px; text-transform: uppercase; padding: 1px 0; }
.notice-item .t { flex: 1; font-weight: 500; color: var(--ink); line-height: 1.5; }
.notice-item .t small { display: block; color: var(--muted); font-weight: 400; font-family: var(--font-en); font-size: 12.5px; }
.notice-item .go { color: var(--muted); font-size: 20px; }
.notice-item:hover .go { color: var(--primary); transform: translateX(3px); }
.link-list a { display: flex; align-items: center; gap: 12px; padding: 13px 22px; border-bottom: 1px solid var(--line); font-weight: 500; color: var(--ink); }
.link-list a:last-child { border-bottom: 0; }
.link-list a i:first-child { width: 36px; height: 36px; border-radius: 10px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; font-size: 18px; }
.link-list a .ext { margin-left: auto; color: var(--muted); }
.link-list a:hover { background: var(--surface); color: var(--primary); }

/* ---------- corners ---------- */
.corner { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); transition: .3s; position: relative; overflow: hidden; }
.corner:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.corner::after { content: ""; position: absolute; left: 0; top: 0; height: 4px; width: 100%; background: var(--c); }
.corner .ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 30px; color: #fff; background: var(--c); margin-bottom: 16px; }
.corner h3 { font-size: 20px; color: var(--ink); margin-bottom: 10px; }
.corner li a { display: flex; align-items: center; gap: 8px; padding: 4px 0; color: var(--text); }
.corner li a::before { content: "\f105"; font-family: 'Line Awesome Free'; font-weight: 900; color: var(--c); }
.corner li a:hover { color: var(--c); padding-left: 4px; }

/* ---------- carousel ---------- */
.carousel { position: relative; overflow: hidden; margin: 0 -12px; padding: 6px 0 10px; }
.carousel-track { display: flex; transition: transform .6s cubic-bezier(.22,.61,.36,1); }
.carousel-track > * { flex-shrink: 0; padding: 0 12px; }
.carousel-nav { display: flex; gap: 8px; }
.carousel-nav button { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 20px; }
.carousel-nav button:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.carousel-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.carousel-dots button { width: 8px; height: 8px; border: 0; border-radius: 99px; background: var(--line); transition: .3s; padding: 0; }
.carousel-dots button.active { background: var(--primary); width: 26px; }

/* ---------- people ---------- */
.person { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-align: center; transition: .3s; height: 100%; }
.person:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.person .ph { position: relative; aspect-ratio: 1 / 1.05; overflow: hidden; }
.person .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.person:hover .ph img { transform: scale(1.07); }
.person .social { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 8px; transform: translateY(60px); transition: .35s; }
.person:hover .social, .person:focus-within .social { transform: none; }
.person .social a { width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; font-size: 17px; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.person .social a:hover { background: var(--primary); color: #fff; }
.person .info { padding: 16px 12px 18px; }
.person .info h4 { font-size: 19px; color: var(--ink); line-height: 1.35; }
.person .info h4 a:hover { color: var(--primary); }
.person .info span { color: var(--muted); font-size: 15px; }
.person.round { padding: 26px 16px 20px; }
.person.round .ph { width: 130px; height: 130px; border-radius: 50%; margin: 0 auto; aspect-ratio: auto; border: 4px solid var(--primary-50); box-shadow: 0 0 0 2px var(--accent); }
.person.round .info { padding-bottom: 0; }
.chip { display: inline-block; background: var(--primary-50); color: var(--primary); border-radius: 999px; padding: 2px 12px; font-size: 13px; font-weight: 600; margin-top: 6px; }

/* ---------- course / product ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; height: 100%; display: flex; flex-direction: column; transition: .3s; }
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.card .ph { position: relative; aspect-ratio: 16 / 10; overflow: hidden; display: block; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.card:hover .ph img { transform: scale(1.06); }
.card .tag { position: absolute; left: 14px; top: 14px; background: var(--card); color: var(--ink); border-radius: 999px; padding: 3px 12px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow); }
.card .tag.sale { background: var(--danger); color: #fff; left: auto; right: 14px; }
.card .body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.card .meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); font-family: var(--font-en); margin-bottom: 8px; }
.card .meta i { color: var(--accent); margin-right: 4px; }
.card h3 { font-family: var(--font-en); font-size: 18.5px; line-height: 1.4; color: var(--ink); font-weight: 600; text-transform: capitalize; margin-bottom: 8px; }
.card h3 a:hover { color: var(--primary); }
.card p { color: var(--muted); font-size: 15px; flex: 1; }
.card .foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.price { font-family: var(--font-en); font-weight: 700; font-size: 20px; color: var(--primary); }
.price del { color: var(--muted); font-weight: 400; font-size: 15px; margin-right: 6px; }
.rating { color: var(--accent); font-size: 14px; }

/* ---------- information ---------- */
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px; gap: 4px; margin-bottom: 26px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 9px 22px; border-radius: 999px; font-weight: 600; color: var(--muted); }
.seg button.active { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(29,78,216,.25); }
.tab-pane { display: none; animation: fade .4s; }
.tab-pane.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.file-row { display: flex; align-items: center; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin-bottom: 12px; transition: .25s; }
.file-row:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.file-row .fi { width: 46px; height: 46px; border-radius: 12px; background: #fee2e2; color: #dc2626; display: grid; place-items: center; font-size: 24px; flex-shrink: 0; }
.file-row .t { flex: 1; }
.file-row .t a { font-family: var(--font-en); font-weight: 600; color: var(--ink); }
.file-row .t a:hover { color: var(--primary); }
.file-row .t small { display: block; color: var(--muted); font-family: var(--font-en); font-size: 13px; }
.file-row .acts { display: flex; gap: 8px; }

/* ---------- video ---------- */
.video-sec { background: var(--ink); color: #fff; }
:root[data-theme="dark"] .video-sec { background: #020617; }
.video-sec .sec-head h2 { color: #fff; }
.video-sec .sec-head p { color: #94a3b8; }
.video-sec .carousel-nav button { background: transparent; border-color: #334155; color: #fff; }
.video-card { cursor: pointer; border-radius: var(--radius); overflow: hidden; position: relative; display: block; width: 100%; border: 0; background: none; text-align: left; color: #fff; }
.video-card .thumb { aspect-ratio: 16 / 10; overflow: hidden; }
.video-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: .6s; }
.video-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(2,6,23,.9)); }
.video-card .play { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: 60px; height: 60px; border-radius: 50%; background: rgba(255,255,255,.95); color: var(--danger); display: grid; place-items: center; font-size: 24px; z-index: 2; box-shadow: 0 0 0 10px rgba(255,255,255,.2); transition: .3s; }
.video-card:hover .play { box-shadow: 0 0 0 16px rgba(255,255,255,.15); transform: translate(-50%, -50%) scale(1.06); }
.video-card:hover .thumb img { transform: scale(1.08); }
.video-card .vt { position: absolute; left: 18px; bottom: 14px; z-index: 2; font-family: var(--font-en); font-weight: 600; }
.video-card .vt small { display: block; color: #cbd5e1; font-weight: 400; font-size: 12.5px; }

/* ---------- CTA ---------- */
.cta { background: linear-gradient(110deg, rgba(29,78,216,.95), rgba(67,56,202,.92)), var(--cta-img) center/cover; border-radius: 28px; color: #fff; padding: 56px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.cta h2 { font-size: 34px; line-height: 1.3; }
.cta p { color: #c7d2fe; margin-top: 6px; }
.cta .actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* clients */
.clients .client-logo { height: 60px; }
.client-logo { height: 70px; display: grid; place-items: center; font-family: var(--font-en); font-weight: 800; font-size: 22px; color: var(--muted); opacity: .6; transition: .3s; letter-spacing: 1px; }
.client-logo:hover { opacity: 1; color: var(--primary); }

/* ---------- footer ---------- */
.site-footer { background: #0b1222; color: #94a3b8; padding: var(--space-section) 0 0; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; }
.site-footer .brand b { color: #fff; font-size: 22px; } .site-footer .brand small { color: #94a3b8; }
.site-footer .about-f { margin: 18px 0; font-size: 15px; }
.footer-title { color: #fff; font-size: 19px; margin-bottom: 18px; position: relative; padding-bottom: 10px; }
.footer-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 36px; height: 3px; border-radius: 3px; background: var(--accent); }
.footer-menu li a { display: inline-block; padding: 5px 0; }
.footer-menu li a:hover { color: #fff; transform: translateX(4px); }
.f-address { display: flex; gap: 12px; padding: 6px 0; font-size: 15px; }
.f-address i { color: var(--accent); font-size: 20px; margin-top: 2px; }
.f-social { display: flex; gap: 8px; }
.f-social a { width: 38px; height: 38px; border-radius: 50%; background: #1e293b; color: #fff; display: grid; place-items: center; font-size: 17px; }
.f-social a:hover { background: var(--accent); color: #111; }
.newsletter { display: flex; background: #1e293b; border-radius: 999px; padding: 5px; margin-top: 14px; }
.newsletter input { flex: 1; background: transparent; border: 0; outline: 0; padding: 0 14px; color: #fff; min-width: 0; }
.bottom-footer { border-top: 1px solid #1e293b; margin-top: var(--space-section); padding: 22px 0; font-size: 14px; }
.bottom-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.bottom-footer a:hover { color: #fff; }

/* back to top with progress ring */
.scroll-top { position: fixed; right: 24px; bottom: 24px; width: 50px; height: 50px; border-radius: 50%; border: 0; background: var(--card); color: var(--primary); font-size: 20px; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(10px); transition: .3s; z-index: 80; display: grid; place-items: center; }
.scroll-top.show { opacity: 1; visibility: visible; transform: none; }
.scroll-top svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.scroll-top circle { fill: none; stroke: var(--primary); stroke-width: 3; stroke-dasharray: 151; stroke-dashoffset: 151; stroke-linecap: round; }
.cart-badge { position: fixed; right: 24px; bottom: 86px; width: 50px; height: 50px; border-radius: 50%; background: var(--accent); color: #111; display: none; place-items: center; font-size: 22px; z-index: 80; box-shadow: var(--shadow-lg); }
.cart-badge.show { display: grid; }
.cart-badge span { position: absolute; top: -3px; right: -3px; background: var(--danger); color: #fff; font-size: 12px; width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-en); }

/* ---------- inner pages ---------- */
.page-hero { background: linear-gradient(110deg, rgba(15,23,42,.92), rgba(29,78,216,.75)), var(--page-hero-img) center/cover; color: #fff; padding: 48px 0 52px; }
.page-hero h1 { font-size: 40px; line-height: 1.25; max-width: 900px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14.5px; color: #cbd5e1; margin-top: 10px; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb i { font-size: 12px; opacity: .7; }
.page-body { padding: var(--space-section) 0; }
.prose { font-size: 17px; max-width: 860px; margin: 0 auto; }
.prose p { margin-bottom: 18px; text-align: justify; }
.prose img.feature { width: 100%; border-radius: 20px; max-height: 460px; object-fit: cover; margin-bottom: 26px; }
.prose img.side { float: left; width: 220px; border-radius: 16px; margin: 0 24px 12px 0; }
.prose .sign { margin-top: 28px; font-weight: 600; color: var(--ink); border-left: 4px solid var(--accent); padding-left: 14px; }
.prose .meta-line { display: flex; gap: 18px; color: var(--muted); font-size: 14px; margin-bottom: 18px; font-family: var(--font-en); }
.prose .meta-line i { color: var(--accent); }

/* data table */
.table-tools { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.table-tools .count { color: var(--muted); font-size: 14.5px; }
.search-box { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 0 16px; min-width: 280px; transition: .25s; }
.search-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(29,78,216,.12); }
.search-box i { color: var(--muted); font-size: 18px; }
.search-box input { flex: 1; border: 0; outline: 0; background: transparent; padding: 11px 0; }
.table-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.data-table th { background: var(--surface); color: var(--muted); font-family: var(--font-en); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .6px; text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--ink); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: var(--primary-50); }
.data-table td img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.data-table .person-cell { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.data-table .num { font-family: var(--font-en); color: var(--muted); }
.data-table.routine td, .data-table.routine th { text-align: center; font-family: var(--font-en); font-size: 14px; }
.data-table.routine td:first-child { font-weight: 600; background: var(--surface); text-align: left; }
.data-table.routine .break { background: #fef3c7; color: #92400e; font-weight: 600; }
:root[data-theme="dark"] .data-table.routine .break { background: #422006; color: #fcd34d; }
.subj { display: inline-block; border-radius: 8px; padding: 3px 8px; font-size: 13px; background: var(--primary-50); color: var(--primary); }
.empty-row td { text-align: center; color: var(--muted); padding: 30px; }
.pagination { display: flex; gap: 8px; margin-top: 24px; justify-content: center; }
.pagination a, .pagination span { min-width: 42px; height: 42px; display: grid; place-items: center; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-family: var(--font-en); font-weight: 600; }
.pagination .current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }

/* filter chips (gallery / blog) */
.filters { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 30px; }
.filters a { padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line); font-weight: 600; font-size: 15px; background: var(--card); }
.filters a.on, .filters a:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

/* gallery */
.photo { position: relative; border-radius: var(--radius); overflow: hidden; cursor: zoom-in; display: block; width: 100%; border: 0; padding: 0; background: none; }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: .6s; }
.photo .cap { position: absolute; inset: auto 0 0 0; padding: 30px 16px 14px; background: linear-gradient(transparent, rgba(2,6,23,.85)); color: #fff; text-align: left; font-family: var(--font-en); font-weight: 600; transform: translateY(100%); transition: .35s; }
.photo:hover .cap, .photo:focus .cap { transform: none; }
.photo:hover img { transform: scale(1.08); }
.photo::after { content: "\f00e"; font-family: 'Line Awesome Free'; font-weight: 900; position: absolute; right: 14px; top: 14px; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.9); color: var(--ink); display: grid; place-items: center; opacity: 0; transition: .3s; }
.photo:hover::after { opacity: 1; }

/* profile */
.profile { display: grid; grid-template-columns: 340px 1fr; gap: 40px; align-items: start; }
.profile-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px; text-align: center; box-shadow: var(--shadow); position: sticky; top: 90px; }
.profile-card img { width: 180px; height: 180px; border-radius: 50%; object-fit: cover; margin: 0 auto 16px; border: 5px solid var(--primary-50); }
.profile-card h2 { font-size: 24px; color: var(--ink); }
.profile-card .role { color: var(--primary); font-weight: 600; }
.profile-card .social { display: flex; justify-content: center; gap: 8px; margin: 16px 0 6px; }
.profile-card .social a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; }
.profile-card .social a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 26px; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.fact small { color: var(--muted); display: block; font-size: 13px; }
.fact b { color: var(--ink); font-size: 17px; }

/* post */
.post-layout { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; }
.post img.feature { width: 100%; border-radius: 20px; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 22px; }
.post p { margin-bottom: 18px; text-align: justify; }
.post .tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.share { display: flex; gap: 8px; align-items: center; margin-top: 18px; color: var(--muted); }
.share a { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink); }
.share a:hover { background: var(--primary); color: #fff; }
.side-widget { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 24px; position: sticky; top: 90px; }
.side-widget h3 { font-size: 19px; color: var(--ink); margin-bottom: 14px; }
.recent a { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-family: var(--font-en); font-size: 14.5px; font-weight: 500; color: var(--ink); line-height: 1.4; }
.recent a:last-child { border-bottom: 0; }
.recent img { width: 72px; height: 56px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.recent a small { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; }
.recent a:hover { color: var(--primary); }

/* result */
.result-wrap { max-width: 760px; margin: 0 auto; }
.result-search { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 34px; box-shadow: var(--shadow); text-align: center; }
.result-search .ic { width: 70px; height: 70px; border-radius: 20px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; font-size: 36px; margin: 0 auto 14px; }
.result-search h2 { color: var(--ink); font-size: 26px; }
.result-search p { color: var(--muted); }
.result-form { display: flex; gap: 10px; margin-top: 22px; }
.result-form input { flex: 1; border: 1.5px solid var(--line); border-radius: 999px; padding: 14px 20px; background: var(--bg); outline: 0; font-family: var(--font-en); }
.result-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(29,78,216,.12); }
.result-hint { margin-top: 12px; font-size: 14px; color: var(--muted); }
.result-hint button { border: 0; background: var(--surface); border-radius: 999px; padding: 2px 10px; margin: 0 2px; font-family: var(--font-en); color: var(--primary); }
.result-out { margin-top: 26px; }
.result-card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); animation: fade .4s; }
.result-card .top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 26px; background: linear-gradient(110deg, var(--primary-600), #4338ca); color: #fff; flex-wrap: wrap; }
.result-card .top b { font-size: 22px; display: block; }
.result-card .gpa { text-align: center; background: rgba(255,255,255,.15); border-radius: 16px; padding: 8px 20px; font-family: var(--font-en); }
.result-card .gpa b { font-size: 30px; line-height: 1.1; }
.grade { display: inline-block; min-width: 40px; text-align: center; border-radius: 8px; padding: 2px 8px; font-weight: 700; font-family: var(--font-en); font-size: 14px; background: #dcfce7; color: #166534; }
.grade.g-a { background: #dbeafe; color: #1e40af; } .grade.g-b { background: #fef3c7; color: #92400e; }
.msg { padding: 16px 18px; border-radius: 14px; background: #fff1f2; color: #9f1239; border: 1px solid #fecdd3; }
.result-card .actions { padding: 16px 26px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 30px; }
.contact-info { background: linear-gradient(150deg, var(--primary-600), #4338ca); color: #fff; border-radius: 22px; padding: 34px; }
.contact-info h2 { font-size: 26px; margin-bottom: 6px; }
.contact-info p { color: #c7d2fe; margin-bottom: 20px; }
.contact-info .row-i { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.15); }
.contact-info .row-i i { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.15); display: grid; place-items: center; font-size: 20px; flex-shrink: 0; }
.contact-info .row-i small { display: block; color: #c7d2fe; font-size: 13px; }
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 34px; box-shadow: var(--shadow); }
.form-card h2 { color: var(--ink); font-size: 26px; margin-bottom: 20px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 14.5px; color: var(--ink); margin-bottom: 6px; }
.field input, .field textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--bg); outline: 0; transition: .25s; }
.field input:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(29,78,216,.12); }
.field textarea { min-height: 150px; resize: vertical; }
.field .err { display: none; color: var(--danger); font-size: 13px; margin-top: 4px; }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); }
.field.invalid .err { display: block; }
.form-msg { display: none; margin-top: 16px; padding: 12px 16px; border-radius: 12px; }
.form-msg.ok { display: block; background: #dcfce7; color: #166534; }
.form-msg.err { display: block; background: #fff1f2; color: #9f1239; }
.map { margin-top: var(--space-block); border-radius: 22px; overflow: hidden; border: 1px solid var(--line); }
.map iframe { width: 100%; height: 400px; border: 0; display: block; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* product page */
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
.product img { border-radius: 22px; width: 100%; }
.product h2 { font-family: var(--font-en); color: var(--ink); font-size: 30px; }
.qty { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { width: 40px; border: 0; background: var(--surface); font-size: 18px; }
.qty input { width: 50px; text-align: center; border: 0; background: var(--card); font-family: var(--font-en); }

/* ---------- overlays ---------- */
.lightbox, .search-overlay { position: fixed; inset: 0; z-index: 999; display: none; }
.lightbox { background: rgba(2,6,23,.92); align-items: center; justify-content: center; padding: 30px; }
.lightbox.open, .search-overlay.open { display: flex; animation: fade .25s; }
.lightbox .lb-inner { max-width: 1000px; width: 100%; position: relative; }
.lightbox img { max-height: 80vh; margin: 0 auto; border-radius: 14px; }
.lightbox .lb-cap { color: #cbd5e1; text-align: center; margin-top: 12px; font-family: var(--font-en); }
.lightbox .video-frame { position: relative; padding-top: 56.25%; border-radius: 14px; overflow: hidden; }
.lightbox .video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lightbox .lb-close { position: absolute; top: -50px; right: 0; width: 42px; height: 42px; border-radius: 50%; color: #fff; background: rgba(255,255,255,.12); border: 0; font-size: 24px; }
.lightbox .lb-nav { position: fixed; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,.12); border: 0; color: #fff; font-size: 24px; }
.lightbox .lb-nav:hover, .lightbox .lb-close:hover { background: #fff; color: var(--ink); }
.lightbox .lb-prev { left: 20px; } .lightbox .lb-next { right: 20px; }
.search-overlay { background: rgba(2,6,23,.6); backdrop-filter: blur(6px); align-items: flex-start; justify-content: center; padding: 10vh 20px 20px; }
.search-panel { width: 100%; max-width: 640px; background: var(--card); border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; }
.search-panel .in { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.search-panel .in i { font-size: 22px; color: var(--muted); }
.search-panel input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 18px; color: var(--ink); }
.search-panel kbd { font-family: var(--font-en); font-size: 12px; border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; color: var(--muted); }
.search-results { max-height: 55vh; overflow-y: auto; padding: 8px; }
.search-results a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--ink); }
.search-results a i { color: var(--primary); font-size: 18px; }
.search-results a small { margin-left: auto; color: var(--muted); font-size: 12.5px; font-family: var(--font-en); }
.search-results a:hover, .search-results a.sel { background: var(--primary-50); }
.search-results .none { padding: 20px; text-align: center; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 30px); background: var(--ink); color: var(--bg); padding: 12px 22px; border-radius: 999px; opacity: 0; transition: .3s; z-index: 1000; pointer-events: none; font-family: var(--font-en); font-size: 14.5px; display: flex; gap: 8px; align-items: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .reveal { opacity: 1; transform: none; } }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1200px) {
  .main-nav > ul > li > a { padding: 8px 8px; font-size: 15px; }
  .main-nav > ul > li > a::before { left: 8px; right: 8px; }
}
@media (max-width: 1080px) {
  .g-4 { grid-template-columns: repeat(2, 1fr); }
  .g-6 { grid-template-columns: repeat(3, 1fr); }
  .about, .board-wrap, .contact-grid, .post-layout, .product { grid-template-columns: 1fr; }
  .profile { grid-template-columns: 1fr; }
  .profile-card, .side-widget { position: static; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .cta { flex-direction: column; text-align: center; }

  /* off-canvas drawer */
  .nav-toggle { display: grid; }
  .main-nav { position: fixed; top: 0; left: 0; bottom: 0; width: min(340px, 86vw); background: var(--card); z-index: 120; transform: translateX(-100%); transition: transform .35s ease; overflow-y: auto; box-shadow: var(--shadow-lg); }
  .main-nav.open { transform: none; }
  body.drawer-open .navbar { z-index: 130; }  /* lift the drawer above its backdrop */
  .main-nav li.mega { position: relative; }  /* keep the mega item's toggle on its own row */
  .drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
  .drawer-head .brand .emblem { width: 42px; height: 42px; } .drawer-head .brand b { font-size: 18px; }
  .drawer-backdrop { position: fixed; inset: 0; background: rgba(2,6,23,.5); z-index: 110; opacity: 0; visibility: hidden; transition: .3s; display: block; }
  .drawer-backdrop.show { opacity: 1; visibility: visible; }
  .main-nav > ul { flex-direction: column; align-items: stretch; height: auto; padding: 10px; }
  .main-nav > ul > li { height: auto; display: block; }
  .main-nav > ul > li > a { padding: 12px 14px; }
  .main-nav > ul > li > a::before { display: none; }
  .main-nav li.has-sub > a::after { display: none; }
  .main-nav ul ul, .main-nav ul ul ul, .main-nav li.mega > ul { position: static; opacity: 1; visibility: visible; transform: none !important; display: none; box-shadow: none; border: 0; border-left: 2px solid var(--line); border-radius: 0; margin: 0 0 6px 18px; padding: 0 0 0 6px; width: auto; min-width: 0; background: transparent; }
  .main-nav li.sub-open > ul { display: block !important; }
  .main-nav li.mega > ul ul { display: none; }
  .main-nav .sub-toggle { position: absolute; right: 4px; top: 4px; width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--surface); color: var(--ink); display: grid; place-items: center; }
  .main-nav li.sub-open > .sub-toggle i { transform: rotate(180deg); }
  .main-nav li li .sub-toggle { top: 0; width: 34px; height: 34px; }
  .header-actions .btn-text { display: none; }
}
@media (min-width: 1081px) { .main-nav .sub-toggle { display: none; } }
@media (max-width: 760px) {
  :root { --space-section: 40px; --space-head: 22px; --space-block: 18px; }
  .g-2, .g-3, .g-4, .two { grid-template-columns: 1fr; }
  .g-6 { grid-template-columns: repeat(3, 1fr); }
  .topbar .info span:not(:first-child) { display: none; }
  .site-header .header-actions .btn { display: none; }
  .brand b { font-size: 20px; } .brand .emblem { width: 48px; height: 48px; }
  .hero { min-height: 520px; }
  .hero-text h1 { font-size: 34px; min-height: 90px; }
  .hero-text p { font-size: 16px; }
  .hero-controls { bottom: 100px; right: 20px; }
  .hero-controls button { width: 40px; height: 40px; }
  .quick { margin-top: -60px; }
  .quick-tile { padding: 12px 4px; font-size: 14px; }
  .quick-tile i { width: 46px; height: 46px; font-size: 24px; }
  .sec-head h2 { font-size: 28px; }
  .sec-head-row { flex-direction: column; align-items: flex-start; }
  .about-media img { height: 320px; }
  .about-media .badge { right: 10px; }
  .checks { grid-template-columns: 1fr; }
  .stats { padding: 30px 20px; }
  .stats .grid { grid-template-columns: 1fr 1fr; }
  .cta { padding: 36px 24px; } .cta h2 { font-size: 26px; }
  .site-footer .cols { grid-template-columns: 1fr; }
  .page-hero h1 { font-size: 28px; }
  .prose img.side { float: none; width: 160px; margin: 0 auto 16px; }
  .search-box { min-width: 0; width: 100%; }
  .file-row { flex-wrap: wrap; } .file-row .acts { width: 100%; justify-content: flex-end; }
  .result-form { flex-direction: column; }

  /* tables → stacked cards */
  .data-table.stack thead { display: none; }
  .data-table.stack tr { display: block; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .data-table.stack td { display: flex; justify-content: space-between; align-items: center; gap: 14px; border: 0; padding: 6px 0; text-align: right; }
  .data-table.stack td::before { content: attr(data-label); font-family: var(--font-en); font-size: 12.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); text-align: left; }
  .data-table.stack tbody tr:hover td { background: transparent; }
}
@media (max-width: 420px) {
  .g-6 { grid-template-columns: repeat(2, 1fr); }
  .ticker .label { font-size: 12px; padding: 4px 10px; }
}

/* dark mode: dark text on light-blue primary surfaces for contrast */
:root[data-theme="dark"] .btn-primary,
:root[data-theme="dark"] .btn-outline:hover,
:root[data-theme="dark"] .seg button.active,
:root[data-theme="dark"] .pagination .current,
:root[data-theme="dark"] .filters a.on,
:root[data-theme="dark"] .filters a:hover,
:root[data-theme="dark"] .carousel-nav button:hover,
:root[data-theme="dark"] .date-badge small { color: #0b1120; }

/* ==========================================================
   Classic home block (announcement + history + speeches + sidebar)
   ========================================================== */
.classic { padding: var(--space-block) 0 var(--space-section); }
.c-announce { display: flex; align-items: stretch; background: var(--primary-50); margin-bottom: var(--space-block); overflow: hidden; }
.c-label { background: var(--ink); color: #fff; font-weight: 600; font-size: 18px; padding: 8px 16px; white-space: nowrap; position: relative; display: flex; align-items: center; }
:root[data-theme="dark"] .c-label, :root[data-theme="dark"] .c-close, :root[data-theme="dark"] .c-title { background: #1e3a8a; }
.c-label::after { content: ""; position: absolute; right: -18px; top: 0; bottom: 0; width: 18px; background: inherit; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.c-track { flex: 1; overflow: hidden; display: flex; align-items: center; padding-left: 26px; font-size: 17px; color: var(--ink); }
.c-track span { display: inline-block; white-space: nowrap; padding-left: 100%; animation: ticker 30s linear infinite; }
.c-announce:hover .c-track span { animation-play-state: paused; }
.c-close { background: var(--ink); color: #fff; border: 0; width: 100px; font-size: 26px; clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%); padding-left: 14px; }
.c-close:hover { background: var(--danger); }

.c-grid { display: grid; grid-template-columns: 1fr 300px; gap: var(--space-block); align-items: start; }
.c-box { background: var(--card); border: 1px solid var(--line); box-shadow: 0 0 8px rgba(15,23,42,.06); padding: 0 0 14px; }
.c-main > .c-box { margin-bottom: var(--space-block); }
.c-title { background: var(--ink); color: #fff; font-size: 21px; font-weight: 600; padding: 9px 16px; display: flex; align-items: center; gap: 10px; line-height: 1.4; }
.c-title i { font-size: 22px; }
.c-body { padding: 12px 0 0; font-size: 17px; text-align: justify; color: var(--ink); }
.c-body::after { content: ""; display: block; clear: both; }
.c-about { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.c-about img { width: 100%; height: 225px; object-fit: cover; }
.c-main > .c-box > .c-title, .c-main > .c-box > .c-body { margin: 0; }
.c-main > .c-box { padding: 0 0 14px; }
.c-main > .c-box > .c-more { margin-left: calc(50% + 16px); }
.c-speeches { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-block); }
.c-speeches .c-box { padding: 12px 12px 14px; }
.c-speech img { float: left; width: 145px; height: 190px; object-fit: cover; margin: 0 10px 6px 0; }
.c-more { display: inline-block; background: var(--primary-50); color: var(--primary); border-radius: 999px; padding: 3px 18px; font-size: 15px; margin-top: 12px; }
.c-speeches .c-more { margin-left: 0; }
.c-more:hover { background: var(--primary); color: #fff; }

.c-links li a { display: flex; align-items: center; gap: 8px; border: 2px solid var(--ink); background: var(--card); color: var(--ink); padding: 8px 16px; font-size: 18px; margin-bottom: 10px; }
:root[data-theme="dark"] .c-links li a { border-color: #334155; }
.c-links li a::before { content: "\f056"; font-family: 'Line Awesome Free'; font-weight: 900; font-size: 20px; }
.c-links li a:hover { background: var(--ink); color: #fff; }
.c-widget { margin-top: var(--space-block); }
.c-board { background: var(--surface); border: 1px solid var(--line); border-top: 0; height: 300px; overflow: hidden; position: relative; }
.c-board ul { position: absolute; width: 100%; animation: c-vscroll 28s linear infinite; }
.c-board:hover ul { animation-play-state: paused; }
@keyframes c-vscroll { from { transform: translateY(0); } to { transform: translateY(-50%); } }
.c-board li a, .c-menu li a { display: flex; gap: 8px; padding: 9px 16px; font-size: 16px; color: var(--ink); line-height: 1.5; }
.c-board li a::before, .c-menu li a::before { content: "\f056"; font-family: 'Line Awesome Free'; font-weight: 900; font-size: 18px; flex-shrink: 0; }
.c-board li a:hover, .c-menu li a:hover { color: var(--primary); }
.c-menu { background: var(--surface); border: 1px solid var(--line); border-top: 0; padding: 6px 0; }
.c-menu li a { border-bottom: 1px solid var(--line); }
.c-menu li:last-child a { border-bottom: 0; }
.classic .stats { margin-top: var(--space-section); }

@media (max-width: 1080px) {
  .c-grid { grid-template-columns: 1fr; }
  .c-side { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--space-block); }
  .c-side .c-links { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 12px; }
  .c-widget { margin-top: var(--space-block); }
}
@media (max-width: 760px) {
  .c-label { font-size: 15px; padding: 6px 12px; }
  .c-close { width: 56px; font-size: 20px; }
  .c-about { grid-template-columns: 1fr; }
  .c-about img { height: 220px; }
  .c-main > .c-box > .c-body { padding: 12px 12px 0; }
  .c-main > .c-box > .c-more { margin-left: 12px; }
  .c-speeches { grid-template-columns: 1fr; }
  .c-speech img { width: 110px; height: 140px; }
  .c-side { grid-template-columns: 1fr; }
}


/* ==========================================================
   WordPress specifics
   ========================================================== */
.screen-reader-text { border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
.screen-reader-text:focus { background: var(--card); clip: auto !important; clip-path: none; display: block; height: auto; left: 8px; top: 8px; padding: 12px 20px; width: auto; z-index: 100000; }
.admin-bar .navbar { top: 32px; }
@media (max-width: 782px) { .admin-bar .navbar { top: 46px; } }
@media (max-width: 600px) { .admin-bar .navbar { top: 0; } }
.brand img.emblem { object-fit: contain; border-radius: 14px; }
.alignleft { float: left; margin: 0 24px 12px 0; } .alignright { float: right; margin: 0 0 12px 24px; }
.aligncenter { display: block; margin: 0 auto 18px; } .alignwide, .alignfull { max-width: 100%; }
.wp-caption, figure { max-width: 100%; margin-bottom: 18px; } .wp-caption-text, figcaption { color: var(--muted); font-size: 14px; text-align: center; margin-top: 6px; }
.prose h2, .prose h3, .prose h4, .post h2, .post h3 { color: var(--ink); line-height: 1.35; margin: 26px 0 12px; }
.prose ul, .prose ol, .post ul, .post ol { margin: 0 0 18px 22px; } .prose ul, .post ul { list-style: disc; } .prose ol, .post ol { list-style: decimal; }
.prose a, .post a:not(.btn) { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote, .post blockquote { border-left: 4px solid var(--accent); background: var(--surface); padding: 14px 20px; border-radius: 0 12px 12px 0; margin-bottom: 18px; }
.prose img, .post img { border-radius: 14px; height: auto; }
.prose table, .post table { width: 100%; border-collapse: collapse; margin-bottom: 18px; } .prose td, .prose th, .post td, .post th { border: 1px solid var(--line); padding: 8px 12px; }
.pagination .page-numbers { min-width: 42px; height: 42px; display: grid; place-items: center; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-family: var(--font-en); font-weight: 600; }
.pagination .page-numbers.current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination a.page-numbers:hover { border-color: var(--primary); color: var(--primary); }
.empty-state { text-align: center; color: var(--muted); padding: 50px 20px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.search-panel .hint { padding: 20px; text-align: center; color: var(--muted); }
.comments-area { margin-top: 40px; } .comments-area .comment-list { margin-bottom: 24px; } .comments-area .comment-body { border-bottom: 1px solid var(--line); padding: 14px 0; }
.comment-form input:not([type=submit]):not([type=checkbox]), .comment-form textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--bg); margin-bottom: 12px; }
.comment-form .submit { background: var(--primary); color: #fff; border: 0; border-radius: 999px; padding: 12px 24px; font-weight: 600; }
/* WooCommerce */
.woocommerce .woocommerce-breadcrumb { display: none; }
.woocommerce ul.products li.product .button, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button { background: var(--primary) !important; color: #fff !important; border-radius: 999px !important; padding: 10px 20px !important; font-weight: 600 !important; }
.woocommerce span.onsale { background: var(--danger); }
.woocommerce .price, .woocommerce div.product p.price { color: var(--primary) !important; font-family: var(--font-en); font-weight: 700; }
.card a.added_to_cart { display: none; }
