:root {
  --navy: #073873;
  --blue: #0d4a8f;
  --orange: #fd5f0d;
  --orange-dark: #d94e08;
  --ink: #172033;
  --muted: #657085;
  --line: #dce4ef;
  --surface: #ffffff;
  --soft: #f4f7fb;
  --cream: #fff7e7;
  --shadow: 0 20px 50px rgba(7, 56, 115, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Be Vietnam Pro", Arial, sans-serif;
  background: var(--surface);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 12px clamp(18px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(220, 228, 239, 0.84);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  font-size: 1.05rem;
  font-weight: 800;
}

.brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.brand:hover img {
  box-shadow: 0 10px 24px rgba(7, 56, 115, 0.14);
  transform: translateY(-1px) scale(1.04);
}

.main-nav {
  display: flex;
  gap: clamp(14px, 3vw, 32px);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.main-nav a:hover,
.site-footer a:hover {
  color: var(--orange);
}

.main-nav a {
  position: relative;
  transition: color 180ms ease;
}

.main-nav a::after {
  position: absolute;
  right: 0;
  bottom: -10px;
  left: 0;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 220ms ease;
  content: "";
}

.main-nav a:hover::after {
  transform: scaleX(1);
}

.header-cta,
.primary-button,
.secondary-button {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease,
    background-color 200ms ease, color 200ms ease;
}

.header-cta::before,
.primary-button::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -70%;
  width: 48%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  transform: skewX(-18deg);
  transition: left 520ms ease;
  content: "";
}

.header-cta:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.header-cta:hover::before,
.primary-button:hover::before {
  left: 118%;
}

.header-cta,
.primary-button {
  color: #ffffff;
  background: var(--orange);
  box-shadow: 0 14px 28px rgba(253, 95, 13, 0.26);
}

.header-cta {
  padding: 0 18px;
  white-space: nowrap;
}

/* Nhóm nút bên phải header + nút Đăng nhập/Đăng ký */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-login {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1.5px solid rgba(7, 56, 115, 0.16);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 200ms ease, color 200ms ease, background-color 200ms ease;
}

.header-login:hover {
  border-color: var(--blue, #0d4a8f);
  background: rgba(7, 56, 115, 0.04);
}

.primary-button {
  border: 0;
  padding: 0 22px;
  cursor: pointer;
}

.secondary-button {
  padding: 0 22px;
  color: var(--navy);
  border: 1px solid var(--line);
  background: #ffffff;
}

.primary-button:hover,
.header-cta:hover {
  background: var(--orange-dark);
  box-shadow: 0 18px 34px rgba(253, 95, 13, 0.32);
}

.secondary-button:hover {
  border-color: var(--blue);
  color: var(--blue);
  box-shadow: 0 14px 28px rgba(7, 56, 115, 0.11);
}

.section-band {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 20%, rgba(253, 95, 13, 0.16), transparent 32%),
    radial-gradient(circle at 95% 15%, rgba(13, 74, 143, 0.13), transparent 34%),
    var(--cream);
}

.hero {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(28px, 6vw, 76px);
  min-height: calc(100vh - 76px);
  padding: clamp(46px, 7vw, 88px) clamp(18px, 5vw, 72px);
  color: var(--ink);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--orange);
  background: rgba(253, 95, 13, 0.1);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1,
.section h2 {
  margin: 0;
  letter-spacing: 0;
}

.hero h1 {
  color: var(--navy);
  font-size: clamp(3.1rem, 7vw, 6.8rem);
  line-height: 0.95;
}

.hero-copy {
  max-width: 650px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.22rem);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 42px;
}

.hero-stats > * {
  min-height: 96px;
  padding: 18px;
  border: 1px solid rgba(7, 56, 115, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  transition: transform 220ms ease, box-shadow 220ms ease, background-color 220ms ease;
}

/* Ô stat dạng link/nút (Luyện tập, Thi thử) — reset mặc định, giữ giao diện thẻ */
.hero-stat-link {
  display: block;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  width: 100%;
}

.hero-stats > *:hover {
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(7, 56, 115, 0.1);
  transform: translateY(-4px);
}

.hero-stats strong,
.hero-stats span {
  display: block;
}

.hero-stats strong {
  color: var(--navy);
  font-size: 1rem;
}

.hero-stats span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.teacher-showcase {
  position: relative;
  display: grid;
  min-height: min(620px, 78vh);
  align-items: center;
  isolation: isolate;
  animation: revealScale 760ms cubic-bezier(0.2, 0.82, 0.2, 1) both;
}

.teacher-showcase::before,
.teacher-showcase::after {
  position: absolute;
  z-index: -1;
  display: block;
  border-radius: 999px;
  content: "";
}

.teacher-showcase::before {
  width: min(420px, 78vw);
  height: min(420px, 78vw);
  left: 5%;
  top: 12%;
  background: var(--orange);
  opacity: 0.16;
  animation: slowPulse 6s ease-in-out infinite;
}

.teacher-showcase::after {
  width: min(330px, 62vw);
  height: min(330px, 62vw);
  right: 6%;
  bottom: 4%;
  background: var(--navy);
  opacity: 0.12;
  animation: slowPulse 7s ease-in-out infinite reverse;
}

.hero-teacher {
  position: relative;
  width: min(360px, 70vw);
  padding: 8px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: var(--shadow);
  transition: box-shadow 280ms ease;
}

.hero-teacher img {
  aspect-ratio: 1;
  width: 100%;
  border-radius: 999px;
  object-fit: cover;
  transition: transform 540ms ease;
}

.hero-teacher:hover {
  box-shadow: 0 28px 62px rgba(7, 56, 115, 0.18);
}

.hero-teacher:hover img {
  transform: scale(1.035);
}

.hero-teacher div {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 4px;
  min-width: 150px;
  padding: 12px 16px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--navy);
  box-shadow: 0 14px 28px rgba(7, 56, 115, 0.2);
}

.hero-teacher span {
  font-weight: 800;
}

.hero-teacher strong {
  color: var(--orange);
  font-size: 1rem;
  font-weight: 800;
}

.hero-teacher-main {
  justify-self: start;
  animation: floatTeacher 5.8s ease-in-out infinite;
}

.hero-teacher-main div {
  left: 22px;
  bottom: -14px;
}

.hero-teacher-secondary {
  position: absolute;
  right: 0;
  bottom: 14px;
  width: min(250px, 48vw);
  animation: floatTeacher 6.8s ease-in-out 0.4s infinite;
}

.hero-teacher-secondary div {
  right: 6px;
  bottom: -10px;
  background: var(--navy);
}

.section {
  padding: clamp(54px, 8vw, 94px) clamp(18px, 5vw, 72px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.section h2 {
  color: var(--navy);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.1;
}

.section-copy,
.contact-copy p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
}

.teachers-section {
  background: #ffffff;
}

.teacher-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.teacher-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.68fr) minmax(0, 1fr);
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(7, 56, 115, 0.09);
  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}

