/*
Theme Name: 전국 자동차검사
Theme URI: https://geomsazone.com
Author: geomsazone.com
Description: 전국 자동차검사소 위치 안내 — 검사소 디렉토리 커스텀 테마. 설계문서(자동차검사소-위치사이트-설계문서.md) 구현체.
Version: 1.0.0
Requires PHP: 7.4
Text Domain: geomsazone
*/

/* ============================================================
   기본 리셋 & 레이아웃
   ============================================================ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-primary, #fff);
  color: var(--text-primary, #111827);
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif);
  line-height: 1.7;
  font-size: 17px;
  word-break: keep-all;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent, #0071E3); }
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}
.u-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--accent); color: #fff; padding: 12px 20px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ============================================================
   스크롤 리빌 모션 (.reveal → JS가 교차 시 .is-visible 부여)
   JS 없거나 IntersectionObserver 미지원 시 즉시 보이도록 폴백 처리됨.
   prefers-reduced-motion 환경에서는 station-directory.css의 전역
   `* { transition: none !important }` 규칙이 애니메이션만 끄고 표시는 유지한다.
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s cubic-bezier(.22,.61,.36,1), transform .6s cubic-bezier(.22,.61,.36,1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }

/* ============================================================
   헤더 / 내비게이션
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg-primary) 90%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border, #DDE4EE);
  transition: box-shadow .2s ease;
}
/* 스크롤 시 헤더를 72px → 60px로 줄이고 그림자를 아주 얕게 얹는다 (§4 Section 1) */
.site-header.is-scrolled { box-shadow: 0 1px 12px rgba(11,18,32,.08); }
.site-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 20px; max-width: 1360px; margin: 0 auto;
  transition: padding .2s ease;
}
.site-header.is-scrolled .site-header-inner { padding: 8px 20px; }

.site-branding { display: flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; flex-shrink: 0; }
.site-branding-mark { width: 34px; height: 34px; border-radius: 9px; display: block; }
.site-branding img.custom-logo { height: 34px; width: auto; border-radius: 0; }
.site-title { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; color: var(--text-primary); text-decoration: none; white-space: nowrap; }
.site-title:hover { color: var(--accent); }

.primary-nav { position: relative; }
.primary-nav > ul { list-style: none; display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; flex-wrap: nowrap; }
.primary-nav li { position: relative; }
.primary-nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 0 14px; border-radius: 999px; text-decoration: none;
  color: var(--text-primary); font-size: 15px; font-weight: 500;
  white-space: nowrap;
}
.primary-nav a:hover { background: var(--bg-secondary); color: var(--accent); }
.primary-nav a[aria-current="page"] { color: var(--accent); font-weight: 700; background: color-mix(in srgb, var(--accent) 9%, transparent); }

/* 하위 메뉴 — 데스크톱은 hover/focus, 좁은 화면은 JS 아코디언 */
.submenu-toggle {
  display: none;
  border: 0; background: transparent; cursor: pointer;
  width: 44px; height: 44px; padding: 0;
}
.submenu-caret {
  display: block; width: 8px; height: 8px; margin: 0 auto;
  border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg) translate(-2px, -2px);
}
.primary-nav .has-submenu > a::after {
  content: ""; margin-left: 6px;
  width: 6px; height: 6px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: .55;
}
.primary-nav .submenu {
  list-style: none; margin: 0; padding: 6px;
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30;
  min-width: 190px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 14px);
  box-shadow: var(--shadow-hover);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.primary-nav .has-submenu:hover .submenu,
.primary-nav .has-submenu:focus-within .submenu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.primary-nav .submenu a { width: 100%; font-size: 14px; border-radius: var(--radius-sm, 10px); }

/* 우측 강조 CTA */
.nav-cta-item { margin-left: 8px; }
.primary-nav a.nav-cta {
  background: var(--accent); color: #fff; font-weight: 700; padding: 0 20px;
}
.primary-nav a.nav-cta:hover { background: var(--accent-hover); color: #fff; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px;
  background: transparent; cursor: pointer;
}
.nav-toggle:hover { background: var(--bg-secondary); }
.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  display: block; width: 20px; height: 2px; border-radius: 2px;
  background: var(--text-primary);
}
.nav-toggle-icon { position: relative; margin: 0 auto; }
.nav-toggle-icon::before, .nav-toggle-icon::after { content: ""; position: absolute; left: 0; }
.nav-toggle-icon::before { top: -6px; }
.nav-toggle-icon::after { top: 6px; }

