/* ===========================================================
   김포교습소철거 — 사이드 스티키 탭내비형
   팔레트: 리버사이드 네이비 + 테라코타 액센트
   =========================================================== */

:root {
  --navy-950: #0e1b2b;
  --navy-900: #14263b;
  --navy-800: #1c3550;
  --navy-700: #26496b;
  --navy-100: #eaf1f7;
  --paper: #f6f3ec;
  --paper-card: #fffdf8;
  --terracotta: #d9683c;
  --terracotta-dark: #b8502a;
  --teal: #2f8f8a;
  --ink: #1e2a33;
  --ink-soft: #52616b;
  --line: #ddd6c6;
  --radius: 14px;
  --font-body: "Gowun Batang", "Nanum Gothic", serif;
  --font-ui: "Jost", "Nanum Gothic", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.8;
  font-size: 16px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--terracotta);
  color: #fff;
  padding: 10px 16px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

a {
  color: var(--terracotta-dark);
}

h1, h2, h3 {
  font-family: var(--font-ui);
  color: var(--navy-950);
  line-height: 1.4;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--navy-950);
  border-bottom: 3px solid var(--terracotta);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.brand {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.main-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.main-nav a {
  color: var(--navy-100);
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  padding: 6px 4px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--terracotta);
  border-bottom-color: var(--terracotta);
}

/* ---------- Layout: sticky side nav + content stack ---------- */
.layout {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 32px;
  padding: 32px 20px 64px;
  align-items: start;
}

.side-toc {
  position: sticky;
  top: 24px;
  align-self: start;
  background: var(--navy-900);
  border-radius: var(--radius);
  padding: 18px 14px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}
.side-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.side-toc a.toc-link {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--navy-100);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 999px;
  border-left: 3px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.side-toc a.toc-link:hover,
.side-toc a.toc-link:focus-visible {
  background: var(--navy-800);
  color: #fff;
}
.side-toc a.toc-link.active {
  background: var(--terracotta);
  color: #fff;
  border-left-color: var(--teal);
  font-weight: 600;
}

/* ---------- Content stack ---------- */
main { min-width: 0; }
.content-stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-left: 5px solid var(--navy-800);
  border-radius: var(--radius);
  padding: 28px 30px;
  box-shadow: 0 2px 10px rgba(14, 27, 43, 0.06);
}

.card h2 {
  font-size: 1.35rem;
  margin-top: 0;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--navy-100);
}

.hero-card {
  border-left-color: var(--terracotta);
}
.eyebrow {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--teal);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.hero-card h1 {
  font-size: 2rem;
  margin: 0 0 14px;
}
.lead {
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 18px;
}
.hero-picture {
  display: block;
  margin: 0 0 14px;
}
.hero-picture img {
  width: 100%;
  max-width: 620px;
  height: auto;
  border-radius: 10px;
  display: block;
  margin: 0 auto;
}
.date-line {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- Table ---------- */
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  min-width: 480px;
}
thead th {
  background: var(--navy-950);
  color: #fff;
  font-family: var(--font-ui);
  font-weight: 500;
  text-align: left;
  padding: 12px 14px;
}
tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
tbody tr:nth-child(even) {
  background: var(--navy-100);
}
.table-note {
  font-size: 0.86rem;
  color: var(--ink-soft);
  margin-top: 12px;
  margin-bottom: 0;
}
.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;
}

/* ---------- Lists ---------- */
.procedure-list {
  margin: 0;
  padding-left: 1.3em;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.procedure-list li strong {
  color: var(--terracotta-dark);
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.checklist li {
  position: relative;
  padding-left: 30px;
}
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  background: var(--teal);
  color: #fff;
  border-radius: 50%;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  justify-items: center;
}
.gallery-grid picture {
  display: block;
  width: 100%;
  max-width: 400px;
}
.gallery-grid img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  display: block;
}

/* ---------- Caution ---------- */
.caution-section {
  border-left-color: var(--terracotta);
  background: #fdf6f0;
}

/* ---------- FAQ ---------- */
.faq-section h3 {
  font-size: 1.05rem;
  margin: 20px 0 6px;
  color: var(--navy-800);
}
.faq-section h3:first-of-type {
  margin-top: 6px;
}
.faq-section p {
  margin: 0 0 4px;
  color: var(--ink);
}

/* ---------- Related cards ---------- */
.related-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.related-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--navy-100);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--navy-950);
  font-family: var(--font-ui);
  font-size: 0.92rem;
  min-height: 44px;
  transition: background 0.2s, transform 0.15s;
}
.related-card:hover,
.related-card:focus-visible {
  background: var(--navy-800);
  color: #fff;
  transform: translateY(-2px);
}
.related-card-arrow {
  color: var(--terracotta);
}
.related-card:hover .related-card-arrow,
.related-card:focus-visible .related-card-arrow {
  color: #fff;
}

/* ---------- CTA ---------- */
.cta-section {
  background: linear-gradient(135deg, var(--navy-950), var(--navy-700));
  color: #fff;
  border-radius: var(--radius);
  padding: 34px 30px;
  text-align: center;
}
.cta-section h2 {
  color: #fff;
  border-bottom: none;
  padding-bottom: 0;
}
.cta-section p {
  color: var(--navy-100);
  max-width: 560px;
  margin: 10px auto 22px;
}
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  background: var(--terracotta);
  color: #fff;
  font-family: var(--font-ui);
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  transition: background 0.2s;
}
.cta-button:hover,
.cta-button:focus-visible {
  background: var(--terracotta-dark);
}

/* ---------- Footer ---------- */
footer {
  background: var(--navy-950);
  color: var(--navy-100);
  padding: 22px 20px;
  text-align: center;
  font-size: 0.82rem;
}
footer address {
  font-style: normal;
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.7;
}
footer a {
  color: var(--terracotta);
}

/* ===========================================================
   Responsive — side nav becomes horizontal chip strip
   =========================================================== */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .side-toc {
    position: static;
    max-height: none;
    overflow: visible;
    border-radius: var(--radius);
  }
  .side-toc ul {
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .side-toc a.toc-link {
    flex: 0 0 auto;
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .layout {
    padding: 20px 14px 48px;
    gap: 18px;
  }
  .card {
    padding: 20px 18px;
  }
  .hero-card h1 {
    font-size: 1.6rem;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .related-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  body { font-size: 15px; }
  .card {
    padding: 16px 14px;
    border-left-width: 4px;
  }
  .hero-card h1 {
    font-size: 1.4rem;
  }
  .side-toc {
    padding: 12px 10px;
  }
  .side-toc a.toc-link {
    padding: 9px 12px;
    font-size: 0.85rem;
  }
  .cta-section {
    padding: 26px 18px;
  }
  .cta-button {
    width: 100%;
  }
  table {
    min-width: 0;
    font-size: 0.86rem;
  }
  thead { display: none; }
  tbody tr {
    display: block;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--line);
  }
  tbody td {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    border-bottom: none;
    padding: 8px 4px;
  }
  tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--navy-800);
    flex: 0 0 40%;
  }
}
