/* ==========================================================================
   MI TARBIYATUL FALAH - MODERN STYLE SYSTEM
   Features: Dual-mode HSL system, Glassmorphism, Premium Micro-interactions
   ========================================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- Design Variables --- */
:root {
  /* Light Mode Theme */
  --primary-hue: 206;
  --secondary-hue: 43;
  
  --primary: hsl(var(--primary-hue), 76%, 18%);
  --primary-light: hsl(var(--primary-hue), 60%, 25%);
  --primary-glow: hsla(var(--primary-hue), 76%, 18%, 0.15);
  
  --secondary: hsl(var(--secondary-hue), 85%, 48%);
  --secondary-light: hsl(var(--secondary-hue), 95%, 60%);
  --secondary-glow: hsla(var(--secondary-hue), 85%, 48%, 0.2);
  
  --bg-main: hsl(206, 15%, 97%);
  --bg-surface: rgba(255, 255, 255, 0.75);
  --bg-card: rgba(255, 255, 255, 0.85);
  --border-color: rgba(0, 0, 0, 0.08);
  
  --text-main: hsl(210, 24%, 16%);
  --text-muted: hsl(210, 10%, 45%);
  --text-on-primary: hsl(0, 0%, 100%);
  
  --glass-shadow: 0 8px 32px 0 rgba(10, 30, 45, 0.05);
  --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.04), 0 2px 8px -2px rgba(0, 0, 0, 0.02);
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
  
  --blur-amount: 16px;
}

[data-theme="dark"] {
  /* Dark Mode Theme */
  --bg-main: hsl(206, 18%, 7%);
  --bg-surface: hsla(206, 18%, 12%, 0.75);
  --bg-card: hsla(206, 18%, 16%, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  
  --primary: hsl(var(--primary-hue), 65%, 42%);
  --primary-light: hsl(var(--primary-hue), 60%, 50%);
  --primary-glow: hsla(var(--primary-hue), 65%, 42%, 0.3);
  
  --secondary: hsl(var(--secondary-hue), 90%, 50%);
  --secondary-light: hsl(var(--secondary-hue), 100%, 65%);
  --secondary-glow: hsla(var(--secondary-hue), 90%, 50%, 0.35);
  
  --text-main: hsl(206, 15%, 92%);
  --text-muted: hsl(206, 10%, 65%);
  
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --card-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.25), 0 5px 15px -5px rgba(0, 0, 0, 0.15);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.5s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

button, input, select, textarea {
  font-family: inherit;
  outline: none;
  border: none;
}

/* --- Elegant Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--primary-glow);
  border-radius: 5px;
  border: 2px solid var(--bg-main);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* --- Global Utilities --- */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section-padding {
  padding: 6rem 0;
}

.text-center { text-align: center; }

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--secondary);
  border-radius: 2px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto 3.5rem auto;
}

/* Glassmorphic Panel Card */
.glass-panel {
  background: var(--bg-surface);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-smooth);
}

/* Premium Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  gap: 0.5rem;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-on-primary);
  box-shadow: 0 4px 14px 0 var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 var(--primary-glow);
}

.btn-secondary {
  background: var(--secondary);
  color: hsl(210, 24%, 10%);
  box-shadow: 0 4px 14px 0 var(--secondary-glow);
}

.btn-secondary:hover {
  background: var(--secondary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 var(--secondary-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--text-on-primary);
  transform: translateY(-2px);
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  z-index: 1000;
  transition: var(--transition-smooth);
}

.navbar.scrolled {
  background: var(--bg-surface);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--glass-shadow);
  height: 70px;
}

/* Transparent Navbar state over Hero */
.navbar:not(.scrolled) {
  background: transparent;
  box-shadow: none;
  border-bottom: 1px solid transparent;
}

.navbar:not(.scrolled) .nav-link,
.navbar:not(.scrolled) .logo-text h1 {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.navbar:not(.scrolled) .theme-toggle-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.navbar:not(.scrolled) .mobile-toggle span {
  background-color: #ffffff;
}

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

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo-text span {
  font-size: 0.75rem;
  color: var(--secondary);
  font-weight: 600;
  text-transform: uppercase;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--secondary);
  transition: var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: var(--primary-glow);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  font-size: 1.25rem;
  transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
  transform: rotate(15deg) scale(1.05);
  background: var(--primary);
  color: var(--text-on-primary);
}

/* Mobile Toggle Hamburger */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  cursor: pointer;
  background: transparent;
}

