/* Public site — โรงเรียนอนุบาลหนองวัวซอ */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --green-900: #0a2e1c;
  --green-800: #0f3d27;
  --green-700: #1a5c3a;
  --green-500: #2d8f5a;
  --green-100: #e8f5ee;
  --green-50: #f3faf6;
  --pink: #e892b5;
  --pink-soft: #fdeef4;
  --surface: #ffffff;
  --text: #1a2332;
  --muted: #5c6b7a;
  --border: #e2ebe6;
  --shadow: 0 4px 24px rgb(15 45 30 / 0.08);
  --shadow-lg: 0 20px 50px rgb(15 45 30 / 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --font: "Sarabun", system-ui, sans-serif;
  --max: 1140px;
}

html { scroll-behavior: smooth; overflow-x: hidden; }
html.is-scroll-animating { scroll-behavior: auto !important; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--green-50); line-height: 1.65; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--green-500); }

.container { width: min(var(--max), 100% - 2rem); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgb(255 255 255 / 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 4.25rem; gap: 1rem; }
.logo { display: flex; align-items: center; gap: 0.75rem; color: var(--green-800); font-weight: 700; }
.logo:hover { color: var(--green-800); }
.logo-img { width: 48px; height: 48px; object-fit: contain; flex-shrink: 0; }
.logo-copy { display: flex; flex-direction: column; min-width: 0; }
.logo-title { font-size: clamp(0.9rem, 2.5vw, 1.05rem); line-height: 1.25; }
.logo-affiliation { font-size: 0.68rem; font-weight: 600; color: var(--muted); line-height: 1.3; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 0.5rem; cursor: pointer; }
.nav-toggle-bar { width: 24px; height: 2px; background: var(--green-800); border-radius: 2px; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; align-items: center; }
.nav-root { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; align-items: center; }
.site-nav a,
.nav-group-toggle {
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--muted);
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1.4;
  white-space: nowrap;
}
.site-nav a:hover,
.nav-group-toggle:hover { background: var(--green-100); color: var(--green-800); }
.site-nav a.is-active,
.nav-group.is-active > .nav-group-toggle { background: var(--green-100); color: var(--green-800); }
.nav-admin { background: var(--green-700) !important; color: #fff !important; margin-left: 0.25rem; }
.nav-admin:hover { background: var(--green-800) !important; color: #fff !important; }

.nav-group { position: relative; }
.nav-chevron {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.2s;
}
.nav-submenu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: auto;
  right: 0;
  min-width: 11.5rem;
  padding: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 120;
  flex-direction: column;
  gap: 0.15rem;
  display: flex;
}
.nav-submenu a {
  display: block;
  border-radius: 8px;
  white-space: nowrap;
}
.nav-group:hover > .nav-submenu,
.nav-group:focus-within > .nav-submenu,
.nav-group.is-open > .nav-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-group.is-open > .nav-group-toggle .nav-chevron {
  transform: rotate(-135deg) translateY(1px);
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .site-nav { position: absolute; inset-inline: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); max-height: 0; overflow: hidden; transition: max-height 0.35s; }
  .site-nav[data-open="true"] { max-height: min(85vh, 640px); overflow-y: auto; }
  .nav-root { flex-direction: column; padding: 0.75rem; align-items: stretch; gap: 0.15rem; }
  .site-nav a,
  .nav-group-toggle { display: flex; width: 100%; justify-content: space-between; border-radius: 10px; }
  .nav-submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0 0 0.35rem 0.75rem;
    min-width: 0;
    display: none;
  }
  .nav-group.is-open > .nav-submenu { display: flex; }
  .nav-admin { margin-left: 0; text-align: center; justify-content: center; }
}

/* Hero */
.hero-wrap {
  position: relative;
  width: min(var(--max), calc(100% - 1.5rem));
  margin: 0.65rem auto 0;
  z-index: 2;
}

.hero {
  position: relative;
  width: 100%;
  margin: 0;
  padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1rem, 2.5vw, 1.5rem);
  overflow: hidden;
  color: #fff;
  min-height: clamp(280px, 42vh, 420px);
  max-height: 460px;
  display: flex;
  align-items: center;
  isolation: isolate;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
}

.hero .container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.hero-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  transform: scale(1);
  will-change: opacity;
}

.hero-slide.is-active {
  opacity: 1;
}

.hero-slide-fallback {
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 50%, #1f6b45 100%);
}

.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(
    105deg,
    rgb(10 30 20 / 0.88) 0%,
    rgb(10 30 20 / 0.72) 45%,
    rgb(10 30 20 / 0.55) 100%
  );
}

.hero-dots {
  position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  z-index: 3; display: flex; gap: 0.5rem;
}
.hero-dot {
  width: 10px; height: 10px; border-radius: 50%; border: 2px solid rgb(255 255 255 / 0.6);
  background: transparent; padding: 0; cursor: pointer; transition: background 0.2s, transform 0.2s;
}
.hero-dot.is-active { background: #fff; border-color: #fff; transform: scale(1.15); }
.hero-dot:hover { background: rgb(255 255 255 / 0.5); }

.hero-grid { position: relative; z-index: 2; display: grid; gap: 1.5rem; align-items: center; width: 100%; }

.hero-badge {
  display: inline-block; padding: 0.35rem 0.85rem; border-radius: 999px;
  background: rgb(255 255 255 / 0.15); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.05em; margin-bottom: 0.75rem;
}
.hero-content h1 { margin: 0 0 0.5rem; font-size: clamp(1.35rem, 3vw, 2rem); font-weight: 800; line-height: 1.2; }
.hero-motto { margin: 0 0 0.5rem; font-size: 0.88rem; color: var(--pink-soft); font-weight: 600; }
.hero-lead { margin: 0 0 0.85rem; max-width: 28rem; opacity: 0.92; font-size: 0.86rem; line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.hero-actions .btn { padding: 0.55rem 1rem; font-size: 0.85rem; }

.hero-stats-card {
  background: rgb(255 255 255 / 0.1); border: 1px solid rgb(255 255 255 / 0.2);
  border-radius: var(--radius); padding: 1rem 1.1rem; backdrop-filter: blur(8px);
}
.hero-stats-card dl { margin: 0; display: grid; gap: 0.6rem; grid-template-columns: 1fr 1fr; }
.hero-stats-card dt { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.75; margin-bottom: 0.1rem; }
.hero-stats-card dd { margin: 0; font-size: 0.88rem; font-weight: 700; }
.hero-stats-card .wide { grid-column: 1 / -1; }
.hero-stats-card .wide dd { font-size: 0.78rem; font-weight: 600; line-height: 1.35; }

@media (max-width: 899px) {
  .hero-wrap {
    width: min(100%, calc(100% - 1rem));
    margin-top: 0.5rem;
  }

  .hero {
    min-height: auto;
    max-height: none;
    padding: 1.5rem 1rem 1.75rem;
  }

  .hero-grid {
    gap: 1rem;
  }

  .hero-lead {
    font-size: 0.84rem;
    max-width: none;
    margin-bottom: 0.75rem;
  }

  .hero-dots {
    bottom: 0.65rem;
  }
}

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1fr minmax(0, 240px); gap: 1.25rem; }
}

