/* =============================================================
   English Together — Main Stylesheet
   Fonts: Inter (UI) + Nunito (body, Vietnamese support)
   Theme: Clean, modern educational — Blue primary
   ============================================================= */

/* ── Custom Properties ─────────────────────────────────────── */
:root {
  /* Primary — Blue educational */
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #EFF6FF;

  /* Secondary — Orange accent */
  --secondary: #F97316;
  --secondary-dark: #EA580C;
  --secondary-light: #FFF7ED;

  /* Backgrounds */
  --bg: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-alt: #F1F5F9;
  --bg-dark: #0F172A;

  /* Text */
  --text: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --text-on-dark: #FFFFFF;

  /* Borders */
  --border: #E2E8F0;
  --border-strong: #CBD5E1;

  /* Accent colors */
  --accent-green: #16A34A;
  --accent-purple: #7C3AED;
  --accent-teal: #0891B2;
  --accent-pink: #DB2777;
  --accent-orange: #EA580C;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .1), 0 1px 2px rgba(0, 0, 0, .06);
  --shadow: 0 4px 6px rgba(0, 0, 0, .07), 0 2px 4px rgba(0, 0, 0, .06);
  --shadow-md: 0 10px 15px rgba(0, 0, 0, .07), 0 4px 6px rgba(0, 0, 0, .05);
  --shadow-lg: 0 20px 25px rgba(0, 0, 0, .1), 0 10px 10px rgba(0, 0, 0, .04);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-hover: 0 20px 40px rgba(37, 99, 235, .15);

  /* Radii */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 48px;
  --space-2xl: 80px;

  /* Container */
  --container-max: 1200px;
  --container-px: 24px;

  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito', 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

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

button {
  font-family: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Inter', 'Nunito', system-ui, sans-serif;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
}

h1 {
  font-size: clamp(22px, 4vw, 32px);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(18px, 3vw, 24px);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(16px, 2.5vw, 20px);
}

h4 {
  font-size: clamp(15px, 2vw, 17px);
}

/* ── Top Stripe ─────────────────────────────────────────────── */
.top-stripe {
  height: 3px;
  background: linear-gradient(90deg,
      #2563EB 0%, #7C3AED 35%, #0891B2 65%, #2563EB 100%);
  background-size: 200% 100%;
  animation: stripeScroll 6s linear infinite;
}

@keyframes stripeScroll {
  0% {
    background-position: 0% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

/* ── Container ──────────────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

/* ── Section ────────────────────────────────────────────────── */
.section {
  padding: var(--space-xl) 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
}

.section-title {
  font-size: clamp(20px, 3.5vw, 26px);
  font-weight: 800;
  color: var(--text);
}

.see-all {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--primary-light);
  background: transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.see-all:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-color: var(--primary);
}

/* ── Centered Section Header (Eduor-style) ───────────────────── */
.section-header-center {
  text-align: center;
  margin-bottom: 36px;
}

.section-header-center .section-subtitle {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}

.section-title-center {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800;
  color: var(--text);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.25;
  letter-spacing: -.02em;
}

/* ── Navigation ─────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  isolation: isolate;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
  height: 64px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-logo-dot {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .3);
  flex-shrink: 0;
}

.nav-logo-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -.2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.nav-links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.nav-links a:hover {
  color: var(--text);
  background: var(--bg-alt);
}

/* ── Nav Auth Area ──────────────────────────────────────────── */
.nav-auth {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-login-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-on-dark);
  background: var(--secondary);
  border-radius: var(--radius-pill);
  white-space: nowrap;
  text-decoration: none;
  transition: color var(--transition), background var(--transition);
}

.nav-login-btn:hover {
  color: var(--text-on-dark);
  background: var(--secondary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, .4);
}

.nav-register-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  background: var(--primary);
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .3);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.nav-register-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, .4);
}

/* ── Nav User Menu ──────────────────────────────────────────── */
.nav-user-menu {
  position: relative;
}

.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .3);
  transition: transform var(--transition), box-shadow var(--transition);
}

.nav-avatar:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(37, 99, 235, .4);
}

.nav-user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: none;
  flex-direction: column;
  z-index: 200;
  overflow: hidden;
}

.nav-user-dropdown.is-open {
  display: flex;
}

/* User info header */
.nav-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.nav-user-info-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.nav-user-info-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.nav-user-info-email {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.nav-user-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.nav-user-link {
  display: flex !important;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary) !important;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none !important;
  transition: background var(--transition), color var(--transition);
}

.nav-user-link:hover {
  background: var(--bg-alt);
  color: var(--text) !important;
}

.nav-user-link--danger {
  color: #DC2626 !important;
}

.nav-user-link--danger:hover {
  background: #fef2f2 !important;
  color: #b91c1c !important;
}

.nav-logout-btn:hover {
  background: #FEF2F2 !important;
  color: #DC2626 !important;
}

/* ── Nav CTA (kept for backward compat) ─────────────────────── */
.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 9px 20px;
  background: var(--primary);
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .3);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  flex-shrink: 0;
}

.nav-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, .4);
}

/* ── Burger ─────────────────────────────────────────────────── */
.nav-burger {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 0;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.nav-burger:hover {
  background: var(--bg-alt);
}

.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.15s;
  transform-origin: center;
}

.nav.is-open .nav-burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav.is-open .nav-burger span:nth-child(2) {
  opacity: 0;
}

.nav.is-open .nav-burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile Drawer ──────────────────────────────────────────── */
.nav-drawer {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 8px 0 14px;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  box-shadow: var(--shadow-md);
}

.nav-drawer a,
.nav-drawer-login {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 12px var(--container-px);
  transition: color var(--transition), background var(--transition);
  display: block;
}

.nav-drawer a:hover {
  color: var(--text);
  background: var(--bg-alt);
}

.nav.is-open .nav-drawer {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-drawer-login {
  margin: 8px var(--container-px) 0;
  padding: 10px 20px;
  background: var(--primary);
  color: #fff !important;
  border-radius: var(--radius-pill);
  text-align: center;
  font-weight: 700;
}

.nav-drawer-auth-btns {
  display: flex;
  gap: 8px;
  padding: 12px var(--container-px) 8px;
}

.nav-drawer-auth-btns .nav-login-btn {
  flex: 1;
  justify-content: center;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  color: var(--text) !important;
}

.nav-drawer-auth-btns .nav-login-btn:hover {
  background: var(--bg-alt);
}

.nav-drawer-auth-btns .nav-register-btn {
  flex: 1;
  justify-content: center;
  padding: 10px 12px;
}

.nav-drawer-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px var(--container-px);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  background: var(--primary);
  color: #fff;
  font-family: 'Nunito', 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, .35);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  letter-spacing: .1px;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, .45);
}

.btn-primary.btn-block {
  width: 100%;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--secondary);
  padding: 13px 28px;
  color: rgb(255, 255, 255);
  font-family: 'Nunito', 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  border: 2px solid var(--border-strong);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition), color var(--transition);
  letter-spacing: .1px;
  text-decoration: none;
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: var(--primary-light);
  transform: translateY(-2px);
}

.btn-outline-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #fff;
  font-family: 'Nunito', 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 700;
  padding: 13px 28px;
  border-radius: var(--radius-pill);
  border: 2px solid rgba(255, 255, 255, .7);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  letter-spacing: .1px;
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, .15);
  border-color: #fff;
  transform: translateY(-2px);
}

.btn-text-link {
  text-decoration: none;
  transition: opacity var(--transition);
}

.btn-text-link:hover {
  opacity: .75;
}

/* ── Auth Page ───────────────────────────────────────────────── */
.auth-page {
  min-height: calc(100vh - 64px - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px var(--container-px);
  background: linear-gradient(135deg, var(--bg) 0%, #EFF6FF 50%, var(--bg) 100%);
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: 28px 32px;
  box-shadow: var(--shadow-lg);
}

.auth-card-register {
  width: 100%;
  max-width: 660px;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: 28px 32px;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  font-size: 36px;
  text-align: center;
  margin-bottom: 8px;
  line-height: 1;
}

.auth-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  text-align: center;
  margin-bottom: 4px;
}

.auth-subtitle {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 18px;
}

.auth-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #DC2626;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  line-height: 1.5;
}

.auth-error a {
  color: #b91c1c;
  text-decoration: underline;
  font-weight: 700;
}

.auth-error a:hover {
  color: #991b1b;
}

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

.auth-card-register .auth-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

/* Turnstile + submit button span cả 2 cột */
.auth-card-register .auth-form #register-turnstile,
.auth-card-register .auth-form #register-btn {
  grid-column: 1 / -1;
}

