/* 바른길 수학영어학원 — 네이비·화이트, 정돈된 표 (P4 시간표·교습비) */
:root {
  --navy: #14244a;
  --navy-2: #22386b;
  --ink: #1b2233;
  --mute: #5b6478;
  --line: #d9dee8;
  --tint: #f2f4f8;
  --accent: #c8452c;
  --bg: #ffffff;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.7 'IBM Plex Sans KR', 'Apple SD Gothic Neo', sans-serif;
  word-break: keep-all; overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2 { margin: 0; letter-spacing: -0.02em; line-height: 1.25; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border: 1.5px solid var(--navy);
  background: var(--navy); color: #fff; font-weight: 600; font-size: 15px;
  text-decoration: none; border-radius: 4px; white-space: nowrap;
}
.btn:hover { background: var(--navy-2); }
.btn--line { background: transparent; color: var(--navy); }
.btn--line:hover { background: var(--navy); color: #fff; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 14px; }

/* 헤더 */
.top { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 50; }
.top__in { display: flex; align-items: center; gap: 32px; height: 68px; }
.logo { display: flex; align-items: baseline; gap: 8px; text-decoration: none; }
.logo__mark { font-weight: 700; font-size: 22px; color: var(--navy); letter-spacing: -0.03em; }
.logo__sub { font-size: 14px; color: var(--mute); font-weight: 500; }
.nav { display: flex; gap: 26px; margin-left: auto; font-size: 15px; font-weight: 500; }
.nav a { text-decoration: none; color: var(--mute); }
.nav a:hover { color: var(--navy); }

/* 히어로 */
.hero { padding: 64px 0 0; }
.hero__grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.eyebrow { margin: 0 0 18px; font-size: 14px; font-weight: 600; color: var(--accent); letter-spacing: 0.02em; }
.hero h1 { font-size: 50px; font-weight: 700; color: var(--navy); }
.lead { margin: 22px 0 30px; font-size: 17px; color: var(--mute); max-width: 30em; }
.hero__btns { display: flex; gap: 10px; flex-wrap: wrap; }
.hero__img { margin: 0; }
.hero__img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; }
.facts {
  display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; margin: 48px 0 0;
  border-top: 2px solid var(--navy); border-bottom: 1px solid var(--line);
}
.facts div { padding: 18px 20px 18px 0; display: flex; gap: 14px; align-items: baseline; }
.facts div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.facts dt { font-size: 13px; font-weight: 600; color: var(--mute); flex: none; }
.facts dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.facts a { color: var(--navy); text-decoration: none; font-weight: 600; }

.notice { background: var(--navy); color: #fff; font-size: 15px; padding: 13px 0; margin-top: 48px; }
.notice strong { display: inline-block; margin-right: 12px; padding: 1px 8px; background: var(--accent); font-size: 13px; border-radius: 2px; }

/* 섹션 공통 */
.sec { padding: 88px 0; }
.sec--tint { background: var(--tint); }
.sec__head { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px 48px; align-items: end; margin-bottom: 32px; }
.sec__head p { margin: 0; color: var(--mute); }
.sec h2 { font-size: 32px; color: var(--navy); }
.num {
  display: block; margin-bottom: 10px; font-size: 14px; font-weight: 600;
  color: var(--accent); letter-spacing: 0.08em;
}

/* 탭·시간표 */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--navy); }
.tab {
  font: inherit; font-size: 16px; font-weight: 600; padding: 12px 28px;
  border: 0; background: transparent; color: var(--mute); cursor: pointer;
}
.tab.is-on { background: var(--navy); color: #fff; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tt th, .fee__tbl th {
  text-align: left; font-size: 13px; font-weight: 600; color: var(--mute);
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.tt td { padding: 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tt td b { display: block; font-weight: 600; color: var(--navy); }
.tt td small { display: block; font-size: 13px; color: var(--mute); }
.tt tbody tr:hover { background: #fafbfd; }
.r { text-align: right !important; }
.tt .r { font-weight: 600; color: var(--navy); }
.tt .full { color: var(--accent); }
.note { margin: 18px 0 0; font-size: 14px; color: var(--mute); }

/* 교습비 */
.fee { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: start; }
.fee .sec__head { display: block; margin: 0; }
.fee .sec__head p { margin: 16px 0 24px; }
.fee__tbl { background: #fff; border-top: 2px solid var(--navy); }
.fee__tbl td { padding: 18px 16px; border-bottom: 1px solid var(--line); }
.fee__tbl td:first-child { font-weight: 600; color: var(--navy); }
.fee__tbl td.r { font-weight: 700; font-size: 17px; }
.fee__tbl tfoot td, .fee__tbl tfoot td:first-child { font-weight: 400; font-size: 13px; color: var(--mute); padding: 14px 16px; border: 0; line-height: 1.6; }

/* 수업 방식 */
.how { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.how__img { margin: 0; }
.how__img img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.steps { list-style: none; margin: 28px 0 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 18px 0 18px 56px; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before {
  content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 18px;
  font-weight: 700; font-size: 15px; color: var(--accent);
}
.steps b { display: block; font-size: 17px; color: var(--navy); margin-bottom: 4px; }
.steps span { color: var(--mute); font-size: 15px; }

/* 자습실 */
.sec--navy { background: var(--navy); color: #e8ecf5; }
.sec--navy h2 { color: #fff; margin-bottom: 18px; }
.study { display: grid; grid-template-columns: 1fr 1.3fr; gap: 56px; align-items: center; }
.study p { margin: 0; font-size: 17px; max-width: 26em; }
.study figure { margin: 0; }
.study img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }

/* 소식 */
.news { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--navy); }
.news li { display: flex; gap: 32px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.news time { flex: none; width: 96px; color: var(--mute); font-size: 14px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.news a { text-decoration: none; font-weight: 500; }
.news a:hover { color: var(--navy); text-decoration: underline; }

/* 오시는 길 */
.visit { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; }
.visit__lead { color: var(--mute); margin: 18px 0 24px; }
.visit__btns { display: flex; flex-direction: column; gap: 10px; max-width: 320px; }
.info { margin: 0; background: #fff; border-top: 2px solid var(--navy); }
.info div { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.info dt { font-size: 14px; font-weight: 600; color: var(--mute); }
.info dd { margin: 0; font-variant-numeric: tabular-nums; }
.info a { color: var(--navy); font-weight: 600; }
.copy {
  font: inherit; font-size: 14px; font-weight: 600; color: var(--navy);
  background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer;
}

/* 푸터 */
.foot { padding: 40px 0 48px; font-size: 13px; color: var(--mute); border-top: 1px solid var(--line); }
.foot p { margin: 0 0 8px; }
.foot__name { font-weight: 700; color: var(--navy); font-size: 15px; }
.foot__c { margin-top: 16px !important; }

.mbar { display: none; }

/* 태블릿 */
@media (max-width: 900px) {
  .nav { display: none; }
  .top__in { justify-content: space-between; }
  .hero__grid, .fee, .how, .study, .visit { grid-template-columns: 1fr; gap: 32px; }
  .hero h1 { font-size: 40px; }
  .sec__head { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .facts div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .how__img img { aspect-ratio: 16 / 10; }
}

/* 모바일 */
@media (max-width: 600px) {
  body { font-size: 15px; padding-bottom: 60px; }
  .wrap { padding: 0 20px; }
  .top__in { height: 58px; }
  .logo__mark { font-size: 19px; }
  .logo__sub { font-size: 12px; }
  .top .btn--sm { display: none; }
  .hero { padding-top: 36px; }
  .hero h1 { font-size: 32px; }
  .lead { font-size: 15.5px; margin: 16px 0 22px; }
  .hero__btns .btn { flex: 1 1 100%; }
  .facts { margin-top: 32px; }
  .facts div { padding: 13px 0; gap: 12px; }
  .facts dt { width: 34px; }
  .notice { margin-top: 32px; font-size: 14px; }
  .notice strong { display: table; margin: 0 0 6px; }
  .sec { padding: 60px 0; }
  .sec h2 { font-size: 26px; }
  .tab { flex: 1; padding: 12px 0; }
  .tt thead { display: none; }
  .tt tr { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .tt td { padding: 0; border: 0; }
  .tt td:nth-child(1) { grid-column: 1 / 3; grid-row: 1; }
  .tt td:nth-child(2), .tt td:nth-child(3) { grid-row: 2; font-size: 14px; }
  .tt td:nth-child(2) { grid-column: 1; }
  .tt td:nth-child(3) { grid-column: 2; color: var(--mute); }
  .tt td:nth-child(4) { grid-column: 3; grid-row: 1 / 3; align-self: center; font-size: 14px; }
  .tt td:nth-child(4):not(.full)::before { content: '남은 자리 '; font-weight: 400; color: var(--mute); }
  .fee__tbl th, .fee__tbl td { padding: 14px 8px; }
  .fee__tbl td:nth-child(2) { font-size: 13px; color: var(--mute); }
  .fee__tbl td.r { font-size: 15px; }
  .steps li { padding-left: 44px; }
  .news li { flex-direction: column; gap: 2px; }
  .visit__btns { max-width: none; }
  .info div { grid-template-columns: 72px 1fr; padding: 14px 16px; gap: 10px; }
  .mbar {
    display: grid; grid-template-columns: 1.2fr 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--navy); border-top: 1px solid var(--navy-2);
  }
  .mbar a {
    display: flex; align-items: center; justify-content: center; height: 56px;
    color: #fff; text-decoration: none; font-weight: 600; font-size: 15px;
  }
  .mbar a + a { border-left: 1px solid rgba(255,255,255,.15); }
  .mbar a:first-child { background: var(--accent); }
}