/* ─── Home templates ─── */

/* Modern */
.hero-wrap-modern {
  width: min(var(--max), calc(100% - 1rem));
}

.hero-modern {
  min-height: clamp(320px, 48vh, 520px);
  max-height: 560px;
  border-radius: 18px;
}

.hero-overlay-modern {
  background: linear-gradient(
    180deg,
    rgb(10 30 20 / 0.55) 0%,
    rgb(10 30 20 / 0.82) 100%
  );
}

.hero-modern-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: inherit;
  text-align: center;
}

.hero-content-centered {
  max-width: 42rem;
  margin: 0 auto;
}

.hero-content-centered .hero-lead {
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions-centered {
  justify-content: center;
}

.hero-stats-bar {
  margin-top: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-stats-bar-inner {
  display: grid;
  gap: 0.75rem 1rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  padding: 0.85rem 0;
}

.hero-stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0 0.5rem;
}

.hero-stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.hero-stat-item strong {
  font-size: 0.92rem;
  color: var(--green-800);
  line-height: 1.35;
}

.hero-stat-wide {
  grid-column: 1 / -1;
}

.home-template-modern .section-news-magazine {
  padding-top: clamp(2rem, 4vw, 3rem);
}

.card-grid-magazine {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.card-grid-magazine .content-card:first-child {
  grid-column: span 1;
}

@media (min-width: 900px) {
  .card-grid-magazine {
    grid-template-columns: repeat(3, 1fr);
  }

  .card-grid-magazine .content-card:first-child {
    grid-row: span 2;
  }

  .card-grid-magazine .content-card:first-child .card-image,
  .card-grid-magazine .content-card:first-child .card-image img {
    max-height: 520px;
  }
}

/* Compact */
.hero-wrap-compact {
  width: min(var(--max), calc(100% - 1rem));
}

.hero-compact {
  min-height: auto;
  max-height: none;
  padding: 0;
  display: block;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}

.hero-compact-visual {
  position: relative;
  height: clamp(140px, 22vw, 200px);
  overflow: hidden;
}

.hero-compact-slide {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.hero-compact-grid {
  display: grid;
  gap: 1rem;
  padding: 1.15rem clamp(1rem, 2.5vw, 1.5rem) 1.25rem;
}

.hero-compact .hero-content h1 {
  color: var(--green-800);
  font-size: clamp(1.2rem, 2.8vw, 1.65rem);
}

.hero-compact .hero-motto {
  color: var(--pink);
}

.hero-compact .hero-lead {
  color: var(--muted);
  max-width: none;
  opacity: 1;
}

.hero-compact-aside {
  background: var(--green-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
}

.hero-compact-stats {
  margin: 0;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1fr 1fr;
}

.hero-compact-stats dt {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.hero-compact-stats dd {
  margin: 0.1rem 0 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--green-800);
}

.hero-pinned-compact {
  margin-top: 0.65rem;
}

.pinned-card-compact {
  display: block;
}

.pinned-card-compact .pinned-body {
  padding: 0.85rem 1rem;
}

.section-quicknav {
  padding: 0.85rem 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.25rem;
}

.quicknav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
}

.quicknav-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--green-50);
  border: 1px solid var(--border);
  color: var(--green-800);
  font-size: 0.82rem;
  font-weight: 700;
}

.quicknav-list a:hover {
  background: var(--green-100);
  color: var(--green-700);
}

.activity-grid-compact {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.activity-grid-compact .activity-card {
  box-shadow: var(--shadow);
}

@media (min-width: 768px) {
  .hero-compact-grid {
    grid-template-columns: 1.4fr minmax(180px, 0.8fr);
    align-items: start;
  }
}

/* Campus — วิทยาเขต */
.hero-wrap-campus,
.hero-wrap-academy {
  width: min(var(--max), calc(100% - 2rem));
  margin: clamp(0.75rem, 2vw, 1.25rem) auto 0;
}

.hero-campus,
.hero-academy {
  display: block;
  align-items: stretch;
  min-height: 0;
  max-height: none;
  padding: 0;
  color: var(--text);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.hero-campus-shell,
.hero-academy-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 980px;
  margin-inline: auto;
  padding: clamp(1.35rem, 3vw, 2.25rem) clamp(1.35rem, 4vw, 2.5rem);
}

.hero-campus {
  background: linear-gradient(160deg, var(--green-50) 0%, #fff 48%, var(--green-50) 100%);
  border-radius: 18px;
}

.hero-campus-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-image:
    radial-gradient(circle at 8% 18%, rgb(45 143 90 / 0.14) 0, transparent 42%),
    radial-gradient(circle at 92% 82%, rgb(236 72 153 / 0.08) 0, transparent 38%);
  pointer-events: none;
}

.hero-campus-grid,
.hero-academy-grid {
  display: grid;
  gap: 1.25rem;
  align-items: center;
  justify-items: center;
  width: 100%;
  max-width: 920px;
  margin-inline: auto;
}

.hero-campus-copy,
.hero-academy-copy {
  width: 100%;
  max-width: 36rem;
  margin-inline: auto;
  text-align: center;
}

.hero-campus-copy .hero-lead,
.hero-academy-copy .hero-lead,
.hero-academy-copy .hero-academy-lead {
  margin-inline: auto;
}

.hero-campus-copy h1,
.hero-academy-copy h1 {
  color: var(--green-900);
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.25;
}

.hero-academy-copy .hero-academy-title {
  margin: 0 0 0.45rem;
  font-size: clamp(1.45rem, 3.4vw, 2.15rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.025em;
  color: var(--green-900);
}

.hero-campus-copy .hero-motto,
.hero-academy-copy .hero-motto {
  color: var(--pink);
  font-size: 0.9rem;
}

.hero-academy-copy .hero-academy-motto {
  margin: 0 0 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: clamp(0.9rem, 1.9vw, 1.02rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.45;
}

.hero-campus-copy .hero-lead,
.hero-academy-copy .hero-lead {
  color: var(--muted);
  opacity: 1;
  max-width: 36rem;
  font-size: 0.88rem;
  line-height: 1.55;
}

.hero-academy-copy .hero-academy-lead {
  margin: 0 0 1.05rem;
  max-width: 32rem;
  font-size: 0.92rem;
  line-height: 1.65;
}

.hero-badge-campus {
  background: #fff;
  color: var(--green-800);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.hero-campus-philosophy {
  margin: 0 auto 0.85rem;
  padding: 0.65rem 0.9rem;
  border-left: none;
  border-top: 3px solid var(--green-600);
  background: rgb(255 255 255 / 0.82);
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--green-800);
  font-size: 0.88rem;
  line-height: 1.5;
  text-align: center;
  max-width: 32rem;
}

.hero-actions-campus,
.hero-actions-academy {
  margin-top: 0.15rem;
  justify-content: center;
}

.home-template-campus .hero-campus .btn-primary,
.home-template-academy .hero-academy .btn-primary {
  background: var(--green-700);
  color: #fff;
  border: 2px solid var(--green-700);
  box-shadow: var(--shadow-sm);
}

.home-template-campus .hero-campus .btn-primary:hover,
.home-template-academy .hero-academy .btn-primary:hover {
  background: var(--green-800);
  border-color: var(--green-800);
  color: #fff;
}

.home-template-campus .hero-campus .btn-outline,
.home-template-academy .hero-academy .btn-outline {
  border-color: var(--green-500);
  color: var(--green-800);
  background: #fff;
}

.home-template-campus .hero-campus .btn-outline:hover,
.home-template-academy .hero-academy .btn-outline:hover {
  background: var(--green-50);
  border-color: var(--green-700);
  color: var(--green-900);
}

.hero-campus-aside,
.hero-academy-aside {
  display: grid;
  gap: 0.65rem;
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
}

.hero-campus-frame {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 10;
  background: var(--green-800);
}

.hero-slideshow-campus {
  position: absolute;
  inset: 0;
}

.hero-campus-slide {
  background-size: cover;
  background-position: center;
}

.hero-dots-campus {
  position: static;
  transform: none;
  left: auto;
  bottom: auto;
  margin: 0;
  justify-content: center;
}

.hero-dots-campus .hero-dot {
  border-color: var(--green-400);
  background: var(--green-100);
}

.hero-dots-campus .hero-dot.is-active {
  background: var(--green-700);
  border-color: var(--green-700);
}

.hero-dots-campus .hero-dot:hover {
  background: var(--green-300);
}

.hero-campus-facts,
.hero-academy-facts {
  margin: 0;
  display: grid;
  gap: 0.55rem;
  grid-template-columns: 1fr 1fr;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgb(255 255 255 / 0.88);
  border: 1px solid var(--border);
}

.hero-campus-facts dt,
.hero-academy-facts dt {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.12rem;
}

.hero-campus-facts dd,
.hero-academy-facts dd {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--green-800);
  line-height: 1.35;
}

.hero-campus-facts-wide {
  grid-column: 1 / -1;
}

.hero-campus-facts-wide dd {
  font-size: 0.8rem;
  font-weight: 600;
}

.hero-campus-tags {
  list-style: none;
  margin: 1rem auto 0;
  padding: 0.65rem 0 0;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  max-width: 920px;
}

.hero-campus-tags li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green-800);
}

.hero-pinned-campus,
.hero-pinned-academy {
  margin-top: 0.75rem;
  max-width: 920px;
  margin-inline: auto;
  padding-inline: clamp(0.5rem, 2vw, 1rem);
}

.pinned-card-campus,
.pinned-card-academy {
  border-radius: var(--radius);
}

.section-campus-pillars {
  background: var(--surface);
}

.campus-pillars-intro {
  margin-bottom: 1.25rem;
}

.campus-pillars-intro p {
  font-size: 0.9rem;
}

.campus-pillar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1fr;
}