@media (max-width: 560px) {
  .auth-card-register .auth-form {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.form-group input,
.auth-form input {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Nunito', 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-card);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.auth-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.form-group input::placeholder,
.auth-form input::placeholder {
  color: var(--text-muted);
}

.input-with-toggle {
  position: relative;
}

.input-with-toggle input {
  padding-right: 46px;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 6px;
  transition: color var(--transition);
}

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

.auth-note {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  margin-top: 14px;
  line-height: 1.6;
}

.auth-note a {
  color: var(--primary);
  font-weight: 700;
  transition: color var(--transition);
}

.auth-note a:hover {
  color: var(--primary-dark);
}

/* ── Lesson AI Summary ──────────────────────────────────────── */
.lesson-ai-summary {
  margin: 28px 0;
  background: linear-gradient(135deg, #F0FDF4 0%, #F0F9FF 100%);
  border: 1.5px solid #BBF7D0;
  border-radius: var(--radius-lg);
  padding: 24px 28px;
}

.lesson-ai-summary-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.lesson-ai-summary-icon {
  font-size: 18px;
  line-height: 1;
}

.lesson-ai-summary-title {
  font-size: 15px;
  font-weight: 700;
  color: #166534;
}

.lesson-ai-summary-text {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.7;
  color: #1e293b;
}

.lesson-ai-summary-block {
  margin-top: 16px;
}

.lesson-ai-summary-label {
  font-size: 12px;
  font-weight: 700;
  color: #0369a1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.lesson-ai-vocab-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lesson-ai-vocab-item {
  font-size: 14px;
  line-height: 1.55;
  padding: 4px 0;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.lesson-ai-vocab-item:last-child {
  border-bottom: none;
}

.lesson-ai-vocab-word {
  font-weight: 700;
  color: #0f2044;
}

.lesson-ai-vocab-meaning {
  color: #475569;
}

.lesson-ai-summary-pre {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #1e293b;
  white-space: pre-wrap;
}

.lesson-ai-summary-rich {
  font-size: 14px;
  line-height: 1.7;
  color: #1e293b;
}

.lesson-ai-summary-rich>*+* {
  margin-top: 0.6em;
}

.lesson-ai-summary-rich p {
  margin: 0;
}

.lesson-ai-summary-rich ul,
.lesson-ai-summary-rich ol {
  margin: 0;
  padding-left: 1.4em;
}

.lesson-ai-summary-rich li {
  margin-bottom: 0.3em;
  line-height: 1.65;
}

.lesson-ai-summary-rich li:last-child {
  margin-bottom: 0;
}

.lesson-ai-summary-rich li::marker {
  color: #16a34a;
}

.lesson-ai-summary-rich strong,
.lesson-ai-summary-rich b {
  font-weight: 700;
  color: #0f2044;
}

.lesson-ai-summary-rich em {
  font-style: italic;
}

.lesson-ai-summary-rich a {
  color: var(--primary-dark);
  font-weight: 600;
  text-decoration: underline;
}

.lesson-ai-summary-rich blockquote {
  border-left: 3px solid #16a34a;
  background: rgba(255, 255, 255, 0.6);
  margin: 0;
  padding: 8px 14px;
  border-radius: 0 6px 6px 0;
  font-style: italic;
}

.lesson-ai-summary-lock {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: #166534;
}

.lesson-ai-summary-lock span:first-child {
  font-size: 16px;
  flex-shrink: 0;
}

.lesson-ai-summary-lock span:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.lesson-ai-summary-rich code {
  background: rgba(0, 0, 0, .07);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.92em;
}

/* ── Lesson Paywall ─────────────────────────────────────────── */
.lesson-paywall {
  margin: 32px 0;
  background: linear-gradient(135deg, var(--primary-light) 0%, #F0F9FF 100%);
  border: 2px solid rgba(37, 99, 235, .2);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.lesson-paywall-inner {
  padding: 40px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.lesson-paywall-icon {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 4px;
}

.lesson-paywall-inner h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

.lesson-paywall-inner p {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  max-width: 360px;
  line-height: 1.65;
  margin: 0;
}

.lesson-paywall-inner .btn-primary {
  margin-top: 8px;
}

/* ── Enrollment Timeline ─────────────────────────────────────── */
.enroll-timeline {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 300px;
  text-align: left;
}

.enroll-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  padding-bottom: 18px;
}

.enroll-step:last-child {
  padding-bottom: 0;
}

.enroll-step::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 32px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.enroll-step:last-child::before {
  display: none;
}

.enroll-step--done::before {
  background: #22c55e;
}

.enroll-step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--border);
  color: var(--text-secondary);
}

.enroll-step--done .enroll-step-dot {
  background: #22c55e;
  color: #fff;
}

.enroll-step--active .enroll-step-dot {
  background: #3b82f6;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .2);
}

.enroll-step--pending .enroll-step-dot {
  background: #fef3c7;
  color: #92400e;
  animation: pulse-dot 1.6s ease-in-out infinite;
}

.enroll-step--locked .enroll-step-dot {
  background: var(--border);
  color: var(--text-secondary);
  opacity: .45;
}

@keyframes pulse-dot {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(251, 191, 36, .45);
  }

  50% {
    box-shadow: 0 0 0 7px rgba(251, 191, 36, 0);
  }
}

.enroll-step-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  padding-top: 6px;
  line-height: 1.4;
}

.enroll-step--locked .enroll-step-label {
  opacity: .4;
}

/* ── Hero Banner ─────────────────────────────────────────────── */
.hero {
  background: var(--bg);
  padding: 110px var(--container-px) 100px;
  min-height: 540px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, .08) 0%, transparent 70%);
  top: -200px;
  right: -150px;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, .07) 0%, transparent 70%);
  bottom: -80px;
  left: 5%;
  pointer-events: none;
}

.hero-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 48px;
  position: relative;
  z-index: 1;
}

.hero-text {
  flex: 1;
  max-width: 600px;
}

/* ── Hero Visual (right panel) ───────────────────────────────── */
.hero-visual {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  width: 200px;
  align-self: center;
}

.hero-stat-card {
  background: rgba(0, 0, 0, .42);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .08);
  display: flex;
  flex-direction: column;
  gap: 3px;
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, .12);
  border-left: 4px solid var(--primary);
}

.hero-stat-card--mid {
  border-left-color: var(--secondary);
}

.hero-stat-card--bot {
  border-left-color: var(--accent-green);
}

.hero-stat-num {
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.hero-stat-icon {
  font-size: 24px;
  line-height: 1;
}

.hero-stat-lbl {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, .75);
  line-height: 1.4;
}

@media (max-width: 900px) {
  .hero-visual {
    display: none;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 22px;
  border: 1.5px solid rgba(37, 99, 235, .2);
  letter-spacing: .2px;
}

.hero-text h1 {
  font-size: clamp(30px, 5vw, 50px);
  font-weight: 900;
  margin-bottom: 18px;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -.5px;
}

.hero-text h1 em {
  font-style: normal;
  color: var(--primary);
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-text p {
  font-size: clamp(15px, 2.2vw, 18px);
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 520px;
  font-weight: 500;
  line-height: 1.75;
}

.hero-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Hero with background image */
.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg,
      rgba(15, 23, 42, .72) 0%,
      rgba(15, 23, 42, .55) 45%,
      rgba(15, 23, 42, .15) 100%);
  z-index: 0;
}

/* Hero text — white when bg image is present */
.hero--with-bg .hero-text h1 {
  color: #16a34a;
}

.hero--with-bg .hero-text p {
  color: rgba(255, 255, 255, .88);
}

.hero--with-bg .hero-badge {
  background: rgba(255, 255, 255, .15);
  color: #fff;
  border-color: rgba(255, 255, 255, .25);
  backdrop-filter: blur(6px);
}

/* ── Course Strip ───────────────────────────────────────────── */
.course-strip {
  background: var(--bg-alt);
  padding: 56px 0 72px;
}

.course-strip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.course-strip-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.course-strip-card:hover {
  border-color: var(--primary);
  box-shadow: 0 12px 36px rgba(37, 99, 235, .14);
  transform: translateY(-4px);
}

.course-strip-card--primary {
  border-color: rgba(37, 99, 235, .4);
}

.course-strip-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-dark);
  position: relative;
  flex-shrink: 0;
}

.course-strip-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}

.course-strip-card:hover .course-strip-cover img {
  transform: scale(1.04);
}

.course-strip-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: linear-gradient(135deg, var(--primary-light), var(--bg-dark));
}

.course-strip-ribbon {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  letter-spacing: .04em;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .35);
}

.course-strip-body {
  flex: 1;
  padding: 24px 28px 28px;
  display: flex;
  flex-direction: column;
}

.course-strip-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.course-strip-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: .02em;
}

.course-strip-title {
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 800;
  color: var(--text);
  margin: 0 0 10px;
  line-height: 1.35;
}

.course-strip-tagline {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 auto;
  padding-bottom: 20px;
}

.course-strip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  align-self: flex-start;
}

.course-strip-card:hover .course-strip-btn {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.course-strip-btn--primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(37, 99, 235, .3);
}

.course-strip-card:hover .course-strip-btn--primary {
  background: var(--primary-dark);
  color: #fff;
  border-color: var(--primary-dark);
}

.course-strip-cover-link {
  display: block;
  text-decoration: none;
}

.course-strip-title-link {
  text-decoration: none;
  color: inherit;
}

.course-strip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
  align-items: center;
}

.course-strip-register-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
  background: #16a34a;
  color: #fff;
  border: 2px solid #16a34a;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition);
  cursor: pointer;
}

.course-strip-register-btn:hover {
  background: #15803d;
  border-color: #15803d;
}

.course-strip-register-btn--pending {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

.course-strip-register-btn--pending:hover {
  background: #fde68a;
  border-color: #f59e0b;
}

.course-strip-register-btn--active {
  background: #dcfce7;
  color: #166534;
  border: 2px solid #bbf7d0;
  cursor: default;
}

@media (max-width: 640px) {
  .course-strip {
    padding: 40px 0 56px;
  }

  .course-strip-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .course-strip-cover {
    aspect-ratio: 16 / 9;
  }

  .course-strip-body {
    padding: 20px 20px 24px;
  }
}

/* ── Stat Bar ────────────────────────────────────────────────── */
.stat-bar {
  background: var(--bg-dark);
  padding: 24px var(--container-px);
  display: flex;
  justify-content: center;
  gap: clamp(28px, 8vw, 96px);
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
  min-width: 70px;
}

.stat-num {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 900;
  line-height: 1;
  color: #60A5FA;
  letter-spacing: -.5px;
}

.stat-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, .55);
  margin-top: 4px;
}

/* ── Card base ───────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

/* ── Category Grid ───────────────────────────────────────────── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 14px 20px;
  border-radius: var(--radius-lg);
  border: 2px solid transparent;
  text-align: center;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.cat-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 12px;
  flex-shrink: 0;
  line-height: 1;
}

.cat-name {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text);
}

.cat-count {
  font-size: 13px;
  font-weight: 600;
  margin-top: 4px;
  color: var(--text-muted);
  min-height: 2.2em;
  line-height: 1.4;
  text-align: center;
}

/* Category color variants */
.cat-blue {
  background: #EFF6FF;
  border-color: #BFDBFE;
}

.cat-blue .cat-name {
  color: #1D4ED8;
}

.cat-blue:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 20px rgba(37, 99, 235, .18);
}

.cat-green {
  background: #F0FDF4;
  border-color: #BBF7D0;
}

.cat-green .cat-name {
  color: #15803D;
}

.cat-green:hover {
  border-color: var(--accent-green);
  box-shadow: 0 6px 20px rgba(22, 163, 74, .18);
}

.cat-orange {
  background: #FFF7ED;
  border-color: #FED7AA;
}

