/* ==========================================================================
   PAI DIGITAL — BESPOKE VVIP LUXURY DESIGN SYSTEM
   Madrasah Aliyah Mambaul Ulum Bata-Bata
   Ultra-Refined Emerald Obsidian & Imperial Gold Aesthetic (NO AI SLOP)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,600&family=Amiri:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  /* Emerald Core Palette */
  --primary: #0a5c36;
  --primary-dark: #053b22;
  --primary-deep: #032616;
  --primary-light: #16a34a;
  --primary-glow: rgba(22, 163, 74, 0.25);
  --primary-soft: rgba(10, 92, 54, 0.08);

  /* Imperial Madrasah Gold */
  --gold: #c59b27;
  --gold-light: #e5c158;
  --gold-dark: #9a7516;
  --gold-soft: rgba(197, 155, 39, 0.12);
  --gold-border: rgba(197, 155, 39, 0.32);
  --gold-glow: rgba(197, 155, 39, 0.28);

  /* Functional Accents */
  --secondary: #8f2940;
  --accent: #c59b27;
  --success: #15803d;
  --success-bg: #dcfce7;
  --danger: #b91c1c;
  --danger-bg: #fee2e2;
  --warning: #b45309;
  --warning-bg: #fef3c7;
  --info: #1d4ed8;
  --info-bg: #dbeafe;

  /* Atmospheric Light Canvas */
  --bg: #f8f6f0;
  --bg-card: #ffffff;
  --bg-card-subtle: #fbf9f4;
  --bg-soft: #ede8dc;
  --text: #132219;
  --text-muted: #5e6d63;
  --border: #e2dcd0;
  --border-focus: #c59b27;

  /* Elevation & Geometry */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 9999px;

  --shadow-sm: 0 2px 8px rgba(10, 45, 28, 0.04);
  --shadow: 0 10px 30px -4px rgba(10, 45, 28, 0.07), 0 4px 12px -2px rgba(10, 45, 28, 0.03);
  --shadow-lg: 0 24px 50px -10px rgba(10, 45, 28, 0.14), 0 10px 20px -5px rgba(10, 45, 28, 0.06);
  --shadow-gold: 0 12px 32px -6px rgba(197, 155, 39, 0.28);

  --transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-arabic: 'Amiri', serif;
}

[data-theme="dark"] {
  --bg: #07150f;
  --bg-card: #0d231a;
  --bg-card-subtle: #122c21;
  --bg-soft: #163629;
  --text: #edf5f0;
  --text-muted: #9bb0a3;
  --border: #1b4332;
  --border-focus: #e5c158;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow: 0 10px 30px -4px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 50px -10px rgba(0, 0, 0, 0.55);
}

/* ================= RESET & BASE ================= */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}

body::selection {
  background: var(--primary);
  color: #ffffff;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition), transform var(--transition);
}

a:hover {
  color: var(--primary-light);
}

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

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

/* ================= TYPOGRAPHY ================= */

h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.font-serif {
  font-family: var(--font-serif);
}

.font-arabic {
  font-family: var(--font-arabic);
}

.gradient-text {
  background: linear-gradient(135deg, #0a5c36 0%, #16a34a 50%, #c59b27 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

[data-theme="dark"] .gradient-text {
  background: linear-gradient(135deg, #22c55e 0%, #86efac 40%, #e5c158 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ================= BUTTONS ================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.65rem 1.35rem;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition), color var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 20px -4px rgba(10, 92, 54, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  color: #ffffff;
  box-shadow: 0 12px 26px -4px rgba(10, 92, 54, 0.45);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px -2px rgba(10, 92, 54, 0.3);
}

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

.btn-outline:hover {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 6px 18px -3px rgba(10, 92, 54, 0.25);
}

[data-theme="dark"] .btn-outline {
  color: #86efac;
  border-color: #16a34a;
}

[data-theme="dark"] .btn-outline:hover {
  background: #16a34a;
  color: #061912;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #ffffff;
  box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  color: #ffffff;
}

.btn-lg {
  min-height: 52px;
  padding: 0.85rem 1.85rem;
  font-size: 0.975rem;
  border-radius: var(--radius);
}

.btn-sm {
  min-height: 36px;
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  border-radius: var(--radius-xs);
}

.btn-block {
  width: 100%;
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
}

.btn-success {
  background: var(--success);
  color: #ffffff;
}

/* ================= NAVBAR ================= */

.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  background: rgba(248, 246, 240, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
}

[data-theme="dark"] .navbar {
  background: rgba(7, 21, 15, 0.85);
  border-bottom-color: var(--border);
}

.navbar.scrolled {
  box-shadow: var(--shadow);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--text);
}

.logo-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 50%;
  padding: 2px;
  box-shadow: 0 4px 12px rgba(10, 92, 54, 0.15);
  border: 1.5px solid var(--gold);
}

.logo-text {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
  display: flex;
  flex-direction: column;
}

[data-theme="dark"] .logo-text {
  color: #86efac;
}

.logo-sub {
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--gold);
  margin-top: 1px;
}

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

