/* ==========================================================================
   CSS TÙY CHỈNH CHO GIAO DIỆN K-EDUCATION HUB - PREMIUM MINIMALIST
   ========================================================================== */

@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');

/* SYSTEM DESIGN TOKENS (LIGHT THEME) */
:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-title: 'Outfit', var(--font-sans);

  /* Colors */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-glow: rgba(37, 99, 235, 0.12);
  
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-nav: #0b0f19;
  --bg-tertiary: #f1f5f9;
  
  --text-main: #1e293b;
  --text-title: #0f172a;
  --text-muted: #64748b;
  --text-nav: #cbd5e1;
  --text-nav-hover: #38bdf8;
  
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  
  /* Shadows & Radius */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* Glassmorphism Styles */
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(226, 232, 240, 0.8);
  --glass-blur: blur(12px);

  /* Neon Subject Colors */
  --grad-math: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
  --grad-chem: linear-gradient(90deg, #10b981 0%, #34d399 100%);
  --grad-alevel: linear-gradient(90deg, #8b5cf6 0%, #a78bfa 100%);
  --grad-sat: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
  --grad-igcse: linear-gradient(90deg, #ec4899 0%, #f472b6 100%);
  --grad-others: linear-gradient(90deg, #64748b 0%, #94a3b8 100%);

  /* Quarto Callouts */
  --callout-note-bg: #eff6ff;
  --callout-note-border: #3b82f6;
  --callout-tip-bg: #ecfdf5;
  --callout-tip-border: #10b981;
  --callout-warning-bg: #fffbeb;
  --callout-warning-border: #f59e0b;
}

/* SYSTEM DESIGN TOKENS (DARK THEME OVERRIDES) */
body.quarto-dark {
  --primary: #38bdf8;
  --primary-hover: #7dd3fc;
  --primary-glow: rgba(56, 189, 248, 0.18);
  
  --bg-page: #080d16;
  --bg-card: #111827;
  --bg-card-hover: #1e293b;
  --bg-nav: #05070c;
  --bg-tertiary: #1f2937;
  
  --text-main: #cbd5e1;
  --text-title: #f8fafc;
  --text-muted: #64748b;
  
  --border: #1e293b;
  --border-hover: #334155;
  
  --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.45);
  
  --glass-bg: rgba(17, 24, 39, 0.75);
  --glass-border: rgba(30, 41, 59, 0.85);

  --grad-math: linear-gradient(90deg, #3b82f6 0%, #00f2fe 100%);
  --grad-chem: linear-gradient(90deg, #10b981 0%, #00f5a0 100%);
  --grad-alevel: linear-gradient(90deg, #7c3aed 0%, #c084fc 100%);
  --grad-sat: linear-gradient(90deg, #d97706 0%, #fbbf24 100%);
  --grad-igcse: linear-gradient(90deg, #db2777 0%, #f472b6 100%);

  --callout-note-bg: rgba(59, 130, 246, 0.08);
  --callout-note-border: #3b82f6;
  --callout-tip-bg: rgba(16, 185, 129, 0.08);
  --callout-tip-border: #10b981;
  --callout-warning-bg: rgba(245, 158, 11, 0.08);
  --callout-warning-border: #f59e0b;
}

/* GLOBAL RESET & BASICS */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: var(--bg-page);
  line-height: 1.625;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* TYPOGRAPHY */
h1, h2, h3, h4 {
  font-family: var(--font-title);
  color: var(--text-title);
  font-weight: 700;
  letter-spacing: -0.025em;
  transition: color 0.3s ease;
}

h1 {
  font-size: 2.25rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.6rem;
  margin-top: 2.5rem;
}

h2 {
  font-size: 1.65rem;
  margin-top: 2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
}

h3 {
  font-size: 1.25rem;
}

/* NAVBAR BEAUTIFICATION */
.navbar {
  font-family: var(--font-title);
  background-color: var(--bg-nav) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.75rem 1.5rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.navbar-brand {
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff !important;
  font-size: 1.25rem;
}

.nav-link {
  font-weight: 500;
  color: var(--text-nav) !important;
  transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0.4rem 0.8rem !important;
}

.nav-link:hover, .nav-link:focus {
  color: var(--text-nav-hover) !important;
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.navbar-toggler-icon {
  filter: invert(1);
}

.dropdown-menu {
  background-color: var(--bg-nav) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 0.4rem !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.dropdown-item {
  color: var(--text-nav) !important;
  border-radius: var(--radius-sm) !important;
  padding: 0.5rem 1rem !important;
  font-size: 0.9rem !important;
  transition: all 0.2s ease !important;
}

.dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-nav-hover) !important;
  transform: translateX(2px);
}

.dropdown-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* HERO BANNER SECTION */
.hero-banner {
  position: relative;
  background: radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.12) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 45%),
              linear-gradient(135deg, #0e1626 0%, #050811 100%);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
  margin-bottom: 2.5rem;
  color: #ffffff;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  text-align: center;
}

body.quarto-dark .hero-banner {
  background: radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.15) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(167, 139, 250, 0.12) 0%, transparent 45%),
              linear-gradient(135deg, #060911 0%, #010204 100%);
  border-color: rgba(56, 189, 248, 0.15);
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.02) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-top: 0;
  border-bottom: none;
  color: #ffffff;
  letter-spacing: -0.03em;
  background: linear-gradient(to right, #ffffff, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  line-height: 1.3;
}

.hero-content p {
  font-size: 1.1rem;
  color: #94a3b8;
  max-width: 780px;
  margin: 1.25rem auto 0 auto;
  line-height: 1.625;
}

/* ACADEMIC GATEWAYS & PROGRAM CARDS */
.gateway-grid, .program-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.gateway-card, .program-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* Neon Top Border line */
.gateway-card::before, .program-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--grad-math);
  transition: height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}

.gateway-card:hover, .program-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 30px -10px var(--primary-glow), var(--shadow-lg);
  border-color: var(--primary);
  background-color: var(--bg-card-hover);
}

.gateway-card:hover::before, .program-card:hover::before {
  height: 6px;
}

.gateway-card h3, .program-card h3 {
  font-size: 1.3rem;
  margin-top: 0.3rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: var(--text-title);
}

.gateway-card p, .program-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.3rem;
}

/* Neon indicators matching the disciplines */
.math-card::before { background: var(--grad-math); }
.chem-card::before { background: var(--grad-chem); }
.alevel-card::before { background: var(--grad-alevel); }
.sat-card::before { background: var(--grad-sat); }
.igcse-card::before { background: var(--grad-igcse); }
.others-card::before { background: var(--grad-others); }

.math-card:hover { border-color: rgba(59, 130, 246, 0.4); box-shadow: 0 15px 30px -10px rgba(59, 130, 246, 0.2), var(--shadow-lg); }
.chem-card:hover { border-color: rgba(16, 185, 129, 0.4); box-shadow: 0 15px 30px -10px rgba(16, 185, 129, 0.2), var(--shadow-lg); }
.alevel-card:hover { border-color: rgba(139, 92, 246, 0.4); box-shadow: 0 15px 30px -10px rgba(139, 92, 246, 0.2), var(--shadow-lg); }
.sat-card:hover { border-color: rgba(245, 158, 11, 0.4); box-shadow: 0 15px 30px -10px rgba(245, 158, 11, 0.2), var(--shadow-lg); }
.igcse-card:hover { border-color: rgba(236, 72, 153, 0.4); box-shadow: 0 15px 30px -10px rgba(236, 72, 153, 0.2), var(--shadow-lg); }
.others-card:hover { border-color: rgba(100, 116, 139, 0.4); box-shadow: 0 15px 30px -10px rgba(100, 116, 139, 0.2), var(--shadow-lg); }

/* LINK & GATEWAY BUTTONS */
.btn-gateway, .gateway-card a, .program-card a {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none !important;
  color: var(--primary) !important;
  margin-top: auto;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  gap: 0.25rem;
}

.btn-gateway:hover, .gateway-card a:hover, .program-card a:hover {
  color: var(--primary-hover) !important;
  transform: translateX(4px);
}

/* QUARTO CALLOUT BLOCKS */
.callout {
  border-left-width: 4px !important;
  border-radius: var(--radius-sm) !important;
  padding: 1.1rem 1.25rem !important;
  margin: 1.75rem 0 !important;
  border-top: none !important;
  border-right: none !important;
  border-bottom: none !important;
  box-shadow: var(--shadow-sm) !important;
  background-color: var(--bg-card) !important;
}

.callout-note {
  border-left-color: var(--callout-note-border) !important;
  background-color: var(--callout-note-bg) !important;
}

.callout-tip {
  border-left-color: var(--callout-tip-border) !important;
  background-color: var(--callout-tip-bg) !important;
}

.callout-warning {
  border-left-color: var(--callout-warning-border) !important;
  background-color: var(--callout-warning-bg) !important;
}

.callout-header {
  font-family: var(--font-title) !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  color: var(--text-title) !important;
  margin-bottom: 0.4rem !important;
}

.callout-title-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.callout-body {
  font-size: 0.95rem !important;
  line-height: 1.6 !important;
  color: var(--text-main) !important;
}

/* LATEX MATH EQUATIONS */
.math {
  overflow-x: auto;
  padding: 1.25rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.03);
}

/* ACCORDIONS (qmd-accordion) */
.qmd-accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  background: var(--bg-card);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.3s ease;
}