.cat-orange .cat-name {
  color: #C2410C;
}

.cat-orange:hover {
  border-color: var(--secondary);
  box-shadow: 0 6px 20px rgba(249, 115, 22, .2);
}

.cat-pink {
  background: #FDF2F8;
  border-color: #FBCFE8;
}

.cat-pink .cat-name {
  color: #9D174D;
}

.cat-pink:hover {
  border-color: var(--accent-pink);
  box-shadow: 0 6px 20px rgba(219, 39, 119, .18);
}

.cat-purple {
  background: #F5F3FF;
  border-color: #DDD6FE;
}

.cat-purple .cat-name {
  color: #6D28D9;
}

.cat-purple:hover {
  border-color: var(--accent-purple);
  box-shadow: 0 6px 20px rgba(124, 58, 237, .18);
}

.cat-yellow {
  background: #FEFCE8;
  border-color: #FEF08A;
}

.cat-yellow .cat-name {
  color: #A16207;
}

.cat-yellow:hover {
  border-color: #EAB308;
  box-shadow: 0 6px 20px rgba(234, 179, 8, .2);
}

/* ── Post Grid & Card ────────────────────────────────────────── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

.post-card {
  display: flex;
  flex-direction: column;
}

.post-card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--primary-light), #E0E7FF);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  overflow: hidden;
  flex-shrink: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.post-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.post-card-tag {
  display: inline-flex;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: var(--radius-pill);
  letter-spacing: .3px;
  border: 1.5px solid rgba(37, 99, 235, .2);
  text-transform: uppercase;
}

.post-card-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
  transition: color var(--transition);
}

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

.post-card-meta {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* ── Resource Grid & Card ────────────────────────────────────── */
.res-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.res-card {
  display: flex;
  flex-direction: column;
}

.res-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.res-card-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
  transition: color var(--transition);
}

.res-card:hover .res-card-name {
  color: var(--primary-dark);
}

.res-card-desc {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

.res-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* ── Exercise Card ───────────────────────────────────────────── */
.ex-card {
  display: flex;
  flex-direction: column;
}

.ex-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.ex-card-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
  transition: color var(--transition);
}

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

.ex-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  letter-spacing: .2px;
}

.badge-free {
  background: #F0FDF4;
  color: #166534;
  border: 1.5px solid #BBF7D0;
}

.badge-pro {
  background: #FEFCE8;
  color: #A16207;
  border: 1.5px solid #FEF08A;
}

.badge-level {
  background: var(--primary-light);
  color: var(--primary-dark);
  border: 1.5px solid rgba(37, 99, 235, .2);
}

.badge-skill {
  background: #F0F9FF;
  color: #0369A1;
  border: 1.5px solid #BAE6FD;
}

.badge-age {
  margin-left: 10px;
  background: #F5F3FF;
  color: #6D28D9;
  border: 1.5px solid #DDD6FE;
}

/* ── Newsletter ──────────────────────────────────────────────── */
.newsletter {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  padding: 64px var(--container-px);
  position: relative;
  overflow: hidden;
}

.newsletter::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .15) 0%, transparent 70%);
  top: -150px;
  right: 0;
  pointer-events: none;
}

.newsletter::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 200, 100, .18) 0%, transparent 70%);
  bottom: -80px;
  left: 5%;
  pointer-events: none;
}

.newsletter-inner {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.newsletter-inner h3 {
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 900;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: -.3px;
}

.newsletter-inner p {
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, .68);
  margin-bottom: 28px;
  line-height: 1.65;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.newsletter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.newsletter-input {
  flex: 1;
  min-width: 220px;
  padding: 13px 20px;
  border-radius: var(--radius-pill);
  border: 2px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .08);
  font-family: 'Nunito', 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
}

.newsletter-input:focus {
  border-color: rgba(255, 255, 255, .8);
  background: rgba(255, 255, 255, .18);
}

.newsletter-input::placeholder {
  color: rgba(255, 255, 255, .4);
}

.newsletter-msg {
  font-size: 13px;
  min-height: 20px;
  text-align: center;
  margin-top: 4px;
  color: rgba(255, 255, 255, .8);
  transition: color var(--transition);
}

.newsletter-msg.is-error {
  color: #fca5a5;
}

.newsletter-success {
  display: none;
  text-align: center;
  animation: nl-fade-up .4s ease both;
}

.newsletter-success-icon {
  font-size: 52px;
  margin-bottom: 12px;
  line-height: 1;
}

.newsletter-success h4 {
  font-size: clamp(20px, 3.5vw, 26px);
  font-weight: 900;
  color: #fff;
  margin-bottom: 8px;
}

.newsletter-success p {
  font-size: 15px;
  color: rgba(255, 255, 255, .75);
  margin-bottom: 0;
  line-height: 1.6;
}

@keyframes nl-fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes nl-spin {
  to {
    transform: rotate(360deg);
  }
}

.btn-primary:disabled {
  opacity: .7;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, .2) !important;
}

.btn-primary.is-loading {
  color: transparent;
  pointer-events: none;
  position: relative;
}

.btn-primary.is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: nl-spin .65s linear infinite;
}

/* ── Filter Bar ──────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}

.filter-pill:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: var(--primary-light);
  transform: translateY(-1px);
}

.filter-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, .3);
}

/* ── Breadcrumb ──────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 14px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--primary-dark);
  font-weight: 700;
  transition: color var(--transition);
}

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

.breadcrumb-sep {
  color: var(--border-strong);
  font-size: 14px;
}

/* ── Pagination ──────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 32px 0 8px;
  flex-wrap: wrap;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}

.page-btn:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
  transform: translateY(-1px);
}

.page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 3px 10px rgba(37, 99, 235, .3);
}

/* ── Empty State ─────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 64px 20px;
}

.empty-state-icon {
  font-size: 60px;
  margin-bottom: 18px;
}

.empty-state h3 {
  font-size: 22px;
  margin-bottom: 8px;
  color: var(--text);
}

.empty-state p {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
}

/* ── Footer Wave Divider ─────────────────────────────────────── */
.footer-wave {
  position: relative;
  background: var(--bg);
  line-height: 0;
  margin-top: var(--space-2xl);
}

.footer-wave svg {
  width: 100%;
  height: 64px;
  display: block;
}

.footer-wave-icons {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 18px;
  white-space: nowrap;
}

.footer-wave-icons span {
  font-size: 20px;
  opacity: .45;
  animation: waveIconBob 3s ease-in-out infinite;
  display: inline-block;
}

.footer-wave-icons span:nth-child(2) {
  animation-delay: .3s;
}

.footer-wave-icons span:nth-child(3) {
  animation-delay: .6s;
}

.footer-wave-icons span:nth-child(4) {
  animation-delay: .9s;
}

.footer-wave-icons span:nth-child(5) {
  animation-delay: 1.2s;
}

.footer-wave-icons span:nth-child(6) {
  animation-delay: 1.5s;
}

.footer-wave-icons span:nth-child(7) {
  animation-delay: 1.8s;
}

.footer-wave-icons span:nth-child(8) {
  animation-delay: 2.1s;
}

@keyframes waveIconBob {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  background: #0D1B2A;
  position: relative;
  overflow: hidden;
}

/* Background image overlay */
.footer-bg-overlay {
  position: absolute;
  inset: 0;
  background-image: url('/assets/footer-bg.webp');
  background-size: cover;
  background-position: center;
  opacity: 0.10;
  pointer-events: none;
  z-index: 0;
}

/* Bottom gradient vignette — "mờ bên dưới" */
.footer::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: linear-gradient(to top, rgba(0, 0, 0, .55) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.footer-contact-divider {
  margin: 10px;
  margin-left: 0;
  height: 1px;
  background: rgba(255, 255, 255, .07);
}

.footer-inner {
  position: relative;
  z-index: 1;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

/* ── Footer top grid — 4 cols ────────────────────────────────── */
.footer-top {
  padding: 56px 0 40px;
  display: grid;
  grid-template-columns: 297px repeat(3, 1fr) 297px;
  gap: 32px;
  align-items: start;
}

/* ── Brand col ───────────────────────────────────────────────── */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-logo-wrap {
  display: inline-block;
}

.footer-tagline {
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, .5);
  line-height: 1.7;
  margin: 0;
}

/* Social icons */
.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.footer-social-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  border: 1.5px solid rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .65);
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}

.footer-social-icon:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* ── Link cols ───────────────────────────────────────────────── */
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.footer-col-title {
  font-size: 11px;
  font-weight: 800;
  color: rgba(255, 255, 255, .4);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin: 0 0 16px;
}

.footer-col-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col-list a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, .55);
  transition: color var(--transition), padding-left var(--transition);
  display: inline-block;
}

.footer-col-list a:hover {
  color: #fff;
  padding-left: 4px;
}

/* ── Contact col ─────────────────────────────────────────────── */
.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, .55);
  line-height: 1.5;
}

.footer-contact-icon {
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Facebook Like widget ────────────────────────────────────── */
.footer-fb-like {
  margin-top: 14px;
  min-height: 28px;
}

/* ── Newsletter mini ─────────────────────────────────────────── */
.footer-newsletter {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.footer-newsletter-label {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, .65);
  margin: 0 0 10px;
}

.footer-nl-form {
  display: flex;
  gap: 6px;
}

.footer-nl-input {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .06);
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
}

.footer-nl-input::placeholder {
  color: rgba(255, 255, 255, .3);
}

.footer-nl-input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, .1);
}

.footer-nl-btn {
  padding: 9px 14px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition);
  font-family: inherit;
}

.footer-nl-btn:hover {
  background: var(--primary-dark);
}

.footer-nl-msg {
  font-size: 12px;
  color: rgba(255, 255, 255, .55);
  margin-top: 6px;
  min-height: 18px;
}

/* ── Divider + Bottom bar ────────────────────────────────────── */
.footer-divider {
  height: 1px;
  background: rgba(255, 255, 255, .07);
}

.footer-bottom {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, .25);
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, .3);
  transition: color var(--transition);
}

.footer-bottom-links a:hover {
  color: rgba(255, 255, 255, .65);
}

span.footer-contact-icon {
  width: 20px;
  height: 20px;
  float: left;
  text-align: center;
  margin-right: 5px;
}