.mobile-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: var(--transition-fast);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  padding-top: 120px;
  padding-bottom: 80px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(8, 28, 38, 0.82) 0%, rgba(4, 14, 18, 0.88) 100%), url('assets/mi-bg.png') no-repeat center center / cover;
  text-align: center;
}

.hero-text-wrapper {
  max-width: 800px;
  margin: 0 auto;
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-tagline {
  background: rgba(255, 255, 255, 0.12);
  color: var(--secondary-light);
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.20);
}

[data-theme="dark"] .hero-tagline {
  color: var(--secondary-light);
  background: rgba(255, 255, 255, 0.08);
}

.hero-title {
  font-size: 3.75rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.hero-title span {
  color: var(--secondary-light);
  background: linear-gradient(120deg, #ffffff 30%, var(--secondary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 2.5rem;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Specific styling for outline button in hero so it has good contrast */
.hero .btn-outline {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.45);
}

.hero .btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
  color: #ffffff;
}

/* ==========================================================================
   SAMBUTAN KEPALA MADRASAH
   ========================================================================== */
.welcome-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 4rem;
  align-items: center;
}

.welcome-img-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.welcome-img {
  width: 100%;
  display: block;
  transition: var(--transition-smooth);
}

.welcome-img-card:hover .welcome-img {
  transform: scale(1.05);
}

.welcome-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0));
  color: #fff;
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  text-align: center;
}

.welcome-badge h3 {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
}

