/* ==========================================================
   St Mary's School, Para — main stylesheet
   Brand: crest red + crest blue, Poppins
   ========================================================== */

:root {
  --red: #b5121b;
  --red-dark: #8c0d14;
  --red-soft: #fbeaeb;
  --navy: #182a6b;
  --navy-dark: #0f1b4a;
  --blue: #1f5fbf;
  --blue-soft: #eaf0fb;
  --gold: #e8a91c;
  --ink: #1d2433;
  --muted: #5d6576;
  --line: #e7e3dc;
  --paper: #fbf9f6;
  --white: #ffffff;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow-sm: 0 4px 14px rgba(24, 42, 107, .07);
  --shadow: 0 14px 40px rgba(24, 42, 107, .12);
  --shadow-lg: 0 24px 60px rgba(15, 27, 74, .18);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --header-h: 86px;
}

* { -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--white);
  font-size: 15.5px;
  line-height: 1.75;
  overflow-x: hidden;
}
h1, h2, h3, h4, h5, h6 { font-weight: 700; color: var(--navy-dark); line-height: 1.25; }
a { color: var(--red); text-decoration: none; transition: color .2s; }
a:hover { color: var(--red-dark); }
img { max-width: 100%; height: auto; }
::selection { background: var(--red); color: #fff; }
.text-brand-red { color: var(--red) !important; }
.text-navy { color: var(--navy) !important; }
.bg-paper { background: var(--paper); }
.skip-link { position: absolute; top: 8px; left: 8px; z-index: 2000; background: #fff; padding: 8px 14px; border-radius: 8px; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Buttons ---------- */
.btn { font-weight: 600; border-radius: 50px; padding: .62rem 1.4rem; letter-spacing: .2px; transition: all .25s var(--ease); }
.btn i { margin-right: .35rem; }
.btn-brand { background: var(--red); color: #fff; border: 2px solid var(--red); box-shadow: 0 8px 20px rgba(181, 18, 27, .25); }
.btn-brand:hover, .btn-brand:focus { background: var(--red-dark); border-color: var(--red-dark); color: #fff; transform: translateY(-2px); }
.btn-navy { background: var(--navy); color: #fff; border: 2px solid var(--navy); box-shadow: 0 8px 20px rgba(24, 42, 107, .25); }
.btn-navy:hover, .btn-navy:focus { background: var(--navy-dark); border-color: var(--navy-dark); color: #fff; transform: translateY(-2px); }
.btn-outline-light-soft { border: 2px solid rgba(255, 255, 255, .7); color: #fff; background: rgba(255, 255, 255, .06); backdrop-filter: blur(4px); }
.btn-outline-light-soft:hover { background: #fff; color: var(--navy); }
.btn-outline-brand { border: 2px solid var(--red); color: var(--red); background: transparent; }
.btn-outline-brand:hover { background: var(--red); color: #fff; }
.btn-erp { background: var(--gold); color: var(--navy-dark); border: 0; font-weight: 700; padding: .32rem .95rem; border-radius: 50px; font-size: 13px; white-space: nowrap; }
.btn-erp:hover { background: #fff; color: var(--red); }

/* ---------- Top bar & ticker ---------- */
.topbar { background: var(--navy-dark); color: rgba(255, 255, 255, .88); font-size: 13px; padding: 7px 0; }
.topbar-info { gap: 6px 22px; }
.topbar a, .topbar span { color: rgba(255, 255, 255, .88); display: inline-flex; align-items: center; gap: 7px; }
.topbar a:hover { color: #fff; }
.topbar i { color: var(--gold); }
.topbar-social { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .1); justify-content: center; }

.ticker { background: var(--red); color: #fff; font-size: 13.5px; overflow: hidden; }
.ticker .container { padding-top: 0; padding-bottom: 0; }
.ticker-label { background: var(--red-dark); padding: 8px 16px 8px 12px; font-weight: 600; white-space: nowrap; position: relative; z-index: 2; color: #ffd76a; }
.ticker-label::after { content: ''; position: absolute; right: -12px; top: 0; border-left: 12px solid var(--red-dark); border-top: 19px solid transparent; border-bottom: 19px solid transparent; }
.ticker-track { overflow: hidden; flex: 1; min-width: 0; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-move { display: inline-flex; white-space: nowrap; animation: ticker 48s linear infinite; padding-left: 24px; }
.ticker-move span { padding-right: 80px; }
.ticker:hover .ticker-move { animation-play-state: paused; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 1030; background: #fff; border-bottom: 1px solid var(--line); transition: box-shadow .3s; }
.site-header.scrolled { box-shadow: 0 8px 30px rgba(15, 27, 74, .1); }
.site-header .navbar { padding: 10px 0; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: 0; }
.brand img { width: 62px; height: 62px; object-fit: contain; transition: transform .4s var(--ease); }
.site-header.scrolled .brand img { transform: scale(.9); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 1.5rem; font-weight: 800; color: var(--red); letter-spacing: -.3px; }
.brand-sub { font-size: 12px; font-weight: 600; color: var(--navy); letter-spacing: .4px; }
.navbar-toggler { border: 0; font-size: 2rem; color: var(--red); padding: 4px 8px; box-shadow: none !important; }
.navbar .nav-link { font-weight: 500; color: var(--ink); padding: .5rem .85rem !important; font-size: 15px; position: relative; }
.navbar .nav-link:hover, .navbar .nav-link.active { color: var(--red); }
.navbar .nav-link.active::after { content: ''; position: absolute; left: .85rem; right: .85rem; bottom: 2px; height: 2px; border-radius: 2px; background: var(--red); }
.navbar .dropdown-toggle.active::after { border-top-color: currentColor; }
.dropdown-menu { border: 0; border-radius: 14px; box-shadow: var(--shadow); padding: 8px; min-width: 240px; }
.dropdown-item { border-radius: 8px; padding: .55rem .9rem; font-weight: 500; font-size: 14.5px; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--red-soft); color: var(--red); }
.nav-cta { margin-left: .4rem; }
.nav-cta .btn { padding: .5rem 1.05rem; font-size: 14px; }
@media (min-width: 1200px) {
  .navbar .nav-link, .nav-cta .btn { white-space: nowrap; }
}
@media (min-width: 1200px) and (max-width: 1499.98px) {
  .navbar .nav-link { padding: .5rem .45rem !important; font-size: 14px; }
  .navbar .nav-link.active::after { left: .45rem; right: .45rem; }
  .nav-cta { margin-left: .25rem; }
  .nav-cta .btn { padding: .42rem .7rem; font-size: 13px; }
  .navbar-brand.brand { gap: 8px; margin-right: 1rem; }
  .brand-name { font-size: 1.2rem; }
  .brand-sub { font-size: 10.5px; }
  .navbar-brand.brand img { width: 48px; height: 48px; }
}

@media (min-width: 1200px) {
  .navbar .dropdown:hover > .dropdown-menu { display: block; margin-top: 0; animation: dropIn .25s var(--ease); }
  .offcanvas { visibility: visible; }
}
@keyframes dropIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 1199.98px) {
  .offcanvas { max-width: 320px; }
  .offcanvas .nav-link { padding: .75rem .5rem !important; border-bottom: 1px solid var(--line); }
  .offcanvas .nav-link.active::after { display: none; }
  .offcanvas .dropdown-menu { box-shadow: none; background: var(--paper); }
  .nav-cta { margin: .9rem 0 0; }
  .nav-cta .btn { width: 100%; padding: .75rem; }
}
@media (max-width: 575.98px) {
  .brand img { width: 50px; height: 50px; }
  .brand-name { font-size: 1.22rem; }
  .brand-sub { font-size: 10.5px; }
  .ticker-label { padding: 8px 10px; font-size: 12.5px; }
}

/* ---------- Section scaffolding ---------- */
.section { padding: 96px 0; position: relative; }
.section-sm { padding: 64px 0; }
@media (max-width: 767.98px) { .section { padding: 64px 0; } .section-sm { padding: 48px 0; } }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; letter-spacing: 2.2px; text-transform: uppercase; color: var(--red); margin-bottom: 10px; }
.eyebrow::before { content: ''; width: 9px; height: 13px; background:
  linear-gradient(var(--red), var(--red)) center / 3px 100% no-repeat,
  linear-gradient(var(--red), var(--red)) 50% 30% / 100% 3px no-repeat; }
.section-title { font-size: clamp(1.7rem, 3.2vw, 2.6rem); font-weight: 700; margin-bottom: 14px; }
.section-title span { color: var(--red); }
.section-lead { color: var(--muted); font-size: 1.05rem; max-width: 720px; }
.center .section-lead { margin-left: auto; margin-right: auto; }
.divider-cross { display: flex; align-items: center; gap: 14px; justify-content: center; color: var(--red); margin: 6px 0 18px; }
.divider-cross::before, .divider-cross::after { content: ''; height: 1px; width: 60px; background: linear-gradient(90deg, transparent, var(--red)); }
.divider-cross::after { transform: scaleX(-1); }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--navy-dark); }
.hero .carousel-item { height: min(86vh, 760px); min-height: 520px; }
.hero .carousel-item img { width: 100%; height: 100%; object-fit: cover; object-position: center; image-rendering: auto; filter: none; }
/* Light shade only behind the text so the photo stays clear */
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15, 27, 74, .45) 0%, rgba(15, 27, 74, .18) 38%, transparent 60%); }
.hero-content { position: absolute; inset: 0; display: flex; align-items: center; z-index: 3; pointer-events: none; }
.hero-content .container { pointer-events: auto; }
.hero-content .col-lg-8 { max-width: 560px; background: rgba(15, 27, 74, .6); border: 1px solid rgba(255, 255, 255, .14); border-radius: 20px; padding: 26px 30px; box-shadow: 0 18px 50px rgba(0, 0, 0, .22); }
.hero-content .hero-motto { font-size: 1rem; margin-bottom: 20px; }
.hero-content .btn-lg { font-size: 1rem; padding: .6rem 1.15rem; }
.hero h1, .hero-motto { text-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); color: #fff; padding: 6px 16px; border-radius: 50px; font-size: 13px; font-weight: 500; backdrop-filter: blur(6px); }
.hero-badge i { color: var(--gold); }
.hero h1 { color: #fff; font-size: clamp(1.6rem, 3.6vw, 2.8rem); font-weight: 800; letter-spacing: -1px; margin: 18px 0 14px; line-height: 1.08; }
.hero h1 em { font-style: normal; color: #ffcf5a; }
.hero-motto { color: rgba(255, 255, 255, .9); font-size: clamp(1rem, 1.6vw, 1.2rem); max-width: 600px; margin-bottom: 28px; }
.hero-motto strong { color: #fff; font-weight: 600; letter-spacing: 1.5px; }
.hero .carousel-indicators { z-index: 4; margin-bottom: 1.6rem; }
.hero .carousel-indicators [data-bs-target] { width: 28px; height: 4px; border-radius: 4px; border: 0; opacity: .5; }
.hero .carousel-indicators .active { opacity: 1; background: var(--gold); width: 46px; }
.hero-cross { position: absolute; right: 6%; top: 50%; transform: translateY(-50%); width: 160px; height: 220px; opacity: .14; z-index: 2; pointer-events: none;
  background: linear-gradient(#fff, #fff) center / 22px 100% no-repeat, linear-gradient(#fff, #fff) 50% 30% / 100% 22px no-repeat; }
@media (max-width: 991.98px) { .hero-cross { display: none; } }
@media (max-width: 575.98px) {
  .hero .carousel-item { height: 78vh; min-height: 560px; }
  .hero-overlay { background: linear-gradient(0deg, rgba(15,27,74,.35), transparent 45%); }
  .hero-content { align-items: flex-end; padding-bottom: 84px; }
  .hero-content .col-lg-8 { padding: 18px; border-radius: 16px; }
  .hero-content .hero-motto { font-size: .92rem; margin-bottom: 14px; }
  .hero h1 { margin: 12px 0 8px; }
  .hero-content .btn-lg { font-size: .95rem; padding: .55rem 1rem; }
}

/* Highlights strip */
.highlights { position: relative; z-index: 5; margin-top: -58px; }
.highlight-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 22px; display: flex; gap: 16px; align-items: center; height: 100%; border-bottom: 4px solid transparent; transition: all .35s var(--ease); }
.highlight-card:hover { transform: translateY(-6px); border-bottom-color: var(--red); }
.highlight-icon { flex: 0 0 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 1.5rem; color: #fff; background: linear-gradient(135deg, var(--red), var(--red-dark)); }
.highlight-card:nth-child(even) .highlight-icon, .col:nth-child(even) .highlight-icon { background: linear-gradient(135deg, var(--blue), var(--navy)); }
.highlight-card h3 { font-size: 1.02rem; margin: 0 0 2px; }
.highlight-card p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }

/* About block */
.about-media { position: relative; padding: 0 0 40px 40px; }
.about-media .img-main { border-radius: 24px; box-shadow: var(--shadow-lg); width: 100%; aspect-ratio: 4/3.2; object-fit: cover; }
.about-media .img-sub { position: absolute; left: 0; bottom: 0; width: 46%; border-radius: 18px; border: 6px solid #fff; box-shadow: var(--shadow); aspect-ratio: 1; object-fit: cover; }
.about-media .motto-chip { position: absolute; right: -8px; top: 26px; background: var(--red); color: #fff; padding: 14px 20px; border-radius: 16px; box-shadow: var(--shadow); text-align: center; line-height: 1.3; }
.about-media .motto-chip small { display: block; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; opacity: .8; }
.about-media .motto-chip strong { font-size: 15px; }
.about-media::before { content: ''; position: absolute; left: 10px; top: 30px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(var(--blue) 2px, transparent 2.5px) 0 0 / 16px 16px; opacity: .35; z-index: -1; }
.check-list { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.check-list li { position: relative; padding-left: 32px; margin-bottom: 10px; }
.check-list li::before { content: '\F26A'; font-family: 'bootstrap-icons'; position: absolute; left: 0; top: 0; color: var(--red); font-size: 1.15rem; }
@media (max-width: 575.98px) { .about-media { padding: 0 0 30px 20px; } .about-media .motto-chip { right: 0; top: 12px; padding: 10px 14px; } }

/* Stats band */
.stats-band { background: linear-gradient(120deg, var(--navy-dark), var(--navy) 55%, #243a8a); color: #fff; position: relative; overflow: hidden; }
.stats-band::after { content: ''; position: absolute; right: -80px; top: -80px; width: 340px; height: 340px; border-radius: 50%; border: 50px solid rgba(255, 255, 255, .04); }
.stat { text-align: center; padding: 10px; }
.stat .num { font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 800; color: #fff; line-height: 1.1; }
.stat .num small { font-size: .55em; color: var(--gold); }
.stat .lbl { color: rgba(255, 255, 255, .78); font-size: 14px; }

/* Principal teaser */
.principal-card { background: #fff; border-radius: 24px; box-shadow: var(--shadow); overflow: hidden; position: relative; }
.principal-side { background: linear-gradient(160deg, var(--red), var(--red-dark)); color: #fff; padding: 44px 32px; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; position: relative; overflow: hidden; }
.principal-side::before { content: ''; position: absolute; width: 260px; height: 260px; border-radius: 50%; border: 36px solid rgba(255, 255, 255, .06); bottom: -110px; right: -90px; }
.principal-avatar { width: 128px; height: 128px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 0 0 8px rgba(255, 255, 255, .15); margin-bottom: 18px; }
.principal-avatar img { width: 108px; }
.principal-side h3 { color: #fff; font-size: 1.25rem; margin-bottom: 2px; }
.principal-side p { margin: 0; opacity: .85; font-size: 14px; }
.principal-body { padding: 44px 44px 40px; position: relative; }
.principal-body .bi-quote { position: absolute; top: 12px; right: 30px; font-size: 6rem; color: var(--red-soft); line-height: 1; }
.principal-body blockquote, .principal-body .section-title, .principal-body .eyebrow { position: relative; }
.principal-body blockquote { font-size: 1.08rem; color: var(--ink); }
@media (max-width: 575.98px) { .principal-body .bi-quote { font-size: 4rem; opacity: .6; } }
@media (max-width: 575.98px) { .principal-body { padding: 30px 22px; } }

/* Facility cards */
.facility-card { position: relative; border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); height: 100%; transition: all .4s var(--ease); display: flex; flex-direction: column; }
.facility-card:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.facility-media { position: relative; aspect-ratio: 16/11; overflow: hidden; background: linear-gradient(135deg, var(--navy), var(--blue)); }
.facility-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.facility-card:hover .facility-media img { transform: scale(1.08); }
.facility-media .ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, .9); font-size: 3.6rem; }
.facility-media .ph.alt { background: linear-gradient(135deg, var(--red), var(--red-dark)); }
.facility-icon { position: absolute; left: 20px; top: -26px; width: 52px; height: 52px; border-radius: 14px; background: var(--red); color: #fff; display: grid; place-items: center; font-size: 1.35rem; box-shadow: 0 8px 18px rgba(181, 18, 27, .35); z-index: 2; }
.facility-body { padding: 38px 22px 24px; flex: 1; position: relative; }
.facility-body h3 { font-size: 1.1rem; margin-bottom: 6px; }
.facility-body p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.65; }

/* Feature row (facilities page) */
.feature-row { align-items: center; }
.feature-row + .feature-row { margin-top: 80px; }
.feature-img { border-radius: 22px; box-shadow: var(--shadow-lg); width: 100%; aspect-ratio: 16/11; object-fit: cover; }
.feature-ph { border-radius: 22px; aspect-ratio: 16/11; display: grid; place-items: center; font-size: 6rem; color: rgba(255, 255, 255, .92); background: linear-gradient(135deg, var(--navy), var(--blue)); box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.feature-ph::after { content: ''; position: absolute; inset: 0; background: radial-gradient(rgba(255,255,255,.12) 2px, transparent 2.5px) 0 0 / 22px 22px; }
.feature-ph.alt { background: linear-gradient(135deg, var(--red), var(--red-dark)); }
.feature-num { font-size: 4rem; font-weight: 800; color: var(--red-soft); line-height: 1; margin-bottom: -10px; }
@media (max-width: 991.98px) { .feature-row + .feature-row { margin-top: 56px; } }

/* Admission CTA */
.admission-cta { background: linear-gradient(115deg, var(--red-dark), var(--red) 60%, #d0242d); color: #fff; border-radius: 28px; overflow: hidden; position: relative; box-shadow: var(--shadow-lg); }
.admission-cta::before { content: ''; position: absolute; inset: 0; background: radial-gradient(rgba(255,255,255,.1) 2px, transparent 2.5px) 0 0 / 24px 24px; opacity: .6; }
.admission-cta .inner { position: relative; padding: 56px 52px; }
.admission-cta h2 { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
.admission-cta p { color: rgba(255, 255, 255, .9); }
.admission-cta .poster { border-radius: 18px; box-shadow: 0 20px 50px rgba(0,0,0,.35); transform: rotate(2.5deg); transition: transform .5s var(--ease); cursor: zoom-in; border: 6px solid #fff; }
.admission-cta .poster:hover { transform: rotate(0) scale(1.02); }
.admission-cta .chip { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.15); padding: 6px 14px; border-radius: 50px; font-size: 13.5px; margin: 0 6px 8px 0; }
@media (max-width: 767.98px) { .admission-cta .inner { padding: 36px 24px; } }

/* Notice board */
.notice-board { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; height: 100%; display: flex; flex-direction: column; }
.notice-board .head { background: var(--navy); color: #fff; padding: 16px 22px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.notice-board .head i { color: var(--gold); }
.notice-scroll { position: relative; flex: 1 1 0; min-height: 330px; overflow: hidden; mask-image: linear-gradient(180deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(180deg, transparent, #000 8%, #000 92%, transparent); }
.notice-move { animation: notice-up var(--notice-dur, 18s) linear infinite; }
.notice-scroll:hover .notice-move, .notice-scroll:focus-within .notice-move { animation-play-state: paused; }
@keyframes notice-up { from { transform: translateY(0); } to { transform: translateY(-50%); } }
.notice-move .notice-item:last-child { border-bottom: 1px dashed var(--line); }
.notice-item { padding: 18px 22px; border-bottom: 1px dashed var(--line); display: flex; gap: 14px; }
.notice-item:last-child { border-bottom: 0; }
.notice-date { flex: 0 0 56px; height: 60px; border-radius: 12px; background: var(--red-soft); color: var(--red); text-align: center; font-weight: 700; line-height: 1.1; display: flex; flex-direction: column; justify-content: center; font-size: 12px; }
.notice-date b { font-size: 1.15rem; }
.notice-item p { margin: 0; font-size: 14.5px; }

/* Gallery */
.gallery-filter { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 36px; }
.gallery-filter button { border: 1.5px solid var(--line); background: #fff; border-radius: 50px; padding: 8px 20px; font-weight: 500; font-size: 14px; color: var(--ink); transition: all .25s; }
.gallery-filter button:hover { border-color: var(--red); color: var(--red); }
.gallery-filter button.active { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 8px 18px rgba(181, 18, 27, .25); }
.gallery-grid { columns: 4 260px; column-gap: 16px; }
.gallery-item { break-inside: avoid; margin-bottom: 16px; position: relative; border-radius: 14px; overflow: hidden; cursor: zoom-in; display: block; background: var(--paper); transition: opacity .35s, transform .35s; }
.gallery-item img { width: 100%; display: block; transition: transform .7s var(--ease); }
.gallery-item::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(15, 27, 74, .85), transparent 55%); opacity: 0; transition: opacity .35s; }
.gallery-item .cap { position: absolute; left: 14px; right: 14px; bottom: 12px; color: #fff; font-size: 14px; font-weight: 500; z-index: 2; opacity: 0; transform: translateY(10px); transition: all .35s var(--ease); }
.gallery-item .zoom { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.95); color: var(--red); display: grid; place-items: center; z-index: 2; opacity: 0; transform: scale(.6); transition: all .35s var(--ease); }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item:hover::after, .gallery-item:hover .cap, .gallery-item:hover .zoom { opacity: 1; transform: none; }
.gallery-item.hide { display: none; }
@media (hover: none) { .gallery-item .cap { opacity: 1; transform: none; } .gallery-item::after { opacity: .8; } }
.home-gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 14px; }
.home-gallery .gallery-item { margin: 0; height: 100%; }
.home-gallery .gallery-item img { height: 100%; object-fit: cover; }
.home-gallery .gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.home-gallery .gallery-item:nth-child(6) { grid-column: span 2; }
@media (max-width: 767.98px) { .home-gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; } .home-gallery .gallery-item:nth-child(6) { grid-column: span 2; } }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(8, 12, 30, .95); display: none; align-items: center; justify-content: center; padding: 60px 70px; }
.lightbox.open { display: flex; animation: fadeIn .25s; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lightbox .lb-cap { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #fff; font-size: 14.5px; }
.lightbox button { position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 1.4rem; display: grid; place-items: center; transition: background .2s; }
.lightbox button:hover { background: var(--red); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
@media (max-width: 575.98px) { .lightbox { padding: 60px 10px; } .lb-prev, .lb-next { top: auto; bottom: 50px; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Video gallery */
.video-card { border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); height: 100%; transition: all .35s var(--ease); }
.video-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.video-thumb { position: relative; aspect-ratio: 16/9; background: #000; cursor: pointer; border: 0; padding: 0; width: 100%; display: block; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .3s, transform .6s var(--ease); }
.video-thumb:hover img { opacity: 1; transform: scale(1.04); }
.video-thumb .play { position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-size: 1.8rem; box-shadow: 0 0 0 10px rgba(181, 18, 27, .3); animation: pulse 2s infinite; }
.video-thumb .fb-cover { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(135deg, #1877f2, #0b4fae); color: rgba(255,255,255,.35); font-size: 5rem; }
.video-thumb .vbadge { position: absolute; right: 10px; top: 10px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: .95rem; }
.video-thumb .vbadge.yt { background: #ff0000; }
.video-thumb .vbadge.fb { background: #1877f2; }
.video-card h3 { font-size: 1rem; padding: 16px 18px; margin: 0; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(181,18,27,.45); } 50% { box-shadow: 0 0 0 14px rgba(181,18,27,0); } }
.empty-state { text-align: center; padding: 60px 20px; background: var(--paper); border-radius: 24px; border: 2px dashed var(--line); }
.empty-state i { font-size: 3.4rem; color: var(--red); }

/* Page hero (inner pages) */
.page-hero { position: relative; padding: 110px 0 90px; color: #fff; background: var(--navy-dark) var(--hero-img) center / cover no-repeat; overflow: hidden; }
.page-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(15, 27, 74, .94), rgba(24, 42, 107, .78) 55%, rgba(181, 18, 27, .55)); }
.page-hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 40px; background: #fff; clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.page-hero-title { color: #fff; font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; margin: 6px 0 8px; }
.page-hero-sub { color: rgba(255, 255, 255, .88); max-width: 680px; font-size: 1.05rem; margin: 0; }
.page-hero .breadcrumb { margin: 0; font-size: 14px; }
.page-hero .breadcrumb a { color: #ffcf5a; }
.page-hero .breadcrumb-item, .page-hero .breadcrumb-item.active { color: rgba(255,255,255,.85); }
.page-hero .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.5); }
@media (max-width: 575.98px) { .page-hero { padding: 70px 0 64px; } }

/* Cards & info */
.info-card { background: #fff; border-radius: var(--radius); padding: 30px 26px; box-shadow: var(--shadow-sm); height: 100%; border: 1px solid var(--line); transition: all .35s var(--ease); }
.info-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.info-card .ic { width: 58px; height: 58px; border-radius: 16px; background: var(--red-soft); color: var(--red); display: grid; place-items: center; font-size: 1.55rem; margin-bottom: 16px; }
.info-card.blue .ic { background: var(--blue-soft); color: var(--blue); }
.info-card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.info-card p { color: var(--muted); margin: 0; }
.value-card { text-align: center; padding: 36px 24px; border-radius: 22px; background: #fff; box-shadow: var(--shadow-sm); height: 100%; position: relative; overflow: hidden; }
.value-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: linear-gradient(90deg, var(--red), var(--blue)); }
.value-card .big { font-size: 2.6rem; color: var(--red); }
.value-card h3 { font-size: 1.3rem; }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 26px 64px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 700; display: grid; place-items: center; box-shadow: 0 6px 14px rgba(181, 18, 27, .3); }
.steps li::after { content: ''; position: absolute; left: 21px; top: 48px; bottom: 4px; width: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps h4 { font-size: 1.05rem; margin: 8px 0 4px; }
.steps p { margin: 0; color: var(--muted); }

.letter { background: #fff; border-radius: 26px; box-shadow: var(--shadow); padding: 56px; position: relative; }
.letter::before { content: ''; position: absolute; left: 0; top: 40px; bottom: 40px; width: 5px; border-radius: 0 5px 5px 0; background: linear-gradient(var(--red), var(--blue)); }
.letter p { font-size: 1.04rem; }
.signature { font-weight: 700; color: var(--navy); font-size: 1.15rem; }
@media (max-width: 575.98px) { .letter { padding: 32px 22px; } }

/* Contact */
.contact-tile { display: flex; gap: 16px; padding: 22px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); border: 1px solid var(--line); height: 100%; }
.contact-tile .ic { flex: 0 0 52px; height: 52px; border-radius: 14px; background: var(--red); color: #fff; display: grid; place-items: center; font-size: 1.3rem; }
.contact-tile h3 { font-size: 1rem; margin: 2px 0 4px; }
.contact-tile p, .contact-tile a { margin: 0; color: var(--muted); font-size: 14.5px; word-break: break-word; }
.contact-tile a:hover { color: var(--red); }
.map-wrap { border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); line-height: 0; }
.map-wrap iframe { width: 100%; height: 420px; border: 0; }

/* Forms */
.form-card { background: #fff; border-radius: 24px; box-shadow: var(--shadow); padding: 40px; border: 1px solid var(--line); }
@media (max-width: 575.98px) { .form-card { padding: 24px 18px; border-radius: 18px; } }
.form-label { font-weight: 500; font-size: 14px; color: var(--navy-dark); margin-bottom: 6px; }
.form-label .req { color: var(--red); }
.form-control, .form-select { border-radius: 12px; border: 1.5px solid #dcd8d0; padding: .68rem .95rem; font-size: 15px; transition: border-color .2s, box-shadow .2s; }
.form-control:focus, .form-select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(31, 95, 191, .12); }
.form-text { font-size: 12.5px; }
.form-section { border: 1px solid var(--line); border-radius: 20px; padding: 28px 26px 12px; margin-bottom: 26px; position: relative; background: #fff; }
.form-section > legend { float: none; width: auto; font-size: 1.05rem; font-weight: 700; color: #fff; background: var(--navy); padding: 6px 18px; border-radius: 50px; margin: -46px 0 14px; display: inline-flex; align-items: center; gap: 8px; }
.form-section > legend i { color: var(--gold); }
@media (max-width: 575.98px) { .form-section { padding: 26px 14px 6px; } .form-section > legend { font-size: .95rem; } }
.doc-upload { border: 1.5px dashed #cfc9be; border-radius: 14px; padding: 14px; background: var(--paper); height: 100%; }
.doc-upload .form-label { display: flex; align-items: center; gap: 8px; }
.photo-preview { width: 110px; height: 132px; border-radius: 10px; border: 2px dashed #cfc9be; display: grid; place-items: center; overflow: hidden; background: #fff; color: var(--muted); font-size: 12px; text-align: center; }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.form-steps { display: flex; justify-content: space-between; gap: 6px; margin-bottom: 30px; counter-reset: fs; }
.form-steps .fs { flex: 1; text-align: center; font-size: 12.5px; color: var(--muted); position: relative; font-weight: 500; }
.form-steps .fs::before { counter-increment: fs; content: counter(fs); display: grid; place-items: center; width: 34px; height: 34px; margin: 0 auto 6px; border-radius: 50%; background: var(--paper); border: 2px solid var(--line); font-weight: 700; color: var(--muted); position: relative; z-index: 1; }
.form-steps .fs::after { content: ''; position: absolute; top: 17px; left: 50%; width: 100%; height: 2px; background: var(--line); }
.form-steps .fs:last-child::after { display: none; }
.form-steps .fs.done::before, .form-steps .fs.active::before { background: var(--red); border-color: var(--red); color: #fff; }
.form-steps .fs.active { color: var(--red); }
@media (max-width: 575.98px) { .form-steps .fs span { display: none; } }
.declaration { background: var(--blue-soft); border-radius: 16px; padding: 20px; font-size: 14px; }
.was-validated .form-control:invalid, .form-control.is-invalid, .was-validated .form-select:invalid, .form-select.is-invalid { border-color: #dc3545; }
.fee-box { background: linear-gradient(135deg, var(--navy), var(--blue)); color: #fff; border-radius: 18px; padding: 22px 24px; }
.fee-box .amt { font-size: 2rem; font-weight: 800; }

/* Status pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 50px; font-size: 12.5px; font-weight: 600; }
.pill-paid { background: #e3f6ea; color: #13703a; }
.pill-pending { background: #fff4dc; color: #8a5a00; }
.pill-failed { background: #fde7e8; color: var(--red); }
.pill-info { background: var(--blue-soft); color: var(--blue); }

/* Receipt */
.receipt { background: #fff; max-width: 900px; margin: 0 auto; border-radius: 18px; box-shadow: var(--shadow); padding: 36px; border-top: 8px solid var(--red); }
.receipt-head { display: flex; align-items: center; gap: 18px; border-bottom: 2px solid var(--navy); padding-bottom: 16px; margin-bottom: 20px; }
.receipt-head img { width: 84px; }
.receipt-head h2 { color: var(--red); font-size: 1.7rem; margin: 0; font-weight: 800; }
.receipt-head p { margin: 0; font-size: 13px; color: var(--navy); font-weight: 500; }
.receipt-title { text-align: center; background: var(--navy); color: #fff; padding: 8px; border-radius: 8px; font-weight: 600; letter-spacing: 1px; margin-bottom: 20px; }
.receipt table { width: 100%; font-size: 13.5px; }
.receipt table th { background: var(--paper); font-weight: 600; color: var(--navy-dark); width: 28%; }
.receipt table th, .receipt table td { border: 1px solid var(--line); padding: 7px 10px; vertical-align: top; }
.receipt .sec { font-weight: 700; color: var(--red); margin: 18px 0 6px; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; }
.receipt .photo { width: 120px; height: 145px; object-fit: cover; border: 1px solid var(--line); border-radius: 6px; }
.appno-box { border: 2px dashed var(--red); border-radius: 12px; padding: 10px 16px; text-align: center; }
.appno-box small { display: block; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.appno-box strong { font-size: 1.25rem; color: var(--red); letter-spacing: 1px; }
.success-burst { width: 96px; height: 96px; border-radius: 50%; background: #e3f6ea; color: #13703a; display: grid; place-items: center; font-size: 3rem; margin: 0 auto 18px; animation: pop .6s var(--ease); }
.success-burst.pending { background: #fff4dc; color: #8a5a00; }
@keyframes pop { 0% { transform: scale(.3); opacity: 0; } 70% { transform: scale(1.1); } 100% { transform: scale(1); opacity: 1; } }

@media print {
  .topbar, .ticker, .site-header, .site-footer, .float-call, .back-top, .no-print, .page-hero { display: none !important; }
  body { background: #fff; font-size: 12px; }
  .receipt { box-shadow: none; border-radius: 0; padding: 0; max-width: 100%; border-top: 0; }
  .section, .section-sm { padding: 0 !important; }
  .receipt table th { background: #f3f3f3 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .receipt-title { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { size: A4; margin: 12mm; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: rgba(255, 255, 255, .78); font-size: 14.5px; position: relative; }
.site-footer::before { content: ''; display: block; height: 5px; background: linear-gradient(90deg, var(--red) 0 50%, var(--blue) 50% 100%); }
.footer-top { padding: 70px 0 46px; }
.footer-crest { width: 76px; height: 76px; background: #fff; border-radius: 50%; display: grid; place-items: center; flex: 0 0 76px; }
.footer-name { color: #fff; font-weight: 800; font-size: 1.35rem; line-height: 1.2; }
.footer-sub { font-size: 13px; color: rgba(255,255,255,.65); }
.footer-motto { color: #ffcf5a; font-weight: 600; letter-spacing: 1px; }
.footer-title { color: #fff; font-size: 1.05rem; margin-bottom: 18px; position: relative; padding-bottom: 10px; }
.footer-title::after { content: ''; position: absolute; left: 0; bottom: 0; width: 34px; height: 3px; border-radius: 3px; background: var(--red); }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 9px; }
.footer-links a { color: rgba(255, 255, 255, .78); transition: all .25s; display: inline-block; }
.footer-links a:hover { color: #fff; transform: translateX(4px); }
.footer-contact { list-style: none; padding: 0; margin: 0 0 16px; }
.footer-contact li { display: flex; gap: 12px; margin-bottom: 12px; }
.footer-contact i { color: var(--gold); margin-top: 3px; }
.footer-contact a { color: rgba(255, 255, 255, .78); }
.footer-contact a:hover { color: #fff; }
.footer-social { width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; display: inline-grid; place-items: center; font-size: 1.1rem; }
.footer-social:hover { background: var(--red); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 18px 0; font-size: 13px; color: rgba(255, 255, 255, .6); }

.float-call { position: fixed; left: 18px; bottom: 18px; width: 54px; height: 54px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-size: 1.35rem; z-index: 1040; box-shadow: 0 10px 24px rgba(181, 18, 27, .4); animation: pulse 2.4s infinite; }
.float-call:hover { color: #fff; background: var(--red-dark); }
.back-top { position: fixed; right: 18px; bottom: 18px; width: 46px; height: 46px; border-radius: 14px; border: 0; background: var(--navy); color: #fff; z-index: 1040; opacity: 0; visibility: hidden; transform: translateY(14px); transition: all .3s var(--ease); }
.back-top.show { opacity: 1; visibility: visible; transform: none; }

/* Admission popup */
.popup-modal .modal-content { border: 0; border-radius: 20px; overflow: hidden; background: transparent; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.popup-modal .modal-body { padding: 0; position: relative; background: #fff; }
.popup-modal img { width: 100%; display: block; }
.popup-modal .btn-close-popup { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(15,27,74,.85); color: #fff; font-size: 1.1rem; z-index: 3; display: grid; place-items: center; }
.popup-modal .btn-close-popup:hover { background: var(--red); }
.popup-actions { display: flex; gap: 10px; padding: 14px; background: #fff; }
.popup-actions .btn { flex: 1; }
@media (max-width: 575.98px) { .popup-modal .modal-dialog { margin: 14px; } .popup-actions .btn { font-size: 13.5px; padding: .6rem .5rem; } }

/* ---------- Scroll animations ---------- */
[data-anim] { opacity: 0; transition: opacity .9s var(--ease), transform .9s var(--ease); will-change: transform, opacity; }
[data-anim="up"] { transform: translateY(36px); }
[data-anim="left"] { transform: translateX(-40px); }
[data-anim="right"] { transform: translateX(40px); }
[data-anim="zoom"] { transform: scale(.92); }
[data-anim].in { opacity: 1; transform: none; }
[data-delay="1"] { transition-delay: .12s; }
[data-delay="2"] { transition-delay: .24s; }
[data-delay="3"] { transition-delay: .36s; }
[data-delay="4"] { transition-delay: .48s; }
@media (prefers-reduced-motion: reduce) {
  [data-anim] { opacity: 1; transform: none; transition: none; }
  .ticker-move, .float-call, .video-thumb .play { animation: none; }
  .notice-move { animation-duration: calc(var(--notice-dur, 18s) * 2); }
  html { scroll-behavior: auto; }
}
.no-js [data-anim] { opacity: 1; transform: none; }

/* ---------- Achievements ---------- */
.result-badge { display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(135deg, #f6d36b, var(--gold)); color: var(--navy-dark); font-weight: 700; padding: 8px 20px; border-radius: 50px; box-shadow: 0 8px 20px rgba(232, 169, 28, .3); font-size: 14px; }
.result-block + .result-block { margin-top: 10px; }
.result-title { text-align: center; margin-bottom: 26px; }
.result-title span { display: inline-block; background: var(--navy); color: #fff; padding: 10px 28px; font-size: clamp(1.05rem, 2.2vw, 1.4rem); clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 14px 100%, 0 50%); }
.result-group { display: inline-block; background: var(--red); color: #fff; font-weight: 600; padding: 6px 22px; border-radius: 50px; font-size: 14.5px; letter-spacing: .3px; }
.achiever-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--line); padding: 26px 14px 22px; text-align: center; height: 100%; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.achiever-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.achiever-photo { width: 150px; height: 150px; margin: 0 auto 16px; border-radius: 50%; padding: 5px; background: linear-gradient(135deg, #f6d36b, var(--gold) 50%, #b8860b); box-shadow: 0 10px 24px rgba(232, 169, 28, .28); }
.achiever-photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: center top; border: 3px solid #fff; display: block; background: #f3f0ea; }
.achiever-name { font-weight: 700; color: var(--navy-dark); font-size: 1.02rem; line-height: 1.3; text-transform: uppercase; letter-spacing: .3px; }
.achiever-pct { color: var(--red); font-weight: 800; font-size: 2.1rem; line-height: 1.1; margin: 6px 0 4px; }
.achiever-pct small { font-size: 1.2rem; font-weight: 700; }
.achiever-class { display: inline-block; font-size: 12.5px; font-weight: 600; color: var(--navy); background: var(--blue-soft); padding: 3px 12px; border-radius: 50px; }
@media (max-width: 575.98px) { .achiever-photo { width: 118px; height: 118px; } .achiever-pct { font-size: 1.7rem; } .achiever-name { font-size: .9rem; } .achiever-class { font-size: 11px; padding: 3px 8px; } }
.result-poster { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); cursor: zoom-in; background: #fff; }
.result-poster img { width: 100%; display: block; transition: transform .6s var(--ease); }
.result-poster:hover img { transform: scale(1.02); }
