/* ============================================================
   반응형 보정 레이어 (복제본 자체 추가분)

   원본 사이트는 반응형이 아니다. 미디어쿼리가 @media(min-width:720px)
   하나뿐이고 .contain 이 width:1200px 고정폭이라, 좁은 화면에서
   가로 스크롤이 생기고 상단 메뉴가 사라진 채 대체 메뉴도 없다.

   원본 CSS(basic.css / default.css)는 손대지 않고 이 파일만 뒤에 얹어
   덮어쓴다. 되돌리려면 build-public.js 의 injectResponsive() 만 빼면 된다.

   브레이크포인트
     ~1024px : 유동 레이아웃 + 햄버거 메뉴 + 퀵메뉴 하단 바
      ~719px : 폰트/여백 축소, 폼 세로 스택
   ============================================================ */

/* ── 공통: 가로 넘침 차단 ───────────────────────────────── */
html, body { max-width: 100%; overflow-x: hidden; }
img, video { max-width: 100%; }

/* 모바일 메뉴의 표시 여부는 이 파일 맨 아래 '표시 제어' 블록에서 한 번에 정한다.
   (여기서 display 를 정하면 아래 컴포넌트 블록이 나중에 나와서 덮어써 버린다) */

/* ============================================================
   ~1279px : 고정폭 컨테이너를 유동으로
   ============================================================ */
@media (max-width: 1279px) {
	.contain { width: 100%; max-width: 1200px; padding-left: 1.25rem; padding-right: 1.25rem; }
	#boxTop { min-width: 0; }
	#boxMain { min-width: 0; }

	/* 프리미엄 슬라이더 화살표가 translateX(±680px) 로 화면 밖에 나가 있음 */
	#boxPremium .swiper-button-prev { left: 1rem; right: auto; transform: none; }
	#boxPremium .swiper-button-next { right: 1rem; left: auto; transform: none; }
}

/* ============================================================
   ~1024px : 햄버거 메뉴 + 퀵메뉴 하단 바
   ============================================================ */
@media (max-width: 1024px) {
	/* 데스크톱 드롭다운 메뉴 숨기고 햄버거로 대체 (햄버거 표시는 맨 아래에서) */
	#boxTop #boxMenu { display: none; }

	/* 퀵메뉴가 오른쪽 90px 를 먹던 만큼의 여백 제거 */
	#boxTop #boxTel { padding: 0 1rem 0 0; }
	#boxTop #boxTel strong { font-size: 1.25rem; }
	#boxTop .logo { padding: 0 1rem; }
	#boxTop .logo img { height: 2.4rem; }

	/* 퀵메뉴: 우측 세로바 → 하단 가로바 */
	#boxQuick {
		width: 100%; height: auto; top: auto; bottom: 0; right: 0;
		flex-direction: row;
		box-shadow: 0 -2px 10px rgba(0,0,0,.15);
		padding-bottom: env(safe-area-inset-bottom);
	}
	#boxQuick > .flexbox { flex-direction: row; width: 100%; }
	#boxQuick a { flex: 1; font-size: .75rem; padding: .5rem 0; }
	#boxQuick a:not(.home) { border-bottom: 0; border-right: 1px solid #eee; padding: .6rem 0; }
	#boxQuick a.home { height: auto; padding: .6rem 0; }
	#boxQuick a span { font-size: 1.35rem; margin-bottom: .15rem; }
	#boxQuick button { display: none; }

	/* 하단 바에 가려지지 않도록 문서 끝에 여백 */
	#boxCopyright { margin-bottom: 4.5rem; }

	/* 섹션 여백 축소 */
	.section { padding: 70px 0; }
	#boxContents { padding: 70px 0; }
	.title strong { font-size: 2.25rem; }
	.subtitle strong { font-size: 2.75rem; }
	.subtitle p { font-size: 1.25rem; }

	/* 서브 배너 */
	#boxSubimg { height: 220px; }
	#boxSubimg strong { font-size: 2.25rem; padding-bottom: 3.4rem; }

	/* 오시는길 지도 2장 나란히 → 세로 */
	#boxMap .flexbox { flex-direction: column; gap: 1.5rem; }
	#boxMap .flexbox a { width: 100%; }

	/* 협력사 로고 줄바꿈 */
	#boxLink .contain { flex-wrap: wrap; justify-content: center; gap: 1.25rem 2rem; }
	#boxLink .contain > div img { height: 2.25rem; }
	#boxLink .contain > div .linkName { font-size: 1rem; }

	/* 팝업: 나란히 배치 대신 한 장씩 화면 안에 */
	.hd_pop_item { max-width: calc(100% - 2rem); left: 1rem !important; top: 12%; }
	.hd_pop_item img { max-width: 100%; }
}

/* ============================================================
   ~719px : 폰트/여백 추가 축소, 폼 세로 스택
   ============================================================ */
