/* =========================================================
   Trường THPT Bắc Yên Thành — style.css
   100% ORIGINAL CSS. Traditional Vietnamese school-portal layout.
   Theme: prestigious deep red (#9c1b1b) + gold (#c9a227).
   Vanilla, mobile-first, works on file://.
   Author: rebuilt from scratch — no template or third-party CSS.
   ========================================================= */

:root {
  --primary: #9c1b1b;
  --primary-dark: #7d1313;
  --primary-light: #b52424;
  --primary-deep: #5e0f0f;
  --secondary: #fbeeee;
  --accent: #c9a227;
  --accent-light: #e7c455;
  --accent-deep: #a8851d;
  --ink: #241a1b;
  --muted: #6d6160;
  --line: #e7d6d6;
  --line-soft: #f0e6e6;
  --bg: #ffffff;
  --bg-soft: #fcf6f6;
  --bg-page: #f6eeee;
  --white: #ffffff;
  --ok: #2f7d32;
  --shadow-xs: 0 1px 2px rgba(94, 15, 15, .10);
  --shadow-sm: 0 3px 10px rgba(94, 15, 15, .10);
  --shadow-md: 0 10px 26px rgba(94, 15, 15, .14);
  --shadow-lg: 0 20px 50px rgba(94, 15, 15, .20);
  --radius: 10px;
  --radius-lg: 14px;
  --radius-sm: 6px;
  --maxw: 1180px;
  --t: .22s ease;
  --serif: "Playfair Display", "Be Vietnam Pro", Georgia, "Times New Roman", serif;
  --sans: "Be Vietnam Pro", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg-page);
  line-height: 1.68;
  font-size: 15.5px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--accent-deep); }
ul { list-style: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 18px;
}

h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; color: var(--ink); font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(1.85rem, 3.8vw, 2.5rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.95rem); }
h3 { font-size: 1.2rem; }
p { text-wrap: pretty; }

/* ============ Language toggle (PRESERVED behaviour) ============ */
.lang-vi [data-lang="en"] { display: none; }
.lang-en [data-lang="vi"] { display: none; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: .92rem; letter-spacing: .005em;
  padding: 11px 22px; border-radius: var(--radius); cursor: pointer;
  border: 2px solid transparent; transition: all var(--t);
  font-family: var(--sans); line-height: 1.2; text-align: center;
}
.btn i { font-size: .94em; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 4px 12px rgba(156,27,27,.24); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 9px 20px rgba(156,27,27,.32); }
.btn-gold { background: var(--accent); color: var(--primary-deep); border-color: var(--accent); box-shadow: 0 4px 12px rgba(201,162,39,.30); }
.btn-gold:hover { background: var(--accent-light); border-color: var(--accent-light); color: var(--primary-deep); transform: translateY(-2px); box-shadow: 0 9px 20px rgba(201,162,39,.40); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.btn-outline-light { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.65); }
.btn-outline-light:hover { background: #fff; color: var(--primary); transform: translateY(-2px); }
.btn-sm { padding: 8px 15px; font-size: .82rem; }

/* ============ 1. TOP BAR ============ */
.top-bar {
  background: var(--primary-deep);
  color: rgba(255,255,255,.9);
  font-size: .82rem;
  border-bottom: 2px solid var(--accent);
}
.top-bar .container { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 38px; flex-wrap: wrap; }
.top-bar-left { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.top-bar-left span, .top-bar-right a, .top-bar-right span { color: rgba(255,255,255,.9); display: inline-flex; align-items: center; }
.top-bar i { color: var(--accent-light); margin-right: 6px; }
.top-bar-right { display: flex; gap: 12px; align-items: center; }
.top-bar a:hover { color: #fff; }
.top-bar .sep { color: rgba(255,255,255,.35); }
.lang-switch { display: inline-flex; align-items: center; border: 1px solid rgba(255,255,255,.4); border-radius: 4px; overflow: hidden; }
.lang-switch button {
  background: transparent; color: #fff; border: 0; cursor: pointer;
  font: inherit; font-size: .76rem; font-weight: 700; padding: 3px 11px;
  transition: background var(--t), color var(--t);
}
.lang-switch button.active { background: var(--accent); color: var(--primary-deep); }

/* ============ 2. SITE BANNER ============ */
.site-banner {
  background: #fff;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.site-banner::after {
  content: ""; position: absolute; inset: 0; opacity: .07; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.85) 1px, transparent 1px);
  background-size: 22px 22px;
}
.site-banner::before {
  content: ""; position: absolute; right: -80px; top: -60px; width: 360px; height: 360px;
  border-radius: 50%; background: radial-gradient(circle, rgba(201,162,39,.30), transparent 68%); pointer-events: none;
}
.banner-inner { display: flex; align-items: center; gap: 18px; padding: 20px 0 18px; position: relative; z-index: 2; }
.banner-logo { width: 78px; height: 78px; flex: 0 0 78px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.28)); }
.banner-image-inner { padding: 0; }
.school-banner-link { display: block; width: 100%; }
.school-banner-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: left center;
  background: #fff;
  border-radius: 0;
  box-shadow: none;
}
.banner-titles { min-width: 0; }
.banner-eyebrow {
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 700; color: var(--accent-light); margin-bottom: 3px;
}
.banner-name {
  font-family: var(--serif); font-weight: 800; line-height: 1.12;
  font-size: clamp(1.3rem, 3.1vw, 2.05rem); color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.banner-slogan { margin-top: 5px; font-size: .92rem; color: rgba(255,255,255,.9); font-style: italic; }
.banner-slogan strong { color: var(--accent-light); font-style: normal; font-weight: 700; }
.banner-emblem { margin-left: auto; text-align: right; display: flex; flex-direction: column; gap: 7px; align-items: flex-end; }
.banner-chip {
  display: inline-flex; gap: 7px; align-items: center;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28);
  padding: 6px 13px; border-radius: 100px; font-size: .76rem; font-weight: 600;
}
.banner-chip i { color: var(--accent-light); }
/* decorative gold strip beneath the banner */
.banner-strip { height: 6px; background: linear-gradient(90deg, var(--accent-deep), var(--accent-light) 40%, var(--accent) 60%, var(--accent-deep)); }

