/* ===== Design tokens ===== */
:root {
  --orange: #F7941D;        /* logo primary */
  --orange-dark: #E07C00;
  --orange-light: #FFE9CC;
  --ink: #2B2B2B;           /* logo dark text */
  --ink-soft: #555;
  --muted: #7a7a7a;
  --white: #ffffff;
  --cream: #FFF9F0;
  --border: #efe6da;
  --shadow-sm: 0 4px 16px rgba(43, 43, 43, .06);
  --shadow-md: 0 12px 32px rgba(247, 148, 29, .18);
  --radius: 16px;
  --radius-lg: 24px;
  --maxw: 1140px;
  --font: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

h1, h2, h3, h4 { line-height: 1.2; color: var(--ink); }

.section { padding: 88px 0; }

/* ===== Logo ===== */
.logo { display: flex; flex-direction: column; line-height: 1; }
.logo-mark {
  font-weight: 900;
  font-size: 1.7rem;
  color: var(--orange);
  letter-spacing: -.5px;
}
.logo-mark .dot { color: var(--ink); }
.logo-sub {
  font-weight: 800;
  font-size: .62rem;
  letter-spacing: .3px;
  color: var(--ink);
  margin-top: 2px;
  text-transform: none;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  font-family: inherit; font-weight: 800; font-size: .95rem;
  padding: 12px 24px; border-radius: 999px;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary { background: var(--orange); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--orange-dark); transform: translateY(-2px); }
.btn-outline { background: #fff; color: var(--orange-dark); border-color: var(--orange); }
.btn-outline:hover { background: var(--orange-light); transform: translateY(-2px); }
.btn-lg { padding: 15px 30px; font-size: 1.02rem; }
.btn-block { width: 100%; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { font-weight: 700; font-size: .95rem; color: var(--ink); transition: color .15s; }
.nav a:hover { color: var(--orange); }
.nav-cta { color: #fff !important; }
.nav-cta:hover { color: #fff !important; }

.menu-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.menu-toggle span { width: 26px; height: 3px; background: var(--ink); border-radius: 2px; transition: .3s; }
.menu-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--cream) 0%, #fff 55%);
  padding: 72px 0 88px;
}
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 48px; }
.hero-badge {
  display: inline-block; background: var(--orange-light); color: var(--orange-dark);
  font-weight: 800; font-size: .85rem; padding: 7px 16px; border-radius: 999px; margin-bottom: 20px;
}
.hero-title { font-size: clamp(2.1rem, 5vw, 3.3rem); font-weight: 900; margin-bottom: 18px; }
.hero-title .highlight { color: var(--orange); }
.hero-slogan { font-size: 1.15rem; color: var(--ink-soft); max-width: 520px; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }
.hero-stats { display: flex; gap: 36px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-size: 1.5rem; font-weight: 900; color: var(--orange); }
.stat-label { font-size: .85rem; color: var(--muted); font-weight: 600; }

.hero-visual { position: relative; height: 380px; }
.hero-blob {
  position: absolute; inset: 10% 5%; z-index: 0;
  background: radial-gradient(circle at 30% 30%, var(--orange) 0%, var(--orange-dark) 100%);
  border-radius: 42% 58% 63% 37% / 44% 45% 55% 56%;
  opacity: .95;
  animation: morph 9s ease-in-out infinite;
}
@keyframes morph {
  0%,100% { border-radius: 42% 58% 63% 37% / 44% 45% 55% 56%; }
  50% { border-radius: 58% 42% 37% 63% / 55% 56% 44% 45%; }
}
.hero-card {
  position: absolute; z-index: 2; background: #fff; color: var(--ink);
  font-weight: 900; font-size: 1.05rem;
  padding: 14px 22px; border-radius: 14px; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.hero-card.card-1 { top: 12%; left: 0; color: var(--orange-dark); }
.hero-card.card-2 { top: 44%; right: 0; }
.hero-card.card-3 { bottom: 10%; left: 14%; }
.card-1, .card-2, .card-3 { animation: float 4s ease-in-out infinite; }
.card-2 { animation-delay: .8s; }
.card-3 { animation-delay: 1.6s; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ===== Features ===== */
.features { margin-top: -44px; position: relative; z-index: 5; }
.features-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.feature {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 22px; box-shadow: var(--shadow-sm); transition: transform .2s;
}
.feature:hover { transform: translateY(-6px); }
.feature-icon { font-size: 2rem; margin-bottom: 10px; }
.feature h3 { font-size: 1.1rem; margin-bottom: 6px; }
.feature p { font-size: .92rem; color: var(--muted); }

/* ===== Section head ===== */
.section-head { text-align: center; max-width: 660px; margin: 0 auto 52px; }
.eyebrow {
  display: inline-block; font-weight: 800; font-size: .8rem; letter-spacing: 1px;
  text-transform: uppercase; color: var(--orange); margin-bottom: 12px;
}
.eyebrow.light { color: #fff; opacity: .9; }
.section-head h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 900; margin-bottom: 14px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* ===== Programs ===== */
.program-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.program-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 32px 28px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s;
  position: relative;
}
.program-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.program-card.featured { border-color: var(--orange); box-shadow: var(--shadow-md); }
.program-card.featured::before {
  content: "Phổ biến"; position: absolute; top: -13px; right: 24px;
  background: var(--orange); color: #fff; font-size: .72rem; font-weight: 800;
  padding: 5px 12px; border-radius: 999px;
}
.program-tag {
  display: inline-block; background: var(--orange-light); color: var(--orange-dark);
  font-weight: 800; font-size: .72rem; padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
.program-card h3 { font-size: 1.5rem; margin-bottom: 10px; }
.program-card > p { color: var(--ink-soft); font-size: .95rem; margin-bottom: 18px; }
.program-card ul { margin-bottom: 22px; }
.program-card li { position: relative; padding-left: 26px; margin-bottom: 9px; font-size: .93rem; color: var(--ink-soft); }
.program-card li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--orange); font-weight: 900;
}
.program-link { font-weight: 800; color: var(--orange-dark); }
.program-link:hover { color: var(--orange); }

/* ===== About ===== */
.about { background: var(--cream); }
.about-inner { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: center; }
/* Bố cục 2 ảnh chồng nhau + điểm nhấn cam.
   Hai ảnh tự đổi chỗ chéo cho nhau (JS toggle class .swapped). */
.about-visual { position: relative; aspect-ratio: 13/10; }
.about-img {
  position: absolute; object-fit: cover; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); border: 5px solid #fff; display: block;
  transition: top .55s ease, left .55s ease, width .55s ease, height .55s ease;
}
/* Vị trí mặc định: main = ô lớn (phải-trên), sub = ô nhỏ (trái-dưới).
   Ảnh ở ô lớn luôn nằm TRÊN (z-index cao hơn). */
.about-img-main { top: 0; left: 18%; width: 82%; height: 74%; z-index: 3; }
.about-img-sub  { top: 48%; left: 0; width: 52%; height: 52%; z-index: 1; }
/* Khi đổi chỗ: hai ảnh hoán đổi ô cho nhau */
.about-visual.swapped .about-img-main { top: 48%; left: 0; width: 52%; height: 52%; z-index: 1; }
.about-visual.swapped .about-img-sub  { top: 0; left: 18%; width: 82%; height: 74%; z-index: 3; }
@media (prefers-reduced-motion: reduce) {
  .about-img { transition: none; }
}
.about-accent {
  position: absolute; z-index: 0; top: -16px; left: -16px; width: 54%; height: 60%;
  background: linear-gradient(150deg, var(--orange) 0%, var(--orange-dark) 100%);
  border-radius: var(--radius-lg);
}
.about-accent::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg);
  background: repeating-linear-gradient(115deg, rgba(255,255,255,.14) 0 3px, transparent 3px 22px);
}
.about-content .lead { font-size: 1.2rem; color: var(--orange-dark); margin: 12px 0 16px; }
.about-content > p { color: var(--ink-soft); margin-bottom: 20px; }
.about-list { margin-bottom: 26px; }
.about-list li { padding: 6px 0; font-weight: 600; color: var(--ink-soft); }