@media (max-width: 719px) {
	.section { padding: 50px 0; }
	#boxContents { padding: 50px 0; }
	.contain { padding-left: 1rem; padding-right: 1rem; }

	#boxMain .mainTextEn { font-size: 3.2vw; letter-spacing: .3em; text-indent: .3em; }
	#boxMain .mainTextKo { font-size: 9.5vw; }

	.title span { font-size: 1.1rem; }
	.title strong { font-size: 1.75rem; }
	.subtitle strong { font-size: 2rem; }
	.subtitle p { font-size: 1.05rem; margin-top: 1rem; }

	#boxSubimg { height: 180px; }
	#boxSubimg strong { font-size: 1.75rem; padding-bottom: 2.8rem; }
	#boxSubimg .boxSubimg_menu { width: 100%; }
	#boxSubimg .boxSubimg_menu a { line-height: 2.8rem; font-size: .95rem; }
	#boxSubimg .boxSubimg_menu a.on { font-size: 1rem; }

	/* 메인 슬라이드 높이 (모바일 주소창 고려) */
	#boxMain, #boxMain .swiper-slide, #boxMain .boxMainText { height: calc(100svh - 70px); }
	#boxMain .boxMainText img { max-width: 90%; }
	#boxMain .boxMainText .mainText { width: 90%; }
	#boxMain .mainTextEn { font-size: 2.4vw; letter-spacing: .4em; text-indent: .4em; margin-bottom: 1.4vw; }
	#boxMain .mainTextKo { font-size: 7.6vw; white-space: normal; line-height: 1.2; }

	/* 헤더 높이 축소 — #boxBlank 와 반드시 같이 움직여야 한다 */
	#boxTop .logo { height: 70px; }
	#boxBlank { height: 70px; }
	#boxTop #boxTel span { font-size: 1.1rem; }
	#boxTop #boxTel strong { font-size: 1.05rem; }

	/* 푸터 */
	#boxCopy { font-size: .95rem; }
	#boxCopy .boxCopyLogo img { height: 3rem; margin-bottom: 1.5rem; }
	#boxCopy .boxCopySub { margin-top: 1.5rem; word-break: keep-all; }
	#boxCopy .boxCopyNotice { font-size: .85rem; }
	#boxCopy .boxCopyNotice br { display: none; }
	#boxCopy .boxCopyLink em { margin: 0 .75rem; }
	#boxCopyright { line-height: 1.6; padding: 1.25rem 1rem; }

	/* ── 관심고객등록 폼: 라벨/입력 세로 스택 ── */
	.data-table table, .data-table tbody, .data-table tr, .data-table th, .data-table td {
		display: block; width: 100%;
	}
	.data-table table colgroup { display: none; }
	.data-table table tr th {
		padding: 1rem 0 .5rem 0; font-size: 1rem; font-weight: 600; border-bottom: 0;
	}
	.data-table table tr td { padding-bottom: 1rem; }
	.data-table table tr td input[type="text"] { width: 100% !important; height: 46px; }
	.data-table table tr td select {
		width: 100% !important; height: 46px; margin-left: 0 !important; margin-bottom: .5rem;
	}
	/* 연락처 3칸은 한 줄에 */
	.data-table table tr td:has(#hp1) { display: flex; align-items: center; gap: .25rem; }
	.data-table table tr td:has(#hp1) select { width: 30% !important; margin-bottom: 0; }
	.data-table table tr td:has(#hp1) input[type="text"] { width: 35% !important; }
	.data-table table tr td em { margin: 0 .25rem; }
	.data-table table tr td label { margin-right: .75rem; font-size: .95rem; }

	.con_tit { font-size: 1.5rem; margin-bottom: 2rem; }

	/* 약관 표 */
	.boxTerms table th, .boxTerms table td { font-size: .85rem; padding: .6rem .4rem; }
	.boxTerms table td { text-align: left; }
	.boxTerms dl dt { font-size: 1.05rem; }
	.boxTerms table { margin-bottom: 2rem; }

	/* 동의 라디오 */
	.boxAgree > div { flex-direction: column; align-items: flex-start; gap: .75rem; padding: 1rem 1.25rem; }
	.boxAgree p { font-size: 1rem; }

	/* 버튼
	   ⚠ signup.html 은 페이지 본문(#boxContents) 안에 <style> 블록이 있고,
	   그게 문서상 이 파일보다 뒤에 오기 때문에 같은 특정도면 그쪽이 이긴다.
	   (그래서 예전엔 ul 이 inline-block 인 채로 width 만 100% 가 먹어서
	    버튼이 왼쪽에 몰리고 오른쪽에 빈 공간이 남았다)
	   #boxContents 를 붙여 특정도를 높여야 실제로 적용된다. */
	#boxContents .boxBtn { margin-top: 2rem; }
	#boxContents .boxBtn ul { display: flex; justify-content: center; width: 100%; gap: .75rem; overflow: visible; }
	#boxContents .boxBtn ul li { float: none; }
	#boxContents .boxBtn ul li ~ li { margin-left: 0; }

	/* 평면정보 탭: 5개가 한 줄에 안 들어감 */
	.boxPlanTabs { flex-wrap: wrap; margin-bottom: 2.5rem; }
	.boxPlanTabs .tab_item { flex: 0 0 33.333%; padding: .85rem .25rem; font-size: .9rem; }
	.boxPlanTabs .tab_item.on { font-size: .95rem; }

	/* 약관 팝업 */
	.boxForm { width: 100% !important; }
}

/* ============================================================
   모바일 메뉴 (햄버거 + 드로어)
   ============================================================ */
#mobileMenuBtn {
	align-items: center; justify-content: center;
	flex-direction: column; gap: 5px;
	width: 48px; height: 48px;
	/* 헤더가 align-items:stretch 라 고정 height 를 준 이 버튼만 위로 붙는다.
	   align-self 로 세로 중앙에 맞춘다. */
	align-self: center;
	margin-right: .5rem;
	background: transparent; border: 0; cursor: pointer;
	flex: 0 0 auto;
	-webkit-tap-highlight-color: transparent;
	transition: opacity .15s ease;
}
#mobileMenuBtn:active { opacity: .55; }
#mobileMenuBtn span {
	display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px;
	transition: transform .25s ease, opacity .2s ease;
}
#mobileMenuBtn.on span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#mobileMenuBtn.on span:nth-child(2) { opacity: 0; }
#mobileMenuBtn.on span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

#mobileNavDim {
	position: fixed; inset: 0; background: rgba(0,0,0,.5);
	z-index: 10998; opacity: 0; pointer-events: none;
	transition: opacity .25s ease;
}
#mobileNavDim.on { opacity: 1; pointer-events: auto; }