/* 1024px 미만: 접이식 메뉴 (항목이 9개 → 4개 + CTA로 줄어 임계점이 낮아졌다) */
@media (max-width: 1023px) {
  .nav-toggle { display: block; }
  .primary-nav { position: static; }
  .primary-nav > ul {
    display: none;
    position: absolute; top: calc(100% + 1px); left: 0; right: 0;
    flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 2px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: 8px 20px 16px;
    box-shadow: 0 8px 24px rgba(11,18,32,.08);
  }
  .primary-nav > ul.is-open { display: flex; }
  .primary-nav a { width: 100%; padding: 0 16px; font-size: 16px; }
  .primary-nav .has-submenu > a::after { display: none; }
  .primary-nav .has-submenu { display: flex; flex-wrap: wrap; align-items: center; }
  .primary-nav .has-submenu > a { flex: 1 1 auto; width: auto; }
  .submenu-toggle { display: block; flex: 0 0 auto; }
  .primary-nav .has-submenu.is-open .submenu-caret { transform: rotate(-135deg) translate(-3px, -3px); }
  .primary-nav .submenu {
    position: static; flex-basis: 100%;
    opacity: 1; visibility: visible; transform: none;
    display: none; border: 0; box-shadow: none; background: transparent;
    padding: 2px 0 6px 12px;
  }
  .primary-nav .has-submenu.is-open .submenu { display: block; }
  .nav-cta-item { margin: 8px 0 0; }
  .primary-nav a.nav-cta { justify-content: center; }
}

/* ============================================================
   푸터
   ============================================================ */
