/*
 * expert-base-theme 디자인 토큰 + 전역 요소 스타일 (site-mitlab 전용 변형, 2026-09-15 3차 개정).
 * 원본 목업 globals.css의 :root 변수·shell·section-pad·eyebrow·button·icon-box 등 전역
 * 프리미티브를 값 단위까지 대조해 맞췄다. 반응형 분기점도 원본과 동일하게 1060px/780px/480px
 * 세 단계로 통일한다(blocks.css도 같은 분기점을 쓴다).
 * site-hmintel 등 다른 사이트를 다음 단계에서 진행할 때는 --ecp-* 색상 값만 다시 정하면 된다.
 */

:root {
  --ecp-navy: #0a1e36;
  --ecp-navy-2: #102e50;
  --ecp-teal: #0b7c82;
  --ecp-teal-light: #dff3f1;
  --ecp-blue: #2469a0;
  --ecp-ink: #10233f;
  --ecp-slate: #56697c;
  --ecp-line: #d8e3e8;
  --ecp-mist: #f3f7f9;
  --ecp-white: #ffffff;
  --ecp-footer-bg: #07172a;

  --ecp-container: 1180px;
  --ecp-radius: 8px;
  --ecp-radius-sm: 6px;
  --ecp-shadow: 0 18px 40px rgba(10, 30, 54, .10);
  --ecp-font: "Noto Sans KR", "Apple SD Gothic Neo", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* [hidden] 속성으로 여닫는 요소(assets/site.js)는 항상 확실히 숨어야 한다 — 같은 요소에
   display:flex/grid를 지정하는 다른 클래스 규칙(작성자 CSS)이 브라우저 기본 [hidden]{display:
   none}보다 캐스케이드 우선순위가 높아 조용히 무시되는 경우가 있다(실제로 겪은 버그). */
[hidden] { display: none !important; }

body {
  margin: 0;
  color: var(--ecp-ink);
  background: var(--ecp-white);
  font-family: var(--ecp-font);
  font-size: 16px;
  line-height: 1.65;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  color: var(--ecp-navy);
  letter-spacing: -.03em;
  line-height: 1.25;
  margin: 0;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.ecp-shell {
  width: min(var(--ecp-container), calc(100% - 48px));
  margin-inline: auto;
}

/* 부모 테마(twentytwentyfour)의 page 템플릿은 post-title 위아래에 spacer 블록 2개를 자동으로
   끼워 넣는다. post-title만 숨기면(위 body.ecp-has-hero 규칙) 그 spacer들은 그대로 남아
   header 아래 빈 공백이 생긴다 — title을 담은 그룹 전체를 숨겨야 한다. */
body.ecp-has-hero main > .wp-block-group:has(> .wp-block-post-title) {
  display: none;
}

/* entry-content(has-global-padding)가 좌우에 테마 여백(--wp--style--root--padding-*)을
   강제해 .ecp-block이 화면 끝까지 못 닿는다 — 그 여백만큼 음수 마진을 줘서 정확히 상쇄한다
   (100vw 트릭은 스크롤바 폭까지 vw에 포함돼 가로 스크롤이 생기므로 안 씀). 안쪽 .ecp-shell이
   실제 읽기 폭을 담당한다. */
.ecp-block {
  margin-left: calc(-1 * var(--wp--style--root--padding-left, 0px));
  margin-right: calc(-1 * var(--wp--style--root--padding-right, 0px));
  padding-block: 108px;
}
/* 모듈 상세 페이지의 섹션은 이미 2단 레이아웃 안에 있어 풀블리드하면 안 된다. */
.ecp-detail-content .ecp-block {
  margin-left: 0;
  margin-right: 0;
}
@media (max-width: 780px) {
  .ecp-shell { width: min(1180px, calc(100% - 32px)); }
  .ecp-block { padding-block: 76px; }
}

/* --- 공용 타이포/컨트롤 --- */

.ecp-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
  color: var(--ecp-teal);
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .13em;
}
.ecp-eyebrow > span { width: 8px; height: 8px; border: 2px solid var(--ecp-teal); border-radius: 50%; flex: 0 0 auto; }
.ecp-eyebrow--inverse { color: #6fd4d2; }
.ecp-eyebrow--inverse > span { border-color: #6fd4d2; }

.ecp-block h2 { font-size: clamp(32px, 4vw, 50px); line-height: 1.22; letter-spacing: -.045em; margin-bottom: 46px; }
.ecp-section-lead { max-width: 650px; margin: 24px 0 0; color: var(--ecp-slate); font-size: 17px; }

.ecp-split-head {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  align-items: end;
  gap: 70px;
  margin-bottom: 46px;
}
.ecp-split-head h2 { margin-bottom: 0; }
.ecp-split-head-right > p { margin: 0 0 5px; color: var(--ecp-slate); font-size: 17px; }
@media (max-width: 780px) {
  .ecp-split-head { grid-template-columns: 1fr; gap: 20px; margin-bottom: 35px; }
  .ecp-block h2 { font-size: 36px; margin-bottom: 35px; }
}

.ecp-btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--ecp-radius-sm);
  font-size: 15px;
  font-weight: 800;
  transition: .2s ease;
  cursor: pointer;
}
.ecp-btn--primary { background: var(--ecp-teal); color: #fff; }
.ecp-btn--primary:hover { background: #075f65; transform: translateY(-1px); }
.ecp-btn--secondary { border-color: #bdcbd3; background: #fff; color: var(--ecp-navy); }
.ecp-btn--secondary:hover { border-color: var(--ecp-teal); color: var(--ecp-teal); }
.ecp-btn--light { background: #fff; color: var(--ecp-navy); }
.ecp-btn--light:hover { background: var(--ecp-teal-light); }
.ecp-btn--outline-light { border-color: rgba(255, 255, 255, .35); color: #fff; background: transparent; }
.ecp-btn--outline-light:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
.ecp-btn--disabled { border-color: #cad5db; background: #eef3f5; color: #71808d; cursor: not-allowed; }

.ecp-text-link { display: inline-flex; align-items: center; gap: 7px; color: var(--ecp-teal); font-size: 15px; font-weight: 900; }
.ecp-text-link:hover { color: var(--ecp-navy); }

.ecp-icon-box {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--ecp-teal-light);
  color: var(--ecp-teal);
  flex: 0 0 auto;
}
.ecp-icon-box--large { width: 58px; height: 58px; }

/* 기본 post-title은 hero/module-summary 블록이 대신하므로 숨긴다. */
body.ecp-has-hero .wp-block-post-title { display: none; }

/* 부모 테마(twentytwentyfour)가 템플릿에서 자동으로 그리는 기본 헤더·푸터는 wp_body_open/
   wp_footer에서 직접 그리는 .ecp-site-header/.ecp-site-footer로 완전히 대체한다. */
.wp-site-blocks > header.wp-block-template-part,
.wp-site-blocks > footer.wp-block-template-part {
  display: none;
}

/* twentytwentyfour(block theme)의 전역 스타일이 entry-content의 모든 직계 자식에
   max-width: 620px(콘텐츠 폭 프리셋)를 강제한다(.is-layout-constrained > *). 우리 블록
   렌더링은 그 안에서 자체 .ecp-shell로 폭을 관리하므로, 이 상위 캡을 먼저 풀어야 한다. */
.entry-content.is-layout-constrained > .ecp-blocks,
.entry-content.is-layout-constrained > .ecp-detail-layout {
  max-width: none !important;
}

/* --- 사이트 헤더 --- */

.ecp-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(216, 227, 232, .9);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px);
}
.ecp-header-inner { position: relative; height: 76px; display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.ecp-brand { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; font-size: 19px; font-weight: 800; letter-spacing: -.04em; color: var(--ecp-navy); }
.ecp-brand:hover { color: var(--ecp-navy); }
.ecp-brand-text strong { display: block; }

.ecp-brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 4px;
  padding: 5px;
  border-radius: 7px;
  background: var(--ecp-navy);
  flex: 0 0 auto;
}
.ecp-brand-mark i { display: block; border-radius: 2px; background: #fff; }
.ecp-brand-mark i:nth-child(2),
.ecp-brand-mark i:nth-child(3) { background: #28a5a7; }
.ecp-brand-mark i:nth-child(3) { grid-column: 1 / -1; width: 60%; }

.ecp-primary-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.ecp-primary-nav ul { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
.ecp-primary-nav a { position: relative; display: inline-block; padding: 12px 9px; color: #42556a; font-size: 14px; font-weight: 700; white-space: nowrap; }
.ecp-primary-nav a:hover { color: var(--ecp-navy); }

/* 모바일 메뉴 토글 — 데스크톱에선 숨김, 1060px 이하에서만 나타난다. */
.ecp-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: var(--ecp-radius-sm);
  background: var(--ecp-mist);
  color: var(--ecp-navy);
  cursor: pointer;
}
.ecp-menu-toggle .ecp-icon-close { display: none; }
.ecp-menu-toggle.is-open .ecp-icon-menu { display: none; }
.ecp-menu-toggle.is-open .ecp-icon-close { display: inline-flex; }

@media (max-width: 1060px) {
  .ecp-primary-nav { display: none; margin-left: 0; }
  .ecp-menu-toggle { display: inline-flex; }
  .ecp-primary-nav.is-open {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    padding: 8px 24px 20px;
    border-top: 1px solid var(--ecp-line);
    background: #fff;
  }
  .ecp-primary-nav.is-open ul { flex-direction: column; gap: 0; }
  .ecp-primary-nav.is-open a { display: block; padding: 12px 4px; border-bottom: 1px solid #edf2f4; color: #40546a; }
}

.ecp-header-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 17px;
  border-radius: var(--ecp-radius-sm);
  background: var(--ecp-navy);
  color: #fff !important;
  font-size: 14px;
  font-weight: 800;
}
.ecp-header-cta:hover { background: var(--ecp-teal); }

@media (max-width: 1060px) {
  .ecp-header-inner { gap: 15px; }
  .ecp-header-cta { margin-left: auto; }
}
@media (max-width: 780px) {
  .ecp-header-inner { height: 68px; }
  .ecp-header-cta { display: none; }
}

/* --- 사이트 푸터(원본 site-footer 재현, 새 카피 없이 사이트 제목·설명·Primary 메뉴만 재사용) --- */

.ecp-site-footer { padding: 70px 0 45px; background: var(--ecp-footer-bg); color: #fff; }
.ecp-footer-grid { display: grid; grid-template-columns: 1fr 1fr .8fr; gap: 70px; }
.ecp-footer-brand h2 { margin: 0 0 14px; font-size: 24px; color: #fff; }
.ecp-footer-brand p { margin: 0; color: #aebdca; }
.ecp-footer-links { display: grid; grid-template-columns: repeat(2, 1fr); align-content: start; gap: 13px 24px; }
.ecp-footer-links a { color: #c5d0d9; font-size: 14px; }
.ecp-footer-links a:hover { color: #6fd4d2; }
.ecp-footer-note span { color: #6fd4d2; font-size: 12px; font-weight: 900; letter-spacing: .06em; }
.ecp-footer-note p { color: #8fa1b0; font-size: 13px; }
.ecp-footer-note .ecp-copyright { margin-top: 32px; }

@media (max-width: 780px) {
  .ecp-footer-grid { grid-template-columns: 1fr; gap: 40px; }
}