.qmd-accordion-header {
  padding: 1rem 1.25rem;
  background: var(--bg-tertiary);
  font-family: var(--font-title);
  font-weight: 600;
  color: var(--text-title);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease, color 0.2s ease;
}

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

.qmd-accordion-content {
  padding: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.6;
  background-color: var(--bg-card);
}

/* DOWNLOAD BOX */
.download-box {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-md);
}

.btn-group-download {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1rem;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.2rem;
  color: var(--text-title) !important;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-download:hover {
  background: var(--border);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--primary) !important;
}

/* Study notes unique gradient top bar */
.notes-card::before {
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
}

/* Topical past papers top bar */
.topic-card::before {
  background: linear-gradient(90deg, #3b82f6, #ec4899);
}

/* Practice Questions loading/waiting state */
.practice-box-waiting {
  background: var(--bg-tertiary);
  border: 2px dashed var(--border-hover);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  margin: 2rem 0;
  transition: border-color 0.3s ease;
}

/* PAST PAPER SEARCH ENGINE & FORM LAYOUTS */
.search-engine-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2.5rem 0;
  box-shadow: var(--shadow-md);
}

.search-form-mock {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.form-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.form-group {
  flex: 1;
  min-width: 250px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-title);
}

.form-control {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-main);
  width: 100%;
  box-sizing: border-box;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-control:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-glow);
  background-color: var(--bg-card);
}