.nav-menu a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
  padding: 0.35rem 0;
}

.nav-menu a:hover {
  color: var(--primary);
}

[data-theme="dark"] .nav-menu a:hover {
  color: #86efac;
}

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

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition), border-color var(--transition);
}

.theme-toggle:hover {
  transform: scale(1.05);
  border-color: var(--gold);
}

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

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ================= HERO SECTION ================= */

.hero {
  position: relative;
  padding: 150px 0 90px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 20%, rgba(10, 92, 54, 0.08) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(197, 155, 39, 0.08) 0%, transparent 45%);
  pointer-events: none;
  z-index: 0;
}

[data-theme="dark"] .hero-bg {
  background: radial-gradient(circle at 10% 20%, rgba(16, 163, 74, 0.12) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(197, 155, 39, 0.10) 0%, transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  align-items: center;
  gap: 48px;
}

.hero-text .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--gold-soft);
  border: 1px solid var(--gold-border);
  color: var(--gold-dark);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

[data-theme="dark"] .hero-text .badge {
  color: var(--gold-light);
}

.hero-text h1 {
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
}

.hero-text p {
  font-size: 1.075rem;
  color: var(--text-muted);
  max-width: 580px;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.75rem;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.hero-stats .stat strong {
  display: block;
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}

[data-theme="dark"] .hero-stats .stat strong {
  color: #86efac;
}

.hero-stats .stat span {
  font-size: 0.825rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Hero Visual / Card */
.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  transform: perspective(1000px) rotateY(-4deg) rotateX(3deg);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.hero-card:hover {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
  box-shadow: 0 30px 60px -10px rgba(10, 92, 54, 0.22);
}

.hero-card-header {
  padding: 16px 20px;
  background: var(--bg-card-subtle);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

.hero-pill-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(22, 163, 74, 0.12);
  border: 1px solid rgba(22, 163, 74, 0.25);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-light);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 8px #16a34a;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero-card-body {
  padding: 28px;
}

.mini-progress {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.mini-progress-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini-progress-item span {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  justify-content: space-between;
}

.mini-progress-item .bar {
  height: 8px;
  background: var(--bg-soft);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.mini-progress-item .bar div {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  transition: width 1s ease;
}

.mini-progress-item:nth-child(2) .bar div {
  background: linear-gradient(90deg, #b45309 0%, #f59e0b 100%);
}

.mini-progress-item:nth-child(3) .bar div {
  background: linear-gradient(90deg, #1d4ed8 0%, #3b82f6 100%);
}

.mini-progress-item:nth-child(4) .bar div {
  background: linear-gradient(90deg, #8f2940 0%, #ec4899 100%);
}

.xp-badge {
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--gold-soft) 0%, rgba(197, 155, 39, 0.04) 100%);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 14px;
}

.xp-badge-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(197, 155, 39, 0.35);
  flex-shrink: 0;
}

.xp-badge strong {
  display: block;
  font-size: 0.92rem;
  color: var(--text);
}

.xp-badge span {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ================= FEATURES SECTION ================= */

.section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}

.section-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid rgba(10, 92, 54, 0.2);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

[data-theme="dark"] .section-badge {
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.2);
}

.section-header h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 0.85rem;
  letter-spacing: -0.025em;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--gold) 100%);
  opacity: 0;
  transition: opacity var(--transition);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: var(--gold-border);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 58px;
  height: 58px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(10, 92, 54, 0.12) 0%, rgba(197, 155, 39, 0.14) 100%);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border: 1px solid rgba(197, 155, 39, 0.28);
  box-shadow: 0 6px 16px rgba(10, 92, 54, 0.08);
  transition: transform var(--transition), background var(--transition), color var(--transition);
}

