/* =====================================================================
   Public school website – styles (Bootstrap 5 base, no external CDNs)
   ===================================================================== */
:root {
  --brand: #2f5bea;
  --brand-600: #2449c9;
  --brand-700: #1c3aa6;
  --brand-50: #eef3ff;
  --navy: #0e1b45;
  --navy-2: #13245c;
  --gold: #f5b301;
  --ink: #16213b;
  --ink-2: #47526b;
  --muted: #6f7a92;
  --line: #e6e9f2;
  --soft: #f5f7fc;
  --radius: 18px;
  --shadow: 0 2px 6px rgba(16, 24, 40, .04), 0 10px 30px rgba(16, 24, 40, .07);
  --shadow-lg: 0 20px 50px rgba(16, 24, 40, .14);
  --bs-primary: #2f5bea;
  --bs-primary-rgb: 47, 91, 234;
  --bs-link-color: #2f5bea;
  --bs-link-color-rgb: 47, 91, 234;
  --bs-link-hover-color: #1c3aa6;
  --bs-body-font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-color: #16213b;
}
html { scroll-behavior: smooth; }
body.site { background: #fff; color: var(--ink); font-size: 1rem; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; }
h1, h2, h3, h4, h5, h6 { color: var(--ink); font-weight: 750; letter-spacing: -.02em; }
.text-muted { color: var(--muted) !important; }
img { max-width: 100%; }

.btn { border-radius: 12px; font-weight: 600; padding: .62rem 1.25rem; }
.btn-lg { padding: .8rem 1.6rem; font-size: 1.02rem; border-radius: 14px; }
.btn-sm { border-radius: 9px; padding: .35rem .8rem; }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-600); --bs-btn-hover-border-color: var(--brand-600); --bs-btn-active-bg: var(--brand-700); --bs-btn-active-border-color: var(--brand-700); box-shadow: 0 8px 20px rgba(47, 91, 234, .25); }
.btn-gold { background: var(--gold); color: #1b1600; border: 0; box-shadow: 0 8px 20px rgba(245, 179, 1, .3); }
.btn-gold:hover { background: #ffc21a; color: #1b1600; }
.btn-outline-light { border-width: 1.5px; }
.btn-soft { background: var(--brand-50); color: var(--brand); border: 0; }
.btn-soft:hover { background: #dfe7ff; color: var(--brand-700); }

/* ---------- Top bar & navbar ---------- */
.site-topbar { background: var(--navy); color: rgba(255, 255, 255, .78); font-size: .82rem; }
.site-topbar a { color: rgba(255, 255, 255, .85); }
.site-topbar a:hover { color: #fff; }
.site-topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 40px; }
.site-topbar .tb-items { display: flex; gap: 1.3rem; flex-wrap: wrap; }
.site-topbar .bi { color: var(--gold); margin-right: .35rem; }
.social-mini a { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 8px; }
.social-mini a:hover { background: rgba(255, 255, 255, .1); }
.social-mini .bi { color: inherit; margin: 0; }

.site-nav { background: rgba(255, 255, 255, .96); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid transparent; transition: box-shadow .2s, border-color .2s; z-index: 1030; }
.site-nav.scrolled { box-shadow: 0 6px 24px rgba(16, 24, 40, .08); border-bottom-color: var(--line); }
.site-nav .navbar { padding: .7rem 0; }
.brand { display: flex; align-items: center; gap: .7rem; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 46px; height: 46px; border-radius: 14px; background: linear-gradient(135deg, var(--brand), #6a8cff); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; box-shadow: 0 6px 16px rgba(47, 91, 234, .3); }
.brand-logo { width: 46px; height: 46px; object-fit: contain; border-radius: 12px; }
.brand-name { font-weight: 800; font-size: 1.08rem; line-height: 1.1; letter-spacing: -.01em; display: block; }
.brand-tag { font-size: .72rem; color: var(--muted); font-weight: 500; display: block; margin-top: 2px; }
.site-nav .nav-link { color: var(--ink-2); font-weight: 600; font-size: .92rem; padding: .5rem .72rem !important; border-radius: 10px; }
.site-nav .nav-link:hover, .site-nav .nav-link:focus { color: var(--brand); }
.site-nav .nav-link.active { color: var(--brand); background: var(--brand-50); }
.site-nav .dropdown-menu { border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: .45rem; min-width: 220px; }
.site-nav .dropdown-item { border-radius: 9px; padding: .5rem .8rem; font-weight: 500; font-size: .92rem; }
.site-nav .dropdown-item.active, .site-nav .dropdown-item:active { background: var(--brand-50); color: var(--brand); }
.navbar-toggler { border: 0; padding: .4rem .55rem; border-radius: 10px; }
.navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(47, 91, 234, .18); }
@media (max-width: 1199.98px) {
  .site-nav .navbar-collapse { padding: .8rem 0 1rem; max-height: calc(100vh - 80px); overflow-y: auto; }
  .site-nav .nav-link { padding: .65rem .8rem !important; }
  .site-nav .dropdown-menu { box-shadow: none; border: 0; padding-left: 1rem; }
}

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--navy); color: #fff; overflow: hidden; }
.hero .carousel-item { height: clamp(460px, 72vh, 680px); }
.hero .carousel-item img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 20, 55, .88) 0%, rgba(10, 20, 55, .62) 45%, rgba(10, 20, 55, .15) 100%); }
.hero-content { position: absolute; inset: 0; display: flex; align-items: center; }
.hero-content .inner { max-width: 640px; }
.hero h1, .hero .h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.4rem); font-weight: 800; line-height: 1.1; margin-bottom: 1rem; }
.hero p.lead { color: rgba(255, 255, 255, .86); font-size: clamp(1rem, 1.6vw, 1.2rem); margin-bottom: 1.8rem; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: .5rem; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; padding: .35rem .9rem; font-size: .82rem; font-weight: 600; margin-bottom: 1.2rem; backdrop-filter: blur(4px); }
.hero .eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.hero .carousel-indicators { margin-bottom: 5.5rem; justify-content: flex-start; margin-left: max(1rem, calc((100vw - 1296px) / 2 + 12px)); }
.hero .carousel-indicators [data-bs-target] { width: 28px; height: 5px; border-radius: 5px; border: 0; }
.hero .carousel-control-prev, .hero .carousel-control-next { width: 6%; opacity: .6; }
.hero-fallback { min-height: clamp(460px, 70vh, 640px); background: radial-gradient(1000px 500px at 85% 20%, rgba(106, 140, 255, .45), transparent 60%), radial-gradient(700px 400px at 10% 100%, rgba(245, 179, 1, .18), transparent 60%), linear-gradient(135deg, #0e1b45 0%, #1c3aa6 60%, #2f5bea 100%); position: relative; display: flex; align-items: center; }
.hero-fallback::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px); background-size: 22px 22px; }
.hero-fallback .container { position: relative; z-index: 1; }
@media (max-width: 767.98px) {
  .hero .carousel-item { height: 560px; }
  .hero-overlay { background: linear-gradient(180deg, rgba(10, 20, 55, .55) 0%, rgba(10, 20, 55, .88) 70%); }
  .hero-content { align-items: flex-end; padding-bottom: 6.5rem; }
  .hero .carousel-indicators { margin-left: 1rem; margin-bottom: 1.2rem; }
  .hero .carousel-control-prev, .hero .carousel-control-next { display: none; }
}

