/* ==========================================================================
   UPTD SDN 77 SALOTENGNGA — Frontend stylesheet
   Mobile-first, tanpa framework. Palet & token sesuai identitas visual.
   ========================================================================== */
:root {
  --primary: #2563EB;
  --primary-600: #1D4ED8;
  --primary-50: #EFF6FF;
  --primary-100: #DBEAFE;
  --navy: #0F172A;
  --bg: #FFFFFF;
  --soft: #F8FAFC;
  --accent: #FACC15;
  --accent-soft: #FEF9C3;
  --text: #1E293B;
  --muted: #64748B;
  --border: #E2E8F0;
  --success: #16A34A;
  --danger: #DC2626;
  --radius-sm: 14px;
  --radius: 18px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 4px 6px -2px rgba(15, 23, 42, .04), 0 12px 24px -8px rgba(15, 23, 42, .08);
  --shadow-lg: 0 24px 48px -16px rgba(15, 23, 42, .16);
  --font-head: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --nav-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-body); font-size: 16px; line-height: 1.65;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-600); }
h1, h2, h3, h4, h5 { font-family: var(--font-head); color: var(--navy); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; font-weight: 700; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid rgba(37, 99, 235, .45); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; }
.skip-link:focus { top: 12px; color: #fff; }
.icon { width: 1.15em; height: 1.15em; stroke-width: 2; flex-shrink: 0; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px) { .container { padding: 0 32px; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .75rem 1.4rem; border-radius: 14px; border: 1px solid transparent;
  font-family: var(--font-head); font-weight: 600; font-size: .95rem; line-height: 1.2; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s, background-color .2s, color .2s, border-color .2s; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px -8px rgba(37, 99, 235, .55); }
.btn-primary:hover { background: var(--primary-600); color: #fff; }
.btn-outline { background: #fff; color: var(--navy); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-soft { background: var(--primary-50); color: var(--primary); }
.btn-soft:hover { background: var(--primary-100); color: var(--primary-600); }
.btn-sm { min-height: 40px; padding: .5rem 1rem; font-size: .875rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .7; pointer-events: none; }
.btn.is-loading::before { content: ''; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.badge { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .8rem; border-radius: 999px; font-size: .75rem; font-weight: 600; letter-spacing: .02em; background: var(--primary-50); color: var(--primary); }
.badge-accent { background: var(--accent-soft); color: #854D0E; }
.badge-dark { background: rgba(15, 23, 42, .75); color: #fff; backdrop-filter: blur(6px); }

/* ---------- Navbar ---------- */
.navbar { position: sticky; top: 0; z-index: 100; height: var(--nav-h); background: rgba(255, 255, 255, .7); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid transparent; transition: background-color .3s, border-color .3s, box-shadow .3s; }
.navbar.is-scrolled, .navbar.is-solid { background: rgba(255, 255, 255, .96); border-bottom-color: var(--border); box-shadow: 0 6px 20px -12px rgba(15, 23, 42, .15); }
.navbar .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--navy); min-width: 0; }
.brand:hover { color: var(--navy); }
.brand-logo { width: 44px; height: 44px; border-radius: 12px; object-fit: contain; flex-shrink: 0; }
.brand-mark { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary); color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 1rem; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text small { font-size: .68rem; font-weight: 600; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.brand-text strong { font-family: var(--font-head); font-size: .95rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-menu { display: none; }
.nav-actions { display: none; }
.nav-toggle { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--border); background: #fff; cursor: pointer; color: var(--navy); }

@media (min-width: 1080px) {
  .nav-toggle { display: none; }
  .nav-menu { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
  .nav-menu a { position: relative; display: block; padding: .55rem .8rem; border-radius: 10px; color: var(--text); font-weight: 500; font-size: .93rem; }
  .nav-menu a:hover { color: var(--primary); background: var(--primary-50); }
  .nav-menu a.active { color: var(--primary); font-weight: 600; }
  .nav-menu a.active::after { content: ''; position: absolute; left: 50%; bottom: 2px; width: 18px; height: 3px; border-radius: 3px; background: var(--primary); transform: translateX(-50%); }
  .nav-actions { display: flex; }
  .has-dropdown { position: relative; }
  .dropdown { position: absolute; top: calc(100% + 8px); left: 0; min-width: 210px; padding: 8px; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); list-style: none; margin: 0; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s var(--ease); }
  .has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown { opacity: 1; visibility: visible; transform: none; }
  .dropdown a.active::after { display: none; }
  .dropdown-toggle .icon { width: 14px; height: 14px; margin-left: 2px; vertical-align: -2px; }
}

/* Mobile drawer */
.mobile-nav { position: fixed; inset: 0; z-index: 150; visibility: hidden; }
.mobile-nav.open { visibility: visible; }
.mobile-nav-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .4); opacity: 0; transition: opacity .3s; }
.mobile-nav.open .mobile-nav-backdrop { opacity: 1; }
.mobile-nav-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(360px, 88vw); background: #fff; padding: 20px; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .35s var(--ease); overflow-y: auto; }
.mobile-nav.open .mobile-nav-panel { transform: none; }
.mobile-nav-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mobile-nav ul a { display: flex; align-items: center; gap: 12px; padding: 14px 14px; border-radius: 14px; color: var(--text); font-weight: 500; font-size: 1rem; }
.mobile-nav ul a .icon { color: var(--muted); }
.mobile-nav ul a.active, .mobile-nav ul a:hover { background: var(--primary-50); color: var(--primary); }
.mobile-nav ul a.active .icon { color: var(--primary); }
.mobile-nav .btn { margin-top: 20px; }
body.nav-open { overflow: hidden; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-soft { background: var(--soft); }
.section-blue { background: var(--primary-50); }
@media (min-width: 992px) { .section { padding: 104px 0; } }
.section-head { max-width: 680px; margin: 0 auto 44px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); margin-bottom: 12px; }
.eyebrow::before { content: ''; width: 20px; height: 2px; border-radius: 2px; background: var(--accent); }
.section-title { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.section-desc { color: var(--muted); font-size: 1.05rem; margin: 0; }
.section-foot { text-align: center; margin-top: 44px; }

.grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 24px; } .grid-4 { grid-template-columns: repeat(4, 1fr); gap: 24px; } }

.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #CBD5E1; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 40px 0 64px; overflow: hidden; }
.hero::before { content: ''; position: absolute; width: 520px; height: 520px; right: -180px; top: -160px; border-radius: 50%; background: radial-gradient(circle, var(--primary-50) 0%, rgba(239, 246, 255, 0) 70%); z-index: -1; }
.hero::after { content: ''; position: absolute; width: 280px; height: 280px; left: -120px; bottom: -80px; border-radius: 50%; background: radial-gradient(circle, rgba(250, 204, 21, .14) 0%, rgba(250, 204, 21, 0) 70%); z-index: -1; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero-title { font-size: clamp(2rem, 6.4vw, 3.5rem); font-weight: 800; line-height: 1.1; margin: 18px 0; }
.hero-title .hl { color: var(--primary); position: relative; white-space: nowrap; }
.hero-sub { font-size: clamp(1rem, 1.6vw, 1.15rem); color: var(--muted); max-width: 520px; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--border); max-width: 520px; }
.hero-meta strong { display: block; font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; color: var(--navy); line-height: 1.1; }
.hero-meta span { font-size: .82rem; color: var(--muted); }
.hero-visual { position: relative; }
.hero-img { position: relative; aspect-ratio: 4 / 4.2; border-radius: 28px; overflow: hidden; background: var(--primary-50); box-shadow: var(--shadow-lg); }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
.hero-deco { position: absolute; inset: auto -14px -14px auto; width: 60%; height: 60%; border-radius: 28px; background: var(--primary-50); z-index: -1; }
.hero-dots { position: absolute; top: -18px; left: -18px; width: 96px; height: 96px; background-image: radial-gradient(var(--primary-100) 2px, transparent 2px); background-size: 14px 14px; z-index: -1; }
.hero-float { position: absolute; left: -10px; bottom: 28px; display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); max-width: 240px; }
.hero-float .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: #A16207; display: grid; place-items: center; flex-shrink: 0; }
.hero-float strong { display: block; font-family: var(--font-head); font-size: .9rem; color: var(--navy); line-height: 1.2; }
.hero-float span { font-size: .78rem; color: var(--muted); }
.placeholder-visual { width: 100%; height: 100%; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--primary); background: linear-gradient(160deg, var(--primary-50), #fff); }
.placeholder-visual svg { width: 70%; max-width: 280px; height: auto; }
.placeholder-visual p { margin: 12px 0 0; color: var(--muted); font-size: .85rem; }
@media (min-width: 992px) {
  .hero { padding: 64px 0 104px; }
  .hero-grid { grid-template-columns: 1.08fr .92fr; gap: 64px; }
  .hero-float { left: -40px; }
}

/* ---------- Profile ---------- */
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 992px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } .split.reverse > :first-child { order: 2; } }
.photo-stack { position: relative; display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.photo-stack figure { margin: 0; border-radius: var(--radius-lg); overflow: hidden; background: var(--primary-50); }
.photo-stack figure:first-child { aspect-ratio: 3 / 4; grid-row: span 2; }
.photo-stack figure:not(:first-child) { aspect-ratio: 1; }
.photo-stack img { width: 100%; height: 100%; object-fit: cover; }
.photo-stack .exp { display: flex; flex-direction: column; justify-content: center; padding: 20px; background: var(--primary); color: #fff; border-radius: var(--radius-lg); }
.photo-stack .exp strong { font-family: var(--font-head); font-size: 1.15rem; line-height: 1.25; color: #fff; }
.photo-stack .exp span { font-size: .82rem; opacity: .85; }
.info-list { display: grid; gap: 0; margin: 24px 0 0; padding: 0; list-style: none; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; }
.info-list li { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--border); font-size: .93rem; }
.info-list li:last-child { border-bottom: 0; }
.info-list li:nth-child(even) { background: var(--soft); }
.info-list span { color: var(--muted); }
.info-list strong { color: var(--navy); font-weight: 600; word-break: break-word; }
@media (max-width: 420px) { .info-list li { grid-template-columns: 1fr; gap: 2px; } }
.lead { font-size: 1.07rem; color: var(--text); }
.muted { color: var(--muted); }

/* ---------- Principal ---------- */
.principal { display: grid; gap: 32px; align-items: center; padding: 24px; border-radius: 28px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); }
.principal-photo { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius-lg); overflow: hidden; background: var(--primary-50); max-width: 360px; width: 100%; margin: 0 auto; }
.principal-photo img { width: 100%; height: 100%; object-fit: cover; }
.principal-photo .ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--primary); }
.principal-photo .ph .icon { width: 72px; height: 72px; stroke-width: 1.4; }
.principal-quote { position: relative; }
.principal-quote .qicon { width: 48px; height: 48px; color: var(--accent); margin-bottom: 8px; }
.principal-quote blockquote { margin: 0 0 24px; font-size: 1.08rem; color: var(--text); }
.principal-quote blockquote p:last-child { margin-bottom: 0; }
.signature { display: flex; align-items: center; gap: 14px; padding-top: 20px; border-top: 1px dashed var(--border); }
.signature .sig { font-family: 'Brush Script MT', 'Segoe Script', cursive; font-size: 1.9rem; color: var(--primary); line-height: 1; }
.signature strong { display: block; font-family: var(--font-head); color: var(--navy); }
.signature span { font-size: .88rem; color: var(--muted); }
@media (min-width: 900px) { .principal { grid-template-columns: 360px 1fr; gap: 56px; padding: 40px; } }

