/* ==========================================================================
   온숨 키트 — Elementor 무료판에 없는 것만 담는다. 색·글꼴·여백은 위젯 Style 탭에서.
   ========================================================================== */
:root {
	--os-paper: #F4F2ED;
	--os-ink: #1D2320;
	--os-ink-2: #3A423D;
	--os-mute: #5F655E;
	--os-line: #DCD8CF;
	--os-moss: #3E5A4B;
	--os-moss-dk: #2C4237;
	--os-clay: #B8643E;
	--os-clay-dk: #9E5534; /* 24px 미만 글자용 — 한지 바탕 4.9:1 */
	--os-dot-open: #3E8E5E;
	--os-dot-break: #C9973E;
	--os-dot-closed: #B8643E;
	--os-ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---- 한글 줄바꿈: 단어 중간에서 끊지 않는다 (Elementor 에 컨트롤이 없는 CJK 속성) ---- */
.elementor-widget-heading .elementor-heading-title,
.elementor-widget-text-editor,
.elementor-widget-image-box .elementor-image-box-title,
.elementor-widget-image-box .elementor-image-box-description,
.elementor-widget-icon-box .elementor-icon-box-title,
.elementor-widget-icon-box .elementor-icon-box-description,
.elementor-widget-icon-list .elementor-icon-list-text,
.elementor-widget-button .elementor-button-text,
.elementor-tab-title, .elementor-tab-content,
.e-n-accordion-item-title-text, .e-n-tab-title-text {
	word-break: keep-all;
	overflow-wrap: break-word;
}
.elementor-widget-button .elementor-button { white-space: nowrap; }

/* ---- 헤더: 스크롤하면 그림자 (헤더 고정 자체는 컨테이너 컨트롤 position:fixed) ---- */
.os-header {
	-webkit-backdrop-filter: saturate(1.2) blur(14px);
	backdrop-filter: saturate(1.2) blur(14px);
	transition: box-shadow .35s var(--os-ease), background-color .35s var(--os-ease);
}
html.os-scrolled .os-header {
	box-shadow: 0 1px 0 rgba(29, 35, 32, .06), 0 10px 30px rgba(29, 35, 32, .07);
}
/* ---- HFE 가로 메뉴: 창 크기가 바뀌면 HFE 스크립트가 메뉴 폭을 소수점 아래를 버린 값(492.297px)으로 고정해
   '고객센터'가 둘째 줄로 내려간다(10-16 실측, HFE 2.9.5 frontend.js resize) → 데스크톱에선 그 고정을 무시하고 한 줄로 (1.0.9) ---- */
@media (min-width: 1025px) {
	.os-header nav.hfe-nav-menu__layout-horizontal { width: auto !important; left: 0 !important; }
	.os-header nav.hfe-nav-menu__layout-horizontal > ul { flex-wrap: nowrap; }
}

/* ---- 배경 슬라이드쇼 위에 오버레이를 올린다 (컨테이너 ::before 가 슬라이드쇼 아래에 깔리는 문제) ---- */
.os-hero::before { z-index: 1 !important; }
.os-hero > .e-con-inner { position: relative; z-index: 2; }

/* ---- HFE 드롭다운: 메뉴와 하위 메뉴 사이 간격을 지나는 동안 닫히지 않게 (호버 브리지) ---- */
.hfe-nav-menu .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -18px; height: 18px; }

/* ---- 사진 리빌: 아래에서 위로 열리며 살짝 줌아웃 (JS 가 없으면 그냥 보인다) ---- */
html.os-js .os-reveal img {
	clip-path: inset(100% 0 0 0);
	transform: scale(1.07);
	transition: clip-path 1.25s cubic-bezier(.65, 0, .25, 1), transform 1.8s var(--os-ease);
	will-change: clip-path, transform;
}
html.os-js .os-reveal.is-in img {
	clip-path: inset(0 0 0 0);
	transform: none;
}
.os-reveal { overflow: hidden; }
.elementor-editor-active .os-reveal img { clip-path: none !important; transform: none !important; }
@media (prefers-reduced-motion: reduce) {
	html.os-js .os-reveal img { clip-path: none; transform: none; transition: none; }
}

