/* =========================================================
   WYCTO 2026 — static site stylesheet
   Brand: primary #39038E (purple) · accent #FD8727 (orange)
   ========================================================= */

:root {
  --primary: #39038E;
  --primary-700: #2a0269;
  --primary-50: #f3eefb;
  --accent: #FD8727;
  --accent-600: #ea7414;
  --peach: #FFF6EF;
  --gray-bg: #F6F6F8;
  --text: #1b1b1f;
  --muted: #4b4b55;
  --white: #fff;
  --radius: 16px;
  --radius-lg: 20px;
  --shadow: 0 10px 30px rgba(57, 3, 142, .10);
  --header-h: 72px;
  --container: 1200px;
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4, h5 { margin: 0; line-height: 1.25; }
p { margin: 0 0 .9em; }
p:last-child { margin-bottom: 0; }
button { font: inherit; cursor: pointer; }
svg { display: block; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }
.mt-40 { margin-top: 40px; }
.mt-60 { margin-top: 64px; }
.pt-0 { padding-top: 0 !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 26px; border-radius: 999px; border: 0;
  font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid rgba(253, 135, 39, .5); outline-offset: 2px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 0 0 4px #ffe3cc; }
.btn-primary:hover { background: var(--primary-700); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(253, 135, 39, .35); }
.btn-accent:hover { background: var(--accent-600); }
.btn-dark { background: var(--primary-700); color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.btn-dark:hover { background: #1d0149; }
.btn-sm { padding: 9px 20px; font-size: 14px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff; /* no backdrop-filter: it would trap the fixed mobile menu inside the header */
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); max-width: 1340px; }
.brand { display: flex; align-items: center; gap: 22px; flex: none; }
.brand img { height: 34px; width: auto; }
.brand a:first-child img { height: 36px; }

.main-nav { margin-left: auto; }
.main-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.main-nav li { position: relative; }
.main-nav a {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 12px; border-radius: 8px;
  font-weight: 600; font-size: 15px; color: #111; text-decoration: none; white-space: nowrap;
  transition: color .15s;
}
.main-nav a:hover, .main-nav a.active { color: var(--accent); }
.has-sub > a::after {
  content: ""; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid currentColor; margin-left: 2px;
}
.main-nav .sub {
  list-style: none; margin: 0; padding: 8px;
  position: absolute; top: 100%; left: 0; min-width: 230px;
  background: #fff; border-radius: 12px; box-shadow: 0 18px 40px rgba(20, 0, 60, .16);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.main-nav .sub a { font-weight: 500; padding: 10px 12px; }
.main-nav .sub a:hover { background: var(--primary-50); color: var(--primary); }
.has-sub:hover > .sub, .has-sub:focus-within > .sub { opacity: 1; visibility: visible; transform: none; }

.header-actions { display: flex; align-items: center; gap: 14px; flex: none; }
.gtranslate_wrapper { display: flex; gap: 2px; min-width: 52px; }
.gtranslate_wrapper a { display: inline-block; }
.gtranslate_wrapper img { width: 24px; height: auto; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: var(--accent); padding: 0; position: relative;
}
.nav-toggle span { position: absolute; left: 12px; right: 12px; height: 2.5px; background: #fff; border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 28px; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; background: #3b0d9a; }
.hero img { width: 100%; aspect-ratio: 1920 / 802; object-fit: cover; }

/* ---------- Sections ---------- */
.section { padding: 80px 0; position: relative; }
.section-title {
  font-size: clamp(26px, 3.2vw, 40px); font-weight: 700; text-transform: uppercase;
  color: var(--primary); text-align: center; margin-bottom: 28px; letter-spacing: .2px;
}
.section-title.left { text-align: left; }
.section-title.light { color: #fff; }
.section-sub { text-align: center; color: var(--primary); max-width: 920px; margin: -12px auto 32px; font-size: 15px; }

.section-purple { background-color: var(--primary); color: #fff; }
.section-deep { background: var(--primary); color: #fff; }
.section-peach { background: linear-gradient(180deg, #fff 0%, var(--peach) 100%); }
.section-gray { background: var(--gray-bg); }

.bg-photo { isolation: isolate; }
.bg-photo::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-size: cover; background-position: center; opacity: .14;
}
.bg-img-purple::before { background-image: url("../img/bg-purple.webp"); }
.bg-img-doodle::before { background-image: url("../img/bg-doodle.webp"); background-size: 626px auto; background-repeat: repeat; opacity: .12; }
.bg-img-register::before { background-image: url("../img/bg-register.webp"); opacity: .08; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.align-center { align-items: center; }

.prose { font-size: 15px; color: #222; }
.prose.light { color: #fff; }
.prose b { font-weight: 700; }

.card { background: #fff; color: var(--text); border-radius: var(--radius-lg); box-shadow: var(--shadow); }

/* Intro video */
.video-frame { border-radius: var(--radius-lg); overflow: hidden; background: #1b0b4a; box-shadow: var(--shadow); }
.video-frame video { width: 100%; aspect-ratio: 16 / 9; background: #1b0b4a; }

.rounded-img { border-radius: var(--radius-lg); width: 100%; object-fit: cover; box-shadow: 0 16px 40px rgba(0,0,0,.25); }

/* ---------- Goals ---------- */
.goals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 32px; margin-top: 12px; }
.goal { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding-top: 6px; }
.goal-num {
  position: absolute; left: 0; top: -18px; z-index: 0;
  font-size: 76px; font-weight: 800; line-height: 1; color: rgba(57, 3, 142, .06); pointer-events: none;
}
.goal-icon { position: relative; z-index: 1; width: 44px; height: 44px; color: var(--primary); }
.goal-icon svg { width: 44px; height: 44px; fill: currentColor; }
.goal h3 { position: relative; font-size: 18px; font-weight: 600; color: var(--primary); margin-bottom: 8px; }
.goal p { color: var(--muted); font-size: 14.5px; }
.goal-mascot { display: flex; justify-content: center; align-items: center; }
.goal-mascot img { width: 160px; animation: bob 4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px); } }

/* ---------- Languages ---------- */
.lang-cards { max-width: 1000px; margin: 0 auto; gap: 24px; }
.lang-card { text-align: center; padding: 36px 24px; }
.lang-icon { display: inline-block; width: 72px; height: 72px; margin-bottom: 16px; }
.lang-icon svg { width: 72px; height: 72px; }
.lang-icon.purple { color: var(--primary); }
.lang-icon.purple svg { fill: currentColor; }
.lang-card h3 { font-size: 22px; font-weight: 600; color: var(--primary); margin-bottom: 10px; }
.lang-card p { color: var(--muted); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 14px; }
.exam-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 640px; font-size: 14px; text-align: center; border: 1px solid #e7e4ee; border-radius: 14px; overflow: hidden; }
.exam-table th { background: var(--accent); color: #fff; font-weight: 600; padding: 12px 10px; }
.exam-table tr.sub th { background: var(--primary); }
.exam-table th, .exam-table td { border-right: 1px solid rgba(0,0,0,.08); border-bottom: 1px solid rgba(0,0,0,.08); }
.exam-table th:last-child, .exam-table td:last-child { border-right: 0; }
.exam-table td { padding: 12px 10px; }
.exam-table tbody tr:nth-child(odd) td { background: #f7f6fa; }
.exam-table tbody tr:last-child td { border-bottom: 0; }
.exam-table td:first-child { font-weight: 600; color: var(--primary); }
.table-note { text-align: right; font-size: 13px; color: var(--muted); margin-top: 8px; font-style: italic; }

/* ---------- Score timeline ---------- */
.score-timeline { list-style: none; margin: 0 auto; padding: 0; max-width: 900px; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.score-timeline::before { content: ""; position: absolute; left: 16.66%; right: 16.66%; top: 107px; height: 4px; background: var(--primary); border-radius: 2px; }
.score-timeline li { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 0 12px; }
.score-bubble {
  position: relative; width: 100%; max-width: 250px; height: 66px; display: grid; place-items: center;
  background: #f4f4f6; border-radius: 14px; font-weight: 600; font-size: 18px; color: #333;
}
.score-bubble::after { content: ""; position: absolute; bottom: -9px; left: 50%; transform: translateX(-50%); border: 10px solid transparent; border-bottom: 0; border-top-color: #f4f4f6; }
.score-dot { position: relative; z-index: 1; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; box-shadow: 0 0 0 6px #fff; }
.score-dot svg { width: 20px; height: 20px; fill: #fff; }
.score-label { font-weight: 600; font-size: 17px; color: #222; }
.score-total { text-align: center; color: var(--primary); margin-top: 32px; font-size: 15px; }

/* ---------- Accordion ---------- */
.accordion { display: flex; flex-direction: column; gap: 14px; }
.accordion details { border-radius: 14px; }
.accordion summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px; border-radius: 14px;
  background: var(--peach); color: var(--primary); font-weight: 700; font-size: 15px;
  border: 1px solid #f6e3d4; transition: background .2s, color .2s;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-size: 24px; font-weight: 500; line-height: 1; }
.accordion details[open] > summary { background: var(--primary); color: #fff; border-color: var(--primary); }
.accordion details[open] > summary::after { content: "−"; }
.acc-body { margin-top: 12px; padding: 18px 22px; border: 2px dashed var(--primary); border-radius: 14px; font-size: 14.5px; }
.acc-body h4 { font-size: 15px; font-weight: 700; margin: 14px 0 4px; }
.acc-body h4:first-child { margin-top: 0; }
ul.diamond { list-style: none; margin: 0; padding: 0; }
ul.diamond li { position: relative; padding-left: 20px; margin: 2px 0; }
ul.diamond li::before { content: "❖"; position: absolute; left: 0; top: 0; color: var(--primary); font-size: 12px; line-height: 1.9; }

.curriculum { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 14px; }
.curriculum th { background: var(--primary); color: #fff; padding: 12px; text-align: left; font-weight: 600; }
.curriculum th:first-child { text-align: center; width: 48px; border-top-left-radius: 10px; }
.curriculum th:last-child { border-top-right-radius: 10px; }
.curriculum td { padding: 12px; border-bottom: 1px solid #ece9f3; vertical-align: top; }
.curriculum td:first-child { text-align: center; font-weight: 700; color: var(--primary); }
.curriculum td:nth-child(2) { font-weight: 600; width: 24%; }
.curriculum tr.group td { background: var(--peach); color: var(--accent-600); font-weight: 700; text-transform: uppercase; letter-spacing: .4px; text-align: left; }

/* ---------- Rounds (Mốc thời gian) ---------- */
.rounds { display: grid; grid-template-columns: repeat(2, minmax(0, 330px)); justify-content: center; gap: 28px; }
.round-card {
  background: #fff; color: var(--text); border-radius: 14px; padding: 20px;
  outline: 3px dotted #fff; outline-offset: -1px; border: 3px dotted var(--primary);
  box-shadow: 0 0 0 3px #fff;
}
.round-card img { border-radius: 12px; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 18px; }
.round-kicker { text-align: center; color: var(--primary); font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.round-card h3 { text-align: center; color: var(--primary); font-weight: 600; font-size: 19px; margin-bottom: 16px; }
.check-list { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.check-list li { position: relative; padding-left: 22px; margin-bottom: 8px; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 12px; height: 7px;
  border-left: 2.5px solid var(--primary); border-bottom: 2.5px solid var(--primary); transform: rotate(-45deg);
}
.round-note { font-size: 12px; font-style: italic; color: var(--primary); margin-top: 12px; text-align: center; }

/* ---------- Prizes ---------- */
.prize-card {
  display: grid; grid-template-columns: 1fr 1.15fr; gap: 32px; align-items: center;
  background: #fff; border-radius: var(--radius-lg); padding: 18px; margin-bottom: 18px; box-shadow: 0 4px 18px rgba(0,0,0,.04);
}
.prize-card:last-child { margin-bottom: 0; }
.prize-card img { width: 100%; height: 100%; max-height: 380px; object-fit: cover; border-radius: 14px; }
.prize-card.reverse img { order: 2; }
.prize-card h3 { text-align: center; color: var(--primary); font-size: 24px; font-weight: 600; margin-bottom: 18px; }
.prize-list { margin: 0; padding-left: 18px; font-size: 14px; }
.prize-list li { margin-bottom: 10px; }
.prize-list li:last-child { margin-bottom: 0; }
.prize-list em { color: #333; }

/* ---------- Docs (Tài liệu) ---------- */
.docs { display: grid; grid-template-columns: 1fr 3fr; gap: 20px; }
.doc-cta {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 340px; border-radius: var(--radius-lg); text-decoration: none; color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px;
  background: #2b2b2b url("../img/bg-register.webp") center / cover no-repeat;
}
.doc-cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(0,0,0,.38); transition: background .25s; }
.doc-cta:hover::before { background: rgba(57,3,142,.55); }
.doc-cta h3 { font-size: 24px; font-weight: 600; }
.courses {
  position: relative; isolation: isolate; overflow: hidden; border-radius: var(--radius-lg);
  padding: 40px 22px; color: #fff; text-align: center;
  background: #1b1d33 url("../img/bg-courses.webp") center / cover no-repeat;
}
.courses::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(17, 18, 40, .72); }
.courses h3 { font-size: 26px; font-weight: 600; margin-bottom: 22px; }
.courses-box { background: #fff; color: var(--text); text-align: left; border-radius: 14px; padding: 22px 24px; font-size: 14px; margin-bottom: 26px; }
.courses-box ul { margin: 6px 0 0; padding-left: 22px; }
.courses .btn svg { width: 24px; height: 24px; fill: none; }

/* ---------- Countries carousel ---------- */
.carousel { position: relative; }
.carousel-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 2 * 22px) / 3); gap: 22px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 6px 2px 10px;
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.country { scroll-snap-align: start; background: #fff; border-radius: var(--radius-lg); padding: 24px 18px 18px; box-shadow: 0 4px 18px rgba(0,0,0,.04); display: flex; flex-direction: column; align-items: center; gap: 18px; }
.country img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.country p { width: 100%; display: flex; align-items: center; gap: 12px; background: var(--peach); border-radius: 12px; padding: 16px 18px; margin: 0; font-weight: 600; font-size: 18px; color: var(--primary); }
.country p svg { width: 22px; height: 22px; fill: var(--accent); flex: none; }
.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.carousel-dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; background: #e2d9cf; transition: background .2s, width .2s; }
.carousel-dots button[aria-selected="true"] { background: var(--accent); width: 24px; border-radius: 6px; }

/* ---------- Partners ---------- */
.partners { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.partner { padding: 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.partner h2 { font-size: 19px; font-weight: 600; color: var(--primary); text-transform: none; }
.partner img { height: 84px; width: auto; object-fit: contain; }

/* ---------- Gallery ---------- */
.gallery { columns: 3 280px; column-gap: 16px; }
.gallery a { display: block; margin-bottom: 16px; border-radius: 14px; overflow: hidden; break-inside: avoid; }
.gallery img { width: 100%; transition: transform .4s ease; }
.gallery a:hover img { transform: scale(1.04); }

/* ---------- Registration & payment ---------- */
.glass { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius-lg); padding: 30px; color: #fff; backdrop-filter: blur(4px); }
.fee-title { font-size: 19px; font-weight: 600; margin-bottom: 14px; }
.hl { color: var(--accent); }
.flag-ico { display: inline-block; width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px; }
.btn-row { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 22px; }

.pay { display: grid; grid-template-columns: 1fr 2.2fr; gap: 22px; align-items: start; }
.pay-left, .pay-right { display: flex; flex-direction: column; gap: 18px; }
.pay-direct { padding: 20px; }
.pay-direct h3, .pay-bank h3 { font-size: 16px; font-weight: 700; color: var(--primary); text-transform: uppercase; margin-bottom: 10px; }
.pay-direct p { font-size: 14px; }
.pay-qr { margin: 0; padding: 14px 14px 16px; text-align: center; }
.pay-qr img { border-radius: 10px; width: 100%; }
.pay-qr figcaption { font-weight: 600; text-transform: uppercase; color: var(--primary); margin-top: 10px; }
.pay-bank { padding: 22px 24px; }
.pay-bank ul { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.pay-bank li { margin-bottom: 6px; }
.pay-bank b { color: var(--primary); }
.pay-bank b.hl { color: var(--accent); }
.copy { margin-left: 8px; border: 1px solid #ddd; background: #fff; border-radius: 999px; padding: 2px 10px; font-size: 12px; color: var(--primary); vertical-align: middle; }
.copy:hover { background: var(--primary-50); }
.copy.done { background: #e9f9ee; border-color: #9ad8ac; color: #16733a; }
.pay-note h3 { font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.pay-note p { font-size: 14.5px; }

/* ---------- Footer ---------- */
.site-footer { background: #fff; padding-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 1.1fr 1fr .5fr; gap: 48px; padding-bottom: 48px; }
.site-footer h2 { font-size: 19px; font-weight: 700; color: var(--primary); text-transform: uppercase; margin-bottom: 18px; }
.site-footer p, .site-footer li { font-size: 14.5px; }
.org { font-weight: 700; font-size: 13.5px !important; }
.contact-list { margin: 0 0 18px; padding-left: 20px; }
.contact-list li { margin-bottom: 4px; }
.contact-list a { text-decoration: none; }
.contact-list a:hover { color: var(--accent); }
.socials { display: flex; gap: 10px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; transition: transform .2s; }
.socials a:hover { transform: translateY(-2px); }
.socials a:nth-child(1) { background: #3b5998; }
.socials a:nth-child(2) { background: #cd201f; }
.socials svg { width: 20px; height: 20px; fill: currentColor; }
.footer-logo img { width: 160px; margin-left: auto; }
.copyright { background: var(--primary); color: #fff; text-align: center; padding: 18px 20px; font-size: 14px; }

/* ---------- Sticky CTA ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; justify-content: center; padding: 10px;
  background: #fff; box-shadow: 0 -4px 10px rgba(0,0,0,.06);
  transform: translateY(110%); transition: transform .3s ease;
}
.sticky-cta.show { transform: none; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(10, 4, 30, .92); display: flex; align-items: center; justify-content: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1200px, 100%); max-height: 86vh; border-radius: 10px; }
.lightbox button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 30px; line-height: 1; display: grid; place-items: center; }
.lightbox button:hover { background: rgba(255,255,255,.25); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }

/* ---------- Reveal animation ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .goal-mascot img { animation: none; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1280px) {
  .brand { gap: 14px; }
  .brand img { height: 28px; }
  .brand a:first-child img { height: 30px; }
  .main-nav a { padding: 10px 8px; font-size: 14px; }
}

@media (max-width: 1140px) {
  :root { --header-h: 64px; }
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; margin: 0;
    background: #fff; overflow-y: auto; padding: 12px 20px 100px;
    opacity: 0; transform: translateY(-12px); visibility: hidden; pointer-events: none;
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
  }
  .nav-open .main-nav { opacity: 1; transform: none; visibility: visible; pointer-events: auto; }
  .nav-open { overflow: hidden; }
  .main-nav > ul { flex-direction: column; gap: 0; }
  .main-nav > ul > li { border-bottom: 1px solid #f0edf5; }
  .main-nav a { padding: 14px 4px; font-size: 16px; }
  .has-sub > a::after { display: none; }
  .main-nav .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding: 0 0 10px 14px; min-width: 0; }
  .main-nav .sub a { padding: 9px 4px; font-size: 15px; color: var(--muted); }
  .header-actions { margin-left: auto; }
}

@media (max-width: 1024px) {
  .goals { grid-template-columns: repeat(2, 1fr); }
  .docs { grid-template-columns: 1fr; }
  .doc-cta { min-height: 220px; }
  .partners { grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
  .partner h2 { font-size: 16px; }
  .partner img { height: 64px; }
  .pay { grid-template-columns: 1fr 1.6fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-logo { grid-column: 1 / -1; }
  .footer-logo img { margin: 0; }
  .carousel-track { grid-auto-columns: calc((100% - 22px) / 2); }
}

@media (max-width: 767px) {
  body { font-size: 14.5px; }
  .section { padding: 56px 0; }
  .container { padding: 0 16px; }
  .hide-mobile { display: none !important; }
  .brand { gap: 10px; }
  .brand img { height: 24px; }
  .brand a:first-child img { height: 26px; }
  .gtranslate_wrapper { min-width: 0; }
  .gtranslate_wrapper img { width: 22px; }

  .grid-2 { grid-template-columns: 1fr; gap: 28px; }
  .section-title.left { text-align: center; }
  #gioi-thieu .section-title { text-align: left; }
  .goals { grid-template-columns: 1fr; gap: 28px; }
  .goal-mascot img { width: 130px; }
  .score-timeline li { padding: 0 4px; }
  .score-bubble { height: 54px; font-size: 15px; }
  .score-timeline::before { top: 89px; }
  .score-label { font-size: 13.5px; text-align: center; }
  .rounds { grid-template-columns: minmax(0, 420px); }
  .prize-card, .prize-card.reverse { grid-template-columns: 1fr; gap: 18px; }
  .prize-card.reverse img { order: 0; }
  .prize-card h3 { font-size: 20px; }
  .partners { grid-template-columns: 1fr; }
  .pay { grid-template-columns: 1fr; }
  .pay-qr { max-width: 360px; margin: 0 auto; width: 100%; }
  .glass { padding: 22px 18px; }
  .btn-row .btn { flex: 1 1 100%; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .carousel-track { grid-auto-columns: 82%; gap: 14px; }
  .acc-body { padding: 14px; }
  .accordion summary { padding: 16px; }

  /* Senior curriculum: stack rows as cards instead of a wide table */
  .acc-body .table-wrap { overflow: visible; }
  .curriculum { min-width: 0; }
  .curriculum thead { display: none; }
  .curriculum, .curriculum tbody, .curriculum tr, .curriculum td { display: block; width: auto !important; }
  .curriculum tr { border-bottom: 1px solid #ece9f3; padding: 12px 0; }
  .curriculum tr.group { padding: 0; border: 0; margin-top: 8px; }
  .curriculum tr.group td { border-radius: 8px; }
  .curriculum td { border: 0; padding: 0; }
  .curriculum td:first-child { display: inline; text-align: left; }
  .curriculum td:first-child::after { content: ". "; }
  .curriculum tr.group td:first-child::after { content: none; }
  .curriculum tr.group td { display: block; padding: 10px 12px; }
  .curriculum td:nth-child(2) { display: inline; color: var(--primary); }
  .curriculum td:nth-child(3) { margin-top: 6px; }
}