.campus-pillar-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  background: var(--green-50);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s, background 0.15s;
}

.campus-pillar-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--green-300);
  background: #fff;
}

.campus-pillar-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 1.25rem;
  line-height: 1;
}

.campus-pillar-text {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.campus-pillar-title {
  font-weight: 800;
  color: var(--green-800);
  font-size: 0.95rem;
}

.campus-pillar-desc {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.campus-pillar-arrow {
  color: var(--green-500);
  font-weight: 800;
  font-size: 1rem;
  transition: transform 0.15s;
}

.campus-pillar-card:hover .campus-pillar-arrow {
  transform: translateX(3px);
  color: var(--green-700);
}

.home-template-campus .feature-card {
  border-top: 3px solid var(--green-600);
}

.home-template-campus .section:nth-child(even) {
  background: var(--green-50);
}

/* Academy — การเรียนรู้ */
.hero-academy {
  background: var(--surface);
  border-radius: 18px;
}

.hero-academy-topbar {
  padding: 0.5rem 1rem;
  background: linear-gradient(90deg, var(--green-800), var(--green-600));
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.4;
}

.hero-badge-academy {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.7rem;
  padding: 0.38rem 0.85rem;
  background: var(--green-50);
  color: var(--green-800);
  border: 1px solid var(--green-200);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-actions-academy {
  margin-top: 0.1rem;
  gap: 0.5rem;
  justify-content: center;
}

.hero-actions-academy .btn {
  padding: 0.58rem 1.05rem;
  font-size: 0.86rem;
}

.hero-academy-photo-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--green-100);
}

.hero-slideshow-academy {
  position: absolute;
  inset: 0;
}

.hero-academy-slide {
  background-size: cover;
  background-position: center;
}

.hero-academy-photo-fallback {
  background: linear-gradient(135deg, var(--green-200), var(--green-50));
}

.hero-dots-academy {
  position: static;
  transform: none;
  left: auto;
  bottom: auto;
  margin: 0;
  justify-content: center;
}

.hero-dots-academy .hero-dot {
  border-color: var(--green-400);
  background: var(--green-100);
}

.hero-dots-academy .hero-dot.is-active {
  background: var(--green-700);
  border-color: var(--green-700);
}

.hero-dots-academy .hero-dot:hover {
  background: var(--green-300);
}

.hero-academy-facts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.hero-academy-facts > div {
  padding: 0.7rem 0.75rem;
  border-right: 1px solid var(--border);
}

.hero-academy-facts > div:last-child {
  border-right: none;
}

.hero-academy-facts dt {
  font-size: 0.65rem;
  margin-bottom: 0.2rem;
}

.hero-academy-facts dd {
  font-weight: 600;
  font-size: 0.8rem;
  line-height: 1.4;
  word-break: break-word;
}

@media (max-width: 639px) {
  .hero-academy-facts {
    grid-template-columns: 1fr;
  }

  .hero-academy-facts > div {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .hero-academy-facts > div:last-child {
    border-bottom: none;
  }
}


.section-academy-strip {
  /* spacing set via .home-template-academy .section-academy-strip */
}

.academy-strip-panel {
  padding: clamp(1rem, 2.5vw, 1.35rem);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--green-50), #fff);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.academy-strip-head {
  text-align: center;
  margin-bottom: 0.85rem;
}

.academy-strip-title {
  margin: 0 0 0.25rem;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--green-800);
}

.academy-strip-lead {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.academy-strip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.academy-strip-list a {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--border);
  color: var(--green-800);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}

.academy-strip-list a:hover {
  background: var(--green-800);
  color: #fff;
  border-color: var(--green-800);
  transform: translateY(-1px);
}

.academy-strip-icon {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1;
}

.academy-strip-label {
  line-height: 1.25;
}

.home-template-academy .section-intro h2 {
  letter-spacing: -0.02em;
}

.home-template-academy .content-card {
  border-top: 3px solid var(--green-700);
}

.home-template-academy #downloads.section {
  background: var(--green-50);
}

