/* Premium theme — loaded after style.css, restyles the whole public site */
:root {
    --pm-green: #199145;
    --pm-green-d: #0d5c2c;
    --pm-ink: #0b2e1a;
    --pm-gold: #d4a017;
    --pm-gold-l: #f3d77a;
    --pm-bg: #f5f8f6;
    --pm-text: #1f2937;
    --pm-muted: #6b7280;
    --pm-line: #e4ebe6;
    --pm-radius: 18px;
    --pm-shadow: 0 10px 30px rgba(11, 46, 26, .08);
    --pm-shadow-h: 0 18px 44px rgba(11, 46, 26, .16);
}

body {
    font-family: 'Hind Siliguri', 'Kalpurush', 'Inter', sans-serif !important;
    background: var(--pm-bg) !important;
    color: var(--pm-text);
    -webkit-font-smoothing: antialiased;
}
.container { background: transparent !important; }
.bg-card { background: #fff !important; }

/* ---------- top bar & header ---------- */
.top-bar { background: var(--pm-ink) !important; font-size: 13.5px; padding: 7px 0; }
.top-bar .bg-theme { background: transparent !important; }
.top-bar a { color: #d9eadf; margin-left: 18px; }
.top-bar a:hover { color: var(--pm-gold-l); text-decoration: none; }

.header-content {
    background: linear-gradient(120deg, var(--pm-green-d) 0%, var(--pm-green) 55%, #1fa653 100%) !important;
    position: relative; overflow: hidden; padding: 26px 20px !important;
}
.header-content::before, .header-content::after {
    content: ''; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .07);
}
.header-content::before { width: 320px; height: 320px; right: -80px; top: -140px; }
.header-content::after { width: 200px; height: 200px; left: 30%; bottom: -120px; background: rgba(212, 160, 23, .15); }
.header-content .bg-primary { background: transparent !important; position: relative; z-index: 1; }
.header-content img { background: #fff; border-radius: 16px; padding: 6px; box-shadow: 0 8px 22px rgba(0, 0, 0, .25); }
.school-name { font-weight: 700 !important; letter-spacing: .2px; text-shadow: 0 2px 8px rgba(0, 0, 0, .25) !important; }
.search-box { background: transparent !important; box-shadow: none !important; padding: 0 !important; }
.search-box .btn-light { border-radius: 40px; padding: 10px 22px; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); color: var(--pm-green-d); }
.search-box .btn-light:hover { background: var(--pm-gold); color: #fff; }

/* ---------- navbar ---------- */
.navbar { background: rgba(13, 92, 44, .96) !important; backdrop-filter: blur(8px); box-shadow: 0 6px 20px rgba(11, 46, 26, .18); }
.navbar .container.bg-theme { background: transparent !important; }
.navbar .nav-link { padding: 15px 16px !important; font-weight: 500; font-size: .98rem; position: relative; }
.navbar .nav-link::after {
    content: ''; position: absolute; left: 16px; right: 16px; bottom: 8px; height: 2px;
    background: var(--pm-gold); transform: scaleX(0); transition: transform .25s;
}
.navbar .nav-link:hover::after, .navbar .nav-link:focus::after { transform: scaleX(1); }
.navbar .nav-link:hover { background: transparent !important; color: var(--pm-gold-l) !important; }
.navbar .dropdown-menu { background: #fff !important; border-radius: 14px !important; box-shadow: var(--pm-shadow-h); padding: 8px; margin-top: 0; border: 1px solid var(--pm-line) !important; }
.navbar .dropdown-item { color: var(--pm-text) !important; border-radius: 9px; padding: 9px 14px; }
.navbar .dropdown-item:hover { background: #e8f5ed !important; color: var(--pm-green-d) !important; }
@media (min-width: 992px) { .navbar .dropdown:hover > .dropdown-menu { display: block; } }

/* ---------- generic cards / headings ---------- */
.card { border: 1px solid var(--pm-line) !important; border-radius: var(--pm-radius) !important; box-shadow: var(--pm-shadow); }
.card:hover { transform: none; }
.card-header { background: linear-gradient(120deg, var(--pm-green-d), var(--pm-green)) !important; border-radius: var(--pm-radius) var(--pm-radius) 0 0 !important; }
.section-title { border-bottom: 0 !important; padding-bottom: 12px !important; position: relative; font-weight: 700; color: var(--pm-ink) !important; }
.section-title::after { content: ''; position: absolute; left: 0; bottom: 0; width: 64px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--pm-gold), var(--pm-green)); }
.table { border-radius: 12px; overflow: hidden; }
.table thead { background: var(--pm-green-d); color: #fff; }
.btn-primary { background: var(--pm-green) !important; border-color: var(--pm-green) !important; border-radius: 10px; }
.btn-primary:hover { background: var(--pm-green-d) !important; border-color: var(--pm-green-d) !important; }
.btn-outline-primary { color: var(--pm-green); border-color: var(--pm-green); border-radius: 10px; }
.btn-outline-primary:hover { background: var(--pm-green); border-color: var(--pm-green); }
a { color: var(--pm-green-d); }

/* ---------- footer ---------- */
#footer .footer { background: linear-gradient(160deg, #07200f, var(--pm-ink) 55%, #0d3d22) !important; color: #cfe3d6 !important; padding: 56px 0 16px !important; margin-top: 50px; position: relative; }
#footer .footer::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--pm-gold), var(--pm-green), var(--pm-gold)); }
#footer .container, #footer .bg-card { background: transparent !important; }
#footer .footer-title { color: #fff !important; }
#footer .footer-title::after { background: var(--pm-gold) !important; }
#footer p, #footer li, #footer .footer-links a { color: #cfe3d6 !important; list-style: none; }
#footer .footer-links { padding: 0; }
#footer .footer-links a:hover { color: var(--pm-gold-l) !important; padding-left: 6px; }
#footer .social-links a { background: rgba(255, 255, 255, .1) !important; }
#footer .social-links a:hover { background: var(--pm-gold) !important; }
#footer .copyright { background: rgba(0, 0, 0, .25) !important; margin-top: 24px; padding: 16px 0 !important; }
#footer .copyright hr { display: none; }
#footer .copyright p { margin: 0; }
#footer .copyright small, #footer .copyright small a { color: var(--pm-gold-l) !important; }

/* ---------- home: hero ---------- */
.pm-wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.pm-hero { position: relative; margin: 22px 0 0; border-radius: 26px; overflow: hidden; box-shadow: var(--pm-shadow-h); background: var(--pm-ink); }
.pm-hero .carousel-inner { height: auto !important; }
/* banners are 1320x450: keep that ratio so nothing is cropped on any screen */
.pm-hero .carousel-item { aspect-ratio: 1320 / 450; }
.pm-hero .carousel-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* welcome strip under the banner */
.pm-welcome { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding: 20px 26px; background: #fff; border: 1px solid var(--pm-line); border-radius: var(--pm-radius); box-shadow: var(--pm-shadow); }
.pm-welcome .pm-badge { display: inline-block; background: var(--pm-gold); color: #3a2a00; font-weight: 700; font-size: .8rem; padding: 3px 12px; border-radius: 30px; margin-bottom: 6px; }
.pm-welcome h2 { font-size: clamp(1.2rem, 2.4vw, 1.7rem); font-weight: 700; color: var(--pm-ink); margin: 0 0 4px; }
.pm-welcome p { margin: 0; color: var(--pm-muted); }
.pm-welcome .act .pm-btn { display: inline-block; padding: 10px 22px; border-radius: 40px; font-weight: 600; text-decoration: none; margin: 4px 6px 4px 0; transition: transform .2s, box-shadow .2s; }
.pm-btn.ghost { background: #e8f5ed; color: var(--pm-green-d); }
@media (max-width: 575px) { .pm-welcome { padding: 16px; } .pm-welcome .act { width: 100%; } }
.pm-hero .pm-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 32, 15, .15) 0%, rgba(7, 32, 15, .78) 100%); }
.pm-hero .pm-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(18px, 4vw, 48px); color: #fff; z-index: 3; }
.pm-hero .pm-badge { display: inline-block; background: var(--pm-gold); color: #3a2a00; font-weight: 700; font-size: .85rem; padding: 4px 14px; border-radius: 30px; margin-bottom: 12px; }
.pm-hero h2 { font-size: clamp(1.4rem, 3.6vw, 2.6rem); font-weight: 700; margin: 0 0 8px; text-shadow: 0 3px 14px rgba(0, 0, 0, .45); }
.pm-hero p { font-size: clamp(.95rem, 1.6vw, 1.15rem); opacity: .92; margin-bottom: 16px; max-width: 720px; }
.pm-hero .pm-btn { display: inline-block; padding: 11px 24px; border-radius: 40px; font-weight: 600; text-decoration: none; margin-right: 10px; margin-bottom: 8px; transition: transform .2s, box-shadow .2s; }
.pm-btn.gold { background: var(--pm-gold); color: #2d2100; }
.pm-btn.glass { background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .5); backdrop-filter: blur(6px); }
.pm-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0, 0, 0, .3); color: inherit; }
.pm-hero .carousel-control-prev, .pm-hero .carousel-control-next { width: 56px; z-index: 4; }
.pm-hero .carousel-indicators { z-index: 4; margin-bottom: 10px; }

.pm-hero-fallback { height: clamp(260px, 40vw, 440px); background: radial-gradient(circle at 20% 20%, #1fa653, transparent 45%), radial-gradient(circle at 85% 80%, rgba(212, 160, 23, .6), transparent 40%), linear-gradient(135deg, var(--pm-ink), var(--pm-green-d)); }

/* ticker */
.pm-ticker { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--pm-line); border-radius: 14px; margin-top: 18px; padding: 8px 14px; box-shadow: var(--pm-shadow); overflow: hidden; }
.pm-ticker .tag { background: var(--pm-green); color: #fff; font-weight: 700; padding: 4px 14px; border-radius: 30px; white-space: nowrap; font-size: .9rem; }
.pm-ticker marquee { color: var(--pm-text); }

/* stats */
.pm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-top: 26px; }
.pm-stat { background: #fff; border: 1px solid var(--pm-line); border-radius: var(--pm-radius); padding: 20px; display: flex; align-items: center; gap: 14px; box-shadow: var(--pm-shadow); transition: transform .25s, box-shadow .25s; }
.pm-stat:hover { transform: translateY(-5px); box-shadow: var(--pm-shadow-h); }
.pm-stat .ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 1.4rem; background: linear-gradient(135deg, #e8f5ed, #cfeedd); color: var(--pm-green-d); }
.pm-stat b { display: block; font-size: 1.9rem; line-height: 1; color: var(--pm-ink); }
.pm-stat span { color: var(--pm-muted); font-size: .92rem; }

/* section heading */
.pm-sec { margin-top: 54px; }
.pm-h { text-align: center; margin-bottom: 28px; }
.pm-h small { color: var(--pm-gold); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; }
.pm-h h3 { font-weight: 700; color: var(--pm-ink); margin: 4px 0 0; font-size: clamp(1.4rem, 2.6vw, 2rem); }
.pm-h h3::after { content: ''; display: block; width: 70px; height: 4px; margin: 12px auto 0; border-radius: 4px; background: linear-gradient(90deg, var(--pm-gold), var(--pm-green)); }

/* quick access */
.pm-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.pm-q { background: #fff; border: 1px solid var(--pm-line); border-radius: var(--pm-radius); padding: 24px 12px; text-align: center; text-decoration: none; color: var(--pm-ink); font-weight: 600; box-shadow: var(--pm-shadow); transition: all .25s; position: relative; overflow: hidden; }
.pm-q i { display: grid; place-items: center; width: 62px; height: 62px; margin: 0 auto 12px; border-radius: 20px; font-size: 1.6rem; color: #fff; background: linear-gradient(135deg, var(--pm-green), var(--pm-green-d)); transition: transform .3s; }
.pm-q:hover { transform: translateY(-6px); box-shadow: var(--pm-shadow-h); color: var(--pm-green-d); }
.pm-q:hover i { transform: rotate(-8deg) scale(1.08); background: linear-gradient(135deg, var(--pm-gold), #b88400); }

/* notices + message */
.pm-grid2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; }
@media (max-width: 991px) { .pm-grid2 { grid-template-columns: 1fr; } }
.pm-panel { background: #fff; border: 1px solid var(--pm-line); border-radius: var(--pm-radius); box-shadow: var(--pm-shadow); overflow: hidden; }
.pm-panel > h4 { margin: 0; padding: 16px 22px; font-size: 1.1rem; font-weight: 700; color: #fff; background: linear-gradient(120deg, var(--pm-green-d), var(--pm-green)); }
.pm-notice { display: flex; gap: 14px; padding: 15px 22px; border-bottom: 1px solid var(--pm-line); text-decoration: none; color: var(--pm-text); transition: background .2s; }
.pm-notice:hover { background: #f1faf4; }
.pm-notice .d { flex: 0 0 56px; text-align: center; background: #e8f5ed; border-radius: 12px; padding: 6px 0; color: var(--pm-green-d); line-height: 1.1; }
.pm-notice .d b { display: block; font-size: 1.35rem; }
.pm-notice .d small { font-size: .72rem; }
.pm-notice .t { font-weight: 600; }
.pm-msg { text-align: center; padding: 26px 22px; }
.pm-msg img { width: 116px; height: 116px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; outline: 3px solid var(--pm-gold); box-shadow: var(--pm-shadow); margin-bottom: 12px; }
.pm-msg .nm { font-weight: 700; font-size: 1.15rem; color: var(--pm-ink); }
.pm-msg .rl { color: var(--pm-green-d); font-weight: 600; margin-bottom: 10px; }
.pm-msg p { color: var(--pm-muted); font-size: .95rem; }

/* info cards */
.pm-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
.pm-card { background: #fff; border: 1px solid var(--pm-line); border-radius: var(--pm-radius); overflow: hidden; box-shadow: var(--pm-shadow); transition: all .3s; display: flex; flex-direction: column; }
.pm-card:hover { transform: translateY(-7px); box-shadow: var(--pm-shadow-h); }
.pm-card .im { height: 170px; background: linear-gradient(135deg, var(--pm-green-d), var(--pm-green)); display: grid; place-items: center; color: rgba(255, 255, 255, .85); font-size: 3.4rem; overflow: hidden; }
.pm-card .im img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.pm-card:hover .im img { transform: scale(1.08); }
.pm-card .bd { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.pm-card h5 { font-weight: 700; color: var(--pm-ink); }
.pm-card p { color: var(--pm-muted); font-size: .95rem; flex: 1; }
.pm-card ul { list-style: none; padding: 0; margin: 0 0 10px; }
.pm-card li a { display: block; padding: 6px 0; text-decoration: none; color: var(--pm-text); border-bottom: 1px dashed var(--pm-line); }
.pm-card li a:hover { color: var(--pm-green); padding-left: 4px; }

/* gallery */
.pm-gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.pm-gal a { position: relative; display: block; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; box-shadow: var(--pm-shadow); }
.pm-gal img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.pm-gal a::after { content: '\f00e'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 1.8rem; background: rgba(13, 92, 44, .55); opacity: 0; transition: opacity .3s; }
.pm-gal a:hover img { transform: scale(1.1); }
.pm-gal a:hover::after { opacity: 1; }

/* links & hotline */
.pm-list a { display: flex; align-items: center; gap: 10px; padding: 11px 22px; text-decoration: none; color: var(--pm-text); border-bottom: 1px solid var(--pm-line); }
.pm-list a:hover { background: #f1faf4; color: var(--pm-green-d); }
.pm-list i { color: var(--pm-gold); }

/* student CTA */
.pm-cta { margin-top: 54px; border-radius: 26px; padding: clamp(26px, 5vw, 54px); color: #fff; position: relative; overflow: hidden; background: radial-gradient(circle at 90% 10%, rgba(212, 160, 23, .55), transparent 40%), linear-gradient(120deg, var(--pm-ink), var(--pm-green-d) 60%, var(--pm-green)); box-shadow: var(--pm-shadow-h); }
.pm-cta h3 { font-weight: 700; margin-bottom: 8px; }
.pm-cta p { opacity: .9; max-width: 620px; }

/* reveal animation */
.pm-rev { opacity: 0; transform: translateY(26px); transition: opacity .7s, transform .7s; }
.pm-rev.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .pm-rev { opacity: 1; transform: none; transition: none; } }

/* ================= RESPONSIVE (phone → tablet → desktop → wide) ================= */
img { max-width: 100%; }
.table-responsive, .content-section table { max-width: 100%; }
@media (max-width: 991px) {
    .top-bar .row > div { text-align: center !important; padding: 2px 8px; }
    .top-bar a { margin: 0 8px; }
    .header-content { text-align: center; padding: 18px 12px !important; }
    .header-content .d-flex { flex-direction: column; gap: 10px; }
    .header-content img { max-height: 76px !important; margin: 0 !important; }
    .school-name { font-size: 1.55rem !important; }
    .search-box { margin-top: 12px; text-align: center !important; }
    .navbar .container { padding: 6px 12px; }
    .navbar .navbar-collapse { background: rgba(7, 32, 15, .98) !important; border-radius: 14px; margin-top: 8px; padding: 8px !important; max-height: 70vh; overflow-y: auto; }
    .navbar .nav-link::after { display: none; }
    .navbar .dropdown-menu { background: rgba(255, 255, 255, .06) !important; box-shadow: none; border: 0 !important; }
    .navbar .dropdown-item { color: #d9eadf !important; }
    .navbar .dropdown-item:hover { background: rgba(255, 255, 255, .1) !important; color: #fff !important; }
}
@media (max-width: 575px) {
    .pm-wrap { padding: 0 10px; }
    .pm-hero { border-radius: 18px; margin-top: 12px; }
    .pm-hero .pm-btn { padding: 9px 16px; font-size: .9rem; }
    .pm-hero .carousel-control-prev, .pm-hero .carousel-control-next { width: 36px; }
    .pm-sec { margin-top: 36px; }
    .pm-stat { padding: 14px; gap: 10px; }
    .pm-stat b { font-size: 1.5rem; }
    .pm-quick { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .pm-q { padding: 18px 8px; font-size: .95rem; }
    .pm-gal { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .pm-notice { padding: 12px 14px; }
    .pm-cta { border-radius: 18px; text-align: center; }
    .pm-cta .pm-btn { margin: 4px; }
    #footer .footer { padding-top: 40px !important; text-align: center; }
    #footer .footer-title::after { left: 50%; transform: translateX(-50%); }
    #footer .social-links { justify-content: center; display: flex; }
}
@media (min-width: 1400px) { .pm-wrap { max-width: 1320px; } }
/* big screens / TV */
@media (min-width: 1900px) { html { font-size: 18px; } .pm-wrap { max-width: 1560px; } }
/* printing */
@media print { .top-bar, .navbar, #footer, .pm-hero, .pm-cta { display: none !important; } body { background: #fff !important; } }

/* people / messages grid */
.pm-people { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 20px; }
.pm-person { background: #fff; border: 1px solid var(--pm-line); border-radius: var(--pm-radius); padding: 24px 14px 20px; text-align: center; box-shadow: var(--pm-shadow); transition: transform .25s, box-shadow .25s; }
.pm-person:hover { transform: translateY(-6px); box-shadow: var(--pm-shadow-h); }
.pm-person img, .pm-person .ph { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; margin: 0 auto 12px; display: block; border: 4px solid #fff; outline: 3px solid var(--pm-gold); box-shadow: var(--pm-shadow); }
.pm-person .ph { display: grid; place-items: center; background: #e8f5ed; color: var(--pm-green); font-size: 2.4rem; }
.pm-person .role { color: var(--pm-green-d); font-weight: 600; font-size: .95rem; }
.pm-person .nm { font-weight: 700; color: var(--pm-ink); margin: 2px 0 12px; }
@media (max-width: 575px) { .pm-people { grid-template-columns: repeat(2, 1fr); gap: 12px; } .pm-person { padding: 16px 8px; } .pm-person img, .pm-person .ph { width: 88px; height: 88px; } }

/* ================= sticky header (always visible; shrinks when scrolling) ================= */
.pm-sticky-head { position: sticky; top: 0; z-index: 1030; padding: 0 !important; box-shadow: 0 6px 22px rgba(11, 46, 26, .18); }
.pm-sticky-head .navbar, .pm-sticky-head .navbar.sticky-top { position: relative !important; top: auto !important; }
.pm-sticky-head .top-bar, .pm-sticky-head .header-content { transition: padding .25s ease; }
.pm-sticky-head.pm-compact .top-bar { display: none; }
.pm-sticky-head.pm-compact .header-content { padding-top: 8px !important; padding-bottom: 8px !important; }
.pm-sticky-head.pm-compact .school-name { font-size: 1.25rem !important; }
.pm-sticky-head.pm-compact .header-content::before, .pm-sticky-head.pm-compact .header-content::after { display: none; }
.pm-sticky-head.pm-compact .navbar .nav-link { padding-top: 10px !important; padding-bottom: 10px !important; }
@media (max-width: 991px) {
    .pm-sticky-head.pm-compact .header-content { display: none; }
}

/* logo: only the round emblem, large, with a clean white ring so it stands out on green */
.pm-logo { flex: none; display: inline-block; width: 124px; height: 124px; border-radius: 50%; overflow: hidden; background: #fff; border: 4px solid #fff; box-shadow: 0 10px 28px rgba(0, 0, 0, .38), 0 0 0 5px rgba(255, 255, 255, .22); transition: width .25s, height .25s; }
.pm-logo img { display: block; width: 100%; height: 100%; max-height: none !important; object-fit: cover; transform: scale(1.12); transform-origin: 50% 48.8%; background: transparent !important; padding: 0 !important; border-radius: 0 !important; box-shadow: none !important; image-rendering: -webkit-optimize-contrast; }
.pm-sticky-head.pm-compact .pm-logo { width: 54px; height: 54px; border-width: 2px; box-shadow: 0 4px 12px rgba(0, 0, 0, .3); }
@media (max-width: 991px) { .pm-logo { width: 92px; height: 92px; } }
@media (max-width: 575px) { .pm-logo { width: 80px; height: 80px; } }
/* footer logo (kept simple) */
#footer .footer img.img-fluid { max-height: 96px !important; background: transparent !important; padding: 0 !important; border-radius: 0 !important; box-shadow: none !important; clip-path: circle(44.6% at 50% 48.8%); transform: scale(1.12); transform-origin: 50% 48.8%; }

/* page column wrapper (header is now closed properly, so the sticky part is its own box) */
.pm-page { padding: 0 !important; }
.pm-sticky-head { padding: 0 !important; }
/* safety: never leave content invisible if the scroll-reveal script cannot run */
@media (scripting: none) { .pm-rev { opacity: 1; transform: none; } }

/* gallery: 4 columns so 8 photos make two full rows (2 columns on phones) */
.pm-gal { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 575px) { .pm-gal { grid-template-columns: repeat(2, 1fr); } }

/* bigger logo so the ring text is easier to read; click opens the full-size file */
.pm-logo { width: 156px; height: 156px; }
.pm-logo img { filter: contrast(1.06) saturate(1.05); }
@media (max-width: 991px) { .pm-logo { width: 108px; height: 108px; } }
@media (max-width: 575px) { .pm-logo { width: 88px; height: 88px; } }
.pm-sticky-head.pm-compact .pm-logo { width: 54px; height: 54px; }

/* clean vector logo (public/images/logo-clean.svg): no white ring, no crop; ring text is bigger so it stays readable */
.pm-logo.clean { width: 128px; height: 128px; background: transparent; border: 0; border-radius: 0; overflow: visible; box-shadow: none; }
.pm-logo.clean img { object-fit: contain; transform: none; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35)); }
.pm-sticky-head.pm-compact .pm-logo.clean { width: 54px; height: 54px; box-shadow: none; }
@media (max-width: 991px) { .pm-logo.clean { width: 96px; height: 96px; } }
@media (max-width: 575px) { .pm-logo.clean { width: 80px; height: 80px; } }
#footer .footer img.logo-clean { clip-path: none; transform: none; max-height: 110px !important; }

/* ===== slider: auto-fit (whole image always visible, no cropping) ===== */
.pm-hero .carousel-item { position: relative; overflow: hidden; background: #0b2e1a; aspect-ratio: 1320 / 450; }
.pm-hero .carousel-item .bg { position: absolute; inset: -24px; background-size: cover; background-position: center; filter: blur(22px) brightness(.72) saturate(1.1); transform: scale(1.06); }
.pm-hero .carousel-item img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 767px) { .pm-hero .carousel-item { aspect-ratio: 16 / 9; } }
@media (max-width: 575px) { .pm-hero .carousel-item { aspect-ratio: 4 / 3; } }
.pm-hero .carousel-item-next, .pm-hero .carousel-item-prev, .pm-hero .carousel-item.active { display: block; }

/* ===== slider v2: image fills the full width; height follows each picture (true auto-fit) ===== */
.pm-hero .carousel-item { aspect-ratio: auto; background: #0b2e1a; }
.pm-hero .carousel-item img { width: 100%; height: auto; max-height: 640px; object-fit: contain; }
.pm-hero .carousel-item .bg { display: block; }
@media (max-width: 767px) { .pm-hero .carousel-item { aspect-ratio: auto; } .pm-hero .carousel-item img { max-height: 460px; } }
@media (max-width: 575px) { .pm-hero .carousel-item { aspect-ratio: auto; } .pm-hero .carousel-item img { max-height: 340px; } }

/* slides that are still waiting to load keep a sensible height (no jump when the picture arrives) */
.pm-hero .carousel-item img[data-src] { aspect-ratio: 1320 / 450; height: auto; }

/* ===== slider v3: real side-slide, height follows each picture (set by script), page never jumps ===== */
.pm-hero .carousel-inner { aspect-ratio: 1320 / 450; overflow: hidden; transition: height .5s ease; }
.pm-hero .carousel-item { height: 100%; aspect-ratio: auto !important; }
.pm-hero .carousel-item img { height: 100% !important; max-height: none !important; width: 100%; object-fit: contain; }
.pm-hero .carousel-item img[data-src] { aspect-ratio: auto; }

/* ===== header block: rounded like the slider and exactly as wide as it ===== */
.pm-sticky-head { border-radius: 18px; }
.pm-sticky-head .top-bar { border-radius: 18px 18px 0 0; }
.pm-sticky-head .navbar, .pm-sticky-head .navbar .container { border-radius: 0 0 18px 18px; }
.pm-sticky-head.pm-compact .header-content { border-radius: 18px 18px 0 0; }
.pm-hero { border-radius: 18px; }
/* same side edges for header and slider on every screen */
.pm-wrap { padding-left: 0; padding-right: 0; }
@media (max-width: 991px) { .pm-page { padding-left: 12px !important; padding-right: 12px !important; } .pm-sticky-head { border-radius: 14px; } .pm-sticky-head .top-bar { border-radius: 14px 14px 0 0; } .pm-sticky-head .navbar, .pm-sticky-head .navbar .container { border-radius: 0 0 14px 14px; } }

/* ===== slider v4: FIXED height (page never moves). Every picture is shown whole; soft blurred sides/top fill any gap ===== */
.pm-hero .carousel-inner { height: auto !important; aspect-ratio: 2.2 / 1; transition: none; overflow: hidden; }
.pm-hero .carousel-item { height: 100%; }
.pm-hero .carousel-item img { height: 100% !important; width: 100%; object-fit: contain; }
@media (max-width: 767px) { .pm-hero .carousel-inner { aspect-ratio: 2.1 / 1; } }
@media (max-width: 575px) { .pm-hero .carousel-inner { aspect-ratio: 2 / 1; } }
/* never let the hero get taller than the screen */
.pm-hero .carousel-inner { max-height: 78vh; }

/* header shrinking on scroll is animated instead of snapping (no sudden jump) */
.pm-sticky-head .top-bar { max-height: 60px; overflow: hidden; transition: max-height .25s ease, padding .25s ease; }
.pm-sticky-head.pm-compact .top-bar { display: block !important; max-height: 0; padding-top: 0; padding-bottom: 0; }
.pm-sticky-head .header-content, .pm-sticky-head .school-name, .pm-sticky-head .navbar .nav-link { transition: padding .25s ease, font-size .25s ease; }

/* ===== header v3: FIXED to the top + spacer in the page => shrinking/growing the header never moves anything below it ===== */
.pm-head-spacer { height: 268px; }                      /* real height is set by script; this is only a safe default */
.pm-sticky-head { position: fixed !important; top: 0; left: 0; width: 100%; z-index: 1030; }
.pm-sticky-head .navbar, .pm-sticky-head .navbar.sticky-top { position: relative !important; }

/* ===== footer: rounded corners like the header and the slider ===== */
#footer { padding-bottom: 18px; }
#footer .footer { border-radius: 18px; overflow: hidden; margin-top: 40px; }
@media (max-width: 991px) { #footer .footer { border-radius: 14px; } }

/* clickable counter cards */
a.pm-stat.link { text-decoration: none; color: inherit; cursor: pointer; position: relative; }
a.pm-stat.link .go { margin-left: auto; color: var(--pm-green); opacity: .35; transition: transform .25s, opacity .25s; }
a.pm-stat.link:hover { border-color: var(--pm-green); }
a.pm-stat.link:hover .go { opacity: 1; transform: translateX(4px); }
a.pm-stat.link:hover .ic { background: linear-gradient(135deg, var(--pm-green), var(--pm-green-d)); color: #fff; }
a.pm-stat.link:focus-visible { outline: 3px solid var(--pm-gold); outline-offset: 2px; }

/* notices | recruitment | headmaster message — three panels side by side */
.pm-grid3 { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 22px; align-items: start; }
.pm-grid3 .pm-notice .t { font-size: .97rem; }
@media (max-width: 1199px) { .pm-grid3 { grid-template-columns: 1fr 1fr; } .pm-grid3 > .pm-panel:last-child { grid-column: 1 / -1; } }
@media (max-width: 767px)  { .pm-grid3 { grid-template-columns: 1fr; } }

/* ===== three panels: equal width, equal height, "see all" buttons on one line ===== */
.pm-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
.pm-grid3 > .pm-panel { display: flex; flex-direction: column; height: 100%; }
.pm-grid3 > .pm-panel > .p-3.text-end { margin-top: auto; border-top: 1px solid var(--pm-line); }
.pm-grid3 > .pm-panel .pm-msg { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
@media (max-width: 1199px) { .pm-grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pm-grid3 > .pm-panel:last-child { grid-column: 1 / -1; height: auto; } }
@media (max-width: 767px)  { .pm-grid3 { grid-template-columns: 1fr; } .pm-grid3 > .pm-panel { height: auto; } }
