/* ============================================================
   Lok Priya Vidya Mandir — Complete Shared Design System
   ============================================================ */

/* === Google Fonts === */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,800;1,400;1,500&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&family=Mukta:wght@300;400;500;600&display=swap');

/* ============================================================
   Design Tokens
   ============================================================ */
:root {
  /* Primary palette */
  --navy:       #1B2A47;
  --navy-light: #2D3F62;
  --navy-dark:  #131F36;
  --gold:       #C8902F;
  --gold-light: #E8B84B;
  --gold-soft:  #E0B864;
  --cream:      #FAF8F4;
  --cream-2:    #F3EFE7;
  --white:      #FFFFFF;
  --text:       #1A1A1A;
  --ink:        #2A3140;
  --muted:      #6B6B6B;
  --ink-soft:   #5B6473;
  --border:     #E5E0D8;
  --line:       #E6E0D6;
  --line-navy:  rgba(255,255,255,0.12);
  --paper:      #FFFFFF;

  /* Typography */
  --font-head:   'Playfair Display', Georgia, serif;
  --font-body:   'DM Sans', system-ui, sans-serif;
  --font-nepali: 'Mukta', sans-serif;
  --serif:       'Playfair Display', Georgia, serif;
  --sans:        'DM Sans', system-ui, sans-serif;

  /* Layout */
  --wrap:   1240px;
  --radius: 14px;
  --ease:   cubic-bezier(.22,.61,.36,1);

  /* Shadows */
  --shadow-sm: 0 2px 10px rgba(27,42,71,0.06);
  --shadow-md: 0 14px 34px rgba(27,42,71,0.10);
  --shadow-lg: 0 26px 60px rgba(27,42,71,0.16);
}

/* ============================================================
   Reset & Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Nepali language — switch body AND headings to Mukta.
   h1-h4 have an explicit font-family rule below, so they must
   be overridden separately to prevent Playfair showing for
   Devanagari text in headings. */
body.lang-np {
  font-family: var(--font-nepali);
}
body.lang-np h1,
body.lang-np h2,
body.lang-np h3,
body.lang-np h4 {
  font-family: var(--font-nepali);
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.12;
  letter-spacing: -0.01em;
  font-weight: 700;
}

/* Type scale (UI/UX Brief) */
h1 { font-size: clamp(36px, 7vw, 54px); line-height: 1.15; font-weight: 800; }
h2 { font-size: clamp(28px, 4vw, 38px); line-height: 1.25; font-weight: 600; }
h3 { font-size: 22px;  line-height: 1.3;  font-weight: 600; }
h4 { font-family: var(--font-body); font-size: 16px; line-height: 1.4; font-weight: 500; }

p  { margin: 0 0 1em; text-wrap: pretty; }
a  { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ============================================================
   Layout
   ============================================================ */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px;
}

section { padding: 92px 0; }

.section-head { max-width: 660px; margin: 0 0 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(30px, 4vw, 46px); }
.section-head p  { color: var(--ink-soft); font-size: 17px; margin-top: 16px; font-weight: 300; }

/* ============================================================
   Section Label (eyebrow)
   — gold, 12px, uppercase, 0.18em spacing, leading gold line
   ============================================================ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 18px;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 34px;
  height: 1.5px;
  background: var(--gold);
}
.eyebrow.center { justify-content: center; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.01em;
  padding: 14px 30px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease),
              background .2s, color .2s, border-color .2s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); }

/* Primary — navy fill */
.btn-primary,
.btn-navy {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-primary:hover,
.btn-navy:hover {
  background: var(--navy-light);
  border-color: var(--navy-light);
  box-shadow: 0 10px 22px rgba(27,42,71,0.22);
}

/* Gold fill (prototype alias) */
.btn-gold {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}
.btn-gold:hover { box-shadow: 0 12px 26px rgba(200,144,47,0.32); }

/* Outline — navy border, transparent fill */
.btn-outline,
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline:hover,
.btn-ghost:hover {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 10px 22px rgba(27,42,71,0.18);
}

/* Outline on dark backgrounds */
.btn-outline-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}
.btn-outline-light:hover {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}

/* Small variant */
.btn-sm { padding: 11px 22px; font-size: 13px; }

/* ============================================================
   Image Loading — Skeleton shimmer & fade-in
   ============================================================ */

/* Skeleton shimmer on image containers */
.img-skeleton { position: relative; }
.img-skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    var(--border) 25%,
    var(--cream)  50%,
    var(--border) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite linear;
  pointer-events: none;
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Fade-in for all <img> tags on public pages (not admin) */
body:not([data-page="admin"]) img {
  opacity: 0;
  transition: opacity 0.3s ease;
}
body:not([data-page="admin"]) img.loaded { opacity: 1; }

/* ============================================================
   Image placeholders
   ============================================================ */
.ph {
  position: relative;
  background-color: var(--cream-2);
  background-image: repeating-linear-gradient(
    135deg,
    rgba(27,42,71,0.05) 0 1px,
    transparent 1px 11px
  );
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--ink-soft);
}
.ph::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(27,42,71,0.42);
  text-align: center;
  padding: 14px;
}
.ph.has-img {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-color: var(--border);
}
.ph.has-img::after { content: none; }
.ph.navy {
  background-color: var(--navy);
  background-image: repeating-linear-gradient(
    135deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 11px
  );
  border-color: rgba(255,255,255,0.14);
}
.ph.navy::after { color: rgba(255,255,255,0.5); }

/* ============================================================
   Announcement Bar
   ============================================================ */
.announce {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.88);
  font-size: 13px;
  letter-spacing: 0.02em;
  position: relative;
}
.announce .wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-top: 9px;
  padding-bottom: 9px;
  text-align: center;
  flex-wrap: wrap;
}
.announce .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(200,144,47,0.18);
  flex: none;
}
.announce a {
  color: var(--gold-soft);
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.announce a:hover { border-color: var(--gold-soft); }
.announce-close {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,0.55);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
  transition: color .2s;
}
.announce-close:hover { color: #fff; }

/* ============================================================
   Navigation
   CRITICAL: #site-header must use display:contents so the
   sticky <header> anchors to the full page, not the wrapper.
   ============================================================ */
#site-header { display: contents; }

header.site {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(250,248,244,0.88);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s, background .3s;
}
header.site.scrolled {
  box-shadow: var(--shadow-sm);
  background: rgba(250,248,244,0.96);
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  padding-top: 15px;
  padding-bottom: 15px;
}

/* Brand / logo */
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-right: auto;
  text-decoration: none;
}
.emblem {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(120% 120% at 30% 25%, var(--navy-light), var(--navy-dark));
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 24px;
  color: var(--gold);
  border: 1.5px solid rgba(200,144,47,0.55);
  flex: none;
}

/* Uploaded logo image — replaces text emblem in nav + footer */
.nav-logo-img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: contain;
  background: var(--navy);
  padding: 4px;
  flex: none;
  border: 1.5px solid rgba(200,144,47,0.55);
}
/* Footer brand: match .emblem margin spacing */
.foot-brand .nav-logo-img { margin-bottom: 18px; }
.brand-text .nm {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 19px;
  color: var(--navy);
  letter-spacing: -0.01em;
  line-height: 1.15;
  white-space: nowrap;
}
.brand-text .tg {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-top: 4px;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  padding: 9px 14px;
  border-radius: 9px;
  position: relative;
  transition: color .2s, background .2s;
  text-decoration: none;
}
.nav-links a:hover { color: var(--navy); background: rgba(27,42,71,0.05); }
.nav-links a.active { color: var(--navy); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

/* Nav CTA area */
.nav-cta { display: flex; align-items: center; gap: 12px; }

/* Language toggle button */
.lang-toggle {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--navy);
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  padding: 8px 12px;
  cursor: pointer;
  transition: .2s;
}
.lang-toggle:hover { border-color: var(--gold); color: var(--gold); }

/* Hamburger */
.burger {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 10px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
}
.burger span {
  width: 20px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: .3s;
  display: block;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.mobile-nav {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(340px, 86vw);
  background: var(--cream);
  z-index: 120;
  transform: translateX(100%);
  transition: transform .4s var(--ease);
  padding: 26px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav a {
  font-size: 18px;
  font-weight: 500;
  padding: 14px 12px;
  border-radius: 10px;
  color: var(--navy);
  text-decoration: none;
  display: block;
}
.mobile-nav a:hover,
.mobile-nav a.active { background: var(--white); }
.mobile-nav .btn { margin-top: 14px; }
.mobile-nav .close {
  align-self: flex-end;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 20px;
  cursor: pointer;
  color: var(--navy);
  margin-bottom: 8px;
}

/* Scrim (behind mobile nav) */
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(19,31,54,0.55);
  z-index: 110;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s;
}
.scrim.show { opacity: 1; pointer-events: auto; }

/* ============================================================
   Page hero
   ============================================================ */
.page-hero {
  background: var(--cream-2);
  border-bottom: 1px solid var(--border);
  padding: 64px 0 56px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  right: -80px;
  top: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(200,144,47,0.10), transparent 70%);
  pointer-events: none;
}
.page-hero h1 { font-size: clamp(38px, 6vw, 62px); }
.crumb {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 16px;
  letter-spacing: 0.02em;
}
.crumb a:hover { color: var(--gold); }
.crumb span { color: var(--gold); }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(200,144,47,0.4);
}

