/* ============================================================
   TopEduPrep — satmatheng.topeduprep.uk
   Shared stylesheet for all pages
   ============================================================ */
:root {
  --navy: #0A2463;
  --navy-dark: #071840;
  --blue: #1E5EBF;
  --gold: #E8A020;
  --gold-light: #F5C562;
  --cream: #FAFAF7;
  --gray-50: #F7F8FA;
  --gray-100: #EEF0F5;
  --gray-200: #D8DCE8;
  --gray-400: #8892A8;
  --gray-500: #6B7488;
  --gray-600: #4A5568;
  --gray-700: #333A4A;
  --gray-800: #1A202C;
  --white: #FFFFFF;
  --green: #2D8A4E;

  --font-display: 'Noto Serif KR', Georgia, serif;
  --font-body: 'Noto Sans KR', 'Apple SD Gothic Neo', system-ui, sans-serif;

  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 4px 20px rgba(10,36,99,0.10);
  --shadow-lg: 0 12px 40px rgba(10,36,99,0.18);
  --max-w: 1160px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); color: var(--gray-800); background: var(--white); line-height: 1.7; font-size: 16px; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.badge { display: inline-block; padding: 4px 12px; border-radius: 50px; font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.badge--gold { background: var(--gold-light); color: var(--navy-dark); }
.badge--navy { background: var(--navy); color: var(--white); }
.badge--green { background: #D4EDDA; color: var(--green); }
.section-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.section-title { font-family: var(--font-display); font-size: clamp(24px, 4vw, 38px); font-weight: 700; color: var(--navy); line-height: 1.28; margin-bottom: 16px; }
.section-subtitle { font-size: 16px; color: var(--gray-600); max-width: 680px; }
.section { padding: 72px 0; }
.section--alt { background: var(--gray-50); }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: 50px; font-weight: 700; font-size: 15px; transition: all .2s; }
.btn--primary { background: var(--navy); color: var(--white); }
.btn--primary:hover { background: var(--navy-dark); }
.btn--gold { background: var(--gold); color: var(--navy-dark); }
.btn--gold:hover { background: #d4911a; }
.btn--outline { border: 2px solid var(--navy); color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: var(--white); }

/* ===== HEADER / NAV ===== */
#header { position: sticky; top: 0; z-index: 900; background: rgba(10,36,99,.97); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,.08); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.nav__logo { display: flex; flex-direction: column; }
.nav__logo-name { font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--white); }
.nav__logo-sub { font-size: 10px; color: var(--gold); letter-spacing: .1em; text-transform: uppercase; }
.nav__links { display: flex; gap: 2px; }
.nav__links a { color: rgba(255,255,255,.82); font-size: 13.5px; font-weight: 500; padding: 8px 12px; border-radius: 8px; white-space: nowrap; }
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--white); background: rgba(255,255,255,.1); }
.nav__cta { background: var(--gold); color: var(--navy-dark); padding: 9px 18px; border-radius: 50px; font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.nav__cta:hover { background: var(--gold-light); }
.nav__hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav__hamburger span { display: block; width: 24px; height: 2px; background: var(--white); border-radius: 2px; }
.nav__mobile { display: none; background: var(--navy-dark); padding: 12px 20px 20px; }
.nav__mobile a { display: block; color: rgba(255,255,255,.85); font-size: 15px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
@media (max-width: 980px) {
  .nav__links { display: none; }
  .nav__hamburger { display: flex; }
}

/* ===== BREADCRUMB ===== */
.breadcrumb { background: var(--gray-50); border-bottom: 1px solid var(--gray-100); padding: 14px 0; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--gray-500); }
.breadcrumb a { color: var(--blue); }
.breadcrumb li:not(:last-child)::after { content: '/'; margin-left: 6px; color: var(--gray-400); }

/* ===== PAGE HERO ===== */
.page-hero { background: linear-gradient(135deg, var(--navy-dark) 0%, #0d3080 55%, #1240a8 100%); color: var(--white); padding: 56px 0 64px; position: relative; overflow: hidden; }
.page-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='%23ffffff' fill-opacity='0.03'%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"); }
.page-hero__inner { position: relative; max-width: 760px; }
.page-hero__eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .1em; color: var(--gold); text-transform: uppercase; margin-bottom: 16px; }
.page-hero h1 { font-family: var(--font-display); font-size: clamp(26px, 4vw, 42px); font-weight: 700; line-height: 1.25; margin-bottom: 18px; }
.page-hero p { font-size: 16.5px; color: rgba(255,255,255,.82); line-height: 1.8; max-width: 620px; margin-bottom: 28px; }
.page-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.page-hero__stats { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 32px; }
.page-hero__stat-num { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--gold); }
.page-hero__stat-label { font-size: 12px; color: rgba(255,255,255,.6); margin-top: 2px; }

/* ===== PROSE / ARTICLE CONTENT ===== */
.prose { max-width: 820px; }
.prose h2 { font-family: var(--font-display); font-size: 24px; color: var(--navy); margin: 40px 0 16px; padding-bottom: 10px; border-bottom: 2px solid var(--gold); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 18px; color: var(--navy); margin: 26px 0 12px; font-weight: 700; }
.prose p { margin-bottom: 16px; color: var(--gray-600); line-height: 1.85; }
.prose ul, .prose ol { margin: 0 0 18px 20px; color: var(--gray-600); }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 8px; line-height: 1.75; }
.prose strong { color: var(--gray-800); }
.prose table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 14px; }
.prose th { background: var(--navy); color: var(--white); padding: 11px 14px; text-align: left; font-weight: 600; font-size: 13px; }
.prose td { padding: 10px 14px; border-bottom: 1px solid var(--gray-100); color: var(--gray-700); }
.prose tr:nth-child(even) td { background: var(--gray-50); }
.highlight-box { background: linear-gradient(135deg, #EEF3FF, #F0F7FF); border-left: 4px solid var(--blue); border-radius: 0 var(--radius) var(--radius) 0; padding: 18px 22px; margin: 22px 0; }
.highlight-box p { margin: 0; color: var(--gray-700); }
.verdict-box { background: var(--navy); color: var(--white); border-radius: var(--radius); padding: 24px; margin: 24px 0; }
.verdict-box h3 { color: var(--gold); margin: 0 0 10px; }
.verdict-box p { color: rgba(255,255,255,.85); margin: 0; }

.layout-with-sidebar { display: grid; grid-template-columns: 1fr 280px; gap: 40px; align-items: start; }
@media (max-width: 900px) { .layout-with-sidebar { grid-template-columns: 1fr; } }
.sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 88px; }
.sidebar-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 22px; }
.sidebar-card__title { font-size: 13px; font-weight: 800; color: var(--navy); letter-spacing: .05em; text-transform: uppercase; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--gray-100); }
.sidebar-toc a { display: block; font-size: 13.5px; color: var(--gray-600); padding: 6px 0; border-bottom: 1px solid var(--gray-100); }
.sidebar-toc a:last-child { border-bottom: none; }
.sidebar-toc a::before { content: '→ '; color: var(--gold); font-weight: 700; }
.sidebar-cta { background: var(--navy); color: var(--white); }
.sidebar-cta .sidebar-card__title { color: var(--gold); border-color: rgba(255,255,255,.1); }
.sidebar-cta p { font-size: 13.5px; color: rgba(255,255,255,.78); margin-bottom: 14px; }
.sidebar-cta-btn { display: flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 50px; font-size: 13.5px; font-weight: 700; width: 100%; justify-content: center; margin-bottom: 9px; }
.sidebar-cta-btn--kakao { background: #FEE500; color: #3C1E1E; }
.sidebar-cta-btn--naver { background: #03C75A; color: var(--white); }
.sidebar-cta-btn--phone { background: rgba(255,255,255,.1); color: var(--white); border: 1px solid rgba(255,255,255,.2); }

/* ===== GRIDS / CARDS ===== */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm); }
.card:hover { box-shadow: var(--shadow); }
.card__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--navy); color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 14px; }
.card h3 { font-size: 17px; color: var(--navy); margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--gray-600); }

