* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===================================================
   CSS VARIABLES - LIGHT & DARK THEME
   =================================================== */
:root {
  --primary-color: #1c472d;
  --primary-gradient: linear-gradient(145deg, #1c472d 0%, #2d6e45 50%, #4a9e6a 100%);
  --hero-gradient: linear-gradient(135deg, #1c472d 0%, #2d6e45 50%, #4a9e6a 100%);
  --secondary-color: #F7E7CE;
  --accent-color: #4a9e6a;
  --dark-color: #FFFDD0;
  --light-color: #ffffff;
  --text-color: #1c3a2a;
  --text-muted: #6b7280;
  --border-color: #e8ede9;
  --glass-light: rgba(255, 255, 255, 0.92);
  --glass-light-border: rgba(255, 255, 255, 0.6);
  --glass-dark: rgba(10, 15, 20, 0.08);
  --glass-dark-border: rgba(0, 0, 0, 0.08);
  --navbar-bg: rgba(255, 255, 255, 0.95);
  --footer-bg: #1c472d;
  --footer-text: #ffffff;
  --card-bg: #ffffff;
  --body-bg: #f5f7f5;
  --input-bg: #ffffff;
  --shadow-sm: 0 2px 8px rgba(28, 71, 45, 0.06);
  --shadow-md: 0 6px 20px rgba(28, 71, 45, 0.08);
  --shadow-lg: 0 10px 30px rgba(28, 71, 45, 0.12);
}

html[data-theme="dark"] {
  --primary-color: #4a9e6a;
  --primary-gradient: linear-gradient(145deg, #2d6e45 0%, #4a9e6a 50%, #6abf8a 100%);
  --hero-gradient: linear-gradient(135deg, #0d2b1a 0%, #1c472d 50%, #2d6e45 100%);
  --secondary-color: #2d6e45;
  --accent-color: #6abf8a;
  --dark-color: #e8f4ec;
  --light-color: #0f1f15;
  --text-color: #d4ead9;
  --text-muted: #8aab95;
  --border-color: rgba(74, 158, 106, 0.2);
  --glass-light: rgba(20, 40, 28, 0.85);
  --glass-light-border: rgba(74, 158, 106, 0.15);
  --glass-dark: rgba(0, 0, 0, 0.3);
  --glass-dark-border: rgba(74, 158, 106, 0.1);
  --navbar-bg: rgba(15, 31, 21, 0.97);
  --footer-bg: #0d2b1a;
  --footer-text: #d4ead9;
  --card-bg: #162a1e;
  --body-bg: #0f1f15;
  --input-bg: #1a3324;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* ===================================================
   BASE
   =================================================== */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--body-bg);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--dark-color);
  transition: color 0.3s ease;
}

a {
  transition: color 0.3s ease;
}

/* ===================================================
   GLASS UTILITIES
   =================================================== */
.glass {
  background: var(--glass-light);
  border: 1px solid var(--glass-light-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 10px;
}

.glass-dark {
  background: var(--glass-dark);
  border: 1px solid var(--glass-dark-border);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 10px;
}

/* ===================================================
   NAVBAR
   =================================================== */
.navbar {
  background: var(--navbar-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1000;
  height: 4rem;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  position: relative;
}

/* Logo */
.logo {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.logo a {
  text-decoration: none;
}

.logo .brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.logo .brand i {
  font-size: 40px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo .brand span {
  font-size: 28px;
  font-weight: bold;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo .yayasan {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-color);
  text-align: center;
  width: 100%;
  margin-top: 2px;
  letter-spacing: 0.5px;
}

.logo .yayasan span {
  display: block;
}

/* Nav Links */
.menu-nav {
  flex: 3;
  display: flex;
  justify-content: space-evenly;
  gap: 5px;
  height: 100%;
  width: 100%;
}

.nav-link {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.3s ease, transform 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--primary-color);
  transition: transform 0.3s ease;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
  transform: translateY(-2px);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
}

/* Auth Buttons */
.auth-buttons {
  flex: 1;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.desktop-auth {
  display: flex;
}

.mobile-auth {
  display: none;
}

.btn-login {
  min-width: 100px;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: white;
  background: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: var(--accent-color);
  border-color: var(--accent-color);
}

/* Theme Toggle */
.theme-toggle {
  background: transparent;
  border: 2px solid var(--primary-color);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 16px;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  background: rgba(28, 71, 45, 0.08);
  box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .theme-toggle:hover {
  background: rgba(74, 158, 106, 0.12);
}

/* Hamburger */
.hamburger {
  display: none;
  cursor: pointer;
  font-size: 24px;
  color: var(--text-color);
  background: transparent;
  border: none;
  transition: color 0.3s ease;
}

.hamburger:hover,
.hamburger.active {
  color: var(--primary-color);
}

/* ===================================================
   SECTIONS - COMMON
   =================================================== */
.materi h2,
.pengumuman h2,
.guru h2,
.siswa h2 {
  font-size: 36px;
  text-align: center;
  margin-bottom: 15px;
  color: var(--dark-color);
}

.section-subtitle {
  text-align: center;
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 50px;
}

/* ===================================================
   PENGUMUMAN SECTION
   =================================================== */
.pengumuman {
  padding: 80px 20px;
  background: var(--body-bg);
  transition: background 0.3s ease;
}

.pengumuman-list {
  max-width: 800px;
  margin: 0 auto;
}

.pengumuman-item {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
  background: var(--card-bg);
  padding: 25px;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary-color);
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.pengumuman-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.pengumuman-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  background: var(--primary-gradient);
  color: white;
  border-radius: 8px;
  padding: 15px;
  flex-shrink: 0;
}

.pengumuman-date .day {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
}

.pengumuman-date .month {
  font-size: 12px;
  text-transform: uppercase;
  margin-top: 4px;
}

.pengumuman-content h3 {
  margin-bottom: 10px;
  color: var(--dark-color);
  font-size: 16px;
}

.pengumuman-content p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

/* ===================================================
   GURU SECTION
   =================================================== */
.guru {
  padding: 80px 20px;
  background: var(--light-color);
  transition: background 0.3s ease;
}

.guru-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.guru-card {
  background: var(--card-bg);
  padding: 28px 20px 22px;
  border-radius: 12px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
}

.guru-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.guru-image {
  margin-bottom: 15px;
}

.guru-image img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border-color);
}

.guru-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--dark-color);
}

.guru-subject {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(28, 71, 45, 0.1);
  color: var(--primary-color);
  margin-bottom: 10px;
}

html[data-theme="dark"] .guru-subject {
  background: rgba(74, 158, 106, 0.15);
}

.guru-bio {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.guru-divider {
  height: 1px;
  background: var(--border-color);
  margin: 10px 0;
}

.guru-meta {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.guru-meta-row {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 12px;
  color: var(--text-muted);
}

.guru-meta-row i {
  font-size: 13px;
  color: var(--primary-color);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ===================================================
   SISWA SECTION
   =================================================== */
.siswa {
  padding: 80px 20px;
  background: var(--body-bg);
  transition: background 0.3s ease;
}

.siswa-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin: 50px auto;
  max-width: 800px;
}

.stat-card {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.stat-card h3 {
  font-size: 36px;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.stat-card p {
  font-size: 16px;
  color: var(--text-muted);
}

.siswa-testimonial {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin: 50px 0;
}

.testimonial-card {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.stars {
  color: #fbbf24;
  margin-bottom: 15px;
  font-size: 16px;
}

.testimonial-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 15px;
  line-height: 1.6;
}

.testimonial-author {
  font-weight: 600;
  color: var(--dark-color);
}

/* Search Box (siswa page) */
.siswa-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 16px;
  max-width: 420px;
  margin: 0 auto 36px;
  box-shadow: var(--shadow-sm);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.siswa-search i {
  color: var(--primary-color);
  font-size: 15px;
  flex-shrink: 0;
}

.siswa-search input {
  border: none;
  outline: none;
  font-size: 14px;
  color: var(--text-color);
  width: 100%;
  background: transparent;
}

.siswa-search input::placeholder {
  color: var(--text-muted);
}

/* ===================================================
   FOOTER
   =================================================== */
.footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 60px 20px 20px;
  transition: background 0.3s ease;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  margin-bottom: 15px;
  font-size: 16px;
  font-weight: 600;
  color: var(--footer-text);
}

.footer-section p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 8px;
  line-height: 1.6;
}

html[data-theme="dark"] .footer-section p {
  color: rgba(212, 234, 217, 0.65);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--footer-text);
}

html[data-theme="dark"] .footer-section a {
  color: rgba(212, 234, 217, 0.6);
}

html[data-theme="dark"] .footer-section a:hover {
  color: var(--footer-text);
}

.social-links {
  display: flex;
  gap: 14px;
  font-size: 20px;
  margin-top: 4px;
}

.social-links a {
  color: rgba(255, 255, 255, 0.72) !important;
  transition: color 0.3s ease, transform 0.2s ease !important;
}

.social-links a:hover {
  color: #ffffff !important;
  transform: translateY(-2px);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

html[data-theme="dark"] .footer-bottom {
  color: rgba(212, 234, 217, 0.5);
  border-top-color: rgba(74, 158, 106, 0.15);
}

/* ===================================================
   TOP BAR (LOGGED IN)
   =================================================== */
.top-bar {
  background: var(--navbar-bg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 4rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 7px 14px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.search-wrapper i {
  color: var(--text-muted);
  font-size: 14px;
}

.search-wrapper input {
  border: none;
  outline: none;
  font-size: 14px;
  color: var(--text-color);
  background: transparent;
  width: 180px;
}

.search-wrapper input::placeholder {
  color: var(--text-muted);
}

.notification-icon {
  position: relative;
  color: var(--text-muted);
  font-size: 18px;
  text-decoration: none;
  transition: color 0.3s ease;
}

.notification-icon:hover {
  color: var(--primary-color);
}

.notification-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: #e53e3e;
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 999px;
  min-width: 16px;
  text-align: center;
}

.top-avatar {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.top-avatar .text h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-color);
  margin: 0;
}

.top-avatar .text span {
  font-size: 12px;
  color: var(--text-muted);
}

.top-avatar .avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.top-avatar .avatar:hover {
  opacity: 0.85;
}

.top-avatar .modal {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  min-width: 160px;
  z-index: 999;
  overflow: hidden;
}

.top-avatar .modal.show {
  display: block;
}

.top-avatar .modal ul {
  list-style: none;
  padding: 6px 0;
}

.top-avatar .modal ul li a,
.top-avatar .modal ul li .logout-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-color);
  text-decoration: none;
  background: transparent;
  border: none;
  width: 100%;
  cursor: pointer;
  transition: background 0.2s ease;
}

.top-avatar .modal ul li a:hover,
.top-avatar .modal ul li .logout-btn:hover {
  background: var(--body-bg);
  color: var(--primary-color);
}

.top-avatar .modal ul li.logout .logout-btn {
  color: #e53e3e;
}

/* ===================================================
   MOBILE NAVIGATION
   =================================================== */
@media (max-width: 768px) {
  .navbar {
    padding: 0;
  }

  .navbar .container {
    position: relative;
    padding: 0 1rem;
  }

  .hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    cursor: pointer;
    z-index: 1001;
    flex-shrink: 0;
  }

  .hamburger i {
    font-size: 1.25rem;
    color: var(--text-color);
    transition: all 0.3s ease;
  }

  .desktop-auth {
    display: none;
  }

  .mobile-auth {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
  }

  /* Logo compact on mobile */
  .logo {
    flex: 1;
    align-items: flex-start;
  }

  .logo .brand span { font-size: 1.4rem; }
  .logo .brand i    { font-size: 1.75rem; }
  .logo .yayasan    { font-size: 0.55rem; letter-spacing: 0; }

  /* Dropdown menu: full-width panel below navbar */
  .menu-nav {
    display: none;
    position: fixed;
    top: 4rem;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--navbar-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-top: 1px solid var(--border-color);
    z-index: 999;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    animation: slideDown 0.25s ease;
  }

  .menu-nav.mobile-open {
    display: flex;
  }

  .nav-link {
    padding: 0.875rem 1rem;
    border-radius: 10px;
    margin: 0;
    text-align: left;
    background: transparent;
    color: var(--text-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 44px;
    transform: none;
    font-size: 1rem;
  }

  .nav-link:hover,
  .nav-link.active,
  .nav-link:focus {
    background: rgba(28, 71, 45, 0.08);
    transform: none;
    color: var(--primary-color);
  }

  html[data-theme="dark"] .nav-link:hover,
  html[data-theme="dark"] .nav-link.active {
    background: rgba(74, 158, 106, 0.1);
  }

  .nav-link::after {
    display: none;
  }

  .mobile-auth .theme-toggle,
  .mobile-auth .btn-login {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    min-height: 44px;
    border-radius: 10px;
  }

  .mobile-auth .theme-toggle {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
  }

  .mobile-auth .btn-login {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary-color);
  }
}

/* ===================================================
   RESPONSIVE - CONTENT SECTIONS
   =================================================== */
@media (max-width: 768px) {
  .guru-grid,
  .siswa-stats,
  .siswa-testimonial {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .pengumuman-item {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    padding: 1.25rem;
  }

  .pengumuman-date {
    align-self: center;
    min-width: auto;
    width: fit-content;
    flex-direction: row;
    gap: 6px;
    padding: 8px 14px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about,
  .materi,
  .pengumuman,
  .guru,
  .siswa {
    padding: 3rem 1.25rem;
  }

  .materi h2,
  .pengumuman h2,
  .guru h2,
  .siswa h2 {
    font-size: clamp(1.5rem, 5vw, 2rem) !important;
    margin-bottom: 0.75rem;
  }

  .section-subtitle {
    font-size: 0.9rem;
    margin-bottom: 2rem;
  }
}

@media (max-width: 480px) {
  .navbar {
    height: 3.5rem;
  }

  .menu-nav {
    top: 3.5rem;
    padding: 0.75rem;
    max-height: calc(100vh - 3.5rem);
  }

  .nav-link {
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  .guru-card,
  .stat-card,
  .testimonial-card {
    padding: 1.25rem;
  }

  .pengumuman-item {
    padding: 1rem;
  }

  .about,
  .materi,
  .pengumuman,
  .guru,
  .siswa {
    padding: 2.5rem 1rem;
  }

  .materi h2,
  .pengumuman h2,
  .guru h2,
  .siswa h2 {
    font-size: clamp(1.25rem, 6vw, 1.75rem) !important;
  }
}

@media (max-width: 768px) and (orientation: landscape) {
  .about,
  .materi,
  .pengumuman,
  .guru,
  .siswa {
    padding: 2rem 1.25rem;
  }
}

/* ===================================================
   ANIMATIONS
   =================================================== */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===================================================
   ACCESSIBILITY & FOCUS
   =================================================== */
.hamburger:focus,
.nav-link:focus,
.theme-toggle:focus,
.btn-login:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ===================================================
   UTILITY
   =================================================== */
body.menu-open {
  overflow: hidden;
}

.navbar,
.top-bar,
.footer,
.guru-card,
.stat-card,
.testimonial-card,
.pengumuman-item,
.siswa-search,
.search-wrapper,
.top-avatar .modal {
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ===================================================
   DARK MODE — PUBLIC PAGES (materi, pengumuman, guru, siswa, about)
   =================================================== */

/* Shared sections */
html[data-theme="dark"] .materi-public,
html[data-theme="dark"] .peng-section,
html[data-theme="dark"] .guru-pub-section,
html[data-theme="dark"] .siswa-pub-section,
html[data-theme="dark"] .abt-about,
html[data-theme="dark"] .abt-features,
html[data-theme="dark"] .abt-cta-section {
  background: #0f1f15;
}

html[data-theme="dark"] .abt-vismis {
  background: linear-gradient(180deg, #162a1e 0%, #0f1f15 100%);
}

html[data-theme="dark"] .abt-stats-bar {
  background: #162a1e;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* Cards */
html[data-theme="dark"] .subject-card,
html[data-theme="dark"] .peng-card,
html[data-theme="dark"] .guru-pub-card,
html[data-theme="dark"] .siswa-pub-card,
html[data-theme="dark"] .abt-feature-card,
html[data-theme="dark"] .abt-misi {
  background: #162a1e;
  box-shadow: 0 3px 16px rgba(0,0,0,0.3);
}

html[data-theme="dark"] .peng-card:hover,
html[data-theme="dark"] .guru-pub-card:hover,
html[data-theme="dark"] .siswa-pub-card:hover,
html[data-theme="dark"] .subject-card:hover,
html[data-theme="dark"] .abt-feature-card:hover {
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}

/* Text colours */
html[data-theme="dark"] .subject-info h3,
html[data-theme="dark"] .peng-title,
html[data-theme="dark"] .guru-pub-name,
html[data-theme="dark"] .siswa-pub-name,
html[data-theme="dark"] .abt-feature-card h3,
html[data-theme="dark"] .abt-misi h3,
html[data-theme="dark"] .abt-about-text h2,
html[data-theme="dark"] .materi-section-header h2,
html[data-theme="dark"] .abt-section-header h2,
html[data-theme="dark"] .abt-stat-num {
  color: #d4ead9;
}

html[data-theme="dark"] .subject-info p,
html[data-theme="dark"] .peng-excerpt,
html[data-theme="dark"] .guru-pub-meta-row,
html[data-theme="dark"] .guru-pub-bio,
html[data-theme="dark"] .siswa-pub-nis,
html[data-theme="dark"] .abt-feature-card p,
html[data-theme="dark"] .abt-about-text p,
html[data-theme="dark"] .materi-section-header p,
html[data-theme="dark"] .abt-section-header p,
html[data-theme="dark"] .abt-stat-label,
html[data-theme="dark"] .peng-meta-item {
  color: #8aab95;
}

/* Subject tags */
html[data-theme="dark"] .subject-tags span {
  background: rgba(74,158,106,0.12);
  color: #6abf8a;
  border-color: rgba(74,158,106,0.25);
}

/* Subject card top bg */
html[data-theme="dark"] .guru-pub-card-top {
  background: linear-gradient(180deg, #1a3324 0%, #162a1e 100%);
}
html[data-theme="dark"] .siswa-pub-card-top {
  background: linear-gradient(180deg, #1a3324 0%, #162a1e 100%);
}

/* Arrow button */
html[data-theme="dark"] .subject-arrow i {
  background: rgba(74,158,106,0.15);
  color: #6abf8a;
}

/* Pengumuman filter */
html[data-theme="dark"] .peng-filter-btn,
html[data-theme="dark"] .guru-pub-filter,
html[data-theme="dark"] .siswa-pub-filter {
  background: #162a1e;
  border-color: rgba(74,158,106,0.2);
  color: #d4ead9;
}
html[data-theme="dark"] .peng-filter-btn.active,
html[data-theme="dark"] .guru-pub-filter.active,
html[data-theme="dark"] .siswa-pub-filter.active {
  background: #4a9e6a;
  border-color: #4a9e6a;
  color: #fff;
}

/* Category / priority badges */
html[data-theme="dark"] .peng-cat-badge {
  background: rgba(74,158,106,0.12);
  color: #6abf8a;
  border-color: rgba(74,158,106,0.25);
}
html[data-theme="dark"] .guru-pub-subject-badge {
  opacity: 0.9;
}

/* Siswa badges */
html[data-theme="dark"] .siswa-status-badge.offline {
  background: #1a3324;
  color: #8aab95;
  border-color: rgba(74,158,106,0.15);
}
html[data-theme="dark"] .siswa-status-badge.online {
  background: rgba(34,197,94,0.12);
  color: #86efac;
  border-color: rgba(34,197,94,0.25);
}

/* Search inputs */
html[data-theme="dark"] .guru-pub-search input,
html[data-theme="dark"] .siswa-pub-search-wrap input {
  background: #162a1e;
  border-color: rgba(74,158,106,0.2);
  color: #d4ead9;
}
html[data-theme="dark"] .guru-pub-search input::placeholder,
html[data-theme="dark"] .siswa-pub-search-wrap input::placeholder {
  color: #8aab95;
}
html[data-theme="dark"] .guru-pub-search input:focus,
html[data-theme="dark"] .siswa-pub-search-wrap input:focus {
  border-color: #4a9e6a;
  box-shadow: 0 0 0 3px rgba(74,158,106,0.15);
}

/* Empty / hint states */
html[data-theme="dark"] .peng-empty,
html[data-theme="dark"] .peng-no-results,
html[data-theme="dark"] .guru-pub-empty,
html[data-theme="dark"] .guru-pub-no-results,
html[data-theme="dark"] .siswa-pub-hint,
html[data-theme="dark"] .siswa-pub-empty {
  background: #162a1e;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
html[data-theme="dark"] .peng-empty h3,
html[data-theme="dark"] .guru-pub-empty h3,
html[data-theme="dark"] .guru-pub-no-results h3,
html[data-theme="dark"] .siswa-pub-hint h3,
html[data-theme="dark"] .siswa-pub-empty h3 {
  color: #d4ead9;
}
html[data-theme="dark"] .peng-empty p,
html[data-theme="dark"] .guru-pub-empty p,
html[data-theme="dark"] .guru-pub-no-results p,
html[data-theme="dark"] .siswa-pub-hint p,
html[data-theme="dark"] .siswa-pub-empty p {
  color: #8aab95;
}

/* About page specific */
html[data-theme="dark"] .abt-visual-card {
  background: #162a1e;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}
html[data-theme="dark"] .abt-visual-logo {
  background: #1a3324;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
html[data-theme="dark"] .abt-about-visual::before {
  background: linear-gradient(135deg, rgba(74,158,106,0.15), rgba(45,106,79,0.1));
}
html[data-theme="dark"] .abt-highlight-item {
  color: #d4ead9;
}
html[data-theme="dark"] .abt-stat-icon {
  background: linear-gradient(135deg, rgba(74,158,106,0.15), rgba(45,106,79,0.1));
}
html[data-theme="dark"] .abt-misi-list li {
  color: #d4ead9;
}
html[data-theme="dark"] .abt-section-label {
  color: #6abf8a;
}

/* Card footer borders */
html[data-theme="dark"] .guru-pub-card-footer {
  border-top-color: rgba(74,158,106,0.12) !important;
}

/* Transition for smooth switch */
.subject-card, .peng-card, .guru-pub-card, .siswa-pub-card,
.abt-feature-card, .abt-misi, .abt-stats-bar,
.peng-filter-btn, .guru-pub-filter, .siswa-pub-filter,
.guru-pub-search input, .siswa-pub-search-wrap input,
.peng-empty, .guru-pub-empty, .siswa-pub-hint, .siswa-pub-empty {
  transition: background 0.3s ease, border-color 0.3s ease,
              color 0.3s ease, box-shadow 0.3s ease;
}