/* Icon boxes */
.icon-box {
  width: 54px;
  height: 54px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  flex: none;
}
.icon-box.gold { background: rgba(200,144,47,0.12); color: var(--gold); }
.icon-box.navy { background: var(--navy); color: var(--gold-soft); }
.icon-box svg  { width: 26px; height: 26px; }

/* Value cards */
.values-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.value-card  { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.value-card h4 { font-size: 18px; }
.value-card p  { font-size: 13px; color: var(--ink-soft); margin: 0; font-weight: 300; }

/* Small icon box for value cards (FIX 4) */
.icon-box-sm {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--cream);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  flex: none;
}
.icon-box-sm svg { width: 20px; height: 20px; color: var(--gold); }

/* ============================================================
   Blockquote
   ============================================================ */
.quote {
  border-left: 3px solid var(--gold);
  padding: 6px 0 6px 24px;
  font-family: var(--font-head);
  font-style: italic;
  font-size: 20px;
  color: var(--navy);
  line-height: 1.5;
  margin: 0;
}
.quote cite {
  display: block;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-top: 12px;
  font-weight: 500;
}

/* ============================================================
   Stats Band
   ============================================================ */
.stats { background: var(--navy); color: var(--white); padding: 56px 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}
.stat { position: relative; }
.stat + .stat::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: rgba(255,255,255,0.12);
}
.stat .num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(38px, 5vw, 56px);
  color: var(--white);
  line-height: 1;
}
.stat .num b { color: var(--gold); }
.stat .lbl {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
  margin-top: 12px;
  font-weight: 500;
}

/* ============================================================
   Notice / Announcement Lists
   ============================================================ */
.notice-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.notice-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}
.notice-panel > h3 {
  font-size: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.notice-item {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px dashed var(--border);
}
.notice-item:last-child { border-bottom: 0; }
.n-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
  margin-top: 7px;
}
.n-dot.gold  { background: var(--gold);  box-shadow: 0 0 0 4px rgba(200,144,47,0.16); }
.n-dot.navy  { background: var(--navy);  box-shadow: 0 0 0 4px rgba(27,42,71,0.12); }
.notice-item .t {
  font-weight: 600;
  color: var(--navy);
  font-size: 16px;
  cursor: pointer;
  transition: color .2s;
}
.notice-item:hover .t { color: var(--gold); }
.notice-item .d {
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  margin: 4px 0 6px;
}
.notice-item .x { font-size: 14px; color: var(--ink-soft); font-weight: 300; margin: 0; }
.n-attach { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; font-weight: 600; }
.n-attach.pdf { color: var(--gold); }
.n-attach.pdf:hover { text-decoration: underline; }
.n-attach.pdf svg { width: 17px; height: 17px; }
.n-attach.img { width: 110px; height: 74px; border-radius: 8px; border: 1px solid var(--border); background-size: cover; background-position: center; }
.n-attach.img:hover { border-color: var(--gold); }

/* ============================================================
   Footer
   ============================================================ */
footer.site {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.74);
  padding-top: 72px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 56px;
}
footer.site h5 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--white);
  margin: 0 0 22px;
}
.foot-brand .brand-text .nm { color: var(--white); }
.foot-brand .emblem { margin-bottom: 18px; }
.foot-brand p { font-size: 14px; font-weight: 300; line-height: 1.7; max-width: 320px; }
.foot-contact { margin-top: 18px; font-size: 14px; display: flex; flex-direction: column; gap: 8px; }
.foot-contact a:hover { color: var(--gold-soft); }
footer.site ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
footer.site ul a,
footer.site ul button {
  font-size: 14.5px;
  font-weight: 300;
  transition: color .2s, padding-left .2s;
  color: rgba(255,255,255,0.74);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  padding: 0;
  text-align: left;
}
footer.site ul a:hover,
footer.site ul button:hover { color: var(--gold-soft); padding-left: 5px; }
.socials { display: flex; gap: 12px; margin-top: 4px; flex-wrap: wrap; }
.socials a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line-navy);
  display: grid;
  place-items: center;
  transition: .25s;
  color: rgba(255,255,255,0.74);
}
.socials a:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy-dark);
  transform: translateY(-3px);
}
.socials svg { width: 18px; height: 18px; }
.foot-bottom {
  border-top: 1px solid var(--line-navy);
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 13px;
  flex-wrap: wrap;
}
.foot-bottom a { color: var(--gold-soft); }

/* ---- Blog post / notice share bar ---- */
.share-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 24px 0 32px;
  flex-wrap: wrap;
}
.nm-share-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0 4px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
  flex-wrap: wrap;
}
.share-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.share-btns { display: flex; gap: 8px; align-items: center; }
.share-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cream-2);
  border: 1px solid var(--border);
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--navy);
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
  font-family: var(--font-body);
  flex: none;
}
.share-btn:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.share-btn--native {
  width: auto;
  border-radius: 20px;
  padding: 0 14px;
  gap: 6px;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
}
.share-btn--copy {
  width: auto;
  border-radius: 20px;
  padding: 7px 16px;
  gap: 6px;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  background: var(--cream);
  border: 1.5px solid var(--border);
  color: var(--navy);
  height: auto;
}
.share-btn--copy:hover {
  background: var(--cream);
  color: var(--navy);
  border-color: var(--navy);
}
.share-btn--copied {
  width: auto;
  padding: 0 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  background: #28a745;
  color: var(--white);
  border-color: #28a745;
}

/* ---- Admin limit warning ---- */
.admin-limit-warn {
  font-size: 13px;
  color: #664d03;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 10px;
  font-weight: 500;
  display: inline-block;
}

.foot-credit {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 12px 0;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.02em;
}
.foot-credit a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color .2s;
}
.foot-credit a:hover { color: var(--gold-light); }

/* ============================================================
   Forms
   ============================================================ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }

.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.field label .req { color: var(--gold); margin-left: 2px; }

.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,144,47,0.16);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--muted); }
.field input[type="file"] { padding: 10px; cursor: pointer; }
.field input[type="file"]::file-selector-button {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  margin-right: 12px;
  padding: 8px 14px;
  border: 0;
  border-radius: 7px;
  background: var(--navy);
  color: var(--white);
  cursor: pointer;
}
.form-note { font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; font-weight: 300; }

.form-ok {
  display: none;
  text-align: center;
  padding: 24px 20px;
}
.form-ok .check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(200,144,47,0.14);
  color: var(--gold);
  display: grid;
  place-items: center;
  margin: 6px auto 18px;
}
.form-ok h4 { font-size: 24px; margin-bottom: 8px; }
.form-ok p  { color: var(--ink-soft); font-weight: 300; margin: 0; }

/* ============================================================
   Modals
   ============================================================ */
.modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(19,31,54,0.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s;
}
.modal-scrim.show {
  opacity: 1;
  pointer-events: auto;
}
.modal {
  background: var(--cream);
  border-radius: 20px;
  width: 100%;
  max-width: 600px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(24px) scale(.98);
  transition: transform .4s var(--ease);
}
.modal-scrim.show .modal { transform: none; }

.modal-head {
  padding: 30px 34px 22px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--cream);
  z-index: 2;
}
.modal-head .eyebrow { margin-bottom: 10px; }
.modal-head h3 { font-size: 28px; }
.modal-head p  { font-size: 14px; color: var(--ink-soft); margin: 8px 0 0; font-weight: 300; }

.modal-close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  cursor: pointer;
  font-size: 20px;
  color: var(--navy);
  display: grid;
  place-items: center;
  transition: .2s;
  line-height: 1;
}
.modal-close:hover {
  background: var(--navy);
  color: var(--white);
  transform: rotate(90deg);
}
.modal-body { padding: 28px 34px 34px; }

