*,
*::before,
*::after {
	box-sizing: border-box;
}
#header h1,
#header ul { margin: 0; padding: 0; }
/* 헤더 기본 구조 — 고정 헤더의 위치, 둥근 배경, 내부 정렬과 메뉴 배경을 설정합니다. */
.header_wrap { position: fixed; top: 30px; left: 50%; width: calc(100% - 320px); max-width: 1700px; transform: translateX(-50%); border-radius: 500px; background: #fff; z-index: 100; overflow: visible; }
.header_wrap.scrolled {
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.header_menu_bg { position: absolute; top: 0; left: 0; width: 100%; height: 68px; border-radius: inherit; background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0.98) 15%, rgba(255,255,255,0.92) 35%, rgba(255,255,255,0.75) 60%, rgba(255,255,255,0.35) 85%, rgba(255,255,255,0) 100%); opacity: 0; visibility: hidden; pointer-events: none; z-index: 1; }
.header_container { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 30px; width: calc(100% - 60px); max-width: 1700px; height: 68px; margin: 0 auto; z-index: 3; box-sizing: border-box; }

/* 헤더 로고 — 로고의 여백과 이미지 크기를 설정합니다. */
.header_container .logo { flex-shrink: 0; margin-left: 40px; }
.header_container .logo h1 { margin: 0; }
.header_container .logo img { display: block; max-width: 180px; }

/* 헤더 주 메뉴 — 상단 주 메뉴를 가로로 배치하고 각 링크의 크기를 설정합니다. */
.header_container #nav { flex: 1; display: flex; justify-content: center; min-width: 0; }
.header_container #nav .gnb { display: flex; align-items: center; justify-content: center; width: 100%; margin: 0; padding: 0; list-style: none; }
.header_container #nav .gnb > li { position: relative; min-width: 0; text-align: center; }
.header_container #nav .gnb > li > a { display: flex; align-items: center; justify-content: center; width: 188px; height: 52px; color: #222; text-align: center; font-family: Pretendard; font-size: 16px; font-style: normal; font-weight: 600; line-height: 24px; }

/* 헤더 회원 메뉴 — 회원 메뉴 아이콘의 정렬과 클릭 영역을 설정합니다. */
.header_container .member { flex-shrink: 0; }
.header_container .member ul { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; }
.header_container .member ul li a { display: flex; align-items: center; justify-content: center; width:52px; height:52px; }
.header_container .member ul li a img { display: block; object-fit: contain; }

