/* ==========================================================
   main.css - 월산근린공원 야영장
   목차
   1. 기본 (Reset & Base)
   2. 레이아웃 (Header / Main / Footer)
   3. 컴포넌트
      3-1. Nav (네비게이션)
      3-2. Section (공통)
      3-3. Intro 섹션
      3-4. Guide 섹션
           - Guide Info (요금/주의사항)
           - Guide Map (캠핑장 전경)
           - Guide Gallery (썸네일)
      3-5. 이미지 원본 팝업
      3-6. Notice 섹션 (공지사항)
      3-7. 공지사항 상세 팝업
      3-8. 사이드 팝업 (좌/우 플로팅)
      3-9. Map (오시는 길)
      3-10. 이용요금 표
      3-11. 할인 안내 테이블
   4. 애니메이션
   5. 반응형 (미디어 쿼리)
   ========================================================== */


/* ==========================================================
   1. 기본 (Reset & Base)
   ========================================================== */

body {
	margin: 0;
	font-family: Arial, sans-serif;
}


/* ==========================================================
   2. 레이아웃 (Header / Main / Footer)
   ========================================================== */

/* --- Header --- */
header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 1000;
	background: #5f8f45;
	color: #fff;
}

.header-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 30px 20px;
}

/* 로고 영역 */
.logo-area {
	display: flex;
	align-items: center;
	gap: 10px;
	position: relative;
	z-index: 1100;
	margin: 0;
	font-size: 1rem;
}

.logo-area a {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: #fff;
}

.logo {
	height: 40px;
	width: auto;
}

/* --- Main --- */
.container {
	padding: 90px 20px 0 20px;
}

/* --- Footer --- */
.footer {
	background: #5f8f45;
	color: #fff;
	padding: 30px 20px;
}

.footer-inner {
	display: flex;
	justify-content: space-between;
	gap: 20px;
	max-width: 1200px;
	margin: 0 auto;
}

.footer-info,
.footer-time {
	font-size: clamp(12px, 2.5vw, 18px);
}

.footer-info p,
.footer-time p {
	margin: 5px 0;
}


/* ==========================================================
   3. 컴포넌트
   ========================================================== */

/* ----------------------------------------------------------
   3-1. Nav (네비게이션)
   ---------------------------------------------------------- */

nav {
	display: flex;
}

nav a {
	color: #fff;
	padding: 10px 15px;
	text-decoration: none;
}

nav a:hover {
	background: #739f5f;
}

/* 햄버거 버튼 (PC에서는 숨김) */
.menu-toggle {
	display: none;
	font-size: 26px;
	color: #fff;
	cursor: pointer;
}


/* ----------------------------------------------------------
   3-2. Section (공통)
   ---------------------------------------------------------- */

.section {
	display: none;
	margin-bottom: 80px;
}

.section.active {
	display: block;
}


/* ----------------------------------------------------------
   3-3. Intro 섹션
   ---------------------------------------------------------- */

/* container의 좌우 패딩(20px)을 음수 마진으로 상쇄 → 이미지가 화면 전체 너비를 채움 */
#intro {
	margin: 0 -20px;
}

.intro-image {
	position: relative;
	overflow: hidden;
	max-width: 1400px;
	margin: 0 auto;
}

/* 메인 이미지 : 진입 시 dropDown 애니메이션 */
.intro-image img {
	max-width: 1400px;
	width: 100%;
	height: auto;
	display: block;
	margin: 0 auto;
	opacity: 0;
	transform: translateY(-80px);
	animation: dropDown 1s ease-out forwards;
	
	/* 감성 보정 */
	filter:
		brightness(1.08)
		contrast(1.08)
		saturate(1.18)
		sepia(0.03);

	/* 성능 최적화 */
	will-change: transform, filter;
}

/* 이미지 위 텍스트 오버레이 */
.intro-text {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: #fff;
	text-align: left;
	background: rgba(0, 0, 0, 0.3);
	backdrop-filter: blur(5px);
	padding: 20px 30px;
	border-radius: 10px;
	max-width: 80%;
}

.intro-text h2 {
	margin: 0 0 10px;
	font-size: 32px;
}

.intro-text p {
	margin: 0;
	font-size: 18px;
}

.intro-subtitle {
	font-size: 1.4em;
	font-weight: bold;
	margin: 0 0 12px 0;
	color: #fff;
}


/* ----------------------------------------------------------
   3-4. Guide 섹션
   ---------------------------------------------------------- */

/* Guide 제목 */
#guide h2 {
	text-align: center;
	margin-top: 50px;
}

/* Guide Info (요금/주의사항) */
.guide-info {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
}

