:root {
  --bg-dark: #070b14;
  --bg-card: rgba(17, 25, 45, 0.85);
  --bg-card-hover: rgba(24, 36, 66, 0.95);
  --bg-glass: rgba(11, 18, 34, 0.88);
  --border-color: rgba(148, 163, 184, 0.16);
  --border-glow: rgba(56, 189, 248, 0.45);
  --text-main: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --primary: #38bdf8;
  --primary-dark: #0284c7;
  --secondary: #818cf8;
  --accent: #f43f5e;
  --emerald: #10b981;
  --gradient-main: linear-gradient(135deg, #0ea5e9 0%, #6366f1 55%, #a855f7 100%);
  --gradient-hot: linear-gradient(135deg, #f43f5e 0%, #fb923c 100%);
  --gradient-emerald: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --shadow-lg: 0 16px 36px -12px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 24px rgba(56, 189, 248, 0.22);
  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --bg-footer: rgba(11, 18, 34, 0.95);
  --footer-text: #94a3b8;
  --footer-strong: #f8fafc;
  --seo-tag-bg: rgba(15, 23, 42, 0.65);
  --seo-tag-color: #cbd5e1;
  --seo-tag-border: rgba(148, 163, 184, 0.22);
}

[data-theme="light"] {
  --bg-dark: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.92);
  --border-color: rgba(15, 23, 42, 0.1);
  --border-glow: rgba(2, 132, 199, 0.4);
  --text-main: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --secondary: #4f46e5;
  --shadow-lg: 0 12px 30px -10px rgba(15, 23, 42, 0.1);
  --shadow-glow: 0 6px 20px rgba(2, 132, 199, 0.15);
  --bg-footer: #e8edf5;
  --footer-text: #334155;
  --footer-strong: #0f172a;
  --seo-tag-bg: #ffffff;
  --seo-tag-color: #1e293b;
  --seo-tag-border: #cbd5e1;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

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

html {
  scroll-behavior: smooth;
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.5;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  touch-action: pan-y; /* Chỉ cho phép cuộn trang lên và xuống trên điện thoại */
}

/* Đảm bảo hình ảnh và media không bao giờ vượt quá chiều ngang màn hình */
img, picture, video, canvas, svg {
  max-width: 100%;
  height: auto;
}

/* Ambient Orbs */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.2;
}

[data-theme="light"] .ambient-orb {
  opacity: 0.1;
}

.orb-1 { width: 420px; height: 420px; background: #38bdf8; top: -120px; left: -100px; }
.orb-2 { width: 380px; height: 380px; background: #818cf8; top: 40%; right: -120px; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  position: relative;
  z-index: 1;
}

/* Top Announcement Bar */
.top-bar {
  background: linear-gradient(90deg, #0284c7, #4f46e5);
  color: #fff;
  font-size: 0.8rem;
  padding: 6px 0;
  position: relative;
  z-index: 60;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.top-bar-left span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.top-bar-right a {
  color: #fff;
  text-decoration: none;
  padding: 2px 10px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-size: 0.78rem;
  white-space: nowrap;
}

/* Header & Brand Logo (Fixed wrapping & overflow) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  width: 100%;
  max-width: 100%;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  padding: 8px 0;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  cursor: pointer;
  min-width: 0;
  flex-shrink: 1;
}

.brand-logo img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: contain;
  background: #ffffff;
  padding: 3px;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.22);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
}

.brand-title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-subtitle {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* Desktop Main Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.nav-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 8px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-btn:hover {
  color: var(--primary);
  background: rgba(56, 189, 248, 0.1);
}

.nav-btn.active {
  color: #fff;
  background: var(--gradient-main);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.32);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
  flex-shrink: 0;
}

/* Quick Category Switcher Bar for Mobile/Tablet (Swipeable Pills) */
.quick-cat-bar {
  display: none;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-glass);
  border-top: 1px solid var(--border-color);
  width: 100%;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}

.quick-cat-bar::-webkit-scrollbar {
  display: none;
}

.quick-pill {
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}

.quick-pill.active {
  background: var(--gradient-main);
  color: #fff;
  border-color: transparent;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-main);
  color: #fff;
  box-shadow: 0 6px 18px -4px rgba(56, 189, 248, 0.45);
}

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

.btn-hot {
  background: var(--gradient-hot);
  color: #fff;
  box-shadow: 0 6px 18px -4px rgba(244, 63, 94, 0.4);
}

.btn-outline {
  background: rgba(56, 189, 248, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-glow);
}

/* Compact Hero Section */
.hero-section {
  padding: 28px 0 24px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 12px;
  max-width: 100%;
  line-height: 1.35;
  box-sizing: border-box;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
}

.hero-title {
  font-size: clamp(1.6rem, 3.2vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.text-gradient {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-hot {
  background: var(--gradient-hot);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* Compact Learning Mode Boxes */
.learning-modes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.mode-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
}

.mode-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.mode-title {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--primary);
}

.mode-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.highlight-chip {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Hero Visual Showcase */
.hero-showcase {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 14px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.showcase-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  width: 100%;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}

.showcase-tabs::-webkit-scrollbar {
  display: none;
}

.showcase-tab {
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.showcase-tab.active {
  background: var(--gradient-main);
  color: #fff;
  border-color: transparent;
}

.showcase-Display {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #0f172a;
}

.showcase-Display img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}

.showcase-caption {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.showcase-caption-info h4 {
  font-size: 0.9rem;
  font-weight: 800;
}

/* Section Headers */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 20px;
}

.section-badge {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(56, 189, 248, 0.12);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 6px;
}

.section-title {
  font-size: clamp(1.35rem, 2.5vw, 1.95rem);
  font-weight: 800;
  margin-bottom: 6px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Mode Switcher Bar (Online vs Offline) */
.mode-switcher-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 22px;
  padding: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
}

.mode-pill-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
}

.mode-pill-btn.active {
  background: var(--gradient-main);
  color: #fff;
  box-shadow: 0 3px 10px rgba(56, 189, 248, 0.3);
}

/* 6 Category Cards Grid (Face Card + 5 Courses: 3 columns on desktop, 2 on tablet, 1 on mobile) */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-lg);
}

.category-thumb {
  position: relative;
  height: 175px;
  overflow: hidden;
  background: #0f172a;
}

.category-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(7, 11, 20, 0.82);
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
}

.category-count-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: var(--gradient-main);
  color: #fff;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.category-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.category-title {
  font-size: 1.12rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.category-subcourses {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
  padding: 10px;
  border-radius: var(--radius-md);
  background: rgba(56, 189, 248, 0.05);
  border: 1px solid var(--border-color);
  flex: 1;
}

.subcourse-item {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.category-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.price-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  display: block;
}

.price-value {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--primary);
}