/* ── AdSense / Ad units ──────────────────────────────────────── */
.ad-unit {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  min-height: 90px;
  overflow: hidden;
  margin: var(--space-lg) 0;
}

.ad-unit-wide {
  width: 100%;
  min-height: 90px;
}

.ad-unit-rect {
  width: 100%;
  min-height: 280px;
}

/* ── Rich-text / Prose ───────────────────────────────────────── */
.prose {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.78;
  color: var(--text);
  max-width: 720px;
}

.prose h2 {
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 800;
  color: var(--text);
  margin: 36px 0 14px;
}

.prose h3 {
  font-size: clamp(16px, 2.5vw, 19px);
  font-weight: 800;
  color: var(--text-secondary);
  margin: 26px 0 10px;
}

.prose p {
  margin-bottom: 16px;
}

.prose ul,
.prose ol {
  margin: 0 0 16px 24px;
}

.prose li {
  margin-bottom: 6px;
}

.prose strong {
  font-weight: 800;
  color: var(--text);
}

.prose blockquote {
  border-left: 4px solid var(--primary);
  background: var(--primary-light);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 22px 0;
  color: var(--text-secondary);
  font-style: italic;
  font-weight: 600;
}

.prose img {
  border-radius: var(--radius-lg);
  margin: 24px 0;
  box-shadow: var(--shadow);
}

.prose code {
  background: var(--bg-alt);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: .88em;
  font-family: 'Courier New', monospace;
  color: var(--primary-dark);
  font-weight: 700;
}

.prose pre {
  background: var(--bg-dark);
  color: #93C5FD;
  padding: 20px;
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin: 22px 0;
}

.prose a {
  color: var(--primary-dark);
  font-weight: 700;
}

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

/* ── Page layout (detail pages) ─────────────────────────────── */
.page-body {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-xl) var(--container-px);
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

.page-main {
  min-width: 0;
}

.page-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 88px;
}

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.sidebar-card h4 {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid var(--border);
  letter-spacing: .4px;
  text-transform: uppercase;
}

/* =============================================================
   Course Player — Tabs + Sidebar + Content
   ============================================================= */

/* ── Tab Bar ────────────────────────────────────────────────── */
.course-tabs-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 80;
}

.course-tabs-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.course-tabs-inner::-webkit-scrollbar {
  display: none;
}

.course-tab {
  flex-shrink: 0;
  display: inline-block;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: color var(--transition), border-color var(--transition);
  white-space: nowrap;
}

.course-tab:hover {
  color: var(--text);
}

.course-tab.is-active {
  color: var(--primary-dark);
  border-bottom-color: var(--primary);
  font-weight: 700;
}

/* ── Player Grid ────────────────────────────────────────────── */
.course-player {
  display: grid;
  grid-template-columns: 340px 1fr;
  min-height: calc(100vh - 120px);
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

/* ── Sidebar ────────────────────────────────────────────────── */
.course-sidebar {
  border-right: 1px solid var(--border);
  background: var(--bg-card);
  position: sticky;
  top: 52px;
  height: calc(100vh - 52px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.course-sidebar-inner {
  padding: 12px 0;
}

.course-lesson-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13.5px;
  color: var(--text-secondary);
  border-left: 3px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  line-height: 1.4;
}

.course-lesson-link:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.course-lesson-link.is-active {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-left-color: var(--primary);
  font-weight: 700;
}

.course-lesson-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  margin-top: 1px;
}

.course-lesson-link.is-active .course-lesson-num {
  background: var(--primary);
  color: #fff;
}

.course-lesson-num--done {
  background: #dcfce7 !important;
  color: #16a34a !important;
}

.course-lesson-link.is-done .course-lesson-name {
  color: var(--text-muted);
}

.course-lesson-name {
  flex: 1;
}

/* ── Content Area ───────────────────────────────────────────── */
.course-content {
  background: var(--bg);
  overflow-y: auto;
}

.course-content-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px var(--container-px) 80px;
}

.course-lesson-heading {
  font-size: 28px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.25;
}

.course-lesson-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

/* ── Audio ──────────────────────────────────────────────────── */
.course-audios {
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.caudio {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  padding: 14px 18px;
  transition: box-shadow 0.18s;
}

.caudio:hover {
  box-shadow: 0 4px 16px rgba(37, 99, 235, .1);
}

.caudio.is-playing {
  border-left-color: var(--primary-dark);
  box-shadow: 0 4px 20px rgba(37, 99, 235, .15);
}

.caudio-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background 0.15s, transform 0.12s;
}

.caudio-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.07);
}

.caudio-btn:active {
  transform: scale(0.95);
}

.caudio-body {
  flex: 1;
  min-width: 0;
}

.caudio-label-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 8px;
}

.caudio-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  flex: 1;
  word-break: break-word;
  line-height: 1.4;
}

.caudio-transcript-btn {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 7px;
  cursor: pointer;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}

.caudio-transcript-btn:hover,
.caudio-transcript-btn.is-open {
  background: #F0FDF4;
  border-color: #86EFAC;
  color: var(--accent-green);
}

.caudio-transcript {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-secondary);
  background: #F8FAFC;
  border-left: 3px solid #86EFAC;
  border-radius: 0 6px 6px 0;
  padding: 8px 12px;
  margin-bottom: 8px;
  display: none;
}

.caudio-transcript.is-open {
  display: block;
}

.caudio-track {
  display: flex;
  align-items: center;
  gap: 10px;
}

.caudio-bar {
  flex: 1;
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  transition: height 0.15s;
}

.caudio-bar:hover {
  height: 7px;
}

.caudio-bar:hover .caudio-thumb {
  opacity: 1;
}

.caudio-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  width: 0%;
  pointer-events: none;
  position: relative;
}

.caudio-thumb {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary-dark);
  opacity: 0;
  transition: opacity 0.15s;
}

.caudio-times {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  display: flex;
  gap: 2px;
}

.caudio-speeds {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.caudio-speed {
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.13s, color 0.13s, border-color 0.13s;
  line-height: 1.6;
}

.caudio-speed:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.caudio-speed.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ── Images ─────────────────────────────────────────────────── */
.course-images {
  margin: 24px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.course-image-figure {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.course-image {
  width: 100%;
  height: auto;
  display: block;
}

.course-image-caption {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

/* ── Prev/Next nav ──────────────────────────────────────────── */
.course-lesson-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.course-nav-btn {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  max-width: 48%;
  line-height: 1.4;
}

.course-nav-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
}

/* ── Post body typography ────────────────────────────────────── */
.post-body {
  font-size: 17px;
  line-height: 1.85;
  color: var(--text);
  word-break: break-word;
  overflow-wrap: break-word;
}

.post-body>*+* {
  margin-top: 1.2em;
}

/* Headings */
.post-body h2 {
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 800;
  line-height: 1.3;
  color: var(--text);
  margin: 2.2em 0 0.6em;
  padding-bottom: 0.35em;
  border-bottom: 2px solid var(--primary-light);
  letter-spacing: -0.01em;
}

.post-body h3 {
  font-size: clamp(17px, 2.5vw, 21px);
  font-weight: 800;
  line-height: 1.35;
  color: var(--text);
  margin: 1.8em 0 0.5em;
}

.post-body h4 {
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-secondary);
  margin: 1.5em 0 0.4em;
}

.post-body p {
  margin-bottom: 1.15em;
}

.post-body p:last-child {
  margin-bottom: 0;
}

.post-body a {
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

.post-body a:hover {
  color: var(--primary);
}

.post-body ul,
.post-body ol {
  padding-left: 1.5em;
  margin: 0.8em 0 1.2em;
}

.post-body li {
  margin-bottom: 0.45em;
  line-height: 1.7;
}

.post-body li::marker {
  color: var(--primary);
}

.post-body ol li::marker {
  font-weight: 700;
}

.post-body blockquote {
  border-left: 4px solid var(--primary);
  background: var(--primary-light);
  padding: 16px 20px 16px 24px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.6em 0;
  color: var(--text-secondary);
  font-style: italic;
  font-weight: 600;
  font-size: 1.02em;
}

.post-body strong {
  font-weight: 800;
  color: var(--text);
}

.post-body em {
  font-style: italic;
}

.post-body code {
  background: var(--bg-alt);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.87em;
  font-family: 'Courier New', monospace;
  color: var(--primary-dark);
  font-weight: 700;
}

.post-body pre {
  background: var(--bg-dark);
  color: #93C5FD;
  padding: 20px 24px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.6em 0;
  font-size: 0.88em;
  line-height: 1.65;
}

.post-body pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.post-body figure {
  margin: 2em 0;
}

.post-body figure img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  height: auto;
  display: block;
}

.post-body figcaption {
  font-size: 0.82em;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.5em;
  line-height: 1.5;
  font-style: italic;
}

.post-body img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 1.6em auto;
  max-width: 100%;
  height: auto;
  display: block;
}

.post-body hr {
  border: none;
  border-top: 2px solid var(--border);
  margin: 2.5em 0;
}

.post-body>p:first-of-type {
  font-size: 1.06em;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ── Post content (alias for .post-body) ────────────────────── */
.post-content {
  font-size: 17px;
  line-height: 1.85;
  color: var(--text);
  word-break: break-word;
  overflow-wrap: break-word;
}

.post-content>*+* {
  margin-top: 1.2em;
}

.post-content h2 {
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 800;
  line-height: 1.3;
  color: var(--text);
  margin: 2.2em 0 0.6em;
  padding-bottom: 0.35em;
  border-bottom: 2px solid var(--primary-light);
  letter-spacing: -0.01em;
}

.post-content h3 {
  font-size: clamp(17px, 2.5vw, 21px);
  font-weight: 800;
  line-height: 1.35;
  color: var(--text);
  margin: 1.8em 0 0.5em;
}

.post-content h4 {
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-secondary);
  margin: 1.5em 0 0.4em;
}

.post-content p {
  margin-bottom: 1.15em;
}

.post-content p:last-child {
  margin-bottom: 0;
}

.post-content a {
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

.post-content a:hover {
  color: var(--primary);
}

.post-content ul,
.post-content ol {
  padding-left: 1.5em;
  margin: 0.8em 0 1.2em;
}

.post-content li {
  margin-bottom: 0.45em;
  line-height: 1.7;
}

.post-content li::marker {
  color: var(--primary);
}

.post-content ol li::marker {
  font-weight: 700;
}

.post-content blockquote {
  border-left: 4px solid var(--primary);
  background: var(--primary-light);
  padding: 16px 20px 16px 24px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.6em 0;
  color: var(--text-secondary);
  font-style: italic;
  font-weight: 600;
  font-size: 1.02em;
}

.post-content strong {
  font-weight: 800;
  color: var(--text);
}

.post-content em {
  font-style: italic;
}

.post-content code {
  background: var(--bg-alt);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.87em;
  font-family: 'Courier New', monospace;
  color: var(--primary-dark);
  font-weight: 700;
}

.post-content pre {
  background: var(--bg-dark);
  color: #93C5FD;
  padding: 20px 24px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.6em 0;
  font-size: 0.88em;
  line-height: 1.65;
}

.post-content pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.post-content figure {
  margin: 2em 0;
}

.post-content figure img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  height: auto;
  display: block;
}

.post-content figcaption {
  font-size: 0.82em;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.5em;
  line-height: 1.5;
  font-style: italic;
}

.post-content img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 1.6em auto;
  max-width: 100%;
  height: auto;
  display: block;
}