.btn-search-submit {
  background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
  color: #ffffff !important;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.75rem;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.15);
}

.btn-search-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(37, 99, 235, 0.25);
  filter: brightness(1.05);
}

.search-result-container {
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.result-item-mock {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  transition: all 0.2s ease;
}

.result-item-mock:hover {
  border-color: var(--border-hover);
  background-color: var(--bg-tertiary);
}

/* PREMIUM DESIGN SYSTEM BADGES */
.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-year { 
  background: rgba(37, 99, 235, 0.08); 
  color: #1d4ed8; 
  border: 1px solid rgba(37, 99, 235, 0.15);
}
.badge-paper { 
  background: rgba(16, 185, 129, 0.08); 
  color: #065f46; 
  border: 1px solid rgba(16, 185, 129, 0.15);
}
.badge-tz { 
  background: rgba(245, 158, 11, 0.08); 
  color: #b45309; 
  border: 1px solid rgba(245, 158, 11, 0.15);
}

body.quarto-dark .badge-year { 
  background: rgba(56, 189, 248, 0.1); 
  color: #38bdf8; 
  border-color: rgba(56, 189, 248, 0.2);
}
body.quarto-dark .badge-paper { 
  background: rgba(45, 212, 191, 0.1); 
  color: #2dd4bf; 
  border-color: rgba(45, 212, 191, 0.2);
}
body.quarto-dark .badge-tz { 
  background: rgba(251, 146, 60, 0.1); 
  color: #fb923c; 
  border-color: rgba(251, 146, 60, 0.2);
}

.result-link {
  font-weight: 500;
  color: var(--primary) !important;
  text-decoration: none !important;
  transition: color 0.2s ease;
}

.result-link:hover {
  text-decoration: underline !important;
  color: var(--primary-hover) !important;
}

/* PREMIUM TABLE LAYOUT */
.table-wrapper {
  overflow-x: auto;
  margin-top: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.premium-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background-color: var(--bg-card);
  text-align: left;
}

.premium-table th {
  background-color: var(--bg-tertiary);
  font-family: var(--font-title);
  font-weight: 600;
  color: var(--text-title);
  padding: 0.9rem 1.1rem;
  border-bottom: 2px solid var(--border);
}

.premium-table td {
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text-main);
}