/* Hero Face Wrapper (Đưa khuôn mặt AI lên vị trí Hero) */
#heroFaceWrapper {
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#heroFaceWrapper .ai-face-card {
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

/* AI Interactive Face Card */
.ai-face-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.ai-face-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.25);
}

.ai-face-thumb {
  position: relative;
  flex: 1 1 auto;
  min-height: 310px;
  overflow: hidden;
  background: linear-gradient(135deg, #ffd3e2 0%, #f3e0f7 42%, #e2e4ff 78%, #d8dcff 100%);
  border-bottom: 1px solid var(--border-color);
  user-select: none;
  -webkit-user-select: none;
}

.ai-face-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

.ai-face-canvas.is-dragging {
  cursor: grabbing;
}

.ai-face-drag-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f1f5f9;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 999px;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  animation: pulseFaceHint 2.4s infinite ease-in-out;
  transition: opacity 0.3s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  z-index: 5;
}

.ai-face-body {
  padding: 14px 18px;
  flex: 0 0 auto;
}

@keyframes pulseFaceHint {
  0%, 100% {
    transform: translateX(-50%) scale(1);
    opacity: 0.95;
  }
  50% {
    transform: translateX(-50%) scale(1.05);
    opacity: 0.78;
  }
}

.glasses-toggle-pill {
  background: rgba(99, 102, 241, 0.16);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.glasses-toggle-pill:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.glasses-toggle-pill:active {
  transform: scale(0.96);
}

/* Department Detail View (Compact & Intuitive) */
.department-hero {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 20px;
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 20px;
  align-items: center;
}

.department-posters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
}

.poster-thumb {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  aspect-ratio: 3 / 4;
  background: #0f172a;
  cursor: zoom-in;
  position: relative;
}

.poster-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Track Tabs Filter (when a category has multiple sub-courses) */
.track-selector-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 16px;
  padding-bottom: 4px;
  width: 100%;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}

.track-selector-tabs::-webkit-scrollbar {
  display: none;
}

.track-tab-btn {
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.track-tab-btn.active {
  background: var(--gradient-main);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

.track-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 20px;
  margin-bottom: 24px;
}

.track-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 14px;
}