.post-content hr {
  border: none;
  border-top: 2px solid var(--border);
  margin: 2.5em 0;
}

.post-content>p:first-of-type {
  font-size: 1.06em;
  color: var(--text-secondary);
  line-height: 1.8;
}

.post-content mark {
  background: #fef9c3;
  color: #713f12;
  border-radius: 3px;
  padding: 1px 4px;
}

.post-content sub {
  font-size: 0.75em;
  vertical-align: sub;
}

.post-content sup {
  font-size: 0.75em;
  vertical-align: super;
}

.post-content li.list-check {
  list-style: none;
  padding-left: 0;
  position: relative;
}

.post-content li.list-check::before {
  content: '☐';
  margin-right: 6px;
  color: var(--text-muted);
}

.post-content li.list-check--done::before {
  content: '☑';
  color: var(--accent-green);
}

.row-lg-50 {
  width: 50%;
  float: left;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .row-sm-100 {
    width: 100%;
  }

  .nav-inner {
    justify-content: space-between;
  }

  .nav-burger {
    display: flex;
  }

  .nav-logo-name {
    display: none;
  }

  .nav-auth {
    display: none;
  }

  .hero-bg-img {
    object-position: center right;
  }

  .hero {
    padding: 72px var(--container-px) 64px;
    min-height: 420px;
  }

  .hero-btns {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-primary,
  .btn-outline {
    width: 100%;
    max-width: 300px;
  }

  .cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

  .res-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  .footer-wave {
    margin-top: var(--space-xl);
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .page-body {
    grid-template-columns: 1fr;
  }

  .page-sidebar {
    position: static;
  }

  .section {
    padding: 32px 0;
  }

  .newsletter {
    padding: 48px var(--container-px);
  }

  .newsletter-row {
    flex-direction: column;
    align-items: stretch;
  }

  .newsletter-input {
    min-width: unset;
  }

  .newsletter-row .btn-primary {
    width: 100%;
  }

  .stat-bar {
    gap: 24px;
  }

  .course-player {
    grid-template-columns: 1fr;
    min-height: unset;
  }

  .course-sidebar {
    position: static;
    height: auto;
    max-height: 220px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .course-content-inner {
    padding: 24px 0 48px;
  }

  .course-lesson-heading {
    font-size: 22px;
  }

  .course-tab {
    padding: 12px 14px;
    font-size: 13px;
  }

  .course-images {
    grid-template-columns: 1fr;
  }

  .auth-card,
  .auth-card-register {
    padding: 28px 20px;
  }

  .auth-page {
    padding: 32px var(--container-px);
  }

  .lesson-paywall-inner {
    padding: 28px 20px;
  }

  .post-content {
    font-size: 16px;
  }

  .post-content h2 {
    font-size: 20px;
  }

  .post-content h3 {
    font-size: 17px;
  }

  .post-content h4 {
    font-size: 15px;
  }

  .post-body {
    font-size: 16px;
  }

  .post-body h2 {
    font-size: 20px;
  }

  .post-body h3 {
    font-size: 17px;
  }

  .post-body h4 {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  :root {
    --container-px: 16px;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-nl-form {
    flex-direction: column;
  }

  .footer-nl-btn {
    width: 100%;
  }

  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cat-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 7px);
  }

  .filter-bar {
    gap: 6px;
  }

  .filter-pill {
    font-size: 12px;
    padding: 5px 12px;
  }

  .lesson-paywall-inner h3 {
    font-size: 18px;
  }

  .btn-primary,
  .btn-outline {
    width: 100%;
    max-width: 100%;
  }
}

@media (min-width: 1100px) {
  .post-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Ultra-wide screens (1920px+) ───────────────────────────── */
@media (min-width: 1920px) {
  :root {
    --container-max: 1440px;
    --container-px: 48px;
  }

  .hero {
    min-height: 520px;
  }

  /* Clamp ảnh hero không scale vô tận — giữ safe zone ở giữa */
  .hero-bg-img {
    object-position: center 30%;
  }
}

@media (min-width: 2400px) {
  :root {
    --container-max: 1440px;
  }

  .hero {
    min-height: 600px;
  }
}

/* =============================================================
   Course Detail Page (.cd-*)
   ============================================================= */

/* Hero */
.cd-hero {
  position: relative;
  width: 100%;
  height: clamp(220px, 28vw, 380px);
  overflow: hidden;
  background: #0f2044;
}

.cd-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .55;
}

.cd-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 20, 60, .85) 0%, rgba(10, 20, 60, .3) 60%, transparent 100%);
}

.cd-hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px var(--container-px) 32px;
  max-width: calc(var(--container-max) + var(--container-px) * 2);
  margin: 0 auto;
}

.cd-hero-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.cd-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .25);
}

.cd-hero-title {
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .35);
  margin: 0;
}

/* Body layout */
.cd-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
  padding-top: 32px;
  padding-bottom: 60px;
}

.cd-main {
  min-width: 0;
}

/* Stats strip */
.cd-stats {
  display: flex;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: var(--shadow-card);
}

.cd-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  border-right: 1px solid var(--border);
  text-align: center;
}

.cd-stat:last-child {
  border-right: none;
}

.cd-stat-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.cd-stat-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.cd-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Description */
.cd-desc-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-card);
}

.cd-desc-section h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* .cd-desc inherits all .post-content styles — no overrides */
.cd-desc {
  font-size: 15px;
}

/* Lessons */
.cd-lessons-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.cd-lessons-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.cd-lessons-head h2 {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.cd-lessons-count {
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  font-weight: 600;
}

.cd-lesson-list {
  display: flex;
  flex-direction: column;
}

.cd-lesson-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: background .15s;
}

.cd-lesson-item:last-child {
  border-bottom: none;
}

.cd-lesson-item:hover {
  background: var(--primary-light);
}

.cd-lesson-item--locked {
  color: var(--text-muted);
}

.cd-lesson-item--locked:hover {
  background: var(--bg-alt);
}

.cd-lesson-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cd-lesson-item--locked .cd-lesson-num {
  background: var(--bg-alt);
  color: var(--text-muted);
}

.cd-lesson-info {
  flex: 1;
  min-width: 0;
}

.cd-lesson-title {
  font-size: 14px;
  font-weight: 600;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cd-lesson-lock {
  font-size: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.cd-lesson-arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}

.cd-lesson-item:hover .cd-lesson-arrow {
  background: var(--primary);
  color: #fff;
}

/* Sidebar */
.cd-sidebar {
  position: sticky;
  top: 88px;
}

.cd-sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.cd-sidebar-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.cd-sidebar-thumb-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.cd-sidebar-body {
  padding: 20px;
}

.cd-sidebar-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.cd-sidebar-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.cd-sidebar-meta-row strong {
  margin-left: auto;
  color: var(--text);
  font-weight: 600;
}

.cd-start-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  color: #fff;
  text-decoration: none;
  transition: opacity .2s, transform .15s;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .35);
}

.cd-start-btn:hover {
  opacity: .92;
  transform: translateY(-1px);
}

.cd-login-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  justify-content: center;
  margin-top: 10px;
}

.cd-first-lesson-note {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
  padding: 8px 10px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
}

/* Mobile */
@media (max-width: 768px) {
  .cd-body {
    grid-template-columns: 1fr;
  }

  .cd-sidebar {
    position: static;
    order: -1;
  }

  .cd-hero {
    height: clamp(180px, 45vw, 260px);
  }

  .cd-hero-title {
    font-size: 20px;
  }

  .cd-stats {
    flex-wrap: wrap;
  }

  .cd-stat {
    flex: 1 1 calc(50% - 1px);
    border-bottom: 1px solid var(--border);
  }

  .cd-stat:nth-child(even) {
    border-right: none;
  }

  .cd-lesson-item {
    padding: 12px 16px;
  }
}

/* =============================================================
   Game Sections (.gs-*, .game-sections)
   ============================================================= */

.game-sections {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 32px;
}

.gs-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.gs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.gs-head-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gs-icon {
  font-size: 20px;
  line-height: 1;
}

.gs-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}

.gs-point {
  font-size: 12px;
  font-weight: 700;
  color: var(--secondary);
  background: var(--secondary-light);
  padding: 2px 8px;
  border-radius: 999px;
}

.gs-desc {
  padding: 10px 18px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.gs-body {
  padding: 18px;
  position: relative;
}

.gs-body--locked {
  user-select: none;
  pointer-events: none;
  min-height: 120px;
}

.gs-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(3px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  pointer-events: all;
}

/* =============================================================
   Shared game primitives (.g-btn, .g-hidden, .g-done, .g-score)
   ============================================================= */

.g-hidden {
  display: none !important;
}

.g-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, opacity .15s;
}

.g-btn:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.g-btn:disabled {
  opacity: .45;
  cursor: default;
}

.g-btn--ghost {
  background: transparent;
  color: var(--primary);
}

.g-btn--ghost:hover {
  background: var(--primary-light);
}

