/* 세무정보 목록(업무사례 /cases, 세금 Q&A /guide, 칼럼 /tax-info) 공통 정돈 — 2026-11
   각 페이지 안쪽 <style> 뒤에 불러와 덮어쓴다. 강조색은 로고 파랑 하나.
   - 큰 탭: 선택된 탭 위에 짧은 파랑 선
   - 분류 칩: 바탕색 없이 글자만, 선택된 칩은 흰 바탕 + 파랑 테두리 + 옅은 그림자
   - 카드: 테두리 대신 옅은 그림자, 아래에 '자세히 보기 →' 띠(마우스를 올리면 파랑으로 채움) */
:root {
  --ib-brand: #1F5AD6;
  --ib-brand-tint: #EEF3FD;
  --ib-brand-line: #C9DAF6;
  --ib-ink: #0F1E36;
  --ib-body: #3A4558;
  --ib-muted: #7A8495;
  --ib-line: #EDF0F4;
  --ib-shadow: 0 4px 18px rgba(15, 30, 54, 0.07);
  --ib-shadow-hover: 0 12px 30px rgba(15, 30, 54, 0.12);
}

/* ── 큰 탭 ── */
.info-hero .info-tabs a[aria-current="page"]::before {
  content: ''; position: absolute; left: 0; top: -14px;
  width: 28px; height: 2px; background: var(--ib-brand);
}
.info-hero .info-tabs a[aria-current="page"]::after { background: var(--ib-ink); }
.info-hero .info-tabs { border-bottom-color: #E3E8EE; }

/* ── 분류 칩 ── */
.cs-cats, .qa-cats, .category-tabs { padding-top: 6px; padding-bottom: 8px; gap: 0.35rem; }
.cs-cats a, .qa-cats a, .category-tab {
  padding: 0.55rem 1.15rem;
  border: 1px solid transparent;
  background: transparent;
  color: #7A8495;
  font-weight: 600;
  transition: color .15s, border-color .15s, box-shadow .15s;
}
.cs-cats a:hover, .qa-cats a:hover, .category-tab:hover { background: transparent; color: var(--ib-ink); }
.cs-cats a[aria-current="page"], .qa-cats a[aria-current="page"], .category-tab.active {
  background: #fff;
  border-color: var(--ib-brand);
  color: var(--ib-brand);
  box-shadow: 0 3px 10px rgba(31, 90, 214, 0.12);
}

/* ── 카드 공통 ── */
.cs-card, .qa-card, .blog-card {
  position: relative;
  display: flex; flex-direction: column;
  background: #fff;
  border: 0;
  border-radius: 8px;
  box-shadow: var(--ib-shadow);
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease;
}
.cs-card:hover, .qa-card:hover, .blog-card:hover { transform: translateY(-4px); box-shadow: var(--ib-shadow-hover); }
.cs-card:hover b, .qa-card:hover b, .blog-card:hover .blog-title { text-decoration: none; }

/* 아래 '자세히 보기' 띠 */
.cs-card::after, .qa-card::after, .blog-card::after {
  content: '자세히 보기  →';
  position: static;
  display: block;
  margin: auto 22px 22px;
  padding: 11px 0;
  border-radius: 4px;
  background: var(--ib-brand-tint);
  color: var(--ib-brand);
  font-size: 0.84rem; font-weight: 700; letter-spacing: 0; text-align: center;
  white-space: pre;
  transform: none;
  transition: background .2s, color .2s;
}
.cs-card:hover::after, .qa-card:hover::after, .blog-card:hover::after { background: var(--ib-brand); color: #fff; transform: none; }

/* 날짜 줄: 회색 점 + 날짜, 위에 가는 선 */
.ib-date, .cs-meta {
  display: flex; align-items: center; gap: 8px;
  margin-top: 4px; padding-top: 14px;
  border-top: 1px solid var(--ib-line);
  font-size: 0.8rem; color: var(--ib-muted);
}
.ib-date::before, .cs-meta::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: #CDD3DC; flex: none;
}

/* 분류 표시: 테두리 알약 */
.ib-pill, .cs-word, .qa-cat, .blog-cat {
  display: inline-block; width: fit-content;
  padding: 3px 11px;
  border: 1px solid var(--ib-brand-line);
  border-radius: 999px;
  background: #fff;
  color: var(--ib-brand);
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0; line-height: 1.5;
}

/* ── 업무사례 카드 ── */
.cs-list { gap: 28px 24px; }
.cs-thumb { display: block; height: auto; padding: 24px 22px 0; background: none; }
.cs-body { flex: 1; gap: 0.6rem; padding: 14px 22px 18px; }
.cs-body b { order: 1; font-size: 1.08rem; color: var(--ib-ink); }
.cs-body p { order: 2; min-height: 3.4em; color: var(--ib-muted); }
.cs-body .cs-meta { order: 3; }
.cs-meta span { color: var(--ib-muted); }

/* ── 세금 Q&A 카드 ── */
.qa-grid { column-gap: 24px; row-gap: 24px; border-bottom: 0; }
.qa-card { gap: 0.6rem; padding: 24px 22px 18px; border-top: 0; }
.qa-card::after { margin: 14px 0 0; }
.qa-card b { font-size: 1.08rem; color: var(--ib-ink); }
.qa-card p { color: var(--ib-muted); }
.qa-cat .qa-draft { margin-left: 6px; }

/* ── 칼럼 카드 ── */
.blog-grid { gap: 28px 24px; }
.blog-card > div:not(.blog-thumbnail) { display: flex; flex-direction: column; flex: 1; padding: 18px 22px 14px; }
.blog-thumbnail { margin: 0; border-radius: 0; }
.blog-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0; margin-bottom: 0.7rem; }
.blog-meta .dot { display: none; }
.blog-meta .blog-cat { margin-right: 10px; }
.blog-title { font-size: 1.06rem; color: var(--ib-ink); }
.blog-description { color: var(--ib-muted); }

