/* =========================================================
   기능 추가분 스타일 — 시안 css(style.css · 페이지별 css)는 건드리지 않고 여기서만 더한다.
   시안 토큰(--ink · --dark · --gray · --muted · --line · --bg-gray · --brand · --sans · --serif · --display · --header-h)만 쓴다.
   끝에 디자인 모드 1.1·1.2 공통 규칙(hk-kit.css)을 이 사이트 클래스에 맞춰 붙였다.
   ========================================================= */

/* ── 페이지 내용 · 테마 ── */
.cms-hidden { display: none !important; }
[hidden] { display: none !important; }
.h-serif, .ins-title, .hk-prose h2, .hk-prose h3 { font-family: var(--font-heading, var(--serif)); }
html[data-hk-font="serif"] body { font-family: var(--serif); }
.logo img.hk-cms-logo { display: block; width: auto; height: 48px; max-width: min(60vw, 360px); object-fit: contain; }
.hk-cms-logo-text { display: block; font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; color: var(--ink); white-space: nowrap; }
.f-logo span.f-logo-mark { display: flex; align-items: center; justify-content: center; }
.f-logo span.f-logo-mark img { display: block; width: auto; height: 100%; max-width: none; object-fit: contain; }
.f-logo span.f-logo-mark .hk-cms-logo-text { font-size: 18px; }
@media (max-width: 1024px) {
  .logo img.hk-cms-logo { height: 32px; }
  .hk-cms-logo-text { font-size: 19px; }
  .f-logo span.f-logo-mark .hk-cms-logo-text { font-size: 14px; }
}

/* 모서리(테마) — 기본은 시안대로 각진 모양(0) */
.btn, .btn-header, .mobile-nav-cta, .comp-card, .ins-card, .ins-featured, .svc-media, .net-card, .partners li, .svc-tag,
.hk-popup, .hk-toast, input, select, textarea { border-radius: var(--radius, 0); }

/* ── 메인 배너: DB 로 그리는 슬라이드 ── */
.hero-slide [hidden] { display: none !important; }
.hero-pager[hidden] { display: none !important; }
.hero-empty { min-height: 40px; }

/* ── 폼 오류 · 알림 ── */
.hk-form-msg { margin-top: 12px; font-size: 14px; line-height: 1.6; color: var(--brand); }
.hk-form-msg:empty { display: none; }
.hk-form-msg.is-ok { color: var(--ink); }
.hk-toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 1400; transform: translate(-50%, 16px);
  max-width: calc(100vw - 32px); padding: 14px 20px;
  background: var(--dark); color: #fff; font-size: 15px; font-weight: 500; line-height: 1.5;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .25); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.hk-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ── 관리자 편집기(글쓰기 도구)가 만드는 본문 — 블로그 글 · 공지 · 정책 문서 ── */