.track-title {
  font-size: 1.2rem;
  font-weight: 800;
}

.track-pricing-cards {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pricing-Badge-box {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 12px;
}

.pricing-Badge-box.highlighted {
  border-color: var(--primary);
  background: rgba(56, 189, 248, 0.16);
}

.pricing-Badge-mode {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.pricing-Badge-amount {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--primary);
}

/* Compact Accordion Sessions List */
.sessions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.session-item {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  cursor: pointer;
  transition: var(--transition);
}

[data-theme="light"] .session-item {
  background: #f8fafc;
}

.session-item:hover, .session-item.expanded {
  border-color: var(--primary);
  background: rgba(56, 189, 248, 0.08);
}

.session-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.session-num {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--primary);
  background: rgba(56, 189, 248, 0.14);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.session-title {
  font-weight: 700;
  font-size: 0.88rem;
  flex: 1;
}

.session-chevron {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.session-item.expanded .session-chevron {
  transform: rotate(180deg);
  color: var(--primary);
}

.session-desc {
  display: none;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-color);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.session-item.expanded .session-desc {
  display: block;
}

/* Unified Compact Contact & Fee Calculator Section */
.contact-section {
  padding: 16px 0 44px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.calc-select, .form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 13px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.55);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.88rem;
}

[data-theme="light"] .calc-select,
[data-theme="light"] .form-input,
[data-theme="light"] .form-select,
[data-theme="light"] .form-textarea {
  background: #f8fafc;
}

.calc-result-box {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.14), rgba(129, 140, 248, 0.14));
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin: 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.calc-total-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-group {
  margin-bottom: 10px;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-secondary);
}

.checkbox-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.checkbox-pill input {
  display: none;
}

.checkbox-pill span {
  display: inline-block;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox-pill input:checked + span {
  background: var(--gradient-main);
  color: #fff;
  border-color: transparent;
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(7, 11, 20, 0.92);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.lightbox-modal.open {
  display: flex;
}

.lightbox-content {
  max-width: 860px;
  max-height: 90vh;
  position: relative;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 84vh;
  border-radius: var(--radius-lg);
}

.lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--gradient-hot);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

/* Floating Actions */
.floating-actions {
  position: fixed;
  right: 16px;
  bottom: 20px;
  z-index: 95;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gear-admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.85rem;
  line-height: 1;
  vertical-align: middle;
  color: inherit;
  opacity: 0.65;
  transition: transform 0.25s ease, opacity 0.2s ease;
  cursor: pointer;
  margin-right: 3px;
}

.gear-admin-link:hover {
  opacity: 1;
  transform: rotate(45deg) scale(1.18);
}

.float-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.float-zalo { background: linear-gradient(135deg, #0068ff, #00a2ff); }
.float-call { background: var(--gradient-emerald); }

/* Mobile Bottom Nav */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  background: var(--bg-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border-color);
  z-index: 99;
  padding: 5px 4px calc(5px + env(safe-area-inset-bottom));
  justify-content: space-around;
  box-sizing: border-box;
}

.mob-nav-item {
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: inherit;
  font-size: 0.66rem;
  font-weight: 700;
  padding: 5px 4px;
  border-radius: 10px;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}

.mob-nav-item span:not(.mob-icon) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  font-size: 0.62rem;
}

.mob-nav-item span.mob-icon {
  font-size: 1.15rem;
}

.mob-nav-item.active {
  color: var(--primary);
  background: rgba(56, 189, 248, 0.12);
}

/* Compact Footer & SEO Keywords */
.seo-keywords-box {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.seo-kw-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--seo-tag-color);
  background: var(--seo-tag-bg);
  border: 1px solid var(--seo-tag-border);
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.seo-kw-tag:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(56, 189, 248, 0.12);
  transform: translateY(-1px);
}

.site-footer {
  border-top: 1px solid var(--border-color);
  background: var(--bg-footer);
  padding: 24px 0 80px;
  font-size: 0.86rem;
  color: var(--footer-text);
  transition: background-color 0.25s ease, color 0.25s ease;
}

.site-footer strong {
  color: var(--footer-strong);
}