/* Welcome popup — two-column */
.welcome-modal {
  max-width: 880px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0;
  overflow: hidden;
}
.welcome-media {
  background: linear-gradient(150deg, var(--navy), var(--navy-dark)),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 13px);
  position: relative;
  min-height: 320px;
}
.welcome-body {
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.welcome-body h3 { font-size: 30px; margin-bottom: 14px; }
.welcome-body p  { color: var(--ink-soft); font-weight: 300; margin-bottom: 26px; }
.welcome-body .btn { align-self: flex-start; }
.welcome-modal .modal-close { z-index: 3; background: rgba(255,255,255,0.9); }

/* ============================================================
   Lightbox
   ============================================================ */
.lb {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(8,13,24,0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  padding: 80px 30px 30px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s;
}
.lb.show { opacity: 1; pointer-events: auto; }
.lb-stage { width: min(900px, 88vw); height: min(76vh, 620px); }
.lb-stage .ph {
  width: 100%; height: 100%;
  border-radius: 0;
  border: none;
  background-color: transparent;
  background-image: none;
}
.lb-stage .ph.has-img {
  background-size: contain;
  background-repeat: no-repeat;
  background-color: transparent;
  background-position: center;
}
.lb-stage img { width: 100%; height: 100%; object-fit: contain; border-radius: 0; margin: 0; }
.lb-cap { color: var(--white); text-align: center; }
.lb-cap b    { font-family: var(--font-head); font-size: 22px; display: block; }
.lb-cap span { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-soft); font-weight: 600; }
.lb-count { color: rgba(255,255,255,0.55); font-size: 13px; letter-spacing: 0.1em; }
.lb-close {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10000;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.45);
  color: var(--white);
  font-size: 22px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: .2s;
}
.lb-close:hover { background: var(--white); color: var(--navy); transform: rotate(90deg); }
.lb-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10000;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.45);
  color: var(--white);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: .2s;
}
.lb-arrow:hover { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.lb-arrow.prev { left: 24px; }
.lb-arrow.next { right: 24px; }

/* ============================================================
   Scroll Reveal
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
/* Support both .reveal.in (prototype) and .reveal.visible (TRD) */
.reveal.in,
.reveal.visible {
  opacity: 1;
  transform: none;
}
.reveal.no-anim { transition: none !important; }

/* ============================================================
   Toast Notifications
   ============================================================ */
.toast-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--white);
  box-shadow: var(--shadow-md);
  animation: toast-in .3s var(--ease);
  max-width: 320px;
}
.toast.success { background: #28a745; }
.toast.error   { background: #dc3545; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* ============================================================
   Utility
   ============================================================ */
.text-center { text-align: center; }
.text-gold   { color: var(--gold); }
.text-navy   { color: var(--navy); }
.text-muted  { color: var(--muted); }
.mt-0  { margin-top: 0; }
.mb-0  { margin-bottom: 0; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   Responsive — 1024px (Desktop, hide elements not needed)
   ============================================================ */
@media (max-width: 1024px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 34px; }
  .foot-brand { grid-column: 1 / -1; }
}

/* ============================================================
   Responsive — 880px (Tablet: hamburger, stack grids)
   ============================================================ */
@media (max-width: 880px) {
  .nav-links,
  .nav-cta .btn:not(.lang-toggle) { display: none; }
  .burger { display: flex; }
  .nav-cta .lang-toggle { display: block; }

  .values-grid    { grid-template-columns: 1fr 1fr; }
  .stats-grid     { grid-template-columns: 1fr 1fr; gap: 36px 20px; }
  .stat:nth-child(3)::before,
  .stat + .stat::before { display: none; }
  .notice-cols    { grid-template-columns: 1fr; }

  section { padding: 70px 0; }
  .section-head { margin-bottom: 36px; }
}

/* ============================================================
   Responsive — 768px (Tablet/mobile breakpoint from brief)
   ============================================================ */
@media (max-width: 768px) {
  .form-grid  { grid-template-columns: 1fr; }
  .scroll-hint { display: none; }
}

/* ============================================================
   Responsive — 680px (Mobile)
   ============================================================ */
@media (max-width: 680px) {
  section { padding: 56px 0; }
  .section-head { margin-bottom: 28px; }
  .section-head h2 { font-size: clamp(26px, 7vw, 34px); }
  .section-head p  { font-size: 15.5px; margin-top: 12px; }

  .eyebrow { font-size: 11px; margin-bottom: 14px; letter-spacing: 0.16em; }
  .eyebrow::before { width: 24px; }

  /* Nav: ensure minimum 64px height, tighter padding */
  .nav { padding: 12px 16px; gap: 12px; min-height: 64px; }
  .emblem { width: 38px; height: 38px; font-size: 19px; }
  .nav-logo-img { width: 38px; height: 38px; }
  .brand { gap: 10px; }
  .brand-text .nm { font-size: 14px; white-space: normal; }
  .brand-text .tg { font-size: 9.5px; letter-spacing: 0.14em; display: none; }

  .announce { font-size: 12px; }
  .announce .wrap { padding-top: 8px; padding-bottom: 8px; }

  .btn { padding: 13px 24px; }

  .quote { font-size: 17px; padding-left: 18px; }

  .page-hero { padding: 44px 0 40px; }
  .page-hero h1 { font-size: clamp(32px, 10vw, 46px); }
  .crumb { margin-top: 12px; }

  .stats { padding: 44px 0; }
  .stats-grid { gap: 30px 18px; }
  .stat .lbl { font-size: 11.5px; letter-spacing: 0.1em; margin-top: 8px; }

  .notice-panel { padding: 22px; }
  .notice-panel > h3 { font-size: 19px; margin-bottom: 18px; padding-bottom: 14px; }
  .notice-item { padding: 14px 0; }

  footer.site { padding-top: 54px; }
  .foot-grid { gap: 30px; padding-bottom: 40px; }
  .foot-bottom { flex-direction: column; }

  /* Modals become bottom sheets on mobile */
  .modal-scrim { padding: 0; align-items: flex-end; }
  .modal {
    max-width: 100%;
    max-height: 94vh;
    border-radius: 20px 20px 0 0;
  }
  .modal-head { padding: 24px 22px 18px; }
  .modal-head h3 { font-size: 23px; }
  .modal-body { padding: 22px 22px 28px; }

  /* Welcome popup stacks vertically */
  .welcome-modal { grid-template-columns: 1fr; max-width: 440px; }
  .welcome-media { min-height: 170px; }
  .welcome-body  { padding: 34px 26px; }

  /* Lightbox: truly fullscreen on mobile — no card effect, no padding */
  .lb { padding: 64px 0 56px; gap: 0; }
  .lb-stage {
    width: 100vw;
    height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .lb-stage .ph {
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
    background-color: transparent;
    background-image: none;
  }
  .lb-stage .ph.has-img {
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
  }
  .lb-stage img { max-width: 100vw; max-height: calc(100vh - 120px); border-radius: 0; margin: 0; object-fit: contain; }
  .lb-close { top: 12px; right: 12px; width: 44px; height: 44px; background: rgba(0,0,0,0.55); }
  .lb-arrow { width: 44px; height: 44px; background: rgba(0,0,0,0.55); border-color: transparent; }
  .lb-arrow.prev { left: 8px; }
  .lb-arrow.next { right: 8px; }
  .lb-cap { position: static; padding: 8px 60px 0; }
  .lb-count { font-size: 12px; }
}

/* ============================================================
   Responsive — 560px (Small mobile)
   ============================================================ */
@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .values-grid    { grid-template-columns: 1fr; }
  .stats-grid     { grid-template-columns: 1fr 1fr; }
  .foot-grid      { grid-template-columns: 1fr; }
  .modal-head, .modal-body { padding-left: 20px; padding-right: 20px; }
}

/* ============================================================
   Home Page — Section Styles
   ============================================================ */

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--navy-dark);
}
.hero video,
.hero .hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero .hero-bg-img {
  background-size: cover;
  background-position: center;
}
/* Placeholder shown while no media is uploaded */
.hero .hero-ph {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(120deg, #16233c, #0f1a30),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 14px);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(13,21,38,0.90) 0%,
    rgba(13,21,38,0.68) 42%,
    rgba(13,21,38,0.30) 100%
  );
}
.hero .wrap { position: relative; z-index: 2; padding-top: 60px; padding-bottom: 60px; }
.hero-inner  { max-width: 720px; }
.hero-inner .eyebrow { color: var(--gold-soft); }
.hero-inner .eyebrow::before { background: var(--gold-soft); }
.hero h1 {
  color: #fff;
  font-size: clamp(44px, 7vw, 88px);
  line-height: 1.02;
  font-weight: 800;
}
.hero h1 em { font-style: italic; font-weight: 500; color: var(--gold-soft); }
.hero-sub {
  color: rgba(255,255,255,0.82);
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 300;
  max-width: 560px;
  margin: 24px 0 36px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* Scroll hint */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255,255,255,0.6);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.scroll-hint .scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(rgba(255,255,255,0.5), transparent);
  animation: scroll-drop 2s infinite;
}
@keyframes scroll-drop {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---- About Preview ---- */
.about-prev {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 60px;
  align-items: start;
}
.about-prev .lead { font-size: 18px; color: var(--ink-soft); font-weight: 300; }

/* ---- Achievement Strip ---- */
.achieve {
  background: var(--cream-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 74px 0;
}
.achieve-row {
  display: flex;
  align-items: center;
  gap: 40px;
  max-width: 860px;
  margin: 0 auto;
}
.trophy {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--navy);
  display: grid;
  place-items: center;
  color: var(--gold);
  flex: none;
  box-shadow: var(--shadow-md);
}
.trophy svg { width: 36px; height: 36px; }
.achieve h3 {
  font-size: clamp(22px, 2.8vw, 34px);
  margin-bottom: 10px;
  line-height: 1.15;
}
.achieve .ach-body {
  font-size: 15px;
  color: var(--ink-soft);
  font-weight: 300;
  max-width: 700px;
  margin: 0;
  line-height: 1.7;
}
.achieve .ach-body strong { color: var(--navy); font-weight: 600; }

/* ---- Gallery Carousel ---- */
.car-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 38px;
}
.carousel { position: relative; }
.car-track {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 4px 20px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.car-track::-webkit-scrollbar { display: none; }
.car-card {
  flex: 0 0 clamp(260px, 32vw, 380px);
  scroll-snap-align: start;
  cursor: pointer;
}
.car-card .ph {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  transition: transform .4s var(--ease);
}
.car-card:hover .ph { transform: scale(1.02); }
.car-card .car-cap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 14px;
}
.car-card .car-cap b   { font-family: var(--font-head); color: var(--navy); font-size: 18px; }
.car-card .car-cap span { font-size: 12px; color: var(--gold); letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; }
.car-nav { display: flex; gap: 10px; }
.car-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--white);
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--navy);
  transition: .25s;
}
.car-btn:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
  transform: translateY(-2px);
}
.car-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 22px;
}
.car-dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  transition: .25s;
  padding: 0;
}
.car-dots button.on { background: var(--gold); width: 26px; border-radius: 5px; }