#mobileNav {
	position: fixed; top: 0; right: 0;
	width: 80%; max-width: 320px; height: 100%;
	background: var(--color_dark, #005060);
	z-index: 10999;
	transform: translateX(100%);
	transition: transform .28s ease;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 2rem;
}
#mobileNav.on { transform: translateX(0); }

#mobileNav .mnav-head {
	display: flex; align-items: center; justify-content: space-between;
	padding: 1rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.15);
}
#mobileNav .mnav-head img { height: 2rem; filter: brightness(0) invert(1); }
#mobileNav .mnav-close {
	background: transparent; border: 0; color: #fff; font-size: 1.75rem;
	line-height: 1; cursor: pointer; padding: .25rem .5rem;
}

#mobileNav ul { list-style: none; margin: 0; padding: 0; }
#mobileNav > ul > li { border-bottom: 1px solid rgba(255,255,255,.12); }

#mobileNav .mnav-toggle {
	display: flex; align-items: center; justify-content: space-between;
	width: 100%; padding: 1.1rem 1.25rem;
	background: transparent; border: 0; cursor: pointer;
	color: #fff; font-size: 1.1rem; font-weight: 500; text-align: left;
	font-family: inherit;
}
#mobileNav .mnav-toggle::after {
	content: ''; width: 8px; height: 8px; flex: 0 0 auto;
	border-right: 2px solid rgba(255,255,255,.7);
	border-bottom: 2px solid rgba(255,255,255,.7);
	transform: rotate(45deg) translateY(-2px);
	transition: transform .25s ease;
}
#mobileNav li.on .mnav-toggle { color: var(--color_point, #66a73c); }
#mobileNav li.on .mnav-toggle::after {
	transform: rotate(-135deg) translateY(-2px);
	border-color: var(--color_point, #66a73c);
}

/* 하위 메뉴: 슬라이드다운 */
#mobileNav .mnav-sub {
	max-height: 0; overflow: hidden;
	background: rgba(0,0,0,.25);
	transition: max-height .28s ease;
}
#mobileNav li.on .mnav-sub { max-height: 400px; }
#mobileNav .mnav-sub a {
	display: block; padding: .85rem 1.25rem .85rem 2rem;
	color: rgba(255,255,255,.85); font-size: 1rem;
}
#mobileNav .mnav-sub a:active { color: var(--color_point, #66a73c); }

/* 하위가 하나뿐인 메뉴는 토글 없이 바로 링크 */
#mobileNav .mnav-direct {
	display: block; padding: 1.1rem 1.25rem;
	color: #fff; font-size: 1.1rem; font-weight: 500;
}

#mobileNav .mnav-tel {
	display: flex; align-items: center; justify-content: center; gap: .5rem;
	margin: 1.5rem 1.25rem 0 1.25rem; padding: .9rem 0;
	background: var(--color_point, #66a73c); color: #fff;
	font-size: 1.15rem; font-weight: 700; border-radius: 4px;
}

/* 드로어 열렸을 때 배경 스크롤 잠금 */
body.mnav-open { overflow: hidden; }

/* ============================================================
   표시 제어 — 반드시 이 파일 맨 끝에 둘 것.
   위 컴포넌트 블록들이 display 를 다시 선언하면 순서상 그쪽이 이겨서
   햄버거가 영영 안 보이게 된다 (실제로 한 번 겪음).
   ============================================================ */
#mobileMenuBtn { display: none; }

@media (max-width: 1024px) {
	#mobileMenuBtn { display: flex; }
}

/* 데스크톱에서는 드로어를 아예 렌더링에서 뺀다 */
@media (min-width: 1025px) {
	#mobileNav, #mobileNavDim { display: none; }
}