/* 메뉴 열기·닫기 버튼 — 햄버거 버튼의 선과 활성 상태의 닫기 모양을 설정합니다. */
.header_container .menu_btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 24px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; width: 52px; }
.header_container .menu_btn span { display: block; width: 22px; border-radius: 500px; height:2px; background: #656565; transition: transform 0.35s ease; }
.header_container .menu_btn.active span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.header_container .menu_btn.active span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* 헤더 하위 메뉴 — 하위 메뉴의 위치와 항목 스타일, 메뉴를 열었을 때의 표시 상태를 설정합니다. */
.header_container #nav .depth2 { position: absolute; top: 100%; left: 0; display: flex; flex-direction: column; align-items: center; width: 100%; margin: 0; padding: 24px 0 0; list-style: none; visibility: hidden; pointer-events: none; }
.header_container #nav .depth2 li { width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; align-self: stretch; opacity: 0; transform: translateY(20px); }
.header_container #nav .depth2 li a { display: inline-block;  width: 100%; height: 100%;padding: 16px 0;color: #656565; text-align: center; font-family: Pretendard; font-size: 16px; font-style: normal; font-weight: 400; line-height: 100%; white-space: nowrap; transition: color 0.3s ease; }
.header_container #nav .depth2 li a:hover { color: #222; font-weight: 600; }
.header_wrap.menu_open .depth2 { visibility: visible; pointer-events: auto; }
/* 푸터 기본 구조 — 푸터 배경과 내부 여백, 정보 영역의 열 배치를 설정합니다. */
#footer { background: #24272C; color: #fff; }
#footer .container { padding: 68px 20px;margin: 0 auto; width: calc(100% - 320px); max-width: 1700px; }

/* 푸터 상단 — 로고와 안내 링크의 정렬, 간격과 글자 스타일을 설정합니다. */
.footer_top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 36px; }
.footer_logo a { display: block; }
.footer_logo img { display: block; width: 87.801px; height: auto; }
.footer_menu { display: flex; align-items: center; gap: 36px; margin: 0; padding: 0; list-style: none; }
.footer_menu li a { display: block; color: #FFF; font-size: 18px; font-weight: 500; line-height: 26px; letter-spacing: -0.54px; transition: opacity 0.3s ease; }
.footer_menu li a:hover { opacity: 0.5; }

/* 푸터 기본 구조 — 푸터 배경과 내부 여백, 정보 영역의 열 배치를 설정합니다. */
.footer_content { display: grid; grid-template-columns: 1.15fr 0.65fr 1.1fr; gap: 160px; align-items: start; }
.footer_content h4 { color: #A7A7A7; font-family: Pretendard; font-size: 15px; font-style: normal; font-weight: 400; line-height: 24px; letter-spacing: -0.45px; margin-bottom: 8px; }

/* 푸터 운영 및 사업자 정보 — 진료 시간, 휴진 안내와 사업자 정보의 배치 및 글자를 설정합니다. */
.footer_time { display: flex; flex-direction: column; gap: 8px; }
.footer_time dl { display: flex; align-items: center; margin: 0; }
.footer_time dt { min-width: 60px; color: #FFF; font-family: Pretendard; font-size: 18px; font-style: normal; font-weight: 300; line-height: 24px; letter-spacing: -0.54px; }
.footer_time dd { color: #FFF; text-align: center; font-family: Pretendard; font-size: 18px; font-style: normal; font-weight: 500; line-height: 24px; letter-spacing: -0.54px; }
.footer_holiday { margin-top: 8px; display: flex; align-items: center; gap: 5px; color: #FFF; text-align: center; leading-trim: both; text-edge: cap; font-family: Pretendard; font-size: 16px; font-style: normal; font-weight: 400; line-height: 24px; letter-spacing: -0.48px; }
.footer_holiday span { color: #24272C; text-align: center; font-family: Pretendard; font-size: 12px; font-style: normal; font-weight: 400; line-height: 20px; letter-spacing: -0.36px; display: flex; padding: 0 10px; justify-content: center; align-items: center; gap: 10px; border-radius: 500px; background: #B7BCC2; }
.footer_company { margin-top: 32px; display: flex; flex-direction: column; gap: 4px; }
.footer_company p { color: #A7A7A7; font-family: Pretendard; font-size: 13px; font-style: normal; font-weight: 400; line-height: 16px; letter-spacing: -0.39px; }

/* 푸터 연락처 — 전화번호와 카카오 상담 버튼의 크기 및 모양을 설정합니다. */
.footer_tel { display: inline-block; color: #FFF; font-family: Pretendard; font-size: 28px; font-style: normal; font-weight: 600; line-height: 100%; letter-spacing: -0.84px; transition: opacity 0.3s ease; }
.footer_tel:hover { opacity: 0.7; }
.footer_kakao { margin-top: 28px; display: flex; width: 220px; height: 52px; justify-content: center; align-items: center; gap: 5px; border-radius: 5px; border: 1px solid #FFD153; color: #FFF; text-align: center; font-family: Pretendard; font-size: 16px; font-style: normal; font-weight: 600; line-height: 24px; letter-spacing: -0.48px; transition: background 0.3s ease, color 0.3s ease; }

/* 푸터 지도 — 지도 영역의 비율, 모서리와 내부 프레임 크기를 설정합니다. */
.footer_map { display: block; width: 100%; aspect-ratio: 557 / 172; overflow: hidden; border-radius: 4px; background: #333; }
.footer_map iframe { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }

/* 전체 메뉴 기본 상태 — 넓은 화면에서는 메뉴 패널의 별도 상자를 만들지 않고 모바일 전용 영역을 숨깁니다. */
.header_menu_panel { display: contents; }
.mobile_menu_top, .mobile_menu_bottom { display: none; }

/* 헤더 키보드 포커스 — 키보드로 이동한 링크와 버튼에 테두리를 표시합니다. */
.header_wrap a:focus-visible, .header_wrap button:focus-visible { outline: 2px solid #263247; outline-offset: -3px; }

@media (max-width: 1600px) {
		/* 푸터 — 이 화면 너비에 맞춰 푸터의 열 배치, 여백, 글자와 지도 크기를 조정합니다. */
		.footer_content { gap: 40px; }/* 공통 레이아웃 — 콘텐츠 영역의 너비와 상하좌우 여백을 설정합니다. */
		#footer .container { width: calc(100% - 80px); }
}
/* ==================================================
	 1200px 이하 · 컴팩트 헤더
================================================== */
@media (max-width: 1200px) {

		/* 메인 배너 — 대표 이미지의 크기와 표시 위치, 배너 문구와 버튼을 설정합니다. */
		.main_hero .img { height: 640px; }
		.main_hero .img img { display: block; object-fit: cover; object-position: center; }
		.main_hero .txt { left: 40px; right: 40px; }
		.main_hero .txt h3 { font-size: 48px; line-height: 1.2; }
		.main_hero .txt p { font-size: 18px; line-height: 1.5; }

		/* 미디어 탭 — 미디어 탭 링크의 글자 크기를 조정합니다. */
		.media_tab li a { font-size:18px; }

		/* 푸터 — 이 화면 너비에 맞춰 푸터의 열 배치, 여백, 글자와 지도 크기를 조정합니다. */
		.footer_menu { flex-wrap: wrap; gap: 12px 20px; }
		#footer { padding: 0; }

		/* 헤더 및 전체 메뉴 — 이 화면 너비에서 헤더 크기와 메뉴 표시 방식을 조정합니다. */
		#header { --header-height: 68px; height: var(--header-height); }
		.header_wrap { top: 0; left: 0; width: 100%; max-width: none; border-radius: 0; transform: none; }
		.header_container { width: 100%; height: var(--header-height); padding: 0 20px; gap: 16px; }
		.header_container .logo { margin-left: 0; }
		.header_container .logo img { width: 70px; max-height: 32px; }
		.header_container .member { position: relative; z-index: 6; margin-left: auto; }
		.header_container .member .mypage { display: none; }
		.header_container .member ul { gap: 0; }
		.header_container .member ul li a { width: 40px; height: 44px; }
		.header_container .member ul li a img { filter: brightness(0) saturate(100%) invert(13%); }
		.header_container .menu_btn { width: 30px; height: 44px; align-items: flex-end; }
		.header_container .menu_btn span { width: 18px; background: #222; }
		.header_menu_bg { display: none; }
		.header_menu_panel { position: fixed; inset: 0; z-index: 5; display: flex; flex-direction: column; height: 100vh; height: 100dvh; background: #fff; opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(16px); transition: opacity .24s ease, transform .28s cubic-bezier(.22,1,.36,1), visibility 0s linear .28s; }
		.header_wrap.menu_open .header_menu_panel { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); transition-delay: 0s; }
		.header_wrap.menu_open .logo, .header_wrap.menu_open .member .lang { visibility: hidden; }
		.mobile_menu_top { display: flex; align-items: center; flex: 0 0 var(--header-height); padding: 0 64px 0 16px; }
		.mobile_menu_util { display: flex; align-items: center; gap: 5px; }
		.mobile_menu_util a { display: flex; align-items: center; justify-content: center; height: 21px; padding: 0 9px; border: 1px solid #999; border-radius: 50px; color: #7A7A7A; font-size: 12px; font-weight: 400; line-height: 1; }
		.header_container #nav { display: block; position: static; flex: 1 1 0; min-height: 0; width: 100%; padding: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; background: #fff; }
		.header_container #nav .gnb { display: block; width: 100%; padding: 0; }
		.header_container #nav .gnb > li { width: 100%; padding: 0; margin: 0; border-bottom: 1px solid #F4F6F7; text-align: left; }
		.header_container #nav .gnb > li > a { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 56px; height: auto; padding: 16px; color: #222; font-size: 16px; font-weight: 600; line-height: 24px; text-align: left; }
		.header_container #nav .gnb > li > a::after { content: ''; width: 6px; height: 6px; flex-shrink: 0; margin-right: 8px; border-right: 1px solid #888; border-bottom: 1px solid #888; transform: rotate(45deg); transition: transform .26s ease; }
		.header_container #nav .gnb > li.active > a { color: #1E293B; }
		.header_container #nav .gnb > li.active > a::after { transform: rotate(225deg); }
		.header_container #nav .depth2 { position: static; display: block; width: 100%; height: 0; margin: 0; padding: 0; overflow: hidden; background: #F4F6F7; visibility: visible; pointer-events: auto; }
		.header_container #nav .depth2 li { display: block; width: 100%; padding: 0; margin: 0; opacity: 1; transform: none; }
		.header_container #nav .depth2 li:first-child { padding-top: 20px; }
		.header_container #nav .depth2 li:last-child { padding-bottom: 20px; }
		.header_container #nav .depth2 li a { display: flex; align-items: center; width: 100%; min-height: 36px; padding: 0 16px; color: #656565; font-size: 15px; font-weight: 400; line-height: 24px; letter-spacing: -0.45px; text-align: left; white-space: normal; }
		.header_container #nav .depth2 li a:hover, .header_container #nav .depth2 li a:focus-visible { color: #263247; font-weight: 500; }
		.mobile_menu_bottom { display: flex; flex: 0 0 auto; padding: 12px 20px calc(22px + env(safe-area-inset-bottom, 0px)); background: #fff; }
		.mobile_quick { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 48px; border-radius: 50px; background: #ffd453; color: #222; font-size: 16px; font-weight: 600; line-height: 24px; }
		.mobile_quick .kakao_icon { display: flex; align-items: center; justify-content: center; padding-top: 1px; }
		.header_container #nav .gnb > li.single_depth > a::after, .header_container #nav .gnb > li:has(> .depth2 > li:only-child) > a::after { display: none; }
}

/* ==================================================
	 1024px 이하 · 태블릿
================================================== */
@media (max-width: 1024px) {

		/* 푸터 — 이 화면 너비에 맞춰 푸터의 열 배치, 여백, 글자와 지도 크기를 조정합니다. */
		.footer_content { grid-template-columns: 1fr 1fr; }
		.footer_location { grid-column: 1 / -1; }
		.footer_map { height: 220px; }
		.footer_menu li a { font-size: 12px; }

		/* 공간 소개 슬라이더 — 제목과 이동 버튼, 슬라이드 이미지 및 스크롤바의 크기와 간격을 조정합니다. */
		.place_swiper .swiper-slide img { aspect-ratio: 370 / 247; }

		/* 의료진 목록 — 카드 목록의 배치와 간격, 의료진 이름과 직함을 설정합니다. */
		.main_doctor .dr_list { gap: 16px; }
		.main_doctor .dr_list > li .tit h4 { font-size: 18px; }
		.main_doctor .dr_list > li .tit em { font-size: 14px; }

		/* 의료진 상세 모달 — 작은 화면에 맞춰 모달 배치, 이미지, 여백과 상세 글자 크기를 조정합니다. */
		.doctor_modal_info { padding: 52px 28px 36px; }
}

/* ==================================================
	 768px 이하 · 모바일
================================================== */
@media (max-width: 768px) {
	.footer_top { flex-direction: column; }

		/* 푸터 — 이 화면 너비에 맞춰 푸터의 열 배치, 여백, 글자와 지도 크기를 조정합니다. */

	/* 푸터 — 이 화면 너비에 맞춰 푸터의 열 배치, 여백, 글자와 지도 크기를 조정합니다. */
	#footer { padding: 0; }
	#footer .container { width: 100%; padding: 40px 16px; }
	.footer_top { gap: 20px; margin-bottom: 20px; }
	.footer_logo img { width: 76px; }
	.footer_menu { gap: 8px 12px; }
	.footer_menu li a { font-size: 12px; line-height: 18px; }
	.footer_content { grid-template-columns: minmax(0, 1fr); gap: 28px; }
	.footer_content h4 { font-size: 13px; line-height: 20px; letter-spacing: -0.39px; margin-bottom:6px; }
	.footer_time { gap: 8px; }
	.footer_time dt { min-width: 50px; font-size: 13px; line-height: 22px; }
	.footer_time dd { margin: 0; font-size: 14px; line-height: 22px; }
	.footer_holiday { flex-wrap: wrap; font-size: 12px; line-height: 20px; text-align: left; margin-top: 6px; }
	.footer_holiday span { font-size: 10px; padding: 0 8px; }
	.footer_company { margin-top: 20px; }
	.footer_company p { font-size: 11px; line-height: 15px; letter-spacing: -0.33px; overflow-wrap: anywhere; }
	.footer_tel { font-size: 24px; }
	.footer_kakao { margin-top: 16px; width: 100%; max-width: 240px; height: 44px; font-size: 14px; }
	.footer_location { grid-column: auto; }
	.footer_map { height: auto; aspect-ratio: 16 / 9; }
	
	/* 푸터 모바일 표시 — 모바일에서는 연락처와 위치 안내 영역을 숨깁니다. */
	.footer_contact, .footer_location { display: none; }

		/* 헤더 및 전체 메뉴 — 이 화면 너비에서 헤더 크기와 메뉴 표시 방식을 조정합니다. */
		#header { --header-height: 56px; }
		.header_container { padding: 0 16px; gap: 12px; }
		.header_container .logo img { width: 52px; height: auto; }
		.header_container .member ul li a { width: 36px; }
		.header_container .menu_btn { width: 26px; padding-right: 4px; }

}/* ==================================================
	 접근성 · 모션 최소화
================================================== */
@media (prefers-reduced-motion: reduce) {

		/* 헤더 모션 최소화 — 메뉴 패널, 햄버거 선과 하위 메뉴 화살표의 전환 효과를 끕니다. */
		.header_menu_panel, .header_container .menu_btn span, .header_container #nav .gnb > li > a::after { transition: none; }
}
@media (min-width: 1201px) {
	.header_container #nav {
		position: absolute;
		left: 50%;
		transform: translateX(-50%);
		width: max-content;
	}
	
	.header_container #nav .gnb {
		width: auto;
	}
	
	.header_container #nav .gnb > li {
		flex: 0 0 188px;
	}
		.header_wrap.menu_open .header_container #nav .depth2 {
				visibility: visible;
				pointer-events: auto;
		}
}
/* PC 개별 드롭다운: 햄버거 전체 메뉴 스타일과 분리합니다. */
@media (min-width: 1201px) {
		.header_wrap:not(.menu_open) .header_container #nav .depth2 {
				top: calc(100% + 20px);
				left: 50%;
				width: 204px;
				padding: 10px 0;
				border-radius: 12px;
				background: #fff;
				box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
				opacity: 0;
				visibility: hidden;
				pointer-events: none;
				transform: translate(-50%, 6px);
				transition: opacity .18s ease, transform .18s ease, visibility .18s;
		}
		/* 헤더와 박스 사이에서도 마우스가 끊기지 않도록 연결합니다. */
		.header_wrap:not(.menu_open) .header_container #nav .depth2::before {
				content: '';
				position: absolute;
				left: 0;
				right: 0;
				top: -20px;
				height: 20px;
		}
		.header_wrap:not(.menu_open) .header_container #nav .gnb > li.dropdown_open > .depth2 {
				opacity: 1;
				visibility: visible;
				pointer-events: auto;
				transform: translate(-50%, 0);
		}
		.header_wrap:not(.menu_open) .header_container #nav .depth2 li {
				opacity: 1;
				transform: none;
		}
		.header_wrap:not(.menu_open) .header_container #nav .depth2 li a {
				display: flex;
				align-items: center;
				justify-content: center;
				min-height: 48px;
				padding: 12px 16px;
				line-height: 24px;
		}
}
@media (prefers-reduced-motion: reduce) {
		.header_wrap:not(.menu_open) .header_container #nav .depth2 { transition: none; }
}
