/* 미디어쿼리별 정리본: 선택자 및 최종 선언값 유지. 각 선택자의 선언은 한 줄로 작성합니다. */
/* max-width 조건은 누적 적용됩니다. 767px와 768px 분기는 원본대로 구분합니다. */

/* ==================================================
	 공통 스타일 · 모든 화면
================================================== */

/* 초기화 — 모든 요소의 기본 여백을 없애고 크기 계산 기준을 통일합니다. */
* { margin: 0; padding: 0; box-sizing: border-box; vertical-align: top; }

/* 공통 레이아웃 — 콘텐츠 영역의 너비와 상하좌우 여백을 설정합니다. */
.container { padding: 100px 20px; margin: 0 auto; width: calc(100% - 320px); max-width: 1700px; }

/* 공통 섹션 제목 — 섹션 제목과 더보기 링크의 배치, 글자 크기, 화살표를 설정합니다. */
.main_tit { width: 100%; display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.main_tit h3 { color: #222; font-size: 36px; font-weight: 700; line-height: 54px; }
.main_tit .link a { display: flex; padding: 14px 44px 14px 24px; justify-content: center; align-items: center; gap: 10px; color: #656565; font-size: 16px; font-weight: 500; line-height: 24px; border-radius: 500px; border: 1px solid #7A7A7A; position: relative; overflow: hidden; isolation: isolate; transition: color 0.5s ease, border-color 0.5s ease; }
.main_tit .link a::before { position: absolute; content: ""; right: 20px; top: 50%; transform: translateY(-50%); background-image: url("/img/main/main_link_arrow.svg"); width: 6px; height: 10px; background-repeat: no-repeat; background-size: contain; transition: right 0.4s cubic-bezier(0.22, 1, 0.36, 1), filter 0.4s ease; }
.main_tit .link a:hover::after { transform: translateY(0); }
.main_tit .link a:hover::before { right: 16px; }
/* 최고관리자 전용 글쓰기 버튼 — View More 옆에 진한 색으로 표시합니다. */
.main_tit .link { display: flex; align-items: center; gap: 8px; }
.main_tit .link a.btn_admin_write { padding: 14px 24px; background: #1E293B; border-color: #1E293B; color: #fff; }
.main_tit .link a.btn_admin_write::before { display: none; }
.main_tit .link a.btn_admin_write:hover { background: #334155; border-color: #334155; }



/* 메인 배너 — 대표 이미지의 크기와 표시 위치, 배너 문구와 버튼을 설정합니다. */
#main { width: 100%; }
.main_hero { width: 100%; position: relative; }
.main_hero .img img { width: 100%; height: 100%; }
.main_hero .txt { position: absolute; left: calc((100% - min(1700px, 100% - 320px)) / 2); top: 50%; transform: translateY(-50%); }
.main_hero .txt span { color: #FFF; font-size: 20px; font-weight: 700; line-height: 28px; }
.main_hero .txt h3 { color: #FFF; font-size: 60px; font-weight: 600; line-height: 68px; letter-spacing: -1.8px; margin: 16px 0 32px; }
.main_hero .txt p { color: #FFF; font-size: 24px; font-weight: 400; line-height: 32px; letter-spacing: -0.72px; }
.main_hero .txt a { margin-top: 48px; width: max-content; display: flex; padding: 14px 20px 14px 24px; justify-content: center; align-items: center; gap: 10px; border-radius: 500px; border: 1px solid #FFF; color: #FFF; font-size: 16px; font-weight: 500; line-height: 24px; }
.main_hero .txt a img { width: 6px; height: 10px; flex-shrink: 0; }

.media_content { margin-top: 40px; }
/* 의료진 목록 — 카드 목록의 배치와 간격, 의료진 이름과 직함을 설정합니다. */
.main_doctor ul { display: flex; align-items: center; gap: 24px; }
.main_doctor ul li { width: calc(100% / 4 - 12px); display: flex; flex-direction: column; gap: 16px; }
.main_doctor ul li .tit { display: flex; align-items: flex-end; gap: 4px; }
.main_doctor ul li .tit h4 { color: #222; font-size: 20px; font-weight: 600; line-height: 28px; }
.main_doctor ul li .tit em { color: #222; font-size: 16px; font-weight: 400; line-height: 28px; }
.main_doctor .dr_list { display: flex; align-items: flex-start; gap: 24px; padding: 0; margin: 0; list-style: none; }
.main_doctor .dr_list > li { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

/* 의료진 카드 이미지 — 카드 버튼의 기본 모양과 이미지 크기, 모서리, 전환 효과를 설정합니다. */
.dr_card { display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; text-align: left; appearance: none; }
.dr_card .img { position: relative; width: 100%; overflow: hidden; border-radius: 10px; background: #e0e3e7; isolation: isolate; }
.dr_card .img > img { display: block; width: 100%; height: auto; transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); transform-origin: center bottom; }
.dr_card .img::after { content: ""; position: absolute; inset: 0; background: rgba(20, 30, 47, 0); pointer-events: none; transition: background 0.5s ease; }

/* 의료진 카드 플러스 아이콘 — 카드 우측 상단의 원형 아이콘과 플러스 선을 설정합니다. */
.dr_plus { align-items: center; justify-content: center; position: absolute; top: 15px; right: 15px; z-index: 2; display: block; width: 28px; height: 28px; border-radius: 50%; background: #1e293b; transition: none; }
.dr_plus span { position: absolute; display: block; background: #fff; border-radius: 2px; }
.dr_plus span:first-child { width: 11px; height: 1.5px; }
.dr_plus span:last-child { width: 1.5px; height: 11px; }

/* 의료진 목록 — 카드 목록의 배치와 간격, 의료진 이름과 직함을 설정합니다. */
.main_doctor .dr_list > li .tit { display: flex; align-items: flex-end; gap: 4px; }
.main_doctor .dr_list > li .tit h4 { margin: 0; color: #222; font-size: 20px; font-weight: 600; line-height: 28px; }
.main_doctor .dr_list > li .tit em { color: #222; font-size: 16px; font-weight: 400; font-style: normal; line-height: 28px; }


/* 의료진 카드 플러스 아이콘 — 카드 우측 상단의 원형 아이콘과 플러스 선을 설정합니다. */
.dr_plus::before, .dr_plus::after { content: ""; position: absolute; top: 50%; left: 50%; display: block; background: #fff; border-radius: 2px; transform: translate(-50%, -50%); }
.dr_plus::before { width: 11px; height: 1px; }
.dr_plus::after { width: 1px; height: 11px; }




/* 공간 소개 제목 — 공간 소개 영역의 기준 위치와 제목 줄 배치를 설정합니다. */
.main_place .container { position: relative; }
.main_place .main_tit { display: flex; align-items: center; justify-content: space-between; margin-bottom: 40px; }

/* 공간 소개 이동 버튼 — 이전·다음 화살표와 호버 및 비활성 상태를 설정합니다. */
.place_arrow { display: flex; align-items: center; gap: 30px; }
.place_arrow button { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; transition: opacity 0.3s ease; }
.place_arrow button::before { content: ""; display: block; width: 7px; height: 7px; border-top: 1px solid #333; border-right: 1px solid #333; transition: border-color 0.3s ease; }
.place_arrow .place_prev::before { transform: rotate(-135deg); }
.place_arrow .place_next::before { transform: rotate(45deg); }
.place_arrow button:hover { opacity: 0.5; }
.place_arrow button.swiper-button-disabled { opacity: 0.3; cursor: default; }

/* 공간 소개 슬라이드 — 슬라이더의 확장 너비와 이미지 비율, 잘림 및 모서리를 설정합니다. */
.place_swiper_wrap { width: calc(100% + (100vw - 100%) / 2); }
.place_swiper { width: 100%; overflow: hidden; }
.place_swiper .swiper-slide { overflow: hidden; border-radius: 10px; }
.place_swiper .swiper-slide img { display: block; width: 100%; aspect-ratio: 370 / 247; object-fit: cover; }

/* 공간 소개 스크롤바 — 슬라이더 하단 스크롤바의 너비, 색상과 드래그 표시를 설정합니다. */
.place_scrollbar { position: relative; width: calc(100% - (100vw - 100%) / 2); height: 2px; margin-top: 40px; background: #ddd; }
.place_scrollbar .swiper-scrollbar-drag { height: 100%; background: #333; border-radius: 0; cursor: grab; }



/* ==================================================
	 1600px 이하
================================================== */
@media (max-width: 1600px) {

		/* 공통 레이아웃 — 콘텐츠 영역의 너비와 상하좌우 여백을 설정합니다. */
		.container { width: calc(100% - 80px); }

		/* 메인 배너 — 대표 이미지의 크기와 표시 위치, 배너 문구와 버튼을 설정합니다. */
		.main_hero .txt { left: 60px; }

}

/* ==================================================
	 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; }


		
}

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

		

		/* 공간 소개 슬라이더 — 제목과 이동 버튼, 슬라이드 이미지 및 스크롤바의 크기와 간격을 조정합니다. */
		.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; }

}

/* ==================================================
	 768px 이하 · 모바일
================================================== */
@media (max-width: 768px) {


		/* 공통 레이아웃 — 콘텐츠 영역의 너비와 상하좌우 여백을 설정합니다. */
		.container { width: 100%; max-width: none; padding: 60px 16px; }
		.container.pt20 { padding-top: 20px !important; }

		/* 공통 섹션 제목 — 섹션 제목과 더보기 링크의 배치, 글자 크기, 화살표를 설정합니다. */
		.main_tit { align-items: flex-start; flex-direction: column; gap: 16px; margin-bottom: 32px; }
		.main_tit h3 { font-size: 28px; line-height: 34px; word-break: keep-all; }
		.main_tit .link a { min-height: 36px; padding: 7px 38px 7px 20px; font-size: 12px; line-height: 20px; }
		.main_tit .link a::before { right: 18px; }
		.main_tit .link a.btn_admin_write { padding: 7px 20px; }

		/* 메인 배너 — 대표 이미지의 크기와 표시 위치, 배너 문구와 버튼을 설정합니다. */
		.main_hero .img { height: clamp(500px, 164vw, 720px); }
		.main_hero .img img { object-position: 65% center; }
		.main_hero .txt { top: 50%; left: 16px; right: 16px;}
		.main_hero .txt span { font-size: 11px; line-height: 16px; }
		.main_hero .txt h3 { font-size: clamp(34px, 9vw, 48px); line-height: 1.2; letter-spacing: -0.04em; margin: 12px 0 22px; }
		.main_hero .txt p { font-size: 13px; line-height: 1.5; letter-spacing: -0.03em; word-break: keep-all; }
		.main_hero .txt a { margin-top: 24px; padding: 7px 16px; gap: 10px; font-size: 12px; line-height: 20px; }

		/* 의료진 목록 — 카드 목록의 배치와 간격, 의료진 이름과 직함을 설정합니다. */
		.main_doctor .dr_list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
		.main_doctor .dr_list > li { width: 100%; min-width: 0; gap: 8px; }
		.main_doctor .dr_list > li .tit { gap: 3px; flex-wrap: wrap; }
		.main_doctor .dr_list > li .tit h4 { font-size: 14px; line-height: 20px; }
		.main_doctor .dr_list > li .tit em { font-size: 12px; line-height: 20px; }

		/* 의료진 카드 이미지 — 카드 버튼의 기본 모양과 이미지 크기, 모서리, 전환 효과를 설정합니다. */
		.dr_card .img { border-radius: 8px; }

		/* 의료진 카드 플러스 아이콘 — 카드 우측 상단의 원형 아이콘과 플러스 선을 설정합니다. */
		.dr_plus { top: 10px; right: 10px; width: 25px; height: 25px; }


		/* 공간 소개 슬라이더 — 제목과 이동 버튼, 슬라이드 이미지 및 스크롤바의 크기와 간격을 조정합니다. */
		.main_place .main_tit { flex-direction: row; align-items: flex-end; gap: 20px; margin-bottom: 28px; }
		.main_place .main_tit h3 { max-width: 190px; }
		.place_arrow { gap: 12px; flex-shrink: 0; }
		.place_arrow button { width: 32px; height: 36px; }
		.place_swiper_wrap { width: calc(100% + 16px); }
		.place_scrollbar { width: calc(100% - 16px); margin-top: 28px; }
		.place_swiper .swiper-slide { border-radius: 8px; }

		

	
}

/* ==================================================
	 767px 이하 · 의료진 세부 스타일
================================================== */
@media (max-width: 768px) {

		/* 의료진 목록 — 카드 목록의 배치와 간격, 의료진 이름과 직함을 설정합니다. */
		.main_doctor .dr_list { flex-wrap: wrap; gap: 20px 16px;}
		.main_doctor .dr_list > li { flex: 0 0 calc(50% - 6px); }

}

/* ==================================================
	 마우스 호버 지원 기기
================================================== */
@media (hover: hover) {

		/* 의료진 카드 호버 효과 — 호버를 지원하는 기기에서 카드 이미지를 확대하고 옅은 배경을 덧씌웁니다. */
		.dr_card:hover .img > img { transform: scale(1.035); }
		.dr_card:hover .img::after { background: rgba(20, 30, 47, 0.045); }
}

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

		.dr_card .img > img, .dr_plus { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }

	
}
/* 히어로 Swiper — 기존 반응형 스타일 뒤에 추가 */
.main_hero { overflow: hidden; }
.main_hero .hero_swiper { width: 100%; overflow: hidden; }
.main_hero .hero_swiper .swiper-slide { position: relative; height: auto; overflow: hidden; }
.main_hero .hero_swiper .img { height: clamp(440px, 50vw, 960px); }
.main_hero .hero_swiper .img > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.main_hero .txt { z-index: 2; }
.main_hero:not(.hero_gsap) .hero_swiper.swiper-initialized .txt > * { opacity: 0; transform: translateY(24px); }
.main_hero:not(.hero_gsap) .hero_swiper.swiper-initialized .hero_text_active .txt > * { animation: hero_text_up 1s cubic-bezier(.25,.46,.45,.94) both; }
.main_hero .hero_text_active .txt > :nth-child(1) { animation-delay: .1s !important; }
.main_hero .hero_text_active .txt > :nth-child(2) { animation-delay: .2s !important; }
.main_hero .hero_text_active .txt > :nth-child(3) { animation-delay: .3s !important; }
.main_hero .hero_text_active .txt > :nth-child(4) { animation-delay: .4s !important; }
@keyframes hero_text_up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1200px) {
		.main_hero .hero_swiper .img { height: 640px; }
}
@media (max-width: 768px) {
		.main_hero .hero_swiper .img { height: auto; aspect-ratio: 320 / 420; }
}
@media (prefers-reduced-motion: reduce) {
		.main_hero .hero_swiper.swiper-initialized .txt > * { animation: none !important; opacity: 1; transform: none; }
}

/* 배경 전환은 Swiper, 내부 텍스트와 이미지는 GSAP이 제어합니다. */
.main_hero .hero_swiper .swiper-wrapper { transition-timing-function: cubic-bezier(.4,0,.2,1); }
.main_hero .hero_swiper .img { overflow: hidden; }
.main_hero .hero_swiper .img > img { transform-origin: center; }

/* 의료진 모달 — 기존 클래스명 및 .active 열기 방식 유지 */
.doctor_modal, .doctor_modal * { box-sizing: border-box; }
.doctor_modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px 16px; visibility: hidden; pointer-events: none; transition: visibility 0s linear 0.25s; }
.doctor_modal.active { visibility: visible; pointer-events: auto; transition: visibility 0s; }
.doctor_modal_dim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); opacity: 0; transition: opacity 0.25s ease; }
.doctor_modal.active .doctor_modal_dim { opacity: 1; }

/* 모달 콘텐츠 */
.doctor_modal_content { position: relative; z-index: 2; width: 100%; max-width: 960px; max-height: calc(100dvh - 40px); padding: 52px 36px; border: 0; border-radius: 16px; background: #fff; color: #222; overflow: auto; overscroll-behavior: contain; opacity: 0; transform: translateY(12px); transition: opacity 0.25s ease, transform 0.25s ease; }
.doctor_modal.active .doctor_modal_content { opacity: 1; transform: translateY(0); }
.doctor_modal_inner { display: grid; grid-template-columns: 372px minmax(0, 1fr); align-items: center; gap: 44px; width: 100%; max-height: none; overflow: visible; }

/* 의료진 사진 */
.doctor_modal_img { position: relative; width: 100%; height: auto; min-height: 0; align-self: auto; border-radius: 12px; background: #dfe1e4; overflow: hidden; }
.doctor_modal_img img { position: static; display: block; width: 100%; height: auto; max-height: none; aspect-ratio: 372 / 440; object-fit: cover; object-position: center top; }

/* 이름 및 약력 */
.doctor_modal_info { min-width: 0; padding: 0; }
.doctor_modal_label { display: none; }
.doctor_modal_name { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px; margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid #e6e6e6; }
.doctor_modal_name h3 { margin: 0; color: #222; font-size: 20px; font-weight: 700; line-height: 1.5; letter-spacing: normal; }
.doctor_modal_name span { color: #222; font-size: 16px; font-weight: 400; }
.doctor_modal_line { display: none; }
.doctor_modal_history h4 { display: none; }
.doctor_modal .doctor_modal_history ul { display: flex; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 0; list-style: none; }
.doctor_modal .doctor_modal_history ul li { position: relative; display: block; width: 100%; margin: 0; padding: 2px 0 2px 22px; color: #222; font-size: 14px; font-weight: 400; line-height: 20px; word-break: keep-all; overflow-wrap: anywhere; }
.doctor_modal .doctor_modal_history ul li::before { content: ""; position: absolute; top: 12px; left: 8.5px; width: 3px; height: 3px; border-radius: 50%; background: #919191; transform: translateY(-50%); }
.doctor_modal .doctor_modal_history ul.modal_societies { margin-top: 20px; }
.doctor_modal .doctor_modal_history ul.modal_societies li { color: #7a7a7a; }
.doctor_modal .doctor_modal_history ul[hidden] { display: none; }

/* 닫기 버튼 */
.doctor_modal_close { position: absolute; top: 20px; right: 23px; z-index: 10; display: grid; place-items: center; width: 36px; height: 36px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: #202c3d; cursor: pointer; }
.doctor_modal_close span { display: none; }
.doctor_modal_close::before, .doctor_modal_close::after { content: ""; position: absolute; width: 14px; height: 2px; border-radius: 1px; background: #fff; transform: rotate(45deg); }
.doctor_modal_close::after { transform: rotate(-45deg); }
.doctor_modal_close:hover { background: #202c3d; transform: none; }
.doctor_modal_close:focus-visible { outline: 3px solid #496580; outline-offset: 4px; }

/* 모달 태블릿 */
@media (max-width: 900px) {
	.doctor_modal_inner { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 28px; }
}

/* 모달 모바일 */
@media (max-width: 767px) {
	.doctor_modal { padding: 20px 24px; }
	.doctor_modal_content { width: 100%; max-width: 360px; max-height: calc(100dvh - 40px); padding: 48px 0 0; border-radius: 0; background: transparent; overflow: visible; }
	.doctor_modal_close { top: 0; right: 0; }
	.doctor_modal_inner { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 16px; max-height: calc(100dvh - 88px); padding: 16px; border-radius: 16px; background: #fff; overflow-y: auto; overscroll-behavior: contain; }
	.doctor_modal_img { width: 100%; height: auto; min-height: 0; margin-inline: auto; }
	.doctor_modal_img img { width: 100%; height: auto; max-height: none; }
	.doctor_modal_info { padding: 0; }
	.doctor_modal_name h3 { font-size: 18px; }
	.doctor_modal_name span { font-size: 14px; }
	.doctor_modal .doctor_modal_history ul { gap: 0; }
	.doctor_modal .doctor_modal_history ul li { padding: 2px 0; font-size: 14px; line-height: 20px; }
	.doctor_modal .doctor_modal_history ul li::before { display: none; }
}

/* 모달 모션 최소화 */
@media (prefers-reduced-motion: reduce) {
	.doctor_modal, .doctor_modal * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