.site-footer a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* Responsive Media Queries (Optimized for Mobile Phone & Tablet - Only Vertical Scroll) */
@media (max-width: 980px) {
  .main-nav {
    display: none;
  }
  .quick-cat-bar {
    display: flex;
  }
  .hero-grid, .department-hero, .contact-grid {
    grid-template-columns: 1fr;
  }
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 12px;
  }

  /* Top announcement bar: hiển thị gọn gàng, tự xuống dòng trên mobile để không tràn trang */
  .top-bar-inner {
    flex-direction: column;
    gap: 3px;
    text-align: center;
    padding: 2px 0;
  }
  .top-bar-left {
    white-space: normal;
    text-align: center;
    justify-content: center;
    font-size: 0.72rem;
    line-height: 1.35;
  }
  .top-bar-left span {
    white-space: normal;
    text-align: center;
  }
  .top-bar-right {
    justify-content: center;
  }

  /* Header mobile: Co giãn linh hoạt, không đẩy tràn sang phải */
  .header-inner {
    min-height: 52px;
    padding: 5px 0;
    gap: 6px;
  }
  .brand-logo {
    gap: 7px;
    max-width: calc(100% - 92px);
  }
  .brand-logo img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    padding: 2px;
  }
  .brand-title {
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .brand-subtitle {
    font-size: 0.52rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .header-actions {
    gap: 4px;
    flex-shrink: 0;
  }
  .theme-toggle {
    width: 32px;
    height: 32px;
    font-size: 0.82rem;
  }
  .header-cta-btn {
    padding: 6px 10px !important;
    font-size: 0.75rem !important;
  }

  /* Quick category bar pills */
  .quick-cat-bar {
    padding: 6px 12px;
    gap: 5px;
  }
  .quick-pill {
    padding: 5px 11px;
    font-size: 0.76rem;
  }

  /* Hero Section */
  .hero-section {
    padding: 14px 0 16px;
  }
  .hero-title {
    font-size: 1.45rem;
  }
  .hero-desc {
    font-size: 0.86rem;
    margin-bottom: 12px;
  }

  /* Học Trực Tiếp & Học Online xếp 1 cột dọc chuẩn di động để không bị ép ngang */
  .learning-modes-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .mode-card {
    padding: 10px 12px;
  }
  .mode-title {
    font-size: 0.84rem;
  }
  .mode-text {
    font-size: 0.78rem;
  }

  /* Nút CTA dàn rộng 100% dễ chạm trên điện thoại */
  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }
  .hero-cta-group .btn {
    width: 100%;
    text-align: center;
    padding: 11px 16px;
  }

  /* Khung khuôn mặt AI Mochi 3D trên mobile */
  #heroFaceWrapper {
    width: 100%;
    margin-top: 14px;
  }
  #heroFaceWrapper .ai-face-card {
    max-width: 100%;
  }
  .ai-face-thumb {
    min-height: 270px;
  }

  /* Thanh chọn hình thức học Online / Trực tiếp xếp dọc vừa khít màn hình điện thoại */
  .mode-switcher-bar {
    width: 100%;
    max-width: 100%;
    flex-direction: column;
    border-radius: var(--radius-lg);
    gap: 6px;
    padding: 6px;
  }
  .mode-pill-btn {
    width: 100%;
    white-space: normal;
    text-align: center;
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  /* Danh sách thẻ khóa học 1 cột */
  .categories-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    width: 100%;
  }

  /* Buổi học & Form liên hệ 1 cột */
  .sessions-grid, .form-grid {
    grid-template-columns: 1fr;
  }
  .contact-grid, .track-card, .department-hero {
    padding: 14px;
    width: 100%;
  }

  /* Bảng tính học phí */
  .calc-result-box {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 8px;
  }
  .calc-result-box .btn {
    width: 100%;
  }

  /* Thẻ giá học phí chi tiết */
  .track-pricing-cards {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .pricing-Badge-box {
    padding: 6px 8px;
    text-align: center;
  }
  .pricing-Badge-amount {
    font-size: 0.95rem;
  }

  /* Poster chuyên ngành */
  .department-posters {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  /* Thanh điều hướng cố định dưới màn hình & nút gọi */
  .mobile-bottom-nav {
    display: flex;
  }
  .floating-actions {
    bottom: 66px;
    right: 12px;
  }
  .float-btn span.float-text {
    display: none;
  }
  .float-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  /* Chân trang */
  .footer-inner {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    gap: 8px;
  }
  .seo-keywords-box {
    justify-content: center;
  }
}

@media (max-width: 380px) {
  .brand-title {
    font-size: 0.78rem;
  }
  .brand-subtitle {
    display: none;
  }
  .header-cta-btn {
    padding: 5px 8px !important;
    font-size: 0.72rem !important;
  }
  .quick-pill {
    padding: 4px 9px;
    font-size: 0.72rem;
  }
}
