/* K-Style Header — 변형 공통. 테마 변수(--ks-*)만 쓴다. 선택한 변형이 하나라도 있을 때만 로드된다. */
.kssh-header .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 전화번호 알약 */
.kssh-pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border: 1px solid var(--ks-line); border-radius: 999px;
  font-size: 14px; font-weight: 700; color: var(--ks-primary);
  font-variant-numeric: tabular-nums; white-space: nowrap;
  transition: var(--ks-transition);
}
.kssh-pill svg { width: 15px; height: 15px; }
.kssh-pill:hover { background: var(--ks-soft); }
@media (max-width: 767px) { .kssh-pill--hide-sm { display: none; } }

/* 데스크톱에서는 전체메뉴 버튼을 숨기고, 옵션을 켠 경우에만 보인다 (모바일은 항상 보임) */
.kssh-header .kssh-burger { display: inline-flex; }
@media (min-width: 1024px) { .kssh-header:not(.has-desktop-burger) .kssh-burger { display: none; } }

/* 투명 헤더: 스크롤 전에는 사진 위에 얹히고, 스크롤하면 theme.js 가 붙이는 is-scrolled 로 불투명해진다 */
.kssh-header.is-transparent:not(.is-scrolled) { position: absolute; left: 0; right: 0; top: 0; background: transparent; }
.kssh-header.is-transparent.is-sticky:not(.is-scrolled) { position: fixed; }
.admin-bar .kssh-header.is-transparent.is-sticky:not(.is-scrolled) { top: 32px; }
.kssh-header.is-transparent:not(.is-scrolled) .ks-header__bar { border-bottom-color: rgba(255,255,255,0.18); background: transparent; }
.kssh-header.is-transparent:not(.is-scrolled) .ks-nav__list > li > a,
.kssh-header.is-transparent:not(.is-scrolled) .kssh-pill { color: #fff; border-color: rgba(255,255,255,0.4); }
.kssh-header.is-transparent:not(.is-scrolled) .ks-burger span { background: #fff; }
.kssh-header.is-transparent:not(.is-scrolled) .ks-logo__default { display: none; }
.kssh-header .ks-logo__light { display: none; }
.kssh-header.is-transparent:not(.is-scrolled) .ks-logo__light { display: block; }

/* 검색 */
.kssh-search { position: relative; flex: 1; max-width: 480px; }
.kssh-search input {
  width: 100%; box-sizing: border-box; height: 44px; padding: 0 48px 0 18px;
  border: 2px solid var(--ks-primary); border-radius: 999px; background: #fff;
  font: inherit; font-size: 14px; color: var(--ks-text);
}
.kssh-search button { position: absolute; right: 4px; top: 4px; width: 36px; height: 36px; border: 0; background: transparent; color: var(--ks-primary); cursor: pointer; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.kssh-search button svg { width: 20px; height: 20px; }

/* 미리보기에서 «열린 상태» 로 보여 주기 */
.ks-nav__list > li.has-mega.kssh-force-open > .ks-mega { opacity: 1; visibility: visible; transform: none; }

/* 고정 헤더: 블록 테마가 헤더를 <header class="wp-block-template-part"> 로 감싸는데, 이 래퍼는 헤더 높이뿐이라
   안쪽 sticky 는 스크롤을 따라가지 못한다. 래퍼를 고정해 준다(변형 헤더에만 적용, 테마 기본 헤더는 그대로). */
.wp-block-template-part:has(> .kssh-header.is-sticky) { position: sticky; top: 0; z-index: 100; }
.admin-bar .wp-block-template-part:has(> .kssh-header.is-sticky) { top: 32px; }
@media (max-width: 782px) { .admin-bar .wp-block-template-part:has(> .kssh-header.is-sticky) { top: 46px; } }
.kssh-header.is-sticky { position: relative; top: auto; }
.kssh-header.is-transparent.is-sticky:not(.is-scrolled) { position: absolute; }

/* 밝은 바탕의 외곽선 버튼 */
.kssh-btn-outline { border: 1px solid var(--ks-line); background: #fff; color: var(--ks-dark); }
.kssh-btn-outline:hover { border-color: var(--ks-primary); color: var(--ks-primary); }
.kssh-sitemap__text { margin: 0 0 12px; }

/* 모바일 메뉴 아래 버튼이 패널 안쪽 여백을 넘지 않게 */
.kssh-mo .ks-btn--block { box-sizing: border-box; }