.g-done {
  margin-top: 14px;
  padding: 12px 16px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: var(--radius);
  color: #15803d;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
}

.g-score {
  text-align: right;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* =============================================================
   Vocab Carousel (.g-vocab)
   ============================================================= */

.g-vocab-items {
  min-height: 200px;
}

.g-vocab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

.g-vocab-wrap {
  width: 180px;
  height: 180px;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
  transition: transform .15s, box-shadow .15s;
}

.g-vocab-wrap:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .15);
}

.g-vocab-img {
  max-width: 170px;
  max-height: 170px;
  object-fit: cover;
}

.g-vocab-img--pulse {
  animation: pulse-once .3s ease;
}

@keyframes pulse-once {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.06);
  }

  100% {
    transform: scale(1);
  }
}

.g-vocab-word {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.g-vocab-trans {
  font-size: 15px;
  color: var(--text-secondary);
}

.g-vocab-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 14px;
}

.g-counter {
  font-size: 13px;
  color: var(--text-muted);
  min-width: 40px;
  text-align: center;
}

/* =============================================================
   Shared quiz chrome (.g-quiz-*) — used by choice + word-to-image
   ============================================================= */

.g-quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.g-quiz-dots {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.g-quiz-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
  transition: background .2s, transform .15s;
  flex-shrink: 0;
}

.g-quiz-dot.is-cur {
  background: var(--primary);
  transform: scale(1.3);
}

.g-quiz-dot.is-ok {
  background: #16a34a;
}

.g-quiz-dot.is-err {
  background: #dc2626;
}

.g-quiz-score {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}

.g-quiz-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 16px;
}

.g-quiz-counter {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  min-width: 44px;
  text-align: center;
}

/* =============================================================
   Choice Game (.g-choice) — wordGameCard
   ============================================================= */

.g-choice-items {
  min-height: 160px;
}

.g-choice-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.g-choice-q {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.g-choice-img-wrap {
  width: 180px;
  height: 180px;
  padding: 5px;
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.g-choice-img {
  max-width: 170px;
  max-height: 170px;
  object-fit: cover;
}

.g-choice-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.g-choice-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, background .15s, color .15s, transform .1s;
  width: 100%;
}

.g-choice-opt:hover:not([disabled]) {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-1px);
}

.g-opt-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 1.5px solid var(--border-strong);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: background .15s, border-color .15s, color .15s;
}

.g-choice-opt:hover .g-opt-label {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.g-opt-text {
  flex: 1;
}

.g-opt--ok {
  border-color: #16a34a !important;
  background: #f0fdf4 !important;
  color: #16a34a !important;
  cursor: default;
  animation: opt-pop .25s ease;
}

.g-opt--ok .g-opt-label {
  background: #16a34a !important;
  border-color: #16a34a !important;
  color: #fff !important;
}

.g-opt--err {
  border-color: #dc2626 !important;
  background: #fef2f2 !important;
  color: #dc2626 !important;
  cursor: default;
  animation: shake .3s ease;
}

.g-opt--err .g-opt-label {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #fff !important;
}

@keyframes opt-pop {
  0% {
    transform: scale(1);
  }

  40% {
    transform: scale(1.03);
  }

  100% {
    transform: scale(1);
  }
}

/* =============================================================
   Word-to-Image (.g-wti) — wordToImage
   ============================================================= */

.g-wti-items {
  min-height: 160px;
}

.g-wti-q {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  justify-content: center;
}

.g-wti-word {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.g-wti-imgs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.g-wti-img-wrap {
  width: 180px;
  display: flex;
  padding: 5px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 3px solid var(--border);
  transition: border-color .15s, transform .15s;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.g-wti-img-wrap:hover {
  border-color: var(--primary);
  transform: scale(1.03);
}

.g-wti-img {
  max-width: 170px;
  max-height: 170px;
  object-fit: cover;
}

.g-img--ok {
  border-color: #16a34a !important;
  box-shadow: 0 0 0 3px #86efac;
}

.g-img--err {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px #fca5a5;
}

/* =============================================================
   Match Translation (.g-match) — matchTranslation
   ============================================================= */

.g-match-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  text-align: center;
}

.g-match-cols {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  position: relative;
}

.g-match-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.g-match-left,
.g-match-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 3;
}

.g-match-item {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, background .15s, box-shadow .15s;
}

.g-match-item:hover:not([data-done]) {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.g-match-lrow {
  display: flex;
  align-items: center;
  gap: 6px;
}

.g-match-play {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  font-size: 9px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s, color .15s;
}

.g-match-play:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.g-match-play-gap {
  flex-shrink: 0;
  width: 26px;
}

.g-match-item {
  flex: 1;
}

.g-match-sel {
  border-color: var(--primary) !important;
  background: var(--primary-light) !important;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 15, 32, 68), .12) !important;
  font-weight: 700;
}

.g-match-ok {
  cursor: default;
  font-weight: 600;
}

.g-match-err {
  border-color: #dc2626 !important;
  background: #fef2f2 !important;
  animation: shake .3s ease;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-4px);
  }

  75% {
    transform: translateX(4px);
  }
}

.g-match-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  min-height: 32px;
}

.g-match-status {
  font-size: 13px;
  color: var(--text-muted);
}

@media (max-width: 500px) {
  .g-match-cols {
    gap: 16px;
  }

  .g-match-item {
    font-size: 13px;
    padding: 8px 10px;
  }
}

/* =============================================================
   Sentence Order (.g-order) — drag-and-drop
   ============================================================= */

.g-order-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.g-order-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.g-order-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  user-select: none;
  -webkit-user-select: none;
  transition: border-color .15s, background .15s, opacity .15s, box-shadow .15s;
  position: relative;
}

.g-order-item:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}

/* Drag handle */
.g-order-handle {
  color: var(--text-muted);
  cursor: grab;
  flex-shrink: 0;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color .15s, background .15s;
  touch-action: none;
  display: flex;
  align-items: center;
}

.g-order-handle:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.g-order-handle:active,
.g-order-handle:active * {
  cursor: grabbing;
}

.g-order-text {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.55;
}

/* Source placeholder while dragging */
.g-order-ghost-src {
  opacity: 0.35 !important;
  border-style: dashed !important;
  border-color: var(--primary) !important;
  background: var(--bg-alt) !important;
}

/* Drop-target indicators */
.g-drop-before,
.g-drop-after {
  transition: box-shadow .1s;
}

.g-drop-before::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  box-shadow: 0 0 6px var(--primary);
}

.g-drop-after::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  box-shadow: 0 0 6px var(--primary);
}

/* Just-dropped highlight — fades out via JS class removal */
.g-order-dropped {
  border-color: var(--primary) !important;
  background: var(--primary-light, #eff6ff) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .18) !important;
  transition: border-color 1.2s ease, background 1.2s ease, box-shadow 1.2s ease !important;
}

/* Check result */
.g-order-ok {
  border-color: #16a34a !important;
  background: #f0fdf4 !important;
}

.g-order-ok .g-order-text {
  color: #166534;
}

.g-order-err {
  border-color: #dc2626 !important;
  background: #fef2f2 !important;
  animation: shake .35s ease;
}

/* =============================================================
   Sentence Builder (.g-builder) — sentenceBuilder
   ============================================================= */

/* Builder header: progress + hint */
.g-builder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.g-builder-prog {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.g-builder-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.g-builder-slots-label,
.g-builder-bank-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.g-builder-slots-label {
  margin-top: 4px;
}

.g-builder-bank-label {
  margin-top: 18px;
  color: var(--text-muted);
}

/* Slot container */
.g-builder-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 12px;
  background: var(--bg-alt);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  min-height: 60px;
  align-items: center;
}

/* Individual slot box */
.g-builder-slot {
  min-width: 64px;
  min-height: 40px;
  padding: 7px 12px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  transition: border-color .15s, background .15s, transform .1s;
  font-size: 14px;
  user-select: none;
}

.g-builder-slot.g-slot-filled {
  border-style: solid;
  border-color: var(--primary);
  background: var(--primary-light);
  cursor: pointer;
  transform: scale(1.02);
}

.g-builder-slot.g-slot-filled:hover {
  border-color: var(--primary-dark);
  background: #dbeafe;
}

.g-slot-idx {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.g-slot-word {
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
}

.g-slot-ok {
  border-color: #16a34a !important;
  background: #f0fdf4 !important;
  transform: scale(1) !important;
}

.g-slot-ok .g-slot-word {
  color: #16a34a;
}

.g-slot-err {
  border-color: #dc2626 !important;
  background: #fef2f2 !important;
  animation: shake .35s ease;
}

.g-slot-err .g-slot-word {
  color: #dc2626;
}


.g-builder-words {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.g-word-chip {
  padding: 8px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, background .15s, opacity .15s;
}

.g-word-chip:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.g-word-used {
  opacity: .35;
  cursor: default;
}

.g-feedback {
  margin-top: 8px;
  font-weight: 700;
  font-size: 14px;
}

/* =============================================================
   Video game (.g-video)
   ============================================================= */

.g-video {
  width: 100%;
}

.g-video-player {
  width: 100%;
}

/* ── Custom video player ── */
.g-vid-wrap {
  position: relative;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  user-select: none;
}

.g-video-el {
  width: 100%;
  height: auto;
  display: block;
  max-height: 420px;
  object-fit: contain;
}

/* Overlay (shown before first play) */
.g-vid-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  transition: background .2s;
  cursor: pointer;
}

.g-vid-overlay:hover {
  background: rgba(0, 0, 0, 0.42);
}

.g-vid-overlay.g-hidden {
  display: none;
}

.g-vid-big-play {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.38);
  transition: transform .18s, background .18s;
  padding-left: 4px;
}

.g-vid-big-play:hover {
  transform: scale(1.1);
  background: #fff;
}

/* Controls bar (hidden, shown on hover or pause) */
.g-vid-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  padding: 28px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  opacity: 0;
  transition: opacity .22s;
  pointer-events: none;
}

.g-vid-wrap:hover .g-vid-controls,
.g-vid-wrap.is-paused .g-vid-controls {
  opacity: 1;
  pointer-events: auto;
}

/* Seek bar */
.g-vid-seek {
  position: relative;
  height: 4px;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 2px;
  cursor: pointer;
  transition: height .15s;
}

