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

/*
 * 헤더 고정 — 옛 Elementor 「고정: 위」(헤더 #22 의 4f67aad, 데스크톱·태블릿·폰, 스크롤 효과 10px — 아래 「헤더 스크롤 효과」).
 * 옛 화면은 컨테이너를 fixed 로 띄우고 같은 크기의 빈 칸을 남겼다(고정 중 z-index 99 — e-sticky .elementor-sticky--active) —
 * 헤더 전체를 sticky 로 붙여 같은 자리·같은 쌓임으로 둔다.
 */
.ld-hd {
	position: sticky;
	top: 0;
	z-index: 99;
}

/*
 * 하위 메뉴 화살표 — 옛 SmartMenus 가 링크 끝에 붙이던 것(.elementor-nav-menu .sub-arrow, caret-down 1em).
 * 색(fill)은 링크에서 물려받는다(옛 화면과 같음).
 */
.ld-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;
}

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

/* 가로 메뉴: 하위 메뉴가 열린 링크(SmartMenus .highlighted)·지금 페이지(elementor-item-active) 색 — 옛 위젯 규칙(post-22 15787a7, 마우스 올림과 같은 흰색). */
.ld-hd .hd-15787a7__horizontal .elementor-item:is(.highlighted, .elementor-item-active) {
	color: #ffffff;
	fill: #ffffff;
}

/* 하위 메뉴·펼침 메뉴 링크: 열림(.highlighted)·지금 페이지 — 옛 위젯 규칙(post-22 15787a7: 흰 글자, 바탕 주색 — 평소·마우스 올림과 같음). */
.ld-hd .hd-15787a7 .elementor-nav-menu--dropdown a:is(.highlighted, .elementor-item-active) {
	background-color: var(--e-global-color-primary);
	color: #ffffff;
}

/* 펼침 메뉴(1024px 이하) 열림 — 옛 .elementor-nav-menu--toggle .elementor-menu-toggle.elementor-active + .elementor-nav-menu__container */
.ld-hd .hd-15787a7__toggle.elementor-active + .hd-15787a7__container {
	animation: ld-hide-scroll 0.3s backwards;
	max-height: var(--menu-height, 100vh);
	overflow-x: hidden;
	overflow-y: hidden;
	transform: scaleY(1);
}

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

.ld-hd .hd-15787a7__toggle.elementor-active .hd-15787a7__open {
	display: none;
}

.ld-hd .hd-15787a7__toggle.elementor-active .hd-15787a7__close {
	display: inline;
}

/* 헤더 스크롤 효과 — 옛 헤더 사용자 CSS(post-22, 컨테이너 4f67aad): 10px 이상 내리면 바탕 #a73439. 맨 위에서는 투명. */
.ld-hd .hd-4f67aad.elementor-sticky--effects {
	background-color: #a73439 !important;
}

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

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

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

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

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

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

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

/* 그 밖의 효과 — 리더스 문서: zoomIn(첫 화면) · slideInLeft·slideInRight(영상의학) · slideInUp(진료비 팝업). fadeInLeft·Right 는 틀에서 남은 것 */
.ld-fadeInLeft {
	animation-name: ld-fadeInLeft;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	50% {
		opacity: 1;
	}
}

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

	to {
		opacity: 1;
	}
}

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

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

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

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

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

/* 진료비 팝업(template-parts/popups/) — 닫혀 있을 때. 생성 CSS 의 display(옛 열린 상태를 잰 값)가 hidden 속성을 이기므로 따로 둔다. */
.ld-pop[hidden] {
	display: none !important;
}