.teacher-card:hover {
  border-color: rgba(253, 95, 13, 0.34);
  box-shadow: 0 24px 52px rgba(7, 56, 115, 0.14);
  transform: translateY(-6px);
}

.teacher-card img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  transition: transform 540ms ease;
}

.teacher-card:hover img {
  transform: scale(1.04);
}

.teacher-card-body {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: clamp(20px, 4vw, 32px);
}

.teacher-card-body p {
  margin: 0;
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.teacher-card-body h3 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.5rem, 3vw, 2.3rem);
}

.ielts-score {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.95rem;
  font-style: normal;
  font-weight: 800;
  background: var(--orange);
  box-shadow: 0 10px 22px rgba(253, 95, 13, 0.2);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.teacher-card:hover .ielts-score {
  box-shadow: 0 14px 30px rgba(253, 95, 13, 0.32);
  transform: translateY(-1px);
}

.teacher-card-body span {
  color: var(--muted);
  line-height: 1.7;
}

.path-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.path-card {
  min-height: 240px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(7, 56, 115, 0.07);
  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}

.path-card:hover {
  border-color: rgba(13, 74, 143, 0.24);
  box-shadow: 0 18px 38px rgba(7, 56, 115, 0.12);
  transform: translateY(-5px);
}

.path-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--navy);
  font-weight: 800;
  transition: background-color 220ms ease, transform 220ms ease;
}

