/* ==========================================================================
   Public website (homepage builder sections, page banners, header tidy, footer)
   Colours come from the theme variables (--b50 … --b950, --accent, --brand).
   ========================================================================== */

/* ---------- Section headings ---------- */
.pub-head { margin-bottom: 2rem; }
.pub-kicker { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; color: rgb(var(--b700)); letter-spacing: .02em; }
.pub-kicker::before { content: ""; width: 1.75rem; height: 3px; border-radius: 3px; background: var(--accent); }
.pub-h2 { font-family: var(--font-heading); font-weight: 700; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem); line-height: 1.3; color: var(--brand-ink); margin-top: .35rem; }
.sec-center .pub-head { text-align: center; }
.sec-dark .pub-kicker { color: rgba(255,255,255,.85) !important; }
.sec-dark .pub-h2 { color: #fff !important; }
html[data-mode="dark"] .pub-h2 { color: #f1f5f9; }
html[data-mode="dark"] .pub-kicker { color: rgb(var(--b300)); }

/* ---------- Cards ---------- */
.pub-card { border-radius: 16px; box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px -12px rgba(15,23,42,.12); transition: box-shadow .2s, transform .2s, border-color .2s; }
a.pub-card:hover, .pub-card.pub-lift:hover { box-shadow: 0 2px 4px rgba(15,23,42,.05), 0 18px 36px -16px rgba(15,23,42,.25); transform: translateY(-2px); border-color: rgb(var(--b300)); }
.pub-cardhead { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.25rem; color: rgb(var(--b700)); }
.pub-cardhead h2, .pub-cardhead h3 { color: var(--brand-ink); }
html[data-mode="dark"] .pub-cardhead, html[data-mode="dark"] .pub-cardhead h2, html[data-mode="dark"] .pub-cardhead h3 { color: #f1f5f9; }
.pub-icon { display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: 14px; background: rgb(var(--b50)); color: rgb(var(--b700)); flex-shrink: 0; }
html[data-mode="dark"] .pub-icon { background: rgb(var(--b600) / .22); color: rgb(var(--b200)); }

/* ---------- Hero ---------- */
.pub-hero { position: relative; overflow: hidden; background-color: var(--brand);
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.07) 1px, transparent 0), linear-gradient(120deg, rgb(var(--b900)) 0%, rgb(var(--b700)) 55%, rgb(var(--b600)) 100%);
  background-size: 22px 22px, auto; }
.pub-hero::before, .pub-hero::after { content: ""; position: absolute; border-radius: 999px; pointer-events: none; }
.pub-hero::before { width: 34rem; height: 34rem; right: -10rem; top: -14rem; background: radial-gradient(circle, rgba(255,255,255,.10), rgba(255,255,255,0) 70%); }
.pub-hero::after { width: 22rem; height: 22rem; left: -8rem; bottom: -12rem; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 35%, transparent), transparent 70%); }
.pub-hero > * { position: relative; z-index: 1; }
.pub-hero h1 { font-family: var(--font-heading); font-weight: 700; font-size: clamp(2.1rem, 1.4rem + 3vw, 3.6rem); line-height: 1.2; letter-spacing: -.005em; }
.pub-chip { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .85rem; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); font-weight: 600; }
.pub-hero .btn { padding: .75rem 1.3rem; border-radius: 12px; font-size: 1.05rem; }
.pub-btn-outline { color: #fff; border: 1.5px solid rgba(255,255,255,.6); }
.pub-btn-outline:hover { background: rgba(255,255,255,.12); }
.pub-emblem { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); border-radius: 24px; }
.pub-emblem .pub-ring { display: inline-flex; padding: .6rem; border-radius: 999px; background: rgba(255,255,255,.1); box-shadow: 0 0 0 10px rgba(255,255,255,.05); }
.pub-fact { border-radius: 14px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); padding: .7rem .5rem; text-align: center; }
.pub-fact b { display: block; font-size: 1.25rem; font-weight: 800; line-height: 1.3; }
.pub-hero.has-stats { padding-bottom: 4rem; }