/* ---- Co-curricular ---- */
.cocur-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.cocur-card { padding: 34px; }
.cocur-card .icon-box { width: 62px; height: 62px; margin-bottom: 22px; }
.cocur-card .icon-box svg { width: 30px; height: 30px; }
.cocur-card h3 { font-size: 23px; margin-bottom: 12px; }
.cocur-card p  { color: var(--ink-soft); font-weight: 300; font-size: 15px; margin: 0; }

/* ---- Home Contact Section ---- */
.hc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.info-row {
  display: flex;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.info-row:first-child { padding-top: 0; }
.ic {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: rgba(200,144,47,0.12);
  color: var(--gold);
  display: grid;
  place-items: center;
  flex: none;
}
.ic svg { width: 22px; height: 22px; }
.info-row h4 { font-size: 16px; margin-bottom: 4px; }
.info-row p, .info-row a { font-size: 15px; color: var(--ink-soft); font-weight: 300; margin: 0; line-height: 1.55; }
.info-row a:hover { color: var(--gold); }
.hc-socials { display: flex; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.hc-socials a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--navy);
  transition: .2s;
}
.hc-socials a:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
  transform: translateY(-2px);
}
.hc-socials svg { width: 16px; height: 16px; }
.hc-map {
  margin-top: 26px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.hc-map iframe {
  width: 100%;
  height: 260px;
  border: 0;
  display: block;
  filter: grayscale(0.2) contrast(1.02);
}
.hc-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow-md);
}
.hc-form h3 { font-size: 25px; margin: 6px 0; }
.hc-form .hc-sub { font-size: 14px; color: var(--ink-soft); font-weight: 300; margin-bottom: 22px; }

/* ---- CTA Banner ---- */
.cta-banner {
  background: var(--navy);
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before,
.cta-banner::after {
  content: '';
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,144,47,0.16), transparent 68%);
  pointer-events: none;
}
.cta-banner::before { left: -120px; top: -120px; }
.cta-banner::after  { right: -120px; bottom: -120px; }
.cta-banner .wrap   { position: relative; z-index: 1; }
.cta-banner h2 { color: var(--white); font-size: clamp(34px, 5vw, 58px); }
.cta-banner .cta-sub { color: rgba(255,255,255,0.78); font-weight: 300; font-size: 18px; max-width: 540px; margin: 18px auto 32px; }

/* Blog preview section — remove bottom gap (notices section handles its own top padding) */
#home-blog-section { padding-bottom: 0; min-height: 0; }
#home-blog-section .home-preview-grid { height: auto; align-items: start; }

/* ---- Utility ---- */
.bg-cream-2 { background: var(--cream-2); border-top: 1px solid var(--border); }

/* ============================================================
   Home — Responsive overrides
   ============================================================ */
@media (max-width: 880px) {
  .about-prev { grid-template-columns: 1fr; gap: 40px; }
  .cocur-grid { grid-template-columns: 1fr; }
  .achieve-row { flex-direction: column; text-align: center; gap: 24px; }
  .hc-grid { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 680px) {
  /* Hero */
  .hero { min-height: 88svh; }
  .hero .wrap { padding-top: 40px; padding-bottom: 96px; }
  .hero h1 { font-size: clamp(38px, 13vw, 60px); }
  .hero-sub { font-size: 16px; margin: 18px 0 28px; }
  .hero-cta { flex-direction: column; gap: 12px; }
  .hero-cta .btn { width: 100%; }
  .scroll-hint { display: none; }

  /* Achievement */
  .achieve { padding: 52px 0; }
  .trophy { width: 64px; height: 64px; }
  .trophy svg { width: 28px; height: 28px; }
  .achieve h3 { font-size: clamp(20px, 6vw, 26px); }
  .achieve .ach-body { font-size: 15px; }

  /* Carousel — peek next card, swipeable */
  .car-track { gap: 16px; }
  .car-card  { flex: 0 0 78vw; }
  .car-card .car-cap b { font-size: 16px; }
  .car-nav  { display: none; }

  /* Co-curricular */
  .cocur-card { padding: 26px; }
  .cocur-card h3 { font-size: 21px; }

  /* Home contact */
  .hc-form { padding: 24px; }
  .hc-form h3 { font-size: 22px; }
  .hc-map iframe { height: 220px; }

  /* CTA banner */
  .cta-banner h2 { font-size: clamp(30px, 9vw, 44px); }
  .cta-banner .cta-sub { font-size: 16px; }
  .cta-banner .btn { width: 100%; }

  /* Notices header */
  .notices-header { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ============================================================
   About Page — Section Styles
   ============================================================ */

/* ---- School Story ---- */
.story {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 60px;
  align-items: center;
}
.story-text p { color: var(--ink-soft); font-weight: 300; font-size: 16.5px; }
.story-photo {
  aspect-ratio: 4/3.2;
  border-radius: var(--radius);
  overflow: hidden;
}
/* Navy placeholder for missing story photo */
.story-photo-placeholder {
  aspect-ratio: 4/3.2;
  border-radius: var(--radius);
  background: var(--navy);
  display: grid;
  place-items: center;
  color: var(--gold);
  font-family: var(--font-head);
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 700;
  text-align: center;
  padding: 24px;
  line-height: 1.4;
}

/* ---- Mission & Vision ---- */
.mv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.mv-card { padding: 40px; }
.mv-card .icon-box { margin-bottom: 22px; }
.mv-card h3 { font-size: 26px; margin-bottom: 14px; }
.mv-card p  { color: var(--ink-soft); font-weight: 300; margin: 0; }

/* ---- Principal's Message ---- */
.principal {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 56px;
  align-items: center;
}
.principal-photo {
  aspect-ratio: 3/3.6;
  border-radius: 18px;
  overflow: hidden;
}
.principal-photo-placeholder {
  aspect-ratio: 3/3.6;
  border-radius: 18px;
  background: var(--navy);
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-size: 64px;
  font-weight: 800;
  color: var(--gold);
}
.principal .role {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-top: 18px;
}
.principal .who {
  font-family: var(--font-head);
  font-size: 22px;
  color: var(--navy);
  margin-top: 4px;
}

/* ---- Staff Grid ---- */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.staff-card {
  padding: 26px 22px;
  text-align: center;
}
.staff-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.staff-pic {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  margin: 0 auto 18px;
  overflow: hidden;
  border: 3px solid var(--cream-2);
}
.staff-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Circular placeholder with initial */
.staff-pic-placeholder {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  margin: 0 auto 18px;
  background: var(--navy);
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-size: 38px;
  font-weight: 800;
  color: var(--gold);
  border: 3px solid var(--cream-2);
}
.staff-card h4 { font-size: 18px; margin-bottom: 0; }
.staff-card .staff-role {
  font-size: 13.5px;
  color: var(--gold);
  font-weight: 600;
  margin-top: 5px;
  letter-spacing: 0.02em;
}
.staff-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-style: italic;
  padding: 40px 0;
}

/* ---- Accreditation Strip ---- */
.accred-strip {
  text-align: center;
}
.accred-strip img {
  max-width: 320px;
  max-height: 160px;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 10px;
}
.accred-strip a { display: inline-block; }
.accred-strip a:hover { opacity: 0.85; }

/* ============================================================
   About Page — Responsive
   ============================================================ */
@media (max-width: 880px) {
  .story       { grid-template-columns: 1fr; gap: 36px; }
  .mv-grid     { grid-template-columns: 1fr; }
  .principal   { grid-template-columns: 1fr; gap: 36px; }
  .staff-grid  { grid-template-columns: repeat(2, 1fr); }
  /* Values override: 3-col → 2-col */
  .about-values { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 680px) {
  .principal-photo,
  .principal-photo-placeholder { aspect-ratio: 3/2.4; }
  .story-photo,
  .story-photo-placeholder     { aspect-ratio: 3/2.2; }
  .mv-card { padding: 30px 26px; }
  .mv-card h3 { font-size: 23px; }
  .principal .quote { font-size: 18px !important; padding-left: 20px !important; }
  .staff-pic,
  .staff-pic-placeholder { width: 84px; height: 84px; font-size: 30px; }
  .staff-card h4 { font-size: 16px; }
}

@media (max-width: 460px) {
  .staff-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .staff-card { padding: 20px 14px; }
  /* Values override: → 1-col */
  .about-values { grid-template-columns: 1fr !important; }
}

/* ============================================================
   Gallery Page — Section Styles
   ============================================================ */

/* ---- Filter tabs ---- */
.gallery-filters {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 44px;
  flex-wrap: wrap;
}
.gallery-filters button {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.02em;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--muted);
  cursor: pointer;
  transition: border-color .25s, color .25s, background .25s;
  white-space: nowrap;
}
.gallery-filters button:hover {
  border-color: var(--gold);
  color: var(--navy);
}
.gallery-filters button.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

/* ---- Photo grid ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.gallery-cell {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  background: var(--cream-2);
}
.gallery-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s var(--ease);
}
.gallery-cell:hover img { transform: scale(1.05); }
.gallery-cell-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 18px 16px 14px;
  background: linear-gradient(transparent, rgba(13,21,38,0.88));
  color: var(--white);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s, transform .3s;
}
.gallery-cell:hover .gallery-cell-overlay,
.gallery-cell:focus .gallery-cell-overlay {
  opacity: 1;
  transform: none;
}
.gallery-cell-overlay b {
  font-family: var(--font-head);
  font-size: 16px;
  display: block;
  line-height: 1.3;
}
.gallery-cell-overlay span {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-soft);
  font-weight: 600;
  margin-top: 4px;
  display: block;
}
/* Placeholder cell when no image URL */
.gallery-cell-placeholder {
  width: 100%;
  height: 100%;
  background: var(--cream-2);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Empty state */
.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 0;
  color: var(--muted);
  font-style: italic;
  font-size: 17px;
}

/* ============================================================
   Gallery — Responsive
   ============================================================ */
@media (max-width: 880px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  /* Mobile filter strip — horizontal swipe, no wrapping */
  .gallery-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    margin: 0 -20px 28px;
    padding: 0 20px 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .gallery-filters::-webkit-scrollbar { display: none; }
  .gallery-filters button { flex: none; padding: 9px 18px; font-size: 13.5px; }
  /* Keep 2-col grid on mobile */
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* ============================================================
   Notice Page — Section Styles
   ============================================================ */

/* ---- Pagination ---- */
.notice-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.notice-pager button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
  white-space: nowrap;
}
.notice-pager button:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--gold);
}
.notice-pager button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
.pager-info {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* ---- Empty state ---- */
.notice-empty {
  padding: 40px 0 20px;
  text-align: center;
  color: var(--muted);
  font-style: italic;
  font-size: 15px;
}

/* ---- Notice item — whole row clickable ---- */
.notice-item--clickable {
  cursor: pointer;
  transition: background .18s;
  border-radius: 8px;
  margin: 0 -8px;
  padding-left: 8px;
  padding-right: 8px;
}
.notice-item--clickable:hover { background: var(--cream); }
.notice-item--clickable:hover .t { color: var(--gold); }
.notice-item--clickable:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.notice-item-inner { min-width: 0; }

/* Attachment type badges on list items */
.n-attach.pdf {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-left: 8px;
  vertical-align: middle;
}
.n-attach.img-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-left: 8px;
  vertical-align: middle;
}

