/* =============================================
   SMP Negeri Sadi — Academic Canvas Design System
   Inspired by Ferrari editorial language,
   grounded in school identity
   ============================================= */

/* ---- Design Tokens ---- */
:root {
  --canvas: #ffffff;
  --canvas-alt: #f1f5f9;
  --primary: #1e3a5f;
  --primary-dark: #0f1d33;
  --primary-light: #e8edf4;
  --ink: #0f172a;
  --ink-muted: #64748b;
  --accent-gold: #c9a84c;
  --line: #e2e8f0;

  --font-primary: 'Inter', system-ui, -apple-system, sans-serif;

  --text-mega: clamp(2.5rem, 5vw, 5rem);
  --text-xl: clamp(1.75rem, 4vw, 3.5rem);
  --text-lg: clamp(1.375rem, 3vw, 2.25rem);
  --text-md: clamp(1.125rem, 2vw, 1.625rem);
  --text-body: 1rem;
  --text-sm: 0.875rem;
  --text-xs: 0.75rem;
  --text-xxs: 0.6875rem;

  --space-xxs: 0.5rem;
  --space-xs: 1rem;
  --space-sm: 1.5rem;
  --space-md: 2rem;
  --space-lg: 3rem;
  --space-xl: 4rem;
  --space-xxl: 6rem;
  --space-super: 8rem;

  --content-max: 75rem;
  --content-narrow: 45rem;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-xs);
}

.container-narrow {
  max-width: var(--content-narrow);
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}

h1 {
  font-size: var(--text-mega);
  letter-spacing: -0.03em;
}

h2 {
  font-size: var(--text-xl);
}

h3 {
  font-size: var(--text-lg);
}

h4 {
  font-size: var(--text-md);
}

p {
  color: var(--ink-muted);
  margin-bottom: var(--space-xs);
}

.section-label {
  display: inline-block;
  font-size: var(--text-xxs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: var(--space-xxs);
}

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-xs) 0;
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s;
}

.nav--scrolled {
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-xxs);
}

.nav-logo img {
  height: 40px;
  width: auto;
}

.nav-logo span {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-list a {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.065em;
  color: var(--ink);
  padding: var(--space-xxs) 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-list a:hover,
.nav-list a.active {
  color: #000;
}

.nav-list a.active {
  border-bottom-color: var(--accent-gold);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-hamburger.active span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: flex-end;
  background: var(--primary-dark);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease, visibility 0.9s ease;
  z-index: 0;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-dots {
  position: absolute;
  bottom: var(--space-lg);
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: var(--space-xxs);
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  padding: 0;
  transition: background 0.3s ease, width 0.3s ease;
}

.hero-dot:hover {
  background: rgba(255, 255, 255, 0.6);
}

.hero-dot.active {
  background: var(--accent-gold);
  width: 24px;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(15, 29, 51, 0.85) 0%,
    rgba(15, 29, 51, 0.4) 50%,
    rgba(30, 58, 95, 0.3) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: var(--space-super) 0 var(--space-xxl);
  width: 100%;
}

.hero-subtitle {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-gold);
  margin-bottom: var(--space-xs);
}

.hero-title {
  color: var(--canvas);
  max-width: 14ch;
  line-height: 1.05;
}

.hero-title .gold {
  color: var(--accent-gold);
}

.hero-divider {
  width: 60px;
  height: 1px;
  background: var(--accent-gold);
  margin: var(--space-sm) 0;
}

.hero-tagline {
  font-size: var(--text-md);
  font-weight: 400;
  letter-spacing: 0.065em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--space-md);
  max-width: 40ch;
  line-height: 1.5;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xxs);
  font-family: var(--font-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 32px;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
  line-height: 1;
}

.btn-primary {
  background: var(--primary);
  color: var(--canvas);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-outline {
  background: transparent;
  color: var(--canvas);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
  border-color: var(--canvas);
  background: rgba(255, 255, 255, 0.08);
}

.btn-outline-dark {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--line);
}

.btn-outline-dark:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

/* ---- Sections ---- */
.section {
  padding: var(--space-xxl) 0;
}

.section-alt {
  background: var(--canvas-alt);
}

.section-primary-light {
  background: var(--primary-light);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-header h2 {
  margin-bottom: var(--space-xxs);
}

.section-header p {
  max-width: 600px;
  margin: 0 auto;
}

/* ---- Cards ---- */
.card {
  border-radius: 0;
  overflow: hidden;
  transition: transform 0.3s;
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.card-body {
  padding: var(--space-xs) 0;
}

.card-body h3 {
  font-size: var(--text-body);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-xxs);
}

.card-body p {
  font-size: var(--text-sm);
  margin-bottom: 0;
}

.card-meta {
  font-size: var(--text-xs);
  color: var(--ink-muted);
  margin-bottom: var(--space-xxs);
  display: flex;
  align-items: center;
  gap: var(--space-xxs);
}

.card-link {
  display: block;
  color: inherit;
}

.card-link:hover .card-image {
  opacity: 0.92;
}

.card-link:hover h3 {
  color: var(--primary);
}

/* ---- Berita Grid ---- */
.berita-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

/* ---- Prestasi Card ---- */
.prestasi-card {
  border: 1px solid var(--line);
  padding: var(--space-md);
  text-align: center;
  transition: border-color 0.3s, background 0.3s;
}

.prestasi-card:hover {
  border-color: var(--accent-gold);
  background: rgba(201, 168, 76, 0.03);
}

.prestasi-card .prestasi-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-xs);
  display: flex;
  align-items: center;
  justify-content: center;
}

