/* Theme: Deep Green, Elegant Luxury */
:root {
  --bg: #0a1f16;
  --bg-2: #0f2a1f;
  --surface: #123025;
  --primary: #1a3a2d;
  --primary-2: #0f2a1f;
  --text: #e8f2ec;
  --muted: #a8b8b0;
  --gold: #d9c59a;
  --card: #123025;
  --border: #2a5a47;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --ease: cubic-bezier(.2,.6,.2,1);
  --fast: 160ms;
  --slow: 400ms;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(1000px 600px at 10% -10%, #1a3a2d33, transparent),
              radial-gradient(800px 500px at 100% 0%, #0f2a1f3b, transparent),
              linear-gradient(180deg, var(--bg), var(--bg-2));
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 22px;
}

/* Edge-aligned header and hero overrides */
.site-header .nav-container { padding-left: 0; padding-right: 0; }
.hero .container { padding-left: 0; padding-right: 0; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: -9999px;
}
.skip-link:focus { left: 12px; top: 12px; z-index: 1000; background: var(--primary); color: #fff; padding: 10px 12px; border-radius: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(8px); background: color-mix(in srgb, var(--bg-2) 75%, transparent); border-bottom: 1px solid rgba(255,255,255,0.05); }
.site-header[data-glow], .site-header[data-scrolled="true"] { box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
.nav-container { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-logo { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); }
.brand-text { font-family: "Cinzel", serif; font-weight: 700; letter-spacing: 0.5px; line-height: 1; display: inline-block; }

.nav .nav-list { display: none; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-link { color: var(--text); text-decoration: none; font-weight: 600; padding: 10px 6px; border-radius: 8px; }
.nav-link { position: relative; }
.nav-link::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 6px; height: 2px; background: linear-gradient(90deg, #d9c59a, #c9b07b); transform: scaleX(0); transform-origin: left; transition: transform var(--fast) var(--ease); border-radius: 2px; }
.nav-link:hover { color: var(--gold); }
.nav-link:hover::after { transform: scaleX(1); }

.menu-toggle { background: transparent; color: var(--text); border: 1px solid var(--border); padding: 10px 14px; border-radius: 12px; cursor: pointer; transition: transform var(--fast) var(--ease), background var(--fast) var(--ease); }
.menu-toggle:hover { background: #ffffff0a; transform: translateY(-1px); }
.artistic { font-family: "Cinzel Decorative", serif; letter-spacing: 1.5px; }

.mobile-drawer { position: fixed; inset: 64px 0 0 0; background: linear-gradient(180deg, var(--surface), var(--primary-2)); border-top: 1px solid var(--border); border-radius: 0; box-shadow: var(--shadow); padding: 18px; width: 100vw; height: calc(100vh - 64px); overflow: auto; }
.mobile-drawer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mobile-drawer a { display: block; color: var(--text); text-decoration: none; padding: 14px 12px; border: 1px solid transparent; border-radius: 12px; font-weight: 600; }
.mobile-drawer a:hover { border-color: var(--gold); color: var(--gold); }

/* Hero */
.hero { position: relative; min-height: 100svh; padding: 96px 0 10vh; overflow: hidden; display: grid; align-content: end; }
/* slider background */
.hero-slider { position: absolute; inset: 0; z-index: -1; }
.hero-slider .slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transform: scale(1.06); transition: opacity 900ms cubic-bezier(.2,.6,.2,1), transform 1200ms cubic-bezier(.2,.6,.2,1); }
.hero-slider .slide.is-active, .hero-slider .slide:first-child { opacity: 1; transform: scale(1); }

/* hero nav buttons */
.hero-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: #0b1f1866; color: var(--text); cursor: pointer; box-shadow: var(--shadow); backdrop-filter: blur(4px); }
.hero-nav:hover { background: #0b1f18a0; }
.hero-nav.prev { left: 12px; }
.hero-nav.next { right: 12px; }

.hero-inner { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: end; justify-items: start; }
.eyebrow { color: var(--gold); letter-spacing: 2px; text-transform: uppercase; font-weight: 600; margin: 0 0 10px; text-shadow: 0 2px 2px rgba(0,0,0,.35); }
.display { font-family: "Playfair Display", serif; font-weight: 800; font-size: 56px; line-height: 1.05; margin: 0 0 14px; color: var(--gold); text-shadow: 0 2px 2px rgba(0,0,0,.45), 0 8px 24px rgba(0,0,0,.5); }
.subhead { color: var(--text); text-shadow: 0 2px 2px rgba(0,0,0,.45); font-size: 18px; margin: 0 0 24px; }
.cta-row { display: flex; gap: 14px; }
.cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 18px 32px; border-radius: 14px; text-decoration: none; font-weight: 800; letter-spacing: .3px; transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease), filter var(--fast) var(--ease); cursor: pointer; }
.cta.primary { background: linear-gradient(180deg, #d9c59a, #c9b07b); color: #1a2a22; box-shadow: 0 12px 22px rgba(217,197,154,.25); }
.cta.primary:hover { filter: brightness(1.06); transform: translateY(-2px); box-shadow: 0 16px 28px rgba(217,197,154,.35); }
.cta.outline { border: 1px solid var(--gold); color: var(--gold); background: transparent; box-shadow: 0 6px 16px rgba(217,197,154,.15); }
.cta.outline:hover { background: rgba(217,197,154,.12); color: #fff; transform: translateY(-2px); }
.cta:active { transform: translateY(0) scale(.98); }
.cta:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.cta.large { font-size: 18px; padding: 20px 36px; }
.hero-cta { font-size: 20px; }

/* remove padding so text hugs left edge */
.hero-copy { padding: 0; }

.hero-backdrop { position: absolute; inset: -20% -10% auto -10%; height: 70%; background: radial-gradient(500px 200px at 20% 30%, #1a3a2d33, transparent), radial-gradient(600px 280px at 90% 10%, #0f2a1f55, transparent); pointer-events: none; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.04), rgba(0,0,0,.18)); pointer-events: none; }

/* Scroll cue */
.scroll-cue { position: absolute; left: 50%; bottom: 18px; translate: -50% 0; color: var(--gold); text-decoration: none; font-size: 22px; border: 1px solid var(--border); border-radius: 999px; padding: 8px 12px; background: #0f2a1f66; box-shadow: var(--shadow); animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(6px);} }

/* Sections */
.section { padding: 80px 0; background: var(--bg); }
.section-alt { background: var(--primary-2); }
.section, .section-alt { position: relative; }
.section + .section, .section + .section-alt, .section-alt + .section, .section-alt + .section-alt { box-shadow: 0 -1px 0 rgba(255,255,255,0.06) inset; }
.section-title { font-family: "Playfair Display", serif; font-weight: 800; font-size: 36px; margin: 0 0 10px; color: #f3f8f6; }
.lead { color: var(--muted); margin: 0 0 24px; max-width: 70ch; }

/* New section grid layout */
.section-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.section-grid.single-col { grid-template-columns: 1fr; }
.section-content { display: grid; gap: 20px; }
.section-content p { margin: 0; line-height: 1.6; }

/* Media carousel */
.section-media { position: relative; }
.media-carousel { position: relative; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); aspect-ratio: 16/9; }
.carousel-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transform: scale(1.02); transition: opacity 600ms ease, transform 800ms ease; }
.carousel-slide.active { opacity: 1; transform: scale(1); }
.slide-caption { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,.8)); color: #fff; padding: 20px; font-size: 14px; font-weight: 600; }
/* Placeholder carousel (no image yet) */
.activity-carousel.placeholder .carousel-slide { background: repeating-linear-gradient(45deg, #1a3a2d33 0 16px, #0f2a1f53 16px 32px); }

/* Simple content card for text blocks */
.content-card {
  background: linear-gradient(180deg, var(--card), #0f2a1f);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 32px;
}

/* Lighter background specifically for the Home Contact card */
.contact-card {
  background: linear-gradient(180deg, #1a3a2d, #235143);
}

/* Three-up gallery cards with 4:3 images - always horizontal layout */
.gallery-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 24px; }
.gallery-cards .card { background: linear-gradient(180deg, var(--card), #0f2a1f); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.gallery-cards .card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; transition: transform .25s ease; }
.gallery-cards .card:hover img { transform: scale(1.02); }
.gallery-cards .card-body { padding: 14px; text-align: center; }
.gallery-cards .card-body h3 { margin: 0; font-family: "Playfair Display", serif; font-size: 18px; }

/* Keep horizontal layout on all screen sizes for Community Service */
@media (max-width: 979.98px) {
  .gallery-cards { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media (max-width: 599.98px) {
  .gallery-cards { grid-template-columns: repeat(3, 1fr); gap: 12px; }
}

/* Carousel controls */
.carousel-controls { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 16px; }
.carousel-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: #0f261d; color: var(--text); cursor: pointer; box-shadow: var(--shadow); transition: transform var(--fast) var(--ease), background var(--fast) var(--ease), color var(--fast) var(--ease); }
.carousel-btn:hover { background: #1a3a2d; color: var(--gold); transform: translateY(-2px) scale(1.05); }
.carousel-dots { display: flex; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; border: none; background: var(--border); cursor: pointer; transition: all .2s ease; }
.dot.active { background: var(--gold); transform: scale(1.2); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { border-radius: 16px; overflow: hidden; border: 1px solid var(--border); background: linear-gradient(180deg, var(--card), #0e241c); box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-6px); box-shadow: 0 22px 44px rgba(0,0,0,.5); }
.card img { width: 100%; height: 200px; object-fit: cover; display: block; }
.card-body { padding: 16px; }
.card-body h3 { margin: 0 0 8px; font-family: "Playfair Display", serif; }
.card-body p { margin: 0; color: var(--muted); }

/* Stats Grid (4 per row on desktop) */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 24px 0; }
.stat-item { text-align: center; padding: 18px; background: linear-gradient(180deg, var(--card), #0f2a1f); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.stat-number { display: block; font-size: 30px; font-weight: 800; color: var(--gold); font-family: "Playfair Display", serif; margin-bottom: 6px; }
.stat-label { font-size: 14px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

/* Showcase */
.showcase { margin-top: 28px; padding-bottom: 24px; }
.showcase h3 { margin: 0 0 12px; }
.showcase-track { display: grid; grid-auto-flow: column; grid-auto-columns: 360px; gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: none; }
.tile { scroll-snap-align: start; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: #0f2a1f; transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease); }
.tile:hover { transform: translateY(-4px); box-shadow: 0 18px 34px rgba(0,0,0,.45); }
.tile img { width: 100%; height: 180px; object-fit: cover; display: block; }
.tile { aspect-ratio: 16/9; display: grid; grid-template-rows: 1fr auto; }
.tile img { height: auto; aspect-ratio: 16/9; }
.tile figcaption { text-align: center; font-weight: 600; }
.tile figcaption { padding: 10px 12px; color: var(--muted); }

/* Video Grid */
.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 24px; margin-top: 24px; }
.video-item { background: transparent; border: none; border-radius: 16px; padding: 0; box-shadow: none; }
.video-item h3 { margin: 0 0 16px; font-family: "Playfair Display", serif; color: var(--gold); }
.video-title { cursor: pointer; transition: color 0.3s ease; }
.video-title:hover { color: var(--primary); }
.video-container { position: relative; width: 100%; padding-bottom: 56.25%; border-radius: 16px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,0.15); border: 2px solid rgba(255,255,255,0.1); cursor: pointer; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.video-container:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.25); }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 14px; }

/* Masonry-like grid */
.masonry { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.masonry-item { border-radius: 16px; overflow: hidden; background: #0f2a1f; border: 1px solid var(--border); box-shadow: var(--shadow); }
.masonry-item.wide { grid-column: span 2; }
.masonry-item.tall { grid-row: span 2; }
.masonry-item img { width: 100%; height: 180px; object-fit: cover; display: block; }
.masonry-body { padding: 14px; }
.masonry-body h3 { margin: 0 0 8px; font-family: "Playfair Display", serif; }
.masonry-body p { margin: 0; color: var(--muted); }

/* Facilities Grid and Modal */
.facilities-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: 24px; }
.facility-item { background: linear-gradient(180deg, var(--card), #0f2a1f); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); cursor: pointer; transition: transform .25s ease, box-shadow .25s ease; }
.facility-item:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,.45); }
.facility-image { height: 200px; background-size: cover; background-position: center; }
.facility-content { padding: 20px; }
.facility-content h3 { margin: 0 0 12px; font-family: "Playfair Display", serif; color: var(--gold); }
.facility-content p { margin: 0; color: var(--muted); line-height: 1.6; }
.modal { display: none; position: fixed; z-index: 1000; inset: 0; background-color: rgba(0,0,0,0.8); }
.modal-content { background: linear-gradient(180deg, var(--surface), var(--primary-2)); margin: 1% auto; padding: 10px; border: 1px solid var(--border); border-radius: 16px; width: 98%; max-width: 1600px; height: 95vh; overflow: hidden; position: relative; }
.modal-close { position: absolute; top: 10px; right: 15px; background: none; border: none; font-size: 30px; color: var(--text); cursor: pointer; z-index: 1001; }
.modal-close:hover { color: var(--primary); }
.modal-video-container { position: relative; width: 100%; height: calc(100vh - 40px); border-radius: 12px; overflow: hidden; margin-top: 10px; }
.modal-video-container iframe { position: absolute; top: 0; left: 0; width: 100% !important; height: 100% !important; border-radius: 12px; min-width: 100%; min-height: 100%; max-width: none; max-height: none; }

/* Responsive video modal */
@media (max-width: 768px) {
  .modal-content { width: 99%; margin: 0.5% auto; padding: 5px; height: 98vh; }
  .modal-video-container { height: calc(100vh - 20px); margin-top: 5px; }
  .modal-close { top: 5px; right: 10px; font-size: 24px; }
}

@media (min-width: 1200px) {
  .modal-content { max-width: 1800px; }
  .modal-video-container { height: calc(100vh - 40px); }
}
.close { color: var(--gold); float: right; font-size: 28px; font-weight: bold; cursor: pointer; }
.close:hover { color: var(--text); }
.facility-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 24px; }
.facility-gallery .gallery-item img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }

/* Outcomes */
.chart-card, .table-card { border: 1px solid var(--border); border-radius: 16px; background: #0f2a1f; box-shadow: var(--shadow); padding: 16px; }
.chart-skeleton { height: 260px; border-radius: 12px; background: repeating-linear-gradient(90deg, #1a3a2d 0 16px, #0f2a1f 16px 18px); border: 1px solid var(--border); }
.muted { color: var(--muted); }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 12px; border-bottom: 1px solid var(--border); }
.table th { color: var(--gold); font-family: "Cinzel", serif; }

/* Application Results Table */
.results-table { margin-top: 24px; }

/* Application Result Page Specific */
.section:first-of-type { padding: 40px 0; }
.results-table table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.results-table th { background: var(--primary); color: var(--gold); font-family: "Cinzel", serif; font-weight: 700; padding: 16px 20px; text-align: left; }
.results-table td { padding: 16px 20px; border-bottom: 1px solid var(--border); color: var(--text); }
.results-table tr:hover { background: rgba(255,255,255,0.02); }
.results-table tr:last-child td { border-bottom: none; }
/* Sortable headers visual cue */
.results-table th.sortable { position: relative; user-select: none; cursor: pointer; transition: color var(--fast) var(--ease); }
.results-table th.sortable:hover { color: #fff; }
.results-table th.sortable::after { content: "\25B2\25BC"; /* ▲▼ */ font-size: 14px; opacity: .7; margin-left: 10px; letter-spacing: 2px; }
.results-table th.sortable[aria-sort="ascending"]::after { content: "\25B2"; font-size: 16px; opacity: 1; }
.results-table th.sortable[aria-sort="descending"]::after { content: "\25BC"; font-size: 16px; opacity: 1; }

/* Tab Navigation */
.tab-navigation { 
  display: flex; 
  justify-content: center; 
  margin-bottom: 0; 
  border-bottom: 2px solid var(--border);
  position: relative;
}
.tab-btn { 
  background: transparent; 
  border: none; 
  border-bottom: 3px solid transparent;
  color: var(--muted); 
  padding: 18px 36px; 
  border-radius: 0; 
  cursor: pointer; 
  font-weight: 600; 
  font-size: 18px;
  transition: all var(--fast) var(--ease);
  position: relative;
  margin-bottom: -2px;
}
.tab-btn:hover { 
  color: var(--gold); 
  background: rgba(217,197,154,0.05);
}
.tab-btn.active { 
  color: var(--gold); 
  border-bottom-color: var(--gold);
  background: rgba(217,197,154,0.08);
}

/* Tab Content */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* First tab content - no top margin */
.tab-content:first-of-type.active {
  margin-top: 0;
}

/* Search Container */
.search-container { margin-bottom: 24px; }
.search-input { width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; color: var(--text); font-size: 16px; transition: border-color var(--fast) var(--ease); }
.search-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217,197,154,0.1); }
.search-input::placeholder { color: var(--muted); }

/* Footer */
.site-footer { margin-top: 40px; border-top: 1px solid rgba(255,255,255,0.06); background: linear-gradient(180deg, #0a1f16, #0f2a1f); position: relative; }
.footer-inner { display: grid; grid-template-columns: auto 1.5fr 1fr 1fr; gap: 20px; padding: 20px; align-items: center; }
.footer-info { min-width: 0; }
.footer-info h4 { color: var(--gold); margin: 0 0 8px; font-family: "Cinzel", serif; font-size: 14px; white-space: nowrap; }
.footer-info p { margin: 0 0 4px; font-size: 14px; word-break: break-all; }
.footer-info { }
@media (min-width: 980px) {
  .footer-inner { gap: 32px; }
  .footer-inner > .footer-info { margin-left: 40px; }
  .footer-inner > .footer-info + .footer-info { margin-left: 56px; }
}
.footer-logo { display: flex; align-items: center; justify-content: center; }
.footer-logo .brand-logo { width: 96px; height: 96px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); }

@media (max-width: 979.98px) {
  .footer-logo .brand-logo { width: 72px; height: 72px; }
}
@media (max-width: 599.98px) {
  .footer-logo .brand-logo { width: 56px; height: 56px; }
}
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.06); padding: 16px 20px; }
.footer-meta { text-align: center; color: var(--muted); }
.footer-meta p { margin: 0; }

.to-top { position: fixed; right: 18px; bottom: 18px; border-radius: 50%; width: 44px; height: 44px; border: 1px solid var(--border); background: #0f2a1f; color: #fff; cursor: pointer; box-shadow: var(--shadow); opacity: 0; transform: translateY(6px); transition: opacity .2s ease, transform .2s ease; }
.to-top.show { opacity: 1; transform: translateY(0); }

/* Reveal animations */
.reveal { opacity: 0; transform: translateY(14px) scale(.985); transition: opacity .6s var(--ease), transform .6s var(--ease), filter .6s; filter: saturate(.6); }
.reveal.in { opacity: 1; transform: translateY(0) scale(1); filter: saturate(1); }

/* Page load fade-in (do not block text rendering) */
body { transition: opacity var(--slow) var(--ease), filter var(--slow) var(--ease); }

/* Utilities */
.image-mask { mask-image: radial-gradient(120% 120% at 80% 20%, #000 50%, transparent 100%); }

/* Responsive */
@media (min-width: 980px) {
  .nav .nav-list { display: flex; }
  .menu-toggle { display: none; }
}

@media (max-width: 979.98px) {
  .hero-inner { grid-template-columns: 1fr; }
  .section-grid { grid-template-columns: 1fr; gap: 40px; }
  /* keep 16:9 via parent */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-meta { text-align: center; }
  .footer-info { margin-bottom: 16px; }
}

@media (max-width: 599.98px) {
  .display { font-size: 40px; }
  .section-grid { gap: 30px; }
  /* keep 16:9 via parent */
  .stats-grid { grid-template-columns: 1fr; }
  .slide-caption { padding: 16px; font-size: 13px; }
  
  /* Tab navigation mobile */
  .tab-navigation { 
    flex-direction: row; 
    align-items: center; 
    overflow-x: auto;
    padding-bottom: 0;
  }
  .tab-btn { 
    width: auto; 
    min-width: 120px;
    white-space: nowrap;
    padding: 14px 20px;
  }
  
  /* Search input mobile */
  .search-input { max-width: 100%; }
  
  /* Table mobile */
  .results-table { overflow-x: auto; }
  .results-table table { min-width: 600px; }
}

/* Hide tabs and student results per requirement */
.tab-navigation { display: none; }
#student-results { display: none; }

/* Collapsible results with fade mask */
.results-table.collapsed { position: relative; }
.results-table.collapsed::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 80px; background: linear-gradient(0deg, var(--primary-2), transparent); pointer-events: none; }