/* ---- Notice Detail Modal ---- */
.nm-scrim {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.60);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.nm-scrim.show {
  opacity: 1;
  pointer-events: auto;
}
.nm-panel {
  background: var(--white);
  border-radius: 16px;
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
  transform: translateY(20px) scale(.98);
  transition: transform .35s var(--ease);
}
.nm-scrim.show .nm-panel { transform: none; }

.nm-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.92);
  cursor: pointer;
  font-size: 20px;
  color: var(--navy);
  display: grid;
  place-items: center;
  z-index: 3;
  transition: background .2s, transform .2s;
  line-height: 1;
}
.nm-close:hover { background: var(--navy); color: var(--white); transform: rotate(90deg); }

/* Image at top of modal — clickable to open lightbox */
.nm-img-wrap { position: relative; }
.nm-img-btn {
  display: block;
  width: 100%;
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
  position: relative;
}
.nm-img-btn img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 16px 16px 0 0;
  display: block;
  transition: opacity .2s;
}
.nm-img-btn:hover img { opacity: 0.9; }
.nm-img-expand {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.52);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #fff;
  display: grid;
  place-items: center;
  pointer-events: none;
  transition: background .2s, transform .2s;
}
.nm-img-btn:hover .nm-img-expand {
  background: rgba(0,0,0,0.78);
  transform: scale(1.1);
}
.nm-img-expand svg { width: 15px; height: 15px; }

/* Content body */
.nm-body { padding: 28px; }

.nm-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.nm-type {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.nm-date {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}

.nm-title {
  font-family: var(--font-head);
  font-size: clamp(20px, 3.5vw, 26px);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 18px;
}
body.lang-np .nm-title { font-family: var(--font-nepali); }

.nm-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 0 20px;
}

.nm-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
  font-weight: 300;
}
.nm-content p { margin: 0 0 0.85em; }
.nm-content p:last-child { margin-bottom: 0; }
body.lang-np .nm-content { font-family: var(--font-nepali); }

/* Footer — PDF download button */
.nm-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.nm-pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  background: var(--navy);
  padding: 12px 22px;
  border-radius: 8px;
  text-decoration: none;
  transition: background .2s, transform .2s;
}
.nm-pdf-btn:hover { background: var(--navy-light); transform: translateY(-1px); }
.nm-pdf-btn svg { width: 16px; height: 16px; flex: none; }

/* ---- Notice modal Case 2: image-only, full natural height ---- */
.nm-img-contain-wrap { width: 100%; position: relative; }
.nm-img-contain-btn {
  display: block;
  width: 100%;
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
  position: relative;
}
.nm-img-contain-btn img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 0 0 16px 16px;
  transition: opacity .2s;
}
.nm-img-contain-btn:hover img { opacity: 0.9; }

/* ---- Notice modal Case 3: PDF-only, large open button ---- */
.nm-pdf-block {
  text-align: center;
  padding: 28px 0 8px;
}
.nm-pdf-btn-large {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  background: var(--navy);
  padding: 16px 32px;
  border-radius: 10px;
  text-decoration: none;
  transition: background .2s, transform .2s;
}
.nm-pdf-btn-large:hover { background: var(--navy-light); transform: translateY(-1px); }
.nm-pdf-btn-large svg { width: 18px; height: 18px; flex: none; }

/* ============================================================
   Notice — Responsive
   ============================================================ */
@media (max-width: 680px) {
  .notice-pager { gap: 8px; }
  .notice-pager button { padding: 8px 12px; font-size: 12px; }
  .pager-info { font-size: 12px; }

  /* Notice modal — bottom sheet on mobile */
  .nm-scrim { padding: 0; align-items: flex-end; }
  .nm-panel {
    max-width: 100%;
    max-height: 88vh;
    border-radius: 20px 20px 0 0;
  }
  .nm-img-btn img { border-radius: 20px 20px 0 0; max-height: 220px; }
  .nm-body { padding: 22px 20px 28px; }
  .nm-title { font-size: clamp(18px, 5.5vw, 22px); }
}

/* ============================================================
   Blog Listing Page
   ============================================================ */

/* ---- Category badge ---- */
.badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--gold);
  padding: 5px 12px;
  border-radius: 999px;
  line-height: 1;
}

/* ---- Post date meta ---- */
.post-date {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* ---- Read more arrow link ---- */
.read-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  transition: gap .2s, color .2s;
}
.read-more:hover { gap: 12px; color: var(--gold); }
.read-more svg { transition: transform .2s; }
.read-more:hover svg { transform: translateX(3px); }

/* ---- Featured post card ---- */
.blog-featured {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  overflow: hidden;
  margin-bottom: 56px;
}
.blog-featured-cover {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--navy);
}
.blog-featured-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s var(--ease);
}
.blog-featured:hover .blog-featured-cover img { transform: scale(1.03); }
.blog-featured-cover-ph {
  width: 100%;
  height: 100%;
  background: var(--navy);
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 700;
  color: var(--gold);
  text-align: center;
  padding: 24px;
}
.blog-featured-body {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  background: var(--white);
}
.blog-featured-body h2 {
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.2;
}
.blog-featured-body p {
  color: var(--ink-soft);
  font-weight: 300;
  font-size: 15px;
  margin: 0;
  line-height: 1.7;
}

/* ---- Home blog preview section header ---- */
.home-blog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 38px;
}
@media (max-width: 680px) {
  .home-blog-header { flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 26px; }
}

/* ---- Post grid ---- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.post-card { overflow: hidden; display: flex; flex-direction: column; }
.post-card-cover {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--navy);
  flex: none;
}
.post-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s var(--ease);
}
.post-card:hover .post-card-cover img { transform: scale(1.05); }
.post-card-cover-ph {
  width: 100%;
  height: 100%;
  background: var(--navy);
  display: grid;
  place-items: center;
  color: var(--gold);
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  padding: 16px;
}
.post-card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.post-card-body h3 {
  font-size: 19px;
  line-height: 1.3;
}
.post-card-body p {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 300;
  margin: 0;
  line-height: 1.65;
}
.post-card .read-more { margin-top: auto; padding-top: 6px; }

/* ---- Empty state ---- */
.blog-empty {
  text-align: center;
  padding: 80px 0;
  color: var(--muted);
  font-style: italic;
  font-size: 17px;
}

/* ============================================================
   Blog Post Detail Page
   ============================================================ */

