/*
 * 손으로 쓴 공통 규칙 — 생성 CSS(header·footer·single·pages)가 담지 못한 상태값.
 * 옛 화면에서 Elementor JS·위젯 CSS 가 하던 일(헤더 고정, 메뉴 화살표, 지금 페이지·하위 메뉴 열림 색, 펼침 메뉴 열림, 등장 효과)을 같은 값으로.
 * 값은 옛 헤더 CSS(post-317)·Elementor Pro widget-nav-menu.css·elementor/assets/lib/animations·PowerPack 위젯 CSS 그대로.
 */

/*
 * 헤더 고정 — 옛 Elementor 「고정: 위」(헤더 #317 의 a993e49 넓은 화면 · 5579eaaa 폰 — 폭마다 하나만 보인다).
 * 옛 화면은 컨테이너를 fixed 로 띄우고 같은 크기의 빈 칸을 남겼다(고정 중 z-index 99 — e-sticky .elementor-sticky--active) —
 * 헤더 전체를 sticky 로 붙여 같은 자리·같은 쌓임으로 둔다.
 */
.bk-hd {
	position: sticky;
	top: 0;
	z-index: 99;
}

/*
 * 하위 메뉴 화살표 — 옛 SmartMenus 가 링크 끝에 붙이던 것(.elementor-nav-menu .sub-arrow, caret-down 1em).
 * 색(fill)은 링크에서 물려받는다(옛 화면과 같음).
 */
.bk-hd .elementor-nav-menu .sub-arrow {
	align-items: center;
	display: flex;
	line-height: 1;
	margin-block-end: -10px;
	margin-block-start: -10px;
	padding: 10px;
	padding-inline-end: 0;
}

.bk-hd .elementor-nav-menu .sub-arrow .e-font-icon-svg {
	height: 1em;
	width: 1em;
}

/* 가로 메뉴 — 옛 위젯 규칙(post-317 c955726 · 2a43f425): 하위 메뉴가 열린 링크(SmartMenus .highlighted) 검정, 지금 페이지(elementor-item-active) #9E9E9E.
 * 지금 페이지 규칙이 뒤에 있어 이긴다(옛 순서). 404 에서 뽑은 생성 CSS 에는 지금 페이지가 없어 빠졌다. */
.bk-hd :is(.hd-c955726__horizontal, .hd-2a43f425__horizontal) .elementor-item.highlighted {
	color: #000000;
	fill: #000000;
}

.bk-hd :is(.hd-c955726__horizontal, .hd-2a43f425__horizontal) .elementor-item.elementor-item-active {
	color: #9e9e9e;
}

/* 푸터 세로 메뉴(post-49 2c63e27b): 지금 페이지 #C8D5DC(옛 위젯 규칙 — 마우스 올림과 같은 색). */
.bk-ft .ft-2c63e27b__menu .elementor-item.elementor-item-active {
	color: #c8d5dc;
	fill: #c8d5dc;
}

/* 펼침 메뉴 링크: 열림·지금 페이지 — 넓은 화면 메뉴(c955726) #9E9E9E · 폰 메뉴(2a43f425) #4551BF, 바탕 흰색(옛 위젯 규칙). */
.bk-hd .hd-c955726 .elementor-nav-menu--dropdown a:is(.highlighted, .elementor-item-active) {
	background-color: #ffffff;
	color: #9e9e9e;
}

.bk-hd .hd-2a43f425 .elementor-nav-menu--dropdown a:is(.highlighted, .elementor-item-active) {
	background-color: #ffffff;
	color: #4551bf;
}

/* 펼침 메뉴(위젯 중단점 이하) 열림 — 옛 .elementor-nav-menu--toggle .elementor-menu-toggle.elementor-active + .elementor-nav-menu__container */
.bk-hd :is(.hd-c955726__toggle, .hd-2a43f425__toggle).elementor-active + :is(.hd-c955726__container, .hd-2a43f425__container) {
	animation: bk-hide-scroll 0.3s backwards;
	max-height: var(--menu-height, 100vh);
	overflow-x: hidden;
	overflow-y: hidden;
	transform: scaleY(1);
}