.premium-table tr:last-child td {
  border-bottom: none;
}

.premium-table tr {
  transition: background-color 0.2s ease;
}

.premium-table tr:hover {
  background-color: rgba(37, 99, 235, 0.02);
}

body.quarto-dark .premium-table tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Table Filter controls */
.table-filter-box {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.25rem;
  margin-top: 1.5rem;
}

.table-filter-wrapper {
  position: relative;
  width: 100%;
  max-width: 320px;
}

.table-filter-input {
  width: 100%;
  padding: 0.55rem 1rem 0.55rem 2.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  background-color: var(--bg-card);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  color: var(--text-main);
}

.table-filter-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.table-filter-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* NATIVE QUARTO PAGE LAYOUT & TOC ENHANCEMENTS */
#TOC {
  border-left: 1px solid var(--border);
  padding-left: 1.2rem;
  font-size: 0.875rem;
}

#TOC li {
  margin-bottom: 0.45rem;
}

#TOC a {
  color: var(--text-muted);
  transition: color 0.2s ease;
  text-decoration: none;
}

#TOC a.active, #TOC a:hover {
  color: var(--primary);
  font-weight: 500;
}

.code-fold-header {
  background: var(--bg-tertiary) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  padding: 0.4rem 0.85rem !important;
  font-family: var(--font-title);
  font-weight: 500;
  color: var(--text-title);
}

.code-fold-header:hover {
  background: var(--border) !important;
}

/* CUSTOM MODERN WEB SCROLLBARS */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-page);
}

::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

body.quarto-dark ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
}

body.quarto-dark ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   CLASSROOM PROJECTOR & MOBILE RESPONSIVENESS OVERRIDES
   ========================================================================== */

@media print, screen and (max-width: 1200px) {
  body {
    font-size: 16px;
  }
  
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.7rem; }
  h3 { font-size: 1.3rem; }
}

@media (max-width: 768px) {
  h1 {
    font-size: 1.8rem;
  }
  
  h2 {
    font-size: 1.45rem;
  }

  .hero-banner {
    padding: 2.5rem 1.25rem;
    margin-bottom: 2rem;
  }
  
  .hero-content h1 {
    font-size: 1.75rem;
  }
  
  .gateway-grid, .program-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  
  .search-engine-box {
    padding: 1.25rem;
  }
  
  .form-row {
    flex-direction: column;
    gap: 1rem;
  }
  
  .form-group {
    min-width: 100%;
  }
  
  .premium-table th, .premium-table td {
    padding: 0.75rem 0.65rem;
    font-size: 0.85rem;
  }
}

/* ==========================================================================
   CSS CHO TRANG ABOUT ME & PHILOSOPHY
   ========================================================================== */

/* Hero Banner chuyên nghiệp */
.about-hero-section {
  position: relative;
  background-image: url('images/academic_workspace.png');
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-lg);
  padding: 4rem 2rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.about-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.75) 100%);
  z-index: 1;
}

body.quarto-dark .about-hero-overlay {
  background: linear-gradient(135deg, rgba(8, 13, 22, 0.95) 0%, rgba(8, 13, 22, 0.8) 100%);
}

.about-hero-container {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
  text-align: left;
}

.about-profile-wrapper {
  flex-shrink: 0;
}

.about-profile-pic {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.about-profile-pic:hover {
  transform: scale(1.05) rotate(2deg);
  border-color: var(--primary);
}

.about-hero-details h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-top: 0;
  border-bottom: none;
  padding-bottom: 0;
  color: #ffffff !important;
  letter-spacing: -0.03em;
  background: linear-gradient(to right, #ffffff, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.25;
}

.about-hero-details .subtitle {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 600;
  color: #38bdf8;
  margin-top: 0.5rem;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.about-hero-details .welcome-hook {
  font-size: 1rem;
  color: #cbd5e1;
  line-height: 1.6;
  margin: 0;
}

/* Timeline - Lộ trình học thuật */
.timeline-container {
  position: relative;
  max-width: 800px;
  margin: 3rem auto;
  padding: 0 1rem;
}

.timeline-container::after {
  content: '';
  position: absolute;
  width: 2px;
  background-color: var(--border);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  background-color: inherit;
  width: 50%;
  box-sizing: border-box;
}

.timeline-item::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  right: -8px;
  background-color: var(--bg-page);
  border: 4px solid var(--primary);
  top: 25px;
  border-radius: 50%;
  z-index: 3;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.timeline-item.left {
  left: 0;
  text-align: right;
}

.timeline-item.right {
  left: 50%;
}

.timeline-item.right::after {
  left: -8px;
}

.timeline-content {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: inline-block;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}

.timeline-content:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.timeline-item:hover::after {
  background-color: var(--primary);
  transform: scale(1.2);
}

.timeline-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-glow);
  color: var(--primary);
  margin-bottom: 1rem;
}