.prestasi-card .prestasi-year {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-gold);
  margin-bottom: var(--space-xxs);
}

.prestasi-card h3 {
  font-size: var(--text-body);
  margin-bottom: var(--space-xxs);
}

.prestasi-card p {
  font-size: var(--text-sm);
  margin-bottom: 0;
}

/* ---- Prestasi Hero Band ---- */
.prestasi-band {
  background: var(--primary);
  color: var(--canvas);
  padding: var(--space-xxl) 0;
}

.prestasi-band h2 {
  color: var(--canvas);
}

.prestasi-band .section-label {
  color: var(--accent-gold);
}

.prestasi-band .prestasi-card {
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
}

.prestasi-band .prestasi-card:hover {
  border-color: var(--accent-gold);
  background: rgba(255,255,255,0.08);
}

.prestasi-band .prestasi-card h3 {
  color: var(--canvas);
}

.prestasi-band .prestasi-card p {
  color: rgba(255,255,255,0.6);
}

/* ---- Stats ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  text-align: center;
}

.stat-number {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--accent-gold);
  line-height: 1;
  margin-bottom: var(--space-xxs);
}

.stat-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

/* ---- Sambutan ---- */
.sambutan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.sambutan-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* ---- Galeri Grid ---- */
.galeri-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xs);
}

.galeri-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
}

.galeri-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.galeri-item:hover img {
  transform: scale(1.05);
}

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: var(--space-xs);
  right: var(--space-xs);
  background: none;
  border: none;
  color: var(--canvas);
  font-size: 2rem;
  cursor: pointer;
  padding: var(--space-xxs);
  line-height: 1;
}

/* ---- Footer ---- */
.footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.6);
  padding: var(--space-xxl) 0 var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer h4 {
  color: var(--canvas);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.065em;
  margin-bottom: var(--space-xs);
}

.footer p,
.footer a {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.8;
}

.footer a:hover {
  color: var(--canvas);
}

.footer-brand img {
  height: 48px;
  margin-bottom: var(--space-xxs);
}

.footer-brand p {
  max-width: 300px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: var(--space-xs);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
}

.footer-social {
  display: flex;
  gap: var(--space-xs);
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0;
  transition: border-color 0.2s, background 0.2s;
}

.footer-social a:hover {
  border-color: var(--canvas);
  background: rgba(255, 255, 255, 0.05);
}

/* ---- Sub-hero ---- */
.sub-hero {
  padding: calc(80px + var(--space-xxl)) 0 var(--space-xl);
  background: var(--primary);
  position: relative;
}

.sub-hero h1 {
  color: var(--canvas);
  font-size: var(--text-xl);
}

.sub-hero .breadcrumb {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: var(--space-xxs);
}

.sub-hero .breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
}