/* ---- 그레인: 종이 결 (컨테이너 배경 위, 콘텐츠 아래) ---- */
.os-grain { position: relative; isolation: isolate; }
.os-grain::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	opacity: .55;
	mix-blend-mode: multiply;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.12  0 0 0 0 0.13  0 0 0 0 0.12  0 0 0 .09 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---- 데스크톱에서 왼쪽 제목을 붙잡아 두기 (오른쪽 목록이 길 때) ---- */
@media (min-width: 1025px) {
	.os-sticky { position: sticky; top: 132px; align-self: flex-start; }
}

/* ---- 모바일 가로 스냅 줄 (카드가 많은 줄을 손가락으로 넘긴다) ---- */
@media (max-width: 767px) {
	.os-snap {
		flex-wrap: nowrap !important;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding-bottom: 6px;
	}
	.os-snap::-webkit-scrollbar { display: none; }
	.os-snap > .elementor-element {
		flex: 0 0 78% !important;
		max-width: 78% !important;
		scroll-snap-align: start;
	}
}

/* ---- 원형 텍스트(텍스트 패스) 천천히 회전 ---- */
.os-spin svg { animation: os-spin 60s linear infinite; transform-origin: 50% 50%; }
@keyframes os-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .os-spin svg { animation: none; } }

/* ---- 이미지 캐러셀: 비율이 다른 사진도 같은 높이로 (Elementor 무료 캐러셀에 높이 컨트롤이 없다) ---- */
.os-carousel .swiper-slide-image { width: 100%; height: clamp(260px, 26vw, 420px); object-fit: cover; }

/* ---- 진료비 표 (텍스트 편집기 안의 표 — 위젯 Style 탭이 닿지 않는 부분) ---- */
.os-fee { width: 100%; border-collapse: collapse; margin: 0; font-variant-numeric: tabular-nums; }
.os-fee th, .os-fee td { padding: 18px 16px; border: 0; border-bottom: 1px solid var(--os-line); text-align: left; vertical-align: middle; background: transparent; }
.os-fee thead th { font-size: 13px; font-weight: 600; letter-spacing: .08em; color: var(--os-mute); border-bottom: 1px solid var(--os-ink); padding-top: 0; }
.os-fee tbody th { width: 16%; font-weight: 600; color: var(--os-moss); border-right: 1px solid var(--os-line); }
.os-fee tbody tr:nth-child(odd) td, .os-fee tbody tr:nth-child(even) td { background: transparent; }
.os-fee .os-fee__price { text-align: right; font-weight: 600; color: var(--os-ink); white-space: nowrap; }
@media (max-width: 767px) {
	.os-fee thead { display: none; }
	.os-fee, .os-fee tbody, .os-fee tr { display: block; width: 100%; }
	.os-fee tbody th { display: block; width: auto; border-right: 0; padding: 22px 0 8px; font-size: 13px; letter-spacing: .08em; }
	.os-fee tbody td { display: inline-block; padding: 10px 0; border: 0; }
	.os-fee tbody tr { border-bottom: 1px solid var(--os-line); padding-bottom: 6px; }
	.os-fee tbody td:nth-last-child(3) { display: block; font-weight: 600; color: var(--os-ink); padding-bottom: 0; }
	.os-fee tbody td:nth-last-child(2) { color: var(--os-mute); font-size: 14px; }
	.os-fee .os-fee__price { float: right; }
}

/* ==========================================================================
   위젯
   ========================================================================== */