.g-vid-wrap:hover .g-vid-seek {
  height: 5px;
}

.g-vid-seek-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  width: 0;
  pointer-events: none;
}

/* Bottom control row */
.g-vid-cbar {
  display: flex;
  align-items: center;
  gap: 6px;
}

.g-vid-pp {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  line-height: 1;
  flex-shrink: 0;
}

.g-vid-time {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.g-vid-spacer {
  flex: 1;
}

.g-vid-speed {
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 10px;
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
  line-height: 1.5;
}

.g-vid-speed:hover {
  border-color: rgba(255, 255, 255, 0.9);
  color: #fff;
}

.g-vid-speed.is-active {
  background: rgba(255, 255, 255, 0.9);
  color: #111;
  border-color: transparent;
}

.g-vid-fs {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  line-height: 1;
  flex-shrink: 0;
}

.g-vid-fs:hover {
  color: #fff;
}

.g-yt-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
}

.g-yt-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* =============================================================
   About Section
   ============================================================= */

.about-section {
  background: var(--bg-alt);
}

/* ── Method Highlight Banner ─────────────────────────────────── */
.about-method-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #1d4ed8 100%);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  margin-bottom: 56px;
  position: relative;
  overflow: hidden;
}

/* Decorative circles */
.about-method-banner::before,
.about-method-banner::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.about-method-banner::before {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(37, 99, 235, .25) 0%, transparent 70%);
  top: -150px;
  right: -100px;
}

.about-method-banner::after {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 255, 255, .08) 0%, transparent 70%);
  bottom: -100px;
  left: -80px;
}

.about-method-header {
  text-align: center;
  margin-bottom: 36px;
  position: relative;
  z-index: 1;
}

.about-method-badge {
  display: inline-block;
  background: rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .9);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, .2);
  margin-bottom: 14px;
  backdrop-filter: blur(6px);
}

.about-method-title {
  font-size: clamp(20px, 3.5vw, 30px);
  font-weight: 900;
  color: #fff;
  margin: 0 0 12px;
  line-height: 1.25;
  letter-spacing: -.02em;
}

.about-method-desc {
  font-size: 15px;
  color: rgba(255, 255, 255, .7);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

.about-method-desc strong {
  color: #93C5FD;
  font-weight: 700;
}

.about-method-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  position: relative;
  z-index: 1;
}

.about-method-card {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  transition: background var(--transition), transform var(--transition), border-color var(--transition);
  backdrop-filter: blur(4px);
}

.about-method-card:hover {
  background: rgba(255, 255, 255, .13);
  border-color: rgba(255, 255, 255, .25);
  transform: translateY(-4px);
}

.about-method-icon {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 12px;
}

.about-method-card-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px;
  line-height: 1.3;
}

.about-method-card-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, .6);
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 768px) {
  .about-method-banner {
    padding: 32px 24px;
  }

  .about-method-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .about-method-banner {
    padding: 28px 20px;
    border-radius: var(--radius-lg);
  }

  .about-method-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .about-method-card {
    padding: 18px 14px;
  }
}

.about-bottom {
  display: flex;
  gap: 48px;
  align-items: center;
}

.about-text {
  flex: 1;
}

.about-desc {
  color: var(--text-secondary);
  margin: 16px 0;
  line-height: 1.7;
}

.section-header-left {
  margin-bottom: 20px;
}

.section-subtitle {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 10px;
}

.about-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.about-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
}

.about-check {
  color: var(--accent-green);
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 2px;
}

.about-img-wrap {
  flex-shrink: 0;
  position: relative;
  width: clamp(240px, 40%, 420px);
}

.about-img-wrap img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.about-stat {
  position: absolute;
  bottom: -16px;
  left: -16px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  padding: 12px 20px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.about-stat strong {
  display: block;
  font-size: 26px;
  font-weight: 900;
}

.about-stat span {
  font-size: 13px;
  opacity: .9;
}

@media (max-width: 768px) {
  .about-top {
    flex-direction: column;
  }

  .about-top-img {
    width: 100%;
  }

  .about-bottom {
    flex-direction: column;
    gap: 24px;
  }

  .about-img-wrap {
    width: 100%;
  }

  .about-stat {
    bottom: 12px;
    left: 12px;
  }

  .about-method-banner {
    margin-bottom: 32px;
  }
}

/* =============================================================
   FAQ Section
   ============================================================= */

.faq-section {
  background: var(--bg-alt);
}

.faq-list--full {
  max-width: 760px;
  margin: 0 auto;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
}

.faq-question {
  padding: 16px 20px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--text);
  transition: background var(--transition);
}

.faq-question:hover {
  background: var(--primary-light);
}

.faq-item[open] .faq-question {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.faq-question::after {
  content: '+';
  font-size: 20px;
  font-weight: 400;
  color: var(--primary);
  flex-shrink: 0;
}

.faq-item[open] .faq-question::after {
  content: '−';
}

.faq-answer {
  padding: 0 20px 16px;
}

.faq-answer p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}


/* =============================================================
   Work / How It Works Section
   ============================================================= */

.work-section {
  background: linear-gradient(160deg, #0f172a 0%, #1e3a8a 100%);
  position: relative;
  overflow: hidden;
}

.work-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/assets/work-bg.webp');
  background-size: cover;
  background-position: center;
  opacity: 0.5;
  pointer-events: none;
}

.work-section>.container {
  position: relative;
  z-index: 1;
}

.work-section .section-subtitle {
  background: rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .85);
}

.work-section .section-title {
  color: #fff;
}

.work-section .section-header {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.work-grid {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-top: 48px;
}

.work-card {
  flex: 1;
  min-width: 0;
  background: #00000033;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: transform .2s, background .2s;
}

.work-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, .12);
}

.work-card--blue {
  border-top: 3px solid var(--primary);
}

.work-card--orange {
  border-top: 3px solid var(--secondary);
}

.work-card--green {
  border-top: 3px solid var(--accent-green);
}

.work-card--purple {
  border-top: 3px solid var(--accent-purple);
}

/* Connector arrow between cards */
.work-connector {
  flex-shrink: 0;
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .28);
}

/* Step number — dominant visual */
.work-card-step {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, .15);
  border: 2px solid rgba(255, 255, 255, .25);
}

.work-card--blue .work-card-step {
  background: rgba(37, 99, 235, .55);
  border-color: rgba(37, 99, 235, .8);
}

.work-card--orange .work-card-step {
  background: rgba(249, 115, 22, .55);
  border-color: rgba(249, 115, 22, .8);
}

.work-card--green .work-card-step {
  background: rgba(22, 163, 74, .55);
  border-color: rgba(22, 163, 74, .8);
}

.work-card--purple .work-card-step {
  background: rgba(124, 58, 237, .55);
  border-color: rgba(124, 58, 237, .8);
}

.work-card-icon {
  font-size: 28px;
  margin-bottom: 10px;
  opacity: .85;
  position: absolute;
  right: 15px;
  top: 15px;
}

.work-card-title {
  color: #fff;
  font-size: 17px;
  margin-bottom: 8px;
}

.work-card-desc {
  color: rgba(255, 255, 255, .65);
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .work-grid {
    flex-direction: column;
    gap: 16px;
  }

  .work-connector {
    width: auto;
    height: 32px;
    transform: rotate(90deg);
  }
}

/* =============================================================
   Testimonial Section
   ============================================================= */

.testimonial-section {
  background: var(--bg-alt);
}

.testimonial-section .section-header {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.testimonial-quote {
  font-size: 36px;
  color: var(--primary);
  line-height: 1;
  opacity: .3;
}

.testimonial-text {
  flex: 1;
  color: var(--text-secondary);
  line-height: 1.7;
  font-style: italic;
}

.testimonial-stars {
  display: flex;
  gap: 2px;
}

.star {
  font-size: 16px;
  color: var(--border-strong);
}

.star--filled {
  color: #F59E0B;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.testimonial-name {
  font-weight: 700;
  font-size: 15px;
}

.testimonial-role {
  font-size: 13px;
  color: var(--text-muted);
}

/* =============================================================
   Activities Section
   ============================================================= */

.activities-section {
  background: var(--bg);
}

.activities-inner {
  display: flex;
  gap: 48px;
  align-items: center;
}

.activities-text {
  flex: 1;
}

.activities-desc {
  color: var(--text-secondary);
  margin: 16px 0 24px;
  line-height: 1.7;
}

.activities-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.act-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 16px;
  border-left: 4px solid var(--border);
  transition: transform .2s, box-shadow .2s;
}

.act-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.act-item--blue {
  border-left-color: var(--primary);
}

.act-item--orange {
  border-left-color: var(--secondary);
}

.act-item--green {
  border-left-color: var(--accent-green);
}

.act-item--purple {
  border-left-color: var(--accent-purple);
}

.act-icon {
  font-size: 26px;
  flex-shrink: 0;
}

.act-item h3 {
  font-size: 15px;
  margin: 0;
}

.activities-img-col {
  flex-shrink: 0;
  width: clamp(240px, 40%, 420px);
}

.activities-img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
  .activities-inner {
    flex-direction: column;
    gap: 24px;
  }

  .activities-img-col {
    width: 100%;
  }

  .activities-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================================
   Video Section
   ============================================================= */

.video-section {
  background: #0f2044;
  position: relative;
  overflow: hidden;
}

.video-section-overlay {
  background: linear-gradient(135deg, rgba(15, 23, 42, .92) 0%, rgba(30, 58, 138, .85) 100%);
  padding: var(--space-xl) 0;
  position: relative;
  z-index: 1;
}

.video-section-inner {
  display: flex;
  gap: 48px;
  align-items: center;
}

.video-section-text {
  flex: 1;
}

.video-section-text h2 {
  color: #fff;
  font-size: clamp(20px, 3vw, 28px);
  margin-bottom: 12px;
}

.video-section-text p {
  color: rgba(255, 255, 255, .8);
  line-height: 1.7;
}

.video-embed-wrap {
  flex-shrink: 0;
  width: clamp(240px, 45%, 520px);
}

.video-thumbnail {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
}

.video-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-play-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--primary);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .2s, background .2s;
  box-shadow: var(--shadow-md);
}