.sub-hero .breadcrumb a:hover {
  color: var(--canvas);
}

/* ---- Tab Navigation ---- */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--space-lg);
}

.tab-btn {
  font-family: var(--font-primary);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.065em;
  color: var(--ink-muted);
  background: none;
  border: none;
  padding: var(--space-xs) var(--space-sm);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
}

.tab-btn:hover {
  color: var(--primary);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--accent-gold);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ---- Teacher Cards ---- */
.guru-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.guru-card {
  text-align: center;
  border: 1px solid var(--line);
  padding: var(--space-md);
  transition: border-color 0.3s;
}

.guru-card:hover {
  border-color: var(--accent-gold);
}

.guru-card .guru-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto var(--space-xs);
}

.guru-card h3 {
  font-size: var(--text-body);
  font-weight: 600;
  margin-bottom: 2px;
}

.guru-card .jabatan {
  font-size: var(--text-xs);
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 2px;
}

.guru-card .mapel {
  font-size: var(--text-xs);
  color: var(--ink-muted);
}

/* ---- Berita List ---- */
.berita-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-xl);
}

.berita-item {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-sm);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--line);
}

.berita-item:first-child {
  padding-top: 0;
}

.berita-item:last-child {
  border-bottom: none;
}

.berita-item .berita-thumb {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
}

.berita-item .berita-content h3 {
  font-size: var(--text-body);
  font-weight: 500;
  margin-bottom: var(--space-xxs);
}

.berita-item .berita-excerpt {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  margin-bottom: 0;
}

/* ---- Sidebar ---- */
.sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-widget {
  margin-bottom: var(--space-lg);
}

.sidebar-widget h4 {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: var(--space-xs);
  padding-bottom: var(--space-xxs);
  border-bottom: 1px solid var(--line);
}

.sidebar-widget ul li {
  padding: var(--space-xxs) 0;
}

.sidebar-widget ul li a {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  transition: color 0.2s;
}

.sidebar-widget ul li a:hover {
  color: var(--primary);
}

.sidebar-search {
  width: 100%;
  font-family: var(--font-primary);
  font-size: var(--text-sm);
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--canvas);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}

.sidebar-search:focus {
  border-color: var(--primary);
}

/* ---- Pagination ---- */
.pagination {
  display: flex;
  gap: 4px;
  margin-top: var(--space-lg);
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: var(--text-sm);
  border: 1px solid var(--line);
  color: var(--ink-muted);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.pagination a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.pagination .active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--canvas);
}

/* ---- PPDB Accordion ---- */
.accordion {
  border-top: 1px solid var(--line);
}

.accordion-item {
  border-bottom: 1px solid var(--line);
}

.accordion-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-primary);
  font-size: var(--text-body);
  font-weight: 500;
  color: var(--ink);
  background: none;
  border: none;
  padding: var(--space-sm) 0;
  cursor: pointer;
  text-align: left;
  transition: color 0.2s;
}

.accordion-header:hover {
  color: var(--primary);
}

.accordion-header .icon {
  font-size: var(--text-sm);
  transition: transform 0.3s;
}

.accordion-item.active .accordion-header .icon {
  transform: rotate(45deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0;
}

.accordion-item.active .accordion-body {
  max-height: 500px;
  padding: 0 0 var(--space-sm);
}

/* ---- Kontak ---- */
.kontak-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}

.kontak-info-item {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.kontak-info-item .icon {
  width: 20px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 3px;
}

.kontak-info-item h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: 2px;
}

.kontak-info-item p {
  font-size: var(--text-sm);
  margin-bottom: 0;
}

.form-group {
  margin-bottom: var(--space-xs);
}

.form-group label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.065em;
  color: var(--primary);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  font-family: var(--font-primary);
  font-size: var(--text-sm);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--canvas);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

/* ---- Maps ---- */
.maps-container {
  width: 100%;
  height: 400px;
  filter: grayscale(1);
}

.maps-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ---- PPDB CTA Band ---- */
.cta-band {
  background: var(--primary);
  padding: var(--space-xxl) 0;
  text-align: center;
}

.cta-band h2 {
  color: var(--canvas);
  margin-bottom: var(--space-xxs);
}