/* ============ 3. MAIN MENU (sticky) ============ */
.main-menu {
  background: var(--primary-dark);
  position: sticky; top: 0; z-index: 200;
  box-shadow: var(--shadow-sm);
}
.main-menu.scrolled { box-shadow: var(--shadow-md); }
.menu-bar { display: flex; align-items: center; }
.main-nav { flex: 1; }
.main-nav > ul { display: flex; align-items: stretch; flex-wrap: wrap; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a {
  display: flex; align-items: center; gap: 6px; height: 48px; padding: 0 16px;
  color: rgba(255,255,255,.94); font-weight: 600; font-size: .9rem;
  border-right: 1px solid rgba(255,255,255,.08); transition: background var(--t), color var(--t);
}
.main-nav > ul > li:first-child > a { border-left: 1px solid rgba(255,255,255,.08); }
.main-nav > ul > li > a i.home-i { font-size: .95rem; }
.main-nav > ul > li > a:hover,
.main-nav > ul > li.active > a { background: var(--primary); color: #fff; }
.main-nav > ul > li.active > a { box-shadow: inset 0 -3px 0 var(--accent); }
.main-nav .has-dropdown > a::after {
  content: "\f107"; font-family: "Font Awesome 6 Free"; font-weight: 900;
  font-size: .66rem; margin-left: 3px; opacity: .8;
}
.dropdown-menu {
  position: absolute; top: 100%; left: 0; min-width: 232px;
  background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--accent);
  border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow-md);
  padding: 6px; opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity var(--t), transform var(--t), visibility var(--t); z-index: 60;
}
.main-nav .has-dropdown:hover .dropdown-menu,
.main-nav .has-dropdown:focus-within .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu li a {
  display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: var(--radius-sm);
  font-size: .88rem; color: var(--ink); font-weight: 500;
}
.dropdown-menu li a i { color: var(--accent-deep); font-size: .82rem; width: 16px; text-align: center; }
.dropdown-menu li a:hover { background: var(--secondary); color: var(--primary); padding-left: 16px; }