@keyframes bk-hide-scroll {
	0%,
	to {
		overflow: hidden;
	}
}

.bk-hd :is(.hd-c955726__toggle, .hd-2a43f425__toggle).elementor-active :is(.hd-c955726__open, .hd-2a43f425__open) {
	display: none;
}

.bk-hd :is(.hd-c955726__toggle, .hd-2a43f425__toggle).elementor-active :is(.hd-c955726__close, .hd-2a43f425__close) {
	display: inline;
}

/* 헤더 스크롤 효과 — BK 헤더(#317)에는 스크롤 효과 CSS 가 없다(고정만). */

/*
 * 등장 효과(옛 Elementor entrance animation — .elementor-invisible 로 감췄다가 화면에 들어오면 .animated + 효과 이름).
 * 동작은 page.js(data-bk-anim · data-bk-delay). 기본 1.25초, 「느리게」(animated-slow) 2초, 「빠르게」(animated-fast) 0.75초.
 * 효과 모양은 옛 elementor/assets/lib/animations/styles/*.css 그대로.
 */
[data-bk-anim]:not(.bk-animated) {
	visibility: hidden;
}

.bk-animated {
	animation-duration: 1.25s;
}

.bk-animated.animated-slow {
	animation-duration: 2s;
}

.bk-animated.animated-fast {
	animation-duration: 0.75s;
}

.bk-fadeIn {
	animation-name: bk-fadeIn;
}

.bk-fadeInUp {
	animation-name: bk-fadeInUp;
}

.bk-fadeInDown {
	animation-name: bk-fadeInDown;
}

/* 그 밖의 효과 — BK 문서: fadeIn·fadeInDown·fadeInLeft·fadeInRight·slideInLeft·slideInRight·slideInUp(여러 페이지). zoomIn 은 틀에서 남은 것. */
.bk-fadeInLeft {
	animation-name: bk-fadeInLeft;
}

.bk-fadeInRight {
	animation-name: bk-fadeInRight;
}

.bk-zoomIn {
	animation-name: bk-zoomIn;
}

.bk-slideInUp {
	animation-name: bk-slideInUp;
}

.bk-slideInLeft {
	animation-name: bk-slideInLeft;
}

.bk-slideInRight {
	animation-name: bk-slideInRight;
}

@keyframes bk-slideInUp {
	from {
		transform: translate3d(0, 100%, 0);
		visibility: visible;
	}

	to {
		transform: translate3d(0, 0, 0);
	}
}

@keyframes bk-slideInLeft {
	from {
		transform: translate3d(-100%, 0, 0);
		visibility: visible;
	}

	to {
		transform: translate3d(0, 0, 0);
	}
}

@keyframes bk-slideInRight {
	from {
		transform: translate3d(100%, 0, 0);
		visibility: visible;
	}

	to {
		transform: translate3d(0, 0, 0);
	}
}