@media (min-width: 640px) {
  .campus-pillar-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .academy-strip-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .hero-campus-grid,
  .hero-academy-grid {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
    gap: 2rem;
    align-items: center;
    justify-items: stretch;
  }

  .hero-campus-copy,
  .hero-academy-copy {
    text-align: center;
  }

  .hero-campus-facts {
    grid-template-columns: 1fr 1fr;
  }

  .hero-academy-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .campus-pillar-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .campus-pillar-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    justify-items: center;
    text-align: center;
    min-height: 148px;
    padding: 1rem 0.85rem;
  }

  .campus-pillar-text {
    justify-items: center;
  }

  .campus-pillar-arrow {
    display: none;
  }

  .academy-strip-list {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .academy-strip-list a {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 0.35rem;
    padding: 0.65rem 0.45rem;
    min-height: 4.5rem;
  }
}

/* Pinned — below hero, no overlap */
.hero-pinned {
  position: relative;
  margin: clamp(0.85rem, 2vw, 1.25rem) clamp(0.65rem, 2vw, 1rem) 0;
  z-index: 30;
}

.pinned-card {
  display: grid;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgb(15 45 30 / 0.18);
  overflow: hidden;
  position: relative;
}

.pinned-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--green-700), var(--pink));
}

.pinned-type-announcement::before {
  background: linear-gradient(90deg, var(--pink), #f472b6);
}

.pinned-type-activity::before {
  background: linear-gradient(90deg, #2563eb, var(--green-500));
}

.pinned-media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--green-100);
  max-height: 100px;
}

.pinned-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.pinned-card:hover .pinned-media img {
  transform: scale(1.03);
}

.pinned-body {
  padding: 0.85rem 1rem 1rem;
}

.pinned-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--green-100);
  color: var(--green-800);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-bottom: 0.35rem;
}

.pinned-type-announcement .pinned-badge {
  background: var(--pink-soft);
  color: #9d174d;
}

.pinned-type-activity .pinned-badge {
  background: #dbeafe;
  color: #1e40af;
}

.pinned-body time {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--green-500);
  margin-bottom: 0.15rem;
}

.pinned-body h2 {
  margin: 0 0 0.3rem;
  font-size: clamp(0.92rem, 2vw, 1.12rem);
  line-height: 1.35;
}

.pinned-body h2 a {
  color: var(--green-800);
}

.pinned-body h2 a:hover {
  color: var(--green-500);
}

.pinned-body p {
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pinned-meta {
  font-size: 0.88rem !important;
  font-weight: 600;
  color: var(--green-700) !important;
}

.pinned-link {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--green-700);
}

.pinned-link:hover {
  color: var(--green-500);
}

@media (min-width: 768px) {
  .pinned-card {
    grid-template-columns: minmax(0, 38%) 1fr;
    align-items: stretch;
    min-height: 120px;
  }

  .pinned-media {
    aspect-ratio: auto;
    min-height: 100%;
    height: 100%;
    max-height: none;
  }

  .pinned-body {
    padding: 1rem 1.25rem 1rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

@media (min-width: 768px) {
  .pinned-card:not(:has(.pinned-media)) .pinned-body {
    padding: 1rem 1.25rem;
  }
}

.section-after-pin {
  padding-top: clamp(2rem, 4vw, 2.5rem);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.7rem 1.4rem; border-radius: 999px; font-weight: 700; font-size: 0.95rem;
  border: 2px solid transparent; cursor: pointer; transition: transform 0.15s, box-shadow 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: #fff; color: var(--green-800); box-shadow: var(--shadow); }
.btn-primary:hover { box-shadow: var(--shadow-lg); color: var(--green-900); }
.btn-outline { background: transparent; border-color: rgb(255 255 255 / 0.5); color: #fff; }
.btn-outline:hover { border-color: #fff; color: #fff; }
.btn.full { width: 100%; }

/* Sections */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-alt { background: var(--surface); }

.home-template-campus .section-campus-pillars {
  padding: clamp(1.75rem, 4vw, 2.5rem) 0 clamp(2rem, 4vw, 2.75rem);
  background: var(--surface);
}

.home-template-academy .section-academy-strip {
  padding: clamp(1.5rem, 3.5vw, 2.25rem) 0 clamp(2rem, 4vw, 2.75rem);
  background: transparent;
}

.section-intro { max-width: 640px; margin-bottom: 2.5rem; }
.section-intro.centered { text-align: center; margin-inline: auto; }
.section-label {
  display: inline-block; font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--green-500); margin-bottom: 0.5rem;
}
.section-intro h2 { margin: 0 0 0.75rem; font-size: clamp(1.5rem, 3vw, 2rem); color: var(--green-800); }
.section-intro p { margin: 0; color: var(--muted); }

/* Features */
.feature-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.feature-card {
  background: var(--surface); border-radius: var(--radius); padding: 1.75rem;
  border: 1px solid var(--border); box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.feature-card h3 { margin: 0 0 0.5rem; color: var(--green-800); font-size: 1.1rem; }
.feature-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Executives */
.executives-page .executives-block {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.executives-page .section-intro h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--green-800);
}

.executives-block {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: clamp(2rem, 4vw, 2.75rem);
  border-top: 1px solid var(--border);
}

.executives-block .section-intro {
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
}

.executives-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2rem);
  max-width: 760px;
  margin: 0 auto;
}

.executive-lead {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  width: 100%;
}

.executive-deputies {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(0.85rem, 2vw, 1.25rem);
  width: 100%;
  padding-top: clamp(1.25rem, 2.5vw, 1.5rem);
  border-top: 1px solid var(--border);
}

.executive-grid {
  display: grid;
  gap: clamp(1.25rem, 3vw, 1.75rem);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  max-width: 980px;
  margin: 0 auto;
}

.executive-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.executive-card-lead {
  width: min(100%, 280px);
}

.executive-card-deputy {
  width: min(calc(50% - 0.5rem), 220px);
}

.executive-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.executive-photo {
  aspect-ratio: 4 / 5;
  background: linear-gradient(180deg, var(--green-50), #fff);
  overflow: hidden;
}

.executive-card-lead .executive-photo {
  max-height: 350px;
}

.executive-card-deputy .executive-photo {
  max-height: 275px;
}

.executive-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.executive-photo-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--green-100), var(--green-50));
  color: var(--green-700);
  font-weight: 800;
}

.executive-card-lead .executive-photo-placeholder {
  font-size: 2.5rem;
}

.executive-card-deputy .executive-photo-placeholder {
  font-size: 1.75rem;
}

.executive-body {
  padding: 1.15rem 1rem 1.35rem;
}

.executive-card-lead .executive-body {
  padding: 0.75rem 0.65rem 0.95rem;
}

.executive-card-deputy .executive-body {
  padding: 0.6rem 0.5rem 0.8rem;
}

.executive-body h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: var(--green-800);
  line-height: 1.35;
}

.executive-card-lead .executive-body h3 {
  font-size: 1.05rem;
}

.executive-card-deputy .executive-body h3 {
  font-size: 0.95rem;
}

.executive-position {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--pink);
}

.executive-card-deputy .executive-position {
  font-size: 0.85rem;
}