.menu-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 12px 16px; margin-left: auto; }
.menu-toggle span { width: 24px; height: 3px; background: #fff; border-radius: 3px; transition: var(--t); }
.menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.nav-backdrop { display: none; }
.menu-search {
  display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; height: 48px;
  color: rgba(255,255,255,.8); font-size: .82rem; border-left: 1px solid rgba(255,255,255,.08);
}
.menu-search i { color: var(--accent-light); }

/* ============ HERO (photo slideshow — PRESERVED markup hooks) ============ */
.hero { position: relative; color: #fff; overflow: hidden; min-height: 460px; display: flex; align-items: flex-end; }
.hero-slides { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease;
  background-size: cover; background-position: center;
}
.hero-slide.active { opacity: 1; }
.hero-slide.fallback { background: linear-gradient(135deg, var(--primary-deep), var(--primary)); }
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(0deg, rgba(40,7,7,.92) 0%, rgba(60,10,10,.55) 44%, rgba(80,12,12,.12) 100%),
    linear-gradient(105deg, rgba(50,8,8,.55), transparent 60%);
}
.hero .container { position: relative; z-index: 2; padding-top: 40px; padding-bottom: 38px; width: 100%; }
.hero-text { max-width: 700px; }
.hero-badge {
  display: inline-flex; gap: 8px; align-items: center; background: var(--accent);
  color: var(--primary-deep); padding: 6px 14px; border-radius: 100px; font-size: .78rem;
  font-weight: 700; margin-bottom: 16px;
}
.hero-text h1 { color: #fff; font-size: clamp(1.8rem, 4.4vw, 2.9rem); margin-bottom: 14px; text-shadow: 0 3px 18px rgba(0,0,0,.45); }
.hero-text h1 span { color: var(--accent-light); }
.hero-text > p { color: rgba(255,255,255,.95); font-size: clamp(.96rem, 1.4vw, 1.08rem); max-width: 600px; margin-bottom: 22px; text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-dots { position: absolute; bottom: 16px; right: 22px; z-index: 3; display: flex; gap: 8px; }
.hero-dots button { width: 11px; height: 11px; border-radius: 50%; border: 2px solid rgba(255,255,255,.75); background: transparent; cursor: pointer; padding: 0; transition: var(--t); }
.hero-dots button.active { background: var(--accent-light); border-color: var(--accent-light); }

/* ============ Announcement / running notice ============ */
.announcement-bar { background: var(--secondary); border-bottom: 1px solid var(--line); color: var(--primary-dark); overflow: hidden; }
.announcement-inner { display: flex; align-items: center; gap: 12px; min-height: 40px; }
.announcement-label { font-weight: 800; white-space: nowrap; font-size: .82rem; display: inline-flex; gap: 6px; align-items: center; background: var(--primary); color: #fff; padding: 5px 12px; border-radius: 5px; }
.announcement-ticker { overflow: hidden; flex: 1; }
.announcement-ticker p { white-space: nowrap; font-weight: 600; font-size: .86rem; animation: ticker 36s linear infinite; }
@keyframes ticker { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

/* ============ 5. TWO-COLUMN LAYOUT ============ */
.layout {
  display: grid; grid-template-columns: 1fr 332px; gap: 30px;
  max-width: var(--maxw); margin: 0 auto; padding: 30px 18px 16px;
  align-items: start;
}
.layout-main { min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.layout-side { display: flex; flex-direction: column; gap: 22px; position: relative; }

/* Portal section heading: red bar + title, classic look */
.portal-head {
  display: flex; align-items: center; gap: 12px;
  border-bottom: 2px solid var(--primary); padding-bottom: 8px; margin-bottom: 18px;
}
.portal-head h2 {
  font-size: 1.28rem; color: var(--primary); position: relative; padding: 6px 16px;
  background: var(--primary); color: #fff; border-radius: 6px 6px 0 0; margin-bottom: -10px;
  display: inline-flex; align-items: center; gap: 8px;
}
.portal-head h2 i { color: var(--accent-light); font-size: .95em; }
.portal-head .more { margin-left: auto; font-size: .82rem; font-weight: 700; color: var(--primary); display: inline-flex; gap: 5px; align-items: center; }
.portal-head .more:hover { color: var(--accent-deep); gap: 8px; }

/* A generic white portal panel */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); padding: 20px 22px; }

/* ★ FOUNDING FEATURE-DOCUMENT BOX (most prominent) */
.feature-doc {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #fff 0%, var(--secondary) 100%);
  border: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 0;
}
.feature-doc::before {
  content: "\f5dc"; font-family: "Font Awesome 6 Free"; font-weight: 900;
  position: absolute; right: -24px; bottom: -36px; font-size: 12rem; color: rgba(156,27,27,.05); pointer-events: none;
}
.feature-doc-flag {
  display: flex; align-items: center; gap: 9px;
  background: var(--primary); color: #fff; padding: 10px 22px;
  font-weight: 800; font-size: .92rem; letter-spacing: .01em;
}
.feature-doc-flag .star { color: var(--accent-light); font-size: 1.1rem; }
.feature-doc-flag .tag { margin-left: auto; background: var(--accent); color: var(--primary-deep); font-size: .68rem; font-weight: 800; padding: 3px 10px; border-radius: 100px; text-transform: uppercase; letter-spacing: .05em; }
.feature-doc-body { display: grid; grid-template-columns: 150px 1fr; gap: 22px; padding: 22px; position: relative; z-index: 2; }
.feature-doc-thumb {
  position: relative;
}
.feature-doc-thumb img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-md); border: 3px solid #fff; }
.feature-doc-thumb .seal {
  position: absolute; top: -12px; right: -12px; width: 64px; height: 64px; border-radius: 50%;
  background: var(--accent); color: var(--primary-deep); display: grid; place-items: center; text-align: center;
  font-weight: 800; font-size: .56rem; line-height: 1.15; border: 3px solid #fff; box-shadow: var(--shadow-sm); padding: 5px;
}
.feature-doc-content h3 { font-size: 1.32rem; color: var(--primary-dark); margin-bottom: 8px; line-height: 1.25; }
.feature-doc-content > p { color: var(--muted); font-size: .92rem; margin-bottom: 14px; }
.doc-meta { display: grid; gap: 8px; margin-bottom: 16px; }
.doc-meta .row { display: flex; gap: 10px; font-size: .88rem; align-items: baseline; }
.doc-meta .row .k { flex: 0 0 96px; color: var(--primary); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
.doc-meta .row .v { font-weight: 600; color: var(--ink); }
.feature-doc-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ★ NON-PROFIT HIGHLIGHT BAND (prominent) */
.nonprofit-band {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--primary) 0%, var(--primary-deep) 100%);
  color: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  padding: 24px 26px; border-left: 6px solid var(--accent);
}
.nonprofit-band::after {
  content: "\f4be"; font-family: "Font Awesome 6 Free"; font-weight: 900;
  position: absolute; right: -10px; top: -22px; font-size: 9rem; color: rgba(255,255,255,.06); pointer-events: none;
}
.nonprofit-band .np-flag { display: inline-flex; gap: 8px; align-items: center; color: var(--accent-light); font-weight: 800; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.nonprofit-band h2 { color: #fff; font-size: 1.5rem; margin-bottom: 10px; position: relative; z-index: 2; }
.nonprofit-band h2 .accent { color: var(--accent-light); }
.nonprofit-band > p { color: rgba(255,255,255,.93); font-size: .95rem; max-width: 760px; margin-bottom: 16px; position: relative; z-index: 2; }
.np-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; position: relative; z-index: 2; }
.np-point { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: var(--radius); padding: 14px 14px; display: flex; gap: 11px; align-items: flex-start; }
.np-point i { color: var(--accent-light); font-size: 1.25rem; margin-top: 2px; }
.np-point p { font-size: .85rem; font-weight: 600; color: #fff; line-height: 1.4; }
.nonprofit-band .np-cta { margin-top: 16px; position: relative; z-index: 2; }

/* News list / grid */
.news-list { display: flex; flex-direction: column; }
.news-row {
  display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 16px 0;
  border-bottom: 1px dashed var(--line);
}
.news-row:first-child { padding-top: 4px; }
.news-row:last-child { border-bottom: 0; }
.news-row .thumb { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; box-shadow: var(--shadow-xs); }
.news-row .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.news-row:hover .thumb img { transform: scale(1.06); }
.news-row .thumb .cat { position: absolute; left: 8px; top: 8px; background: var(--primary); color: #fff; font-size: .64rem; font-weight: 700; padding: 3px 9px; border-radius: 100px; }
.news-row .info h3 { font-size: 1.06rem; font-family: var(--sans); font-weight: 700; line-height: 1.35; margin-bottom: 6px; }
.news-row .info h3 a { color: var(--ink); }
.news-row .info h3 a:hover { color: var(--primary); }
.news-row .info .date { font-size: .78rem; color: var(--accent-deep); font-weight: 700; display: inline-flex; gap: 6px; align-items: center; margin-bottom: 7px; }
.news-row .info p { font-size: .88rem; color: var(--muted); }
.news-row .info .rm { font-size: .82rem; font-weight: 700; color: var(--primary); display: inline-flex; gap: 5px; align-items: center; margin-top: 8px; }
.news-row .info .rm:hover { gap: 9px; }

/* News card grid (used on news page + home grid) */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.news-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-xs); transition: transform var(--t), box-shadow var(--t); display: flex; flex-direction: column; }
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.news-thumb { height: 178px; position: relative; overflow: hidden; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.news-card:hover .news-thumb img { transform: scale(1.07); }
.news-date { position: absolute; top: 10px; left: 10px; background: var(--accent); color: var(--primary-deep); border-radius: 7px; padding: 5px 9px; text-align: center; line-height: 1; z-index: 2; box-shadow: var(--shadow-xs); }
.news-date .d { font-size: 1.05rem; font-weight: 800; font-family: var(--serif); }
.news-date .m { font-size: .58rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; margin-top: 2px; }
.news-cat { position: absolute; bottom: 10px; left: 10px; background: var(--primary); color: #fff; font-weight: 700; padding: 3px 11px; border-radius: 100px; font-size: .68rem; z-index: 2; }
.news-body { padding: 16px 18px; flex: 1; display: flex; flex-direction: column; }
.news-body h3 { font-size: 1.04rem; margin-bottom: 8px; font-family: var(--sans); font-weight: 700; line-height: 1.4; }
.news-body h3 a { color: var(--ink); }
.news-body h3 a:hover { color: var(--primary); }
.news-body p { color: var(--muted); font-size: .88rem; flex: 1; }
.news-readmore { margin-top: 12px; font-weight: 700; color: var(--primary); font-size: .85rem; display: inline-flex; gap: 6px; align-items: center; align-self: flex-start; }
.news-readmore:hover { gap: 10px; color: var(--accent-deep); }

/* Gallery preview / grids */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery-item { position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer; aspect-ratio: 4 / 3; box-shadow: var(--shadow-xs); background: var(--secondary); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item::after {
  content: "\f00e"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: #fff; font-size: 1.3rem;
  position: absolute; inset: 0; display: grid; place-items: center;
  background: linear-gradient(0deg, rgba(94,15,15,.55), rgba(94,15,15,.12));
  opacity: 0; transition: opacity var(--t);
}
.gallery-item:hover::after { opacity: 1; }
.gallery-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px; background: linear-gradient(0deg, rgba(33,24,25,.88), transparent); color: #fff; font-size: .76rem; font-weight: 600; transform: translateY(6px); opacity: 0; transition: var(--t); z-index: 2; }
.gallery-item:hover .gallery-cap { transform: translateY(0); opacity: 1; }

/* Lightbox (PRESERVED hooks) */
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(20,5,5,.92); display: none; align-items: center; justify-content: center; padding: 30px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 80vh; border-radius: 8px; box-shadow: var(--shadow-lg); }
.lightbox figure { margin: 0; text-align: center; }
.lightbox figcaption { color: #fff; margin-top: 14px; font-size: .92rem; opacity: .9; }
.lb-btn { position: absolute; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); color: #fff; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; font-size: 1.2rem; display: grid; place-items: center; transition: var(--t); }
.lb-btn:hover { background: var(--accent); color: var(--primary-deep); border-color: var(--accent); }
.lb-close { top: 22px; right: 22px; }
.lb-prev { left: 22px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 22px; top: 50%; transform: translateY(-50%); }

/* ============ SIDEBAR boxes ============ */
.side-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-xs); }
.side-box-head { background: var(--primary); color: #fff; padding: 10px 16px; font-weight: 800; font-size: .92rem; display: flex; align-items: center; gap: 8px; }
.side-box-head i { color: var(--accent-light); }
.side-box-body { padding: 14px 16px; }

/* ★ Sidebar emphasis variant for founding & non-profit */
.side-box.feature-side { border: 2px solid var(--accent); box-shadow: var(--shadow-sm); }
.side-box.feature-side .side-box-head { background: linear-gradient(100deg, var(--primary), var(--primary-deep)); }
.side-feature {
  display: block; padding: 16px; text-align: center; color: var(--primary-dark);
  background: linear-gradient(160deg, #fff, var(--secondary));
}
.side-feature .star { color: var(--accent); font-size: 1.4rem; margin-bottom: 6px; }
.side-feature h4 { font-size: 1.04rem; color: var(--primary-dark); margin-bottom: 5px; font-family: var(--sans); }
.side-feature p { font-size: .82rem; color: var(--muted); margin-bottom: 12px; }

/* notice/document list */
.notice-list li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); align-items: flex-start; }
.notice-list li:last-child { border-bottom: 0; }
.notice-list li .ni { color: var(--accent-deep); margin-top: 3px; font-size: .8rem; }
.notice-list li .nt { font-size: .88rem; font-weight: 600; color: var(--ink); line-height: 1.4; }
.notice-list li a.nt:hover { color: var(--primary); }
.notice-list li .nd { font-size: .74rem; color: var(--muted); margin-top: 2px; }

/* useful links */
.link-list li { border-bottom: 1px solid var(--line-soft); }
.link-list li:last-child { border-bottom: 0; }
.link-list li a { display: flex; align-items: center; gap: 9px; padding: 9px 0; font-size: .88rem; color: var(--ink); font-weight: 500; }
.link-list li a i { color: var(--primary); width: 18px; text-align: center; }
.link-list li a:hover { color: var(--primary); padding-left: 4px; }

/* visit counter (decorative) */
.counter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.counter-cell { background: var(--secondary); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 10px; text-align: center; }
.counter-cell .cn { font-family: var(--serif); font-weight: 800; color: var(--primary); font-size: 1.3rem; line-height: 1; }
.counter-cell .cl { font-size: .7rem; color: var(--muted); margin-top: 5px; }
.counter-online { margin-top: 12px; text-align: center; font-size: .82rem; color: var(--muted); }
.counter-online b { color: var(--ok); }

/* Quick-link tiles row (under hero, optional) */
.quicklinks { padding: 0 18px; max-width: var(--maxw); margin: 22px auto 0; }
.quicklinks-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.ql-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 16px;
  display: flex; align-items: center; gap: 13px; box-shadow: var(--shadow-xs);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.ql-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.ql-icon { width: 46px; height: 46px; flex: 0 0 46px; border-radius: var(--radius); display: grid; place-items: center; font-size: 1.2rem; background: var(--secondary); color: var(--primary); }
.ql-card h3 { font-size: .96rem; font-family: var(--sans); font-weight: 700; line-height: 1.2; }
.ql-card p { font-size: .76rem; color: var(--muted); margin-top: 2px; }

/* ============ Stats band ============ */
.stats-band { background: var(--primary-dark); color: #fff; padding: 36px 0; position: relative; overflow: hidden; }
.stats-band::after { content: ""; position: absolute; inset: 0; opacity: .07; background-image: radial-gradient(rgba(255,255,255,.8) 1.3px, transparent 1.3px); background-size: 24px 24px; }
.stats-band .container { position: relative; z-index: 2; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat-item { text-align: center; padding: 8px; }
.stat-item .stat-icon { font-size: 1.5rem; color: var(--accent-light); margin-bottom: 8px; }
.stat-item .stat-number { font-family: var(--serif); font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 800; color: #fff; line-height: 1; }
.stat-item .stat-suffix { color: var(--accent-light); }
.stat-item .stat-label { font-size: .84rem; color: rgba(255,255,255,.88); margin-top: 6px; }

/* ============ Sub-page hero (compact) ============ */
.page-hero { background: linear-gradient(120deg, var(--primary), var(--primary-deep)); color: #fff; padding: 30px 0; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; inset: 0; opacity: .08; background-image: radial-gradient(rgba(255,255,255,.7) 1px, transparent 1px); background-size: 22px 22px; }
.page-hero::before { content: ""; position: absolute; right: -50px; top: -50px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(201,162,39,.3), transparent 70%); }
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { color: #fff; margin-bottom: 6px; }
.page-hero p { color: rgba(255,255,255,.9); max-width: 700px; font-size: .96rem; }
.breadcrumb { font-size: .82rem; color: rgba(255,255,255,.82); margin-bottom: 12px; }
.breadcrumb a { color: var(--accent-light); }

/* ============ Page sections wrapper ============ */
.section { padding: 34px 0; }
.section-soft { background: var(--bg-soft); }
.eyebrow { display: inline-block; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .7rem; color: var(--accent-deep); background: var(--secondary); padding: 5px 13px; border-radius: 100px; margin-bottom: 12px; }
.section-head { max-width: 760px; margin: 0 auto 28px; text-align: center; }
.section-head h2 { margin-bottom: 8px; }
.section-head h2 .accent { color: var(--primary); }
.section-head p { color: var(--muted); font-size: .96rem; }

/* ============ Content / prose ============ */
.prose { max-width: 100%; }
.prose h2 { margin: 26px 0 12px; color: var(--primary-dark); }
.prose h3 { margin: 20px 0 9px; color: var(--primary); }
.prose p { color: var(--ink); margin-bottom: 12px; }
.prose ul.bullets { margin: 10px 0 16px; display: grid; gap: 9px; }
.prose ul.bullets li { display: flex; gap: 10px; align-items: flex-start; }
.prose ul.bullets li i { color: var(--accent-deep); margin-top: 5px; }

.info-box { background: var(--secondary); border-left: 5px solid var(--primary); border-radius: 0 var(--radius) var(--radius) 0; padding: 16px 20px; margin: 18px 0; }
.info-box .label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--primary); font-weight: 800; }

.info-table { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 20px 0; }
.info-row { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-xs); }
.info-row .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.info-row .v { font-weight: 600; color: var(--ink); margin-top: 4px; }

/* PDF viewer (PRESERVED) */
.pdf-frame { width: 100%; height: 720px; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); background: #fff; }
.pdf-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 6px; }
.pdf-note { font-size: .86rem; color: var(--muted); background: var(--bg-soft); border: 1px dashed var(--line); border-radius: var(--radius); padding: 12px 16px; margin-top: 14px; }

/* generic cards */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.info-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 20px; box-shadow: var(--shadow-xs); transition: transform var(--t), box-shadow var(--t); }
.info-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.info-card .ic { width: 50px; height: 50px; border-radius: var(--radius); display: grid; place-items: center; background: var(--secondary); color: var(--primary); font-size: 1.3rem; margin-bottom: 14px; }
.info-card h3 { font-size: 1.06rem; margin-bottom: 7px; font-family: var(--sans); font-weight: 700; }
.info-card p { color: var(--muted); font-size: .9rem; }

/* leader card */
.leader-card { display: grid; grid-template-columns: 200px 1fr; gap: 26px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-xs); }
.leader-card .leader-photo { width: 100%; aspect-ratio: 1; border-radius: var(--radius); object-fit: cover; box-shadow: var(--shadow-sm); }
.leader-card .leader-role { color: var(--accent-deep); font-weight: 700; text-transform: uppercase; letter-spacing: .07em; font-size: .76rem; }
.leader-card blockquote { font-family: var(--serif); font-size: 1.12rem; color: var(--primary-dark); margin: 8px 0 0; line-height: 1.5; font-weight: 600; }

/* doc/download table (tai-lieu, cong-khai) */
.doc-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-xs); font-size: .9rem; }
.doc-table th { background: var(--primary); color: #fff; text-align: left; padding: 11px 14px; font-weight: 700; font-size: .82rem; }
.doc-table td { padding: 11px 14px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
.doc-table tr:hover td { background: var(--bg-soft); }
.doc-table .dl { color: var(--primary); font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }
.doc-table .badge { background: var(--secondary); color: var(--primary); font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 100px; }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 32px; align-items: start; }
.contact-info .ci-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-info .ci-item .ic { width: 44px; height: 44px; flex: 0 0 44px; border-radius: var(--radius); display: grid; place-items: center; background: var(--secondary); color: var(--primary); font-size: 1.1rem; }
.contact-info .ci-item .k { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.contact-info .ci-item .v { font-weight: 600; }
.contact-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-xs); }
.form-row { margin-bottom: 15px; }
.form-row label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.form-row input, .form-row textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; font-size: .92rem; background: var(--bg-soft); transition: border var(--t), box-shadow var(--t);
}
.form-row input:focus, .form-row textarea:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(156,27,27,.12); background: #fff; }
.form-row textarea { min-height: 120px; resize: vertical; }
.map-embed { border-radius: var(--radius); overflow: hidden; min-height: 220px; background: var(--secondary); display: grid; place-items: center; color: var(--primary); border: 1px solid var(--line); margin-top: 24px; text-align: center; padding: 26px; }