.site-footer {
  position: relative;
  margin-top: 64px;
  border-top: 1px solid var(--border, #D2D2D7);
  background: var(--bg-secondary, #F5F5F7);
  padding: 44px 20px 28px;
  color: var(--text-muted, #6E6E73);
  font-size: 13px;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent, #0071E3) 35%, var(--accent, #0071E3) 65%, transparent);
  opacity: .6;
}
.footer-inner { max-width: 1080px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }

.footer-columns {
  display: grid;
  grid-template-columns: 1.3fr .85fr 1fr 1.5fr .95fr;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border, #D2D2D7);
}
.footer-col-title {
  position: relative;
  margin: 0 0 14px;
  padding-left: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary, #1D1D1F);
}
.footer-col-title::before {
  content: '';
  position: absolute;
  left: 0; top: 2px;
  width: 4px; height: 14px;
  border-radius: 2px;
  background: var(--accent, #0071E3);
}
.footer-col-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer-col-list a { color: var(--text-muted); text-decoration: none; transition: color .15s ease, transform .15s ease; display: inline-block; }
.footer-col-list a:hover { color: var(--accent); transform: translateX(2px); }

.footer-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.footer-logo-mark { border-radius: 8px; flex: 0 0 auto; }
.footer-logo-text { font-size: 15px; font-weight: 700; color: var(--text-primary, #1D1D1F); }
.footer-tagline { margin: 12px 0 0; line-height: 1.6; max-width: 260px; }

.footer-stats { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.footer-stat {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg-primary, #fff);
  border: 1px solid var(--border, #D2D2D7);
  font-size: 12px; font-weight: 500;
  color: var(--text-muted, #6E6E73);
}
.footer-stat strong { color: var(--accent, #0071E3); font-weight: 700; }

.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: var(--text-muted); text-decoration: none; transition: color .15s ease, transform .15s ease; display: inline-block; }
.footer-links a:hover { color: var(--accent); transform: translateX(2px); }

.footer-region-links { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.footer-region-links a { color: var(--text-muted); text-decoration: none; font-size: 12px; transition: color .15s ease; }
.footer-region-links a:hover { color: var(--accent); text-decoration: underline; }

.footer-bottom { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.footer-bottom-text { display: flex; flex-direction: column; gap: 6px; }
.footer-disclosure { line-height: 1.6; max-width: 720px; margin: 0; }
.footer-copyright { opacity: .8; margin: 0; }

@media (max-width: 900px) {
  .footer-columns { grid-template-columns: 1fr 1fr; }
  .footer-col-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .footer-columns { grid-template-columns: 1fr; gap: 24px; }
  .footer-col-brand { grid-column: auto; }
  .footer-tagline { max-width: none; }
}

/* ============================================================
   맨 위로 이동 버튼
   ============================================================ */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border, #D2D2D7);
  background: var(--bg-primary, #fff);
  color: var(--text-primary, #1D1D1F);
  box-shadow: var(--shadow-soft, 0 4px 24px rgba(0,0,0,0.06));
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s, color .15s ease, border-color .15s ease;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { color: var(--accent, #0071E3); border-color: var(--accent, #0071E3); }
.back-to-top svg { width: 18px; height: 18px; }

@media (max-width: 600px) {
  .back-to-top { right: 14px; bottom: 14px; width: 40px; height: 40px; }
}

/* ============================================================
   본문 공통
   ============================================================ */
.page-content, .entry-content { max-width: 760px; margin: 32px auto; padding: 0 20px; }
.page-content h1, .entry-content h1 { font-size: 30px; margin-bottom: 8px; }
.entry-content h2 {
  font-size: 22px; font-weight: 700; letter-spacing: -0.01em;
  color: var(--text-primary, #1D1D1F);
  margin: 44px 0 18px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border, #D2D2D7);
}
.entry-content h2:first-child { margin-top: 0; }
.entry-content h3 { font-size: 18px; font-weight: 700; margin: 28px 0 10px; color: var(--text-primary, #1D1D1F); }
.entry-content table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
.entry-content th, .entry-content td { border: 1px solid var(--border, #D2D2D7); padding: 8px 12px; text-align: left; }
.entry-content th { background: var(--bg-secondary, #F5F5F7); }

/* ============================================================
   404 페이지
   ============================================================ */
.not-found-page { text-align: center; }
.not-found-page .breadcrumb { text-align: left; }
.not-found-code {
  font-size: 15px; font-weight: 700; letter-spacing: .08em;
  color: var(--accent, #0071E3); margin: 28px 0 4px;
}
.not-found-page h1 { margin-bottom: 12px; }
.not-found-page > p:not(.not-found-code) { color: var(--text-muted, #6E6E73); font-size: 16px; margin: 0 0 8px; }
.not-found-regions {
  margin: 56px 0 0; padding-top: 28px; border-top: 1px solid var(--border, #D2D2D7);
  text-align: left;
}
.not-found-regions h2 { font-size: 16px; font-weight: 700; margin: 0 0 14px; color: var(--text-primary, #1D1D1F); }
.not-found-regions .footer-region-links { justify-content: flex-start; }
.entry-content hr + p { font-size: 13px; color: var(--text-muted, #6E6E73); line-height: 1.6; }
.entry-meta { color: var(--text-muted, #6E6E73); font-size: 13px; margin-bottom: 24px; }
.ymyl-notice {
  background: color-mix(in srgb, var(--accent, #0071E3) 8%, transparent);
  border: 1px solid var(--accent, #0071E3);
  border-radius: var(--radius-md, 12px);
  padding: 16px 20px; margin: 20px 0; font-size: 14px;
}

/* 전문기관 공식 링크 CTA 버튼 (URL 노출형 링크 대체) */
.official-link-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 56px;
  padding: 14px 24px; margin: 16px 0;
  background: var(--accent, #0071E3); color: #fff;
  border-radius: var(--radius-md, 12px);
  font-size: 16px; font-weight: 700; line-height: 1.3;
  text-decoration: none; text-align: center;
  box-shadow: var(--shadow-soft);
  transition: background .15s ease, transform .1s ease;
}
.official-link-btn:hover { background: var(--accent-hover, #0077ED); color: #fff; }
.official-link-btn:active { transform: scale(0.98); }
.official-link-btn:focus-visible { outline: 3px solid var(--accent, #0071E3); outline-offset: 2px; }
.official-link-btn-arrow { font-size: 18px; }

/* ============================================================
   홈 (front-page.php)
   ============================================================ */
.home-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 20px 64px;
  background:
    radial-gradient(ellipse 900px 520px at 12% -20%, color-mix(in srgb, var(--accent) 12%, transparent) 0%, transparent 70%),
    var(--bg-primary);
}
/* 배경 장식: 화면을 가로지르는 도로 라인 한 줄 (§9.2 — 한 번만 그려지고 반복하지 않는다) */
.home-hero::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: repeating-linear-gradient(
    90deg,
    color-mix(in srgb, var(--accent) 45%, transparent) 0 26px,
    transparent 26px 52px
  );
  opacity: .35;
  pointer-events: none;
}
/* 기본형(검사소·카센터 허브): 가운데 정렬 한 컬럼 */
.home-hero-inner {
  position: relative;
  max-width: 700px; margin: 0 auto;
  text-align: center;
}
.home-hero-inner .hero-action-row,
.home-hero-inner .home-search-form { justify-content: center; }
.home-hero-inner .hero-lead { margin-left: auto; margin-right: auto; }

/* 홈 전용: 카피 + 검색 패널 2단 (§4 Section 2) */
body.home .home-hero-inner {
  max-width: 1120px; text-align: left;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
}
body.home .home-hero-inner .hero-action-row,
body.home .home-hero-inner .home-search-form { justify-content: flex-start; }
body.home .home-hero-inner .hero-lead { margin-left: 0; margin-right: 0; }
.hero-copy { min-width: 0; }

.hero-eyebrow {
  display: inline-block; margin-bottom: 18px; padding: 6px 16px;
  border-radius: 999px; background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: .01em;
}
.home-hero h1 {
  font-size: clamp(34px, 4.4vw, 56px); font-weight: 800; letter-spacing: -0.03em;
  line-height: 1.22; margin: 0 0 16px; color: var(--text-primary);
}
.home-hero .hero-lead { color: var(--text-muted); font-size: 17px; line-height: 1.65; margin: 0 0 28px; max-width: 30em; }

.hero-action-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* 히어로 우측 검색 패널 */
.hero-search-panel {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 18px);
  box-shadow: var(--shadow-hover);
  padding: 26px 24px 22px;
}
.hero-search-title { margin: 0 0 16px; font-size: 17px; font-weight: 700; }
.hero-search-note { margin: 14px 0 0; font-size: 13px; color: var(--text-muted); }

@media (max-width: 900px) {
  .home-hero { padding: 44px 20px 48px; }
  body.home .home-hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .home-hero .hero-lead { margin-bottom: 22px; }
}
@media (max-width: 600px) {
  .hero-search-panel { padding: 20px 16px 18px; }
  .hero-action-row .btn { flex: 1 1 100%; }
}

/* ============================================================
   버튼 시스템 (§8.1 — 주요 CTA는 파란색 하나로 통일)
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px;
  border-radius: 999px; border: 1.5px solid transparent;
  font-size: 16px; font-weight: 700; letter-spacing: -0.01em;
  text-decoration: none; cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.btn-icon { width: 18px; height: 18px; flex: 0 0 auto; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 28%, transparent); }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-secondary { background: var(--bg-primary); color: var(--accent); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); color: var(--accent); }

/* ============================================================
   내 차 검사 시기 계산기 (홈 히어로)
   ============================================================ */
.car-check-calc {
  max-width: 640px; margin: 0 auto 28px; padding: 32px 28px;
  background: var(--bg-primary, #fff); border: 1px solid var(--border, #D2D2D7);
  border-radius: var(--radius-lg, 18px); box-shadow: var(--shadow-hover, 0 12px 40px rgba(0,0,0,0.1));
  text-align: left;
}
.car-check-calc h2 { margin: 0 0 6px; font-size: 21px; text-align: center; }
.car-check-calc-sub { margin: 0 0 20px; font-size: 14px; color: var(--text-muted, #6E6E73); text-align: center; }

.car-check-calc-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.car-check-calc-field { flex: 1 1 180px; display: flex; flex-direction: column; gap: 6px; }
.car-check-calc-field label { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.car-check-calc-field input, .car-check-calc-field select {
  min-height: 52px; padding: 0 14px; border-radius: var(--radius-md, 12px);
  border: 1px solid var(--border, #D2D2D7); background: var(--bg-primary); color: var(--text-primary);
  font-size: 16px; width: 100%;
}
.car-check-calc-form button {
  min-height: 52px; padding: 0 24px; border-radius: var(--radius-md, 12px);
  background: linear-gradient(135deg, #2B8AF7, var(--accent, #0071E3));
  color: #fff; border: none; font-weight: 700; font-size: 16px; cursor: pointer; flex: 0 0 auto;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent, #0071E3) 35%, transparent);
}
.car-check-calc-form button:hover { transform: translateY(-1px); }

.car-check-calc-result { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border, #D2D2D7); }

.car-check-result-main { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; margin-bottom: 14px; }
.car-check-result-label { font-size: 13px; color: var(--text-muted, #6E6E73); }
.car-check-result-date { font-size: 26px; font-weight: 800; color: var(--text-primary); }
.car-check-result-dday { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--bg-secondary, #F5F5F7); color: var(--accent, #0071E3); font-weight: 700; font-size: 13px; }

.car-check-result-facts { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.car-check-fine-note { background: color-mix(in srgb, #FF9500 10%, transparent); border: 1px solid #FF9500; border-radius: var(--radius-md, 12px); padding: 10px 14px; line-height: 1.5; }
.car-check-note { font-size: 14px; color: var(--text-muted, #6E6E73); line-height: 1.6; }
.car-check-links { font-size: 13px; margin: 0 0 16px; }

.car-check-nearby-btn { width: 100%; margin-top: 4px; }
.car-check-nearby-result { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.car-check-nearby-result .station-list-item { background: var(--bg-secondary); border-radius: var(--radius-md); padding: 12px 16px; }

@media (max-width: 600px) {
  .car-check-calc { padding: 20px 16px; }
  .car-check-calc-form { flex-direction: column; align-items: stretch; }
}

.site-search { position: relative; max-width: 480px; margin: 0 auto 14px; text-align: left; }
.site-search-input {
  width: 100%; min-height: 52px;
  padding: 0 18px; border-radius: var(--radius-md, 12px);
  border: 1px solid var(--border, #D2D2D7);
  background: var(--bg-primary); color: var(--text-primary);
  font-size: 16px; box-sizing: border-box;
}
.site-search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px);
  margin: 0; padding: 6px; z-index: 20;
  list-style: none; text-align: left;
  background: var(--bg-primary);
  border: 1px solid var(--border, #D2D2D7);
  border-radius: var(--radius-md, 12px);
  box-shadow: var(--shadow-hover, 0 12px 40px rgba(0,0,0,0.12));
  max-height: 320px; overflow-y: auto;
}
.site-search-results li { border-radius: var(--radius-md, 12px); }
.site-search-results a {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px; border-radius: var(--radius-md, 12px);
  text-decoration: none; color: var(--text-primary);
}
.site-search-results li[aria-selected="true"] a,
.site-search-results a:hover { background: var(--bg-secondary, #F5F5F7); }
.site-search-sub { font-size: 12px; color: var(--text-muted, #6E6E73); }
.site-search-empty { padding: 10px 12px; color: var(--text-muted, #6E6E73); font-size: 14px; }

.home-search-form {
  max-width: 480px; margin: 0 auto 12px;
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
}
.home-search-form select {
  min-height: 52px;
  padding: 0 16px; border-radius: var(--radius-md, 12px);
  border: 1px solid var(--border, #D2D2D7);
  background: var(--bg-primary); color: var(--text-primary);
  font-size: 16px; flex: 1 1 160px;
}
.home-search-form button {
  min-height: 52px;
  padding: 0 28px; border-radius: 999px;
  background: linear-gradient(135deg, #2B8AF7, var(--accent, #0071E3));
  color: #fff; border: none;
  font-weight: 700; font-size: 16px; letter-spacing: -0.01em; cursor: pointer; flex: 0 0 auto;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent, #0071E3) 35%, transparent);
  transition: box-shadow .2s ease, transform .15s ease, background .2s ease;
}
.home-search-form button:hover {
  background: linear-gradient(135deg, #3D95F8, var(--accent-hover, #0077ED));
  transform: translateY(-2px);
  box-shadow: 0 10px 26px color-mix(in srgb, var(--accent, #0071E3) 45%, transparent);
}
.home-search-form button:active { transform: translateY(0) scale(0.98); box-shadow: 0 4px 12px color-mix(in srgb, var(--accent, #0071E3) 35%, transparent); }

.btn-near-me {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px;
  margin-top: 4px; padding: 0 28px; border-radius: 999px;
  background: #fff; color: var(--accent, #0071E3);
  border: 1.5px solid var(--accent, #0071E3);
  font-weight: 700; font-size: 16px; letter-spacing: -0.01em; text-decoration: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: background .2s ease, color .2s ease, transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn-near-me:hover {
  background: linear-gradient(135deg, #2B8AF7, var(--accent, #0071E3));
  border-color: transparent;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px color-mix(in srgb, var(--accent, #0071E3) 40%, transparent);
}
.btn-near-me:active { transform: translateY(0) scale(0.98); }

@media (prefers-reduced-motion: reduce) {
  .home-search-form button, .btn-near-me { transition: none; }
  .home-search-form button:hover, .btn-near-me:hover { transform: none; }
}

.home-stats { display: flex; justify-content: center; gap: 32px; margin-top: 28px; flex-wrap: wrap; }
.home-stats div { text-align: center; }
.home-stats strong { display: block; font-size: 24px; color: var(--accent); }
.home-stats span { font-size: 13px; color: var(--text-muted); }

/* 홈 전용 "신뢰 지표" 바 (기존 .home-stats는 검사소/카센터 허브 페이지에서 계속 사용) */
.trust-bar {
  border-top: 1px solid var(--border, #D2D2D7);
  border-bottom: 1px solid var(--border, #D2D2D7);
  background: var(--bg-secondary, #F5F5F7);
  padding: 30px 20px;
}
.trust-bar-inner { max-width: 880px; margin: 0 auto; display: flex; justify-content: center; flex-wrap: wrap; }
.trust-stat { flex: 1 1 140px; text-align: center; padding: 6px 24px; border-left: 1px solid var(--border, #D2D2D7); }
.trust-stat:first-child { border-left: none; }
.trust-stat strong { display: block; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; color: var(--text-primary); }
.trust-stat span { font-size: 13px; color: var(--text-muted); }
@media (max-width: 600px) {
  .trust-stat { flex: 1 1 45%; border-left: none; padding: 10px; }
}

.section-title { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; margin: 48px 20px 16px; max-width: 1040px; margin-left: auto; margin-right: auto; }

/* 홈 전용 섹션 헤더(eyebrow + 제목 + 부제) — 다른 페이지의 단독 .section-title는 영향 없음 */
.section-block { padding: 88px 0; }
.section-block-alt { background: var(--bg-secondary, #F5F5F7); }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 36px; padding: 0 20px; }
.section-head .section-title { margin: 0 0 8px; font-size: 28px; }
.eyebrow { display: block; font-size: 13px; font-weight: 700; color: var(--accent, #0071E3); letter-spacing: .02em; margin-bottom: 10px; }
.section-sub { margin: 0; font-size: 15px; color: var(--text-muted, #6E6E73); }
.section-more { text-align: center; margin-top: 28px; font-weight: 600; }

.sido-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px; max-width: 1080px; margin: 0 auto 40px; padding: 0 20px;
}
.sido-grid a {
  position: relative; overflow: hidden;
  display: block; text-align: center; padding: 16px 8px;
  background: var(--bg-primary, #fff); border: 1px solid var(--border, #D2D2D7); border-radius: var(--radius-md, 12px);
  text-decoration: none; color: var(--text-primary); font-weight: 600; font-size: 14px;
  min-height: var(--card-min-touch, 48px);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.sido-grid a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--accent, #0071E3); transform: scaleX(0); transform-origin: left;
  transition: transform .18s ease;
}
.sido-grid a:hover { box-shadow: var(--shadow-soft); color: var(--accent); border-color: transparent; transform: translateY(-2px); }
.sido-grid a:hover::after { transform: scaleX(1); }
.sido-name { display: block; }
.sido-count { display: block; margin-top: 2px; font-size: 12px; font-weight: 500; color: var(--text-muted); }
.sido-grid a:hover .sido-count { color: var(--accent); }

.hub-topics-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px; max-width: 1080px; margin: 0 auto; padding: 0 20px;
}
.hub-topic-card {
  display: flex; flex-direction: column; height: 100%;
  border-radius: var(--radius-lg, 18px);
  background: var(--bg-primary, #fff); border: 1px solid var(--border, #D2D2D7);
  text-decoration: none; color: var(--text-primary);
  box-shadow: var(--shadow-soft, 0 4px 24px rgba(0,0,0,0.06));
  transition: transform .2s ease, box-shadow .2s ease;
  overflow: hidden;
}
.hub-topic-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.hub-topic-thumb { overflow: hidden; }
.hub-topic-thumb img { width: 100%; height: auto; margin: 0; border-radius: 0; transition: transform .35s ease; }
.hub-topic-card:hover .hub-topic-thumb img { transform: scale(1.05); }
.hub-topic-card-body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 18px 20px 20px; }
.hub-topic-card h3 { margin: 0 0 6px; font-size: 16px; line-height: 1.4; }
.hub-topic-excerpt { font-size: 13px; color: var(--text-muted); }

/* ============================================================
   게시글 목록 카드 그리드 (카테고리 아카이브·검색 결과 등)
   ============================================================ */
.post-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px; max-width: 1080px; margin: 0 auto 40px; padding: 0 20px;
}
.post-card {
  position: relative;
  display: flex; flex-direction: column; height: 100%;
  background: var(--bg-primary, #fff);
  border: 1px solid var(--border, #D2D2D7);
  border-radius: var(--radius-md, 12px);
  overflow: hidden;
  box-shadow: var(--shadow-soft, 0 4px 24px rgba(0,0,0,0.06));
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.post-card:hover { box-shadow: var(--shadow-hover, 0 12px 40px rgba(0,0,0,0.12)); transform: translateY(-4px); }
.post-card .post-card-thumb {
  display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover;
  background: var(--border, #D2D2D7);
}
.post-card .post-card-body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 16px 20px 20px; }
.post-card h3 { margin: 0 0 8px; font-size: 17px; line-height: 1.4; }
.post-card p { margin: 0; font-size: 14px; color: var(--text-muted); }
.post-card .post-card-date { display: block; margin-bottom: 6px; font-size: 12px; color: var(--text-muted); }
.post-card a.post-card-link { position: absolute; inset: 0; }

/* 카드 하단 우측 "더보기" 표시 (전체 카드가 이미 클릭 가능하므로 시각적 신호 역할) */
.card-more {
  display: block;
  margin-top: auto;
  padding-top: 12px;
  align-self: flex-end;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent, #0071E3);
}

/* ============================================================
   홈 Section 3 — 빠른 도구 (§4 Section 3)
   4개 동일 카드가 아니라, 아이콘 + 한 줄 설명의 가벼운 행 배치
   ============================================================ */
.quick-tools {
  border-bottom: 1px solid var(--border);
  background: var(--bg-primary);
}
.quick-tools-inner {
  max-width: 1120px; margin: 0 auto; padding: 18px 20px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.quick-tool {
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--radius-md, 14px);
  text-decoration: none; color: var(--text-primary);
  transition: background .18s ease;
}
.quick-tool:hover { background: var(--bg-secondary); }
.quick-tool-icon { grid-row: 1 / 3; width: 26px; height: 26px; color: var(--accent); }
.quick-tool-label { font-size: 15px; font-weight: 700; }
.quick-tool-sub { font-size: 12.5px; color: var(--text-muted); }

@media (max-width: 900px) {
  .quick-tools-inner { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .quick-tools-inner { grid-template-columns: 1fr; gap: 2px; padding: 10px 12px; }
}

/* ============================================================
   홈 Section 4 — 데이터 신뢰 안내 (§4 Section 4, §10.1)
   ============================================================ */
.trust-notes {
  list-style: none;
  max-width: 880px; margin: 20px auto 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px;
  font-size: 13px; color: var(--text-muted);
}
.trust-notes li { position: relative; padding-left: 14px; }
.trust-notes li::before {
  content: ''; position: absolute; left: 0; top: 9px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: .55;
}
.trust-notes strong { color: var(--text-primary); font-weight: 700; }

/* ============================================================
   홈 Section 5 — 대표 1개 + 보조 4개 편집형 레이아웃 (§2.5, §4 Section 6)
   ============================================================ */
.feature-layout {
  max-width: 1080px; margin: 0 auto; padding: 0 20px;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; align-items: start;
}
.feature-card {
  display: flex; flex-direction: column;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 18px);
  overflow: hidden;
  text-decoration: none; color: var(--text-primary);
  box-shadow: var(--shadow-soft);
  transition: box-shadow .2s ease, transform .2s ease;
}
.feature-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
/* 이미지가 늦게 도착해도 자리 높이가 확정돼 레이아웃이 밀리지 않는다 (§2.6) */
.feature-card-thumb { aspect-ratio: 16 / 9; background: var(--bg-secondary); overflow: hidden; }
.feature-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.feature-card:hover .feature-card-thumb img { transform: scale(1.03); }
.feature-card-body { padding: 22px 24px 24px; }
.feature-card-body h3 { margin: 8px 0 10px; font-size: 23px; line-height: 1.35; letter-spacing: -0.02em; }
.feature-card-body p { margin: 0 0 14px; color: var(--text-muted); font-size: 15px; }

.card-eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .02em;
  color: var(--accent);
}
.card-meta { display: block; font-size: 13px; color: var(--text-muted); }

.feature-side-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.feature-side-list li + li { border-top: 1px solid var(--border); }
.feature-side-list a {
  display: block; padding: 16px 4px;
  text-decoration: none; color: var(--text-primary);
}
.feature-side-list a:hover h3 { color: var(--accent); }
.feature-side-list h3 { margin: 0 0 4px; font-size: 16px; line-height: 1.45; transition: color .15s ease; }

@media (max-width: 860px) {
  .feature-layout { grid-template-columns: 1fr; gap: 12px; }
  .feature-card-body h3 { font-size: 20px; }
}

/* ============================================================
   홈 Section 6 — 증상 선택 (§4 Section 7)
   ============================================================ */
.symptom-grid {
  max-width: 1080px; margin: 0 auto; padding: 0 20px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.symptom-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 64px; padding: 0 20px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 14px);
  text-decoration: none; color: var(--text-primary);
  font-weight: 600;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.symptom-card:hover { border-color: var(--accent); box-shadow: var(--shadow-soft); color: var(--accent); }
.symptom-arrow { color: var(--accent); transition: transform .18s ease; }
.symptom-card:hover .symptom-arrow { transform: translateX(3px); }

@media (max-width: 860px) { .symptom-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .symptom-grid { grid-template-columns: 1fr; } }

/* ============================================================
   홈 Section 7 — 리콜·세금·계절 3열 (§4 Section 8)
   ============================================================ */
.topic-columns {
  max-width: 1080px; margin: 0 auto; padding: 0 20px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.topic-column {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 18px);
  padding: 24px;
}
.topic-column-title { margin: 0 0 4px; font-size: 18px; }
.topic-column-title a { text-decoration: none; color: var(--text-primary); }
.topic-column-title a:hover { color: var(--accent); }
.topic-column-sub { margin: 0 0 16px; font-size: 13px; color: var(--text-muted); }
.topic-column-list { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.topic-column-list a {
  display: block; font-size: 15px; line-height: 1.5;
  color: var(--text-primary); text-decoration: none;
}
.topic-column-list a:hover { color: var(--accent); }
.topic-column-more { font-size: 14px; font-weight: 700; text-decoration: none; }

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

/* ============================================================
   계산기 — 결과의 성격을 먼저 알린다 (§2.8)
   ============================================================ */
.calc-disclaimer {
  margin: 16px 0 0;
  padding: 12px 16px;
  border-radius: var(--radius-md, 14px);
  background: color-mix(in srgb, var(--warning, #F1AE35) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--warning, #F1AE35) 45%, transparent);
  font-size: 13.5px; line-height: 1.6; color: var(--text-primary);
}
.car-check-basis { color: var(--text-muted); font-size: 13px; }

/* ============================================================
   홈 Section 9 — 마감 CTA (§4 Section 9)
   ============================================================ */
.closing-cta {
  background: linear-gradient(135deg, var(--navy, #111D33), var(--ink, #0B1220));
  color: #fff;
  padding: 72px 20px;
}
.closing-cta-inner { max-width: 620px; margin: 0 auto; text-align: center; }
.closing-cta h2 { margin: 0 0 10px; font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.02em; }
.closing-cta p { margin: 0 0 24px; color: rgba(255,255,255,.72); font-size: 16px; }
.closing-cta-form { display: flex; gap: 8px; flex-wrap: wrap; }
.closing-cta-form input {
  flex: 1 1 240px; min-height: 54px; padding: 0 18px;
  border-radius: var(--radius-md, 14px); border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.08); color: #fff; font-size: 16px;
}
.closing-cta-form input::placeholder { color: rgba(255,255,255,.5); }
.closing-cta-form button {
  min-height: 54px; padding: 0 28px; flex: 0 0 auto;
  border: 0; border-radius: var(--radius-md, 14px);
  background: var(--accent); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer;
}
.closing-cta-form button:hover { background: var(--accent-hover); }
.closing-cta-link { display: inline-block; margin-top: 18px; color: var(--cyan, #82DFFF); font-size: 14px; text-decoration: none; }
.closing-cta-link:hover { text-decoration: underline; }
/* 마감 CTA가 화면 끝에 붙으므로 홈에서만 푸터 상단 여백을 없앤다 */
body.home .site-footer { margin-top: 0; }

/* ============================================================
   카테고리 히어로 (§6.1) — 홈 히어로와 달리 한 컬럼 좌측 정렬
   ============================================================ */
.category-hero {
  position: relative;
  padding: 40px 20px 48px;
  background:
    radial-gradient(ellipse 720px 420px at 8% -30%, color-mix(in srgb, var(--accent) 11%, transparent) 0%, transparent 70%),
    var(--bg-primary);
  border-bottom: 1px solid var(--border);
}
.category-hero-inner { max-width: 1080px; margin: 0 auto; }
.category-hero h1 {
  margin: 0 0 12px; font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.25;
}
.category-hero .hero-lead { margin: 0 0 24px; max-width: 34em; color: var(--text-muted); font-size: 17px; }

.post-card .card-meta { margin-top: auto; padding-top: 12px; }

/* ============================================================
   글 상세 상단 — 요약(dek) · 결론 박스 · 메타 (§2.7, §7.1)
   ============================================================ */
.entry-header { max-width: var(--measure, 760px); margin: 28px auto 0; padding: 0 20px; }
.entry-category-badge {
  display: inline-block; margin-bottom: 12px; padding: 5px 14px;
  border-radius: 999px; background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent); font-size: 13px; font-weight: 700; text-decoration: none;
}
.entry-header h1 {
  margin: 0 0 12px; font-size: clamp(27px, 3.4vw, 36px);
  line-height: 1.35; letter-spacing: -0.025em;
}
.entry-dek {
  margin: 0 0 16px; font-size: 17px; line-height: 1.7; color: var(--text-muted);
}
.entry-meta {
  display: flex; flex-wrap: wrap; gap: 4px 12px;
  color: var(--text-muted); font-size: 13px; margin: 0 0 20px;
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.entry-thumbnail { max-width: var(--measure, 760px); margin: 0 auto 24px; padding: 0 20px; }
/* 대표 이미지 자리를 미리 확보해 상단이 잠깐 비어 보이지 않게 한다 (§2.6) */
.entry-thumbnail img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg, 18px);
}

.entry-content { line-height: 1.85; }
.entry-content p { margin: 0 0 1.3em; }

/* 게시글 카드 이미지도 동일하게 자리부터 잡는다 */
.post-card .post-card-thumb,
.hub-topic-thumb img { aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg-secondary); }

/* ============================================================
   내 주변 찾기
   ============================================================ */
.near-me-page { max-width: 720px; margin: 0 auto; padding: 32px 20px; }
.near-me-fallback {
  background: var(--bg-secondary); border-radius: var(--radius-md); padding: 20px; margin-top: 16px;
}
.near-me-fallback select {
  min-height: 48px; padding: 0 12px; border-radius: var(--radius-md);
  border: 1px solid var(--border); font-size: 16px; margin-right: 8px; margin-bottom: 8px;
}
#near-me-list { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
#near-me-list .station-list-item { background: var(--bg-secondary); border-radius: var(--radius-md); padding: 12px 16px; border: none; }