.executive-bio {
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

.executive-card-lead .executive-bio {
  margin-top: 0.45rem;
  font-size: 0.8rem;
}

.executive-card-deputy .executive-bio {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  line-height: 1.4;
}

@media (max-width: 599px) {
  .executive-card-deputy {
    width: min(calc(50% - 0.45rem), 200px);
  }
}

/* News cards */
.feed-block { margin-bottom: 2.5rem; }
.feed-block:last-child { margin-bottom: 0; }
.featured-alert {
  margin: 0 0 1.15rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  border: 1px solid #f9a8d4;
  background: linear-gradient(135deg, #fff1f2, #fff);
  display: grid;
  gap: 0.55rem;
}
.featured-alert-badge {
  display: inline-flex;
  width: fit-content;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: #be185d;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 800;
}
.featured-alert-body time {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}
.featured-alert-body h3 {
  margin: 0 0 0.25rem;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
}
.featured-alert-body p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.feed-heading { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 1.25rem; font-size: 1.15rem; color: var(--green-800); }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.announce { background: var(--pink); }
.dot.news { background: var(--green-500); }

.card-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.content-card {
  background: var(--green-50); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); transition: box-shadow 0.2s, transform 0.2s;
}
.content-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card-image {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--green-100);
  border-bottom: 1px solid var(--border);
  min-height: 140px;
  max-height: 420px;
  width: 100%;
  border: none;
  padding: 0;
  cursor: zoom-in;
  font: inherit;
  text-align: inherit;
  position: relative;
}
.card-image img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  object-position: center;
  display: block;
  transition: transform 0.3s;
  pointer-events: none;
}
.content-card:hover .card-image img { transform: scale(1.02); }

.media-lightbox-badge,
.media-lightbox-hint {
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgb(15 45 30 / 0.72);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  pointer-events: none;
}

.media-lightbox-hint {
  opacity: 0;
  transition: opacity 0.2s;
}

.card-image:hover .media-lightbox-hint,
.activity-visual:hover .media-lightbox-hint,
.item-gallery-main:hover .media-lightbox-hint {
  opacity: 1;
}
.card-body { padding: 1.25rem; }
.card-body time { font-size: 0.8rem; font-weight: 600; color: var(--green-500); }
.card-body h4 { margin: 0.35rem 0 0.5rem; font-size: 1.05rem; line-height: 1.35; }
.card-body h4 a { color: inherit; }
.card-body h4 a:hover { color: var(--green-700); }
.card-body p { margin: 0; font-size: 0.92rem; color: var(--muted); }

/* Activities */
.activity-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.activity-card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow);
  animation: fadeUp 0.5s ease backwards; animation-delay: var(--delay, 0s);
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.activity-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--green-100);
  min-height: 140px;
  max-height: 420px;
  width: 100%;
  border: none;
  padding: 0;
  cursor: zoom-in;
  font: inherit;
  text-align: inherit;
  position: relative;
  color: inherit;
}
.activity-visual img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  object-position: center;
  display: block;
  pointer-events: none;
}
.activity-placeholder {
  width: 100%;
  min-height: 180px;
  background: linear-gradient(135deg, var(--green-100), var(--pink-soft));
}
.activity-body { padding: 1.25rem; }
.activity-date { margin: 0 0 0.35rem; font-size: 0.82rem; font-weight: 700; color: var(--green-500); }
.activity-body h3 { margin: 0 0 0.5rem; font-size: 1.08rem; color: var(--green-800); }
.activity-loc { margin: 0 0 0.5rem; font-size: 0.88rem; color: var(--muted); }
.activity-body p:last-child { margin: 0; font-size: 0.92rem; color: var(--muted); }

/* Contact */
.section-contact {
  background: linear-gradient(180deg, var(--green-50) 0%, #fff 38%, var(--green-50) 100%);
}

.contact-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2rem;
}

.contact-header h2 {
  margin: 0.35rem 0 0;
}

.contact-aff {
  color: var(--green-700);
  font-weight: 600;
  margin: 0.65rem 0 0;
  font-size: 0.98rem;
}

.contact-layout {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 960px) {
  .contact-layout {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    gap: 2rem;
  }
}

.contact-info {
  display: grid;
  gap: 1.25rem;
}

.contact-details {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.contact-detail {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.contact-detail:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.contact-detail-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--green-500), var(--green-700));
  color: #fff;
  box-shadow: 0 8px 18px rgb(22 101 52 / 0.22);
}

.contact-detail-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.contact-detail-body {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.contact-detail-body strong {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--green-700);
}

.contact-detail-body span,
.contact-detail-body a {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text);
  text-decoration: none;
}

.contact-detail-body a:hover {
  color: var(--green-700);
  text-decoration: underline;
}

.contact-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.contact-social-label {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--green-700);
}

.contact-social-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.contact-social-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 6px 16px rgb(0 0 0 / 0.12);
}

.contact-social-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.contact-social-icon:hover {
  color: #fff;
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 10px 22px rgb(0 0 0 / 0.18);
}

.contact-social-line { background: #06c755; }
.contact-social-messenger { background: #0084ff; }
.contact-social-facebook { background: #1877f2; }
.contact-social-youtube { background: #ff0000; }
.contact-social-web { background: var(--green-700); }

.contact-map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 10;
  background: var(--green-100);
}

.contact-map-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.contact-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

@media (min-width: 960px) {
  .contact-card {
    position: sticky;
    top: 5.5rem;
    padding: 1.75rem;
  }
}

.contact-card-head {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.contact-card-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--green-100);
  color: var(--green-700);
}

.contact-card-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.contact-card-head h3 {
  margin: 0 0 0.25rem;
  color: var(--green-800);
  font-size: 1.15rem;
}

.contact-card-head p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

.contact-form {
  display: grid;
  gap: 0.85rem;
}

.contact-field {
  display: grid;
  gap: 0.35rem;
}

.contact-field > span {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--green-800);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.7rem 0.95rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgb(34 197 94 / 0.15);
}

.contact-submit {
  margin-top: 0.25rem;
  padding: 0.85rem 1rem;
  font-size: 1rem;
}

.contact-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.captcha-field span {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.post-attachment {
  margin: 1rem 0 1.25rem;
}

/* Staff */
.staff-page .section-intro h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--green-800);
}

.staff-grid {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.5rem);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  max-width: 980px;
  margin: 0 auto;
}

.staff-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: center;
}

.staff-photo {
  aspect-ratio: 4 / 5;
  max-height: 240px;
  overflow: hidden;
  background: var(--green-50);
}

.staff-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.staff-photo-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 800;
  color: var(--green-700);
  background: linear-gradient(145deg, var(--green-100), var(--green-50));
}

.staff-body {
  padding: 0.85rem 0.75rem 1rem;
}

.staff-body h3 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  color: var(--green-800);
}

.staff-position {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--pink);
}

.staff-dept {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.staff-bio {
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

/* PDPA banner */
.pdpa-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background: rgb(255 255 255 / 0.97);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 30px rgb(15 45 30 / 0.12);
  padding: 0.85rem 0;
}

.pdpa-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.pdpa-banner p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  flex: 1 1 240px;
}