/* Hero with cover image */
.post-hero {
  position: relative;
  min-height: 52vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--navy-dark);
}
.post-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.post-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(13,21,38,0.92) 0%,
    rgba(13,21,38,0.55) 55%,
    rgba(13,21,38,0.22) 100%
  );
  z-index: 1;
}
.post-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 48px 0 52px;
}
.post-hero-content .badge { margin-bottom: 14px; }
.post-hero-content h1 {
  color: var(--white);
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.15;
  max-width: 820px;
}
.post-hero-content .post-date { color: rgba(255,255,255,0.65); margin-top: 14px; }

/* Post article body */
.post-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 28px 72px;
  font-size: 18px;
  line-height: 1.85;
  color: var(--ink);
}
.post-article h2, .post-article h3 { margin: 1.6em 0 0.6em; }
.post-article p  { margin: 0 0 1.2em; }
.post-article img {
  max-width: 100%;
  border-radius: var(--radius);
  margin: 1.6em 0;
  display: block;
}
.post-article a { color: var(--gold); text-decoration: underline; }
.post-article ul, .post-article ol { padding-left: 1.6em; margin: 0 0 1.2em; }
.post-article li { margin-bottom: 0.4em; }
.post-article blockquote {
  border-left: 3px solid var(--gold);
  padding: 6px 0 6px 22px;
  font-style: italic;
  color: var(--navy);
  margin: 1.4em 0;
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
  margin-bottom: 32px;
}
.back-link:hover { color: var(--gold); }

/* ============================================================
   Blog — Responsive
   ============================================================ */
@media (max-width: 980px) {
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured-cover { aspect-ratio: 16/7; }
  .blog-featured-body { padding: 30px 26px; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .blog-featured-cover { aspect-ratio: 16/9; }
  .blog-featured-body { padding: 24px 20px; }
  .blog-featured-body h2 { font-size: clamp(20px, 6.5vw, 26px); }
  .post-hero { min-height: 44vh; }
  .post-hero-content h1 { font-size: clamp(26px, 8vw, 36px); }
  .post-article { font-size: 16px; padding: 40px 20px 56px; }
}
@media (max-width: 560px) {
  .post-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Contact Page — Section Styles
   ============================================================ */

/* ---- Two-column layout ---- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 56px;
  align-items: start;
}

/* ---- Contact form card ---- */
.contact-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 38px;
  box-shadow: var(--shadow-md);
}
.contact-form .eyebrow { margin-bottom: 8px; }
.contact-form h3 { font-size: 28px; margin-bottom: 26px; }

/* ---- Map wrapper ---- */
.map-wrap {
  margin-top: 30px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.map-wrap iframe {
  width: 100%;
  aspect-ratio: 4/3;
  border: 0;
  display: block;
  filter: grayscale(0.15) contrast(1.02);
}
.map-placeholder {
  aspect-ratio: 4/3;
  background: var(--navy);
  display: grid;
  place-items: center;
  color: var(--gold);
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  padding: 24px;
  line-height: 1.5;
}

/* ---- Social icons in contact info ---- */
.info-socials {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.info-socials a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--navy);
  transition: .2s;
}
.info-socials a:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
  transform: translateY(-2px);
}
.info-socials svg { width: 16px; height: 16px; }

/* ============================================================
   Form Validation & File Preview (shared — used on all pages)
   ============================================================ */
.field input.is-invalid,
.field select.is-invalid,
.field textarea.is-invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220,53,69,0.14);
}
.field-error-msg {
  font-size: 12px;
  color: #dc3545;
  margin-top: 3px;
  font-weight: 500;
}
.file-preview {
  font-size: 13px;
  color: var(--muted);
  margin-top: 5px;
  display: block;
  font-style: italic;
}
.file-preview.file-error { color: #dc3545; font-style: normal; font-weight: 500; }

/* ============================================================
   Contact — Responsive
   ============================================================ */
@media (max-width: 880px) {
  .contact-layout { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 680px) {
  .contact-form { padding: 26px 22px; }
  .contact-form h3 { font-size: 23px; margin-bottom: 20px; }
  .info-row { padding: 18px 0; gap: 14px; }
  .info-row .ic { width: 46px; height: 46px; }
}

/* ============================================================
   ADMIN PANEL
   Scoped to body[data-page="admin"] — zero bleed into public site
   ============================================================ */

body[data-page="admin"] {
  background: #F0F2F5;
  overflow: hidden;
}

/* ---- Login screen ---- */
.admin-login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--navy-dark);
  padding: 24px;
}
.admin-login-card {
  background: var(--white);
  border-radius: 16px;
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.admin-login-card .emblem {
  width: 64px;
  height: 64px;
  font-size: 32px;
  margin: 0 auto 20px;
}
.admin-login-card h1 {
  font-size: 26px;
  margin-bottom: 6px;
}
.admin-login-card .login-sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 28px;
  font-weight: 300;
}
.admin-login-card .field { text-align: left; margin-bottom: 14px; }
.admin-login-card .field input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  transition: border-color .2s;
}
.admin-login-card .field input:focus {
  outline: none;
  border-color: var(--navy);
}
.admin-login-card .field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  text-align: left;
}
.admin-login-card .btn-login {
  width: 100%;
  padding: 14px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
  margin-top: 6px;
}
.admin-login-card .btn-login:hover { background: var(--navy-light); }
.admin-login-card .btn-login:disabled { opacity: .55; cursor: not-allowed; }
.login-error {
  color: #dc3545;
  font-size: 13.5px;
  margin-top: 12px;
  font-weight: 500;
  background: rgba(220,53,69,0.08);
  border-radius: 8px;
  padding: 10px 14px;
}

/* ---- Admin shell layout ---- */
.admin-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ---- Header ---- */
.admin-header {
  height: 64px;
  flex: none;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 80;
  box-shadow: var(--shadow-sm);
}
.admin-header-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.admin-header-right { display: flex; align-items: center; gap: 14px; flex: none; }
.admin-header-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.admin-header-logo .emblem {
  width: 38px;
  height: 38px;
  font-size: 20px;
  flex: none;
}

.sidebar-toggle {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
  display: none;
  place-items: center;
  font-size: 18px;
  color: var(--navy);
  transition: .2s;
}
.sidebar-toggle:hover { background: var(--cream); }

/* ---- Unsaved indicator ---- */
.unsaved-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}
.unsaved-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  background: #f59e0b;
}
.unsaved-dot.saved { background: #22c55e; }

.btn-logout {
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  transition: .2s;
  white-space: nowrap;
}
.btn-logout:hover { border-color: #dc3545; color: #dc3545; }

/* ---- Body (sidebar + main) ---- */
.admin-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* ---- Sidebar ---- */
.admin-sidebar {
  width: 240px;
  flex: none;
  background: var(--navy);
  overflow-y: auto;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
}
.admin-sidebar-group-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
  padding: 18px 20px 6px;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  cursor: pointer;
  border: none;
  background: none;
  color: rgba(255,255,255,0.68);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  width: 100%;
  text-align: left;
  transition: background .15s, color .15s;
  border-left: 3px solid transparent;
}
.sidebar-item:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
}
.sidebar-item.active {
  border-left-color: var(--gold);
  background: rgba(255,255,255,0.09);
  color: #fff;
  font-weight: 600;
}
.sidebar-item svg { width: 17px; height: 17px; flex: none; opacity: 0.75; }
.sidebar-item.active svg { opacity: 1; }
.sidebar-sep {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 10px 16px;
}

/* ---- Main content area ---- */
.admin-main {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
  min-width: 0;
}
.admin-section { max-width: 900px; }
.admin-section-title {
  font-size: 22px;
  color: var(--navy);
  margin-bottom: 24px;
  font-family: var(--font-head);
}

/* ---- Admin cards ---- */
.admin-card {
  background: var(--white);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}
.admin-card-heading {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  padding-bottom: 14px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-card-heading svg { width: 16px; height: 16px; color: var(--gold); flex: none; }

/* ---- Admin info-tip tooltips ---- */
.info-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-left: 5px;
  cursor: help;
}
.info-tip svg {
  color: var(--muted);
  display: block;
}
/* Tooltip box */
.info-tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: #fff;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
  padding: 8px 12px;
  border-radius: 6px;
  max-width: 240px;
  width: max-content;
  white-space: normal;
  pointer-events: none;
  z-index: 9999;
  display: none;
  text-transform: none;
  letter-spacing: 0;
  text-align: left;
  box-shadow: 0 4px 14px rgba(0,0,0,0.22);
}
/* Arrow pointing down from tooltip */
.info-tip::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--navy);
  pointer-events: none;
  z-index: 9999;
  display: none;
}
.info-tip:hover::after,
.info-tip:hover::before { display: block; }
/* Mobile — show below icon instead */
@media (max-width: 768px) {
  .info-tip::after {
    bottom: auto;
    top: calc(100% + 8px);
    left: 0;
    transform: none;
  }
  .info-tip::before {
    bottom: auto;
    top: calc(100% + 2px);
    border-top-color: transparent;
    border-bottom-color: var(--navy);
  }
}

/* ---- Admin form grid ---- */
.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.admin-form-grid .full { grid-column: 1 / -1; }
.admin-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.admin-field label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.admin-field input,
.admin-field textarea,
.admin-field select {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  transition: border-color .2s;
  width: 100%;
}
.admin-field textarea { min-height: 88px; resize: vertical; }
.admin-field input:focus,
.admin-field textarea:focus,
.admin-field select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27,42,71,0.08);
}
.admin-field-hint {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
}