/* 실시간 진료 상태 */
.os-status-wrap { display: flex; }
.os-status {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 9px 16px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .72);
	color: var(--os-ink);
	font-size: 14px;
	line-height: 1.4;
	letter-spacing: -.01em;
}
.os-status__dot {
	position: relative;
	width: 8px;
	height: 8px;
	flex: 0 0 8px;
	border-radius: 50%;
	background: var(--os-dot-closed);
}
.os-status.is-open .os-status__dot { background: var(--os-dot-open); }
.os-status.is-break .os-status__dot,
.os-status.is-before .os-status__dot { background: var(--os-dot-break); }
.os-status.is-open .os-status__dot::after {
	content: "";
	position: absolute;
	inset: -5px;
	border-radius: 50%;
	border: 1.5px solid var(--os-dot-open);
	opacity: 0;
	animation: os-pulse 2.4s var(--os-ease) infinite;
}
@keyframes os-pulse {
	0% { transform: scale(.4); opacity: .9; }
	100% { transform: scale(1.4); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .os-status.is-open .os-status__dot::after { animation: none; } }
/* 헤더 안에서는 한 줄 유지. 1025–1279px 는 가장 긴 문구(247px)가 메뉴와 겹치므로 태블릿처럼 숨긴다 */
.os-header .os-status { white-space: nowrap; }
@media (min-width: 1025px) and (max-width: 1279px) {
	.os-header .elementor-widget-onsum_status { display: none; }
}

/* 진료시간표 */
.os-hours { color: var(--os-ink); }
.os-hours__row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
	padding: 15px 0;
	border-bottom: 1px solid var(--os-line);
}
.os-hours__label { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.os-hours__time { text-align: right; font-variant-numeric: tabular-nums; }
.os-hours__time small { display: block; font-size: 12px; color: var(--os-mute); margin-top: 2px; }
.os-hours__row.is-closed .os-hours__time { color: var(--os-clay-dk); }
.os-hours__today {
	display: none;
	font-style: normal;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	padding: 4px 8px;
	border-radius: 999px;
	background: var(--os-moss);
	color: #fff;
}
.os-hours__row.is-today .os-hours__today { display: inline-block; }
.os-hours__note { margin: 14px 0 0; font-size: 13px; color: var(--os-mute); }

/* 24절기 섭생 카드 */
.os-season {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	overflow: hidden;
	border-radius: 20px;
	background: #fff;
}
.os-season--row-reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.os-season--row-reverse .os-season__media { order: 2; }
.os-season--stack { grid-template-columns: 1fr; }
.os-season__media { position: relative; min-height: 320px; background: #E9E6DF; }
.os-season__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.os-season__body { padding: clamp(28px, 4vw, 56px); display: flex; flex-direction: column; justify-content: center; }
.os-season__eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .14em; color: var(--os-moss); margin-bottom: 18px; }
.os-season__name { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; color: var(--os-ink); }
.os-season__ko { font-family: 'Noto Serif KR', serif; font-size: clamp(34px, 3.6vw, 52px); font-weight: 500; line-height: 1.1; }
.os-season__hanja { font-family: 'Noto Serif KR', serif; font-size: clamp(18px, 1.6vw, 24px); color: var(--os-clay-dk); letter-spacing: .12em; }
.os-season__range { margin-top: 10px; font-size: 14px; color: var(--os-mute); font-variant-numeric: tabular-nums; }
.os-season__tip { margin: 22px 0 0; font-size: clamp(15px, 1.05vw, 17px); line-height: 1.85; color: var(--os-ink-2); word-break: keep-all; }
.os-season__next { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--os-line); font-size: 14px; color: var(--os-mute); }
.os-season__next b { color: var(--os-ink); font-weight: 600; }
@media (max-width: 767px) {
	.os-season, .os-season--row-reverse { grid-template-columns: 1fr; }
	.os-season--row-reverse .os-season__media { order: 0; }
	.os-season__media { min-height: 220px; }
}

/* 키워드 마퀴 */
.os-marquee { overflow: hidden; width: 100%; --os-gap: 40px; --os-speed: 48s; }
.os-marquee__track { display: flex; width: max-content; flex-wrap: nowrap; animation: os-marquee var(--os-speed) linear infinite; }
.os-marquee--right .os-marquee__track { animation-direction: reverse; }
.os-marquee.is-pause:hover .os-marquee__track { animation-play-state: paused; }
.os-marquee__group { display: flex; flex: 0 0 auto; align-items: center; gap: var(--os-gap); padding-right: var(--os-gap); }
.os-marquee__item, .os-marquee__sep { flex: 0 0 auto; min-width: auto; white-space: nowrap; }
.os-marquee__item { font-family: 'Noto Serif KR', serif; font-size: clamp(22px, 2.2vw, 34px); color: var(--os-ink); }
.os-marquee__sep { color: var(--os-clay); }
@keyframes os-marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .os-marquee__track { animation: none; } }

/* 세로쓰기 */
.os-vertical { display: flex; }
.os-vertical__text { margin: 0; font-family: 'Noto Serif KR', serif; line-height: 1.2; letter-spacing: .3em; }
@media (min-width: 1025px) {
	.os-vertical__text { writing-mode: vertical-rl; text-orientation: mixed; }
}
@media (max-width: 1024px) {
	.os-vertical--keep .os-vertical__text { writing-mode: vertical-rl; }
	.os-vertical--hide { display: none; }
}

