/* 오토드리브(autodrib.com) 공통 스타일 — 그래파이트그레이 + 레이싱레드 + 스틸블루 */

:root {
  --bg: #F6F6F4;
  --bg-alt: #FFFFFF;
  --text: #22262B;
  --text-muted: #5B6169;
  --graphite: #2B2E33;
  --graphite-dark: #181A1D;
  --red: #D6453D;
  --red-dark: #B5372F;
  --steel-blue: #3D6C9E;
  --steel-blue-dark: #2E5478;
  --teal: #2F6F6B;
  --border: #E4E3DF;
  --radius: 12px;
  --max-width: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--steel-blue-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* 헤더 */
.site-header {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--graphite-dark);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.brand:hover { text-decoration: none; }
.brand-en {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.nav-link {
  color: var(--text);
  font-size: 0.92rem;
  padding: 8px 10px;
  border-radius: 8px;
  white-space: nowrap;
}
.nav-link:hover { background: var(--bg); text-decoration: none; }
.nav-link.active { color: var(--red-dark); font-weight: 700; }
.nav-search { color: var(--steel-blue-dark); font-weight: 600; }
.nav-toggle { display: none; }

/* 히어로 */
.hero {
  background: linear-gradient(135deg, var(--graphite-dark), var(--graphite));
  color: #fff;
  padding: 56px 0;
}
.hero h1 { font-size: 1.9rem; margin: 0 0 12px; }
.hero-desc { color: #D8DADC; max-width: 640px; margin: 0; }

/* 섹션 */
.section { padding: 40px 0; }
.section-title {
  font-size: 1.3rem;
  margin: 0 0 18px;
  border-left: 4px solid var(--red);
  padding-left: 10px;
}
.section-heading { margin: 32px 0 12px; }

/* 카테고리 그리드 */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.category-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  border-top: 4px solid var(--graphite);
}
.category-card:hover { text-decoration: none; border-color: var(--text-muted); }
.category-card-icon {
  flex: none;
  width: 128px;
  height: 128px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg);
}
.category-card-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.category-card-body { min-width: 0; }
.category-card h3 { margin: 0 0 6px; font-size: 1.05rem; color: var(--graphite-dark); }
.category-card p { margin: 0; font-size: 0.88rem; color: var(--text-muted); }
.category-card.accent-red { border-top-color: var(--red); }
.category-card.accent-steel_blue { border-top-color: var(--steel-blue); }
.category-card.accent-teal { border-top-color: var(--teal); }
.category-card.accent-graphite { border-top-color: var(--graphite); }

/* 카드 그리드 (글 목록) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-top: 4px solid var(--graphite);
  border-radius: var(--radius);
  padding: 16px 16px 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.card:hover { text-decoration: none; box-shadow: 0 4px 14px rgba(0,0,0,0.06); }
.card.accent-red { border-top-color: var(--red); }
.card.accent-steel_blue { border-top-color: var(--steel-blue); }
.card.accent-teal { border-top-color: var(--teal); }
.card.accent-graphite { border-top-color: var(--graphite); }
.card-icon {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
}
.card-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { min-width: 0; }
.card-cat {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--graphite);
  color: #fff;
  margin-bottom: 8px;
}
.accent-red .card-cat, span.accent-red { background: var(--red); }
.accent-steel_blue .card-cat, span.accent-steel_blue { background: var(--steel-blue); }
.accent-teal .card-cat, span.accent-teal { background: var(--teal); }
.accent-graphite .card-cat, span.accent-graphite { background: var(--graphite); }
.card-title { font-size: 1.02rem; margin: 0 0 6px; color: var(--graphite-dark); }
.card-summary { font-size: 0.86rem; color: var(--text-muted); margin: 0; }
.empty-note { color: var(--text-muted); }

/* 최근 글 (홈 화면 제목 리스트) */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.post-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 5px solid var(--graphite);
  border-radius: var(--radius);
  padding: 14px 18px;
}
.post-date {
  flex: none;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-left: auto;
}
.post-row:hover { text-decoration: none; box-shadow: 0 4px 14px rgba(0,0,0,0.06); }
.post-row.accent-red { border-left-color: var(--red); }
.post-row.accent-steel_blue { border-left-color: var(--steel-blue); }
.post-row.accent-teal { border-left-color: var(--teal); }
.post-row.accent-graphite { border-left-color: var(--graphite); }
.post-cat {
  flex: none;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--graphite);
  color: #fff;
}
.post-row.accent-red .post-cat { background: var(--red); }
.post-row.accent-steel_blue .post-cat { background: var(--steel-blue); }
.post-row.accent-teal .post-cat { background: var(--teal); }
.post-row.accent-graphite .post-cat { background: var(--graphite); }
.post-title { flex: 1 1 auto; font-size: 0.98rem; font-weight: 600; color: var(--graphite-dark); }