.hk-prose { font-size: 17px; line-height: 1.85; color: #3a404b; overflow-wrap: anywhere; }
.hk-prose > *:first-child { margin-top: 0; }
.hk-prose p { margin: 0 0 22px; }
.hk-prose h1, .hk-prose h2 { margin: 48px 0 18px; font-weight: 600; font-size: 26px; line-height: 1.45; letter-spacing: -.02em; color: var(--ink); }
.hk-prose h3 { margin: 40px 0 14px; font-weight: 600; font-size: 21px; line-height: 1.5; color: var(--ink); }
.hk-prose h4, .hk-prose h5, .hk-prose h6 { margin: 32px 0 12px; font-size: 17px; font-weight: 700; color: var(--ink); }
.hk-prose ul, .hk-prose ol { margin: 0 0 22px; padding-left: 22px; }
.hk-prose ul { list-style: disc; }
.hk-prose ol { list-style: decimal; }
.hk-prose li { margin: 4px 0; }
.hk-prose li > p { margin: 0; }
.hk-prose blockquote { margin: 0 0 22px; padding: 18px 24px; border-left: 3px solid var(--brand); background: var(--bg-gray); color: var(--ink); }
.hk-prose blockquote p:last-child { margin-bottom: 0; }
.hk-prose hr { margin: 36px 0; border: 0; border-top: 1px solid var(--line); }
.hk-prose img { max-width: 100%; height: auto; margin: 8px 0 22px; }
.hk-prose figure { margin: 0 0 22px; }
.hk-prose figcaption { font-size: 13px; color: var(--muted); }
.hk-prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.hk-prose strong, .hk-prose b { font-weight: 700; color: var(--ink); }
.hk-prose table { width: 100%; margin: 0 0 22px; border-collapse: collapse; font-size: 15px; line-height: 1.6; }
.hk-prose th, .hk-prose td { padding: 12px 14px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.hk-prose th { background: var(--bg-gray); font-weight: 700; color: var(--ink); }
.hk-prose pre, .hk-prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
.hk-prose pre { margin: 0 0 22px; padding: 16px 18px; background: var(--bg-gray); overflow: auto; }
.hk-prose mark { background: rgba(170, 3, 12, .12); color: inherit; }
@media (max-width: 1024px) {
  .hk-prose { font-size: 15px; line-height: 1.8; }
  .hk-prose p, .hk-prose ul, .hk-prose ol, .hk-prose blockquote, .hk-prose table { margin-bottom: 18px; }
  .hk-prose h1, .hk-prose h2 { margin: 36px 0 14px; font-size: 20px; }
  .hk-prose h3 { margin: 30px 0 12px; font-size: 17px; }
  .hk-prose table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* ── 영상이 있는 글·서비스 ── */
.hk-detail-video-slot:empty { display: none; }
.hk-detail-video-slot { margin-top: 40px; }
.service-video { padding: 0 0 80px; }
.service-video:empty { display: none; }
.insights-post-thumb { position: relative; }
.hk-has-video { position: absolute; left: 12px; bottom: 12px; width: 36px; height: 36px; border-radius: 50%; background: rgba(0, 0, 0, .6); }
.hk-has-video::after { content: ""; position: absolute; left: 14px; top: 11px; border: 7px solid transparent; border-left: 11px solid #fff; border-right: 0; }

/* ── 블로그 목록: 목록형 보기(시안에는 격자형만 있다 — 같은 부품을 한 줄로 늘어놓는다) ── */
/* 시안: 고른 아이콘은 진한색(#18191C), 안 고른 아이콘은 회색(#8A919C) — 목록 아이콘 파일은 회색이므로 고르면 진하게, 격자 아이콘은 안 고르면 회색으로 */
.insights-view img { transition: opacity var(--t-fast, .2s) ease, filter var(--t-fast, .2s) ease; }
.insights-view button:first-child[aria-pressed="false"] img { opacity: .51; }
.insights-view button:last-child[aria-pressed="true"] img { filter: brightness(.18); }
@media (hover: hover) and (pointer: fine) {
  .insights-view button:first-child[aria-pressed="false"]:hover img { opacity: 1; }
  .insights-view button:last-child[aria-pressed="false"]:hover img { filter: brightness(.18); }
}
@media (min-width: 1025px) {
  .insights-list.is-listview { grid-template-columns: minmax(0, 1fr); gap: 0; border-top: 1px solid var(--ink); }
  .insights-list.is-listview .insights-post, .insights-list.is-listview .insights-post.is-featured { grid-column: auto; }
  .insights-list.is-listview .insights-post a, .insights-list.is-listview .insights-post.is-featured a { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; min-height: 0; padding: 28px 0; border-bottom: 1px solid var(--line); background: none; color: inherit; }
  .insights-list.is-listview .insights-post-thumb, .insights-list.is-listview .insights-post.is-featured .insights-post-thumb { position: relative; order: 0; aspect-ratio: 416 / 250; background: var(--bg-gray); }
  .insights-list.is-listview .insights-post.is-featured .insights-post-body { padding: 0; }
  .insights-list.is-listview .insights-post.is-featured .insights-post-cat { color: var(--brand); }
  .insights-list.is-listview .insights-post.is-featured .insights-post-title { font-size: 20px; color: var(--ink); }
  .insights-list.is-listview .insights-post.is-featured .insights-post-summary { margin: 12px 0 16px; color: var(--gray); }
  .insights-list.is-listview .insights-post.is-featured .insights-post-foot time { color: var(--muted); }
  .insights-list.is-listview .insights-post .insights-post-foot::after { display: none; }
}

/* ── 카카오 상담 버튼(설정에 채널 주소가 있을 때만) ── */
.kakao-float {
  position: fixed; right: 24px; bottom: 28px; z-index: 90; display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: 999px; background: #fee500; color: #191919; font-size: 14px; font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2); opacity: 0; transform: translateY(12px); transition: opacity .3s, transform .3s;
}
.kakao-float.show { opacity: 1; transform: none; }
.kakao-float svg { width: 20px; height: 20px; }
@media (max-width: 1024px) { .kakao-float { right: 16px; bottom: 20px; padding: 0 14px; } }

/* ── 팝업 (딤 없음 · 9개 위치 · 이미지 원본 크기 · 하단 버튼 2개) ── */
.hk-popup {
  position: fixed; z-index: 1200; width: max-content; max-width: calc(100vw - 32px); overflow: hidden;
  background: #fff; border: 1px solid var(--line); color: var(--ink); box-shadow: 0 20px 48px rgba(0, 0, 0, .22);
  transform: translate(var(--tx, 0), var(--ty, 0)) translate(var(--cx, 0), var(--cy, 0)); animation: hkPopIn .3s ease;
}
@keyframes hkPopIn { from { opacity: 0; } to { opacity: 1; } }
.hk-popup.isX-left { left: 24px; }
.hk-popup.isX-center { left: 50%; --tx: -50%; }
.hk-popup.isX-right { right: 24px; }
.hk-popup.isY-top { top: calc(var(--header-h) + 16px); }
.hk-popup.isY-middle { top: 50%; --ty: -50%; }
.hk-popup.isY-bottom { bottom: 24px; }
.hk-popup__img { display: block; width: auto; height: auto; max-width: calc(100vw - 32px); max-height: calc(80vh - 52px); }
.hk-popup__imglink { display: block; line-height: 0; cursor: pointer; }
.hk-popup__body { max-width: 100%; padding: 24px; }
.hk-popup__body h3 { font-size: 17px; font-weight: 700; line-height: 1.5; }
.hk-popup__text { margin-top: 8px; font-size: 14px; line-height: 1.75; color: var(--gray); overflow-wrap: anywhere; }
.hk-popup__text p { margin: 0; }
.hk-popup__text p + p, .hk-popup__text ul, .hk-popup__text ol { margin-top: 8px; }
.hk-popup__text ul { padding-left: 18px; list-style: disc; }
.hk-popup__text ol { padding-left: 18px; list-style: decimal; }
.hk-popup__text a { color: var(--brand); text-decoration: underline; }
.hk-popup__foot { display: flex; border-top: 1px solid var(--line); background: var(--bg-gray); }
.hk-popup__foot button { flex: 1; min-height: 44px; padding: 10px 12px; font-size: 13px; font-weight: 500; color: var(--gray); }
.hk-popup__foot button + button { border-left: 1px solid var(--line); }
.hk-popup__foot button:hover { color: var(--ink); }
@media (max-width: 1024px) {
  .hk-popup.isX-left, .hk-popup.isX-right, .hk-popup.isX-center { left: 50%; right: auto; --tx: -50%; }
  .hk-popup.isY-top { top: calc(var(--header-h) + 8px); }
  .hk-popup.isY-bottom { bottom: 12px; }
}

/* ── 디자인 모드 — 안내 핀(목록은 관리자 화면에서 고친다는 표시) · 편집 중 동작 끄기 ── */
.hk-manage-pin { display: none; }
html.hk-design [data-hk-manage] { outline: 1px dashed rgba(27, 95, 217, .45); outline-offset: 4px; }
html.hk-design [data-hk-manage]:not(.gnb, .hero) { position: relative; }
html.hk-design .hk-manage-pin {
  display: inline-flex; align-items: center; gap: 6px; position: absolute; top: 8px; right: 8px; z-index: 60;
  min-height: 32px; padding: 0 12px; border-radius: 999px; background: rgba(16, 24, 40, .82); color: #fff;
  font-family: var(--sans); font-size: 12px; font-weight: 700; line-height: 1; letter-spacing: 0; white-space: nowrap; pointer-events: auto;
}
html.hk-design .hk-manage-pin:hover { background: var(--brand); }
html.hk-design .gnb .hk-manage-pin { top: 50%; right: auto; left: calc(100% + 14px); height: 30px; min-height: 30px; transform: translateY(-50%); color: #fff; font-size: 12px; font-weight: 700; }
html.hk-design .gnb .hk-manage-pin::after { display: none; }
html.hk-design .hero[data-hk-manage] > .hk-manage-pin { top: 72px; right: 24px; }
html.hk-design .site-header { top: var(--hk-bar, 0px); }
html.hk-design .mobile-nav { top: calc(var(--header-h) + var(--hk-bar, 0px)); z-index: 98; }
html.hk-design .hero-slide { transition: none; }
/* 디자인 모드: 등장 효과 없이 끝 모습 그대로(편집기가 자리를 재고 핀을 붙인다) */
html.hk-design :is(.hero-slide.is-active .hero-content > *, .sub-hero .inner > *, .insight-pagetitle .inner > *, .hero-slide.is-active .hero-bg img, .sub-hero-bg img) { animation: none !important; }
html.hk-design :is(.reveal, .reveal-img, .reveal-img > img) { opacity: 1 !important; transform: none !important; clip-path: none !important; transition: none !important; }

/* ============================================================
   디자인 모드 1.1 공통 규칙 (hk-kit.css) — 사진 보이는 방식 · 영상 · 로고 크기 · 세부 색상
   ============================================================ */

/* ── 사진 전체 보이기: 자르지 않고 통째로(여백이 생길 수 있다) ── */
img[data-hk-fit="contain"] { object-fit: contain !important; }
[data-hk-fit="contain"]:not(img) { background-size: contain !important; background-repeat: no-repeat !important; background-position: center !important; }

/* ── 영상: 배경형(자리를 꽉 채움 · 소리 없이 반복) / 플레이어형(16:9) ── */
.has-video { isolation: isolate; }
.hk-video-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; container-type: size; }
.hk-video-bg video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hk-video-bg iframe { position: absolute; top: 50%; left: 50%; width: 100%; height: 100%; border: 0; transform: translate(-50%, -50%); }
@supports (width: 1cqw) { .hk-video-bg iframe { width: max(100cqw, 177.78cqh); height: max(100cqh, 56.25cqw); } }
/* 영상 위의 글자가 읽히게 덮는 막 — 시안의 배너 덮개(검정 62%)와 같은 값 */
.hk-video-bg::after { content: ""; position: absolute; inset: 0; background: var(--hk-video-shade, rgba(0, 0, 0, .62)); }
.hk-video-player { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #000; border-radius: var(--radius, 0); }
.hk-video-player iframe, .hk-video-player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
[data-cms-video-mode="player"]:not(.has-video) { display: none; }
[data-cms-video]:not([data-cms-video-mode="player"]) { position: relative; }
/* 배너에 영상을 넣으면 사진과 사진 덮개 대신 영상(+같은 덮개)이 보인다 */
.hero-slide.has-video .hero-bg, .hero.has-video .hero-bg { visibility: hidden; }

/* ── 로고 크기 ── 머리글 높이(PC 96 · MO 56) 안에서만 커진다 */
html[data-hk-logo] .logo img { width: auto; height: min(var(--hk-logo-h), calc(var(--header-h) - 12px)); max-width: min(60vw, 360px); object-fit: contain; }
html[data-hk-logo] .logo .hk-cms-logo-text { font-size: calc(min(var(--hk-logo-h), calc(var(--header-h) - 12px)) * 0.56); max-width: min(46vw, 420px); overflow: hidden; text-overflow: ellipsis; }
html[data-hk-logo] .f-logo span.f-logo-mark { height: calc(min(var(--hk-logo-h), 60px) * 0.79); }
@media (max-width: 1024px) {
  html[data-hk-logo] .f-logo span.f-logo-mark { height: calc(min(var(--hk-logo-h), 44px) * 0.9); }
}

/* ── 세부 색상 ── 관리자가 색을 정한 항목만 덮어쓴다.
   제목·본문색은 사진·검은 바탕 위 글자를 뺀다(바꾸는 순간 안 보이게 되므로) */
html[data-hk-c~="btn_bg"] :is(.btn-header, .mobile-nav-cta, .contact-submit, .insight-btn-list, .notfound-btn, .notice-view-file-btn) { background: var(--hk-btn-bg); border-color: var(--hk-btn-bg); }
html[data-hk-c~="btn_bg"] :is(.btn-header, .mobile-nav-cta, .contact-submit, .insight-btn-list, .notfound-btn, .notice-view-file-btn):hover { filter: brightness(.92); }
html[data-hk-c~="btn_text"] :is(.btn-header, .mobile-nav-cta, .contact-submit, .insight-btn-list, .notfound-btn, .notice-view-file-btn) { color: var(--hk-btn-text); }
html[data-hk-c~="heading"] main :is(h1, h2, h3, .h-serif):not(:is(.hero, .sec-competency, .sec-cta, .sub-hero, .ins-featured, .net-card, .about-leader, .about-net-core, .service-next, .service-overview-caption, .contact-info, .insights-post.is-featured) *) { color: var(--hk-heading); }
html[data-hk-c~="text"] body { color: var(--hk-text); }
html[data-hk-c~="text"] main :is(p, dd, li):not(:is(.hero, .sec-competency, .sec-cta, .sub-hero, .ins-featured, .net-card, .about-leader, .about-net-diagram, .service-next, .service-overview-caption, .service-overview-tag, .contact-info, .insights-post.is-featured, .sub-tabs, .insights-cats, .notice-list, .insight-tags, .contact-form) *, .eyebrow, .service-overview-tag, .insight-cat, .contact-error, .contact-status) { color: var(--hk-text); }
html[data-hk-c~="bg"] body, html[data-hk-c~="bg"] :is(.sec-positioning, .sec-network, .sec-notice, .about-greeting, .about-way, .service-overview, .service-needs, .insights-sec, .notice-board, .notice-view, .contact-body, .doc-body) { background-color: var(--hk-bg); }
html[data-hk-c~="header_bg"] :is(.site-header, .mobile-nav-panel) { background-color: var(--hk-header-bg); }
html[data-hk-c~="header_text"] :is(.gnb a, .mobile-nav-panel li a, .hk-cms-logo-text) { color: var(--hk-header-text); }
html[data-hk-c~="footer_bg"] .site-footer { background-color: var(--hk-footer-bg); }
html[data-hk-c~="footer_text"] .site-footer, html[data-hk-c~="footer_text"] .site-footer :is(a, .f-copy) { color: var(--hk-footer-text); }

/* ── 1.2 낱개·묶음 숨김 ── 글자·메뉴 하나를 숨겼을 때 빈 칸·구분선·여백이 남지 않게 한다 */
li:has(> a.cms-hidden:only-child), li:has(> .cms-hidden:only-child) { display: none; }
.f-info li:has(> .cms-hidden:only-child) { display: none; }
.stats:has(> .stat.cms-hidden) { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.comp-grid:has(> .comp-card.cms-hidden) { grid-template-columns: repeat(auto-fit, minmax(280px, 380px)); margin-right: 0; }
.eyebrow.cms-hidden + .h-serif { margin-top: 0; }
@media (min-width: 1025px) {
  .svc-body:has(> .svc-media.cms-hidden) { grid-template-columns: 1fr; }
  .sec-network:has(.net-media.cms-hidden) .net-text { min-height: 0; margin-left: 0; padding-top: 0; }
  .ins-grid:has(> .ins-featured:only-child) { grid-template-columns: 1fr; }
  .notice-strip:has(> .ns-item:only-of-type) { grid-template-columns: 230px minmax(0, 1fr) 60px; }
}

/* 서비스 제목: 「&」가 줄 끝에 남지 않게 다음 낱말과 붙인다(시안 휴대폰: 「Strategic Finance」 / 「& M&A」) */
.hk-nowrap { white-space: nowrap; }