/* 칼럼: 모바일도 다른 탭과 같은 카드형(사진 위, 글 아래) */
@media (max-width: 768px) {
  .blog-grid { gap: 18px; }
  .blog-card { display: flex; align-items: stretch; gap: 0; padding: 0; border-bottom: 0; }
  .blog-thumbnail { order: 0; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 0; }
  .blog-description { -webkit-line-clamp: 2; }
}
@media (max-width: 640px) {
  .cs-card::after, .qa-card::after, .blog-card::after { margin: auto 18px 18px; padding: 10px 0; }
  .qa-card::after { margin: 12px 0 0; }
  .cs-thumb { padding: 20px 18px 0; }
  .cs-body { padding: 12px 18px 16px; }
  .qa-card { padding: 20px 18px 16px; }
  .blog-card > div:not(.blog-thumbnail) { padding: 16px 18px 12px; }
  .cs-body p { min-height: 0; }
}
@media (hover: none) {
  .cs-card:hover, .qa-card:hover, .blog-card:hover { transform: none; }
}

/* ── 2차: 결과 요약, Q&A 3열, 쪽 번호 ── */
.cs-card[hidden], .qa-card[hidden] { display: none !important; }

.cs-thumb { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.qa-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 4px; }

/* 업무사례 결과 요약 */
.cs-body .cs-result {
  order: 3;
  display: flex; align-items: baseline; gap: 10px;
  margin-top: 4px; padding: 12px 14px;
  border-left: 3px solid var(--ib-brand);
  background: #F7F9FC;
}
.cs-result small { flex: none; font-size: 0.74rem; font-weight: 700; color: var(--ib-muted); }
.cs-result strong { font-size: 1rem; font-weight: 800; letter-spacing: -0.3px; color: var(--ib-brand); line-height: 1.45; }
.cs-body .cs-meta { order: 4; }

/* 세금 Q&A: PC 3열 */
.qa-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.qa-card b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qa-card p { -webkit-line-clamp: 3; }
@media (max-width: 1024px) { .qa-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .qa-grid { grid-template-columns: 1fr; } }

/* 쪽 번호 (업무사례·Q&A·칼럼 공통 모양) */
.ib-pager, .pagination { display: flex; justify-content: center; align-items: center; gap: 6px; list-style: none; margin: 44px 0 0; padding: 0; }
.ib-pager:empty { display: none; }
.pagination { margin: 0; }
.ib-pager button, .pagination button, .pagination a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 6px;
  border: 1px solid var(--ib-line); border-radius: 4px; background: #fff;
  font: 600 0.9rem/1 'Pretendard', -apple-system, sans-serif; color: #6b778a;
  text-decoration: none; cursor: pointer; transition: border-color .15s, color .15s, background .15s;
}
.ib-pager button:hover:not(:disabled), .pagination button:hover:not(:disabled), .pagination a:hover { background: #fff; border-color: var(--ib-brand); color: var(--ib-brand); }
.ib-pager button.active, .pagination button.active, .pagination a.active { background: var(--ib-brand); border-color: var(--ib-brand); color: #fff; }
.ib-pager button:disabled, .pagination button:disabled { opacity: .4; cursor: default; }
.ib-pager button:disabled:not([aria-label]), .pagination button:disabled:not([aria-label]) { border-color: transparent; background: none; opacity: .6; }
@media (max-width: 640px) {
  .ib-pager { margin-top: 32px; gap: 4px; }
  .ib-pager button, .pagination button, .pagination a { min-width: 36px; height: 36px; }
}

/* ── 3차: 흰 면이 너무 넓지 않게 — 목록 영역은 옅은 회색, 카드만 흰색 ──
   (riversidetax처럼 회색 섹션 위에 흰 카드가 떠 보이게. 제목 탭 영역은 흰색 유지) */
.cs-section, .qa-section, .category-section {
  background: #F3F5F8;
}
.cs-section, .qa-section { padding-top: 36px; }
.category-section { padding-top: 36px; }
.cs-cats a[aria-current="page"], .qa-cats a[aria-current="page"], .category-tab.active { box-shadow: 0 3px 10px rgba(31, 90, 214, 0.14); }
.qa-search input, .info-search input { background: #fff; }
.cs-card, .qa-card, .blog-card { box-shadow: 0 2px 10px rgba(15, 30, 54, 0.06); }
.cs-body .cs-result { background: #F3F6FB; }
@media (max-width: 768px) {
  .cs-section, .qa-section, .category-section { padding-top: 22px; }
}

/* ── 4차: 결과 표시를 장부 결산 줄처럼 — 위 가는 선, 아래 회계식 이중선, 금액은 남색 오른쪽 정렬 ── */
.cs-body .cs-result {
  justify-content: space-between; align-items: baseline; gap: 16px;
  margin-top: 6px; padding: 11px 2px 10px;
  border-left: 0;
  border-top: 1px solid #D5DCE5;
  border-bottom: 3px double #C3CCD8;
  background: none;
}
.cs-result small { font-size: 0.76rem; font-weight: 600; letter-spacing: 0.02em; color: var(--ib-muted); }
.cs-result strong {
  text-align: right;
  font-size: 1.02rem; font-weight: 700; letter-spacing: -0.2px;
  color: var(--ib-ink);
  font-variant-numeric: tabular-nums;
}
.cs-body .cs-meta { border-top: 0; padding-top: 6px; }