.timeline-content h3 {
  font-size: 1.15rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.timeline-content .timeline-degree {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.timeline-content p {
  font-size: 0.9rem;
  color: var(--text-main);
  margin: 0;
  line-height: 1.5;
}

/* Huy hiệu kinh nghiệm (Experience Badges) */
.badge-deck {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 800px;
  margin: 2rem auto;
}

.premium-badge-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.premium-badge-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.badge-number {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.badge-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-title);
  line-height: 1.4;
}

/* Philosophy Pullquote */
.philosophy-quote-box {
  position: relative;
  background: linear-gradient(135deg, var(--callout-note-bg) 0%, rgba(37, 99, 235, 0.03) 100%);
  border-left: 5px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 2.5rem 3rem;
  max-width: 800px;
  margin: 3.5rem auto;
  box-shadow: var(--shadow-sm);
}

.philosophy-quote-box::before {
  content: "“";
  position: absolute;
  font-family: var(--font-title);
  font-size: 8rem;
  color: rgba(37, 99, 235, 0.08);
  top: -2.5rem;
  left: 1rem;
  line-height: 1;
  font-weight: 800;
}

.philosophy-quote-text {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 500;
  font-style: italic;
  color: var(--text-title);
  line-height: 1.6;
  margin: 0;
  position: relative;
  z-index: 2;
}

/* Contact Grid & Popover */
.contact-container {
  max-width: 800px;
  margin: 3rem auto;
  text-align: center;
}

.about-contact-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-title) !important;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
}

.btn-contact:hover {
  background-color: var(--border);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--primary) !important;
}

/* Zalo Popover */
.zalo-qr-popover {
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.75rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  z-index: 50;
  pointer-events: none;
}

.zalo-qr-popover::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: var(--bg-card) transparent transparent transparent;
}

.btn-contact:hover .zalo-qr-popover {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.zalo-qr-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  display: block;
}

.zalo-popover-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  margin-bottom: 0;
  font-weight: 500;
}

