/* =========================================================
   추진 행정사 블로그 — 공용 스타일시트 (style.css)
   네이버 블로그형 레이아웃 / 행정사 사무소 톤
   ========================================================= */

@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");

:root {
  --navy: #1f2c3d;        /* 진한 남색 (메인 사이트와 통일감) */
  --navy-soft: #2c3e54;
  --green: #03c75a;       /* 네이버 그린 포인트 */
  --green-dark: #02a94d;
  --ink: #222831;         /* 본문 글자 */
  --sub: #5b6573;         /* 보조 글자 */
  --muted: #95a0ad;       /* 흐린 글자 (날짜 등) */
  --line: #e7eaee;        /* 구분선 */
  --bg: #f4f6f8;          /* 페이지 배경 */
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(31, 44, 61, .06), 0 6px 24px rgba(31, 44, 61, .05);
  --maxw: 1100px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* ---------- 상단 헤더 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  color: var(--navy);
}
.brand .dot {
  width: 10px; height: 10px;
  background: var(--green);
  border-radius: 50%;
  display: inline-block;
}
.nav {
  display: flex;
  gap: 26px;
  font-size: 15px;
  font-weight: 600;
  color: var(--sub);
}
.nav a { transition: color .15s; }
.nav a:hover { color: var(--green-dark); }

.header-cta {
  background: var(--green);
  color: #fff;
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  transition: background .15s, transform .15s;
}
.header-cta:hover { background: var(--green-dark); transform: translateY(-1px); }

.menu-toggle { display: none; background: none; border: 0; font-size: 24px; color: var(--navy); cursor: pointer; }