.feature-card:hover .feature-icon {
  transform: scale(1.08) rotate(3deg);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #ffffff;
  border-color: var(--gold);
}

.feature-icon svg {
  width: 26px;
  height: 26px;
  stroke-width: 2.2;
}

[data-theme="dark"] .feature-icon {
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.2) 0%, rgba(197, 155, 39, 0.2) 100%);
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.25);
}

.feature-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* ================= AUTH PAGES (LOGIN / REGISTER) ================= */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: radial-gradient(circle at 10% 10%, rgba(10, 92, 54, 0.15) 0%, transparent 45%),
              radial-gradient(circle at 90% 90%, rgba(197, 155, 39, 0.12) 0%, transparent 50%),
              var(--bg);
}

.auth-container {
  width: 100%;
  max-width: 480px;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--gold) 50%, var(--primary-light) 100%);
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-header .logo {
  justify-content: center;
  margin-bottom: 16px;
}

.auth-header .logo-img {
  width: 72px;
  height: 72px;
  padding: 3px;
}

.auth-header h1 {
  font-size: 1.65rem;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

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

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: left;
}

.form-group label {
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
}

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 0.65rem 1rem;
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-card-subtle);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

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

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
  border-color: #86efac;
  box-shadow: 0 0 0 4px rgba(134, 239, 172, 0.15);
}

textarea.form-control {
  min-height: 96px;
  resize: vertical;
}

.auth-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-footer a {
  font-weight: 700;
}

.demo-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.demo-pill {
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.demo-pill:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary);
}

/* ================= ALERTS ================= */

.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  border: 1px solid transparent;
}

.alert-success {
  background: var(--success-bg);
  color: #14532d;
  border-color: #86efac;
}

.alert-error, .alert-danger {
  background: var(--danger-bg);
  color: #7f1d1d;
  border-color: #fca5a5;
}

.alert-warning {
  background: var(--warning-bg);
  color: #78350f;
  border-color: #fcd34d;
}

.alert-info {
  background: var(--info-bg);
  color: #1e3a8a;
  border-color: #93c5fd;
}

[data-theme="dark"] .alert-success {
  background: rgba(22, 163, 74, 0.2);
  color: #86efac;
  border-color: rgba(22, 163, 74, 0.4);
}

[data-theme="dark"] .alert-error {
  background: rgba(220, 38, 38, 0.2);
  color: #fca5a5;
  border-color: rgba(220, 38, 38, 0.4);
}

/* ================= MAPEL SECTION ================= */

.section-alt {
  background: var(--bg-card-subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.mapel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.mapel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.mapel-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gold);
}

.mapel-icon {
  width: 68px;
  height: 68px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary-soft) 0%, rgba(197, 155, 39, 0.12) 100%);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  border: 1.5px solid var(--gold-border);
  box-shadow: 0 6px 18px rgba(10, 92, 54, 0.08);
  transition: transform var(--transition), background var(--transition), color var(--transition);
}

.mapel-card:hover .mapel-icon {
  transform: scale(1.1) rotate(-3deg);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #ffffff;
  border-color: var(--gold);
}

.mapel-icon svg {
  width: 32px;
  height: 32px;
  stroke-width: 2.2;
}

[data-theme="dark"] .mapel-icon {
  color: #86efac;
}

.mapel-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.mapel-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ================= TESTIMONI SECTION ================= */

.testimoni-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.testimoni-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform var(--transition);
}

.testimoni-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-border);
}

.stars-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stars-row .star-fill {
  width: 18px;
  height: 18px;
  fill: #f59e0b;
  color: #f59e0b;
}

.stars {
  color: #f59e0b;
  font-size: 1.15rem;
  letter-spacing: 2px;
}

.testimoni-card p {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.7;
  font-style: italic;
  flex: 1;
}

.testimoni-author strong {
  display: block;
  font-size: 0.95rem;
  color: var(--primary);
}

.testimoni-author span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ================= CTA BOX ================= */

.cta-box {
  background: linear-gradient(135deg, #073822 0%, #0c5636 60%, #157347 100%);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-xl);
  padding: 64px 40px;
  text-align: center;
  color: #ffffff;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.cta-box h2 {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  color: #ffffff;
  margin-bottom: 12px;
  font-weight: 800;
}

.cta-box p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 32px;
}

/* ================= FOOTER ================= */