/* Đánh giá sự tương thích của màn hình di động */
@media (max-width: 768px) {
  .about-hero-container {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  
  .about-hero-details h1 {
    font-size: 1.8rem;
  }

  .timeline-container::after {
    left: 31px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }

  .timeline-item::after {
    left: 23px;
  }

  .timeline-item.left {
    text-align: left;
  }

  .timeline-item.right {
    left: 0;
  }

  .badge-deck {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .philosophy-quote-box {
    padding: 2rem 1.5rem;
  }

  .philosophy-quote-box::before {
    font-size: 6rem;
    top: -1.5rem;
    left: 0.5rem;
  }
  
  .philosophy-quote-text {
    font-size: 1.1rem;
  }
}

/* ==========================================================================
   CSS CHO HÌNH ẢNH TRÊN CÁC THẺ (CARD IMAGES)
   ========================================================================== */

/* 1. Định dạng chung cho hình ảnh ở CÁC TRANG CON (program cards) - Đã vừa vặn */
.program-card-img {
  width: 100% !important;
  height: 180px !important;
  margin-top: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 1.5rem !important;
  background-color: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  display: block !important;
  box-sizing: border-box !important;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.program-card-img[src$=".png"], .program-card-img[src$=".webp"] {
  object-fit: cover !important;
  padding: 0 !important;
}

.program-card-img[src$=".svg"] {
  object-fit: contain !important;
  padding: 0.4rem !important;
}

/* 2. Định dạng riêng cho 8 hình ảnh ở TRANG CHỦ (gateway cards) - Đã căn chỉnh vừa vặn */
.gateway-card-img {
  width: 100% !important;
  aspect-ratio: 2 / 1 !important; /* Thiết kế tỷ lệ 2:1 chuẩn theo yêu cầu */
  height: auto !important; /* Tự động tính chiều cao để vừa khít tỉ lệ */
  object-fit: cover !important; /* Phủ đầy khung hình 2:1 đẹp mắt */
  padding: 0 !important; /* Không đệm viền ngoài để ảnh lấp đầy khung */
  margin-top: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 1.25rem !important;
  background-color: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  display: block !important;
  box-sizing: border-box !important;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

body.quarto-light .gateway-card-img,
body.quarto-light .program-card-img {
  background-color: rgba(0, 0, 0, 0.02) !important;
}

/* Hiệu ứng nhấc nhẹ và bóng mờ khi di chuột vào thẻ */
.gateway-card:hover .gateway-card-img, 
.program-card:hover .program-card-img {
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

/* 3. Định dạng riêng cho hình ảnh ở IGCSE, A-LEVEL & IB MATHEMATICS (tỷ lệ 2:1 tự co dãn) */
.igcse-chem-card-img, .igcse-math-card-img, .alevel-math-card-img, .ib-math-card-img {
  width: 100% !important;
  aspect-ratio: 2 / 1 !important; /* Thiết kế tỷ lệ 2:1 chuẩn theo yêu cầu */
  height: auto !important; /* Tự động tính chiều cao để vừa khít tỉ lệ */
  object-fit: cover !important; /* Đầy khung đẹp mắt */
  padding: 0 !important; /* Không đệm viền để ảnh lấp đầy khung */
}

/* 4. Định dạng bản đồ Google Maps trên trang About */
.map-container {
  width: 100%;
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.map-container iframe {
  display: block;
  width: 100%;
  height: 350px;
  border: 0;
}

/* 5. Định dạng danh sách liên hệ tối giản trên trang About */
.about-contact-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.01);
  overflow: hidden;
}

.about-contact-list li {
  font-size: 1.05rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.about-contact-list li:last-child {
  border-bottom: none;
}

.about-contact-list li strong {
  color: var(--primary);
  font-weight: 600;
}

.about-contact-list li span, 
.about-contact-list li a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.about-contact-list li a:hover {
  color: var(--primary);
  text-decoration: underline;
}

body.quarto-light .about-contact-list {
  background: rgba(0, 0, 0, 0.01);
}

/* CIE Resource Table Buttons */
.cie-btn-flashcard {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  font-size: 0.825rem;
  font-weight: 500;
  border-radius: 6px;
  text-decoration: none;
  background-color: rgba(245, 158, 11, 0.1);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.25);
  transition: all 0.2s ease;
}

.cie-btn-flashcard:hover {
  background-color: #f59e0b;
  color: #ffffff;
  border-color: #f59e0b;
}

body.quarto-dark .cie-btn-flashcard {
  background-color: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.3);
}

body.quarto-dark .cie-btn-flashcard:hover {
  background-color: #f59e0b;
  color: #0f172a;
}



/* ==========================================================================
   CSS CHO MỤC SÁCH (IB MATHEMATICS BOOKS GRID)
   ========================================================================== */

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 3rem;
}

.book-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  border-radius: var(--radius-md, 12px);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm, 0 4px 6px rgba(0, 0, 0, 0.04));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease;
  height: 100%;
  box-sizing: border-box;
}

.book-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md, 0 10px 20px rgba(0, 0, 0, 0.08));
  border-color: var(--primary);
}

.book-cover-container {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.02);
  border-radius: var(--radius-sm, 8px);
  padding: 0.75rem;
  min-height: 280px;
  margin-bottom: 1rem;
}

body.quarto-dark .book-cover-container {
  background: rgba(255, 255, 255, 0.02);
}

.book-cover-img {
  max-height: 240px;
  max-width: 100%;
  object-fit: contain;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  transition: transform 0.3s ease;
}

.book-card:hover .book-cover-img {
  transform: scale(1.03);
}

.book-info {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex-grow: 1;
  margin-bottom: 1.25rem;
}