/* 모바일 하단 퀵바 */
.os-quickbar { display: none; }
.elementor-editor-active .os-quickbar { display: flex; position: static; border-radius: 14px; }
@media (max-width: 767px) {
	.os-quickbar {
		display: flex;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 97;
		padding-bottom: env(safe-area-inset-bottom);
		background: var(--os-ink);
		box-shadow: 0 -8px 24px rgba(29, 35, 32, .14);
	}
	body.os-has-quickbar { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
	.hfe-scroll-to-top-wrap .hfe-scroll-to-top-button { bottom: calc(78px + env(safe-area-inset-bottom)) !important; }
	/* mobileN 백링크(mu-plugin, 인라인 bottom:8px)가 퀵바를 덮지 않게 바 위로 (10-16) */
	body.os-has-quickbar #mn-backlink { bottom: calc(70px + env(safe-area-inset-bottom)) !important; }
}
.os-quickbar__item {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-height: 62px;
	color: #F4F2ED;
	fill: #F4F2ED;
	font-size: 12px;
	font-weight: 500;
	text-decoration: none;
}
.os-quickbar__item:hover, .os-quickbar__item:focus { text-decoration: none; }
.os-quickbar__item.is-accent { background: var(--os-moss); color: #fff; }
.os-quickbar__icon { display: inline-flex; font-size: 18px; line-height: 1; }
.os-quickbar__icon svg { width: 18px; height: 18px; }

/* ==========================================================================
   상담 폼 (Contact Form 7 숏코드 — 위젯 Style 탭이 닿지 않는 서드파티 출력)
   숏코드 위젯의 고급 › CSS 클래스에 os-form 을 준다.
   ========================================================================== */
.os-form .wpcf7-form p { margin: 0 0 20px; }
.os-form .os-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
@media (max-width: 767px) { .os-form .os-row { grid-template-columns: 1fr; } }
.os-form .os-label { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--os-ink-2); }
.os-form input[type="text"], .os-form input[type="tel"], .os-form input[type="email"],
.os-form input[type="date"], .os-form select, .os-form textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 13px 2px;
	border: 0;
	border-bottom: 1px solid #CFC9BE;
	border-radius: 0;
	background: transparent;
	color: var(--os-ink);
	font: inherit;
	font-size: 16px;
	transition: border-color .25s;
}
.os-form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #7D817B 50%), linear-gradient(135deg, #7D817B 50%, transparent 50%); background-position: calc(100% - 14px) 52%, calc(100% - 9px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.os-form input:focus, .os-form select:focus, .os-form textarea:focus { outline: none; border-bottom-color: var(--os-moss); }
.os-form textarea { min-height: 150px; resize: vertical; }
.os-form ::placeholder { color: #767B74; }
.os-form .wpcf7-acceptance .wpcf7-list-item { margin: 0; }
.os-form .wpcf7-acceptance label { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--os-ink-2); cursor: pointer; }
.os-form .wpcf7-acceptance input { width: 22px; height: 22px; flex: 0 0 22px; margin: 0; accent-color: var(--os-moss); }
.os-form .wpcf7-submit {
	appearance: none;
	border: 0;
	border-radius: 999px;
	background: var(--os-moss);
	color: #fff;
	padding: 17px 38px;
	font: inherit;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color .25s, transform .25s;
}
.os-form .wpcf7-submit:hover { background: var(--os-moss-dk); }
.os-form .wpcf7-submit:disabled { opacity: .45; cursor: not-allowed; }
.os-form .wpcf7-not-valid-tip { margin-top: 6px; font-size: 13px; color: var(--os-clay-dk); }
.os-form .wpcf7 form .wpcf7-response-output { margin: 18px 0 0; padding: 14px 18px; border-radius: 12px; font-size: 14px; }
.os-form .wpcf7-spinner { vertical-align: middle; }

/* ---- 키보드 초점: HFE 메뉴 링크는 초점 표시가 없어 보강 (마우스 클릭엔 안 보이게 :focus-visible) ---- */
.hfe-nav-menu a.hfe-menu-item:focus-visible,
.hfe-nav-menu a.hfe-sub-menu-item:focus-visible { outline: 2px solid var(--os-moss); outline-offset: 3px; border-radius: 4px; }
.os-quickbar__item:focus-visible { outline: 2px solid #F4F2ED; outline-offset: -5px; border-radius: 6px; }
#content[role="main"]:focus { outline: none; }