@keyframes bk-fadeInLeft {
	from {
		opacity: 0;
		transform: translate3d(-100%, 0, 0);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes bk-fadeInRight {
	from {
		opacity: 0;
		transform: translate3d(100%, 0, 0);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes bk-zoomIn {
	from {
		opacity: 0;
		transform: scale3d(0.3, 0.3, 0.3);
	}

	50% {
		opacity: 1;
	}
}

@keyframes bk-fadeIn {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

@keyframes bk-fadeInUp {
	from {
		opacity: 0;
		transform: translate3d(0, 100%, 0);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes bk-fadeInDown {
	from {
		opacity: 0;
		transform: translate3d(0, -100%, 0);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bk-animated {
		animation: none !important;
	}
}


/* PowerPack 카드 슬라이더(신경계 질환 2392448) — 옛 widget-card-slider.min.css 중 JS 상태 클래스에 걸린 규칙.
 * 추출은 JS 를 끄고 해서 이 규칙이 빠졌다. page.js 가 지금 장에 is-active(옛 .swiper-slide-active)를,
 * 창 폭이 쌓기 폭(옛 responsive_breakpoint — 태블릿 1024) 이하면 .pp-card-slider 에 옛 이름 pp-card-slider-breakpoint-active 를 붙인다.
 * 점은 [data-bk-pag] 안 .bk-bullet(옛 .swiper-pagination-bullet). 옛 규칙끼리의 구체성·순서(쌓기 규칙이 뒤)를 그대로 둔다. */
.bk-p .pp-card-slider-item.is-active .pp-card-slider-image img { opacity: 1; transition-delay: .3s; }
.bk-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > * { opacity: 1; transform: none; }
.bk-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > :nth-child(1) { transition-delay: 0.3s; }
.bk-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > :nth-child(2) { transition-delay: 0.4s; }
.bk-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > :nth-child(3) { transition-delay: 0.5s; }
.bk-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > :nth-child(4) { transition-delay: 0.6s; }
.bk-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > :nth-child(5) { transition-delay: 0.7s; }
.bk-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > :nth-child(6) { transition-delay: 0.8s; }
.bk-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > :nth-child(7) { transition-delay: 0.9s; }
.bk-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > :nth-child(8) { transition-delay: 1.0s; }
.bk-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > :nth-child(9) { transition-delay: 1.1s; }
.bk-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > :nth-child(10) { transition-delay: 1.2s; }
.bk-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > :nth-child(11) { transition-delay: 1.3s; }
.bk-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > :nth-child(12) { transition-delay: 1.4s; }
.bk-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > :nth-child(13) { transition-delay: 1.5s; }
.bk-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > :nth-child(14) { transition-delay: 1.6s; }
.bk-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > :nth-child(15) { transition-delay: 1.7s; }
.bk-p .pp-card-slider [data-bk-pag] .bk-bullet { width: 11px; height: 11px; display: block; border-radius: 10px; background: #062744; opacity: .2; transition: all .3s; cursor: pointer; }
.bk-p .pp-card-slider [data-bk-pag] .bk-bullet.is-active { opacity: 1; background: #545454; }
.bk-p .pp-card-slider-image-right.pp-card-slider-dots-aside [data-bk-pag] { left: 20px; right: auto; }
.bk-p .pp-card-slider-dots-aside .pp-card-slider [data-bk-pag] .bk-bullet { margin: 8px 0; }
.bk-p .pp-card-slider-dots-aside .pp-card-slider [data-bk-pag] .bk-bullet.is-active { height: 30px; }
.bk-p .pp-card-slider-dots-bottom .pp-card-slider [data-bk-pag] { bottom: 15px; transform: translateX(-50%); left: 50%; top: auto; width: 100%; display: flex; justify-content: center; align-items: center; }
.bk-p .pp-card-slider-dots-bottom .pp-card-slider [data-bk-pag] .bk-bullet { margin: 0 5px; }
.bk-p .pp-card-slider-dots-bottom .pp-card-slider [data-bk-pag] .bk-bullet.is-active { width: 30px; }
.bk-p .pp-card-slider-breakpoint-active.pp-card-slider { height: auto; margin: 180px auto 0; }
.bk-p .pp-card-slider-breakpoint-active .pp-card-slider-item { flex-direction: column; }
.bk-p .pp-card-slider-breakpoint-active .pp-card-slider-image { margin: -180px 0 40px; width: 100%; }
.bk-p .pp-card-slider-breakpoint-active .pp-card-slider-image { margin-left: 0 !important; margin-right: 0 !important; }
.bk-p .pp-card-slider-breakpoint-active.pp-card-slider [data-bk-pag] { bottom: 15px; transform: translateX(-50%); left: 50%; top: auto; width: 100%; display: flex; justify-content: center; align-items: center; }
.bk-p .pp-card-slider-breakpoint-active.pp-card-slider [data-bk-pag] .bk-bullet { margin: 0 5px; }
.bk-p .pp-card-slider-breakpoint-active.pp-card-slider [data-bk-pag] .bk-bullet.is-active { height: 11px; width: 11px; }
.bk-p .pp-card-slider-breakpoint-active.pp-card-slider .pp-card-slider-content-wrap { padding: 0; }

/* 배경 움직임 구조(옛 Elementor Pro motion-fx CSS 그대로) — page.js 가 data-bk-mfx 요소에 만든다. 층의 사진·덮개는 페이지 CSS(maps/<이름>.extra.css). */
.bk-p .elementor-motion-effects-container { height: 100%; left: 0; overflow: hidden; position: absolute; top: 0; width: 100%; }
.bk-p .elementor-motion-effects-element,
.bk-p .elementor-motion-effects-layer { transition-duration: 1s; transition-property: transform, opacity; transition-timing-function: cubic-bezier(0, .33, .07, 1.03); }
.bk-p .elementor-motion-effects-layer { background-repeat: no-repeat; background-size: cover; left: 0; position: absolute; top: 0; }

/* 글 목록 거르기(치료케이스·건강 상식·공지사항) — 옛 Elementor Pro widget-loop-filter.css 의 속성 규칙. 눌림 표시는 page.js 가 클래스를 바꿔 끼우는데(생성 CSS 의 눌림·평소 모양),
 * 그 클래스에 옛 「전체」 자리 값(order: -1)까지 들어 있어 누른 버튼이 맨 앞으로 갔다 — 자리는 옛것처럼 「전체」(data-filter=__all)에만.
 * 눌린 버튼 바탕은 없음(옛 [aria-pressed=true]) — 없으면 누른 뒤 초점 때문에 옛 테마 기본 button:focus 분홍 바탕이 보였다. */
.bk-p [data-bk-filter] button[data-filter] { order: 0; }
.bk-p [data-bk-filter] button[data-filter="__all"] { order: -1; }
.bk-p [data-bk-filter] button[aria-pressed="true"] { background-color: initial; }

/*
 * 「Load More」 상태 — 옛 Elementor Pro widget-posts.css(e-load-more-pagination-loading · -end). 동작은 page.js.
 * 스피너는 버튼 안 가운데(누르는 동안 버튼 글자 대신), 마지막 쪽이면 버튼을 숨긴다.
 */
[data-bk-loadmore] [data-bk-more] {
	position: relative;
}

[data-bk-loadmore] [data-bk-more-wrap] [data-bk-spinner] {
	left: 50%;
	margin: inherit;
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
}

[data-bk-loadmore].e-load-more-pagination-loading [data-bk-spinner] svg {
	animation: bk-spin 2s infinite linear;
	display: flex;
}

[data-bk-loadmore].e-load-more-pagination-loading [data-bk-more-content] {
	visibility: hidden;
}

[data-bk-loadmore].e-load-more-pagination-loading [data-bk-more] {
	cursor: default;
}

[data-bk-loadmore].e-load-more-pagination-end [data-bk-more-wrap] {
	display: none;
}

@keyframes bk-spin {
	0% {
		transform: rotate(0deg);
	}

	to {
		transform: rotate(359deg);
	}
}

/* 배경 영상 iframe(유튜브·비메오): 옛 Elementor .elementor-background-video-embed { max-width: none } — 상자를 16:9 로 덮게 키운 폭(page.js fitCover)이
 * 옛 테마 기본 CSS 의 iframe { max-width: 100% } 에 눌리지 않게. 추출 때 그 자리는 빈 div 라 이 규칙이 빠졌다(운영 첫 화면 영상 위아래 검은 띠). */
.bk-p [data-bk-video] iframe {
	max-width: none;
}

/* 유튜브 배경 영상 준비 중(page.js is-loading): 옛 Elementor .elementor-background-video-container.elementor-loading { opacity: 0 } + .elementor-invisible { visibility: hidden }.
 * 플레이어가 준비되기 전 검은 iframe 대신 바탕 사진·덮개가 보이고, 준비되면 상자의 opacity 1초 전환으로 서서히 나타난다. */
.bk-p [data-bk-video] .is-loading {
	opacity: 0;
	visibility: hidden;
}