.guide-box {
	width: 100%;
	max-width: 800px;
	box-sizing: border-box;
	line-height: 1.7;
}

/* Guide Map (캠핑장 전경) */
.guide-map {
	margin-top: 130px;
	overflow: hidden;
	border-radius: 10px;
	transform: translateY(-80px);
	display: flex;
	flex-direction: column;
	align-items: center;
}

.guide-map.animate {
	animation: dropDown 1s ease-out forwards;
}

.guide-map-title {
	font-size: 20px;
	font-weight: bold;
	margin: 0 0 12px 0;
	color: #5f8f45;
	letter-spacing: 1px;
}

.guide-map img {
	display: block;
	max-width: 40%;
	height: auto;
	cursor: pointer;
	border-radius: 14px;

	/* 감성 보정 */
	filter:
		brightness(1.08)
		contrast(1.08)
		saturate(1.18)
		sepia(0.03);

	/* 성능 최적화 */
	will-change: transform, filter;

	/* 기본 상태 */
	transform: scale(1);

	/* 부드러운 전환 */
	transition:
		transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
		filter 0.5s ease,
		box-shadow 0.5s ease;

	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Guide Map hover : 살짝 커지고 화사해짐 */
.guide-map img:hover {
	transform: scale(1.035) translateY(-2px);
	filter:
		brightness(1.12)
		contrast(1.1)
		saturate(1.28)
		sepia(0.05);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

/* Guide Gallery 그룹 래퍼 */
.guide-gallery-wrap {
	margin-top: 40px;
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.guide-gallery-group {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.gallery-group-title {
	font-size: 18px;
	font-weight: bold;
	color: #5f8f45;
	margin: 0 0 12px 0;
	padding-bottom: 6px;

	/* 텍스트 너비만큼만 밑줄 */
	display: inline-block;
	border-bottom: 2px solid #5f8f45;
}

/* Guide Gallery 썸네일 */
.guide-gallery {
	display: flex;
	justify-content: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 0;
}

.guide-gallery img {
	width: 366px;
	height: 274.5px;
	object-fit: cover;
	border-radius: 16px;
	cursor: pointer;
	display: block;

	/* 감성 보정 */
	filter:
		brightness(1.08)
		contrast(1.08)
		saturate(1.2)
		sepia(0.03);

	/* 성능 최적화 */
	will-change: transform, filter;

	/* 기본 상태 */
	transform: translateY(0) scale(1);

	/* 부드러운 전환 */
	transition:
		transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
		filter 0.5s ease,
		box-shadow 0.5s ease;

	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Guide Gallery hover : 살짝 커지고 화사해짐 (guide-map img:hover와 동일한 방식) */
.guide-gallery img:hover {
	transform: scale(1.045) translateY(-4px);
	filter:
		brightness(1.13)
		contrast(1.1)
		saturate(1.32)
		sepia(0.05);
	box-shadow: 0 20px 44px rgba(0, 0, 0, 0.2);
}

/*
   animateGuide() 진입 애니메이션용 클래스
   - opacity/transform 은 JS 인라인 스타일로 초기화 후 이 클래스로 복원
   - hover transition과 충돌하지 않도록 transition 속성을 최소화
*/
.guide-gallery img.animate {
	opacity: 1 !important;
	transform: translateY(0) scale(1) !important;
}


/* ----------------------------------------------------------
   3-5. 이미지 원본 팝업
   ---------------------------------------------------------- */

.img-popup {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 3000;
	align-items: center;
	justify-content: center;
}

.img-popup.active {
	display: flex;
}

.img-popup-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.75);
	cursor: pointer;
}

.img-popup-inner {
	position: relative;
	z-index: 1;
	max-width: 90vw;
	max-height: 90vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

.img-popup-inner img {
	max-width: 90vw;
	max-height: 85vh;
	border-radius: 8px;
	display: block;

	filter:
		brightness(1.1)
		contrast(1.08)
		saturate(1.22)
		sepia(0.03);

	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
	animation: popupZoom 0.35s ease;
}

.img-popup-close {
	position: absolute;
	top: -16px;
	right: -16px;
	width: 36px;
	height: 36px;
	background: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	font-weight: bold;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
	line-height: 1;
	color: #5f8f45;
	z-index: 2;
	transition: background 0.2s ease, color 0.2s ease;
}

.img-popup-close:hover {
	background: #5f8f45;
	color: #fff;
}


/* ----------------------------------------------------------
   3-6. Notice 섹션 (공지사항 테이블)
   ---------------------------------------------------------- */

.notice-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 20px;
}

.notice-table th,
.notice-table td {
	padding: 12px;
	border-bottom: 1px solid #ddd;
	text-align: center;
	font-size: 14px;
}

.notice-table th {
	background: #f4f6f8;
}

/* 제목 열 : 좌측 정렬 + 클릭 가능 */
.notice-table td:nth-child(2) {
	text-align: left;
	cursor: pointer;
}

.notice-table tr:hover {
	background: #f9f9f9;
}

/* 페이지네이션 버튼 */
.pagination {
	display: flex;
	justify-content: center;
	margin-top: 20px;
	gap: 5px;
	flex-wrap: wrap;
}

.pagination button {
	padding: 6px 10px;
	border: 1px solid #ccc;
	background: #fff;
	cursor: pointer;
}

/* 현재 페이지 버튼 강조 */
.pagination button.active {
	background: #5f8f45;
	color: #fff;
	border-color: #5f8f45;
}


/* ----------------------------------------------------------
   3-7. 공지사항 상세 팝업 (중앙 오버레이)
   ---------------------------------------------------------- */

.popup {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 2000;
	overflow-y: auto;

	/* display:flex는 JS에서만 적용 */
	align-items: flex-start;
	justify-content: center;
	padding: 60px 20px;
	box-sizing: border-box;
}

.popup-content {
	background: #fff;
	padding: 20px;
	border-radius: 10px;
	border: 1px solid #ccc;
	width: 100%;
	max-width: 90vh;
	height: auto;
	display: block;
	margin: 0;
	box-sizing: border-box;
	overflow: visible;
}

.close-btn {
	float: right;
	cursor: pointer;
}


/* ----------------------------------------------------------
   3-8. 사이드 팝업 (좌/우 플로팅)
   ---------------------------------------------------------- */

.side-popup {
	position: fixed;
	top: 120px;
	z-index: 1500;
	padding: 0 20px;
	will-change: transform;
	transition: transform 0.4s ease-out;
}

.side-popup.left  { left: 0; }
.side-popup.right { right: 0; }

.side-popup.left.show {
	animation: dropDown 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.side-popup.right.show {
	animation: dropDown 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.popup-box {
	width: auto;
	max-width: 420px;
	min-width: 260px;
	background: #fff;
	border: 4px solid #a9a6a6;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
	display: flex;
	flex-direction: column;
	max-height: calc(100vh - 160px);
	overflow: hidden;
}

.popup-box img {
	width: 100%;
	height: auto;
	display: block;
	max-height: 220px;
	object-fit: cover;
}

.popup-body {
	padding: 15px;
	font-size: 14px;
	line-height: 1.6;
	word-break: break-word;
	flex: 1;
	overflow-y: auto;
}

.popup-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 12px;
	font-size: 12px;
	background: #f5f5f5;
	border-top: 1px solid #eee;
	flex-shrink: 0;
}

.popup-footer button {
	border: none;
	background: #5f8f45;
	color: #fff;
	padding: 5px 10px;
	border-radius: 6px;
	cursor: pointer;
}


/* ----------------------------------------------------------
   3-9. Map (오시는 길)
   ---------------------------------------------------------- */

.map-wrap {
	width: 100%;
	height: 400px;
	margin-top: 20px;
	border-radius: 10px;
	overflow: hidden;
}

.map-wrap iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

.address {
	margin-top: 10px;
	font-size: 14px;
}


/* ----------------------------------------------------------
   3-10. 이용요금 표
   ---------------------------------------------------------- */

.guide-price-table-wrap {
	margin-top: 30px;
}

.guide-price-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	font-size: 14px;
	min-width: 700px;
}

.guide-price-table th,
.guide-price-table td {
	border: 1px solid #dcdcdc;
	padding: 12px 10px;
	text-align: center;
	vertical-align: middle;
}

.guide-price-table thead th {
	background: #5f8f45;
	color: #fff;
	font-weight: bold;
}

.guide-price-table tbody tr:nth-child(even) {
	background: #f8f9fa;
}

.guide-price-table tbody tr:hover {
	background: #eef3f7;
	transition: background 0.2s ease;
}

.guide-price-table td {
	font-weight: 500;
}


/* ----------------------------------------------------------
   3-11. 할인 안내 테이블
   ---------------------------------------------------------- */

.table-wrap {
	width: 100%;
	margin-top: 20px;
}

.price-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	font-size: 14px;
	line-height: 1.6;
}

.price-table th,
.price-table td {
	border: 1px solid #dcdcdc;
	padding: 12px;
	text-align: center;
	vertical-align: middle;
	word-break: keep-all;
}

.price-table thead th {
	background: #5f8f45;
	color: #fff;
	font-weight: bold;
}

.price-table tbody tr:nth-child(even) {
	background: #f8f9fa;
}

/* ==========================================================
   4. 애니메이션
   ========================================================== */

/* 위에서 아래로 떨어지는 등장 효과 */
@keyframes dropDown {
	0%   { transform: translateY(-80px); opacity: 0; }
	100% { transform: translateY(0);     opacity: 1; }
}

/* 아래에서 위로 올라오는 등장 효과 */
@keyframes slideUp {
	from { transform: translateY(100%); }
	to   { transform: translateY(0); }
}

/* 위에서 아래로 내려오는 등장 효과 (모바일 사이드 팝업) */
@keyframes slideDown {
	from { transform: translateY(-100%); }
	to   { transform: translateY(0); }
}

/* 좌측 팝업 : 왼쪽 바깥에서 슬라이드인 */
@keyframes slideInLeft {
	from { transform: translateX(-120%); opacity: 0; }
	to   { transform: translateX(0);     opacity: 1; }
}

/* 우측 팝업 : 오른쪽 바깥에서 슬라이드인 */
@keyframes slideInRight {
	from { transform: translateX(120%); opacity: 0; }
	to   { transform: translateX(0);    opacity: 1; }
}

/* 이미지 팝업 확대 등장 */
@keyframes popupZoom {
	from { opacity: 0; transform: scale(0.92); }
	to   { opacity: 1; transform: scale(1); }
}


/* ==========================================================
   5. 반응형 (미디어 쿼리)
   ========================================================== */

@media (max-width: 768px) {

	/* --- Header --- */
	.logo {
		height: 32px;
	}

	/* 햄버거 버튼 표시 */
	.menu-toggle {
		display: block;
		z-index: 1100;
	}

	/* 모바일 전체화면 오버레이 메뉴 */
	nav {
		display: none;
		flex-direction: column;
		position: fixed;
		top: 80px;
		left: 0;
		width: 100%;
		height: calc(100vh - 60px);
		background: #5f8f45;
		z-index: 1000;
	}

	nav.active {
		display: flex;
	}

	nav a {
		padding: 15px;
		border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	}

	/* --- Intro --- */
	.intro-image {
		position: relative;
		overflow: visible;
	}

	.intro-image img {
		max-width: 1400px;
		width: 100%;
		height: auto;
		display: block;
		margin: 0 auto;
		opacity: 0;
		transform: translateY(-80px);
		animation: dropDown 1s ease-out forwards;
	}

	.intro-text {
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		width: calc(100% - 40px);
		max-width: 500px;
		padding: 10px;
		border-radius: 12px;
		text-align: left;
		backdrop-filter: blur(1px);
		max-height: 90%;
		overflow-y: auto;
	}

	.intro-text h2 {
		font-size: 18px;
		margin-bottom: 10px;
		line-height: 1.4;
	}

	.intro-text p {
		font-size: 13px;
		line-height: 1.6;
	}

	/* --- Guide --- */
	.guide-map img {
		max-width: 100%;
	}

	.guide-gallery img {
		width: 240px;
		height: 180px;
	}

	/* 모바일 hover : 과한 효과 방지, 가볍게 적용 */
	.guide-gallery img:hover,
	.guide-map img:hover {
		transform: scale(1.02);
	}

	.gallery-group-title {
		font-size: 15px;
	}

	/* --- Notice --- */
	.notice-table th:nth-child(1),
	.notice-table td:nth-child(1),
	.notice-table th:nth-child(4),
	.notice-table td:nth-child(4) {
		display: none;
	}

	.notice-table td {
		font-size: 13px;
	}

	/* --- Map --- */
	.map-wrap {
		height: 300px;
	}

	/* --- 이용요금 / 할인 테이블 --- */
	.guide-price-table-wrap {
		margin-top: 30px;
		overflow-x: auto;
	}

	.table-wrap {
		width: 100%;
		overflow-x: auto;
		margin-top: 20px;
	}

	.price-table {
		font-size: 12px;
	}

	.price-table th,
	.price-table td {
		padding: 8px;
	}

	.discount-table td:nth-child(3),
	.discount-table td:nth-child(4) {
		min-width: 180px;
	}

	/* --- Footer --- */
	.footer-inner {
		flex-direction: column;
	}

	.footer {
		text-align: left;
	}

	/* --- 사이드 팝업 (모바일 : 풀스크린 오버레이) --- */
	.side-popup {
		position: fixed;
		top: 80px;
		left: 0;
		right: 0;
		bottom: 0;
		max-height: none;
		display: none;
		justify-content: center;
		align-items: flex-start;
		transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
	}

	.popup-box img {
		width: 100%;
		height: auto;
	}
}