/* 카테고리 헤더 */
.category-header { padding-top: 28px; border-top: 6px solid var(--graphite); }
.category-header.accent-red { border-top-color: var(--red); }
.category-header.accent-steel_blue { border-top-color: var(--steel-blue); }
.category-header.accent-teal { border-top-color: var(--teal); }
.category-header h1 { margin: 6px 0 10px; }

/* 브레드크럼 */
.breadcrumb { font-size: 0.82rem; color: var(--text-muted); margin: 18px 0 0; }
.breadcrumb a { color: var(--text-muted); }

/* 글 본문 */
.article-page { padding: 24px 0 60px; max-width: 760px; }
.article-page h1 { font-size: 1.7rem; margin: 10px 0 6px; }
.article-meta { color: var(--text-muted); font-size: 0.85rem; margin: 0 0 18px; }
.article-hero { border-radius: var(--radius); overflow: hidden; margin-bottom: 22px; }
.article-body p { margin: 0 0 16px; }
.content-list { margin: 0 0 16px; padding-left: 22px; }
.content-list li { margin-bottom: 6px; }

.step-list { list-style: none; margin: 0 0 20px; padding: 0; counter-reset: none; }
.step-item { display: flex; gap: 14px; margin-bottom: 16px; }
.step-num {
  flex: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--steel-blue);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
}
.step-body strong { display: block; margin-bottom: 3px; color: var(--graphite-dark); }
.step-body p { margin: 0; color: var(--text-muted); font-size: 0.92rem; }

.callout {
  border-radius: 10px;
  padding: 14px 16px;
  margin: 0 0 20px;
  border-left: 4px solid var(--steel-blue);
  background: #EEF3F8;
}
.callout p { margin: 4px 0 0; }
.callout-label { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; color: var(--steel-blue-dark); }
.callout-warning { border-left-color: var(--red); background: #FBEEED; }
.callout-warning .callout-label { color: var(--red-dark); }
.callout-tip { border-left-color: var(--teal); background: #EAF3F2; }
.callout-tip .callout-label { color: var(--teal); }

.official-links {
  margin: 30px 0;
  padding: 18px 20px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.official-links ul { margin: 0; padding-left: 20px; }
.official-links li { margin-bottom: 6px; }

.faq-section { margin: 30px 0; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 10px;
  background: var(--bg-alt);
}
.faq-item summary { font-weight: 700; cursor: pointer; color: var(--graphite-dark); }
.faq-item p { margin: 10px 0 0; color: var(--text-muted); }

/* 검색 */
.search-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 24px;
}

/* 404 */
.not-found { text-align: center; padding: 90px 0; }
.btn {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 20px;
  background: var(--red);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
}
.btn:hover { background: var(--red-dark); text-decoration: none; }

/* 푸터 */
.site-footer {
  background: var(--graphite-dark);
  color: #B9BCC0;
  margin-top: 40px;
}
.footer-wrap { padding: 32px 20px 40px; text-align: center; }
.footer-brand { color: #fff; font-weight: 800; margin-bottom: 10px; }
.footer-links { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.footer-links a { color: #B9BCC0; font-size: 0.85rem; }
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: 0.78rem; margin: 4px 0; }
.footer-note { font-size: 0.75rem; color: #7D818A; max-width: 520px; margin: 8px auto 0; }

/* 모바일 */
@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
  }
  .nav-toggle span { width: 22px; height: 2px; background: var(--graphite-dark); }
  .site-nav {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 20px 16px;
  }
  .site-nav.open { display: flex; }
  .hero h1 { font-size: 1.5rem; }
}