.pdpa-banner a {
  font-weight: 700;
}

/* Back to top */
.back-to-top {
  position: fixed;
  right: clamp(0.85rem, 3vw, 1.35rem);
  bottom: clamp(0.85rem, 3vw, 1.35rem);
  z-index: 150;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.72rem 0.95rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  color: #fff;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 28px rgb(15 45 30 / 0.22);
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.75rem) scale(0.96);
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease,
    transform 0.25s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.back-to-top svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: currentColor;
  flex-shrink: 0;
}

.back-to-top:hover {
  background: linear-gradient(135deg, var(--green-800), var(--green-700));
  box-shadow: 0 14px 32px rgb(15 45 30 / 0.28);
}

.back-to-top:focus-visible {
  outline: 3px solid rgb(45 143 90 / 0.35);
  outline-offset: 3px;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-top.is-scrolling {
  pointer-events: none;
  opacity: 0.88;
  transform: translateY(-2px) scale(0.98);
}

.mobile-quick-actions {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 140;
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.5rem 0.55rem calc(0.55rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: rgb(255 255 255 / 0.96);
  backdrop-filter: blur(8px);
}

.mobile-quick-action {
  display: grid;
  place-items: center;
  gap: 0.15rem;
  min-height: 2.8rem;
  border-radius: 10px;
  background: var(--green-50);
  color: var(--green-800);
  font-size: 0.74rem;
  font-weight: 700;
}

.mobile-quick-action:hover {
  background: var(--green-100);
  color: var(--green-900);
}

body:has(#pdpa-banner:not([hidden])) .back-to-top {
  bottom: calc(clamp(0.85rem, 3vw, 1.35rem) + 4.75rem);
}

@media (max-width: 520px) {
  .back-to-top-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .back-to-top {
    width: 3rem;
    height: 3rem;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .mobile-quick-actions {
    display: grid;
  }

  body {
    padding-bottom: calc(4.25rem + env(safe-area-inset-bottom));
  }

  .back-to-top {
    bottom: calc(4.9rem + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: opacity 0.15s ease, visibility 0.15s ease;
    transform: none;
  }

  .back-to-top.is-visible {
    transform: none;
  }
}

/* 404 */
.error-page-inner {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
  padding: clamp(2rem, 6vw, 4rem) 0;
}
.error-code {
  margin: 0 0 0.5rem;
  font-size: clamp(3.5rem, 12vw, 5rem);
  font-weight: 800;
  line-height: 1;
  color: var(--green-100);
  text-shadow: 0 2px 0 var(--green-500);
}
.error-page-inner h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  color: var(--green-800);
}
.error-message {
  margin: 0 0 1.5rem;
  color: var(--muted);
}
.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* Post page */
.post-page { padding: 2rem 0 4rem; max-width: 720px; }
.back-link { display: inline-block; margin-bottom: 1rem; font-weight: 600; }
.post-type { display: inline-block; padding: 0.25rem 0.65rem; background: var(--green-100); border-radius: 999px; font-size: 0.8rem; font-weight: 700; color: var(--green-700); margin-right: 0.5rem; }
.post-page time { font-size: 0.88rem; color: var(--muted); }
.post-page h1 { margin: 0.75rem 0 1.25rem; font-size: clamp(1.5rem, 4vw, 2rem); color: var(--green-800); }
.post-hero-img { width: 100%; border-radius: var(--radius); margin-bottom: 1.5rem; }
.post-excerpt { font-size: 1.1rem; color: var(--muted); margin-bottom: 1rem; }
.post-content { line-height: 1.75; }

/* Item gallery (post / activity) */
.item-gallery {
  margin-bottom: 1.5rem;
}

.item-gallery-main {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--green-100);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  max-height: min(72vh, 640px);
  width: 100%;
  border: none;
  padding: 0;
  cursor: zoom-in;
  font: inherit;
  position: relative;
}

.item-gallery-hero {
  width: 100%;
  height: auto;
  max-height: min(72vh, 640px);
  object-fit: contain;
  object-position: center;
  display: block;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.item-gallery-badge {
  right: 0.75rem;
  bottom: 0.75rem;
}

.item-gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.item-gallery-thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  overflow: hidden;
  width: 72px;
  height: 54px;
  cursor: pointer;
  background: var(--green-100);
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  flex-shrink: 0;
}

.item-gallery-thumb:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.item-gallery-thumb.is-active {
  border-color: var(--green-500);
  box-shadow: 0 0 0 2px rgb(45 143 90 / 0.25);
}

.item-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.item-gallery-thumbs-single .item-gallery-thumb {
  cursor: default;
  pointer-events: none;
}

.activity-visual {
  display: block;
  color: inherit;
}

a.activity-visual {
  cursor: pointer;
}

button.activity-visual {
  cursor: zoom-in;
}

.activity-body h3 a {
  color: inherit;
}

.activity-body h3 a:hover {
  color: var(--green-700);
}

/* Footer */
.site-footer {
  background: linear-gradient(180deg, #0c1929 0%, #0a1420 100%);
  color: #cbd5e1;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  gap: 2.5rem 2rem;
  padding: 3rem 0 2.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.35fr 1.15fr 1fr; }
}

.footer-link-groups {
  display: grid;
  gap: 0.55rem;
}

@media (min-width: 640px) {
  .footer-link-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem 1rem;
  }
}

.footer-links-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.85rem;
}

.footer-links-head .footer-heading {
  margin: 0;
}

.footer-links-tools {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-links-tool {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-links-tool:hover {
  color: #fbbf24;
}

.footer-links-tool-sep {
  color: #64748b;
  font-size: 0.75rem;
}

.footer-link-group--accordion {
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: var(--radius-sm);
  background: rgb(255 255 255 / 0.03);
  overflow: hidden;
}

.footer-link-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0;
  padding: 0.55rem 0.7rem;
  border: none;
  background: transparent;
  color: #fbbf24;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s;
}

.footer-link-group-toggle:hover {
  background: rgb(255 255 255 / 0.06);
}

.footer-link-chevron {
  flex-shrink: 0;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-top: -0.15rem;
}

.footer-link-group--accordion.is-open .footer-link-chevron {
  transform: rotate(-135deg);
  margin-top: 0.15rem;
}

.footer-link-group-panel {
  padding: 0 0.55rem 0.55rem;
}

.footer-link-group--accordion:not(.is-open) .footer-link-group-panel {
  display: none;
}

.footer-link-group--solo {
  padding: 0.15rem 0;
}

.footer-link-group--solo .footer-links {
  margin: 0;
}

.footer-links-extra {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid rgb(255 255 255 / 0.1);
}

.footer-heading {
  margin: 0 0 1.1rem;
  font-size: 1rem;
  font-weight: 800;
  color: #fbbf24;
}

.footer-logo-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.footer-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  padding: 4px;
  flex-shrink: 0;
}

.footer-school-name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
}

.footer-tagline {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: #7dd3fc;
  font-weight: 600;
}

