/* =====================================================================
 * redesign-v12 — Guide article v2 + related-section separation
 * (2026-07-09, 로드 순서: style → v3 → v10 → v12. v11 대체 — nginx
 *  open_file_cache 60분 캐시 때문에 덮어쓰기 대신 파일명 버전 업)
 *
 * 1) Global gap fix   : AdSense side-rail 가로 overflow 차단
 * 2) Guide grid       : auto-fit (빈 트랙/불균형 제거)
 * 3) Guide card       : topic 칩 + 텍스트 중심 구조
 * 4) Guide hub intro  : eyebrow / 글 수 표기
 * 5) Guide article v2 : 독립 헤더 존, 넘버링 섹션, 악센트 요약, 좁은 읽기 컬럼
 * 6) Related section  : v10 `.pd-home-section{margin-top:0!important}` 및
 *                       카드 배경/24px 패딩이 본문 카드에 밀착시키던 문제 해소
 * 7) Mobile polish
 * ================================================================== */

/* ---------- 1) Global overflow fix ----------
 * AdSense side-rail iframe이 scrollWidth를 1840px까지 늘리던 문제.
 * clip은 scroll container를 만들지 않아 sticky 헤더/고지 동작 유지. */
html,
body {
  overflow-x: clip;
}

/* ---------- 2) Guide grid ---------- */
.pd-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  align-items: stretch;
}

/* ---------- 3) Guide card ---------- */
.pd-guide-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 18px 18px;
}

.pd-guide-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pd-guide-card__topic {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--pd-muted);
  color: var(--pd-primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.pd-guide-card__date {
  margin: 0;
  color: var(--pd-text-soft);
  font-size: 0.75rem;
}

.pd-guide-card__title {
  margin: 0;
  color: var(--pd-secondary);
  font-size: 1.02rem;
  line-height: 1.45;
}

.pd-guide-card__summary {
  margin: 0;
  color: var(--pd-text-soft);
  font-size: 0.85rem;
  line-height: 1.6;
}

.pd-guide-card__cta {
  margin-top: auto;
  padding-top: 6px;
  color: var(--pd-primary);
  font-size: 0.8rem;
  font-weight: 700;
}

/* ---------- 4) Guide hub intro ---------- */
.pd-guide-hub__eyebrow {
  margin: 0 0 6px;
  color: var(--pd-primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.pd-page-intro--guide-hub .pd-page-intro__title {
  font-size: 1.5rem;
  line-height: 1.3;
}

.pd-guide-hub__count {
  margin: 10px 0 0;
  color: var(--pd-text-soft);
  font-size: 0.78rem;
}

.pd-page-shell--guide-hub .pd-guide-grid {
  margin-top: 4px;
}

/* ---------- 5) Guide article v2 ---------- */
/* 읽기 컬럼: 허브(920px)보다 좁게 잡아 본문 줄 길이를 낮춘다 */
.pd-page-shell--guide-article {
  max-width: min(820px, calc(100% - 32px));
}

.pd-guide-article {
  background: var(--pd-card);
  border: 1px solid var(--pd-border);
  border-radius: var(--pd-radius);
  box-shadow: var(--pd-shadow);
  padding: 40px 44px 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.pd-guide-article__header {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--pd-border);
}

.pd-guide-article__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.pd-guide-article__date {
  color: var(--pd-text-soft);
  font-size: 0.78rem;
}

.pd-guide-article__title {
  margin: 0;
  color: var(--pd-secondary);
  font-size: 1.75rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.pd-guide-article__lead {
  margin: 0;
  color: var(--pd-text-soft);
  font-size: 1.02rem;
  line-height: 1.75;
}

/* 핵심 요약: 오렌지 악센트 바 패널 */
.pd-guide-article__summary {
  background: rgba(235, 97, 16, 0.05);
  border-left: 3px solid var(--pd-primary);
  border-radius: 4px 14px 14px 4px;
  padding: 16px 20px;
  display: grid;
  gap: 6px;
}

.pd-guide-article__summary-label {
  margin: 0;
  color: var(--pd-primary);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.pd-guide-article__summary-text {
  margin: 0;
  color: var(--pd-text);
  font-size: 0.94rem;
  line-height: 1.7;
}

.pd-guide-article__body {
  display: flex;
  flex-direction: column;
  gap: 30px;
  counter-reset: pd-guide-section;
}

.pd-guide-article__section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pd-guide-article__section h2 {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--pd-secondary);
  font-size: 1.22rem;
  line-height: 1.4;
}

.pd-guide-article__section h2::before {
  counter-increment: pd-guide-section;
  content: counter(pd-guide-section, decimal-leading-zero);
  color: var(--pd-primary);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.pd-guide-article__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pd-guide-article__list li {
  position: relative;
  padding-left: 20px;
  color: var(--pd-text);
  font-size: 0.97rem;
  line-height: 1.8;
}

.pd-guide-article__list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--pd-primary);
}

.pd-guide-article__footer {
  border-top: 1px solid var(--pd-border);
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.pd-guide-article__footer p {
  margin: 0;
  color: var(--pd-text-soft);
  font-size: 0.78rem;
  line-height: 1.6;
  max-width: 520px;
}

.pd-guide-article__footer a {
  color: var(--pd-primary);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- 6) Related section separation ----------
 * v3가 .pd-home-section에 카드 배경 + 24px 패딩을 주고
 * v10이 margin-top:0 !important 로 붙여버리던 것을 되돌린다.
 * 관련 섹션은 카드가 아니라 홈 스타일의 투명 섹션으로 취급. */
.pd-guide-related {
  margin-top: 48px !important;
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 32px 0 0;
  border-top: 1px solid var(--pd-border);
}

.pd-guide-related .pd-react-section-head {
  margin-bottom: 16px;
}

/* ---------- 7) Mobile polish ---------- */
@media (max-width: 768px) {
  .pd-guide-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .pd-guide-card {
    padding: 16px 16px 14px;
  }

  .pd-guide-article {
    padding: 24px 18px 20px;
    gap: 22px;
    border-radius: 16px;
  }

  .pd-guide-article__header {
    gap: 10px;
    padding-bottom: 18px;
  }

  .pd-guide-article__title {
    font-size: 1.36rem;
  }

  .pd-guide-article__lead {
    font-size: 0.94rem;
  }

  .pd-guide-article__body {
    gap: 24px;
  }

  .pd-guide-article__list li {
    font-size: 0.94rem;
  }

  .pd-guide-related {
    margin-top: 32px !important;
    padding-top: 24px;
  }

  .pd-page-intro--guide-hub .pd-page-intro__title {
    font-size: 1.3rem;
  }
}