.welcome-badge p {
  color: var(--secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

.welcome-content h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.welcome-text {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.welcome-quote {
  font-style: italic;
  border-left: 4px solid var(--secondary);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-main);
}

.expandable-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
}

.expandable-content.expanded {
  max-height: 1000px;
  transition: max-height 0.8s ease-in-out;
}

.btn-readmore {
  margin-top: 1rem;
  background: transparent;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-readmore:hover {
  color: var(--secondary);
}

/* ==========================================================================
   STAT COUNTER SECTION
   ========================================================================== */
.stats {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--text-on-primary);
  position: relative;
}

[data-theme="dark"] .stats {
  background: linear-gradient(135deg, hsl(206, 30%, 12%), hsl(206, 40%, 8%));
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

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

.stat-card {
  text-align: center;
  padding: 2rem;
  transition: var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-icon {
  font-size: 2.5rem;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.fa-chalkboard-teacher {
  display: inline-block;
  transform: translateX(8px);
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  margin-bottom: 0.5rem;
  background: linear-gradient(to right, #fff, var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 1rem;
  opacity: 0.9;
  font-weight: 500;
}

/* ==========================================================================
   INTERACTIVE CURRICULUM ROADMAP
   ========================================================================== */
.curriculum-container {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.curriculum-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: var(--card-shadow);
  transition: var(--transition-smooth);
}

.tab-btn:hover {
  transform: translateY(-2px);
  color: var(--text-main);
  border-color: var(--primary-light);
}

.tab-btn.active {
  background: var(--primary);
  color: var(--text-on-primary);
  border-color: var(--primary);
  box-shadow: 0 4px 15px var(--primary-glow);
}

.curriculum-content {
  position: relative;
  min-height: 350px;
}

.curriculum-panel {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  animation: fadeIn 0.5s ease forwards;
}

.curriculum-panel.active {
  display: grid;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.curriculum-card {
  padding: 2rem;
  height: 100%;
}

.curriculum-card h4 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

[data-theme="dark"] .curriculum-card h4 {
  color: var(--secondary-light);
}

.curriculum-card ul {
  list-style: none;
}

.curriculum-card li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.curriculum-card li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--secondary);
  font-weight: bold;
}

/* ==========================================================================
   FILTERABLE GALLERY
   ========================================================================== */
.gallery-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.6rem 1.25rem;
  border-radius: 30px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-btn:hover {
  background: var(--primary-glow);
  color: var(--primary);
}

.filter-btn.active {
  background: var(--primary);
  color: var(--text-on-primary);
  border-color: var(--primary);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  aspect-ratio: 4/3;
  cursor: pointer;
  transition: var(--transition-smooth);
  animation: scaleUp 0.4s ease forwards;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 80%);
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  transition: var(--transition-smooth);
}

.gallery-item:hover {
  transform: translateY(-5px);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay h4 {
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.gallery-overlay p {
  color: var(--secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Modal Lightbox */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-wrapper {
  max-width: 900px;
  width: 90%;
  position: relative;
  transform: scale(0.95);
  transition: var(--transition-smooth);
}

.modal-overlay.active .modal-wrapper {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: transparent;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

.modal-content {
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
}

.modal-img {
  width: 100%;
  display: block;
  max-height: 500px;
  object-fit: cover;
}

.modal-body {
  padding: 2rem;
}

.modal-body h4 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.modal-body p {
  color: var(--text-muted);
}

/* ==========================================================================
   INTERACTIVE PPDB FEE ESTIMATOR (REMOVED)
   ========================================================================== */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.95rem;
}

.checkbox-input {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  accent-color: var(--primary);
}

/* ==========================================================================
   CONTACT & LOCATION
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 4rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.info-item {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.info-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: var(--primary-glow);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.info-details h4 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.info-details p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.map-container {
  border-radius: 20px;
  overflow: hidden;
  height: 250px;
  border: 1px solid var(--border-color);
  margin-top: 1.5rem;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.contact-card {
  padding: 3rem;
}

.contact-form textarea {
  resize: none;
  height: 150px;
}

.form-alert {
  display: none;
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  font-weight: 500;
  font-size: 0.9rem;
}

.form-alert.success {
  display: block;
  background: rgba(16, 185, 129, 0.15);
  color: hsl(150, 80%, 25%);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.form-alert.error {
  display: block;
  background: rgba(239, 68, 68, 0.15);
  color: hsl(0, 80%, 40%);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background: hsl(206, 40%, 10%);
  color: rgba(255,255,255,0.7);
  padding: 5rem 0 2rem 0;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.footer h3, .footer h4 {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.5fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-brand h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: var(--transition-smooth);
}

.social-link:hover {
  background: var(--secondary);
  color: hsl(210, 24%, 10%);
  transform: translateY(-2px);
}

.footer-links h4 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.footer-links h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 30px;
  height: 2px;
  background: var(--secondary);
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--secondary);
  padding-left: 5px;
}

.footer-contact h4 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.footer-contact h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 30px;
  height: 2px;
  background: var(--secondary);
}

.footer-contact-info {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
  font-size: 0.95rem;
}

.footer-contact-info li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  line-height: 1.5;
}

.footer-contact-info i {
  color: var(--secondary);
  font-size: 1.1rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   RESPONSIVENESS & MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-title { font-size: 2.75rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .curriculum-panel { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .ppdb-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .section-padding { padding: 4rem 0; }
  .navbar { height: 70px; }
  
  .mobile-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--bg-main);
    flex-direction: column;
    padding: 3rem 2rem;
    gap: 2rem;
    transition: var(--transition-smooth);
    overflow-y: auto;
    border-top: 1px solid var(--border-color);
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .hero-text-wrapper {
    text-align: center;
  }
  
  .hero-description {
    margin: 0 auto 2.5rem auto;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .welcome-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .stats-grid { grid-template-columns: 1fr; }
  .curriculum-panel { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* ==========================================================================
   PRINT MEDIA STYLE (FOR ESTIMATOR RECEIPT PRINTING)
   ========================================================================== */
@media print {
  body * {
    visibility: hidden;
  }
  .receipt-card, .receipt-card * {
    visibility: visible;
  }
  .receipt-card {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    border: none;
    box-shadow: none;
    background: #fff;
    color: #000;
  }
  .btn-print {
    display: none;
  }
}

/* --- Form Element Styles --- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  text-align: left;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-input, .form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.form-input:focus, .form-select:focus {
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ==========================================================================
   MULTI-PAGE ADDITIONS (NEWS listing, NEWS detail, and LOGIN page)
   ========================================================================== */

/* --- News Index Page (informasi.html) --- */
.search-section {
  padding-top: 120px;
  padding-bottom: 2rem;
  background: radial-gradient(circle at 10% 20%, var(--primary-glow) 0%, transparent 40%);
}

.search-box-wrapper {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.search-input-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
}

.search-box-wrapper .form-input {
  padding-left: 3.25rem;
  font-size: 1.05rem;
  box-shadow: var(--card-shadow);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 2rem;
}

.news-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: 20px;
}

.news-card-img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.news-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.news-card-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--primary);
  color: var(--text-on-primary);
  padding: 0.35rem 0.85rem;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.news-card:hover .news-card-img {
  transform: scale(1.05);
}

.news-card-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.news-card-meta span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.news-card-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.3;
  color: var(--text-main);
  transition: var(--transition-fast);
}

.news-card:hover .news-card-title {
  color: var(--primary);
}

.news-card-excerpt {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.news-card-link {
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.news-card-link:hover {
  color: var(--secondary);
}

/* --- News Detail Page (informasi-detail.html) --- */
.detail-section {
  padding-top: 120px;
}

.article-main-grid {
  display: grid;
  grid-template-columns: 2.2fr 0.8fr;
  gap: 4rem;
  align-items: start;
}

.article-header {
  margin-bottom: 2rem;
}

.article-title {
  font-size: 2.75rem;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  letter-spacing: -0.5px;
}

.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.article-meta-bar span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-featured-img {
  width: 100%;
  border-radius: 24px;
  box-shadow: var(--card-shadow);
  margin-bottom: 2.5rem;
}

.article-body-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-main);
}

.article-body-content p {
  margin-bottom: 1.5rem;
}

.article-body-content h3 {
  font-size: 1.75rem;
  margin: 2.5rem 0 1.25rem 0;
}

.article-body-content blockquote {
  font-style: italic;
  border-left: 4px solid var(--secondary);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0;
  font-size: 1.2rem;
  color: var(--primary);
  background: var(--primary-glow);
  border-radius: 0 12px 12px 0;
}

[data-theme="dark"] .article-body-content blockquote {
  color: var(--secondary-light);
}

.article-share-box {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.article-share-title {
  font-weight: 700;
  font-size: 0.95rem;
}

/* Sidebar styling */
.article-sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-widget {
  padding: 2rem;
}

.widget-title {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.widget-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 3px;
  background: var(--secondary);
  border-radius: 2px;
}

.recent-posts-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  list-style: none;
}

.recent-post-item {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.recent-post-thumb {
  width: 70px;
  height: 70px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.recent-post-info {
  display: flex;
  flex-direction: column;
}

.recent-post-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.recent-post-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-main);
}

.recent-post-title:hover {
  color: var(--primary);
}

/* --- Portal Login Page (login.html) --- */
.login-page-body {
  background: radial-gradient(circle at 50% 50%, hsl(206, 40%, 12%) 0%, hsl(206, 60%, 5%) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

[data-theme="light"] .login-page-body {
  background: radial-gradient(circle at 50% 50%, hsl(206, 30%, 95%) 0%, hsl(206, 20%, 85%) 100%);
}

.login-box {
  width: 100%;
  max-width: 480px;
  padding: 3rem 2.5rem;
}

.login-header-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header-logo .logo-icon {
  margin: 0 auto 1rem auto;
}

.login-header-logo h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.login-header-logo p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.role-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  padding: 0.25rem;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.role-tab-btn {
  background: transparent;
  padding: 0.6rem 0.5rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: center;
}

.role-tab-btn.active {
  background: var(--primary);
  color: var(--text-on-primary);
  box-shadow: 0 4px 10px var(--primary-glow);
}

/* Floating Label Inputs */
.form-floating-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.form-floating-input {
  width: 100%;
  padding: 1.25rem 1.25rem 0.75rem 1.25rem;
  border-radius: 12px;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 1rem;
  transition: var(--transition-fast);
}

.form-floating-label {
  position: absolute;
  left: 1.25rem;
  top: 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
  transition: var(--transition-fast);
  transform-origin: 0 0;
}

.form-floating-input:focus,
.form-floating-input:not(:placeholder-shown) {
  padding-top: 1.5rem;
  padding-bottom: 0.5rem;
}

.form-floating-input:focus ~ .form-floating-label,
.form-floating-input:not(:placeholder-shown) ~ .form-floating-label {
  transform: translateY(-8px) scale(0.75);
  color: var(--primary);
}

.form-floating-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Autofill styling to match dark/light theme */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--bg-main) inset !important;
  -webkit-text-fill-color: var(--text-main) !important;
  transition: background-color 5000s ease-in-out 0s;
}

.password-toggle-wrapper {
  position: relative;
}

.password-toggle-btn {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
}

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

.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  font-size: 0.85rem;
}

.login-options a {
  color: var(--primary);
  font-weight: 500;
}

.login-options a:hover {
  color: var(--secondary);
}

.btn-login {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
}

.login-box-footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.875rem;
}

.login-box-footer a {
  color: var(--primary);
  font-weight: 600;
}

.login-box-footer a:hover {
  color: var(--secondary);
}

/* --- Responsive updates --- */
@media (max-width: 992px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .article-main-grid { grid-template-columns: 1fr; gap: 3rem; }
}

@media (max-width: 600px) {
  .news-grid { grid-template-columns: 1fr; }
  .article-title { font-size: 2rem; }
  .login-box { padding: 2.5rem 1.5rem; }
}