/* ---------- 프로필 커버 ---------- */
.cover {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cover::after {
  content: "";
  position: absolute; right: -60px; top: -60px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(3,199,90,.35), transparent 70%);
  border-radius: 50%;
}
.cover-inner { padding: 40px 0 44px; position: relative; z-index: 1; }
.cover h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.cover .tagline { margin-top: 10px; color: #cdd6e2; font-size: 16px; max-width: 640px; }
.cover .meta { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 18px; font-size: 14px; color: #aebbcb; }
.cover .meta b { color: #fff; font-weight: 700; }

/* ---------- 본문 그리드 ---------- */
.layout {
  display: grid;
  grid-template-columns: 1fr 312px;
  gap: 36px;
  padding: 40px 0 64px;
  align-items: start;
}

.section-title {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 18px; font-weight: 800; color: var(--navy);
  margin-bottom: 20px;
}
.section-title small { font-weight: 600; color: var(--muted); font-size: 13px; }

/* ---------- 글 목록 카드 ---------- */
.post-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .18s, border-color .18s;
  opacity: 0;
  transform: translateY(12px);
  animation: rise .5s ease forwards;
}
.post-card:nth-child(2) { animation-delay: .05s; }
.post-card:nth-child(3) { animation-delay: .1s; }
.post-card:nth-child(4) { animation-delay: .15s; }
.post-card:nth-child(5) { animation-delay: .2s; }
.post-card:nth-child(6) { animation-delay: .25s; }
@keyframes rise { to { opacity: 1; transform: none; } }

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(31,44,61,.08), 0 14px 36px rgba(31,44,61,.10);
  border-color: #d6dde4;
}
.thumb {
  border-radius: 10px;
  aspect-ratio: 16/11;
  display: flex; align-items: flex-end;
  padding: 12px;
  color: #fff; font-weight: 700; font-size: 14px;
  background: linear-gradient(135deg, #2f8f63, #1f6f4d);
}
.thumb.c1 { background: linear-gradient(135deg, #2f9e6b, #15784f); }
.thumb.c2 { background: linear-gradient(135deg, #3b6ea5, #244e7a); }
.thumb.c3 { background: linear-gradient(135deg, #b5743a, #8a4f23); }
.thumb.c4 { background: linear-gradient(135deg, #6a5acd, #463a9e); }
.thumb.c5 { background: linear-gradient(135deg, #c0556b, #8f3a4d); }
.thumb.c6 { background: linear-gradient(135deg, #2a8f9e, #1a6571); }

.post-body { display: flex; flex-direction: column; }
.cat-tag {
  align-self: flex-start;
  font-size: 12px; font-weight: 700;
  color: var(--green-dark);
  background: #e7f8ef;
  padding: 4px 10px; border-radius: 999px;
  margin-bottom: 10px;
}
.post-body h3 { font-size: 19px; font-weight: 800; color: var(--ink); line-height: 1.4; }
.post-card:hover .post-body h3 { color: var(--green-dark); }
.excerpt { color: var(--sub); font-size: 14.5px; margin-top: 8px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-foot { margin-top: 14px; display: flex; gap: 12px; font-size: 13px; color: var(--muted); }

/* ---------- 페이지네이션 ---------- */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 30px; }
.pagination a, .pagination span {
  min-width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid var(--line);
  background: #fff; font-weight: 600; font-size: 14px; color: var(--sub);
  transition: all .15s;
}
.pagination a:hover { border-color: var(--green); color: var(--green-dark); }
.pagination .active { background: var(--green); border-color: var(--green); color: #fff; }

/* ---------- 사이드바 위젯 ---------- */
.widget {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.widget h4 {
  font-size: 14px; font-weight: 800; color: var(--navy);
  padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 2px solid var(--navy);
  display: flex; align-items: center; gap: 7px;
}

/* 프로필 위젯 */
.profile { text-align: center; }
.profile .avatar {
  width: 76px; height: 76px; margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--navy-soft));
  color: #fff; font-weight: 800; font-size: 26px;
  display: flex; align-items: center; justify-content: center;
}
.profile .name { font-weight: 800; font-size: 17px; color: var(--navy); }
.profile .role { font-size: 13px; color: var(--muted); margin-top: 2px; }
.profile .bio { font-size: 13.5px; color: var(--sub); margin: 12px 0 16px; }
.profile .contact { font-size: 13px; color: var(--sub); text-align: left;
  border-top: 1px solid var(--line); padding-top: 14px; }
.profile .contact div { display: flex; gap: 8px; margin-bottom: 6px; }
.profile .contact b { color: var(--navy); min-width: 38px; }
.btn-consult {
  display: block; text-align: center;
  background: var(--green); color: #fff; font-weight: 700;
  padding: 11px; border-radius: 10px; margin-top: 14px;
  transition: background .15s;
}
.btn-consult:hover { background: var(--green-dark); }

/* 카테고리 / 최근글 리스트 */
.cat-list, .recent-list { list-style: none; }
.cat-list li, .recent-list li { border-bottom: 1px solid var(--line); }
.cat-list li:last-child, .recent-list li:last-child { border-bottom: 0; }
.cat-list a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 2px; font-size: 14px; color: var(--sub); transition: color .15s;
}
.cat-list a:hover { color: var(--green-dark); }
.cat-list .count { font-size: 12px; color: var(--muted); }
.recent-list a { display: block; padding: 11px 2px; font-size: 13.5px; color: var(--sub);
  line-height: 1.45; transition: color .15s; }
.recent-list a:hover { color: var(--green-dark); }
.recent-list .date { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; }

/* 검색 */
.search-box { display: flex; gap: 8px; }
.search-box input {
  flex: 1; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font-size: 14px; font-family: inherit; outline: none;
}
.search-box input:focus { border-color: var(--green); }
.search-box button {
  border: 0; background: var(--navy); color: #fff; border-radius: 10px;
  padding: 0 14px; font-weight: 700; cursor: pointer; font-family: inherit;
}

/* ---------- 푸터 ---------- */
.site-footer {
  background: var(--navy);
  color: #aebbcb;
  font-size: 13.5px;
  padding: 36px 0;
}
.site-footer .foot-grid { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; }
.site-footer b { color: #fff; }
.site-footer .office { max-width: 460px; line-height: 1.8; }
.site-footer .links a { color: #cdd6e2; display: block; margin-bottom: 7px; }
.site-footer .links a:hover { color: var(--green); }
.site-footer .copyright { margin-top: 26px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12);
  font-size: 12.5px; color: #7e8a99; }

/* =========================================================
   글 상세 페이지 (post.html)
   ========================================================= */
.article-wrap { background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 22px; display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--green-dark); }
.article-head .cat-tag { font-size: 13px; }
.article-head h1 { font-size: 30px; font-weight: 800; line-height: 1.35; color: var(--ink); margin: 12px 0 16px; letter-spacing: -0.02em; }
.article-meta { display: flex; gap: 16px; font-size: 14px; color: var(--muted);
  padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.article-body { padding: 30px 0; font-size: 16.5px; color: #2c333d; line-height: 1.9; }
.article-body h2 { font-size: 22px; font-weight: 800; color: var(--navy); margin: 34px 0 14px;
  padding-left: 12px; border-left: 4px solid var(--green); }
.article-body h3 { font-size: 18px; font-weight: 700; margin: 24px 0 10px; color: var(--ink); }
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol { margin: 0 0 18px 20px; }
.article-body li { margin-bottom: 8px; }
.article-body .callout {
  background: #f0f9f3; border: 1px solid #cdeedd; border-radius: 12px;
  padding: 18px 20px; margin: 22px 0; font-size: 15px; color: #1f6f4d;
}
.article-body strong { color: var(--navy); font-weight: 700; }
.featured-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; margin: 6px 0 26px; background: #eef1f4; display: block; }
.article-body figure { margin: 26px 0; }
.article-body figure img { width: 100%; border-radius: 12px; background: #eef1f4; display: block; }
.article-body figcaption { text-align: center; font-size: 13.5px; color: var(--muted); margin-top: 9px; }

.author-box {
  display: flex; gap: 16px; align-items: center;
  background: #f8fafb; border: 1px solid var(--line); border-radius: 12px;
  padding: 20px; margin-top: 10px;
}
.author-box .avatar { width: 56px; height: 56px; flex: 0 0 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--navy-soft)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; }
.author-box .name { font-weight: 800; color: var(--navy); }
.author-box .desc { font-size: 13.5px; color: var(--sub); margin-top: 2px; }
.author-box .btn-consult { margin: 0; align-self: center; padding: 10px 18px; white-space: nowrap; }

.post-nav { display: flex; justify-content: space-between; margin-top: 24px; gap: 12px; }
.post-nav a { flex: 1; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; font-size: 14px; transition: border-color .15s; }
.post-nav a:hover { border-color: var(--green); }
.post-nav .label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 4px; }
.post-nav .t { font-weight: 700; color: var(--ink); }

/* ---------- 로고 ---------- */
.logo-img { height: 34px; width: auto; display: block; max-width: 230px; }
.logo-text { display: none; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; color: var(--navy); letter-spacing: -0.02em; }
.logo-mark { background: var(--navy); color: #fff; padding: 4px 9px; border-radius: 8px; font-size: 17px; }

/* ---------- 드롭다운 메뉴 ---------- */
.dropdown { position: relative; }
.dropbtn { background: none; border: 0; font-family: inherit; font-weight: 600; font-size: 15px; color: var(--sub); cursor: pointer; padding: 0; display: inline-flex; align-items: center; gap: 5px; }
.dropbtn:hover { color: var(--green-dark); }
.caret { font-size: 10px; transition: transform .15s; }
.dropdown.open .caret { transform: rotate(180deg); }
.dropdown::after { content: ""; position: absolute; top: 100%; left: -12px; right: -12px; height: 22px; }
.dropdown-menu { display: none; position: absolute; top: calc(100% + 20px); left: 50%; transform: translateX(-50%); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; min-width: 184px; z-index: 60; }
.dropdown-menu a { display: block; padding: 11px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--sub); white-space: nowrap; transition: background .12s, color .12s; }
.dropdown-menu a:hover { background: #f0f9f3; color: var(--green-dark); }
.dropdown:hover .dropdown-menu, .dropdown.open .dropdown-menu { display: block; }

/* ---------- 사무소 소개 페이지 ---------- */
.about-intro { font-size: 16px; color: var(--sub); line-height: 1.9; margin-bottom: 10px; }
.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 22px 0 8px; }
.svc-card { border: 1px solid var(--line); border-radius: 12px; padding: 20px; background: #fafbfc; }
.svc-card h3 { color: var(--navy); font-size: 16px; font-weight: 800; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.svc-card p { color: var(--sub); font-size: 14px; line-height: 1.7; }
.contact-block { background: #f0f9f3; border: 1px solid #cdeedd; border-radius: 12px; padding: 22px; margin-top: 8px; }
.contact-block .row { display: flex; gap: 12px; font-size: 15px; color: var(--ink); margin-bottom: 9px; }
.contact-block .row:last-child { margin-bottom: 0; }
.contact-block .row b { min-width: 84px; color: var(--navy); }
.badge-open { display: inline-block; background: var(--green); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }

/* ---------- 드롭다운/로고 반응형 ---------- */
@media (max-width: 900px) {
  .dropdown { width: 100%; }
  .dropbtn { width: 100%; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .dropdown::after { display: none; }
  .dropdown-menu { position: static; transform: none; box-shadow: none; border: 0; padding: 4px 0 10px 14px; min-width: auto; }
  .dropdown:hover .dropdown-menu { display: none; }
  .dropdown.open .dropdown-menu { display: block; }
}
@media (max-width: 600px) {
  .svc-grid { grid-template-columns: 1fr; }
  .logo-img { height: 27px !important; max-width: 165px; }
}

/* ---------- 반응형 ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 26px; }
  .nav { display: none; }
  .menu-toggle { display: block; }
  .nav.open { display: flex; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px 20px; }
  .nav.open a { padding: 12px 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 600px) {
  .post-card { grid-template-columns: 1fr; }
  .thumb { aspect-ratio: 16/8; }
  .cover h1 { font-size: 24px; }
  .article-wrap { padding: 24px 20px; }
  .article-head h1 { font-size: 24px; }
  .author-box { flex-wrap: wrap; }
}