.cta-band p {
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: var(--space-sm);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Berita Detail ---- */
.article-header {
  margin-bottom: var(--space-lg);
}

.article-header .article-meta {
  display: flex;
  gap: var(--space-xs);
  font-size: var(--text-xs);
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
}

.article-header h1 {
  font-size: var(--text-lg);
}

.article-featured-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin-bottom: var(--space-lg);
}

.article-body {
  max-width: var(--content-narrow);
  margin: 0 auto;
}

.article-body p {
  margin-bottom: var(--space-sm);
  font-size: var(--text-body);
  line-height: 1.8;
}

/* ---- Animations ---- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .berita-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .guru-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .galeri-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---- Siswa Table ---- */
.siswa-search {
  max-width: 400px;
  margin: 0 auto;
}

.siswa-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.siswa-table thead th {
  background: var(--primary);
  color: var(--canvas);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: var(--text-xs);
  padding: var(--space-xxs) var(--space-xs);
  text-align: left;
}

.siswa-table tbody td {
  padding: var(--space-xxs) var(--space-xs);
  border-bottom: 1px solid var(--line);
}

.siswa-table tbody tr:hover {
  background: var(--primary-light);
}

/* ---- Mata Pelajaran Grid ---- */
.mapel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.mapel-card {
  border: 1px solid var(--line);
  padding: var(--space-md);
  text-align: center;
  transition: border-color 0.3s;
}

.mapel-card:hover {
  border-color: var(--accent-gold);
}

.mapel-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
}

.mapel-card h3 {
  font-size: var(--text-body);
  font-weight: 500;
}

@media (max-width: 1024px) {
  .mapel-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .mapel-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-list {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--canvas);
    flex-direction: column;
    justify-content: center;
    gap: var(--space-md);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: -1;
  }

  .nav-list.open {
    opacity: 1;
    pointer-events: all;
  }

  .nav-list a {
    font-size: var(--text-body);
  }

  .nav-hamburger {
    display: flex;
    z-index: 1;
  }

  .hero {
    min-height: 70vh;
  }

  .sambutan-grid {
    grid-template-columns: 1fr;
  }

  .berita-grid {
    grid-template-columns: 1fr;
  }

  .berita-layout {
    grid-template-columns: 1fr;
  }

  .berita-item {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .kontak-grid {
    grid-template-columns: 1fr;
  }

  .guru-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .galeri-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-xs);
    text-align: center;
  }
}

@media (max-width: 480px) {
  .guru-grid {
    grid-template-columns: 1fr;
  }

  .galeri-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-title {
    font-size: var(--text-xl);
  }

  .section {
    padding: var(--space-xl) 0;
  }
}

/* ---- Fasilitas Card ---- */
.fasilitas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.fasilitas-card {
  border: 1px solid var(--line);
  transition: border-color 0.3s;
}

.fasilitas-card:hover {
  border-color: var(--accent-gold);
}

.fasilitas-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.fasilitas-body {
  padding: var(--space-sm);
}

.fasilitas-body h3 {
  font-size: var(--text-body);
  font-weight: 600;
  margin-bottom: var(--space-xxs);
}

.fasilitas-body p {
  font-size: var(--text-sm);
  margin-bottom: 0;
}

/* ---- Ekstrakurikuler Card ---- */
.ekskul-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.ekskul-card {
  border: 1px solid var(--line);
  text-align: center;
  transition: border-color 0.3s;
}

.ekskul-card:hover {
  border-color: var(--accent-gold);
}

.ekskul-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.ekskul-body {
  padding: var(--space-sm);
}

.ekskul-body h3 {
  font-size: var(--text-body);
  font-weight: 600;
  margin-bottom: var(--space-xxs);
}

.ekskul-pembina {
  font-size: var(--text-xs);
  color: var(--primary);
  font-weight: 500;
  margin-bottom: var(--space-xxs);
}

.ekskul-body p {
  font-size: var(--text-sm);
  margin-bottom: 0;
}

@media (max-width: 1024px) {
  .fasilitas-grid,
  .ekskul-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .fasilitas-grid,
  .ekskul-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .fade-in,
  .fade-in-up {
    opacity: 1;
    transform: none;
  }
}
