@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;600;700;800&family=Chakra+Petch:wght@400;500;600;700&display=swap');

:root {
  --navy: #0a1628;
  --navy-mid: #112240;
  --navy-light: #1a3a5c;
  --gold: #c9a227;
  --gold-light: #f0c040;
  --gold-pale: #fdf3d0;
  --silver: #8a9bb5;
  --white: #ffffff;
  --off-white: #f8f9fc;
  --text-dark: #1a2332;
  --text-mid: #4a5568;
  --text-light: #718096;
  --success: #2d9b6e;
  --danger: #e53e3e;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(10,22,40,0.10);
  --shadow-lg: 0 8px 40px rgba(10,22,40,0.16);
  --radius: 12px;
  --radius-lg: 20px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Sarabun', sans-serif;
  background: var(--off-white);
  color: var(--text-dark);
  line-height: 1.7;
  min-height: 100vh;
}

/* ===== HEADER ===== */
header {
  background: var(--navy);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 64px;
}

.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--white);
}

.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
  color: var(--navy); font-family: 'Chakra Petch', sans-serif;
}

.logo-text { font-size: 15px; font-weight: 700; line-height: 1.2; }
.logo-text span { display: block; font-size: 11px; font-weight: 400; color: var(--silver); }

nav { display: flex; align-items: center; gap: 4px; }

nav a {
  color: #c8d6e8; text-decoration: none;
  padding: 8px 14px; border-radius: 8px;
  font-size: 14px; font-weight: 500;
  transition: all 0.2s;
}
nav a:hover, nav a.active { background: var(--navy-light); color: var(--gold-light); }

.nav-cta {
  background: linear-gradient(135deg, var(--gold), var(--gold-light)) !important;
  color: var(--navy) !important; font-weight: 700 !important;
  padding: 8px 18px !important;
}
.nav-cta:hover { opacity: 0.9; transform: translateY(-1px); }

.menu-toggle {
  display: none; background: none; border: none;
  color: var(--white); cursor: pointer; padding: 8px; font-size: 22px;
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, var(--navy-light) 100%);
  padding: 72px 24px 80px;
  position: relative; overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a227' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-inner {
  max-width: 900px; margin: 0 auto;
  text-align: center; position: relative;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(201,162,39,0.15); border: 1px solid rgba(201,162,39,0.3);
  color: var(--gold-light); padding: 6px 16px; border-radius: 50px;
  font-size: 13px; font-weight: 600; margin-bottom: 24px;
}

.hero h1 {
  font-family: 'Chakra Petch', sans-serif;
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 700; color: var(--white); line-height: 1.2;
  margin-bottom: 20px;
}

.hero h1 span { color: var(--gold-light); }

.hero-desc {
  font-size: clamp(15px, 2vw, 18px);
  color: #b0c4de; max-width: 640px; margin: 0 auto 36px;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy); font-weight: 700;
  padding: 14px 32px; border-radius: 50px;
  text-decoration: none; font-size: 16px;
  transition: all 0.25s; display: inline-block;
  box-shadow: 0 4px 20px rgba(201,162,39,0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(201,162,39,0.45); }

.btn-secondary {
  border: 2px solid rgba(255,255,255,0.3);
  color: var(--white); font-weight: 600;
  padding: 13px 28px; border-radius: 50px;
  text-decoration: none; font-size: 15px;
  transition: all 0.25s; display: inline-block;
}
.btn-secondary:hover { border-color: var(--gold-light); color: var(--gold-light); }

.hero-stats {
  display: flex; gap: 32px; justify-content: center;
  margin-top: 48px; flex-wrap: wrap;
}

.stat { text-align: center; }
.stat-num { font-family: 'Chakra Petch', sans-serif; font-size: 28px; font-weight: 700; color: var(--gold-light); }
.stat-label { font-size: 13px; color: var(--silver); }

/* ===== LAYOUT ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.section { padding: 60px 0; }
.section-alt { background: var(--white); }

.section-header { text-align: center; margin-bottom: 40px; }
.section-label {
  display: inline-block;
  background: var(--gold-pale); color: var(--gold);
  font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  padding: 4px 14px; border-radius: 50px; margin-bottom: 12px;
}
.section-header h2 {
  font-family: 'Chakra Petch', sans-serif;
  font-size: clamp(22px, 3.5vw, 32px); font-weight: 700; color: var(--navy);
  margin-bottom: 12px;
}
.section-header p { color: var(--text-light); font-size: 16px; max-width: 560px; margin: 0 auto; }

/* ===== CARDS GRID ===== */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.cards-grid-2 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }

