/* 과천교습소철거 — 클린 코퍼레이트형 (법률/컨설팅 사무소 톤) */

:root {
  --navy: #14213d;
  --navy-soft: #2c3e63;
  --ink: #1c1c1c;
  --gray: #5a5f68;
  --line: #dfe1e6;
  --paper: #ffffff;
  --paper-alt: #f7f8fa;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header: thin bar, logo + CTA only */
.site-header {
  border-bottom: 1px solid var(--line);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
}

.logo {
  font-family: "Noto Serif KR", serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.header-cta {
  border: 1px solid var(--navy);
  color: var(--navy);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 2px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.header-cta:hover,
.header-cta:focus-visible {
  background: var(--navy);
  color: #fff;
}

main {
  flex: 1;
  width: 100%;
}

article {
  max-width: 680px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

h1 {
  font-family: "Noto Serif KR", serif;
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: -0.01em;
  color: var(--navy);
  margin: 0 0 20px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--navy);
}

.lead {
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--ink);
  margin: 0 0 12px;
}

.date-note {
  font-size: 0.85rem;
  color: var(--gray);
  margin: 0 0 48px;
}

article > section {
  margin: 48px 0;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

article > section:first-of-type {
  border-top: none;
  padding-top: 0;
}

h2 {
  font-family: "Noto Serif KR", serif;
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--navy);
  margin: 0 0 18px;
  letter-spacing: -0.005em;
}

h3 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
  margin: 32px 0 8px;
}

section h3:first-of-type {
  margin-top: 0;
}

p {
  margin: 0 0 16px;
  color: var(--ink);
}

a {
  color: var(--navy);
}

ul,
ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

ul li,
ol li {
  margin-bottom: 10px;
  padding-left: 4px;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.92rem;
}

caption {
  text-align: left;
  font-size: 0.82rem;
  color: var(--gray);
  margin-bottom: 10px;
}

th,
td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

thead th {
  background: var(--navy);
  color: #fff;
  font-weight: 500;
  border-color: var(--navy);
}

tbody tr:nth-child(even) {
  background: var(--paper-alt);
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  justify-items: center;
  max-width: 560px;
  margin: 0 auto;
}

.gallery-grid figure {
  margin: 0;
  width: 100%;
}

.gallery-grid picture,
.gallery-grid img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
}

/* CTA block */
.cta {
  background: var(--paper-alt);
  border: 1px solid var(--line);
  border-top: 1px solid var(--line);
  padding: 32px 28px;
  text-align: center;
  border-radius: 2px;
}

.cta h2 {
  margin-bottom: 10px;
}

.cta p {
  color: var(--gray);
  margin-bottom: 20px;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 32px;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.98rem;
  border-radius: 2px;
  transition: background 0.15s ease;
}

.cta-button:hover,
.cta-button:focus-visible {
  background: var(--navy-soft);
}

/* Related links */
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.related-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.related-card:hover,
.related-card:focus-visible {
  border-color: var(--navy);
  background: var(--paper-alt);
}

.related-card span:last-child {
  color: var(--navy);
  margin-left: 8px;
}

.last-modified {
  margin-top: 40px;
  font-size: 0.8rem;
  color: var(--gray);
  text-align: right;
}

/* Footer */
footer {
  border-top: 1px solid var(--line);
  background: var(--paper-alt);
  padding: 20px 24px;
}

footer address {
  max-width: 680px;
  margin: 0 auto;
  font-style: normal;
  font-size: 0.78rem;
  color: var(--gray);
  line-height: 1.6;
  word-break: keep-all;
}

footer a {
  color: var(--gray);
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  article {
    padding: 40px 20px 64px;
  }

  h1 {
    font-size: 1.7rem;
  }

  .gallery-grid {
    max-width: 420px;
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: 14px 16px;
  }

  .logo {
    font-size: 0.95rem;
  }

  article {
    padding: 32px 16px 56px;
  }

  h1 {
    font-size: 1.45rem;
  }

  h2 {
    font-size: 1.15rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  thead {
    display: none;
  }

  table tr {
    border: 1px solid var(--line);
    margin-bottom: 12px;
    padding: 8px 0;
  }

  table td {
    border: none;
    padding: 6px 12px;
  }

  table td::before {
    content: attr(data-label);
    display: block;
    font-weight: 700;
    color: var(--navy);
    font-size: 0.78rem;
    margin-bottom: 2px;
  }

  .cta {
    padding: 24px 20px;
  }

  .cta-button {
    width: 100%;
  }
}