.path-card:hover span {
  background: var(--orange);
  transform: scale(1.06);
}

.path-card h3,
.feature-item h3 {
  margin: 22px 0 10px;
  color: var(--navy);
  font-size: 1.05rem;
}

.path-card p,
.feature-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1fr);
  gap: clamp(28px, 6vw, 76px);
  align-items: start;
  background: var(--soft);
}

.feature-list {
  display: grid;
  gap: 14px;
}

.feature-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.feature-item:hover {
  border-color: rgba(253, 95, 13, 0.3);
  box-shadow: 0 16px 34px rgba(7, 56, 115, 0.1);
  transform: translateX(4px);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--orange);
  font-weight: 800;
  transition: transform 220ms ease;
}

.feature-item:hover .feature-icon {
  transform: rotate(-4deg) scale(1.06);
}

.feature-item h3 {
  margin-top: 0;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 520px);
  gap: clamp(28px, 6vw, 72px);
  align-items: start;
}

.contact-copy {
  max-width: 660px;
}

.contact-note {
  display: grid;
  gap: 8px;
  margin-top: 28px;
  padding: 18px;
  border-left: 4px solid var(--orange);
  background: var(--soft);
  color: var(--muted);
  line-height: 1.6;
}

.contact-note strong {
  color: var(--navy);
}

.lead-form {
  display: grid;
  gap: 16px;
  padding: clamp(22px, 4vw, 32px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.lead-form:focus-within {
  box-shadow: 0 28px 58px rgba(7, 56, 115, 0.16);
  transform: translateY(-2px);
}

.lead-form label {
  display: grid;
  gap: 8px;
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 800;
}

.lead-form input,
.lead-form select,
.lead-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  background: #ffffff;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.lead-form textarea {
  resize: vertical;
}

.lead-form input:focus,
.lead-form select:focus,
.lead-form textarea:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(13, 74, 143, 0.13);
  box-shadow: 0 10px 24px rgba(13, 74, 143, 0.08);
}

.form-button {
  width: 100%;
  margin-top: 4px;
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: var(--blue);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.5;
}

.form-status.is-visible {
  animation: fadeUp 320ms ease both;
}

.form-status--ok {
  padding: 12px 14px;
  border-radius: 12px;
  background: #e8f6ee;
  border: 1px solid #b6e3c6;
  color: #1b7a43;
}

.form-status--error {
  padding: 12px 14px;
  border-radius: 12px;
  background: #fdecea;
  border: 1px solid #f5c2bd;
  color: #c0392b;
}

.site-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding: 40px clamp(18px, 5vw, 72px);
  color: rgba(255, 255, 255, 0.76);
  background: var(--navy);
}

.footer-brand {
  display: grid;
  gap: 8px;
  max-width: 360px;
}

.site-footer strong {
  color: #ffffff;
  font-size: 1.15rem;
}

.footer-address {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Khối mạng xã hội */
.footer-social {
  display: grid;
  gap: 12px;
}

.footer-social-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.footer-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background-color 200ms ease, border-color 200ms ease, transform 200ms ease;
}

.footer-social-link:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--orange);
  color: var(--orange);
  transform: translateY(-2px);
}

.footer-social-link svg {
  flex-shrink: 0;
}

/* Nút đăng ký ở footer */
.footer-cta {
  display: inline-flex;
  align-items: center;
  align-self: center;
  padding: 12px 22px;
  border-radius: 8px;
  background: var(--orange);
  color: #ffffff;
  font-weight: 800;
  transition: background-color 200ms ease, transform 200ms ease;
}

