/* ============================================================
 * responsive.css — 모든 미디어쿼리
 * Breakpoints: xs(≤374) / sm(≤767) / md(≤1023) / lg(≤1279) / xl(≥1280) / xxl(≥1920)
 * TRD § 6.3
 * dongnae-summit v1.0.0
 * ============================================================ */

/* ── lg: 소형 노트북 (≤1279px) ──────────────────────────── */

@media (max-width: 1279px) {
	.site-header__inner {
		gap: 1rem;
	}
	.nav-menu {
		gap: calc(var(--nav-item-spacing) - 6px);
	}
	.nav-link {
		font-size: calc(var(--nav-font-size) - 1px);
	}
	.dsummit-card-grid {
		grid-template-columns: repeat(min(var(--grid-cols, 3), 3), 1fr);
	}
	.posts-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.kboard-gallery-wrap .kboard-gallery-list {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ── md: 태블릿 (≤1023px) ─────────────────────────────────────── */

@media (max-width: 1023px) {
	.site-header {
		height: var(--header-height-sm);
	}
	body.has-sticky-header {
		padding-top: var(--header-height-sm);
	}

	body.has-header-c {
		padding-top: 0;
	}

	body.has-header-c .site-main {
		margin-top: calc(-1 * var(--header-height-sm));
	}

	body.has-header-c .sub-header__inner {
		padding-top: calc(var(--subheader-padding, 48px) + var(--header-height-sm));
	}

	body.has-header-d {
		padding-top: 0;
	}

	body.has-header-d .site-main {
		margin-top: calc(-1 * var(--header-height-sm));
	}

	body.has-header-d .sub-header__inner {
		padding-top: calc(var(--subheader-padding, 48px) + var(--header-height-sm));
	}

	.site-logo__img {
		width: auto !important;
		max-width: 100% !important;
		height: auto !important;
		max-height: calc(var(--header-height-sm) - 16px);
		object-fit: contain;
		object-position: left center;
	}

	/* 햄버거 모드 — 검색·로그인 숨김 (유틸 폭 축소) */
	.site-header__util .header-search-btn,
	.site-header__util .header-login-btn {
		display: none;
	}

	.header-search-panel {
		padding-top: calc(var(--header-height-sm) + 16px);
	}

	.sidebar-widget-area {
		top: calc(var(--header-height-sm) + 1.5rem);
	}

	/* 내비게이션 숨김 → 햄버거 메뉴로 전환 */
	.main-navigation,
	.site-header--variant-b .main-navigation--variant-b,
	.site-header--variant-d .main-navigation--variant-b {
		display: none !important;
	}

	/* 모바일 — 로고 왼쪽 정렬, 유틸(전화·햄버거) 오른쪽 (grid로 고정) */
	.site-header__inner {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-areas: 'logo util';
		align-items: center;
		justify-content: initial;
		column-gap: 0.75rem;
	}

	.site-logo {
		grid-area: logo;
		justify-self: start;
		align-self: center;
		flex: none !important;
		min-width: 0;
		width: auto;
		max-width: 100%;
		margin: 0 !important;
		text-align: left;
		overflow: hidden;
	}

	.site-logo__link {
		display: flex !important;
		justify-content: flex-start !important;
		align-items: center;
		min-width: 0;
		max-width: 100%;
		margin: 0;
		text-align: left;
	}

	.site-logo__link--dual {
		display: inline-grid !important;
		justify-items: start;
		justify-content: start;
	}

	.site-header__inner > .main-navigation {
		display: none !important;
		position: absolute !important;
		width: 0 !important;
		height: 0 !important;
		overflow: hidden !important;
		margin: 0 !important;
		padding: 0 !important;
		flex: 0 0 0 !important;
		min-width: 0 !important;
		visibility: hidden !important;
		pointer-events: none !important;
	}

	.site-header__util {
		grid-area: util;
		justify-self: end;
		margin-left: 0 !important;
		flex-shrink: 0;
	}

	/* 헤더 B·D — PC 메가 메뉴·1차 그리드 숨김 (햄버거 전용) */
	.header-b,
	.header-b-mega {
		display: none !important;
		visibility: hidden !important;
		pointer-events: none !important;
	}

	.site-header--variant-b.is-mega-open,
	.site-header--variant-d.is-mega-open {
		box-shadow: var(--shadow-sm);
	}

	.site-header--variant-b .site-header__inner,
	.site-header--variant-d .site-header__inner {
		gap: 1rem;
	}

	.site-header__util .header-login-btn span {
		display: none;
	}

	.header-phone-btn {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		flex-shrink: 0;
		width: 40px;
		height: 40px;
		border-radius: var(--radius-full);
		background-color: var(--header-phone-bg, #c4a882);
		transition: opacity var(--transition-fast), transform var(--transition-fast);
	}

	.header-phone-btn:hover,
	.header-phone-btn:focus-visible {
		opacity: 0.88;
		outline: none;
	}

	.sub-header {
		min-height: var(--subheader-min-height-tablet, var(--subheader-min-height));
	}

	.sub-header__title {
		font-size: clamp(1.5rem, 4vw, 2rem);
	}

	.sub-page-layout {
		grid-template-columns: 1fr;
	}

	.sidebar-widget-area {
		position: static;
	}

	.dsummit-card-grid {
		grid-template-columns: repeat(min(var(--grid-cols, 3), 2), 1fr) !important;
	}

	.posts-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.fullscreen-nav__nav {
		grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
		gap: 1.5rem;
	}
	.entry-content {
		padding: 2rem 0;
	}
}

/* ── sm: 스마트폰 (≤767px) ───────────────────────────────── */

@media (max-width: 767px) {
	:root {
		--section-padding: 48px 0;
		--container-padding: 0 16px;
	}

	.sub-header {
		min-height: var(--subheader-min-height-mobile, var(--subheader-min-height-tablet, var(--subheader-min-height)));
	}

	.sub-header__inner {
		padding-top: 2rem;
		padding-bottom: 2rem;
	}

	.sub-header__title {
		font-size: 1.5rem;
	}

	.sub-header__desc {
		font-size: 0.9375rem;
	}

	.posts-grid {
		grid-template-columns: 1fr;
		gap: 1.25rem;
	}

	.dsummit-card-grid {
		grid-template-columns: 1fr !important;
	}

	.kboard-gallery-wrap .kboard-gallery-list {
		grid-template-columns: 1fr;
	}

	.kboard-default-list th:nth-child(n+3),
	.kboard-default-list td:nth-child(n+3) {
		display: none;
	}

	.fullscreen-nav:not(.fullscreen-nav--header-b) .fullscreen-nav__nav {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.fullscreen-nav:not(.fullscreen-nav--header-b) .fullscreen-nav__inner {
		padding: 5rem 1.25rem 2rem;
	}

	.wpmember-wrap,
	.wp-member-wrap {
		margin: 1.5rem auto;
		padding: 1.5rem;
	}

	.site-footer__bottom-inner {
		flex-direction: column;
		gap: 1rem;
		text-align: center;
	}

	.site-footer__bar-inner {
		flex-direction: column;
		align-items: stretch;
		gap: 2rem;
	}

	.site-footer__right {
		text-align: left;
	}

	.site-footer__sns {
		justify-content: flex-start;
	}

	.site-footer__widgets-inner {
		grid-template-columns: 1fr;
	}

	.dsummit-btn--lg {
		padding: 0.875rem 2rem;
		font-size: 1rem;
	}

	/* 홈 슬라이더 텍스트 */
	.home-visual__title {
		font-size: clamp(1.5rem, 6vw, 2.5rem);
	}

	.home-visual__desc {
		font-size: 0.9375rem;
	}

	/* 갤러리 */
	.gallery-grid {
		grid-template-columns: repeat(2, 1fr) !important;
	}

	/* 연혁 타임라인 */
	.dsummit-timeline--horizontal {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	/* 에러 페이지 */
	.error-404__code {
		font-size: 6rem;
	}

	/* 아코디언 */
	.dsummit-accordion__trigger {
		font-size: 0.9375rem;
	}

	/* 탭 */
	.dsummit-tab__nav {
		overflow-x: auto;
	}
	.dsummit-tab__btn {
		white-space: nowrap;
	}
}

/* ── xs: 구형 소형 스마트폰 (≤374px) ──────────────────────── */

@media (max-width: 374px) {
	:root {
		--container-padding: 0 12px;
	}

	.nav-link {
		font-size: 0.875rem;
	}

	.site-logo__link--text {
		font-size: 1.125rem;
	}

	.gallery-grid {
		grid-template-columns: 1fr !important;
	}

	h1 {
		font-size: 1.5rem;
	}
	h2 {
		font-size: 1.25rem;
	}
}

/* ── xl: 데스크탑 (≥1280px) ───────────────────────────────── */

@media (min-width: 1280px) {
	.container {
		padding: var(--container-padding);
	}

	.fullscreen-nav__nav {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* ── xxl: 대형 모니터 (≥1920px) ───────────────────────────── */

@media (min-width: 1920px) {
	:root {
		--font-size-base: 17px;
	}

	.site-header {
		height: calc(var(--header-height) + 10px);
	}
}

/* ── 푸터 레이아웃 공통 ──────────────────────────────────── */

.site-footer__bottom-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1.25rem 0;
}

.site-footer__widgets-inner {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 2rem;
	padding: 3rem 0;
}

@media (max-width: 1023px) {
	.site-footer__widgets-inner {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767px) {
	.site-footer__widgets-inner {
		grid-template-columns: 1fr;
		gap: 1rem;
		padding: 2rem 0;
	}
}

/* ═══════════════════════════════════════════════════════════
 * 방문예약 CTA · 퀵메뉴 (PRD §2.1)
 * ═══════════════════════════════════════════════════════════ */

/* 태블릿 이하: 헤더 CTA는 여백 확보를 위해 축소 */
@media (max-width: 1023px) {
	.header-cta-btn {
		height: 38px;
		padding: 0 16px;
		font-size: 14px;
	}
}

/* 모바일: 헤더 CTA 숨김 — 하단 고정 바가 그 역할을 대신한다 (중복 방지) */
@media (max-width: 767px) {
	.header-cta-btn {
		display: none;
	}

	/* 퀵메뉴: 우측 세로 고정 → 하단 전폭 고정 바로 변형 */
	.quick-menu {
		top: auto;
		right: 0;
		bottom: 0;
		left: 0;
		transform: none;
		background: var(--color-primary, #0B1B2B);
		box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.18);
		padding-bottom: env(safe-area-inset-bottom); /* iOS 홈 인디케이터 영역 확보 */
	}

	.quick-menu__list {
		flex-direction: row;
		gap: 0;
	}

	.quick-menu__item {
		flex: 1 1 0;
	}

	.quick-menu__link {
		width: 100%;
		height: 60px;
		border: 0;
		border-radius: 0;
		font-size: 11px;
	}

	.quick-menu__link:hover,
	.quick-menu__link:focus-visible {
		transform: none;
		box-shadow: none;
	}

	.quick-menu__icon {
		font-size: 16px;
	}

	/* 하단 바에서는 TOP도 항상 노출 (레이아웃이 고정폭 분할이라 숨기면 칸이 흔들린다) */
	.quick-menu__item--top {
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	/* 하단 바 높이만큼 푸터 여백 확보 — 마지막 콘텐츠가 가려지지 않도록 */
	.site-footer {
		padding-bottom: calc(60px + env(safe-area-inset-bottom));
	}
}

/* ═══════════════════════════════════════════════════════════
 * 풀페이지 메인 (PRD §3)
 * ═══════════════════════════════════════════════════════════ */

/* 태블릿: 수치 카드 2열 */
@media (max-width: 1023px) {
	.summary-stats {
		grid-template-columns: repeat(2, 1fr);
	}

	.dot-nav {
		right: 14px;
	}

	/* 좁은 화면에서 라벨이 화면 밖으로 밀리므로 도트만 남긴다 */
	.dot-nav__label {
		display: none;
	}
}

/* 모바일(≤768px): 풀페이지 해제 → 일반 스크롤 폴백 (INT-06)
 * JS(fullpage.js)가 gsap.matchMedia 로 스냅을 등록하지 않으며,
 * CSS도 100svh 고정을 풀어 콘텐츠 높이에 맞춘다. */
@media (max-width: 767px) {
	.fp-section {
		min-height: auto;
		/* 히어로만 화면을 채우고, 나머지는 콘텐츠 높이 + 넉넉한 상하 여백 */
		padding: 72px 0;
	}

	.fp-section--hero {
		min-height: 100svh;
		padding: 0;
	}

	.fp-section__inner {
		padding-top: 0;
		padding-bottom: 0;
	}

	.fp-section--hero .fp-section__inner {
		padding-top: 96px;
		padding-bottom: 96px;
	}

	.summary-stats {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}

	.summary-stats__item {
		padding: 18px 12px;
	}

	.reservation-cta {
		flex-direction: column;
		align-items: flex-start;
		gap: 20px;
	}

	.reservation-cta__btn {
		width: 100%;
		justify-content: center;
	}

	/* 도트 내비는 모바일에서 숨긴다 — 하단 퀵메뉴 바와 겹치고, 일반 스크롤이라 의미가 옅다 */
	.dot-nav {
		display: none;
	}

	/* 영상 제어 버튼은 하단 퀵메뉴 바(60px) 위로 올린다 */
	.video-toggle {
		bottom: calc(72px + env(safe-area-inset-bottom));
		left: 12px;
	}

	.hero__scroll {
		bottom: calc(72px + env(safe-area-inset-bottom));
	}
}

@supports not (height: 100svh) {
	@media (max-width: 767px) {
		.fp-section--hero {
			min-height: 100vh;
		}
	}
}