/* ===== Feedback ===== */
.feedback-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.feedback-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 30px 28px 26px; box-shadow: var(--shadow-sm); position: relative;
}
.feedback-card::before {
  content: "\201C"; font-family: Georgia, serif; font-size: 4.5rem; color: var(--orange);
  line-height: 1; position: absolute; top: 6px; left: 22px; opacity: .28;
}
.feedback-card blockquote { font-size: 1.02rem; color: var(--ink); position: relative; z-index: 1; padding-top: 14px; }
.feedback-card figcaption { margin-top: 16px; font-weight: 800; color: var(--muted); font-size: .9rem; }

/* ===== Contact ===== */
.contact {
  background: linear-gradient(150deg, var(--orange) 0%, var(--orange-dark) 100%);
  color: #fff;
}
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-info h2 { color: #fff; font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin-bottom: 14px; }
.contact-info > p { opacity: .95; margin-bottom: 30px; font-size: 1.05rem; }
.contact-list li { display: flex; gap: 16px; margin-bottom: 22px; align-items: flex-start; }
.ci-icon {
  flex: 0 0 46px; height: 46px; background: rgba(255,255,255,.2);
  border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.contact-list a { border-bottom: 1px solid rgba(255,255,255,.5); }
.contact-list a:hover { border-color: #fff; }

.contact-form {
  background: #fff; color: var(--ink); border-radius: var(--radius-lg);
  padding: 34px 30px; box-shadow: 0 20px 50px rgba(0,0,0,.18);
}
.contact-form h3 { font-size: 1.3rem; margin-bottom: 18px; }
.contact-form label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 14px; }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; margin-top: 6px; padding: 12px 14px; font-family: inherit; font-size: .95rem;
  border: 1.5px solid var(--border); border-radius: 12px; background: var(--cream); color: var(--ink);
  transition: border-color .15s; resize: vertical;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--orange); background: #fff;
}
.contact-form .optional { font-weight: 600; color: var(--muted); font-size: .8rem; }