.card {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 28px; transition: all 0.25s;
  box-shadow: var(--shadow);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--gold); }

.card-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 16px;
}

.card h3 { font-size: 17px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--text-mid); line-height: 1.65; }
.card-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--gold); font-weight: 600; font-size: 14px;
  text-decoration: none; margin-top: 16px;
  transition: gap 0.2s;
}
.card-link:hover { gap: 10px; }

/* POSITION CARD */
.pos-card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px 22px;
  display: flex; align-items: center; gap: 16px;
  text-decoration: none; color: inherit;
  transition: all 0.22s; box-shadow: var(--shadow);
}
.pos-card:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.pos-icon { font-size: 26px; flex-shrink: 0; }
.pos-info h3 { font-size: 15px; font-weight: 700; color: var(--navy); }
.pos-info p { font-size: 13px; color: var(--text-light); margin-top: 2px; }
.pos-arrow { margin-left: auto; color: var(--silver); font-size: 18px; }

/* ===== SUBJECT GRID ===== */
.subject-section { margin-bottom: 32px; }
.subject-label {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--navy); color: var(--gold-light);
  font-family: 'Chakra Petch', sans-serif;
  font-size: 13px; font-weight: 600; letter-spacing: 0.5px;
  padding: 6px 18px; border-radius: 50px; margin-bottom: 14px;
}
.subject-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.subject-item {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 18px;
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 500; color: var(--navy);
}
.subject-item::before { content: '📖'; font-size: 16px; }

/* ===== FAQ ===== */
.faq-item {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 10px; overflow: hidden;
}
.faq-q {
  width: 100%; text-align: left; background: none; border: none;
  padding: 18px 22px; cursor: pointer;
  font-size: 15px; font-weight: 600; color: var(--navy);
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; transition: background 0.2s;
  font-family: 'Sarabun', sans-serif;
}
.faq-q:hover { background: var(--off-white); }
.faq-q .arrow { color: var(--gold); font-size: 18px; transition: transform 0.3s; flex-shrink: 0; }
.faq-item.open .arrow { transform: rotate(180deg); }
.faq-a {
  max-height: 0; overflow: hidden; transition: max-height 0.35s ease;
  padding: 0 22px; color: var(--text-mid); font-size: 14px; line-height: 1.75;
}
.faq-item.open .faq-a { max-height: 300px; padding: 4px 22px 18px; }

/* ===== TIPS ===== */
.tip-card {
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  border-radius: var(--radius-lg); padding: 28px;
  color: var(--white); position: relative; overflow: hidden;
}
.tip-card::after {
  content: ''; position: absolute; top: -20px; right: -20px;
  width: 100px; height: 100px; border-radius: 50%;
  background: rgba(201,162,39,0.1);
}
.tip-num { font-family: 'Chakra Petch', sans-serif; font-size: 36px; font-weight: 700; color: rgba(201,162,39,0.3); margin-bottom: -8px; }
.tip-title { font-size: 16px; font-weight: 700; color: var(--gold-light); margin-bottom: 8px; }
.tip-desc { font-size: 14px; color: #b0c4de; line-height: 1.7; }

/* ===== REVIEW ===== */
.review-card {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: 24px;
  box-shadow: var(--shadow);
}
.review-stars { color: var(--gold); font-size: 16px; margin-bottom: 10px; }
.review-text { font-size: 14px; color: var(--text-mid); line-height: 1.75; font-style: italic; margin-bottom: 16px; }
.review-author { display: flex; align-items: center; gap: 10px; }
.review-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--gold-light); font-size: 15px;
}
.review-name { font-weight: 700; font-size: 14px; color: var(--navy); }
.review-pos { font-size: 12px; color: var(--text-light); }