/* ---------- Stats band (overlaps the hero when it follows it) ---------- */
.pub-stats-wrap { position: relative; z-index: 2; margin-top: -3.5rem; }
.pub-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: 18px; overflow: hidden; }
.pub-stat { display: flex; align-items: center; gap: .9rem; padding: 1.25rem 1.25rem; }
.pub-stat + .pub-stat { border-left: 1px solid #e2e8f0; }
.pub-stat:nth-child(3) { border-left: 0; }
.pub-stat:nth-child(n+3) { border-top: 1px solid #e2e8f0; }
.pub-stat .v { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.1rem); font-weight: 800; line-height: 1.15; color: var(--brand-ink); }
.pub-stat .l { color: #475569; font-weight: 600; }
@media (min-width: 1024px) {
  .pub-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pub-stat:nth-child(3) { border-left: 1px solid #e2e8f0; }
  .pub-stat:nth-child(n+3) { border-top: 0; }
  .pub-stat { padding: 1.6rem 1.5rem; }
}
@media (max-width: 479px) { .pub-stat { flex-direction: column; align-items: flex-start; gap: .5rem; padding: 1rem; } }
html[data-mode="dark"] .pub-stat .v { color: #f1f5f9; }
html[data-mode="dark"] .pub-stat .l { color: #cbd5e1; }
html[data-mode="dark"] .pub-stat + .pub-stat, html[data-mode="dark"] .pub-stat:nth-child(n+3) { border-color: #233047; }
.pub-statband { background: linear-gradient(120deg, rgb(var(--b950)), rgb(var(--b800))); color: #fff; }
.pub-statband .pub-bandstat + .pub-bandstat { border-left: 1px solid rgba(255,255,255,.15); }
@media (max-width: 767px) { .pub-statband .pub-bandstat:nth-child(3) { border-left: 0; } }

/* ---------- Quick links ---------- */
.pub-quick { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; text-align: center; padding: 1.25rem .75rem; font-weight: 600; color: #1e293b; min-height: 7.5rem; }
.pub-stats-wrap + .pub-quicksec { padding-top: 2.5rem; }
.pub-quicksec + section { padding-top: 1.5rem; }
.pub-quick .pub-icon { transition: background .2s, color .2s; }
.pub-quick:hover .pub-icon { background: var(--brand); color: #fff; }
html[data-mode="dark"] .pub-quick { color: #e2e8f0; }

/* ---------- Notices / events lists ---------- */
.pub-date { width: 3.6rem; flex-shrink: 0; text-align: center; border-radius: 12px; background: rgb(var(--b50)); color: rgb(var(--b800)); padding: .35rem 0; line-height: 1.2; }
.pub-date b { display: block; font-size: 1.35rem; font-weight: 800; }
html[data-mode="dark"] .pub-date { background: rgb(var(--b600) / .22); color: rgb(var(--b200)); }
.pub-row { display: flex; gap: .9rem; align-items: flex-start; padding: .9rem 1.25rem; }
a.pub-row:hover { background: rgb(var(--b50) / .7); }
html[data-mode="dark"] a.pub-row:hover { background: #162033; }
.pub-quote { font-family: var(--font-heading); font-size: 1.15rem; line-height: 1.9; color: #334155; position: relative; padding-left: 1.1rem; border-left: 3px solid var(--accent); }
html[data-mode="dark"] .pub-quote { color: #e2e8f0; }

/* ---------- Programmes ---------- */
.pub-prog { display: flex; flex-direction: column; padding: 1.5rem; height: 100%; }
.pub-prog .pub-icon { background: linear-gradient(135deg, rgb(var(--b600)), rgb(var(--b800))); color: #fff; }
.pub-tag { display: inline-block; align-self: flex-start; padding: .1rem .7rem; border-radius: 999px; font-weight: 700; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, #fff); }
html[data-mode="dark"] .pub-tag { background: color-mix(in srgb, var(--accent) 22%, #111a2b); color: #fecdd3; }

/* ---------- Gallery ---------- */
.pub-gal { position: relative; display: block; width: 100%; border-radius: 16px; overflow: hidden; background: #e2e8f0; aspect-ratio: 20 / 13; }
.pub-gal img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.pub-gal:hover img { transform: scale(1.04); }
.pub-gal .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.5rem .9rem .7rem; color: #fff; font-weight: 600; text-align: left; background: linear-gradient(0deg, rgba(0,0,0,.65), transparent); }

/* ---------- Call to action ---------- */
.pub-cta { position: relative; overflow: hidden; border-radius: 24px; background-color: var(--brand); background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.07) 1px, transparent 0), linear-gradient(120deg, rgb(var(--b900)), rgb(var(--b600))); background-size: 22px 22px, auto; box-shadow: 0 24px 48px -24px rgb(var(--b900) / .6); }
.fade-in > .pub-ctasec:last-child { padding-bottom: 0; }
.pub-cta::after { content: ""; position: absolute; right: -6rem; top: -6rem; width: 18rem; height: 18rem; border-radius: 999px; border: 40px solid rgba(255,255,255,.07); pointer-events: none; }
.pub-cta > * { position: relative; z-index: 1; }

/* ---------- Page banners (inner pages) ---------- */
.pub-pagehero { position: relative; overflow: hidden; }
.pub-pagehero::after { content: ""; position: absolute; right: -5rem; bottom: -9rem; width: 20rem; height: 20rem; border-radius: 999px; border: 36px solid rgba(255,255,255,.06); pointer-events: none; }
.pub-pagehero h1 { font-family: var(--font-heading); font-weight: 700; font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); line-height: 1.25; }

/* calendar month grid: long day notes stay inside their cell on phones */
.grid-cols-7 > .group { overflow: hidden; }

/* ---------- Header tidy ---------- */
.ticker-label { padding: .25rem .9rem; }
.ticker-move { padding: .25rem 0; }
.ticker-move a { font-weight: 500; }
.gov-link { padding: .7rem .8rem; }
/* the ticker's moving strip is twice the page width: keep it inside the bar at every width (was ~10px overflow near 1024px) */
.ticker-bar { overflow: hidden; max-width: 100%; contain: paint; }
.ticker-bar > div { min-width: 0; }
.ticker-track { min-width: 0; }
/* today's date: a slim strip above the identity band, or at the end of the menu bar */
.pub-datebar { background: rgb(var(--b50)); color: rgb(var(--b900)); border-bottom: 1px solid rgb(var(--b100)); font-size: 1rem; padding: .3rem 0; }
.pub-datebar-alt::before { content: "·"; margin-right: 1rem; opacity: .5; }
html[data-mode="dark"] .pub-datebar { background: #0f1a2b; color: #cbd5e1; border-color: #233047; }
.gov-navdate { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; margin-left: auto; padding: .7rem .8rem; color: #fff; opacity: .92; font-size: 1rem; }
.gov-navdate > span + span::before { content: "·"; margin-right: .75rem; opacity: .6; }
.gov-nav-white .gov-navdate { color: rgb(var(--b800)); }
@media (max-width: 1279px) { .gov-navdate { margin-left: 0; border-top: 1px solid rgba(255,255,255,.15); } }
/* menu drop-downs: closed by Esc / a second click even while focused or hovered */
.gov-dd.dd-closed > .gov-dd-menu { display: none !important; }
.gov-dd-chev { transition: transform .2s; }
.gov-dd.open .gov-dd-chev { transform: rotate(180deg); }
.gov-dd-menu .gov-sub:focus-visible, .gov-dd > .gov-link:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }

/* ---------- Calendar: Bangla / Hijri day under each date ---------- */
.cal-alts { display: flex; flex-wrap: wrap; gap: 0 .4rem; line-height: 1.3; }
.cal-alt { color: rgb(var(--b700)); font-weight: 500; }
.cal-alt-h { color: #b45309; }
html[data-mode="dark"] .cal-alt { color: rgb(var(--b300)); }
html[data-mode="dark"] .cal-alt-h { color: #fbbf24; }

/* ---------- Homepage: at a glance ---------- */
.pub-glance { display: flex; align-items: center; gap: 1rem; padding: 1.4rem 1.25rem; }
.pub-glance-v { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); font-weight: 800; line-height: 1.1; color: var(--brand-ink); }
.pub-glance-u { font-size: 1rem; font-weight: 600; color: #64748b; margin-left: .3rem; }
.pub-glance-l { font-weight: 600; color: #475569; margin-top: .2rem; }
@media (max-width: 479px) { .pub-glance { flex-direction: column; align-items: flex-start; gap: .6rem; padding: 1rem; } }
html[data-mode="dark"] .pub-glance-v { color: #f1f5f9; }
html[data-mode="dark"] .pub-glance-l { color: #cbd5e1; }

/* ---------- Homepage: leaders' messages ---------- */
.pub-leader-top { display: flex; align-items: center; gap: 1.25rem; padding: 1.5rem 1.5rem 1.25rem; }
@media (min-width: 640px) { .pub-leader-top { padding: 2rem 2rem 1.5rem; } }
@media (max-width: 479px) { .pub-leader-top { flex-direction: column; align-items: flex-start; } }
.pub-face { box-shadow: 0 0 0 4px rgb(var(--b50)), 0 0 0 5px rgb(var(--b200)); }

/* ---------- Homepage: compact month ---------- */
.pub-mday { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: .1rem; min-height: 3.4rem; padding: .35rem .1rem; border-radius: 10px; border: 1px solid #e2e8f0; background: #fff; overflow: hidden; }
.pub-mday:hover { border-color: rgb(var(--b400)); }
.pub-mday-n { font-weight: 700; font-size: 1.05rem; color: #0f172a; }
.pub-mday-a { font-size: 1rem; color: rgb(var(--b700)); line-height: 1.2; white-space: nowrap; }
.pub-mday.is-wk { background: #f8fafc; }
.pub-mday.is-wk .pub-mday-n { color: #e11d48; }
.pub-mday.is-hol { background: #fdf2f8; border-color: #fbcfe8; }
.pub-mday.is-hol .pub-mday-n { color: #be185d; }
.pub-mday.is-today { box-shadow: 0 0 0 2px var(--brand); }
.pub-mday-dot { position: absolute; top: .35rem; right: .35rem; width: .5rem; height: .5rem; border-radius: 99px; background: #059669; }
@media (max-width: 479px) { .pub-mday-a { display: none; } .pub-mday { min-height: 2.6rem; } }
@media (min-width: 640px) { .pub-mday { min-height: 4.2rem; } }
html[data-mode="dark"] .pub-mday { background: #111a2b; border-color: #233047; }
html[data-mode="dark"] .pub-mday-n { color: #e2e8f0; }
.pub-ev-dot { display: inline-block; width: .65rem; height: .65rem; border-radius: 99px; margin-right: .4rem; vertical-align: middle; }
.pub-ev-hol { background: #db2777; } .pub-ev-exam { background: #0284c7; } .pub-ev-evt { background: #059669; } .pub-ev-open { background: #4f46e5; } .pub-ev-wk { background: #fda4af; }

/* ---------- Homepage: featured notice, teachers, achievements, gallery mosaic ---------- */
.pub-feat { border-top: 4px solid var(--accent); }
.pub-teacher { display: flex; flex-direction: column; overflow: hidden; }
.pub-teacher-img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: rgb(var(--b50)); }
.pub-teacher-ph { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; }
.pub-ach-img { aspect-ratio: 16 / 9; overflow: hidden; background: #e2e8f0; }
.pub-ach-img img { width: 100%; height: 100%; object-fit: cover; }
.pub-ach-band { display: flex; align-items: center; justify-content: center; height: 6rem; color: #fff; background: linear-gradient(120deg, rgb(var(--b800)), rgb(var(--b600))); }
.pub-mosaic { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 9rem; gap: .75rem; }
.pub-mosaic .pub-gal { aspect-ratio: auto; height: 100%; }
.pub-mosaic .pub-gal-big { grid-column: span 2; grid-row: span 2; }
@media (min-width: 768px) { .pub-mosaic { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 11rem; gap: 1rem; } }
@media (min-width: 1280px) { .pub-mosaic { grid-auto-rows: 13rem; } }

/* ---------- Footer ---------- */
.pub-footer h3 { font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem; margin-bottom: .9rem; padding-bottom: .5rem; position: relative; }
.pub-footer h3::after { content: ""; position: absolute; left: 0; bottom: 0; width: 2rem; height: 3px; border-radius: 3px; background: var(--accent); }
html[data-mode="dark"] .pub-footer[class*="border-t"] { border-top-color: var(--accent) !important; }
.pub-footer ul a { display: inline-flex; align-items: center; gap: .35rem; opacity: .88; }
.pub-footer ul a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.pub-footer .pub-fico { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 999px; flex-shrink: 0; background: rgba(255,255,255,.1); }
.pub-footer.light .pub-fico { background: rgb(var(--b50)); color: rgb(var(--b700)); }