/* Highlights overlapping the hero */
.highlights { position: relative; z-index: 3; margin-top: -4rem; }
.highlight { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 1.4rem; display: flex; gap: 1rem; align-items: flex-start; height: 100%; border: 1px solid var(--line); }
.highlight .ic { width: 50px; height: 50px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.highlight h6 { margin-bottom: .2rem; font-weight: 750; }
.highlight p { margin: 0; color: var(--muted); font-size: .88rem; }
@media (max-width: 767.98px) { .highlights { margin-top: -2.5rem; } }

.ic-blue { background: #eaf0ff; color: #2f5bea; } .ic-green { background: #e6f7ef; color: #0f9d58; } .ic-amber { background: #fff4e0; color: #d98a00; }
.ic-purple { background: #f1ecff; color: #7048e8; } .ic-teal { background: #e3f7f6; color: #0c9c9c; } .ic-pink { background: #fdebf3; color: #d6336c; } .ic-red { background: #fdecec; color: #d63939; }

/* ---------- Sections ---------- */
.section { padding: 5.5rem 0; }
.section-sm { padding: 3.5rem 0; }
.section-soft { background: var(--soft); }
.section-title { margin-bottom: 2.6rem; }
.section-title .kicker { display: inline-block; color: var(--brand); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: .6rem; }
.section-title h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: .6rem; }
.section-title p { color: var(--muted); max-width: 640px; font-size: 1.04rem; }
.section-title.text-center p { margin-left: auto; margin-right: auto; }
@media (max-width: 767.98px) { .section { padding: 3.8rem 0; } .section-title { margin-bottom: 1.8rem; } }

.about-media { position: relative; }
.about-media img { border-radius: 24px; box-shadow: var(--shadow-lg); width: 100%; aspect-ratio: 4 / 3.3; object-fit: cover; }
.about-media .badge-float { position: absolute; left: -18px; bottom: 28px; background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); padding: 1rem 1.2rem; display: flex; align-items: center; gap: .8rem; }
.about-media .badge-float .n { font-size: 1.7rem; font-weight: 800; color: var(--brand); line-height: 1; }
.about-media .ph { border-radius: 24px; aspect-ratio: 4 / 3.3; background: linear-gradient(135deg, #eaf0ff, #f7f9ff); display: flex; align-items: center; justify-content: center; font-size: 5rem; color: #b8c7f7; }
@media (max-width: 575.98px) { .about-media .badge-float { left: 12px; bottom: 12px; } }
.check-list { list-style: none; padding: 0; margin: 0 0 1.6rem; display: grid; grid-template-columns: 1fr 1fr; gap: .7rem 1rem; }
.check-list li { display: flex; gap: .55rem; align-items: flex-start; font-weight: 550; color: var(--ink-2); font-size: .95rem; }
.check-list .bi { color: #0f9d58; font-size: 1.1rem; margin-top: 1px; }
@media (max-width: 575.98px) { .check-list { grid-template-columns: 1fr; } }

.stats-band { background: linear-gradient(120deg, var(--navy) 0%, var(--brand-700) 55%, var(--brand) 100%); color: #fff; border-radius: 26px; padding: 2.4rem 1.5rem; position: relative; overflow: hidden; }
.stats-band::after { content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .06); }
.stat { text-align: center; position: relative; z-index: 1; }
.stat .n { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; line-height: 1; color: #fff; }
.stat .l { color: rgba(255, 255, 255, .78); font-weight: 500; margin-top: .45rem; font-size: .95rem; }

.principal-card { background: #fff; border-radius: 26px; box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; }
.principal-card .photo { background: linear-gradient(160deg, #eaf0ff, #dfe7ff); height: 100%; min-height: 320px; display: flex; align-items: flex-end; justify-content: center; }
.principal-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.principal-card .body { padding: 2.6rem; }
.principal-card blockquote { font-size: 1.12rem; line-height: 1.75; color: var(--ink-2); position: relative; padding-left: 0; margin: 1rem 0 1.4rem; }
.principal-card .quote-ic { font-size: 3rem; color: var(--brand); opacity: .18; line-height: 1; }
@media (max-width: 767.98px) { .principal-card .body { padding: 1.6rem; } .principal-card .photo { min-height: 260px; } }

.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.7rem; height: 100%; transition: transform .2s, box-shadow .2s, border-color .2s; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.feature .ic { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.55rem; margin-bottom: 1.1rem; }
.feature h5 { font-size: 1.08rem; margin-bottom: .45rem; }
.feature p { color: var(--muted); margin: 0; font-size: .94rem; line-height: 1.6; }

/* Cards: news / events / notices */
.card-news { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; height: 100%; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; color: var(--ink); }
.card-news:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--ink); }
.card-news .thumb { aspect-ratio: 16 / 9; background: linear-gradient(135deg, #eaf0ff, #f5f7fc); overflow: hidden; display: flex; align-items: center; justify-content: center; color: #b8c7f7; font-size: 3rem; }
.card-news .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card-news:hover .thumb img { transform: scale(1.04); }
.card-news .body { padding: 1.3rem 1.35rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.card-news .meta { font-size: .8rem; color: var(--muted); font-weight: 600; margin-bottom: .5rem; }
.card-news h5 { font-size: 1.08rem; line-height: 1.35; margin-bottom: .5rem; }
.card-news p { color: var(--muted); font-size: .92rem; margin-bottom: 1rem; }
.card-news .more { margin-top: auto; font-weight: 650; color: var(--brand); font-size: .9rem; }

.event-row { display: flex; gap: 1rem; align-items: center; padding: 1rem; border-radius: 16px; background: #fff; border: 1px solid var(--line); transition: box-shadow .2s, transform .2s; color: var(--ink); }
.event-row + .event-row { margin-top: .8rem; }
.event-row:hover { box-shadow: var(--shadow); transform: translateX(3px); color: var(--ink); }
.date-box { width: 64px; min-width: 64px; text-align: center; border-radius: 14px; background: var(--brand); color: #fff; padding: .5rem .3rem; line-height: 1.05; }
.date-box .d { font-size: 1.5rem; font-weight: 800; display: block; }
.date-box .m { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .9; }
.date-box.soft { background: var(--brand-50); color: var(--brand); }
.event-row h6 { margin: 0 0 .2rem; font-size: 1rem; }
.event-row .info { font-size: .83rem; color: var(--muted); }

.notice-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); height: 100%; overflow: hidden; }
.notice-panel .head { background: linear-gradient(120deg, var(--navy), var(--brand-700)); color: #fff; padding: 1.1rem 1.35rem; display: flex; align-items: center; justify-content: space-between; }
.notice-panel .head h5 { color: #fff; margin: 0; font-size: 1.05rem; }
.notice-item { display: flex; gap: .9rem; padding: 1rem 1.35rem; border-bottom: 1px solid var(--line); color: var(--ink); }
.notice-item:last-child { border-bottom: 0; }
.notice-item:hover { background: var(--soft); color: var(--ink); }
.notice-item .ni { width: 38px; height: 38px; border-radius: 11px; background: #fff4e0; color: #d98a00; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notice-item .t { font-weight: 650; font-size: .95rem; line-height: 1.35; }
.notice-item .d { font-size: .78rem; color: var(--muted); margin-top: .15rem; }
.notice-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; height: 100%; border-left: 4px solid var(--gold); }
.notice-card .body-text { white-space: pre-line; color: var(--ink-2); line-height: 1.7; }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.gallery-grid .g { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 1 / 1; cursor: zoom-in; background: #eef1f6; border: 0; padding: 0; display: block; width: 100%; }
.gallery-grid .g img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.gallery-grid .g:hover img { transform: scale(1.07); }
.gallery-grid .g .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.4rem .9rem .75rem; background: linear-gradient(transparent, rgba(10, 20, 55, .75)); color: #fff; font-weight: 600; font-size: .86rem; text-align: left; opacity: 0; transition: opacity .25s; }
.gallery-grid .g:hover .cap, .gallery-grid .g:focus .cap { opacity: 1; }
.gallery-grid.home .g:first-child { grid-column: span 2; grid-row: span 2; }
@media (max-width: 991.98px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 575.98px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: .6rem; } .gallery-grid .g .cap { opacity: 1; font-size: .75rem; } }
.album-pills { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.6rem; }
.album-pills a { border: 1px solid var(--line); border-radius: 999px; padding: .42rem 1rem; font-weight: 600; font-size: .88rem; color: var(--ink-2); background: #fff; }
.album-pills a.active, .album-pills a:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.lightbox .modal-content { background: transparent; border: 0; }
.lightbox img { max-height: 82vh; width: auto; margin: 0 auto; display: block; border-radius: 14px; }
.lightbox .lb-cap { color: #fff; text-align: center; margin-top: .8rem; font-weight: 600; }
.lightbox .btn-close { position: absolute; right: 0; top: -2.4rem; }
.lightbox .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: var(--ink); font-size: 1.2rem; display: flex; align-items: center; justify-content: center; }
.lightbox .lb-prev { left: -8px; } .lightbox .lb-next { right: -8px; }
.modal-backdrop.show { opacity: .88; }

/* CTA */
.cta { border-radius: 28px; padding: 3.2rem; background: radial-gradient(600px 300px at 90% 0%, rgba(245, 179, 1, .25), transparent 60%), linear-gradient(120deg, var(--brand-700), var(--brand) 70%, #5b7cf5); color: #fff; position: relative; overflow: hidden; }
.cta h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.3rem); }
.cta p { color: rgba(255, 255, 255, .85); font-size: 1.05rem; margin: 0; }
@media (max-width: 767.98px) { .cta { padding: 2rem 1.4rem; } }

.contact-tile { display: flex; gap: 1rem; align-items: flex-start; padding: 1.3rem; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); height: 100%; }
.contact-tile .ic { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.contact-tile h6 { margin-bottom: .25rem; }
.contact-tile p, .contact-tile a { margin: 0; color: var(--ink-2); font-size: .94rem; word-break: break-word; }
.map-embed { border: 0; width: 100%; height: 380px; border-radius: var(--radius); box-shadow: var(--shadow); }
.form-card { background: #fff; border-radius: 24px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); padding: 2.2rem; }
@media (max-width: 575.98px) { .form-card { padding: 1.4rem; } }
.form-control, .form-select { border-radius: 12px; border-color: #dbe0ec; padding: .68rem .95rem; }
.form-control:focus, .form-select:focus { border-color: #9db3f7; box-shadow: 0 0 0 .22rem rgba(47, 91, 234, .12); }
.form-label { font-weight: 600; font-size: .88rem; color: var(--ink-2); }
.form-label .req { color: #e03131; margin-left: 2px; }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Inner pages ---------- */
.page-hero { background: radial-gradient(800px 360px at 90% -10%, rgba(106, 140, 255, .45), transparent 60%), linear-gradient(120deg, var(--navy) 0%, var(--brand-700) 70%, var(--brand) 100%); color: #fff; padding: 4rem 0 3.6rem; position: relative; overflow: hidden; }
.page-hero.has-image { background-size: cover; background-position: center; }
.page-hero.has-image::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 20, 55, .9), rgba(10, 20, 55, .55)); }
.page-hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 22px 22px; pointer-events: none; }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; margin: 0; }
.page-hero p { color: rgba(255, 255, 255, .82); margin: .6rem 0 0; font-size: 1.05rem; max-width: 680px; }
.page-hero .breadcrumb { margin-bottom: .8rem; font-size: .85rem; }
.page-hero .breadcrumb a { color: rgba(255, 255, 255, .75); }
.page-hero .breadcrumb-item.active { color: #fff; }
.page-hero .breadcrumb-item + .breadcrumb-item::before { color: rgba(255, 255, 255, .5); }

.prose { font-size: 1.04rem; line-height: 1.8; color: var(--ink-2); }
.prose h2, .prose h3, .prose h4 { margin-top: 2rem; margin-bottom: .8rem; color: var(--ink); }
.prose h4 { font-size: 1.3rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .45rem; }
.prose img { border-radius: 16px; height: auto; }
.prose table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.prose table td, .prose table th { border: 1px solid var(--line); padding: .6rem .8rem; }
.prose iframe { max-width: 100%; border-radius: 14px; }
.prose > :first-child { margin-top: 0; }
.side-card { background: var(--soft); border-radius: var(--radius); padding: 1.6rem; }
.side-card + .side-card { margin-top: 1.2rem; }
.side-card h6 { font-weight: 750; margin-bottom: 1rem; }
.side-links { list-style: none; padding: 0; margin: 0; }
.side-links a { display: flex; align-items: center; justify-content: space-between; padding: .6rem .85rem; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: .94rem; }
.side-links a:hover, .side-links a.active { background: #fff; color: var(--brand); box-shadow: 0 2px 8px rgba(16, 24, 40, .05); }

.kb-item { display: flex; gap: 1rem; align-items: flex-start; padding: 1.25rem; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; height: 100%; transition: box-shadow .2s, transform .2s; }
.kb-item:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.kb-item .ic { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; flex-shrink: 0; }
.chip { display: inline-block; font-size: .74rem; font-weight: 650; padding: .22rem .6rem; border-radius: 8px; background: var(--brand-50); color: var(--brand); }
.chip.gray { background: #eef1f6; color: var(--ink-2); }
.chip.gold { background: #fff4e0; color: #9a5b00; }

.empty-box { text-align: center; padding: 3.5rem 1rem; color: var(--muted); border: 1.5px dashed #d7ddea; border-radius: var(--radius); background: #fcfdff; }
.empty-box .bi { font-size: 2.6rem; color: #b7c2dc; display: block; margin-bottom: .6rem; }

.nf { text-align: center; padding: 6rem 1rem; }
.nf .code { font-size: clamp(5rem, 14vw, 8rem); font-weight: 900; line-height: 1; background: linear-gradient(135deg, var(--brand), #7b96ff); -webkit-background-clip: text; background-clip: text; color: transparent; }

.alert { border-radius: 14px; border: 0; }
.alert-success { background: #e6f7ef; color: #0b6b3c; }
.alert-danger { background: #fdecec; color: #9b1c1c; }
.alert-warning { background: #fff6e0; color: #8a5300; }
.pagination .page-link { border-radius: 10px !important; margin: 0 3px; border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; }
.pagination .active .page-link { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255, 255, 255, .72); padding: 4.5rem 0 0; font-size: .94rem; }
.site-footer h6 { color: #fff; font-weight: 700; margin-bottom: 1.1rem; font-size: 1rem; }
.site-footer a { color: rgba(255, 255, 255, .72); }
.site-footer a:hover { color: #fff; }
.site-footer .brand-name { color: #fff; }
.site-footer .brand-tag { color: rgba(255, 255, 255, .55); }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .55rem; }
.footer-links a { display: inline-flex; align-items: center; gap: .4rem; }
.footer-contact li { display: flex; gap: .7rem; margin-bottom: .8rem; }
.footer-contact .bi { color: var(--gold); margin-top: 2px; }
.social a { width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .08); display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; margin-right: .4rem; color: #fff; transition: background .2s, transform .2s; }
.social a:hover { background: var(--brand); transform: translateY(-2px); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 3rem; padding: 1.3rem 0; font-size: .85rem; color: rgba(255, 255, 255, .55); }
.back-top { position: fixed; right: 18px; bottom: 18px; width: 44px; height: 44px; border-radius: 14px; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 1020; }
.back-top.show { opacity: 1; pointer-events: auto; }
.back-top:hover { color: #fff; background: var(--brand-600); }