.video-play-btn:hover {
  transform: scale(1.1);
  background: #fff;
}

@media (max-width: 768px) {
  .video-section-inner {
    flex-direction: column;
    gap: 24px;
  }

  .video-embed-wrap {
    width: 100%;
  }
}

/* =============================================================
   Course Registration Section
   ============================================================= */

.reg-section {
  background: var(--bg-alt);
}

/* ── Pricing Cards ───────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 900px;
  margin: 0 auto 48px;
}

.pricing-grid--single {
  grid-template-columns: minmax(260px, 360px);
  justify-content: center;
}

.pricing-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s, transform .2s;
  cursor: pointer;
}

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

.pricing-card--featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .08), var(--shadow-md);
}

.pricing-card--selected {
  border-color: var(--secondary) !important;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, .15), var(--shadow-md) !important;
}

.pricing-card--selected::after {
  content: '✓';
  position: absolute;
  top: 14px;
  right: 14px;
  width: 26px;
  height: 26px;
  background: var(--secondary);
  color: #fff;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pricing-tag {
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-align: center;
}

.pricing-tag--popular {
  background: var(--primary);
  color: #fff;
}

.pricing-tag--value {
  background: var(--accent-green);
  color: #fff;
}

.pricing-tag--new {
  background: var(--accent-purple);
  color: #fff;
}

.pricing-body {
  padding: 24px 24px 28px;
}

.pricing-age {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.pricing-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.pricing-tagline {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.pricing-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}

.pricing-price {
  font-size: 36px;
  font-weight: 900;
  color: var(--secondary);
  line-height: 1;
}

.pricing-original {
  font-size: 16px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.pricing-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.pricing-highlights {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.pricing-highlights li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.pricing-check {
  color: var(--accent-green);
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}

.pricing-select-btn {
  width: 100%;
  padding: 13px;
  background: var(--primary);
  color: #fff;
  font-family: 'Nunito', 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background .2s, transform .2s;
}

.pricing-select-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.pricing-card--featured .pricing-select-btn {
  background: var(--secondary);
}

.pricing-card--featured .pricing-select-btn:hover {
  background: var(--secondary-dark);
}

/* ── Form section (shown after selecting) ────────────────────── */
.reg-form-section {
  animation: slideDown .3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reg-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--primary-light);
  border: 1.5px solid rgba(37, 99, 235, .2);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  margin-bottom: 24px;
}

.reg-selected-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

.reg-selected-label {
  color: var(--text-secondary);
}

.reg-selected-info strong {
  color: var(--text);
}

.reg-selected-price {
  background: var(--secondary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.reg-change-btn {
  background: none;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}

.reg-change-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.reg-guarantee {
  margin-top: 20px;
  padding: 14px 16px;
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--accent-green);
  line-height: 1.5;
}

.reg-wrap {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.reg-info {
  flex: 1;
}

.reg-price-tag {
  font-size: 18px;
  margin: 16px 0;
  color: var(--text-secondary);
}

.reg-price-tag strong {
  color: var(--secondary);
  font-size: 24px;
}

.reg-benefits {
  list-style: none;
  margin: 16px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reg-benefits li {
  color: var(--text-secondary);
  font-size: 15px;
}

.reg-contact {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.reg-contact strong {
  font-size: 14px;
  color: var(--text);
}

.reg-contact p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 4px 0;
}

.reg-form-col {
  flex: 1.2;
}

.reg-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  transition: border-color .15s;
  background: var(--bg);
  width: 100%;
  box-sizing: border-box;
}

.form-group select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
  width: 100%;
  color: var(--text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}

.req {
  color: var(--accent-pink);
}

.form-error {
  color: #dc2626;
  font-size: 14px;
  padding: 10px;
  background: #fef2f2;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
  text-align: center;
  justify-content: center;
  padding: 14px;
  font-size: 16px;
}

.reg-success {
  text-align: center;
  padding: 8px 0 20px;
}

.reg-success-icon {
  font-size: 52px;
  margin-bottom: 10px;
  line-height: 1;
}

.reg-success h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

.reg-success>p {
  color: var(--text-secondary);
  margin-bottom: 0;
  font-size: 14px;
}

/* Payment card */
.payment-card {
  display: flex;
  gap: 20px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin: 20px 0 0;
  text-align: left;
}

.payment-qr-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.qr-img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
}

.qr-hint {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  max-width: 130px;
  line-height: 1.4;
}

.payment-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.payment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}

.payment-row:last-child {
  border-bottom: none;
}

.payment-label {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
  white-space: nowrap;
}

.payment-value {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.payment-row--accent .payment-label {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13px;
}

.payment-row--accent .payment-value {
  color: var(--primary);
  font-size: 16px;
  font-weight: 800;
}

.payment-mono {
  font-family: monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text);
}

.payment-copy-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.copy-btn {
  font-size: 11px;
  padding: 3px 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all .15s;
}

.copy-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.copy-btn--copied {
  background: var(--accent-green) !important;
  color: #fff !important;
  border-color: var(--accent-green) !important;
}

.link-inline-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  color: var(--primary);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-inline-btn:hover {
  color: var(--primary-dark);
}

.payment-warning {
  font-size: 13px;
  color: #92400E;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 14px;
  text-align: left;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .reg-wrap {
    flex-direction: column;
    padding: 24px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .payment-card {
    flex-direction: column;
    align-items: center;
  }

  .payment-details {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .reg-wrap {
    padding: 16px;
    border-radius: var(--radius-lg);
  }
}

/* ═══════════════════════════════════════════════════════════════
   Scroll Reveal Animation
   ═══════════════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 0s),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 0s);
}

.reveal.reveal-right {
  transform: translateX(40px);
}

.reveal.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Fallback: nếu JS không chạy được, sau 1.5s tự hiện */
@keyframes revealFallback {
  to {
    opacity: 1;
    transform: none;
  }
}

.reveal:not(.is-visible) {
  animation: revealFallback 0.01s 1.5s forwards;
}

/* ═══════════════════════════════════════════════════════════════
   Course Content Section
   ═══════════════════════════════════════════════════════════════ */
.cc-section {
  background: var(--bg-card);
  overflow: hidden;
}

.cc-inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 64px;
  align-items: center;
}

/* ── Text side ── */
.cc-subtitle-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.cc-subtitle-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

.cc-subtitle-text {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary);
}

.cc-heading {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 900;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -.02em;
  margin-bottom: 16px;
}

.cc-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 480px;
}

.cc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}

.cc-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

.cc-item.reveal {
  transform: translateX(-20px);
}

.cc-item.reveal.is-visible {
  transform: translateX(0);
}

.cc-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #DCFCE7;
  color: var(--accent-green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.cc-cta {
  display: inline-block;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 700;
}

/* ── Visual side ── */
.cc-visual {
  position: relative;
  flex-shrink: 0;
}

.cc-img-wrap {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/5;
  background: var(--bg-alt);
}

.cc-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cc-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 14px;
  background: var(--bg-alt);
}

.cc-badge {
  position: absolute;
  bottom: -16px;
  right: -16px;
  background: var(--secondary);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  box-shadow: 0 8px 24px rgba(249, 115, 22, .35);
  animation: ccBadgePop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: 0.8s;
}

@keyframes ccBadgePop {
  from {
    opacity: 0;
    transform: scale(0.7) rotate(-8deg);
  }

  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.cc-badge-num {
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.cc-badge-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .9;
}

/* ── Decorative floating icons ── */
.cc-deco {
  position: absolute;
  font-size: 28px;
  z-index: 2;
  animation: ccFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .15));
}

.cc-deco-1 {
  top: -20px;
  left: -28px;
  animation-delay: 0s;
}

.cc-deco-2 {
  top: 40%;
  left: -36px;
  animation-delay: 1.5s;
}

@keyframes ccFloat {

  0%,
  100% {
    transform: translateY(0px) rotate(-4deg);
  }

  50% {
    transform: translateY(-10px) rotate(4deg);
  }
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .cc-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .cc-visual {
    max-width: 400px;
    margin: 0 auto;
  }

  .cc-badge {
    bottom: -12px;
    right: -8px;
  }

  .cc-deco {
    display: none;
  }
}

@media (max-width: 480px) {
  .cc-heading {
    font-size: 22px;
  }

  .cc-badge {
    padding: 10px 14px;
    bottom: -10px;
    right: -4px;
  }

  .cc-badge-num {
    font-size: 18px;
  }
}

/* ── Account pages ─────────────────────────────────────────────────────────── */
.account-section-title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f3f4f6;
}

.account-section .form-group {
  margin-bottom: 16px;
}

.account-section .form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.account-section .form-group input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  color: #111827;
  background: #fff;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.account-section .form-group input:focus {
  border-color: #0f2044;
}

@media (max-width: 640px) {
  main>div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}

.wrap-match-item {
  position: relative;
}

button.g-match-play.g-audio-btn {
  position: absolute;
  left: -15px;
  top: 8px;
}

/* ── Contact page ── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 860px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

.contact-info-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--heading-color, #0f2044);
  margin: 0 0 20px;
}

.contact-info-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: #f8faff;
  border: 1px solid #e5eaf5;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

a.contact-info-item:hover {
  border-color: #0f2044;
  box-shadow: 0 2px 8px rgba(15, 32, 68, .08);
}

.contact-info-icon {
  width: 38px;
  height: 38px;
  background: #e8edf8;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #0f2044;
}

.contact-info-label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 2px;
}

.contact-info-value {
  font-size: 15px;
  font-weight: 600;
  color: #0f2044;
}

.contact-social {
  margin-bottom: 28px;
}

.contact-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contact-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.contact-social-btn:hover {
  background: #e8edf8;
  border-color: #0f2044;
  color: #0f2044;
}

.contact-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: #78350f;
  line-height: 1.5;
}

.contact-form-wrap {
  background: #fff;
  border: 1px solid #e5eaf5;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 24px rgba(15, 32, 68, .06);
}

@media (max-width: 640px) {
  .contact-form-wrap {
    padding: 20px 16px;
    border-radius: 12px;
  }
}

.contact-form-success {
  text-align: center;
  padding: 40px 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 560px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

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

.form-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #dc2626;
  margin-bottom: 14px;
}