.campus-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 20px 24px; display: flex; align-items: center; gap: 16px; box-shadow: var(--shadow-sm); }
.campus-card__icon { width: 48px; height: 48px; border-radius: 12px; background: var(--navy); color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.campus-card__name { font-weight: 700; color: var(--navy); font-size: 16px; }
.campus-card__access { font-size: 13px; color: var(--gray-400); margin-top: 2px; }

.exam-card__tag { display: inline-block; padding: 4px 12px; border-radius: 50px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 12px; }
.exam-card__tag--sat { background: #EBF4FF; color: #1E5EBF; }
.exam-card__tag--act { background: #FFF3E0; color: #E65100; }
.exam-card__tag--ap { background: #E8F5E9; color: #2D7D32; }
.exam-card__tag--ib { background: #F3E5F5; color: #7B1FA2; }

/* ===== FAQ ===== */
.faq-item { border: 1px solid var(--gray-200); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.faq-q { padding: 16px 20px; font-weight: 700; color: var(--navy); cursor: pointer; display: flex; justify-content: space-between; align-items: center; background: var(--gray-50); }
.faq-a { padding: 0 20px; max-height: 0; overflow: hidden; color: var(--gray-600); font-size: 15px; line-height: 1.8; background: var(--white); transition: max-height .25s ease, padding .25s ease; }
.faq-item.open .faq-a { padding: 16px 20px; max-height: 600px; }

/* ===== CONTACT ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-btn { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--gray-200); box-shadow: var(--shadow-sm); margin-bottom: 14px; }
.contact-btn__icon { font-size: 24px; }
.contact-btn__label { display: block; font-weight: 700; color: var(--navy); }
.contact-info-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; }
.contact-info-card__title { font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.contact-info-card__text { font-size: 14px; color: var(--gray-600); }

/* ===== REVIEWS ===== */
.review-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 24px; }
.review-card__stars { color: var(--gold); font-size: 14px; margin-bottom: 10px; }
.review-card__text { font-size: 14.5px; color: var(--gray-600); margin-bottom: 14px; line-height: 1.8; }
.review-card__author { font-size: 13px; font-weight: 700; color: var(--navy); }

/* ===== BLOG ===== */
.blog-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.blog-card__thumb { background: linear-gradient(135deg, var(--navy), var(--blue)); height: 140px; display: flex; align-items: center; justify-content: center; position: relative; }
.blog-card__cat { position: absolute; top: 12px; left: 12px; }
.blog-card__body { padding: 20px; }
.blog-card__title { font-size: 16px; color: var(--navy); margin-bottom: 8px; line-height: 1.4; }
.blog-card__excerpt { font-size: 13.5px; color: var(--gray-600); margin-bottom: 14px; }
.blog-card__footer { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--gray-400); }
.blog-card__action { color: var(--blue); font-weight: 700; }

/* ===== CTA BAND ===== */
.cta-band { background: var(--navy); color: var(--white); border-radius: var(--radius-lg); padding: 40px; text-align: center; margin: 0 auto; }
.cta-band h2 { font-family: var(--font-display); font-size: 26px; margin-bottom: 10px; color: var(--white); }
.cta-band p { color: rgba(255,255,255,.75); margin-bottom: 22px; }
.cta-band__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ===== FOOTER ===== */
footer#footer { background: var(--navy-dark); color: rgba(255,255,255,.7); padding: 56px 0 28px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-logo-name { font-family: var(--font-display); font-size: 20px; color: var(--white); font-weight: 700; }
.footer-logo-sub { font-size: 11px; color: var(--gold); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 12px; }
.footer-desc { font-size: 13.5px; line-height: 1.7; }
.footer-col h4 { color: var(--white); font-size: 13.5px; margin-bottom: 14px; }
.footer-col a { display: block; font-size: 13px; color: rgba(255,255,255,.62); padding: 5px 0; }
.footer-col a:hover { color: var(--gold); }
.footer-divider { border: none; border-top: 1px solid rgba(255,255,255,.1); margin: 32px 0 20px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 12.5px; }
.footer-bottom-right a { color: rgba(255,255,255,.6); margin-left: 16px; }

/* ===== FADE-IN ===== */
.fade-in { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 640px) {
  .section { padding: 52px 0; }
  .layout-with-sidebar { gap: 24px; }
}
