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

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

/* 로그인한 직원 화면: 관리 막대 아래에 붙인다(옛 Elementor 고정도 막대가 fixed 일 때 그 높이만큼 내렸다 — 600px 이하는 막대가 함께 스크롤된다). */
.admin-bar .ys-hd {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .ys-hd {
		top: 46px;
	}
}

@media (max-width: 600px) {
	.admin-bar .ys-hd {
		top: 0;
	}
}

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

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

/* 헤더 가로 메뉴: 지금 페이지(elementor-item-active — 지금 페이지와 그 상위 항목)·하위 메뉴가 열린 링크(SmartMenus .highlighted) 색 —
   옛 위젯 규칙(마우스 올림과 같은 값, 전역 색 #1099BF). 밑줄 효과(::after)는 색이 투명이라 보이지 않는다(불투명도만 옛 값). */
.ys-hd .hd-7a89f9f__horizontal .elementor-item:is(.highlighted, .elementor-item-active) {
	color: var(--e-global-color-2a01475);
	fill: var(--e-global-color-2a01475);
}
.ys-hd .hd-7a89f9f__horizontal .elementor-item:is(.highlighted, .elementor-item-active)::after {
	opacity: 1;
}

/* 하위 메뉴·펼침 메뉴 링크: 지금 페이지·열림 — 옛 위젯 규칙(흰 글자 · 바탕 #1099BF). 마우스 올림·포커스는 생성 CSS 에 있다. */
.ys-hd .hd-7a89f9f .elementor-nav-menu--dropdown a:is(.highlighted, .elementor-item-active) {
	color: var(--e-global-color-58fd5b3);
	background-color: var(--e-global-color-2a01475);
}

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

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

.ys-hd .hd-7a89f9f__toggle.elementor-active .hd-7a89f9f__open {
	display: none;
}

.ys-hd .hd-7a89f9f__toggle.elementor-active .hd-7a89f9f__close {
	display: inline;
}

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

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

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

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

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

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

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

.ys-fadeInLeft {
	animation-name: ys-fadeInLeft;
}

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

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

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

	to {
		opacity: 1;
	}
}

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

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

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

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

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

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

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

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

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

	50% {
		opacity: 1;
	}
}

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

/* 반복 안 하는 캐러셀(page.js loop 0): 끝 화살표 흐리게(옛 e-swiper.css .elementor-swiper-button.swiper-button-disabled),
   장이 한 화면에 다 들어가면 화살표·점 줄 감춤(옛 swiper-button-lock · swiper-pagination-lock). */
.ys-p [data-ys-prev].is-disabled,
.ys-p [data-ys-next].is-disabled { opacity: .3; }
.ys-p [data-ys-prev].is-locked,
.ys-p [data-ys-next].is-locked,
.ys-p [data-ys-pag].is-locked { display: none; }