/* ---- Toggle switch ---- */
.admin-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  cursor: pointer;
}
.admin-toggle-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  user-select: none;
}
.admin-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex: none;
}
.admin-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s;
}
.toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--white);
  transition: transform .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}
.admin-toggle input:checked + .toggle-track { background: var(--gold); }
.admin-toggle input:checked + .toggle-track::after { transform: translateX(20px); }
.admin-toggle input:focus-visible + .toggle-track {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

/* ---- Buttons ---- */
.btn-admin-save {
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 13px 32px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-admin-save:hover { background: var(--navy-light); transform: translateY(-1px); }
.btn-admin-save:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-admin-delete {
  background: #dc3545;
  color: var(--white);
  border: none;
  border-radius: 7px;
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
.btn-admin-delete:hover { background: #b91c2b; }
.btn-admin-secondary {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 10px 20px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
}
.btn-admin-secondary:hover { border-color: var(--navy); }

.admin-save-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ---- Toast ---- */
.admin-toast-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.admin-toast {
  padding: 13px 20px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--white);
  box-shadow: var(--shadow-md);
  animation: toast-in .3s var(--ease);
  pointer-events: auto;
  max-width: 320px;
}
.admin-toast.success { background: #22c55e; }
.admin-toast.error   { background: #dc3545; }

/* ---- Placeholder for future sections ---- */
.admin-coming-soon {
  text-align: center;
  padding: 60px 24px;
  color: var(--muted);
}
.admin-coming-soon svg { width: 48px; height: 48px; margin-bottom: 16px; opacity: 0.35; }
.admin-coming-soon h3  { font-size: 20px; color: var(--navy); margin-bottom: 8px; }
.admin-coming-soon p   { font-size: 14px; font-weight: 300; }

/* ============================================================
   Admin Panel — Responsive
   ============================================================ */
@media (max-width: 900px) {
  .admin-form-grid { grid-template-columns: 1fr; }
  .admin-main { padding: 20px; }
}
@media (max-width: 768px) {
  .sidebar-toggle { display: grid; }
  .admin-header-title { display: none; }
  .admin-sidebar {
    position: fixed;
    left: -260px;
    top: 64px;
    bottom: 0;
    z-index: 70;
    width: 240px;
    transition: left .3s var(--ease);
    box-shadow: var(--shadow-lg);
  }
  .admin-sidebar.open { left: 0; }
  .admin-main { padding: 16px; }
  .admin-save-row { justify-content: stretch; }
  .btn-admin-save { width: 100%; justify-content: center; }
}

/* ============================================================
   Admin — Phase 9B: Upload Areas, Staff List, Inline Forms
   ============================================================ */

/* ---- Upload area ---- */
.admin-upload-area {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 16px;
  background: #F8F9FA;
  margin-top: 6px;
}
.admin-upload-preview {
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
  display: none;
  max-height: 200px;
}
.admin-upload-preview.has-media { display: block; }
.admin-upload-preview img,
.admin-upload-preview video {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.admin-upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.upload-label-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  transition: .2s;
  user-select: none;
}
.upload-label-btn:hover { border-color: var(--navy); }
.upload-label-btn svg { width: 14px; height: 14px; }
.upload-file-name {
  font-size: 12.5px;
  color: var(--muted);
  font-style: italic;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-file-name.selected { color: var(--navy); font-style: normal; font-weight: 500; }

/* Circular photo preview (principal, staff) */
.photo-preview-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  background: var(--cream-2);
  display: none;
  flex: none;
}
.photo-preview-circle.has-photo { display: block; }
.photo-preview-circle img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- Radio group ---- */
.admin-radio-group {
  display: flex;
  gap: 20px;
  padding: 8px 0;
}
.admin-radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  user-select: none;
}
.admin-radio-label input[type=radio] { accent-color: var(--navy); width: 16px; height: 16px; }

/* ---- Stats rows ---- */
.admin-stats-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1.5fr;
  gap: 10px;
  align-items: end;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}
.admin-stats-row:last-child { border-bottom: none; }
.admin-stats-num { font-weight: 700; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }

/* ---- Cocurricular rows ---- */
.cocur-admin-row {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 12px;
}
.cocur-admin-row-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

/* ---- Staff list ---- */
.staff-admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.staff-admin-list { display: flex; flex-direction: column; gap: 8px; }
.staff-admin-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.staff-admin-row.is-editing {
  border-color: var(--navy);
  background: #F8FAFF;
}
.staff-row-pic {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--navy);
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 800;
  color: var(--gold);
  flex: none;
}
.staff-row-pic img { width: 100%; height: 100%; object-fit: cover; }
.staff-row-info { flex: 1; min-width: 0; }
.staff-row-name { font-weight: 600; font-size: 15px; color: var(--navy); }
.staff-row-role { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.staff-row-actions { display: flex; align-items: center; gap: 6px; flex: none; }

/* Icon buttons (reorder, edit, delete) */
.btn-icon {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: var(--white);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--navy);
  transition: .2s;
  flex: none;
}
.btn-icon:hover:not(:disabled) { border-color: var(--navy); background: var(--cream); }
.btn-icon:disabled { opacity: 0.3; cursor: not-allowed; }
.btn-icon svg { width: 14px; height: 14px; }
.btn-icon.danger { color: #dc3545; }
.btn-icon.danger:hover:not(:disabled) { border-color: #dc3545; background: rgba(220,53,69,0.06); }
.btn-icon.success { color: #22c55e; }

/* Inline add / edit form */
.staff-inline-form {
  background: #F0F4FF;
  border: 1.5px solid rgba(27,42,71,0.18);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.staff-inline-form h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.staff-inline-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
/* Delete confirmation inline */
.admin-delete-confirm {
  background: rgba(220,53,69,0.06);
  border: 1.5px solid rgba(220,53,69,0.28);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-delete-confirm p { font-size: 13px; font-weight: 500; color: #dc3545; margin: 0; flex: 1; }
.staff-empty-state {
  text-align: center;
  padding: 40px;
  color: var(--muted);
  font-style: italic;
  font-size: 15px;
}

/* Sub-section divider inside a card */
.admin-sub-heading {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 20px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.admin-sub-heading:first-child { margin-top: 0; padding-top: 0; border-top: none; }

/* ============================================================
   Admin — Phase 9C: Gallery, Notice, Blog Managers
   ============================================================ */

/* ---- Gallery Manager ---- */
.gallery-admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.gallery-admin-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.gallery-admin-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--navy);
}
.gallery-admin-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-cell-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(27,42,71,0.82);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  pointer-events: none;
}
.gallery-cell-del {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: rgba(220,53,69,0.88);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
}
.gallery-admin-cell:hover .gallery-cell-del { opacity: 1; }
.gallery-cell-del svg { width: 13px; height: 13px; }
.gallery-cell-confirm {
  position: absolute;
  inset: 0;
  background: rgba(27,42,71,0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 8px;
}
.gallery-cell-confirm p {
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  margin: 0;
  padding: 0 8px;
}
.gallery-confirm-actions { display: flex; gap: 6px; }
.gallery-confirm-yes,
.gallery-confirm-no {
  padding: 5px 14px;
  border-radius: 5px;
  border: none;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.gallery-confirm-yes { background: #dc3545; color: #fff; }
.gallery-confirm-no  { background: rgba(255,255,255,0.18); color: #fff; }
.gallery-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px;
  color: var(--muted);
  font-style: italic;
}
.gallery-add-preview {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border);
  background: var(--cream-2);
  display: none;
  flex: none;
}
.gallery-add-preview.has-photo { display: block; }
.gallery-add-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- Notice Manager ---- */
.notice-admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.notice-admin-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--cream-2);
  border-radius: 10px;
}
.notice-tab-btn {
  padding: 8px 20px;
  border: none;
  border-radius: 7px;
  background: transparent;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: .15s;
  white-space: nowrap;
}
.notice-tab-btn.active {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}
.notice-admin-list { display: flex; flex-direction: column; gap: 8px; }
.notice-admin-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.notice-row-title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notice-row-date {
  font-size: 12px;
  color: var(--muted);
  flex: none;
  white-space: nowrap;
}
.notice-row-badge {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
  flex: none;
}
.notice-row-badge.active   { background: rgba(34,197,94,0.12);   color: #16a34a; }
.notice-row-badge.inactive { background: rgba(107,107,107,0.10); color: var(--muted); }
.notice-row-actions { display: flex; gap: 6px; flex: none; }
.notice-empty-state {
  text-align: center;
  padding: 40px;
  color: var(--muted);
  font-style: italic;
  font-size: 15px;
}
.notice-inline-form {
  background: #F0F4FF;
  border: 1.5px solid rgba(27,42,71,0.18);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.notice-inline-form h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.notice-inline-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

/* ---- Blog Manager ---- */
.blog-admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.blog-admin-list { display: flex; flex-direction: column; gap: 8px; }
.blog-admin-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.blog-cover-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--navy);
  flex: none;
  display: grid;
  place-items: center;
  color: var(--gold);
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
}
.blog-cover-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-row-info { flex: 1; min-width: 0; }
.blog-row-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.blog-row-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.blog-row-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.btn-star {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: var(--white);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--muted);
  transition: .2s;
  flex: none;
}
.btn-star:hover { border-color: var(--gold-light); color: var(--gold); }
.btn-star.featured { border-color: var(--gold); color: var(--gold); background: rgba(200,144,47,0.06); }
.btn-star svg { width: 16px; height: 16px; }
.btn-star svg path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.btn-star.featured svg path { fill: currentColor; stroke-width: 1; }
.blog-status-badge {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
  flex: none;
}
.blog-status-badge.active { background: rgba(34,197,94,0.12); color: #16a34a; }
.blog-status-badge.draft  { background: rgba(107,107,107,0.10); color: var(--muted); }
.blog-cat-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(27,42,71,0.07);
  color: var(--navy);
  flex: none;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.blog-empty-state {
  text-align: center;
  padding: 48px;
  color: var(--muted);
  font-style: italic;
}
.blog-form-panel {
  background: var(--white);
  border-radius: 12px;
  padding: 28px;
  border: 1px solid var(--border);
}
.blog-form-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.blog-form-header h3 {
  font-size: 18px;
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.3;
}
.blog-slug-preview {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 5px;
  font-family: 'Courier New', monospace;
  word-break: break-all;
}
.blog-body-textarea {
  min-height: 220px;
  resize: vertical;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
}
.blog-form-footer {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ---- 9C Responsive ---- */
@media (max-width: 900px) {
  .gallery-admin-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .gallery-admin-grid { grid-template-columns: repeat(2, 1fr); }
  .notice-admin-header { flex-direction: column; align-items: flex-start; }
  .blog-form-footer { flex-direction: column; }
}

/* ============================================================
   Admin — Phase 9D: Spinner, Field Errors, Card Labels,
                     Submissions Inbox
   ============================================================ */

/* ---- Loading spinner ---- */
.admin-spinner-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}
.admin-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: admin-spin 0.7s linear infinite;
  flex: none;
}
@keyframes admin-spin { to { transform: rotate(360deg); } }

/* ---- Inline field error ---- */
.admin-field-error {
  font-size: 11.5px;
  color: #dc3545;
  margin-top: 4px;
  display: block;
  font-weight: 500;
}

/* ---- Card label (flex header row without bottom border) ---- */
.admin-card-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
}
.admin-card-label svg { width: 16px; height: 16px; color: var(--gold); flex: none; }

/* ---- Submissions Inbox tabs ---- */
.sub-tabs-header {
  margin-bottom: 20px;
}
.sub-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--cream-2);
  border-radius: 10px;
  width: fit-content;
  flex-wrap: wrap;
}
.sub-tab-btn {
  padding: 8px 18px;
  border: none;
  border-radius: 7px;
  background: transparent;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: .15s;
  white-space: nowrap;
}
.sub-tab-btn.active {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}

/* ---- Submissions table ---- */
.sub-table-wrap { overflow-x: auto; }
.sub-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.sub-table thead th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  background: var(--white);
}
.sub-table tbody .sub-data-row {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .1s;
}
.sub-table tbody .sub-data-row:hover { background: var(--cream); }
.sub-table tbody .sub-data-row.expanded { background: var(--cream-2); }
.sub-table tbody td {
  padding: 11px 12px;
  vertical-align: middle;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}
.sub-date {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.sub-table .expand-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--muted);
  transition: transform .2s, color .2s;
  display: flex;
  align-items: center;
}
.sub-table .expand-btn svg { width: 16px; height: 16px; }
.sub-data-row.expanded .expand-btn { transform: rotate(180deg); color: var(--navy); }
/* Preserves line breaks in submission expanded rows (messages, cover letters) */
.sub-pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.sub-expanded-row td {
  background: var(--cream-2);
  padding: 14px 16px 16px 48px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
  cursor: default;
  border-bottom: 1px solid var(--border);
}
.sub-empty {
  text-align: center;
  padding: 48px;
  color: var(--muted);
  font-style: italic;
}