.footer-cta:hover {
  background: var(--orange-dark);
  transform: translateY(-2px);
}

.hero-content .eyebrow,
.hero-content h1,
.hero-copy,
.hero-actions,
.hero-stats {
  animation: fadeUp 720ms cubic-bezier(0.2, 0.82, 0.2, 1) both;
}

.hero-content .eyebrow {
  animation-delay: 80ms;
}

.hero-content h1 {
  animation-delay: 160ms;
}

.hero-copy {
  animation-delay: 240ms;
}

.hero-actions {
  animation-delay: 320ms;
}

.hero-stats {
  animation-delay: 400ms;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 680ms cubic-bezier(0.2, 0.82, 0.2, 1),
    transform 680ms cubic-bezier(0.2, 0.82, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.path-grid .reveal:nth-child(2),
.teacher-grid .reveal:nth-child(2),
.feature-list .reveal:nth-child(2) {
  transition-delay: 90ms;
}

.path-grid .reveal:nth-child(3),
.feature-list .reveal:nth-child(3) {
  transition-delay: 180ms;
}

.path-grid .reveal:nth-child(4) {
  transition-delay: 270ms;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

@keyframes revealScale {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }

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

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

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

@keyframes slowPulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08);
  }
}

@media (max-width: 980px) {
  .main-nav {
    display: none;
  }

  .hero,
  .split,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .teacher-showcase {
    min-height: 560px;
    max-width: 620px;
  }

  .path-grid,
  .teacher-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .teacher-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    gap: 12px;
  }

  .brand span {
    display: none;
  }

  .header-cta {
    min-height: 42px;
    padding: 0 14px;
    font-size: 0.86rem;
  }

  .hero-stats,
  .path-grid,
  .teacher-grid {
    grid-template-columns: 1fr;
  }

  .teacher-showcase {
    min-height: 470px;
  }

  .hero-teacher {
    width: min(310px, 78vw);
  }

  .hero-teacher-secondary {
    width: min(210px, 52vw);
  }

  .hero-teacher div {
    min-width: 132px;
    padding: 10px 12px;
  }

  .hero-actions {
    display: grid;
  }

  .hero-actions a {
    width: 100%;
  }

  .path-card {
    min-height: auto;
  }

  .feature-item {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .flip-card.is-flipped .flip-inner {
    transform: none;
  }
}

/* =========================================================
   LUYỆN TẬP ONLINE — quiz + flashcard (section mới)
   Nền sáng đồng nhất; phân vùng bằng bố cục & viền.
   ========================================================= */
.practice-section {
  scroll-margin-top: 84px;
}

.practice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 28px);
  margin-top: 8px;
}

.practice-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(7, 56, 115, 0.07);
}

.practice-card > .eyebrow {
  margin: 0;
}

.practice-card h3 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  line-height: 1.2;
}

.practice-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
}

.practice-cta {
  align-self: flex-start;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--orange);
  font-weight: 700;
  font-size: 0.95rem;
}
.practice-cta::after {
  content: "→";
  transition: transform 200ms ease;
}
.practice-card:hover .practice-cta::after {
  transform: translateX(4px);
}

/* --- Flashcard lật (signature) --- */
.flip-demo {
  perspective: 1100px;
  margin-top: 2px;
}
.flip-card {
  width: 100%;
  height: 190px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}
.flip-inner {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 620ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.flip-card.is-flipped .flip-inner {
  transform: rotateY(180deg);
}
.flip-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 16px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  padding: 20px;
  text-align: center;
}
.flip-front {
  background:
    radial-gradient(circle at 20% 15%, rgba(253, 95, 13, 0.14), transparent 45%),
    var(--cream);
  border: 1px solid rgba(253, 95, 13, 0.24);
  transform: rotateY(0deg) translateZ(1px);
}
.flip-front .flip-word {
  color: var(--navy);
  font-size: 1.9rem;
  font-weight: 800;
}
.flip-front .flip-ipa {
  color: var(--muted);
  font-size: 0.95rem;
}
.flip-hint {
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.7;
}
.flip-back {
  background: var(--navy);
  color: #eaf1fb;
  transform: rotateY(180deg) translateZ(1px);
  border: 1px solid var(--navy);
}
.flip-back .flip-mean {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
}
.flip-back .flip-ex {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #b9cfea;
}

