/* ==========================================================
   Q-Max Public School – public website theme
   Layout modelled on a university department site
   (slider + notification row, centred about, counter band,
   staff cards, events row, dark grey footer).
   Brand colour is used only for the menu and small accents.
   ========================================================== */
:root {
    --qm-primary: #5F080A;        /* Q-Max maroon – menu bar, buttons */
    --qm-primary-dark: #450608;
    --qm-primary-hover: #7A1B1D;
    --qm-accent: #B9282C;         /* small highlights only */
    --qm-gold: #F3C102;
    --qm-ink: #222222;
    --qm-head: #333333;
    --qm-text: #4a4a4a;
    --qm-muted: #808080;
    --qm-grey: #f7f7f7;
    --qm-grey-2: #f1f1f1;
    --qm-line: #e5e5e5;
    --qm-badge: #5bc0de;
    --qm-footer: #232323;
}

html { font-size: 100%; }
body {
    font-family: "Open Sans", Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: var(--qm-text);
    background: #fefefe;
}
h1, h2, h3, h4, h5, h6 { font-family: "Open Sans", sans-serif; color: var(--qm-head); }
a { color: var(--qm-primary); text-decoration: none; }
a:hover { color: var(--qm-accent); }
img { max-width: 100%; }
::selection { background: var(--qm-head); color: #fff; }
.text-justify { text-align: justify; }

/* ---------- Buttons & forms ---------- */
.btn { border-radius: 0; font-weight: 600; font-size: 13px; padding: 8px 22px; }
.btn-sm { padding: 4px 14px; font-size: 12px; }
.btn-maroon { background: var(--qm-primary); color: #fff; border: 1px solid var(--qm-primary); }
.btn-maroon:hover, .btn-maroon:focus { background: var(--qm-primary-hover); border-color: var(--qm-primary-hover); color: #fff; }
.btn-outline-maroon { border: 1px solid #bbb; color: var(--qm-head); background: #fff; }
.btn-outline-maroon:hover { background: var(--qm-head); border-color: var(--qm-head); color: #fff; }
.btn-dark-flat { background: var(--qm-head); color: #fff; border: 0; }
.btn-dark-flat:hover { background: var(--qm-primary); color: #fff; }
.btn-gold { background: var(--qm-gold); color: var(--qm-ink); border: 1px solid var(--qm-gold); }
.btn-gold:hover { background: #ffd43b; color: var(--qm-ink); }
.form-control, .form-select { border-radius: 0; min-height: 42px; border-color: #cfcfcf; }
.form-control:focus, .form-select:focus { border-color: #999; box-shadow: 0 0 3px rgba(0,0,0,.1); }
.alert { border-radius: 0; }

/* ---------- Top bar ---------- */
.topbar { background: var(--qm-primary-dark); color: #e9dcdc; font-size: 12.5px; padding: 5px 0; border-top: 3px solid var(--qm-gold); }
.topbar ul li { padding: 0 12px; line-height: 1.2; position: relative; }
.topbar ul li + li::before { content: ""; position: absolute; left: -2px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: rgba(255,255,255,.4); }
.topbar ul li:first-child { padding-left: 0; }
.topbar ul li:last-child { padding-right: 0; }
.topbar a { color: #fff; }
.topbar a:hover { color: var(--qm-gold); }
.topbar i { color: var(--qm-gold); margin-right: 3px; }

/* ---------- Header ---------- */
.site-header { background: #fff; padding: 12px 0; }
.brand-logo { height: 82px; width: auto; transition: transform .3s; }
.site-header a:hover .brand-logo { transform: scale(1.03); }
.brand-mark { width: 62px; height: 62px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--qm-primary); color: var(--qm-gold); font: 700 36px/1 "Titillium Web", sans-serif; border-radius: 50%; }
.brand-name { font: 700 24px/1.1 "Titillium Web", sans-serif; color: var(--qm-ink); }
.brand-tag { flex-direction: column; justify-content: center; margin-left: 16px; line-height: 1.35; }
.brand-tag span { font: italic 17px "Playfair Display", serif; color: var(--qm-ink); }
.brand-tag small { font-size: 12px; color: var(--qm-muted); letter-spacing: .3px; }
.header-widgets { gap: 26px; flex-shrink: 0; }
.hw-item { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.hw-item i { font-size: 17px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--qm-line); display: flex; align-items: center; justify-content: center; color: var(--qm-primary); transition: .25s; }
a.hw-item:hover i { background: var(--qm-primary); border-color: var(--qm-primary); color: #fff; }
.hw-item small { display: block; color: var(--qm-muted); font-size: 11px; text-transform: uppercase; font-weight: 600; letter-spacing: .4px; }
.hw-item strong { color: var(--qm-head); font-size: 13.5px; font-weight: 600; white-space: nowrap; }

/* ---------- Navigation ---------- */
.main-nav { background: var(--qm-primary); padding: 0; transition: box-shadow .3s; }
.main-nav.is-stuck { box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.main-nav .navbar-nav { gap: 2px; }
.main-nav .nav-link { position: relative; color: #fff !important; font-weight: 700; font-size: 13px; letter-spacing: .4px; text-transform: uppercase; padding: 17px 16px !important; transition: background .25s; }
.main-nav .nav-link::before { content: ""; position: absolute; left: 50%; right: 50%; bottom: 0; height: 3px; background: var(--qm-gold); transition: left .3s ease, right .3s ease; }
.main-nav .nav-link:hover::before, .main-nav .nav-link.active::before, .main-nav .nav-item.show > .nav-link::before { left: 14px; right: 14px; }
.main-nav .nav-link:hover, .main-nav .nav-item.show > .nav-link { background: rgba(0,0,0,.15); }
.main-nav .dropdown-toggle::after { display: none; }
.nav-caret { font-size: 9px; margin-left: 4px; vertical-align: 2px; transition: transform .3s; opacity: .85; }
.main-nav .dropdown:hover .nav-caret, .main-nav .dropdown.show .nav-caret { transform: rotate(180deg); }

/* dropdown panels */
.main-nav .dropdown-menu { background: #fff; border: 0; border-radius: 0 0 6px 6px; padding: 8px 0; margin: 0; min-width: 270px; box-shadow: 0 14px 34px rgba(0,0,0,.16); border-top: 3px solid var(--qm-gold); }
.main-nav .dropdown-item { display: flex; align-items: flex-start; gap: 12px; color: var(--qm-head); font-weight: 600; font-size: 13.5px; padding: 9px 20px; white-space: normal; transition: background .2s, padding .2s, color .2s; }
.main-nav .dropdown-item > i { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 6px; background: var(--qm-grey-2); color: var(--qm-primary); display: flex; align-items: center; justify-content: center; font-size: 13px; transition: .2s; }
.main-nav .dropdown-item span { display: flex; flex-direction: column; line-height: 1.3; padding-top: 1px; }
.main-nav .dropdown-item small { font-weight: 400; font-size: 11.5px; color: var(--qm-muted); margin-top: 2px; }
.main-nav .dropdown-item:hover, .main-nav .dropdown-item:focus { background: var(--qm-grey); color: var(--qm-primary); padding-left: 24px; }
.main-nav .dropdown-item:hover > i { background: var(--qm-primary); color: #fff; }
.main-nav .dropdown-divider { margin: 6px 0; border-color: #eee; }

/* mega menu (About) */
.mega-menu { padding: 0 !important; overflow: hidden; }
.mega-col { padding: 18px 8px; }
.mega-title { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--qm-muted); font-weight: 700; margin: 0 20px 8px; }
.main-nav .leader img, .main-nav .leader > i { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--qm-grey-2); }
.main-nav .leader > i { display: flex; align-items: center; justify-content: center; color: #bbb; }
.mega-promo { display: flex; align-items: flex-end; height: 100%; min-height: 230px; background: var(--qm-head) center/cover no-repeat; position: relative; text-decoration: none; }
.mega-promo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.75)); transition: .3s; }
.mega-promo:hover::before { background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.85)); }
.mega-promo-text { position: relative; padding: 20px; color: #fff; display: flex; flex-direction: column; gap: 2px; }
.mega-promo-text small { color: var(--qm-gold); font-weight: 700; text-transform: uppercase; font-size: 11px; letter-spacing: 1px; }
.mega-promo-text strong { font: 600 20px/1.2 "Raleway", sans-serif; }
.mega-promo-text em { font-style: normal; font-size: 12.5px; opacity: .85; margin-top: 6px; }

/* sticky mini logo + CTA */
.nav-mini-logo { display: none; }
.nav-cta { font-size: 12px !important; padding: 7px 16px !important; border-radius: 30px !important; white-space: nowrap; box-shadow: 0 3px 10px rgba(0,0,0,.18); transition: transform .2s, box-shadow .2s; }
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.25); }

@media (min-width: 992px) {
    /* animated hover dropdowns on desktop */
    .main-nav .dropdown-menu { display: block; opacity: 0; visibility: hidden; transform: translateY(14px); pointer-events: none;
        transition: opacity .28s ease, transform .28s ease, visibility .28s; top: 100%; }
    .main-nav .dropdown:hover > .dropdown-menu, .main-nav .dropdown-menu.show { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
    .main-nav .dropdown-menu .dropdown-item { opacity: 0; transform: translateX(-6px); transition: opacity .3s, transform .3s, background .2s, padding .2s, color .2s; }
    .main-nav .dropdown:hover .dropdown-item, .main-nav .dropdown-menu.show .dropdown-item { opacity: 1; transform: none; }
    .main-nav .dropdown:hover li:nth-child(2) .dropdown-item { transition-delay: .03s; }
    .main-nav .dropdown:hover li:nth-child(3) .dropdown-item { transition-delay: .06s; }
    .main-nav .dropdown:hover li:nth-child(4) .dropdown-item { transition-delay: .09s; }
    .main-nav .dropdown:hover li:nth-child(5) .dropdown-item { transition-delay: .12s; }
    .main-nav .dropdown:hover li:nth-child(6) .dropdown-item { transition-delay: .15s; }
    .main-nav .dropdown-mega { position: static; }
    .main-nav .mega-menu { left: 12px; right: 12px; width: auto; }
    .main-nav .dropdown-item:hover { padding-left: 24px; }

    .main-nav .nav-mini-logo { display: flex; align-items: center; width: 0; overflow: hidden; opacity: 0; transition: width .35s ease, opacity .35s ease, margin .35s; }
    .main-nav .nav-mini-logo img { height: 40px; background: #fff; border-radius: 6px; padding: 2px 4px; }
    .main-nav .nav-mini-logo span { width: 38px; height: 38px; border-radius: 50%; background: var(--qm-gold); color: var(--qm-primary); font-weight: 700; display: flex; align-items: center; justify-content: center; }
    .main-nav.is-stuck .nav-mini-logo { width: 92px; opacity: 1; margin-right: 10px; }
}
@media (max-width: 1199px) and (min-width: 992px) {
    .main-nav .nav-link { padding: 16px 10px !important; font-size: 12.5px; }
    .nav-cta { display: none; }
}

/* ---------- Home: slider + notification row (boxed) ---------- */
.home-top { background: var(--qm-grey); padding: 22px 0; }
.home-top-row { background: #fff; box-shadow: 0 8px 28px rgba(0,0,0,.08); }
.hero { position: relative; }
.hero .carousel-item { aspect-ratio: 16 / 9; max-height: 500px; width: 100%; background: #2a2a2a; overflow: hidden; }
.hero .carousel-item img { width: 100%; height: 100%; object-fit: cover; }
.hero .carousel-item.active img { animation: kenburns 7s ease-out both; }
@keyframes kenburns { from { transform: scale(1.1); } to { transform: scale(1); } }
.hero .carousel-item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.55)); }
.hero .carousel-caption { left: 0; right: 0; top: 50%; bottom: auto; transform: translateY(-50%); text-align: center; z-index: 2; padding: 0 60px; }
.hero .carousel-caption > * { opacity: 0; }
.hero .carousel-item.active .carousel-caption > * { animation: capUp .8s ease both; }
.hero .carousel-item.active .carousel-caption .label { animation-delay: .25s; }
.hero .carousel-item.active .carousel-caption p { animation-delay: .45s; }
@keyframes capUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.hero .carousel-caption .welcome { display: block; color: #fff; font: 800 44px/1 "Raleway", "Open Sans", sans-serif; letter-spacing: 3px; text-transform: uppercase; text-shadow: 0 2px 12px rgba(0,0,0,.4); }
.hero .carousel-caption .label { display: inline-block; margin-top: 14px; background: rgba(30,30,30,.82); color: #fff; padding: 7px 20px;
    font: 600 19px/1.3 "Raleway", "Open Sans", sans-serif; text-transform: uppercase; letter-spacing: 1px; border-radius: 4px; border-bottom: 3px solid var(--qm-gold); }
.hero .carousel-caption p { margin: 12px 0 0; font-size: 15px; color: #f2f2f2; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.hero-fallback { width: 100%; height: 100%; background: linear-gradient(135deg, #3a3a3a, #1e1e1e); }

/* prev / next – appear on hover */
.hero .carousel-control-prev, .hero .carousel-control-next { width: 44px; height: 44px; top: 50%; transform: translateY(-50%); border-radius: 50%; background: rgba(0,0,0,.35);
    color: #fff; font-size: 15px; opacity: 0; transition: opacity .3s, background .3s, left .3s, right .3s; z-index: 3; }
.hero .carousel-control-prev { left: 4px; }
.hero .carousel-control-next { right: 4px; }
.hero:hover .carousel-control-prev { opacity: 1; left: 16px; }
.hero:hover .carousel-control-next { opacity: 1; right: 16px; }
.hero .carousel-control-prev:hover, .hero .carousel-control-next:hover { background: var(--qm-gold); color: var(--qm-ink); }

/* bar indicators with thumbnail preview on hover */
.hero-thumbs { margin-bottom: 18px; z-index: 4; }
.hero-thumbs [data-bs-target] { position: relative; width: 34px; height: 4px; margin: 0 4px; padding: 0; border: 0; border-top: 10px solid transparent; border-bottom: 10px solid transparent;
    background-color: rgba(255,255,255,.55); background-clip: padding-box; opacity: 1; text-indent: 0; transition: width .35s, background-color .35s; }
.hero-thumbs [data-bs-target].active { width: 52px; background-color: var(--qm-gold); }
.hero-thumbs [data-bs-target]:hover { background-color: #fff; }
.ind-thumb { position: absolute; left: 50%; bottom: 22px; width: 150px; transform: translate(-50%, 10px) scale(.92); opacity: 0; visibility: hidden; pointer-events: none;
    background: #fff; padding: 4px; border-radius: 6px; box-shadow: 0 10px 26px rgba(0,0,0,.35); transition: opacity .25s, transform .25s, visibility .25s; }
.ind-thumb::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: #fff; }
.ind-thumb img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px; }
.ind-thumb em { display: block; font-style: normal; font-size: 11px; font-weight: 600; color: var(--qm-ink); padding: 4px 2px 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.hero-thumbs [data-bs-target]:hover .ind-thumb { opacity: 1; visibility: visible; transform: translate(-50%, 0) scale(1); }
.hero-count { position: absolute; right: 18px; bottom: 18px; z-index: 4; color: rgba(255,255,255,.8); font-size: 12px; letter-spacing: 1px; }
.hero-count b { color: #fff; font-size: 16px; }

.notify-col { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 992px) {
    /* the notification panel takes exactly the slider's height */
    .home-top-row > .col-lg-4 { position: relative; }
    .home-top-row .notify-col { position: absolute; inset: 0; }
    .home-top-row .notify-list { flex: 1; min-height: 0; height: auto; }
}
.notify-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid var(--qm-head); padding-bottom: 6px; }
.notify-head h2 { font-size: 26px; font-weight: 500; color: var(--qm-primary); margin: 0; }
.notify-head .btn { font-size: 11px; padding: 4px 12px; background: var(--qm-head); color: #fff; }
.notify-head .btn:hover { background: var(--qm-primary); }
.notify-list { height: 230px; overflow: hidden; position: relative; }
.nb-track { animation: nb-up 28s linear infinite; }
.notify-list:hover .nb-track { animation-play-state: paused; }
@keyframes nb-up { from { transform: translateY(0); } to { transform: translateY(-50%); } }
.notify-item { padding: 8px 4px 9px; border-bottom: 1px solid var(--qm-line); font-size: 13px; }
.notify-item a { color: var(--qm-ink); font-weight: 600; }
.notify-item a:hover { color: var(--qm-primary); }
.notify-item a i { color: var(--qm-head); margin-right: 4px; font-size: 12px; }
.notify-item .meta { font-size: 12px; color: var(--qm-muted); margin-top: 2px; }
.notify-item .meta .badge { background: var(--qm-badge); font-weight: 600; font-size: 10px; border-radius: 2px; margin-left: 6px; }
.badge-new { background: var(--qm-accent); color: #fff; font-size: 9px; padding: 1px 5px; margin-left: 4px; border-radius: 2px; vertical-align: 1px; }
.notify-video { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; }
.notify-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.notify-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.notify-quick a { display: flex; align-items: center; gap: 10px; background: var(--qm-grey); border: 1px solid var(--qm-line); padding: 11px 12px; color: var(--qm-head); font-weight: 600; font-size: 13px; transition: .2s; }
.notify-quick a i { font-size: 18px; color: var(--qm-primary); width: 22px; text-align: center; transition: .2s; }
.notify-quick a:hover { background: var(--qm-head); color: #fff; border-color: var(--qm-head); }
.notify-quick a:hover i { color: var(--qm-gold); }

/* ---------- Section helpers ---------- */
section > .container { padding-top: 50px; padding-bottom: 50px; }
.bg-grey { background: var(--qm-grey); }
.sec-title { margin-bottom: 28px; }
.sec-title h2 { font-size: 30px; font-weight: 400; color: var(--qm-head); margin: 0 0 10px; }
.sec-title h2 span { color: var(--qm-primary); }
.sec-title::after { content: ""; display: block; width: 50px; height: 2px; background: var(--qm-head); }
.sec-title.center { text-align: center; }
.sec-title.center::after { margin: 0 auto; }
.sec-nav { display: flex; gap: 6px; }
.sec-nav button { width: 30px; height: 30px; border: 0; background: #e6e6e6; color: #777; font-size: 12px; }
.sec-nav button:hover { background: var(--qm-head); color: #fff; }
/* legacy helpers still used on inner pages */
.section-title { margin-bottom: 22px; }
.section-title h2, .section-title h3 { font-size: 24px; font-weight: 500; color: var(--qm-head); margin: 0; }
.line-bottom { position: relative; padding-bottom: 10px; margin-bottom: 18px; }
.line-bottom::after { content: ""; position: absolute; left: 0; bottom: 0; width: 45px; height: 2px; background: var(--qm-head); }
.text-center .line-bottom::after, .line-bottom.center::after { left: 50%; transform: translateX(-50%); }
.box { background: var(--qm-grey); padding: 22px 24px; }
.box-white { background: #fff; border: 1px solid var(--qm-line); padding: 22px 24px; }

/* ---------- About block ---------- */
.about-text { font-size: 14.5px; text-align: justify; }
.about-wrap { background: var(--qm-grey); padding: 26px 28px; margin-top: 26px; }
.about-wrap h4 { font-size: 17px; font-weight: 700; color: var(--qm-ink); margin: 0 0 6px; }
.about-wrap p { margin-bottom: 0; }
.panel-bar { background: var(--qm-head); color: #fff; padding: 10px 16px; font-size: 15px; font-weight: 600; margin-bottom: 0; }
.motto { font: italic 17px "Playfair Display", serif; color: var(--qm-ink); }

/* ---------- Counters ---------- */
.counters { position: relative; background-size: cover; background-position: center; background-attachment: fixed; color: #fff; }
.counters::before { content: ""; position: absolute; inset: 0; background: rgba(28, 28, 32, .82); }
.counters > .container { position: relative; padding-top: 34px; padding-bottom: 34px; }
.counter-box { text-align: center; }
.counter-box i { font-size: 30px; color: var(--qm-gold); }
.counter-box h2 { color: #fff; font-size: 40px; font-weight: 400; margin: 8px 0 4px; }
.counter-box h5 { color: #e0e0e0; font-size: 13px; text-transform: uppercase; letter-spacing: .6px; margin: 0; font-weight: 600; }

/* ---------- Horizontal card scroller ---------- */
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 20px) / 4); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding-bottom: 6px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; }
.hscroll.three { grid-auto-columns: calc((100% - 2 * 20px) / 3); }
@media (max-width: 991px) { .hscroll, .hscroll.three { grid-auto-columns: calc((100% - 20px) / 2); } }
@media (max-width: 575px) { .hscroll, .hscroll.three { grid-auto-columns: 78%; } }

/* ---------- Staff / people cards ---------- */
.person-card { background: var(--qm-grey); text-align: center; height: 100%; border-bottom: 3px solid var(--qm-head); transition: .25s; }
.person-card:hover { border-bottom-color: var(--qm-primary); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.person-card .pic { aspect-ratio: 1/1; overflow: hidden; background: #e8e8e8; display: flex; align-items: center; justify-content: center; }
.person-card .pic img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: .4s; }
.person-card .pic i { font-size: 64px; color: #c9c9c9; }
.person-card:hover .pic img { transform: scale(1.05); }
.person-card .info { padding: 12px 10px 16px; }
.person-card h5 { font-size: 15px; margin: 0 0 2px; color: var(--qm-primary); font-weight: 600; }
.person-card .desig { font-size: 12.5px; color: var(--qm-text); }
.person-card small { display: block; color: var(--qm-muted); font-size: 12px; }

/* ---------- Message cards (home) ---------- */
.msg-card { background: #fff; border: 1px solid var(--qm-line); display: flex; gap: 18px; padding: 20px; height: 100%; }
.msg-card img, .msg-card .ph { width: 110px; height: 130px; object-fit: cover; object-position: top; flex: 0 0 110px; background: var(--qm-grey); }
.msg-card .ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 40px; }
.msg-card h4 { font-size: 16px; color: var(--qm-ink); margin: 0; font-weight: 700; }
.msg-card .desig { font-size: 12px; color: var(--qm-muted); text-transform: uppercase; font-weight: 600; }
.msg-card p { font-size: 13.5px; margin: 8px 0; font-style: italic; }

/* ---------- Event / album cards ---------- */
.event-card { background: #fff; border: 1px solid var(--qm-line); height: 100%; display: flex; flex-direction: column; }
.event-card .thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--qm-grey-2); display: flex; align-items: center; justify-content: center; }
.event-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: .4s; }
.event-card .thumb i { font-size: 40px; color: #ccc; }
.event-card:hover .thumb img { transform: scale(1.06); }
.event-card .body { padding: 14px 16px; display: flex; flex-direction: column; flex: 1; }
.event-card h5 { font-size: 14.5px; font-weight: 600; color: var(--qm-ink); margin: 0 0 12px; flex: 1; }
.event-card .foot { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--qm-muted); }
.album-card { display: block; background: #fff; border: 1px solid var(--qm-line); height: 100%; }
.album-card .thumb { aspect-ratio: 4/3; overflow: hidden; background: var(--qm-grey); display: flex; align-items: center; justify-content: center; }
.album-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: .4s; }
.album-card .thumb i { font-size: 48px; color: #ccc; }
.album-card:hover .thumb img { transform: scale(1.06); }
.album-card .info { padding: 12px 14px; }
.album-card h5 { font-size: 15px; margin: 0 0 2px; color: var(--qm-head); font-weight: 600; }
.album-card small { color: var(--qm-muted); }
.gallery-thumb { display: block; aspect-ratio: 1/1; overflow: hidden; position: relative; background: var(--qm-grey); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; transition: .4s; }
.gallery-thumb::after { content: "\f00e"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 24px; background: rgba(0,0,0,.45); opacity: 0; transition: .3s; }
.gallery-thumb:hover::after { opacity: 1; }
.gallery-thumb:hover img { transform: scale(1.06); }

/* ---------- Inner page banner (photo + dark overlay) ---------- */
.page-hero { position: relative; background: #2b2b2b center/cover no-repeat; color: #fff; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,20,22,.88) 0%, rgba(20,20,22,.62) 55%, rgba(20,20,22,.35) 100%); }
.page-hero > .container { position: relative; padding-top: 64px; padding-bottom: 56px; }
.page-hero h1 { color: #fff; font: 700 40px/1.15 "Raleway", "Open Sans", sans-serif; margin: 0 0 8px; letter-spacing: .3px; animation: capUp .7s ease both; }
.page-hero-sub { color: #e6e6e6; font-size: 15.5px; margin: 0 0 14px; animation: capUp .7s .12s ease both; }
.page-hero .breadcrumb { display: inline-flex; background: rgba(255,255,255,.12); backdrop-filter: blur(4px); padding: 6px 14px; border-radius: 30px; font-size: 12.5px; animation: capUp .7s .2s ease both; }
.page-hero .breadcrumb a { color: #fff; }
.page-hero .breadcrumb .active { color: var(--qm-gold); }
.breadcrumb-item + .breadcrumb-item::before { content: "›"; color: rgba(255,255,255,.6); }
/* legacy plain title (kept for safety) */
.page-title { background: #fff; border-bottom: 1px solid var(--qm-line); }

/* sub tabs under the banner */
.sub-tabs { background: #fff; border-bottom: 1px solid var(--qm-line); box-shadow: 0 2px 10px rgba(0,0,0,.03); }
.sub-tabs .container { display: flex; flex-wrap: wrap; gap: 4px; padding-top: 10px; padding-bottom: 10px; }
.sub-tabs a { padding: 7px 16px; border-radius: 30px; color: var(--qm-head); font-weight: 600; font-size: 13px; transition: .2s; }
.sub-tabs a:hover { background: var(--qm-grey-2); color: var(--qm-primary); }
.sub-tabs a.active { background: var(--qm-primary); color: #fff; }
.page-body > .container { padding-top: 46px; padding-bottom: 60px; }

/* ---------- Content pages ---------- */
.content-area { font-size: 15px; line-height: 1.8; }
.content-area > p, .content-area .pg-intro-text p { text-align: justify; }
.content-area h2, .content-area h3 { color: var(--qm-ink); font-weight: 700; margin-top: 26px; margin-bottom: 12px; font-family: "Raleway", "Open Sans", sans-serif; }
.content-area h2 { font-size: 26px; }
.content-area h3 { font-size: 20px; }
.content-area h4 { font-size: 16.5px; font-weight: 700; color: var(--qm-ink); margin-top: 16px; }
.content-area ul:not([class]) { padding-left: 0; list-style: none; }
.content-area ul:not([class]) li { position: relative; padding-left: 22px; margin: 6px 0; }
.content-area ul:not([class]) li::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 0; top: 1px; color: var(--qm-primary); font-size: 12px; }
.content-area ol { padding-left: 20px; }
.content-area table { width: 100%; margin: 0; border-collapse: collapse; background: #fff; }
.content-area table th { background: var(--qm-head); color: #fff; padding: 11px 14px; font-weight: 600; font-size: 14px; }
.content-area table td { padding: 10px 14px; border-bottom: 1px solid var(--qm-line); }
.content-area table tr:nth-child(even) td { background: var(--qm-grey); }
.content-area blockquote { background: var(--qm-grey); padding: 18px 22px; border-radius: 8px; font: italic 17px "Playfair Display", serif; }
.content-area img { max-width: 100%; height: auto; }
.lead-text { font-size: 17px; color: var(--qm-head); max-width: 860px; margin: 0 auto 30px; text-align: center !important; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--qm-primary); margin-bottom: 6px; }

/* intro split: photo + text */
.pg-intro { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; margin-bottom: 56px; }
.pg-intro.reverse .pg-intro-img, .pg-intro > .pg-intro-text:first-child + .pg-intro-img { order: 2; }
.pg-intro.reverse { grid-template-columns: 1.1fr 1fr; }
.pg-intro > .pg-intro-text:first-child { order: 1; }
.pg-intro-img { position: relative; isolation: isolate; }
.pg-intro-img img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; box-shadow: 0 18px 40px rgba(0,0,0,.14); }
.pg-intro-img::after { content: ""; position: absolute; z-index: -1; right: -14px; bottom: -14px; width: 55%; height: 55%; border-radius: 10px; background: var(--qm-gold); opacity: .35; }
.pg-intro-text h2 { margin-top: 0; font-size: 30px; line-height: 1.25; }

.fact-chips { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.fact-chips li { background: var(--qm-grey); border-radius: 8px; padding: 12px 8px; text-align: center; }
.fact-chips b { display: block; font: 700 19px/1.2 "Raleway", sans-serif; color: var(--qm-primary); }
.fact-chips span { font-size: 12px; color: var(--qm-muted); text-transform: uppercase; letter-spacing: .5px; }

/* section heading (centred, bottom bar only) */
.sec-head { text-align: center; margin: 56px 0 28px; }
.sec-head h2 { margin: 0; font-size: 28px; }
.sec-head::after { content: ""; display: block; width: 54px; height: 3px; border-radius: 3px; background: var(--qm-gold); margin: 14px auto 0; }

/* icon grid */
.icon-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.icon-card { background: #fff; border: 1px solid var(--qm-line); border-radius: 10px; padding: 24px 18px; text-align: center; transition: transform .25s, box-shadow .25s, border-color .25s; }
.icon-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0,0,0,.08); border-color: transparent; }
.icon-card i { width: 58px; height: 58px; border-radius: 50%; background: var(--qm-grey-2); color: var(--qm-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 12px; transition: .25s; }
.icon-card:hover i { background: var(--qm-primary); color: var(--qm-gold); }
.icon-card h4 { margin: 0 0 4px; font-size: 15.5px; }
.icon-card p { margin: 0; font-size: 13.5px; color: var(--qm-muted); line-height: 1.6; text-align: center !important; }

/* photo cards */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.info-card { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 6px 22px rgba(0,0,0,.07); transition: transform .3s, box-shadow .3s; }
.info-card:hover { transform: translateY(-5px); box-shadow: 0 18px 38px rgba(0,0,0,.12); }
.info-card > img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; transition: transform .5s; }
.info-card:hover > img { transform: scale(1.04); }
.info-card .body { padding: 18px 20px 20px; position: relative; background: #fff; }
.info-card h4 { margin: 0 0 6px; font-size: 17px; }
.info-card p { margin: 0; font-size: 14px; color: var(--qm-text); line-height: 1.7; text-align: left !important; }

/* houses */
.house-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.house-card { background: #fff; border-radius: 10px; padding: 26px 20px 22px; text-align: center; box-shadow: 0 6px 22px rgba(0,0,0,.07); border-top: 5px solid #ccc; transition: transform .25s; }
.house-card:hover { transform: translateY(-4px); }
.house-card img { width: 74px; height: 84px; object-fit: contain; margin-bottom: 10px; }
.house-card h4 { margin: 0; }
.house-card small { display: block; color: var(--qm-muted); font-weight: 600; margin-bottom: 8px; }
.house-card p { font-size: 13.5px; margin: 0; line-height: 1.65; text-align: center !important; }
.house-card.red { border-top-color: #e3262b; } .house-card.green { border-top-color: #1fb33a; }
.house-card.blue { border-top-color: #1636b6; } .house-card.yellow { border-top-color: #e2d400; }

/* photo grid with lightbox */
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 26px; }
.photo-grid .ph-item { display: block; border-radius: 8px; overflow: hidden; aspect-ratio: 4/3; position: relative; background: var(--qm-grey-2); }
.photo-grid .ph-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.photo-grid .ph-item::after { content: "\f00e"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; background: rgba(0,0,0,.4); opacity: 0; transition: .3s; }
.photo-grid .ph-item:hover::after { opacity: 1; }
.photo-grid .ph-item:hover img { transform: scale(1.08); }

/* numbered steps / stages */
.stage-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stage-card { background: #fff; border-radius: 10px; padding: 26px 22px; box-shadow: 0 6px 22px rgba(0,0,0,.07); position: relative; transition: transform .25s; }
.stage-card:hover { transform: translateY(-4px); }
.stage-card .num { width: 50px; height: 50px; border-radius: 50%; background: var(--qm-primary); color: var(--qm-gold); display: inline-flex; align-items: center; justify-content: center; font: 700 17px "Raleway", sans-serif; margin-bottom: 14px; }
.stage-card h4 { margin: 0 0 2px; }
.stage-card small { display: block; font-weight: 600; color: var(--qm-primary); margin-bottom: 6px; }
.stage-card p { margin: 0; font-size: 14px; line-height: 1.65; text-align: left !important; color: var(--qm-text); }

/* vision / mission / motto */
.vmm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 56px; }
.vmm-card { background: #fff; border-radius: 12px; padding: 32px 26px; text-align: center; box-shadow: 0 8px 28px rgba(0,0,0,.08); }
.vmm-card > i { width: 70px; height: 70px; border-radius: 50%; background: var(--qm-primary); color: var(--qm-gold); display: inline-flex; align-items: center; justify-content: center; font-size: 28px; margin-bottom: 14px; }
.vmm-card p { text-align: center !important; margin: 0; font-size: 14.5px; }
.motto-big { font: italic 26px "Playfair Display", serif !important; color: var(--qm-primary); margin-bottom: 8px !important; }

/* lists, panels, notes, CTA */
.check-list { list-style: none; padding: 0; margin: 10px 0 0; }
.check-list li { position: relative; padding: 6px 0 6px 30px; }
.check-list li::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 0; top: 8px; width: 20px; height: 20px; border-radius: 50%; background: #e7f6ec; color: #1f9d55; font-size: 10px; display: flex; align-items: center; justify-content: center; }
.check-list.cross li::before { content: "\f00d"; background: #fde8e8; color: #c62828; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 40px 0 0; }
.panel-card { background: #fff; border-radius: 12px; padding: 26px 28px; box-shadow: 0 6px 22px rgba(0,0,0,.07); }
.panel-card h3 { margin-top: 0; font-size: 19px; }
.panel-card h3 i { color: var(--qm-primary); margin-right: 6px; }
.panel-card h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .8px; color: var(--qm-muted); margin-top: 18px; }
.panel-card.soft { background: var(--qm-grey); box-shadow: none; }
.panel-card.warn { background: #fff7f7; box-shadow: none; }
.note-box { display: flex; gap: 14px; align-items: flex-start; background: #fff8e1; border-radius: 10px; padding: 16px 20px; margin: 24px 0; }
.note-box i { color: #d49b00; font-size: 20px; margin-top: 3px; }
.note-box p { margin: 0; }
.cta-band { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: center; margin-top: 50px; padding: 30px 34px; border-radius: 12px; color: #fff;
    background: linear-gradient(135deg, #2b2b2b, #3a3a3a); }
.cta-band h3 { color: #fff; margin: 0 0 4px; }
.cta-band p { margin: 0; color: #ddd; text-align: left !important; }
.quote-card { text-align: center; max-width: 760px; margin: 44px auto 0; padding: 26px; background: var(--qm-grey); border-radius: 12px; }
.quote-card i { font-size: 26px; color: var(--qm-gold); }
.quote-card p { font: italic 22px "Playfair Display", serif; color: var(--qm-ink); margin: 8px 0 4px; text-align: center !important; }
.quote-card span { color: var(--qm-muted); font-size: 13px; }
.table-wrap { overflow-x: auto; border-radius: 10px; box-shadow: 0 6px 22px rgba(0,0,0,.07); }
.contact-mini { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.contact-mini a { display: flex; align-items: center; gap: 10px; background: var(--qm-grey); padding: 10px 16px; border-radius: 8px; color: var(--qm-ink); font-weight: 600; }
.contact-mini a i { color: var(--qm-primary); }
.contact-mini small { display: block; font-weight: 400; color: var(--qm-muted); font-size: 11px; }

/* grade scale */
.grade-grid { display: grid; grid-template-columns: repeat(9, 1fr); gap: 10px; }
.grade-card { border-radius: 10px; padding: 18px 6px; text-align: center; color: #fff; }
.grade-card b { display: block; font: 800 26px/1 "Raleway", sans-serif; }
.grade-card span { display: block; font-weight: 600; margin-top: 6px; font-size: 13.5px; }
.grade-card small { display: block; opacity: .85; font-size: 11px; margin-top: 2px; }
.g-a { background: #1f9d55; } .g-b { background: #2f80c2; } .g-c { background: #7a5bbf; } .g-d { background: #d38b00; } .g-e { background: #9e9e9e; }

/* ---------- Message pages ---------- */
.message-layout { display: grid; grid-template-columns: 300px 1fr; gap: 44px; align-items: start; }
.message-side { position: sticky; top: 90px; }
.message-photo-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.1); }
.message-photo-card img { width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: top; display: block; }
.message-photo-card .ph { aspect-ratio: 4/5; display: flex; align-items: center; justify-content: center; background: var(--qm-grey-2); color: #bbb; font-size: 80px; }
.message-photo-card .info { padding: 16px 18px; text-align: center; background: var(--qm-primary); color: #fff; }
.message-photo-card .info h4 { color: #fff; margin: 0; font-size: 17px; font-weight: 700; }
.message-photo-card .info span { color: var(--qm-gold); font-size: 13px; font-weight: 600; }
.message-others { margin-top: 16px; display: grid; gap: 8px; }
.message-others a { background: var(--qm-grey); padding: 10px 14px; border-radius: 8px; color: var(--qm-head); font-weight: 600; font-size: 13.5px; }
.message-others a:hover { background: var(--qm-head); color: #fff; }
.message-body { background: #fff; border-radius: 12px; padding: 34px 38px; box-shadow: 0 8px 28px rgba(0,0,0,.06); position: relative; }
.message-quote { font-size: 40px; color: var(--qm-gold); opacity: .6; margin-bottom: 6px; }
.message-sign { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--qm-line); }
.message-sign h4 { margin: 0; font-size: 19px; font-weight: 700; color: var(--qm-ink); }
.message-sign span { color: var(--qm-muted); font-weight: 600; font-size: 13.5px; }
.message-sign .sig-school { font: italic 15px "Playfair Display", serif; color: var(--qm-primary); }
.page-feature-img { width: 100%; max-height: 380px; object-fit: cover; margin-bottom: 24px; border-radius: 10px; }

@media (max-width: 991px) {
    .pg-intro, .pg-intro.reverse { grid-template-columns: 1fr; gap: 28px; }
    .pg-intro .pg-intro-img { order: -1 !important; }
    .icon-grid, .house-grid, .stage-grid { grid-template-columns: repeat(2, 1fr); }
    .card-grid, .vmm-grid { grid-template-columns: repeat(2, 1fr); }
    .grade-grid { grid-template-columns: repeat(5, 1fr); }
    .message-layout { grid-template-columns: 1fr; }
    .message-side { position: static; max-width: 340px; margin: 0 auto; }
    .page-hero h1 { font-size: 32px; }
}
@media (max-width: 575px) {
    .icon-grid, .house-grid, .stage-grid, .card-grid, .vmm-grid, .two-col { grid-template-columns: 1fr; }
    .photo-grid { grid-template-columns: repeat(2, 1fr); }
    .fact-chips { grid-template-columns: repeat(2, 1fr); }
    .grade-grid { grid-template-columns: repeat(3, 1fr); }
    .page-hero > .container { padding-top: 40px; padding-bottom: 36px; }
    .page-hero h1 { font-size: 26px; }
    .message-body { padding: 24px 20px; }
    .cta-band { padding: 24px; }
}

/* sidebar (notice details, student portal) */
.side-nav { background: var(--qm-grey); }
.side-nav h5 { background: var(--qm-head); color: #fff; margin: 0; padding: 11px 16px; font-size: 14px; text-transform: uppercase; font-weight: 700; }
.side-nav a { display: block; padding: 10px 16px; border-bottom: 1px solid #e6e6e6; color: var(--qm-head); font-weight: 600; font-size: 13.5px; }
.side-nav a::before { content: "\f105"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-right: 8px; color: var(--qm-muted); }
.side-nav a:hover, .side-nav a.active { background: #fff; color: var(--qm-primary); }

/* ---------- Lists / tables ---------- */
.list-card { background: #fff; border: 1px solid var(--qm-line); padding: 14px 16px; display: flex; gap: 16px; align-items: flex-start; margin-bottom: 12px; transition: .2s; }
.list-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.list-card .date-tile { flex: 0 0 58px; text-align: center; background: var(--qm-grey-2); border-top: 3px solid var(--qm-head); padding: 5px 0; line-height: 1.1; }
.list-card .date-tile b { display: block; font-size: 21px; color: var(--qm-ink); }
.list-card .date-tile span { font-size: 11px; text-transform: uppercase; color: var(--qm-muted); }
.list-card h5 { font-size: 15px; margin: 0 0 4px; font-weight: 600; }
.list-card h5 a { color: var(--qm-ink); }
.list-card h5 a:hover { color: var(--qm-primary); }
.list-card .meta { font-size: 12.5px; color: var(--qm-muted); }
.list-card .meta span { margin-right: 14px; }
.list-card .meta i { margin-right: 4px; }
.tbl-q { width: 100%; background: #fff; border: 1px solid var(--qm-line); }
.tbl-q th { background: var(--qm-head); color: #fff; font-weight: 600; padding: 10px 12px; white-space: nowrap; }
.tbl-q td { padding: 10px 12px; border-bottom: 1px solid var(--qm-line); vertical-align: middle; }
.tbl-q tr:hover td { background: var(--qm-grey); }
.filter-bar { background: var(--qm-grey); padding: 14px 16px; margin-bottom: 22px; }
.empty-state { text-align: center; padding: 50px 20px; color: var(--qm-muted); background: var(--qm-grey); }
.empty-state i { font-size: 44px; color: #ccc; margin-bottom: 10px; }
.pagination .page-link { border-radius: 0 !important; color: var(--qm-head); }
.pagination .active .page-link { background: var(--qm-head); border-color: var(--qm-head); color: #fff; }

/* contact */
.contact-info-box { background: var(--qm-grey); padding: 22px; display: flex; gap: 14px; height: 100%; }
.contact-info-box i { font-size: 20px; color: #fff; background: var(--qm-head); width: 46px; height: 46px; flex: 0 0 46px; display: flex; align-items: center; justify-content: center; }
.contact-info-box h5 { font-size: 15px; margin: 0 0 4px; color: var(--qm-ink); font-weight: 700; }
.map-frame { width: 100%; height: 360px; border: 0; display: block; }

/* ---------- Student portal ---------- */
.auth-wrap { max-width: 440px; margin: 0 auto; }
.auth-card { background: #fff; border: 1px solid var(--qm-line); border-top: 3px solid var(--qm-primary); padding: 32px; box-shadow: 0 8px 26px rgba(0,0,0,.05); }
.auth-card .auth-icon { width: 64px; height: 64px; margin: 0 auto 12px; background: var(--qm-grey-2); color: var(--qm-primary); display: flex; align-items: center; justify-content: center; font-size: 28px; border-radius: 50%; }
.portal-side { background: var(--qm-grey); }
.portal-user { background: var(--qm-head); color: #fff; padding: 20px 16px; text-align: center; }
.portal-user .avatar { width: 76px; height: 76px; border-radius: 50%; background: #fff; color: var(--qm-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; margin-bottom: 8px; overflow: hidden; border: 3px solid var(--qm-gold); }
.portal-user .avatar img { width: 100%; height: 100%; object-fit: cover; }
.portal-user h5 { color: #fff; margin: 0; font-size: 16px; }
.portal-user small { color: #ddd; }
.stat-tile { background: #fff; border: 1px solid var(--qm-line); border-radius: 10px; padding: 18px; display: flex; justify-content: space-between; align-items: center; }
.stat-tile h3 { margin: 0; font-size: 28px; color: var(--qm-ink); font-weight: 600; }
.stat-tile span { color: var(--qm-muted); font-size: 12px; text-transform: uppercase; font-weight: 600; }
.stat-tile i { font-size: 30px; color: var(--qm-primary); opacity: .8; }

/* ---------- Footer (dark grey like the reference) ---------- */
.site-footer { background: var(--qm-footer); color: #a9a9a9; padding-top: 45px; font-size: 13.5px; }
.footer-title { color: #fff; font-size: 17px; font-weight: 500; margin-bottom: 16px; }
.footer-contact li { display: flex; gap: 10px; margin-bottom: 9px; }
.footer-contact i { color: var(--qm-gold); margin-top: 4px; width: 14px; }
.site-footer a { color: #a9a9a9; }
.site-footer a:hover { color: #fff; }
.footer-links li { border-bottom: 1px solid #333; }
.footer-links a { display: block; padding: 7px 0 7px 8px; }
.footer-hours li { display: flex; justify-content: space-between; padding: 6px 0; color: #ddd; }
.footer-social a { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; background: #333; margin-right: 6px; color: #ddd; }
.footer-social a:hover { background: var(--qm-gold); color: var(--qm-ink); }
.footer-bottom { background: #1a1a1a; margin-top: 40px; padding: 13px 0; font-size: 12px; color: #888; }

.scroll-top { position: fixed; right: 18px; bottom: 18px; width: 42px; height: 42px; background: rgba(0,0,0,.45); color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 22px; opacity: 0; visibility: hidden; transition: .3s; z-index: 999; }
.scroll-top.show { opacity: 1; visibility: visible; }
.scroll-top:hover { background: rgba(0,0,0,.75); color: #fff; }

@media (max-width: 991px) {
    .brand-logo { height: 60px; }
    .main-nav .navbar-collapse { padding-bottom: 12px; }
    .main-nav .nav-link { padding: 11px 6px !important; }
    .main-nav .nav-link::before { display: none; }
    .main-nav .dropdown-menu { box-shadow: none; border-top: 0; border-radius: 0; background: rgba(255,255,255,.97); }
    .mega-col { padding: 8px 0; }
    .nav-cta { margin-top: 8px; }
    .home-top { padding: 0; }
    .hero .carousel-item { max-height: none; }
    .hero .carousel-caption .welcome { font-size: 32px; }
    .hero .carousel-caption .label { font-size: 15px; }
    .notify-list { height: 230px; flex: none; }
    .ind-thumb { display: none; }
}
@media (max-width: 575px) {
    .brand-logo { height: 52px; }
    .hero .carousel-caption { padding: 0 20px; }
    .hero .carousel-caption .welcome { font-size: 24px; letter-spacing: 1px; }
    .hero .carousel-caption .label { font-size: 12.5px; padding: 5px 12px; }
    .hero .carousel-caption p { display: none; }
    .hero-count { display: none; }
    .msg-card { flex-direction: column; }
    .page-title h1 { font-size: 24px; }
    .counters { background-attachment: scroll; }
}

/* ---------- Popup posters ---------- */
.qm-popup .modal-dialog { max-width: 520px; }
.qm-popup .modal-content { border: 0; border-radius: 14px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.qm-popup.fade .modal-dialog { transform: scale(.88) translateY(20px); transition: transform .35s cubic-bezier(.2,.8,.3,1.2); }
.qm-popup.show .modal-dialog { transform: none; }
.pp-close { position: absolute; top: 10px; right: 10px; z-index: 10; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 16px; transition: .2s; }
.pp-close:hover { background: var(--qm-gold); color: var(--qm-ink); transform: rotate(90deg); }
.pp-poster img { width: 100%; max-height: 78vh; object-fit: contain; display: block; background: #111; }
.pp-poster-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; background: #fff; font-weight: 700; color: var(--qm-ink); }
.pp-design { position: relative; background: #2b2b2b center/cover no-repeat; min-height: 440px; display: flex; align-items: flex-end; }
.pp-design::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,20,22,.35) 0%, rgba(20,20,22,.88) 62%, rgba(20,20,22,.96) 100%); }
.pp-inner { position: relative; padding: 34px 32px 26px; color: #fff; text-align: center; width: 100%; }
.pp-logo { height: 54px; background: #fff; border-radius: 8px; padding: 4px 8px; margin-bottom: 12px; }
.pp-eyebrow { display: block; color: var(--qm-gold); font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.pp-inner h3 { color: #fff; font: 800 32px/1.15 "Raleway", "Open Sans", sans-serif; margin: 8px 0 10px; }
.pp-inner p { color: #e8e8e8; font-size: 15px; margin: 0 auto 18px; max-width: 400px; }
.pp-inner .btn { border-radius: 30px; padding: 9px 24px; }
.pp-contact { margin-top: 14px; font-size: 13px; color: #cfcfcf; }
.pp-dots { margin-bottom: 6px; }
.pp-dots [data-bs-target] { width: 8px; height: 8px; border-radius: 50%; border: 0; margin: 0 4px; }
.pp-foot { background: #fff; padding: 8px 16px; font-size: 12.5px; color: var(--qm-muted); text-align: center; }
.pp-foot input { vertical-align: -1px; margin-right: 4px; }
@media (max-width: 575px) {
    .qm-popup .modal-dialog { margin: 14px; }
    .pp-design { min-height: 380px; }
    .pp-inner h3 { font-size: 25px; }
}