.footer {
  background: #041a11;
  color: #edf5f0;
  padding: 70px 0 30px;
  border-top: 1px solid rgba(197, 155, 39, 0.2);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-brand .logo-text {
  color: #86efac;
}

.footer-brand p {
  color: #9bb0a3;
  font-size: 0.875rem;
  margin-top: 14px;
  max-width: 320px;
  line-height: 1.65;
}

.footer-links h4 {
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-light);
  margin-bottom: 18px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: #9bb0a3;
  font-size: 0.875rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: #86efac;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.825rem;
  color: #7d9486;
}

/* ================= RESPONSIVE ================= */

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

@media (max-width: 992px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-text p {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-cta {
    justify-content: center;
  }
  .hero-stats {
    justify-content: center;
  }
  .hero-card {
    max-width: 520px;
    margin: 0 auto;
    transform: none;
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    display: none;
  }
  .nav-menu.active {
    display: flex;
  }
  .hamburger {
    display: flex;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 110px 0 60px;
  }
  .hero-stats {
    flex-direction: column;
    gap: 16px;
  }
}

/* ===== LUXURY POLISH (VVIP) ===== */
::selection {
  background: var(--primary);
  color: #ffffff;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(10, 92, 54, 0.25);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(10, 92, 54, 0.45);
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(134, 239, 172, 0.2);
}
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(134, 239, 172, 0.4);
}


/* ========================================================================
   MAJESTIC ISLAMIC EDITION
   Editorial hierarchy, restrained ornament, and the madrasah seal as anchor.
   ======================================================================== */
:root {
  --ink: #10251b;
  --paper: #f7f2e8;
  --paper-deep: #eee6d6;
  --emerald: #073b29;
  --emerald-2: #0b5b3b;
  --brass: #b99245;
  --brass-bright: #d6b86a;
  --line: rgba(116, 86, 31, .22);
  --gold-border: rgba(185, 146, 69, .42);
}

body {
  background-color: var(--paper);
  background-image: radial-gradient(rgba(7,59,41,.055) .7px, transparent .7px);
  background-size: 7px 7px;
}

