/* ==========================================================
   인텍메디 서브페이지 모션 (sub-motion.css)
   - 메인을 제외한 모든 페이지에서 로드
   - JS가 html에 .im-motion 을 붙였을 때만 숨김 처리 (JS 꺼져도 내용 보임)
   - 동작 줄이기(prefers-reduced-motion) 설정 시 모두 해제
   ========================================================== */

/* ---------- 1. 상단 타이틀 영역 ---------- */
.ts-titlebar-wrapper.im-tb { overflow: hidden; }
.im-tb-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	background: inherit;
	background-size: cover;
	transform-origin: 60% 40%;
	animation: imKenBurns 14s ease-out forwards;
	pointer-events: none;
}
.im-tb .ts-titlebar-wrapper-bg-layer { z-index: 1; }
.im-tb .ts-titlebar { position: relative; z-index: 2; }

.ts-titlebar-wrapper .entry-title {
	opacity: 0;
	animation: imTitleUp 1s cubic-bezier(.22,.61,.36,1) .25s forwards;
}
/* 제목 아래 포인트 바 */
.ts-titlebar-wrapper .entry-title::after {
	content: '';
	display: block;
	width: 0;
	height: 3px;
	margin-top: 14px;
	background: #3368c6;
	border-radius: 2px;
	animation: imBar .8s ease-out 1s forwards;
}
.ts-titlebar-align-center .entry-title::after,
.im-tb-center .entry-title::after { margin-left: auto; margin-right: auto; }
.ts-titlebar-wrapper .breadcrumb-wrapper-inner {
	opacity: 0;
	animation: imFadeLeft .9s ease-out .6s forwards;
}

/* ---------- 2. 본문 스크롤 등장 ---------- */
.im-motion .im-reveal {
	opacity: 0;
	transform: translate3d(0, 40px, 0);
	transition: opacity .9s cubic-bezier(.22,.61,.36,1), transform .9s cubic-bezier(.22,.61,.36,1);
	transition-delay: var(--im-delay, 0s);
}
.im-motion .im-reveal.im-fade { transform: none; }          /* 위치 고정 요소가 있는 블록은 페이드만 */
.im-motion .im-reveal.im-left { transform: translate3d(-50px, 0, 0); }
.im-motion .im-reveal.im-right { transform: translate3d(50px, 0, 0); }
.im-motion .im-reveal.im-in { opacity: 1; transform: none; }

/* 모바일: 좌우 등장 대신 아래→위 (가로 스크롤 방지) */
@media (max-width: 768px) {
	.im-motion .im-reveal.im-left,
	.im-motion .im-reveal.im-right { transform: translate3d(0, 30px, 0); }
	.im-motion .im-reveal.im-left.im-in,
	.im-motion .im-reveal.im-right.im-in { transform: none; }
}

/* 구분선: 왼쪽에서 그려짐 */
.im-motion .im-line.im-reveal { opacity: 1; transform: scaleX(0); transform-origin: left center; transition-duration: 1.1s; }
.im-motion .im-line.im-reveal.im-in { transform: scaleX(1); }

/* ---------- 3. 아이콘 박스 ---------- */
.im-sub .ts-ihbox {
	transition: transform .4s ease, box-shadow .4s ease;
	border-radius: 12px;
}
.im-sub .ts-ihbox:hover { transform: translateY(-6px); }
.im-sub .ts-ihbox .ts-ihbox-icon-wrapper { display: inline-block; transition: transform .5s ease; }
.im-sub .ts-ihbox:hover .ts-ihbox-icon-wrapper { transform: scale(1.12) rotate(-6deg); }

/* ---------- 4. 링크 이미지 (인증서·특허 등) 호버 확대 ---------- */
.im-sub .wpb_single_image a.vc_single_image-wrapper,
.im-sub .wpb_single_image a { overflow: hidden; display: inline-block; }
.im-sub .wpb_single_image a img { transition: transform .6s cubic-bezier(.22,.61,.36,1), filter .4s ease; }
.im-sub .wpb_single_image a:hover img { transform: scale(1.05); filter: brightness(1.05); }

/* ---------- 5. 표: 행 호버 강조 ---------- */
.im-sub .site-content table:not(.tb_header) tr { transition: background-color .25s ease; }
.im-sub .site-content .wpb_text_column table tr:hover td { background-color: rgba(51, 104, 198, .05); }

/* ---------- keyframes ---------- */
@keyframes imKenBurns { from { transform: scale(1.15); } to { transform: scale(1); } }
@keyframes imTitleUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes imFadeLeft { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes imBar { to { width: 60px; } }

/* ---------- 동작 줄이기 ---------- */
@media (prefers-reduced-motion: reduce) {
	.im-tb-bg { animation: none !important; transform: none !important; }
	.ts-titlebar-wrapper .entry-title,
	.ts-titlebar-wrapper .breadcrumb-wrapper-inner { opacity: 1 !important; animation: none !important; }
	.ts-titlebar-wrapper .entry-title::after { animation: none !important; width: 60px; }
	.im-motion .im-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}