.footer-desc {
  margin: 0 0 1.25rem;
  font-size: 0.88rem;
  line-height: 1.65;
  color: #94a3b8;
  max-width: 320px;
}

.footer-social {
  display: flex;
  gap: 0.65rem;
}

.social-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.08);
  border: 1px solid rgb(255 255 255 / 0.12);
  transition: background 0.2s, transform 0.15s;
}

.social-btn:hover {
  background: rgb(255 255 255 / 0.15);
  transform: translateY(-2px);
  color: #fff;
}

.social-btn-line {
  background: #06c755;
  border-color: #06c755;
}

.social-btn-line:hover {
  background: #05a847;
  border-color: #05a847;
}

.social-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  color: #fff;
}

.footer-heading {
  margin: 0 0 1.1rem;
  font-size: 1rem;
  font-weight: 800;
  color: #fbbf24;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #e2e8f0;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s, padding-left 0.2s;
}

.footer-links a::before {
  content: "▸";
  font-size: 0.65rem;
  color: #64748b;
}

.footer-links a:hover {
  color: #fbbf24;
  padding-left: 4px;
}

.footer-contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.footer-contact li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #94a3b8;
}

.footer-contact a {
  color: #7dd3fc;
  text-decoration: none;
}

.footer-contact a:hover {
  color: #fbbf24;
}

.footer-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.footer-icon svg {
  width: 100%;
  height: 100%;
  fill: #fbbf24;
}

.footer-bottom {
  border-top: 1px solid rgb(255 255 255 / 0.08);
  padding: 1rem 0;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.82rem;
  color: #64748b;
}

.empty-state { text-align: center; color: var(--muted); padding: 2rem; }
.install-banner { background: #fef3c7; border: 1px solid #fcd34d; border-radius: var(--radius-sm); padding: 0.75rem 1rem; margin-top: 1rem; text-align: center; }

/* YouTube embed */
.video-embed-wrap {
  position: relative;
  width: min(900px, 100%);
  margin-inline: auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #000;
}
.video-embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-more { text-align: center; margin-top: 1rem; font-weight: 600; }

/* Gallery albums */
.gallery-album-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.gallery-album-item { margin: 0; }

.gallery-album {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--green-100);
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-album:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.gallery-album img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-album:hover img {
  transform: scale(1.04);
}

.gallery-album-overlay {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 2.5rem 0.85rem 0.85rem;
  background: linear-gradient(transparent, rgb(0 0 0 / 0.72));
  color: #fff;
  text-align: left;
}

.gallery-album-overlay strong {
  font-size: 0.98rem;
  line-height: 1.35;
}

.gallery-album-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgb(255 255 255 / 0.82);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgb(0 0 0 / 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vw, 2rem);
}

.lightbox[hidden] { display: none; }

.lightbox-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(960px, calc(100% - 5rem));
  width: 100%;
}

.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  object-fit: contain;
}

.lightbox-album-title {
  margin: 0.75rem 0 0;
  color: #fff;
  text-align: center;
  max-width: 640px;
  font-size: 1.05rem;
  font-weight: 700;
}

.lightbox-caption {
  margin: 0.35rem 0 0;
  color: rgb(255 255 255 / 0.88);
  text-align: center;
  max-width: 640px;
  font-size: 0.95rem;
}

.lightbox-caption:empty {
  display: none;
}

.lightbox-counter {
  margin: 0.45rem 0 0;
  color: rgb(255 255 255 / 0.72);
  font-size: 0.82rem;
  font-weight: 600;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.15);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.lightbox-close:hover {
  background: rgb(255 255 255 / 0.25);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.15);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: grid;
  place-items: center;
  transition: background 0.15s;
}

.lightbox-nav:hover:not(:disabled) {
  background: rgb(255 255 255 / 0.28);
}

.lightbox-nav:disabled {
  opacity: 0.25;
  cursor: default;
}

.lightbox-prev { left: clamp(0.5rem, 2vw, 1.25rem); }
.lightbox-next { right: clamp(0.5rem, 2vw, 1.25rem); }

@media (max-width: 640px) {
  .lightbox-stage {
    max-width: calc(100% - 1rem);
  }

  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 1.15rem;
  }

  .lightbox-prev { left: 0.35rem; }
  .lightbox-next { right: 0.35rem; }
}

/* Calendar — month grid */
.month-calendar-wrap {
  display: grid;
  gap: 1.5rem;
  max-width: 980px;
  margin-inline: auto;
}

@media (min-width: 900px) {
  .month-calendar-wrap {
    grid-template-columns: 1fr minmax(260px, 320px);
    align-items: start;
  }
}

.month-calendar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.month-calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, var(--green-800), var(--green-700));
  color: #fff;
}

.month-cal-nav {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.15);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 700;
  transition: background 0.2s;
}

.month-cal-nav:hover {
  background: rgb(255 255 255 / 0.28);
  color: #fff;
}

.month-calendar-title {
  text-align: center;
  flex: 1;
}

.month-calendar-title strong {
  display: block;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 800;
}

.month-cal-today {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgb(255 255 255 / 0.85);
  text-decoration: underline;
}

.month-cal-today:hover {
  color: #fff;
}

.month-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--green-100);
  border-bottom: 1px solid var(--border);
}

.month-calendar-weekdays span {
  padding: 0.5rem 0.25rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--green-800);
}

.month-calendar-weekdays span:first-child,
.month-calendar-weekdays span:last-child {
  color: var(--green-600);
}

.month-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}

.month-cal-cell {
  min-height: clamp(64px, 12vw, 88px);
  background: var(--surface);
  padding: 0.35rem 0.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  transition: background 0.15s;
}

.month-cal-cell.is-empty {
  background: var(--green-50);
  min-height: 0;
}

.month-cal-cell.is-today {
  background: #fffbeb;
  box-shadow: inset 0 0 0 2px #fbbf24;
}

.month-cal-cell.has-event {
  background: var(--green-50);
}

.month-cal-cell.has-event:hover,
.month-cal-cell.has-event:focus-visible {
  background: var(--green-100);
  outline: none;
}

.month-cal-cell.cal-type-holiday.has-event { background: #fffbeb; }
.month-cal-cell.cal-type-exam.has-event { background: #fef2f2; }

.month-cal-num {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--green-800);
  line-height: 1.1;
}

.month-cal-cell.is-today .month-cal-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: #fbbf24;
  color: #78350f;
}