[data-theme="dark"] body { background-color: #071811; }

.navbar {
  background: rgba(247, 242, 232, .88);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 30px rgba(16, 37, 27, .04);
}

.navbar.scrolled { box-shadow: 0 14px 34px rgba(16, 37, 27, .10); }

.logo-img {
  width: 52px;
  height: 52px;
  padding: 3px;
  border: 1px solid var(--brass);
  box-shadow: 0 0 0 4px rgba(185,146,69,.10), 0 8px 18px rgba(16,37,27,.12);
}

.logo-text { letter-spacing: .01em; }

.hero {
  min-height: 780px;
  padding-top: 170px;
  background:
    linear-gradient(90deg, rgba(247,242,232,.98) 0%, rgba(247,242,232,.90) 58%, rgba(238,230,214,.72) 100%),
    radial-gradient(circle at 84% 18%, rgba(185,146,69,.18), transparent 24%);
}

.hero-bg {
  opacity: .7;
  background:
    linear-gradient(30deg, transparent 48%, rgba(185,146,69,.16) 49%, transparent 50%) 0 0 / 42px 42px,
    linear-gradient(150deg, transparent 48%, rgba(7,59,41,.11) 49%, transparent 50%) 0 0 / 42px 42px;
  mask-image: linear-gradient(90deg, transparent, black 20%, black 75%, transparent);
}

.hero-content { gap: 72px; }
.hero-text h1 { font-family: var(--font-serif); font-size: clamp(3rem, 5.5vw, 5.2rem); font-weight: 700; letter-spacing: -.055em; }
.hero-text h1 .gradient-text { color: var(--emerald-2); }
.hero-text p { max-width: 600px; color: #5a685f; }
.hero-text .badge { background: rgba(185,146,69,.10); border-color: var(--gold-border); color: #8a6827; }

.hero-card {
  border-radius: 26px 6px 26px 6px;
  border-color: var(--gold-border);
  box-shadow: 18px 18px 0 rgba(185,146,69,.13), 0 28px 60px rgba(16,37,27,.16);
  transform: perspective(1200px) rotateY(-5deg) rotateX(2deg);
}
.hero-card::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(185,146,69,.25);
  border-radius: 18px 2px 18px 2px;
  pointer-events: none;
}
.hero-card-header, .hero-card-body { position: relative; z-index: 1; }
.hero-card-header { background: #f3ecdd; }
.hero-card-body { background: linear-gradient(145deg, #fffdf8, #f6efdf); }
.xp-badge { border-radius: 4px 16px 4px 16px; }

.section { padding: 118px 0; }
.section-header { max-width: 760px; }
.section-badge { background: transparent; border: 0; border-bottom: 1px solid var(--brass); border-radius: 0; color: #8a6827; padding: 0 0 8px; }
.section-header h2 { font-family: var(--font-serif); font-size: clamp(2.2rem, 4vw, 3.4rem); }

.feature-card, .mapel-card, .testimoni-card, .auth-card {
  border-radius: 4px 18px 4px 18px;
  border-color: var(--gold-border);
}
.feature-card { background: rgba(255,255,255,.58); }
.feature-card::after, .mapel-card::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(185,146,69,.16);
  border-radius: 2px 12px 2px 12px;
  pointer-events: none;
}
.feature-card:hover, .mapel-card:hover, .testimoni-card:hover { border-color: var(--brass); }
.feature-icon, .mapel-icon { border-radius: 3px 12px 3px 12px; }
.mapel-card { position: relative; overflow: hidden; }
.mapel-card h3, .feature-card h3 { font-family: var(--font-serif); font-size: 1.3rem; }

.cta-box { border-radius: 4px 26px 4px 26px; border-color: var(--brass); }
.footer { border-top-color: var(--brass); }

@media (max-width: 992px) {
  .hero { min-height: auto; }
  .hero-card { transform: none; }
}

/* ========================================================================
   LANDING / PORTAL ENTRY - QUIET LUXURY
   Keep the first impression concise and action-oriented.
   ======================================================================== */
.hero {
  min-height: 680px;
  padding: 138px 0 72px;
}
.hero-content { grid-template-columns: minmax(0, 1.05fr) minmax(320px, .75fr); gap: 54px; }
.hero-text h1 { font-size: clamp(2.7rem, 5vw, 4.6rem); max-width: 620px; }
.hero-text p { font-size: .98rem; max-width: 560px; }
.hero-card { max-width: 490px; margin-left: auto; }
.section { padding: 82px 0; }
#fitur .section-header { margin-bottom: 34px; }
#fitur .features-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
#fitur .feature-card { min-height: 210px; padding: 26px 24px; }
#mapel .mapel-grid { gap: 16px; }
#testimoni, .nav-menu li:nth-child(3) { display: none; }
.cta-section { padding-top: 28px; }
.cta-box { padding: 48px 42px; }

@media (max-width: 900px) {
  .hero { padding-top: 118px; }
  .hero-content { grid-template-columns: 1fr; }
  .hero-card { margin: 0 auto; }
  #fitur .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .hero { padding-bottom: 54px; }
  .hero-text h1 { font-size: clamp(2.55rem, 13vw, 3.8rem); }
  #fitur .features-grid { grid-template-columns: 1fr; }
  .cta-box { padding: 36px 24px; }
}

/* ========================================================================
   FINAL SIMPLE LANDING
   ======================================================================== */
.hero { min-height: auto; padding: 142px 0 76px; background: var(--bg); }
.hero-bg { display: none; }
.hero-content { grid-template-columns: minmax(0, 1.05fr) minmax(300px, .72fr); gap: 48px; }
.hero-text h1 { max-width: 620px; font-size: clamp(2.65rem, 5vw, 4.4rem); }
.hero-card { transform: none; border-radius: 18px; box-shadow: 0 18px 45px rgba(16,37,27,.10); }
.hero-card::after, .feature-card::after, .mapel-card::after { display: none; }
.hero-card:hover { transform: translateY(-3px); box-shadow: 0 22px 50px rgba(16,37,27,.13); }
.hero-card-header, .hero-card-body { background: var(--bg-card); }
.feature-card, .mapel-card { border-radius: 14px; }
.feature-card { min-height: 0 !important; }
.feature-icon, .mapel-icon { border-radius: 12px; }
.section { padding: 76px 0; }
.section-header { margin-bottom: 34px; }
#layanan .features-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cta-box { border-radius: 18px; padding: 46px 36px; }
.footer { padding: 28px 0; }
.footer-bottom { padding-top: 0; border-top: 0; }
@media (max-width: 900px) {
  .hero-content { grid-template-columns: 1fr; }
  .hero-card { max-width: none; margin: 0; }
  #layanan .features-grid { grid-template-columns: 1fr; }
}