/* PowerPack 카드 슬라이더(둘러보기·리더스 소식·응급) — 옛 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-ld-pag] 안 .ld-bullet(옛 .swiper-pagination-bullet). 옛 규칙끼리의 구체성·순서(쌓기 규칙이 뒤)를 그대로 둔다. */
.ld-p .pp-card-slider-item.is-active .pp-card-slider-image img { opacity: 1; transition-delay: .3s; }
.ld-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > * { opacity: 1; transform: none; }
.ld-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > :nth-child(1) { transition-delay: 0.3s; }
.ld-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > :nth-child(2) { transition-delay: 0.4s; }
.ld-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > :nth-child(3) { transition-delay: 0.5s; }
.ld-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > :nth-child(4) { transition-delay: 0.6s; }
.ld-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > :nth-child(5) { transition-delay: 0.7s; }
.ld-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > :nth-child(6) { transition-delay: 0.8s; }
.ld-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > :nth-child(7) { transition-delay: 0.9s; }
.ld-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > :nth-child(8) { transition-delay: 1.0s; }
.ld-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > :nth-child(9) { transition-delay: 1.1s; }
.ld-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > :nth-child(10) { transition-delay: 1.2s; }
.ld-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > :nth-child(11) { transition-delay: 1.3s; }
.ld-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > :nth-child(12) { transition-delay: 1.4s; }
.ld-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > :nth-child(13) { transition-delay: 1.5s; }
.ld-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > :nth-child(14) { transition-delay: 1.6s; }
.ld-p .pp-card-slider-item.is-active .pp-card-slider-content-wrap > :nth-child(15) { transition-delay: 1.7s; }
.ld-p .pp-card-slider [data-ld-pag] .ld-bullet { width: 11px; height: 11px; display: block; border-radius: 10px; background: #062744; opacity: .2; transition: all .3s; cursor: pointer; }
.ld-p .pp-card-slider [data-ld-pag] .ld-bullet.is-active { opacity: 1; background: #545454; }
.ld-p .pp-card-slider-image-right.pp-card-slider-dots-aside [data-ld-pag] { left: 20px; right: auto; }
.ld-p .pp-card-slider-dots-aside .pp-card-slider [data-ld-pag] .ld-bullet { margin: 8px 0; }
.ld-p .pp-card-slider-dots-aside .pp-card-slider [data-ld-pag] .ld-bullet.is-active { height: 30px; }
.ld-p .pp-card-slider-dots-bottom .pp-card-slider [data-ld-pag] { bottom: 15px; transform: translateX(-50%); left: 50%; top: auto; width: 100%; display: flex; justify-content: center; align-items: center; }
.ld-p .pp-card-slider-dots-bottom .pp-card-slider [data-ld-pag] .ld-bullet { margin: 0 5px; }
.ld-p .pp-card-slider-dots-bottom .pp-card-slider [data-ld-pag] .ld-bullet.is-active { width: 30px; }
.ld-p .pp-card-slider-breakpoint-active.pp-card-slider { height: auto; margin: 180px auto 0; }
.ld-p .pp-card-slider-breakpoint-active .pp-card-slider-item { flex-direction: column; }
.ld-p .pp-card-slider-breakpoint-active .pp-card-slider-image { margin: -180px 0 40px; width: 100%; }
.ld-p .pp-card-slider-breakpoint-active .pp-card-slider-image { margin-left: 0 !important; margin-right: 0 !important; }
.ld-p .pp-card-slider-breakpoint-active.pp-card-slider [data-ld-pag] { bottom: 15px; transform: translateX(-50%); left: 50%; top: auto; width: 100%; display: flex; justify-content: center; align-items: center; }
.ld-p .pp-card-slider-breakpoint-active.pp-card-slider [data-ld-pag] .ld-bullet { margin: 0 5px; }
.ld-p .pp-card-slider-breakpoint-active.pp-card-slider [data-ld-pag] .ld-bullet.is-active { height: 11px; width: 11px; }
.ld-p .pp-card-slider-breakpoint-active.pp-card-slider .pp-card-slider-content-wrap { padding: 0; }

/* 배경 움직임 구조(옛 Elementor Pro motion-fx CSS 그대로) — page.js 가 data-ld-mfx 요소에 만든다. 층의 사진·덮개는 페이지 CSS(maps/<이름>.extra.css). */
.ld-p .elementor-motion-effects-container { height: 100%; left: 0; overflow: hidden; position: absolute; top: 0; width: 100%; }
.ld-p .elementor-motion-effects-element,
.ld-p .elementor-motion-effects-layer { transition-duration: 1s; transition-property: transform, opacity; transition-timing-function: cubic-bezier(0, .33, .07, 1.03); }
.ld-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 분홍 바탕이 보였다. */
.ld-p [data-ld-filter] button[data-filter] { order: 0; }
.ld-p [data-ld-filter] button[data-filter="__all"] { order: -1; }
.ld-p [data-ld-filter] button[aria-pressed="true"] { background-color: initial; }