/* ============ Image placeholder (onerror fallback, PRESERVED hooks) ============ */
.img-ph { position: relative; background: linear-gradient(135deg, var(--primary), var(--primary-deep)) !important; display: grid !important; place-items: center; overflow: hidden; min-height: 100%; }
.img-ph::before { content: ""; position: absolute; inset: 0; opacity: .12; background-image: radial-gradient(rgba(255,255,255,.7) 1.3px, transparent 1.3px); background-size: 18px 18px; }
.img-ph-inner { position: relative; z-index: 2; text-align: center; color: rgba(255,255,255,.92); padding: 14px; }
.img-ph-inner i { font-size: 1.7rem; color: var(--accent-light); margin-bottom: 7px; display: block; }
.img-ph-inner .t { font-size: .76rem; font-weight: 600; line-height: 1.35; }
.img-ph.gold { background: linear-gradient(135deg, var(--accent-deep), var(--accent)) !important; }
.img-ph.gold .img-ph-inner { color: var(--primary-deep); }
.img-ph.gold .img-ph-inner i { color: var(--primary-deep); }

/* ============ CTA strip ============ */
.cta { background: linear-gradient(120deg, var(--primary), var(--primary-deep)); color: #fff; text-align: center; position: relative; overflow: hidden; }
.cta::after { content: ""; position: absolute; inset: 0; opacity: .08; background-image: radial-gradient(rgba(255,255,255,.7) 1.3px, transparent 1.3px); background-size: 24px 24px; }
.cta .container { position: relative; z-index: 2; }
.cta h2 { color: #fff; margin-bottom: 12px; }
.cta p { color: rgba(255,255,255,.92); max-width: 640px; margin: 0 auto 20px; font-size: .96rem; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============ 6. FOOTER ============ */
.site-footer { background: var(--primary-deep); color: rgba(255,255,255,.82); padding: 0; border-top: 5px solid var(--accent); }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.2fr; gap: 32px; padding: 42px 0 34px; }
.footer-brand .fb-logo { display: flex; gap: 11px; align-items: center; margin-bottom: 13px; }
.footer-brand .fb-logo .logo-icon { width: 46px; height: 46px; flex: 0 0 46px; }
.footer-brand .fb-logo .nm { font-family: var(--serif); font-weight: 800; color: #fff; font-size: 1.02rem; line-height: 1.2; }
.footer-brand p { font-size: .88rem; }
.footer-badge { display: inline-flex; gap: 8px; align-items: center; margin-top: 14px; background: rgba(201,162,39,.16); border: 1px solid rgba(201,162,39,.4); color: var(--accent-light); padding: 7px 14px; border-radius: 100px; font-size: .8rem; font-weight: 700; }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: .96rem; margin-bottom: 15px; position: relative; padding-bottom: 8px; }
.site-footer h4::after { content: ""; position: absolute; left: 0; bottom: 0; width: 32px; height: 2px; background: var(--accent); }
.footer-links li { margin-bottom: 9px; }
.footer-links a { color: rgba(255,255,255,.78); font-size: .88rem; display: inline-flex; gap: 7px; align-items: center; }
.footer-links a::before { content: "\f105"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: .7rem; color: var(--accent); }
.footer-links a:hover { color: var(--accent-light); padding-left: 3px; }
.footer-contact li { display: flex; gap: 10px; margin-bottom: 11px; font-size: .88rem; align-items: flex-start; }
.footer-contact li i { color: var(--accent-light); margin-top: 4px; }
.footer-contact a { color: rgba(255,255,255,.82); }
.footer-contact a:hover { color: var(--accent-light); }
.footer-resp { background: rgba(0,0,0,.18); border-top: 1px solid rgba(255,255,255,.1); padding: 14px 0; font-size: .84rem; }
.footer-resp .container { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.footer-resp i { color: var(--accent-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 16px 0; font-size: .82rem; }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-bottom .resp { color: rgba(255,255,255,.6); }

/* ============ Back to top ============ */
.back-to-top { position: fixed; right: 18px; bottom: 18px; width: 46px; height: 46px; border-radius: 50%; background: var(--primary); color: #fff; border: 0; cursor: pointer; display: grid; place-items: center; font-size: 1.05rem; box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(10px); transition: all var(--t); z-index: 300; }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* ============ Reveal animation ============ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .layout { grid-template-columns: 1fr; }
  .layout-side { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .quicklinks-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid, .card-grid, .card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-grid, .intro-grid { grid-template-columns: 1fr; }
  .np-points { grid-template-columns: 1fr; }
  .leader-card { grid-template-columns: 1fr; text-align: center; }
  .leader-card .leader-photo { max-width: 200px; margin: 0 auto; }
}

@media (max-width: 860px) {
  .menu-toggle { display: flex; }
  .menu-search { display: none; }
  .main-nav {
    position: fixed; top: 0; right: -100%; width: 84%; max-width: 340px; height: 100vh;
    background: var(--primary-dark); box-shadow: var(--shadow-lg); padding: 18px 12px 30px; overflow-y: auto;
    transition: right var(--t); z-index: 250;
  }
  .main-nav.open { right: 0; }
  .nav-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(33,24,25,.55); z-index: 240; }
  .main-nav > ul { flex-direction: column; align-items: stretch; }
  .main-nav > ul > li > a { height: auto; padding: 13px 14px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .main-nav > ul > li:first-child > a { border-left: 0; }
  .main-nav > ul > li.active > a { box-shadow: inset 4px 0 0 var(--accent); }
  .main-nav .has-dropdown > a::after { margin-left: auto; }
  .dropdown-menu {
    position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
    border: 0; border-top: 0; border-radius: 0; padding: 0; min-width: 0; background: rgba(0,0,0,.18);
    max-height: 0; overflow: hidden; transition: max-height var(--t);
  }
  .main-nav .has-dropdown.open .dropdown-menu { max-height: 600px; }
  .dropdown-menu li a { color: rgba(255,255,255,.9); padding: 11px 16px 11px 30px; }
  .dropdown-menu li a i { color: var(--accent-light); }
  .dropdown-menu li a:hover { background: rgba(255,255,255,.08); color: #fff; }
}

@media (max-width: 700px) {
  .section { padding: 26px 0; }
  .layout-side { grid-template-columns: 1fr; }
  .banner-inner { gap: 13px; padding: 16px 0 14px; }
  .banner-logo { width: 60px; height: 60px; flex-basis: 60px; }
  .banner-image-inner { padding: 0; }
  .banner-emblem { display: none; }
  .quicklinks-grid, .stats-grid, .news-grid, .card-grid, .card-grid.cols-2, .info-table, .info-table { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .top-bar .container { justify-content: center; text-align: center; }
  .top-bar-left { display: none; }
  .feature-doc-body { grid-template-columns: 1fr; }
  .feature-doc-thumb { max-width: 180px; margin: 0 auto; }
  .news-row { grid-template-columns: 110px 1fr; gap: 12px; }
  .pdf-frame { height: 500px; }
  .doc-table { font-size: .82rem; }
  .doc-table th, .doc-table td { padding: 8px 10px; }
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
}

@media (max-width: 460px) {
  .top-bar-right { font-size: .76rem; }
  .gallery-grid { grid-template-columns: 1fr; }
  .news-row { grid-template-columns: 1fr; }
  .news-row .thumb { max-height: 200px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .announcement-ticker p { animation: none; }
  .reveal { opacity: 1; transform: none; }
}