/* ---------- Vision & Mission ---------- */
.vm-grid { display: grid; gap: 24px; }
@media (min-width: 992px) { .vm-grid { grid-template-columns: 1fr 1.25fr; } }
.vision-card { position: relative; padding: 36px 32px; border-radius: 24px; background: var(--navy); color: #fff; overflow: hidden; }
.vision-card::after { content: ''; position: absolute; right: -60px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%; border: 36px solid rgba(37, 99, 235, .35); }
.vision-card .ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: rgba(250, 204, 21, .15); color: var(--accent); margin-bottom: 24px; }
.vision-card h3 { color: #fff; font-size: 1rem; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.vision-card p { position: relative; z-index: 1; font-family: var(--font-head); font-size: clamp(1.25rem, 2.4vw, 1.6rem); font-weight: 700; line-height: 1.4; margin: 0; }
.mission-list { display: grid; gap: 12px; list-style: none; padding: 0; margin: 0; counter-reset: m; }
.mission-list li { counter-increment: m; display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.mission-list li::before { content: counter(m, decimal-leading-zero); flex-shrink: 0; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--primary-50); color: var(--primary); font-family: var(--font-head); font-weight: 800; font-size: .9rem; }
.mission-list li p { margin: 8px 0 0; }

/* ---------- Stats ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 992px) { .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 24px; } }
.stat-card { padding: 24px 20px; text-align: left; }
.stat-card .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); margin-bottom: 16px; }
.stat-card:nth-child(2) .ic { background: var(--accent-soft); color: #A16207; }
.stat-card .num { font-family: var(--font-head); font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 800; color: var(--navy); line-height: 1; letter-spacing: -.03em; }
.stat-card .lbl { color: var(--muted); font-size: .9rem; margin-top: 6px; }

/* ---------- Programs ---------- */
.program-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; color: inherit; }
.program-card:hover { color: inherit; }
.program-card .media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--primary-50); }
.program-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.program-card:hover .media img { transform: scale(1.04); }
.program-card .body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.program-card .ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); transition: background .3s, color .3s; }
.program-card:hover .ic { background: var(--primary); color: #fff; }
.program-card .ic .icon { width: 24px; height: 24px; }
.program-card h3 { font-size: 1.15rem; margin: 6px 0 0; }
.program-card p { color: var(--muted); font-size: .95rem; margin: 0; }
.program-card .more { margin-top: auto; padding-top: 8px; font-weight: 600; font-size: .9rem; color: var(--primary); display: inline-flex; align-items: center; gap: 6px; }

/* ---------- News ---------- */
.news-card { display: flex; flex-direction: column; overflow: hidden; height: 100%; }
.news-card .media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--primary-50); }
.news-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.news-card:hover .media img { transform: scale(1.04); }
.news-card .media .badge { position: absolute; top: 14px; left: 14px; }
.news-card .body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.news-card .meta { display: flex; align-items: center; gap: 14px; font-size: .82rem; color: var(--muted); margin-bottom: 10px; flex-wrap: wrap; }
.news-card .meta span { display: inline-flex; align-items: center; gap: 6px; }
.news-card h3 { font-size: 1.1rem; line-height: 1.4; margin-bottom: 10px; }
.news-card h3 a { color: var(--navy); }
.news-card h3 a:hover { color: var(--primary); }
.news-card p { color: var(--muted); font-size: .93rem; margin-bottom: 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.read-more { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; }
.read-more .icon { transition: transform .2s; }
.read-more:hover .icon { transform: translateX(3px); }
.media-ph { width: 100%; height: 100%; display: grid; place-items: center; color: #93C5FD; }
.media-ph .icon { width: 40px; height: 40px; stroke-width: 1.5; }

.news-featured { display: grid; overflow: hidden; margin-bottom: 28px; }
.news-featured .media { aspect-ratio: 16 / 9; }
@media (min-width: 900px) { .news-featured { grid-template-columns: 1.2fr 1fr; } .news-featured .media { aspect-ratio: auto; min-height: 340px; } .news-featured .body { padding: 40px; justify-content: center; } .news-featured h3 { font-size: 1.6rem; } }

/* Toolbar: search & filters */
.toolbar { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
@media (min-width: 900px) { .toolbar { flex-direction: row; align-items: center; justify-content: space-between; } }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--text); font-size: .88rem; font-weight: 500; transition: .2s; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.search-box { position: relative; width: 100%; }
@media (min-width: 900px) { .search-box { max-width: 320px; } }
.search-box .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-box input { width: 100%; height: 48px; padding: 0 16px 0 46px; border-radius: 14px; border: 1px solid var(--border); background: #fff; transition: border-color .2s, box-shadow .2s; }
.search-box input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }

/* Article */
.article-wrap { display: grid; gap: 40px; }
@media (min-width: 1024px) { .article-wrap { grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; } }
.article-head .meta { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: .9rem; margin: 16px 0 24px; }
.article-head .meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-title { font-size: clamp(1.75rem, 4vw, 2.6rem); font-weight: 800; }
.article-cover { border-radius: var(--radius-lg); overflow: hidden; margin: 0 0 32px; background: var(--primary-50); }
.article-cover img { width: 100%; max-height: 520px; object-fit: cover; }
.prose { font-size: 1.05rem; line-height: 1.8; color: #334155; overflow-wrap: anywhere; }
.prose h2 { font-size: 1.5rem; margin: 1.6em 0 .6em; }
.prose h3 { font-size: 1.25rem; margin: 1.4em 0 .5em; }
.prose img { border-radius: var(--radius-sm); margin: 1.4em 0; }
.prose blockquote { margin: 1.5em 0; padding: 16px 22px; border-left: 4px solid var(--primary); background: var(--primary-50); border-radius: 0 14px 14px 0; color: var(--navy); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
.prose th { background: var(--soft); }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius-sm); height: auto; }
.share { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--border); }
.share strong { font-family: var(--font-head); color: var(--navy); margin-right: 6px; }
.share a, .share button { width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--border); background: #fff; color: var(--text); cursor: pointer; transition: .2s; }
.share a:hover, .share button:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.sidebar-card { padding: 24px; position: sticky; top: calc(var(--nav-h) + 24px); }
.sidebar-card h3 { font-size: 1.05rem; margin-bottom: 16px; }
.mini-news { display: grid; gap: 16px; }
.mini-news a { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: center; color: var(--navy); }
.mini-news .th { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--primary-50); }
.mini-news .th img { width: 100%; height: 100%; object-fit: cover; }
.mini-news strong { font-family: var(--font-head); font-size: .92rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini-news span { font-size: .78rem; color: var(--muted); }
.mini-news a:hover strong { color: var(--primary); }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 768px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1100px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }
.gallery-item { position: relative; display: block; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--primary-50); cursor: zoom-in; border: 0; padding: 0; width: 100%; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.gallery-item::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(15, 23, 42, .7)); opacity: 0; transition: opacity .3s; }
.gallery-item .cap { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 1; color: #fff; text-align: left; font-size: .85rem; font-weight: 600; line-height: 1.3; opacity: 0; transform: translateY(6px); transition: .3s var(--ease); }
.gallery-item .cap small { display: block; font-weight: 400; opacity: .85; font-size: .75rem; }
.gallery-item:hover img, .gallery-item:focus-visible img { transform: scale(1.05); }
.gallery-item:hover::after, .gallery-item:hover .cap, .gallery-item:focus-visible::after, .gallery-item:focus-visible .cap { opacity: 1; transform: none; }
@media (hover: none) { .gallery-item::after, .gallery-item .cap { opacity: 1; transform: none; } }
.gallery-home .gallery-item:first-child { grid-column: span 2; grid-row: span 2; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center; background: rgba(2, 6, 23, .92); padding: 64px 16px 96px; }
.lightbox.open { display: flex; animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.lightbox figure { margin: 0; max-width: 1100px; width: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-height: calc(100vh - 220px); width: auto; max-width: 100%; border-radius: 12px; object-fit: contain; }
.lightbox figcaption { color: #E2E8F0; text-align: center; margin-top: 16px; max-width: 720px; font-size: .95rem; }
.lightbox figcaption strong { display: block; color: #fff; font-family: var(--font-head); font-size: 1.05rem; }
.lb-btn { position: absolute; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; transition: background .2s; }
.lb-btn:hover { background: rgba(255, 255, 255, .25); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; top: 28px; left: 24px; color: #CBD5E1; font-size: .9rem; }
@media (max-width: 640px) { .lb-prev, .lb-next { top: auto; bottom: 24px; transform: none; } .lb-prev { left: calc(50% - 60px); } .lb-next { right: calc(50% - 60px); } }

/* ---------- Achievements ---------- */
.ach-card { overflow: hidden; display: flex; flex-direction: column; height: 100%; }
.ach-card .media { position: relative; aspect-ratio: 16 / 10; background: var(--accent-soft); overflow: hidden; }
.ach-card .media img { width: 100%; height: 100%; object-fit: cover; }
.ach-card .media .media-ph { color: #EAB308; }
.ach-card .rank { position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--accent); color: var(--navy); font-weight: 700; font-size: .8rem; box-shadow: 0 6px 16px -6px rgba(202, 138, 4, .6); }
.ach-card .body { padding: 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ach-card .tags { display: flex; gap: 8px; flex-wrap: wrap; }
.ach-card h3 { font-size: 1.08rem; line-height: 1.4; margin: 4px 0 0; }
.ach-card .who { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: .92rem; font-weight: 500; }
.ach-card .who .icon { color: var(--primary); }
.ach-card p { color: var(--muted); font-size: .9rem; margin: 0; }
.ach-card .date { margin-top: auto; padding-top: 8px; font-size: .82rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }

/* ---------- Teachers ---------- */
.teacher-card { text-align: center; padding: 16px 16px 22px; }
.teacher-card .photo { aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--primary-50); margin-bottom: 16px; }
.teacher-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.teacher-card .photo .media-ph .icon { width: 56px; height: 56px; }
.teacher-card h3 { font-size: 1rem; margin-bottom: 4px; }
.teacher-card .pos { color: var(--primary); font-size: .85rem; font-weight: 600; }
.teacher-card .sub { color: var(--muted); font-size: .82rem; }
.teacher-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 768px) { .teacher-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (min-width: 1100px) { .teacher-grid { grid-template-columns: repeat(4, 1fr); gap: 24px; } }

/* ---------- Page hero / breadcrumb ---------- */
.page-hero { position: relative; padding: 48px 0 44px; background: var(--primary-50); overflow: hidden; }
.page-hero::after { content: ''; position: absolute; right: -80px; top: -80px; width: 300px; height: 300px; border-radius: 50%; border: 48px solid rgba(37, 99, 235, .06); }
.page-hero h1 { font-size: clamp(1.8rem, 4.4vw, 2.75rem); font-weight: 800; margin: 12px 0 8px; position: relative; z-index: 1; }
.page-hero p { color: var(--muted); max-width: 640px; margin: 0; position: relative; z-index: 1; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; list-style: none; padding: 0; margin: 0; font-size: .85rem; color: var(--muted); position: relative; z-index: 1; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb li + li::before { content: '/'; margin-right: 6px; color: #CBD5E1; }
.breadcrumb [aria-current] { color: var(--navy); font-weight: 500; }
@media (min-width: 992px) { .page-hero { padding: 72px 0 64px; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 24px; }
@media (min-width: 992px) { .contact-grid { grid-template-columns: .9fr 1.1fr; gap: 40px; } }
.contact-info { display: grid; gap: 12px; }
.contact-item { display: flex; gap: 16px; padding: 18px 20px; align-items: flex-start; }
.contact-item .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); flex-shrink: 0; }
.contact-item strong { display: block; font-family: var(--font-head); color: var(--navy); font-size: .95rem; }
.contact-item span, .contact-item a { color: var(--muted); font-size: .93rem; word-break: break-word; }
.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.socials a { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--primary-50); color: var(--primary); transition: .2s; }
.socials a:hover { background: var(--primary); color: #fff; }
.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 16 / 10; background: var(--soft); }
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.form-card { padding: 24px; }
@media (min-width: 768px) { .form-card { padding: 36px; } }
.form-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: .88rem; font-weight: 600; color: var(--navy); }
.form-group label .req { color: var(--danger); }
.form-control { width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--border); background: #fff; transition: border-color .2s, box-shadow .2s; font-size: 1rem; }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
textarea.form-control { min-height: 140px; resize: vertical; }
.form-control.is-invalid { border-color: var(--danger); }
.invalid-feedback { color: var(--danger); font-size: .82rem; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 14px; margin-bottom: 20px; font-size: .93rem; }
.alert-success { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; }
.alert-error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }

/* ---------- CTA ---------- */
.cta { position: relative; overflow: hidden; display: grid; gap: 24px; align-items: center; padding: 40px 28px; border-radius: 28px; background: var(--primary); color: #fff; }
.cta::before { content: ''; position: absolute; right: -40px; top: -60px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.cta::after { content: ''; position: absolute; left: 30%; bottom: -100px; width: 200px; height: 200px; border-radius: 50%; background: rgba(250, 204, 21, .18); }
.cta h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 8px; position: relative; z-index: 1; }
.cta p { color: #DBEAFE; margin: 0; position: relative; z-index: 1; }
.cta .actions { display: flex; flex-wrap: wrap; gap: 12px; position: relative; z-index: 1; }
.cta .btn-light { background: #fff; color: var(--primary); }
.cta .btn-light:hover { background: var(--accent); color: var(--navy); }
.cta .btn-ghost { border-color: rgba(255, 255, 255, .4); color: #fff; }
.cta .btn-ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; }
@media (min-width: 900px) { .cta { grid-template-columns: 1fr auto; padding: 56px; } }

/* ---------- Empty, pagination ---------- */
.empty-state { text-align: center; padding: 56px 24px; border: 1px dashed #CBD5E1; border-radius: var(--radius); background: var(--soft); }
.empty-state .ic { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 20px; display: grid; place-items: center; background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
.empty-state .ic .icon { width: 28px; height: 28px; }
.empty-state h3 { font-size: 1.1rem; margin-bottom: 6px; }
.empty-state p { color: var(--muted); margin: 0 auto; max-width: 420px; font-size: .95rem; }
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 44px; list-style: none; padding: 0; }
.pagination a, .pagination span { min-width: 44px; height: 44px; padding: 0 12px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--border); background: #fff; color: var(--text); font-weight: 500; font-size: .92rem; }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .dots { border: 0; background: none; }

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: #94A3B8; padding: 64px 0 0; font-size: .93rem; }
.footer-grid { display: grid; gap: 40px; padding-bottom: 48px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
@media (min-width: 1100px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } }
.footer .brand { color: #fff; margin-bottom: 18px; }
.footer .brand-text small { color: #94A3B8; }
.footer h4 { color: #fff; font-size: .95rem; margin-bottom: 18px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer a { color: #94A3B8; }
.footer a:hover { color: #fff; }
.footer .contact-line { display: flex; gap: 10px; align-items: flex-start; }
.footer .contact-line .icon { color: var(--accent); margin-top: 3px; }
.footer .socials a { background: rgba(255, 255, 255, .06); color: #E2E8F0; }
.footer .socials a:hover { background: var(--primary); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 22px 0; display: flex; flex-direction: column; gap: 8px; justify-content: space-between; font-size: .85rem; }
@media (min-width: 768px) { .footer-bottom { flex-direction: row; } }

/* ---------- Misc ---------- */
.back-to-top { position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 48px; height: 48px; border-radius: 14px; border: 0; background: var(--navy); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(12px); transition: .3s var(--ease); }
.back-to-top.show { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--primary); }
.toast-wrap { position: fixed; top: calc(var(--nav-h) + 12px); right: 16px; left: 16px; z-index: 400; display: grid; gap: 10px; pointer-events: none; }
@media (min-width: 640px) { .toast-wrap { left: auto; width: 380px; } }
.toast { pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: toastIn .35s var(--ease); font-size: .93rem; }
.toast .icon { margin-top: 2px; }
.toast-success .icon { color: var(--success); }
.toast-error .icon, .toast-warning .icon { color: var(--danger); }
.toast.hide { opacity: 0; transform: translateY(-8px); transition: .3s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; } .reveal-d2 { transition-delay: .16s; } .reveal-d3 { transition-delay: .24s; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
img[loading="lazy"] { background: var(--primary-50); }

/* Error page */
.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 64px 20px; }
.error-page .code { font-family: var(--font-head); font-size: clamp(4rem, 14vw, 7rem); font-weight: 800; color: var(--primary); line-height: 1; letter-spacing: -.04em; }
.error-page p { color: var(--muted); max-width: 460px; margin: 8px auto 28px; }
.map-wide { aspect-ratio: 4 / 3; }
@media (min-width: 768px) { .map-wide { aspect-ratio: 21 / 9; } }