.book-title {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.35;
  color: var(--text-title);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.book-meta {
  font-size: 0.825rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.book-download-btn {
  width: 100%;
  border-radius: var(--radius-sm, 8px);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

/* ==========================================================================
   CSS CHO TRANG CHỦ MỚI (NEW HOMEPAGE PLATFORM LAYOUT)
   ========================================================================== */

/* 1. Thiết kế lưới 2 cột Hero Section */
.hero-section {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
  background: radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.12) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 45%),
              linear-gradient(135deg, #0e1626 0%, #050811 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  margin-bottom: 2.5rem;
  color: #ffffff;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
}

body.quarto-dark .hero-section {
  background: radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.15) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(167, 139, 250, 0.12) 0%, transparent 45%),
              linear-gradient(135deg, #060911 0%, #010204 100%);
  border-color: rgba(56, 189, 248, 0.15);
}

.hero-left h1 {
  font-size: 2.3rem;
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 0.5rem;
  border-bottom: none;
  padding-bottom: 0;
  color: #ffffff !important;
  letter-spacing: -0.03em;
  background: linear-gradient(to right, #ffffff, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.25;
}

.hero-left h2 {
  font-family: var(--font-sans);
  font-size: 1.2rem;
  font-weight: 500;
  color: #38bdf8;
  margin-top: 0;
  margin-bottom: 1.5rem;
  border-bottom: none;
  padding-bottom: 0;
  line-height: 1.4;
}

.hero-left p {
  font-size: 1.05rem;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.hero-left ul {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
}

.hero-left li {
  font-size: 0.95rem;
  color: #cbd5e1;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-left li strong {
  color: #ffffff;
}

/* Nút CTAs trong Hero */
.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
  color: #ffffff !important;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
  filter: brightness(1.05);
}

.btn-secondary-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff !important;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  text-decoration: none !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-secondary-cta:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

/* Ảnh minh họa Mockup Hero bên phải */
.hero-mockup-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

.hero-section:hover .hero-mockup-img {
  transform: scale(1.02) rotate(0.5deg);
}

/* 2. Thiết kế hộp số liệu thực tế (Real Stats Container) */
.stats-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin: 2.5rem 0;
  text-align: center;
}

.stats-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.stats-box:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.stats-box h3 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  margin-top: 0;
  margin-bottom: 0.4rem;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--primary) 40%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.quarto-dark .stats-box h3 {
  background: linear-gradient(135deg, var(--primary) 40%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stats-box p {
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-title);
  margin: 0;
  line-height: 1.3;
}

/* 3. Thiết kế lưới Giá trị cốt lõi (Value Propositions) */
.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.value-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.value-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.value-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-title);
  margin-top: 0;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.value-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* 4. Thiết kế lộ trình học tập (Roadmap Timeline) */
.roadmap-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.roadmap-node {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.roadmap-node:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.roadmap-node h5 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0;
  margin-bottom: 0.4rem;
}

.roadmap-node strong {
  font-family: var(--font-title);
  font-size: 1.05rem;
  color: var(--text-title);
  display: block;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.roadmap-node p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

/* Responsive cho phần trang chủ mới */
@media (max-width: 992px) {
  .hero-section {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2.5rem 1.75rem;
    text-align: center;
  }
  
  .hero-left h1 {
    font-size: 2rem;
  }
  
  .hero-left ul {
    display: inline-block;
    text-align: left;
  }

  .hero-ctas {
    justify-content: center;
  }
  
  .hero-mockup-img {
    max-width: 500px;
    margin: 0 auto;
  }
  
  .stats-container {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}

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

/* ==========================================================================
   Exam Paper & Mark Scheme Action Buttons (QP, MS, QB)
   ========================================================================== */
.btn-qp, .btn-ms, .btn-qb,
a.btn-qp, a.btn-ms, a.btn-qb,
a.btn-qp:link, a.btn-ms:link, a.btn-qb:link,
a.btn-qp:visited, a.btn-ms:visited, a.btn-qb:visited,
a.btn-qp:hover, a.btn-ms:hover, a.btn-qb:hover,
a.btn-qp:active, a.btn-ms:active, a.btn-qb:active {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.35rem !important;
  padding: 0.35rem 0.75rem !important;
  font-size: 0.76rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  color: #ffffff !important;
  border-radius: 6px !important;
  white-space: nowrap !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
  transition: all 0.18s ease-in-out !important;
}

.btn-qp, a.btn-qp, a.btn-qp:link, a.btn-qp:visited {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
}
.btn-qp:hover, a.btn-qp:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(37,99,235,0.3) !important;
}

.btn-ms, a.btn-ms, a.btn-ms:link, a.btn-ms:visited {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #ffffff !important;
}
.btn-ms:hover, a.btn-ms:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(245,158,11,0.3) !important;
}

.btn-qb, a.btn-qb, a.btn-qb:link, a.btn-qb:visited {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
}
.btn-qb:hover, a.btn-qb:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(16,185,129,0.3) !important;
}

