/* =====================================================================
   Giriulla Zonal Education Office – public theme
   Navy + gold. Colours come from --navy / --gold (set in config.php).
   ===================================================================== */
:root {
  --navy: #1E2A5E;
  --gold: #F4C430;
  --navy-deep: #121a3f;
  --slate: #3a4470;
  --ink: #1c2340;
  --muted: #4a5175;
  --soft: #f4f5fb;
  --line: #e1e4f0;
  --gold-text: #7a5d00;          /* gold that passes contrast on white */
  --font: 'Roboto', 'Noto Sans Sinhala', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-si: 'Noto Sans Sinhala', 'Iskoola Pota', sans-serif;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body { font-family: var(--font); color: var(--ink); background: #fff; font-size: 1rem; line-height: 1.6; }
[lang="si"] { font-family: var(--font-si); }
a { color: var(--navy); }
a:hover { color: var(--navy-deep); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
img { max-width: 100%; height: auto; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 2000; background: var(--gold); color: var(--navy); padding: .75rem 1rem; font-weight: 700; }
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Placeholders (until real photos are added) ---------- */
.ph { background: #cfd4ea; color: #4a5175; display: flex; align-items: center; justify-content: center; text-align: center; padding: 1rem; font-size: .85rem; width: 100%; }
.ph span { border: 1px dashed currentColor; padding: .4rem .8rem; border-radius: 4px; opacity: .85; }

/* ---------- Header ---------- */
.site-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 1030; transition: box-shadow .2s; }
.site-header.scrolled { box-shadow: 0 4px 18px rgba(10, 15, 40, .35); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .9rem; padding-bottom: .9rem; }
.brand { display: flex; align-items: center; gap: .9rem; color: #fff; text-decoration: none; min-width: 0; }
.brand:hover { color: #fff; }
.crest { width: 68px; height: 68px; border-radius: 50%; border: 2px solid var(--gold); color: var(--gold); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.crest svg { width: 36px; height: 36px; }
.crest-img { width: 68px; height: 68px; object-fit: contain; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-province { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.brand-name { font-size: 1.3rem; font-weight: 700; }
.brand-si { font-size: .9rem; color: #d6dbf0; }

.main-nav { align-items: center; gap: .1rem; }
.main-nav > a, .main-nav .dropdown > a { color: #fff; text-decoration: none; padding: .7rem .8rem; font-weight: 500; font-size: .95rem; border-bottom: 3px solid transparent; display: inline-block; }
.main-nav > a:hover, .main-nav .dropdown > a:hover { color: var(--gold); }
.main-nav a.active { border-bottom-color: var(--gold); }
.main-nav .dropdown-menu { border: 0; border-radius: 0; border-top: 3px solid var(--gold); box-shadow: 0 12px 30px rgba(10, 15, 40, .2); padding: .5rem 0; }
.main-nav .dropdown-item { padding: .55rem 1.2rem; color: var(--ink); }
.main-nav .dropdown-item:hover { background: var(--soft); color: var(--navy); }

.header-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.btn-gold { display: inline-flex; align-items: center; gap: .4rem; background: var(--gold); color: var(--navy); font-weight: 700; padding: .65rem 1.2rem; border-radius: 999px; text-decoration: none; min-height: 44px; }
.btn-gold:hover { background: #fff; color: var(--navy); }
.icon-btn { width: 44px; height: 44px; border: 0; background: transparent; color: #fff; font-size: 1.3rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.icon-btn:hover { background: rgba(255, 255, 255, .12); }
.menu-btn { font-size: 2rem; }
.social { width: 42px; height: 42px; border-radius: 50%; background: #fff; color: var(--navy); display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem; text-decoration: none; }
.social:hover { background: var(--gold); color: var(--navy); }

/* Mobile menu */
.mobile-menu { background: var(--navy); color: #fff; max-width: 88vw; }
.mobile-menu .offcanvas-title { font-weight: 700; font-size: 1.2rem; }
.mobile-menu nav a, .mobile-menu .sub-toggle { display: flex; justify-content: space-between; align-items: center; width: 100%; color: #fff; text-decoration: none; padding: .85rem .25rem; border: 0; border-bottom: 1px solid rgba(255, 255, 255, .12); background: none; font-size: 1.05rem; text-align: left; }
.mobile-menu nav a.active { color: var(--gold); }
.mobile-menu .sub-toggle[aria-expanded="true"] i { transform: rotate(180deg); }
.mobile-menu .sub a { padding-left: 1.2rem; font-size: .98rem; color: #d6dbf0; }
.mobile-social { display: flex; gap: .6rem; margin-top: 1.5rem; }

.search-box { padding: 1.5rem; border: 0; border-top: 4px solid var(--gold); border-radius: 0; }
.btn-navy { background: var(--navy); color: #fff; border: 0; font-weight: 500; }
.btn-navy:hover, .btn-navy:focus { background: var(--navy-deep); color: #fff; }

/* ---------- Hero slider ---------- */
.hero { position: relative; background: var(--navy-deep); }
.hero-img { width: 100%; height: 640px; object-fit: cover; display: block; }
.ph-hero { height: 640px; color: rgba(255, 255, 255, .6); }
.ph-hero-0 { background: #2b3a78; } .ph-hero-1 { background: #25336b; }
.ph-hero-2 { background: #304085; } .ph-hero-3 { background: #283670; }
.hero .carousel-item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 14, 40, .7) 0%, rgba(10, 14, 40, 0) 55%); pointer-events: none; }
.hero-caption { position: absolute; left: 0; right: 0; bottom: 170px; z-index: 2; color: #fff; padding-left: 7rem; padding-right: 7rem; }
.hero-kicker { display: block; color: var(--gold); letter-spacing: .15em; text-transform: uppercase; font-size: .85rem; margin-bottom: .6rem; }
.hero-title { font-size: clamp(1.6rem, 3.6vw, 2.9rem); font-weight: 700; line-height: 1.15; max-width: 760px; margin: 0; }
.hero-title a { color: #fff; text-decoration: none; }
.hero-arrow { position: absolute; top: 42%; z-index: 3; width: 60px; height: 60px; border-radius: 50%; border: 0; background: #0d1230; color: #fff; font-size: 1.4rem; display: flex; align-items: center; justify-content: center; }
.hero-arrow:hover { background: var(--gold); color: var(--navy); }
.hero-arrow.prev { left: 2rem; }
.hero-arrow.next { right: 4.5rem; }
.hero-dots { position: absolute; right: 1.1rem; left: auto; top: 50%; bottom: auto; transform: translateY(-50%); margin: 0; flex-direction: column; gap: .35rem; background: rgba(13, 18, 48, .55); padding: .7rem .45rem; border-radius: 999px; }
.hero-dots [data-bs-target] { width: 11px; height: 11px; border-radius: 50%; background: var(--gold); border: 0; opacity: 1; margin: 0; text-indent: 0; }
.hero-dots .active { background: #fff; transform: scale(1.35); }

/* ---------- Feature cards over the hero ---------- */
.feature-cards { position: relative; z-index: 5; margin-top: -120px; }
.feature { display: flex; gap: 1.3rem; align-items: flex-start; padding: 2.2rem 2rem; height: 100%; text-decoration: none; transition: transform .2s; }
.feature:hover { transform: translateY(-4px); }
.feature > i { font-size: 3rem; line-height: 1; flex-shrink: 0; }
.feature strong { display: block; font-size: 1.55rem; font-weight: 500; margin-bottom: .5rem; }
.feature .f-text { display: block; font-size: 1.05rem; line-height: 1.5; font-weight: 300; }
.feature .f-more { display: inline-block; margin-top: .9rem; font-weight: 500; }
.f-navy { background: var(--navy); color: #fff; } .f-navy:hover { color: #fff; }
.f-gold { background: var(--gold); color: var(--navy); } .f-gold:hover { color: var(--navy); }
.f-gold .f-text { font-weight: 400; } .f-gold .f-more { font-weight: 700; }
.f-slate { background: var(--slate); color: #fff; } .f-slate:hover { color: #fff; }
.f-navy .f-text, .f-slate .f-text { color: #dfe3f5; }

/* ---------- Sections ---------- */
.section { padding: 5.5rem 0; }
.bg-soft { background: var(--soft); }
.eyebrow { color: var(--gold-text); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .82rem; margin-bottom: .5rem; }
.sec-title { color: var(--navy); font-weight: 700; font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0; }
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 2rem; }
.body-lg { font-size: 1.12rem; line-height: 1.75; color: #3d4466; max-width: 68ch; }
.btn-navy-solid { display: inline-block; background: var(--navy); color: #fff; padding: .85rem 1.8rem; text-decoration: none; font-weight: 500; }
.btn-navy-solid:hover { background: var(--navy-deep); color: #fff; }
.btn-navy-outline { display: inline-block; border: 2px solid var(--navy); color: var(--navy); padding: .75rem 1.7rem; text-decoration: none; font-weight: 500; }
.btn-navy-outline:hover { background: var(--navy); color: #fff; }
.link-navy { color: var(--navy); font-weight: 500; text-decoration: none; padding: .5rem 0; border-bottom: 2px solid var(--gold); }
.link-navy:hover { color: var(--navy-deep); }
.more { font-weight: 500; color: var(--navy); margin-top: auto; }
.empty-note { background: var(--soft); padding: 1.2rem 1.4rem; color: var(--muted); }

/* Director */
.director-box { background: var(--soft); padding: 2.2rem; display: flex; gap: 1.8rem; align-items: flex-start; }
.director-photo { width: 170px; height: 210px; flex-shrink: 0; object-fit: cover; }
.director-box blockquote { font-style: italic; font-size: 1.05rem; color: #3d4466; margin: 0 0 1rem; }
.director-name { font-weight: 700; color: var(--navy); font-size: 1.1rem; margin: 0; }
.director-title { color: var(--muted); margin: 0 0 .8rem; }
.director-large { width: 100%; aspect-ratio: 4 / 5; height: auto; object-fit: cover; }
.big-quote { font-size: 1.35rem; font-style: italic; color: var(--navy); border-left: 4px solid var(--gold); padding-left: 1.3rem; margin-bottom: 1.5rem; }

/* Numbers */
.numbers { background: var(--navy); color: #fff; padding: 4.5rem 0; text-align: center; }
.numbers h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 700; margin-bottom: 2.5rem; }
.num-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 2rem; }
.num { display: flex; flex-direction: column; gap: .3rem; }
.num-v { font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 700; color: var(--gold); line-height: 1; }
.num-l { color: #dfe3f5; }

/* Branch cards */
.branch-card { display: flex; flex-direction: column; gap: .7rem; height: 100%; border: 1px solid var(--line); padding: 1.8rem; text-decoration: none; color: var(--ink); background: #fff; transition: border-color .2s, box-shadow .2s; }
.branch-card:hover { border-color: var(--navy); box-shadow: 0 10px 28px rgba(30, 42, 94, .1); color: var(--ink); }
.branch-card .bar { width: 48px; height: 6px; background: var(--gold); }
.branch-card h3 { font-size: 1.3rem; font-weight: 700; color: var(--navy); margin: 0; }
.branch-card p { color: var(--muted); margin: 0; }

/* News */
.news-card { display: flex; flex-direction: column; height: 100%; background: var(--soft); text-decoration: none; color: var(--ink); }
.news-card:hover { color: var(--ink); }
.news-card:hover h3 { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }
.news-card img, .ph-news { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.news-body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.news-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--navy); line-height: 1.35; margin: 0; }
.news-meta { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; font-size: .85rem; color: var(--muted); }
.tag { background: var(--gold); color: var(--navy); font-weight: 700; padding: .1rem .55rem; font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; }

.circ-panel { background: var(--navy); color: #fff; padding: 1.8rem; height: 100%; }
.circ-panel h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 1.2rem; }
.circ-item { display: flex; gap: .8rem; color: #fff; text-decoration: none; padding: .9rem 0; border-bottom: 1px solid rgba(255, 255, 255, .16); }
.circ-item:hover { color: var(--gold); }
.circ-item i { color: var(--gold); font-size: 1.3rem; }
.circ-item .c-title { display: block; }
.circ-item .c-meta { display: block; font-size: .82rem; color: #c5cbe6; }
.circ-all { display: inline-block; margin-top: 1rem; color: var(--gold); font-weight: 700; text-decoration: none; padding: .4rem 0; }
.circ-all:hover { color: #fff; }

/* Calendar */
.cal { background: #fff; padding: 1.6rem; border: 1px solid var(--line); }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; gap: .5rem; }
.cal-head strong { color: var(--navy); font-size: 1.25rem; text-align: center; }
.cal-nav { display: inline-flex; align-items: center; gap: .3rem; color: var(--muted); text-decoration: none; padding: .5rem; min-height: 44px; }
.cal-nav:hover { color: var(--navy); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .35rem; text-align: center; }
.cal-wd { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: .3rem 0; }
.cal-day { padding: .6rem 0; background: var(--soft); font-size: .95rem; position: relative; }
.cal-day.empty { background: transparent; }
.cal-day.today { background: var(--gold); color: var(--navy); font-weight: 700; }
.cal-day.has-event::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--navy); }
.cal-key { display: flex; align-items: center; gap: .4rem; margin: 1rem 0 0; font-size: .85rem; color: var(--muted); }
.cal-key .key { width: 12px; height: 12px; display: inline-block; }
.cal-key .key.today { background: var(--gold); }
.cal-key .key.event { background: var(--navy); border-radius: 50%; width: 8px; height: 8px; margin-left: .8rem; }

.event-row { display: flex; gap: 1rem; align-items: center; background: #fff; padding: 1rem; margin-bottom: .8rem; border: 1px solid var(--line); }
.ev-date { width: 66px; height: 66px; background: var(--navy); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.ev-date .d { font-size: 1.5rem; font-weight: 700; color: var(--gold); line-height: 1; }
.ev-date .m { font-size: .72rem; letter-spacing: .1em; }
.ev-title { display: block; font-weight: 700; color: var(--navy); }
.ev-place { display: block; font-size: .88rem; color: var(--muted); }

/* Divisions */
.division-card { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.division-card:hover { color: var(--ink); border-color: var(--navy); }
.ph-division { aspect-ratio: 16 / 9; }
.dc-body { display: flex; flex-direction: column; gap: .4rem; padding: 1.4rem; border-top: 6px solid var(--gold); flex: 1; }
.division-card h3 { font-size: 1.3rem; font-weight: 700; color: var(--navy); margin: 0; }
.dc-text { color: var(--muted); }

/* Gallery */
.gallery-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.gs-item { display: block; }
.gs-item img, .ph-gallery { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.ph-g0 { background: #2b3a78; color: rgba(255, 255, 255, .6); }
.ph-g1 { background: #354488; color: rgba(255, 255, 255, .6); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; }
.g-item { border: 0; padding: 0; background: none; display: block; width: 100%; }
.g-item img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.lightbox { background: #0d1230; color: #fff; border: 0; border-radius: 0; padding: 2.5rem 1rem 1rem; }
.lightbox .btn-close { position: absolute; top: .8rem; right: .8rem; }
.lb-media img { width: 100%; max-height: 75vh; object-fit: contain; }
.lb-media .ph { min-height: 50vh; }
.lb-caption { margin: .8rem 0 0; text-align: center; color: #d6dbf0; }

/* ---------- Inner pages ---------- */
.page-hero { background: var(--navy); color: #fff; padding: 3rem 0 3.3rem; border-bottom: 6px solid var(--gold); }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); font-weight: 700; margin: 0; max-width: 900px; }
.lead-text { color: #d6dbf0; font-size: 1.1rem; margin: .8rem 0 0; max-width: 65ch; }
.crumbs { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .3rem; font-size: .9rem; color: #c5cbe6; }
.crumbs li + li::before { content: "/"; margin-right: .3rem; color: var(--gold); }
.crumbs a { color: #fff; }

.prose { max-width: 72ch; }
.prose h2 { color: var(--navy); font-size: 1.5rem; font-weight: 700; margin: 2rem 0 .7rem; }
.prose h2:first-child { margin-top: 0; }
.prose p { font-size: 1.05rem; line-height: 1.8; color: #3d4466; }
.side-box { background: var(--soft); padding: 1.8rem; }
.side-box h2 { font-size: 1.25rem; font-weight: 700; color: var(--navy); margin-bottom: 1rem; }
.side-box h3 { font-size: 1.05rem; font-weight: 700; color: var(--navy); margin: 1.5rem 0 .6rem; }
.glance { margin: 0; }
.glance div { display: flex; justify-content: space-between; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.glance dt { font-weight: 400; color: var(--muted); }
.glance dd { margin: 0; font-weight: 700; color: var(--navy); }
.plain-links { list-style: none; padding: 0; margin: 0; }
.plain-links a { display: block; padding: .55rem 0; text-decoration: none; border-bottom: 1px solid var(--line); }
.plain-links a.current { font-weight: 700; color: var(--navy); border-left: 4px solid var(--gold); padding-left: .7rem; }
.side-news { display: block; padding: .8rem 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.sn-title { display: block; font-weight: 500; color: var(--navy); }
.side-news time { font-size: .85rem; color: var(--muted); }
.ph-article { aspect-ratio: 16 / 9; }
.share { display: flex; align-items: center; gap: .6rem; margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.share .social { background: var(--navy); color: #fff; }

.person-row { display: flex; gap: 1.4rem; align-items: center; background: var(--soft); padding: 1.4rem; }
.person-photo { width: 110px; height: 130px; flex-shrink: 0; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; background: var(--soft); padding: 1.3rem; margin-bottom: 1.8rem; }
.fb-field { flex: 1 1 220px; }
.fb-actions { display: flex; gap: .5rem; }
.filter-bar .form-control, .filter-bar .form-select, .filter-bar .btn { min-height: 46px; border-radius: 0; }
.table-wrap { overflow-x: auto; }
.circ-table th { background: var(--navy); color: #fff; font-weight: 500; white-space: nowrap; }
.circ-table .c-title { display: block; font-weight: 500; color: var(--navy); }
.circ-table .c-no { display: block; font-size: .82rem; color: var(--muted); }
.btn-dl { display: inline-flex; align-items: center; gap: .35rem; background: var(--gold); color: var(--navy); padding: .45rem .9rem; text-decoration: none; font-weight: 700; min-height: 40px; }
.btn-dl:hover { background: var(--navy); color: #fff; }
.pager .page-link { color: var(--navy); border-radius: 0 !important; min-width: 44px; text-align: center; }
.pager .active .page-link { background: var(--navy); border-color: var(--navy); color: #fff; }

.service-card { display: flex; flex-direction: column; gap: .6rem; height: 100%; padding: 2rem; background: var(--soft); text-decoration: none; color: var(--ink); border-top: 5px solid var(--navy); }
.service-card:hover { border-top-color: var(--gold); color: var(--ink); }
.service-card i { font-size: 2.3rem; color: var(--navy); }
.service-card h3 { font-size: 1.25rem; font-weight: 700; color: var(--navy); margin: 0; }
.service-card p { color: var(--muted); margin: 0; }

.contact-form .form-control { border-radius: 0; min-height: 46px; }
.contact-form .btn { border-radius: 0; padding-left: 2rem; padding-right: 2rem; }
.hp { position: absolute; left: -9999px; }
.ph-map { aspect-ratio: 4 / 3; }
.notfound .nf-code { font-size: 6rem; font-weight: 700; color: var(--gold); line-height: 1; margin: 0; }
.notfound .body-lg { margin: 1rem auto 2rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #d6dbf0; padding-top: 4.5rem; }
.footer-brand { display: flex; align-items: center; gap: .9rem; color: #fff; font-weight: 700; font-size: 1.15rem; margin-bottom: 1.3rem; }
.footer-brand .crest { width: 54px; height: 54px; } .footer-brand .crest svg { width: 28px; height: 28px; }
.footer-brand .crest-img { width: 54px; height: 54px; }
.footer-contact { list-style: none; padding: 0; margin: 0; }
.footer-contact li { display: flex; gap: .7rem; padding: .35rem 0; }
.footer-contact i { color: var(--gold); }
.footer-contact.dark i { color: var(--navy); }
.footer-head { color: var(--gold); font-size: 1.05rem; font-weight: 700; margin-bottom: 1rem; }
.site-footer .col-6 > a, .site-footer .col-md-4 > a { display: block; color: #d6dbf0; text-decoration: none; padding: .35rem 0; }
.site-footer .col-6 > a:hover { color: var(--gold); }
.footer-social { display: flex; gap: .5rem; margin-top: 1rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 3.5rem; padding: 1.3rem 0; font-size: .9rem; color: #aab2d6; }
.footer-bottom .container-xl { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer-links a { color: #aab2d6; text-decoration: none; }
.footer-links a:hover { color: #fff; }

.to-top { position: fixed; right: 1rem; bottom: 1rem; z-index: 1020; width: 48px; height: 48px; border-radius: 50%; background: var(--gold); color: var(--navy); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); opacity: 0; visibility: hidden; transition: opacity .2s; }
.to-top.show { opacity: 1; visibility: visible; }

/* ---------- Responsive ---------- */
@media (max-width: 1199.98px) {
  .brand-name { font-size: 1.15rem; }
}
@media (max-width: 991.98px) {
  .hero-img, .ph-hero { height: 480px; }
  .hero-caption { bottom: 130px; padding-left: 5rem; padding-right: 5rem; }
  .feature-cards { margin-top: -90px; }
  .feature { padding: 1.6rem 1.4rem; }
  .feature > i { font-size: 2.4rem; }
  .feature strong { font-size: 1.3rem; }
  .gallery-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gallery-strip .gs-item:nth-child(n+4) { display: none; }
  .section { padding: 4rem 0; }
}
@media (max-width: 767.98px) {
  .crest, .crest-img { width: 52px; height: 52px; }
  .crest svg { width: 28px; height: 28px; }
  .brand-province { display: none; }
  .brand-name { font-size: 1rem; }
  .brand-si { font-size: .8rem; }
  .hero-img, .ph-hero { height: 400px; }
  .hero-caption { bottom: 2.2rem; padding-left: 1.25rem; padding-right: 3.5rem; }
  .hero-arrow { width: 44px; height: 44px; font-size: 1.1rem; top: 38%; }
  .hero-arrow.prev { left: .6rem; }
  .hero-arrow.next { right: 3.2rem; }
  .hero-dots { right: .5rem; padding: .5rem .35rem; }
  /* Cards stack under the hero on phones, no overlap */
  .feature-cards { margin-top: 0; padding-left: 0; padding-right: 0; }
  .director-box { flex-direction: column; padding: 1.5rem; }
  .director-photo { width: 140px; height: 170px; }
  .person-row { flex-direction: column; align-items: flex-start; }
  .circ-table thead { display: none; }
  .circ-table tr { display: grid; grid-template-columns: 1fr auto; gap: .2rem .8rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
  .circ-table td { border: 0; padding: 0; }
  .circ-table td:nth-child(1) { grid-column: 1; font-size: .82rem; color: var(--muted); }
  .circ-table td:nth-child(2) { grid-column: 1; }
  .circ-table td:nth-child(3) { grid-column: 1; font-size: .85rem; color: var(--muted); }
  .circ-table td:nth-child(4) { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
}
@media (max-width: 575.98px) {
  .header-row { padding-top: .6rem; padding-bottom: .6rem; gap: .4rem; }
  .brand { gap: .6rem; }
  .brand-si { display: none; }
  .header-actions { gap: .1rem; }
  .hero-img, .ph-hero { height: 340px; }
  .hero-kicker { font-size: .72rem; }
  .gallery-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-strip .gs-item:nth-child(n+3) { display: none; }
  .section { padding: 3.2rem 0; }
  .cal { padding: 1rem; }
  .cal-nav span { display: none; }
  .cal-day { padding: .45rem 0; font-size: .88rem; }
}
