/* 소형교습소철거 — 컴팩트 싱글컬럼, 카드형 섹션 */

:root {
  --primary: #8B3A3A;
  --primary-dark: #6B2C2C;
  --accent: #E8B4B4;
  --accent-soft: #F7E6E6;
  --ink: #2B1F1F;
  --paper: #FBF6F5;
  --card-bg: #FFFFFF;
  --line: #E8B4B4;
  --header-h: 60px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Noto Sans KR", -apple-system, "Malgun Gothic", sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
  padding-top: var(--header-h);
  overflow-x: hidden;
}

h1, h2 {
  font-family: "Gowun Batang", "Noto Sans KR", serif;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.4;
}

img { max-width: 100%; display: block; }

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(251, 246, 245, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  z-index: 200;
}

.brand {
  font-family: "Gowun Batang", serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-dark);
  text-decoration: none;
}

.nav-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
}
.nav-toggle svg { stroke: #fff; }

/* ===== Slide nav ===== */
.site-nav {
  position: fixed;
  top: 0; right: 0;
  height: 100%;
  width: min(300px, 84vw);
  background: var(--card-bg);
  border-left: 1px solid var(--line);
  z-index: 300;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  padding: 20px;
  overflow-y: auto;
}
.site-nav.open { transform: translateX(0); }

.nav-close {
  min-width: 44px;
  min-height: 44px;
  background: var(--accent-soft);
  border: none;
  border-radius: 8px;
  color: var(--primary-dark);
  cursor: pointer;
  margin-bottom: 16px;
}

.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav li { border-bottom: 1px solid var(--accent-soft); }
.site-nav a {
  display: block;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 10px 4px;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.98rem;
}
.site-nav a[aria-current="page"] { color: var(--primary); font-weight: 700; }

/* ===== Layout ===== */
.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--accent-soft);
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(139, 58, 58, 0.08);
  padding: 22px 20px;
}

.hero-card { padding: 0; overflow: hidden; }
.hero-card picture, .hero-card img { width: 100%; height: auto; }
.hero-text { padding: 20px; }

.eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--primary);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin: 0 0 10px;
}

h1 {
  font-size: 1.7rem;
  margin: 0 0 12px;
}

h2 {
  font-size: 1.25rem;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}

.card p { margin: 0 0 12px; }
.card p:last-child { margin-bottom: 0; }

/* ===== Table ===== */
.table-scroll { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 420px;
}
th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--accent-soft);
  vertical-align: top;
}
thead th {
  background: var(--accent-soft);
  color: var(--primary-dark);
  font-weight: 700;
}
tbody th[scope="row"] {
  white-space: nowrap;
  color: var(--primary);
  font-weight: 700;
}

/* ===== Gallery ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.gallery-grid figure { margin: 0; }
.gallery-grid img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ===== CTA ===== */
.cta-card {
  background: var(--primary);
  border-color: var(--primary);
}
.cta-card h2, .cta-card p { color: #fff; border-color: rgba(255,255,255,0.35); }

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  background: #fff;
  color: var(--primary-dark);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
}

/* ===== Footer ===== */
footer {
  background: var(--primary-dark);
  color: #F7E6E6;
  padding: 32px 16px 24px;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  max-width: 640px;
  margin: 0 auto 20px;
}
footer nav a {
  color: #F7E6E6;
  text-decoration: none;
  font-size: 0.9rem;
  min-height: 44px;
  display: flex;
  align-items: center;
}
footer nav a:hover { text-decoration: underline; }
footer address {
  max-width: 640px;
  margin: 0 auto;
  font-style: normal;
  font-size: 0.88rem;
  line-height: 1.8;
  color: #EBD0D0;
  border-top: 1px solid rgba(232, 180, 180, 0.3);
  padding-top: 16px;
}
footer address a { color: #fff; font-weight: 700; }
footer p {
  max-width: 640px;
  margin: 16px auto 0;
  font-size: 0.8rem;
  color: #D9A9A9;
}

/* ===== Breakpoints ===== */
@media (min-width: 480px) {
  h1 { font-size: 1.85rem; }
}

@media (min-width: 768px) {
  .page { max-width: 700px; padding: 32px 24px 56px; }
  .card { padding: 28px 32px; }
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.4rem; }
}

@media (min-width: 1024px) {
  .page { max-width: 760px; }
}

@media (min-width: 1280px) {
  .page { max-width: 800px; }
}

@media (max-width: 479px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

.related-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.related-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--line, #ddd);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--paper, #fff);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.related-card:hover,
.related-card:focus-visible {
  border-color: currentColor;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.related-card-arrow { opacity: 0.6; flex-shrink: 0; }
@media (max-width: 480px) {
  .related-cards { grid-template-columns: 1fr; }
}