/* ---- CV download button ---- */
.cv-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 5px;
  border: 1.5px solid var(--navy);
  background: transparent;
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: .15s;
  white-space: nowrap;
}
.cv-download-btn:hover:not(:disabled) { background: var(--navy); color: var(--white); }
.cv-download-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: var(--border);
  color: var(--muted);
}

/* ---- 9D Responsive ---- */
@media (max-width: 600px) {
  .sub-tabs { gap: 2px; }
  .sub-tab-btn { padding: 7px 12px; font-size: 12px; }
}

/* ============================================================
   Achievements Page — public card layout
   ============================================================ */

.achievements-list {
  display: flex;
  flex-direction: column;
}

/* Card */
.achievement-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  margin-bottom: 32px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.achievement-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(200,144,47,0.4);
}

/* Text */
.achievement-title {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 8px;
  line-height: 1.2;
}
body.lang-np .achievement-title { font-family: var(--font-nepali); }

.achievement-desc {
  font-size: 15px;
  color: var(--ink-soft);
  font-weight: 300;
  line-height: 1.7;
  margin: 0 0 24px;
}
body.lang-np .achievement-desc { font-family: var(--font-nepali); }

/* Image grid */
.achievement-img-grid {
  display: grid;
  gap: 12px;
}
.achievement-img-grid.count-2 { grid-template-columns: 1fr 1fr; }
.achievement-img-grid.count-3 { grid-template-columns: 1fr 1fr; }
.achievement-img-grid.count-3 .ach-img-first { grid-column: 1 / -1; aspect-ratio: 16/9; }
.achievement-img-grid.count-4,
.achievement-img-grid.count-5 { grid-template-columns: 1fr 1fr; }

.ach-img-item {
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  aspect-ratio: 4/3;
}
.ach-img-item:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.ach-img-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s var(--ease);
}
.ach-img-item:hover img { transform: scale(1.03); }

/* count-1: contain mode with cream background */
.achievement-img-grid.count-1 .ach-img-item {
  aspect-ratio: auto;
  background: var(--cream);
}
.achievement-img-grid.count-1 .ach-img-item img {
  max-height: 400px;
  object-fit: contain;
  height: auto;
  border-radius: 8px;
}

/* Share row */
.achievement-share {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.achievements-empty {
  text-align: center;
  padding: 80px 0;
  color: var(--muted);
  font-style: italic;
  font-size: 17px;
}

/* ============================================================
   Home Preview Grids — Blog & Achievements (4-col shared)
   ============================================================ */
.home-preview-grid,
.ach-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* Shared compact card — used for both blog and achievement previews */
.ach-preview-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.ach-preview-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(200,144,47,0.4);
}
.ach-preview-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--navy);
}
.ach-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s var(--ease);
}
.ach-preview-card:hover .ach-preview-thumb img { transform: scale(1.04); }
.ach-preview-thumb-ph {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  display: grid;
  place-items: center;
}
.ach-preview-thumb-ph svg { width: 32px; height: 32px; color: var(--gold); opacity: 0.7; }
.ach-preview-body { padding: 16px; }
.ach-preview-title {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
  margin: 0 0 5px;
}
body.lang-np .ach-preview-title { font-family: var(--font-nepali); }
.ach-preview-desc {
  font-size: 12px;
  color: var(--muted);
  font-weight: 300;
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Responsive — both grids */
@media (max-width: 880px) {
  .home-preview-grid,
  .ach-preview-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .achievement-img-grid.count-2,
  .achievement-img-grid.count-3,
  .achievement-img-grid.count-4,
  .achievement-img-grid.count-5 { grid-template-columns: 1fr; }
  .achievement-img-grid.count-3 .ach-img-first { grid-column: auto; aspect-ratio: 4/3; }
  .ach-img-item { aspect-ratio: auto; max-height: 260px; }
  .ach-img-item img { max-height: 260px; object-fit: contain; height: auto; }
  .achievement-img-grid.count-1 .ach-img-item img { max-height: 260px; }
}
@media (max-width: 560px) {
  .home-preview-grid,
  .ach-preview-grid { grid-template-columns: 1fr; }
  .achievement-card { padding: 22px 20px; }
  .achievement-title { font-size: 20px; }
}

/* Achievements admin */
.ach-admin-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.ach-admin-row:last-child { border-bottom: none; }
.ach-admin-thumb {
  width: 72px;
  height: 54px;
  border-radius: 8px;
  overflow: hidden;
  flex: none;
  background: var(--cream-2);
  border: 1px solid var(--border);
}
.ach-admin-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ach-admin-info { flex: 1; min-width: 0; }
.ach-admin-info strong { font-size: 15px; color: var(--navy); display: block; }
.ach-admin-info span { font-size: 12px; color: var(--muted); }
.ach-admin-actions { display: flex; gap: 6px; flex: none; }

.ach-images-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.ach-image-slot { display: flex; flex-direction: column; gap: 6px; }
.ach-image-preview {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 8px;
  overflow: hidden;
  background: var(--cream-2);
  border: 1px solid var(--border);
  position: relative;
}
.ach-image-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ach-image-preview.has-img { border-color: var(--gold); }

@media (max-width: 680px) {
  .achievement-body { padding: 22px 20px 24px; }
  .achievement-title { font-size: 19px; }
  .ach-images-grid { grid-template-columns: 1fr 1fr; }
}
