/* ==========================================================================
   인사이트 블로그 — 목록(insights.html) · 상세(insight.html)
   기준 시안: Figma 「B안 흰 헤더 · 확정」 PC 04·05 / MO 04·05
   화면 전환: 1025px 이상 = PC 시안, 1024px 이하 = MO 시안 (style.css 와 같음)
   ========================================================================== */

/* Sub Hero: 시안은 배경 사진이 머리글 뒤(위쪽)까지 깔린 뒤 잘린다 */
.page-insights .sub-hero-bg { top: calc(-1 * var(--header-h)); }

/* ---------- 틀: 왼쪽 메뉴 + 오른쪽 내용 ---------- */
.insights-sec { padding: 100px 0 196px; background: #fff; }
.page-insight .insights-sec { padding: 90px 0 78px; }
.insights-layout { display: grid; grid-template-columns: clamp(240px, 23.3334%, 280px) minmax(0, 1fr); column-gap: min(60px, 4.2vw); align-items: start; }
.insights-main { min-width: 0; }

/* ---------- 검색 ---------- */
.insights-search { display: flex; align-items: center; height: 48px; border: 1px solid var(--ink); }
.insights-search input {
  flex: 1; min-width: 0; height: 100%; padding: 0 8px 0 17px;
  border: 0; border-radius: 0; background: none; -webkit-appearance: none; appearance: none;
  font: inherit; font-size: 15px; color: var(--ink); outline-offset: -3px;
}
.insights-search input::placeholder { color: var(--muted); opacity: 1; }
.insights-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.insights-search button { display: flex; align-items: center; flex: none; height: 100%; padding: 0 15px 2px 8px; }

/* ---------- 카테고리 메뉴 ---------- */
.insights-cats { margin-top: 48px; }
.insights-cats-title { padding-bottom: 15px; border-bottom: 2px solid var(--dark); font-family: var(--display); font-weight: 600; font-size: 22px; line-height: 29px; color: var(--ink); }
.insights-cats-list a { display: flex; align-items: center; }
.insights-cat-name { flex: 1; min-width: 0; }
.insights-cat-count { flex: none; font-size: 14px; font-weight: 400; line-height: 20px; }
.insights-cats-note { margin-top: 18px; font-size: 13px; line-height: 1.65; color: var(--muted); }

@media (min-width: 1025px) {
  .insights-cats-list li { box-shadow: inset 0 -1px 0 var(--line); }
  .insights-cats-list a { height: 60px; padding: 0 12px 1px 20px; font-size: 16px; font-weight: 500; color: var(--ink); transition: background .2s; }
  .insights-cats-list a:hover { background: var(--bg-gray); }
  .insights-cat-count { color: var(--muted); }
  .insights-cats-list a::after { content: ""; flex: none; width: 18px; height: 18px; margin-left: 6px; background: url(../images/icons/insights-chev-gray-18.svg) center / 18px 18px no-repeat; }
  .insights-cats-list li.is-active, .insights-cats-list li:has(+ li.is-active) { box-shadow: none; }
  .insights-cats-list li.is-active a { background: var(--dark); color: #fff; font-weight: 700; }
  .insights-cats-list li.is-active .insights-cat-count { color: #fff; }
  .insights-cats-list li.is-active a::after { background-image: url(../images/icons/insights-chev-white-18.svg); }
}

/* ---------- 많이 본 글 ---------- */
.insights-popular { margin-top: 37px; }
.insights-popular-title { padding-bottom: 10px; border-bottom: 1px solid var(--ink); font-size: 18px; font-weight: 700; line-height: 26px; color: var(--ink); }
.insights-popular-list { padding-top: 4px; }
.insights-popular-list li { border-bottom: 1px solid var(--line); }
.insights-popular-list a { display: flex; align-items: flex-start; padding: 13px 0 21.5px; }
.insights-popular-rank { flex: none; width: 32px; margin-top: -2px; font-family: var(--display); font-weight: 600; font-size: 20px; line-height: 27px; color: var(--brand); }
.insights-popular-text { flex: 1; min-width: 0; font-size: 15px; line-height: 1.55; color: var(--ink); text-wrap: balance; }
.insights-popular-list a:hover .insights-popular-text { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- 상담 문의 상자 ---------- */
.insights-contact { display: block; min-height: 120px; margin-top: 23px; padding: 24px 24px 13px; background: var(--bg-gray); transition: background .2s; }
.insights-contact:hover { background: #eceef1; }
.insights-contact-title { display: flex; align-items: center; gap: 12px; height: 24px; font-size: 16px; font-weight: 700; line-height: 23px; color: var(--ink); }
.insights-contact-title img { flex: none; }
.insights-contact-text { display: block; margin-top: 14px; font-size: 14px; line-height: 1.6; color: var(--gray); }

/* ---------- 목록 머리 ---------- */
.insights-head { display: flex; align-items: flex-start; padding-bottom: 17px; border-bottom: 1px solid var(--ink); }
.insights-head-title { font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 43px; color: var(--ink); }
.insights-head-count { margin: 12px 0 0 16px; font-size: 16px; line-height: 23px; color: var(--gray); white-space: nowrap; }
.insights-head-count strong { margin-right: 5px; font-weight: 700; color: var(--ink); }
.insights-view { display: flex; gap: 14px; margin: 10px 6px 0 auto; }
.insights-view button { display: block; }
.insights-view button:disabled { cursor: default; }

/* ---------- 글 목록 ---------- */
.insights-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 28px; margin-top: 35px; }
.insights-list[hidden], .insights-post[hidden] { display: none; }
.insights-post a { display: flex; flex-direction: column; height: 100%; }
.insights-post-thumb { display: block; aspect-ratio: 416 / 250; overflow: hidden; background: var(--bg-gray); }
.insights-post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.insights-post a:hover .insights-post-thumb img { transform: scale(1.04); }
.insights-post-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.insights-post-cat { margin-top: 28px; font-size: 14px; font-weight: 700; line-height: 20px; color: var(--brand); }
.insights-post-title { min-height: 3em; margin: 8px 0 43px; font-family: var(--serif); font-weight: 600; font-size: 21px; line-height: 1.5; color: var(--ink); text-wrap: balance; }
.insights-post-summary { display: none; }
.insights-post-foot { display: flex; align-items: flex-start; justify-content: space-between; margin-top: auto; padding: 13px 4px 13px 0; border-top: 1px solid var(--line); }
.insights-post-foot time { margin-top: 2px; font-size: 13px; line-height: 19px; color: var(--muted); }
.insights-post-foot::after { content: ""; flex: none; width: 20px; height: 20px; background: url(../images/icons/arrow-r-dark-20.svg) center / 20px 20px no-repeat; transition: transform .25s var(--ease); }
.insights-post a:hover .insights-post-foot::after { transform: translateX(4px); }

/* 첫 글(대표 글) */
.insights-post.is-featured { grid-column: 1 / -1; }
.insights-post.is-featured a { display: grid; grid-template-columns: 440fr 420fr; min-height: 380px; background: var(--dark); color: #fff; }
.insights-post.is-featured .insights-post-thumb { position: relative; order: 2; aspect-ratio: auto; background: var(--dark); }
.insights-post.is-featured .insights-post-thumb img { position: absolute; inset: 0; }
.insights-post.is-featured .insights-post-body { padding: 56px 44px 44px; }
.insights-post.is-featured .insights-post-cat { margin-top: 0; color: rgba(255, 255, 255, .9); }
.insights-post.is-featured .insights-post-title { min-height: 0; margin: 12px 0 0; font-size: 26px; line-height: 1.45; color: #fff; }
.insights-post.is-featured .insights-post-summary { display: block; margin: 26.9px 0 33px; font-size: 15px; line-height: 1.7; color: rgba(255, 255, 255, .85); }
.insights-post.is-featured .insights-post-foot { padding: 0; border-top: 0; }
.insights-post.is-featured .insights-post-foot time { margin-top: 4px; color: rgba(255, 255, 255, .85); }
.insights-post.is-featured .insights-post-foot::after { width: 24px; height: 24px; background: url(../images/icons/insights-arrow-r-white-24.svg) center / 24px 24px no-repeat; }

.insights-empty { padding: 80px 0; font-size: 16px; line-height: 23px; color: var(--gray); text-align: center; }
.insights-list[hidden] + .insights-empty { border-bottom: 1px solid var(--line); }

/* ---------- 페이지 번호 ---------- */
.insights-paging { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 84px; }
.insights-paging[hidden] { display: none; }
.insights-page { display: flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 4px; font-size: 16px; color: var(--gray); transition: background .2s, color .2s; }
.insights-page:hover { background: var(--bg-gray); color: var(--ink); }
.insights-page.is-active { background: var(--dark); color: #fff; font-weight: 700; }
.insights-page-arrow { display: flex; align-items: center; justify-content: center; width: 24px; height: 44px; transition: opacity .2s; }
.insights-page-arrow:hover { opacity: .6; }
.insights-page-arrow.is-prev { margin-right: 12px; }
.insights-page-arrow.is-next { margin-left: 12px; }

/* ==========================================================================
   상세
   ========================================================================== */

/* ---------- Page Title (PC) ---------- */
.insight-pagetitle { background: var(--bg-gray); }
.insight-pagetitle .inner { padding: 71px 0 37px; }
.insight-pagetitle .breadcrumb { color: var(--gray); }
.insight-pagetitle .breadcrumb li + li::before { background-image: url(../images/icons/insights-chev-dark-14.svg); }
.insight-pagetitle .breadcrumb li + li + li::before { margin-left: 37px; }
.insight-pagetitle-en { margin-top: 16px; font-family: var(--display); font-size: 16px; line-height: 21px; color: var(--brand); }
.insight-pagetitle-ko { margin-top: 5px; font-family: var(--serif); font-weight: 600; font-size: 34px; line-height: 1.35; letter-spacing: -.68px; color: var(--ink); }

/* ---------- 글 머리 ---------- */
.insight-cat { font-size: 15px; font-weight: 700; line-height: 22px; color: var(--brand); }
.insight-title { max-width: 17.8em; margin-top: 8px; font-family: var(--serif); font-weight: 600; font-size: 36px; line-height: 1.45; letter-spacing: -.432px; color: var(--ink); }
.insight-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-top: 15.6px; padding-bottom: 22px; border-bottom: 1px solid var(--ink); }
.insight-meta-info { margin-top: 4px; font-size: 14px; line-height: 20px; color: var(--gray); }
.insight-meta-info > * + *::before { content: "   ·   "; white-space: pre; }
.insight-share { display: flex; flex: none; gap: 14px; margin-right: 6px; }
.insight-share button { display: block; transition: opacity .2s; }
.insight-share button:hover { opacity: .6; }

.insight-cover { margin-top: 39px; aspect-ratio: 860 / 460; overflow: hidden; background: var(--bg-gray); }
.insight-cover img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 본문 (편집기 HTML) ---------- */
.insight-body { margin-top: 50px; font-size: 17px; line-height: 1.95; color: var(--gray); }
.insight-body > :first-child { margin-top: 0; }
.insight-body > :last-child { margin-bottom: 0; }
.insight-body p + p { margin-top: 1em; }
.insight-body > p:first-child { margin-bottom: 59.7px; font-family: var(--serif); font-weight: 500; font-size: 19px; line-height: 1.85; color: var(--ink); }
.insight-body h2, .insight-body h3, .insight-body h4 { margin: 50px 0 16px; font-family: var(--serif); font-weight: 600; font-size: 24px; line-height: 34px; color: var(--ink); }
.insight-body h3 { font-size: 21px; line-height: 31px; }
.insight-body h4 { margin-top: 36px; font-size: 18px; line-height: 28px; }
.insight-body blockquote { margin: 87.7px 0 50px; padding: 36px 44px 46.8px; background: var(--bg-gray); font-family: var(--serif); font-weight: 500; font-size: 21px; line-height: 1.6; color: var(--ink); }
.insight-body blockquote p { margin: 0; }
.insight-body ul, .insight-body ol { margin: 1em 0; padding-left: 1.3em; }
.insight-body ul { list-style: disc; }
.insight-body ol { list-style: decimal; }
.insight-body li + li { margin-top: .2em; }
.insight-body img { max-width: 100%; height: auto; margin: 40px 0; }
.insight-body figure { margin: 40px 0; }
.insight-body figure img { margin: 0; }
.insight-body figcaption { margin-top: 10px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.insight-body a { color: var(--brand); text-decoration: underline; text-underline-offset: 4px; }
.insight-body strong, .insight-body b { font-weight: 700; color: var(--ink); }
.insight-body hr { height: 1px; margin: 50px 0; border: 0; background: var(--line); }
.insight-body table { width: 100%; margin: 40px 0; border-collapse: collapse; border-top: 1px solid var(--ink); font-size: 16px; line-height: 1.6; }
.insight-body th, .insight-body td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.insight-body th { background: var(--bg-gray); font-weight: 700; color: var(--ink); }

/* ---------- 태그 ---------- */
.insight-tags { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 83.7px; }
.insight-tags li { display: flex; align-items: center; justify-content: center; min-width: 100px; height: 36px; padding: 0 6px; border: 1px solid var(--line); font-size: 14px; color: var(--gray); white-space: nowrap; }

/* ---------- 이전 글 · 다음 글 ---------- */
.insight-nav { margin-top: 44px; border-top: 1px solid var(--ink); }
.insight-nav-row { display: flex; align-items: flex-start; padding: 25px 20px 27px; border-bottom: 1px solid var(--line); }
.insight-nav-label { flex: none; width: 100px; font-size: 15px; font-weight: 700; line-height: 22px; color: var(--ink); }
.insight-nav-title { flex: 1; min-width: 0; font-size: 16px; line-height: 23px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.insight-nav-row time { flex: none; margin: 1px 12.6px 0 24px; font-size: 14px; line-height: 20px; color: var(--muted); }
.insight-nav-row.is-empty .insight-nav-title { color: var(--muted); }
a.insight-nav-row:hover .insight-nav-title { text-decoration: underline; text-underline-offset: 4px; }

.insight-foot { display: flex; justify-content: flex-end; margin-top: 27px; }
.insight-btn-list { display: flex; align-items: center; gap: 10px; width: 180px; height: 52px; padding: 0 0 1px 40px; background: var(--dark); color: #fff; font-size: 16px; font-weight: 500; white-space: nowrap; transition: background .2s; }
.insight-btn-list:hover { background: #000; }
.insight-btn-list img { flex: none; }

/* ---------- 함께 보면 좋은 글 (PC) ---------- */
.insight-related { padding: 100px 0 80px; background: var(--bg-gray); }
.insight-related-title { font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 43px; color: var(--ink); }
.insight-related-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 37px; }
.insight-related-card a { display: flex; flex-direction: column; height: 100%; padding-bottom: 53px; background: #fff; }
.insight-related-thumb { display: block; aspect-ratio: 384 / 200; overflow: hidden; background: var(--line); }
.insight-related-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.insight-related-card a:hover .insight-related-thumb img { transform: scale(1.04); }
.insight-related-cat { margin: 24px 28px 0; font-size: 13px; font-weight: 700; line-height: 19px; color: var(--brand); }
.insight-related-name { min-height: 3em; margin: 7px 28px 0; font-family: var(--serif); font-weight: 600; font-size: 19px; line-height: 1.5; color: var(--ink); text-wrap: balance; }

/* 영문 서체(Playfair Display)는 낱말 사이를 줄이지 않는다 — style.css 의 word-spacing 보정에서 뺀다 */
.insights-cats-title, .insights-popular-rank, .insight-pagetitle-en { word-spacing: 0; }

/* ==========================================================================
   MO (1024px 이하)
   ========================================================================== */
@media (max-width: 1024px) {
  .insights-sec { padding: 0 0 80px; }
  .page-insight .insights-sec { padding: 0 0 152px; }
  .insights-layout { display: flex; flex-direction: column; align-items: stretch; }
  .insights-side { display: contents; }

  /* 카테고리: 누르면 펼쳐지는 목록 */
  .insights-cats { position: relative; order: -2; margin-top: 0; padding: 20px 0 16px; }
  .insights-cats::after { content: ""; position: absolute; left: -16px; right: -16px; bottom: 0; height: 1px; background: var(--line); }
  .insights-cats-toggle { display: flex; align-items: center; width: 100%; height: 48px; padding: 0 14px; background: var(--dark); color: #fff; text-align: left; }
  .insights-cats-toggle img { flex: none; }
  .insights-cats-label { flex: none; margin-left: 10px; font-size: 13px; line-height: 19px; color: rgba(255, 255, 255, .85); }
  .insights-cats-current { flex: 1; min-width: 0; margin: 0 8px 0 16px; font-size: 15px; font-weight: 700; line-height: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .insights-cats-chev { transition: transform .2s; }
  .insights-cats.is-open .insights-cats-chev { transform: rotate(180deg); }
  .insights-cats-list { display: none; position: absolute; left: 0; right: 0; top: 68px; z-index: 30; padding: 0 14px 6px; background: var(--dark); box-shadow: 0 12px 24px rgba(0, 0, 0, .18); }
  .insights-cats.is-open .insights-cats-list { display: block; }
  .insights-cats-list li { border-top: 1px solid rgba(255, 255, 255, .14); }
  .insights-cats-list a { height: 48px; font-size: 15px; color: rgba(255, 255, 255, .75); }
  .insights-cat-count { color: rgba(255, 255, 255, .6); }
  .insights-cats-list li.is-active a { color: #fff; font-weight: 700; }
  .insights-cats-list li.is-active .insights-cat-count { color: #fff; }
  .insights-cats-note { margin-top: 12px; font-size: 11px; line-height: 16px; }

  .insights-search { order: -1; height: 44px; margin-top: 24px; }
  .insights-search input { padding-left: 13px; font-size: 14px; }
  .insights-search button { padding: 0 11px 0 8px; }
  .page-insight .insights-search { display: none; }

  /* 글 목록 */
  .page-insights .insights-main { margin-top: 24px; }
  .insights-list { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 0; }
  .insights-post { border-bottom: 1px solid var(--line); }
  .insights-post-thumb { aspect-ratio: 288 / 150; }
  .insights-post-cat { margin-top: 16px; font-size: 13px; line-height: 19px; }
  .insights-post-title { min-height: 2.9em; margin: 3px 0 17.5px; font-size: 15px; line-height: 1.45; }
  .insights-post-foot { display: none; }

  .insights-post.is-featured { margin-bottom: 4px; border-bottom: 0; }
  .insights-post.is-featured a { position: relative; display: flex; justify-content: flex-end; min-height: clamp(300px, 50vw, 420px); }
  .insights-post.is-featured .insights-post-thumb { position: absolute; inset: 0; order: 0; }
  .insights-post.is-featured .insights-post-thumb::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .67); }
  .insights-post.is-featured .insights-post-body { position: relative; flex: none; padding: 0 20px 19px; }
  .insights-post.is-featured .insights-post-cat { font-size: 13px; line-height: 19px; }
  .insights-post.is-featured .insights-post-title { margin: 7px 0 0; font-size: 17px; line-height: 1.45; }
  .insights-post.is-featured .insights-post-summary { display: none; }
  .insights-post.is-featured .insights-post-foot { display: block; margin-top: 16.7px; }
  .insights-post.is-featured .insights-post-foot time { display: block; margin-top: 0; }
  .insights-post.is-featured .insights-post-foot::after { display: none; }

  .insights-empty { padding: 56px 0; font-size: 14px; line-height: 20px; }

  .insights-paging { gap: 4px; margin-top: 44px; }
  .insights-page { min-width: 40px; height: 40px; font-size: 15px; }
  .insights-page-arrow { width: 22px; height: 40px; }
  .insights-page-arrow.is-prev { margin-right: 20px; }
  .insights-page-arrow.is-next { margin-left: 20px; }

  /* 상세 */
  .insight-cat { margin-top: 32px; font-size: 13px; line-height: 19px; }
  .insight-title { max-width: none; margin-top: 5px; font-size: 22px; letter-spacing: 0; text-wrap: balance; }
  .insight-meta { margin-top: 12.3px; padding-bottom: 13px; }
  .insight-meta-info { margin-top: 0; font-size: 13px; line-height: 19px; }
  .insight-meta-info > * + *::before { content: "  ·  "; }
  .insight-cover { margin: 23px -16px 0; aspect-ratio: 320 / 200; }

  .insight-body { margin-top: 30px; font-size: 14px; line-height: 1.8; }
  .insight-body > p:first-child { margin-bottom: 42px; font-size: 15px; line-height: 1.8; }
  .insight-body h2, .insight-body h3, .insight-body h4 { margin: 36px 0 16px; font-size: 17px; line-height: 24px; }
  .insight-body h3 { font-size: 16px; }
  .insight-body h4 { margin-top: 28px; font-size: 15px; }
  .insight-body blockquote { margin: 44.4px 0 36px; padding: 20px 22px 24.9px; font-size: 14px; line-height: 1.55; }
  .insight-body img, .insight-body figure, .insight-body table { margin: 24px 0; }
  .insight-body figure img { margin: 0; }
  .insight-body figcaption { font-size: 12px; }
  .insight-body hr { margin: 36px 0; }
  .insight-body table { font-size: 13px; }
  .insight-body th, .insight-body td { padding: 10px; }

  .insight-tags { gap: 8px; margin-top: 44.4px; }
  .insight-tags li { min-width: 76px; height: 30px; font-size: 13px; }

  .insight-nav { margin-top: 34px; }
  .insight-nav-row { padding: 21px 8px 23px; }
  .insight-nav-label { width: 62px; font-size: 13px; line-height: 19px; }
  .insight-nav-title { font-size: 13px; line-height: 19px; }

  .insight-foot { margin-top: 41px; }
  .insight-btn-list { width: 100%; height: 48px; padding: 0 0 0 calc(50% - 50px); font-size: 15px; }
}