/* Formspree hiện/ẩn qua thuộc tính data-fs-active.
   Selector đủ đặc hiệu để ghi đè style mặc định lib tự chèn. */
.contact-form [data-fs-success],
.contact-form [data-fs-error] { display: none; }

/* Thông báo gửi thành công */
.contact-form [data-fs-success][data-fs-active] {
  display: block; margin-bottom: 18px; padding: 14px 16px;
  background: #e8f7ec; color: #1c7a3a; border: 1.5px solid #b6e6c4;
  border-radius: 12px; font-weight: 700; font-size: .92rem; text-align: center;
}

/* Lỗi cấp form (data-fs-error rỗng) */
.contact-form [data-fs-error=""][data-fs-active] {
  display: block; margin-bottom: 14px; padding: 12px 14px;
  background: #fdecea; color: #c0392b; border: 1.5px solid #f5c6cb;
  border-radius: 12px; font-weight: 700; font-size: .9rem;
}

/* Lỗi cấp field (data-fs-error="tên_field") */
.contact-form [data-fs-error]:not([data-fs-error=""])[data-fs-active] {
  display: block; color: #c0392b; font-weight: 700; font-size: .82rem; margin-top: 4px;
}

/* Input bị lỗi validate */
.contact-form [aria-invalid="true"] { border-color: #c0392b; background: #fff; }

/* ===== Footer ===== */
.site-footer { background: var(--ink); color: #cfcfcf; padding-top: 56px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
.footer-brand .logo-mark { font-size: 1.7rem; }
.footer-brand .logo-mark .dot { color: #fff; }
.footer-brand p { margin-top: 10px; font-size: .9rem; line-height: 1.6; }
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer-col a, .footer-col span { display: block; font-size: .92rem; margin-bottom: 9px; color: #cfcfcf; transition: color .15s; }
.footer-col a:hover { color: var(--orange); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; font-size: .85rem; color: #9a9a9a; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .program-grid { grid-template-columns: 1fr; }
  .about-inner { grid-template-columns: 1fr; gap: 44px; }
  .about-inner { justify-items: center; }
  .about-visual { width: 100%; max-width: 460px; }
  .feedback-grid { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .section { padding: 60px 0; }
  .nav {
    position: fixed; top: 74px; right: 0; left: 0;
    background: #fff; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 24px 20px; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transform: translateY(-140%); transition: transform .3s ease; visibility: hidden;
  }
  .nav.open { transform: translateY(0); visibility: visible; }
  .nav a { padding: 13px 0; border-bottom: 1px solid var(--border); }
  .nav-cta { margin-top: 10px; border: none; }
  .menu-toggle { display: flex; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
}