.month-cal-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.month-cal-dot,
.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.dot-activity, .legend-dot.dot-activity { background: var(--green-500); }
.dot-holiday, .legend-dot.dot-holiday { background: #f59e0b; }
.dot-exam, .legend-dot.dot-exam { background: #ef4444; }
.dot-other, .legend-dot.dot-other { background: #6366f1; }

.month-cal-label {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.month-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  padding: 0.65rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--green-50);
}

.month-calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.month-calendar-events h3 {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  color: var(--green-800);
}

.month-calendar-events-empty p {
  margin: 0;
  padding: 1rem;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
}

.calendar-list-compact {
  max-width: none;
}

.calendar-list-compact .calendar-body h4 {
  margin: 0.25rem 0 0.35rem;
  font-size: 0.92rem;
  color: var(--green-800);
}

.calendar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  max-width: 760px;
  margin-inline: auto;
}
.calendar-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow);
}
.calendar-date {
  flex-shrink: 0;
  width: 56px;
  text-align: center;
  background: var(--green-100);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.35rem;
}
.calendar-day { display: block; font-size: 1.35rem; font-weight: 800; color: var(--green-800); line-height: 1.1; }
.calendar-month { display: block; font-size: 0.72rem; font-weight: 700; color: var(--green-500); }
.calendar-body h3 { margin: 0.25rem 0 0.35rem; font-size: 1rem; color: var(--green-800); }
.calendar-body p { margin: 0; font-size: 0.9rem; color: var(--muted); }
.calendar-range { font-size: 0.82rem !important; font-weight: 600; color: var(--green-500) !important; }
.calendar-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--green-100);
  color: var(--green-700);
}
.calendar-type-holiday .calendar-badge { background: #fef3c7; color: #92400e; }
.calendar-type-exam .calendar-badge { background: #fee2e2; color: #991b1b; }

/* Documents */
.doc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
  max-width: 820px;
  margin-inline: auto;
}
.doc-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--green-50);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
}
.doc-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--green-700);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
}
.doc-info { flex: 1; min-width: 180px; }
.doc-info h3 { margin: 0 0 0.2rem; font-size: 1rem; color: var(--green-800); }
.doc-info p { margin: 0; font-size: 0.88rem; color: var(--muted); }
.doc-btn {
  background: var(--green-700) !important;
  color: #fff !important;
  font-size: 0.88rem;
  padding: 0.55rem 1.1rem;
}
.doc-btn:hover { background: var(--green-800) !important; color: #fff !important; }

/* Flash messages */
.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
}
.flash-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.flash-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* Rich text content */
.rich-text h2, .rich-text h3, .rich-text h4 { color: var(--green-800); margin: 1.25rem 0 0.5rem; }
.rich-text p { margin: 0 0 0.85rem; }
.rich-text ul, .rich-text ol { margin: 0 0 1rem; padding-left: 1.5rem; }
.rich-text img {
  border-radius: var(--radius-sm);
  margin: 0.5rem 0;
  max-width: 100%;
  height: auto;
}
.rich-text table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.95rem; }
.rich-text th, .rich-text td { border: 1px solid var(--border); padding: 0.5rem 0.65rem; }
.rich-text blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--green-500);
  background: var(--green-50);
  color: var(--muted);
}

/* Contact form on light section */
#contact .btn-primary.full {
  background: var(--green-700);
  color: #fff;
}
#contact .btn-primary.full:hover {
  background: var(--green-800);
  color: #fff;
}

/* Maintenance page */
.maintenance-page-body {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--green-50) 0%, #fff 45%, var(--green-100) 100%);
}

.maintenance-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}

.maintenance-card {
  width: min(560px, 100%);
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 2.25rem 1.75rem;
}

.maintenance-logo {
  margin: 0 auto 0.75rem;
  display: block;
}

.maintenance-school {
  margin: 0 0 1rem;
  font-weight: 700;
  color: var(--green-800);
}

.maintenance-icon {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.maintenance-card h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  color: var(--green-900);
}

.maintenance-message {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.maintenance-contact {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.maintenance-contact p {
  margin: 0 0 0.5rem;
  font-weight: 700;
  color: var(--green-800);
}

.maintenance-contact ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  color: var(--text);
}

.maintenance-contact a {
  font-weight: 600;
}

/* Breadcrumb */
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  font-size: 0.88rem;
}
.breadcrumb li:not(:last-child)::after {
  content: "›";
  margin-left: 0.5rem;
  color: var(--muted);
}
.breadcrumb a { color: var(--green-700); font-weight: 600; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--muted); }

.archive-breadcrumb-wrap { padding-top: 1rem; }

/* Pagination */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}
.pagination a {
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--green-700);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.pagination a:hover { background: var(--green-800); color: #fff; }
.pagination-info { font-weight: 700; color: var(--muted); }

/* Share buttons */
.share-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.share-label { font-weight: 800; color: var(--green-800); margin-right: 0.25rem; }
.share-btn {
  border: none;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  color: #fff;
}
.share-line { background: #06c755; }
.share-facebook { background: #1877f2; }
.share-copy { background: var(--green-700); }
.share-btn:hover { opacity: 0.92; color: #fff; }

/* Search */
.header-search {
  display: none;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  margin-right: 0.5rem;
}
.header-search input {
  width: min(160px, 28vw);
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font: inherit;
  font-size: 0.85rem;
}
.header-search button {
  border: none;
  background: var(--green-700);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
}
@media (min-width: 900px) {
  .header-search { display: flex; }
}
.site-search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  max-width: 640px;
  margin: 0 auto 1.5rem;
}
.site-search input {
  flex: 1 1 220px;
  padding: 0.7rem 0.95rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
}
.search-results {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.search-result-item {
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.search-result-type {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--green-700);
  margin-bottom: 0.35rem;
}
.search-result-item time {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.2rem 0;
}
.search-result-count {
  text-align: center;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 1rem;
}

.section-more {
  margin: 1rem 0 0;
  text-align: right;
  font-weight: 700;
}
.section-more.centered { text-align: center; }
.section-more a { color: var(--green-700); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-main {
  padding: 2rem 0 3rem;
}
.page-head {
  margin-bottom: 1.75rem;
}
.page-head h1 {
  margin: 0.35rem 0 0;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  color: var(--green-900);
}
.page-lead {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 52ch;
}
.page-prose {
  max-width: 720px;
  line-height: 1.75;
  margin-bottom: 2rem;
}
.page-feature-grid {
  margin-top: 2rem;
}
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  list-style: none;
  padding: 0;
}
.filter-pills a {
  display: inline-block;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}
.filter-pills a.is-active,
.filter-pills a:hover {
  border-color: var(--green-600);
  background: var(--green-50);
  color: var(--green-800);
}
.download-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
.download-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.download-item h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--green-900);
}
.download-item p {
  margin: 0.25rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.download-item time {
  font-size: 0.82rem;
  color: var(--muted);
}
.gallery-pdpa-note {
  margin: 1.25rem auto 0;
  max-width: 640px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}
.calendar-subscribe {
  margin: 0.75rem 0 0;
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 1rem;
  border: 1.5px solid var(--green-600);
  border-radius: var(--radius-sm);
  color: var(--green-700);
  font-weight: 700;
  text-decoration: none;
  background: transparent;
}
.btn-outline:hover {
  background: var(--green-50);
}
.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.88rem;
}
.admission-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.admission-item {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.admission-item h2 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}
.admission-item h2 a {
  color: var(--green-800);
  text-decoration: none;
}
.admission-item h2 a:hover {
  text-decoration: underline;
}
.admission-item time {
  font-size: 0.82rem;
  color: var(--muted);
}