/* --- Quiz demo (mini, tương tác bằng radio thuần CSS) --- */
.quiz-demo {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quiz-q {
  margin: 0 0 4px;
  font-weight: 700;
  color: var(--ink);
}
.quiz-opt {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}
.quiz-opt:hover {
  border-color: #b9cce6;
  background: var(--soft);
}
.quiz-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.quiz-dot {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  transition: border-color 160ms ease;
}
.quiz-dot::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  transform: scale(0);
  transition: transform 160ms ease;
}
.quiz-opt span.quiz-label {
  font-size: 0.96rem;
  color: var(--ink);
}
/* đáp án đúng */
.quiz-opt.correct input:checked ~ .quiz-dot {
  border-color: #1b7a43;
}
.quiz-opt.correct input:checked ~ .quiz-dot::after {
  background: #1b7a43;
  transform: scale(1);
}
.quiz-opt.correct input:checked ~ .quiz-verdict {
  color: #1b7a43;
}
/* đáp án sai */
.quiz-opt.wrong input:checked ~ .quiz-dot {
  border-color: var(--orange-dark);
}
.quiz-opt.wrong input:checked ~ .quiz-dot::after {
  background: var(--orange-dark);
  transform: scale(1);
}
.quiz-opt.wrong input:checked ~ .quiz-verdict {
  color: var(--orange-dark);
}
.quiz-verdict {
  margin-left: auto;
  font-size: 0.82rem;
  font-weight: 700;
  opacity: 0;
}
.quiz-opt input:checked ~ .quiz-verdict {
  opacity: 1;
}

/* =========================================================
   THI THỬ IELTS — băng 4 kỹ năng (section mới)
   ========================================================= */
.mock-section {
  scroll-margin-top: 84px;
}
.mock-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 4px 0 30px;
}
.mock-skill {
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.mock-skill:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(7, 56, 115, 0.1);
}
.mock-ico {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(13, 74, 143, 0.09);
  color: var(--navy);
  font-size: 1.2rem;
  margin-bottom: 12px;
}
.mock-skill h3 {
  margin: 0 0 4px;
  color: var(--navy);
  font-size: 1.05rem;
}
.mock-skill p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}
.mock-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.mock-note {
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .practice-grid {
    grid-template-columns: 1fr;
  }
  .mock-band {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 440px) {
  .mock-band {
    grid-template-columns: 1fr;
  }
}

/* ===== Popup "Thi thử đang triển khai" ===== */
.mock-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 20, 40, 0.55);
  backdrop-filter: blur(2px);
  animation: fadeUp 200ms ease both;
}

.mock-modal {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 16px;
  padding: 30px 26px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(7, 20, 40, 0.3);
}

.mock-modal-ico {
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 10px;
}

.mock-modal h3 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 1.3rem;
  font-weight: 800;
}

.mock-modal p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.mock-modal-close {
  min-height: 44px;
  padding: 0 26px;
  border: 0;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 200ms ease;
}

.mock-modal-close:hover {
  background: var(--blue, #0d4a8f);
}

/* ===== Thanh progress khi chuyển trang ===== */
.route-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 2000;
  background: linear-gradient(90deg, var(--orange, #fd5f0d), #ffb066);
  box-shadow: 0 0 10px rgba(253, 95, 13, 0.7);
  border-radius: 0 3px 3px 0;
  opacity: 0;
  transition: width 180ms ease, opacity 260ms ease;
  pointer-events: none;
}

.route-progress.is-active {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .route-progress {
    transition: opacity 200ms ease;
  }
}