/* ===== CTA BANNER ===== */
.cta-banner {
  background: linear-gradient(135deg, var(--gold) 0%, #e8b800 100%);
  border-radius: var(--radius-lg); padding: 40px 36px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.cta-banner h2 { font-family: 'Chakra Petch', sans-serif; font-size: 24px; font-weight: 700; color: var(--navy); }
.cta-banner p { color: rgba(10,22,40,0.7); font-size: 15px; margin-top: 6px; }
.btn-navy {
  background: var(--navy); color: var(--white);
  padding: 14px 28px; border-radius: 50px; font-weight: 700;
  text-decoration: none; font-size: 15px; white-space: nowrap;
  transition: all 0.25s; display: inline-block;
}
.btn-navy:hover { background: var(--navy-mid); transform: translateY(-2px); }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.breadcrumb-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-light); flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-light); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { color: var(--silver); }

/* ===== PAGE HERO (inner pages) ===== */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  padding: 48px 24px 52px; text-align: center;
}
.page-hero h1 {
  font-family: 'Chakra Petch', sans-serif;
  font-size: clamp(24px, 4vw, 40px); font-weight: 700;
  color: var(--white); margin-bottom: 12px;
}
.page-hero p { color: #b0c4de; font-size: 16px; max-width: 560px; margin: 0 auto; }

/* ===== QUIZ / EXAM ===== */
.exam-box {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: 28px;
  box-shadow: var(--shadow); margin-bottom: 16px;
}
.q-num {
  display: inline-block; background: var(--navy);
  color: var(--gold-light); font-family: 'Chakra Petch', sans-serif;
  font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 50px; margin-bottom: 10px;
}
.q-text { font-size: 15px; font-weight: 600; color: var(--navy); margin-bottom: 14px; line-height: 1.6; }
.q-options { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.q-options li {
  padding: 10px 16px; border-radius: 8px;
  border: 1px solid var(--border); font-size: 14px; cursor: default;
  transition: all 0.2s;
}
.q-options li.correct { background: #e8faf2; border-color: var(--success); color: var(--success); font-weight: 600; }
.q-options li.correct::before { content: '✓ '; }
.q-explain {
  margin-top: 14px; padding: 12px 16px;
  background: var(--off-white); border-radius: 8px; border-left: 3px solid var(--gold);
  font-size: 13px; color: var(--text-mid); line-height: 1.7;
}
.q-explain strong { color: var(--navy); }

.exam-subject-tabs {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px;
}
.exam-tab {
  padding: 8px 18px; border-radius: 50px; cursor: pointer;
  font-size: 13px; font-weight: 600; border: 2px solid var(--border);
  background: var(--white); color: var(--text-mid); transition: all 0.2s;
}
.exam-tab.active { background: var(--navy); color: var(--gold-light); border-color: var(--navy); }

.exam-panel { display: none; }
.exam-panel.active { display: block; }

/* ===== FOOTER ===== */
footer {
  background: var(--navy); color: #b0c4de;
  padding: 48px 24px 24px;
  margin-top: 60px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 36px;
  margin-bottom: 36px;
}
.footer-brand .logo-text { font-size: 16px; color: var(--white); font-weight: 700; }
.footer-brand p { font-size: 13px; color: var(--silver); line-height: 1.7; margin-top: 10px; }
.footer-col h4 { color: var(--gold-light); font-size: 13px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 14px; }
.footer-col a {
  display: block; color: var(--silver); text-decoration: none;
  font-size: 13px; padding: 4px 0; transition: color 0.2s;
}
.footer-col a:hover { color: var(--gold-light); }
.footer-social { display: flex; gap: 10px; margin-top: 14px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--navy-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: background 0.2s;
}
.footer-social a:hover { background: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 20px; text-align: center;
  font-size: 12px; color: var(--silver);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  nav { display: none; }
  nav.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--navy); padding: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  }
  .menu-toggle { display: block; }
  .header-inner { position: relative; }
  .hero { padding: 52px 20px 60px; }
  .hero-btns { flex-direction: column; align-items: center; }
  .hero-stats { gap: 20px; }
  .cta-banner { flex-direction: column; text-align: center; }
  .cards-grid, .cards-grid-2 { grid-template-columns: 1fr; }
  .section { padding: 44px 0; }
}

/* ===== UTILS ===== */
.text-gold { color: var(--gold); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-24 { margin-bottom: 24px; }
.highlight { background: var(--gold-pale); border-radius: 4px; padding: 2px 6px; color: var(--gold); font-weight: 600; }
