/* ============================================================================
   theme/rb.basic/rb.layout_hd/botple/style.css — 봇플 헤더(모든 프런트 페이지)
   - 코어 규칙 #header{position:fixed; padding:20px 0 5px; background:rgba(255,255,255,.5)} 를
     #header.bp-header 로 덮는다(특이도 우위). id 는 코어 JS 가 높이 계산에 쓰므로 유지.
   - 토큰(--bp-*)은 site.css 에 있다.
   ========================================================================== */
/* 리빌더 set.header.php 가 스킨 CSS 뒤에서 `.co_header_xxxxxx #header{background-color:#fff}` 를 같은 특이도로 싣는다.
   맨 위(투명) 상태가 그 규칙에 지지 않도록 배경·테두리는 !important 로 고정한다. */
#header.bp-header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 98;
  padding: 0 !important; margin: 0; box-shadow: none;
  border-bottom: 1px solid transparent !important; background: transparent !important;
  font-family: var(--bp-font); color: var(--bp-text);
  transition: background .25s, border-color .25s, box-shadow .25s;
}
#header.bp-header.is-scrolled,
html.bp-sub #header.bp-header {
  background: var(--bp-header-bg) !important;
  border-bottom-color: var(--bp-border) !important;
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  box-shadow: var(--bp-shadow-sm);
}
/* 리빌더 헤더색 CSS 가 .tog_wrap 안의 svg 를 강조색으로 채우는 규칙을 막는다(우리 버튼은 선 아이콘) */
#header.bp-header .tog_wrap button svg *, #header.bp-header .bp-theme-toggle svg * { fill: none !important; }

.bp-header__inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px; box-sizing: border-box;
  height: var(--bp-header-h); display: flex; align-items: center; gap: 28px;
}

/* 로고 */
.bp-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--bp-text); flex: 0 0 auto; }
.bp-logo:hover { text-decoration: none; }
.bp-logo__img { height: 34px; width: auto; display: block; }   /* 업로드 로고(_업로드/7_로고)의 마크가 글자 로고의 마크(34px)와 같은 크기가 되게 */
.bp-logo__img--dark { display: none; }
:root[data-theme="dark"] .bp-logo__img--light { display: none; }
:root[data-theme="dark"] .bp-logo__img--dark { display: block; }
.bp-logo__mark {
  width: 34px; height: 34px; border-radius: 11px; display: inline-grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--bp-primary), #7C3AED); box-shadow: 0 6px 14px var(--bp-ring);
}
.bp-logo__mark svg { width: 19px; height: 19px; }
.bp-logo__text { font-family: var(--bp-font-h); font-size: 23px; letter-spacing: -.03em; color: var(--bp-text); line-height: 1; }

/* 메뉴 */
.bp-nav { flex: 1 1 auto; }
.bp-nav ul { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
.bp-nav li { margin: 0; padding: 0; }
.bp-nav a {
  display: inline-block; padding: 9px 14px; border-radius: 10px;
  font-family: var(--bp-font-b); font-size: 15px; color: var(--bp-text-2); text-decoration: none;
  transition: color .18s, background .18s;
}
.bp-nav a:hover { color: var(--bp-text); background: var(--bp-surface-2); text-decoration: none; }

/* 우측 동작 */
.bp-header__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.bp-theme-toggle {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--bp-border);
  background: var(--bp-surface); color: var(--bp-text-2); display: inline-grid; place-items: center; cursor: pointer; padding: 0;
  transition: color .18s, border-color .18s, background .18s;
}
.bp-theme-toggle:hover { color: var(--bp-primary); border-color: var(--bp-primary); }
.bp-theme-toggle svg { width: 18px; height: 18px; display: block; }
.bp-theme-toggle .bp-ico-moon { display: none; }
:root[data-theme="dark"] .bp-theme-toggle .bp-ico-sun { display: none; }
:root[data-theme="dark"] .bp-theme-toggle .bp-ico-moon { display: block; }
/* 서브 페이지도 다크 모드를 쓴다(2026-09-28, dark.css) — 토글을 모든 페이지에 보인다 */

.bp-header .tog_wrap { margin: 0; padding: 0; list-style: none; }
.bp-header .tog_wrap li { margin: 0; padding: 0; }
.bp-burger {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--bp-border); background: var(--bp-surface);
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; cursor: pointer; padding: 0;
}
.bp-burger span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--bp-text); }

@media (max-width: 1024px) {
  .bp-header__inner { padding: 0 16px; gap: 12px; }
  .bp-logo__img { height: 30px; }
  .bp-logo__mark { width: 30px; height: 30px; border-radius: 9px; }
  .bp-logo__text { font-size: 20px; }
  .bp-header .bp-btn { height: 38px; padding: 0 14px; font-size: 14px; }
  .bp-theme-toggle, .bp-burger { width: 38px; height: 38px; }
}
/* 좁은 휴대폰(390px 등)에서도 시작 버튼을 보인다(2026-10-08 최종 점검 — 첫 화면에 CTA가 없었다). 340px 이하만 숨긴다 */
@media (max-width: 400px) {
  .bp-header__inner { gap: 8px; }
  .bp-header .bp-btn { height: 36px; padding: 0 12px; font-size: 13px; }
  .bp-theme-toggle, .bp-burger { width: 36px; height: 36px; }
}
@media (max-width: 340px) {
  .bp-header .bp-btn--primary { display: none; }   /* 아주 좁은 화면: 로고·토글·메뉴 버튼만 */
}
