/* 반드시 CLAUDE.md의 절대원칙을 읽고 따를 것, 하나의 클래스/모듈은 하나의 책임만 가져야 함 (SRP 원칙), 하나의 파일에 코드줄은 최대 500~600줄 내에서 생성하여야 하며 최대 코드줄이 넘어가지 않도록 작성, 만약 코드가 길어지면 분할해서 코드작업을 완성하여야 함 */
/* 헤더 네비게이션 스타일 */

/* 헤더 네비게이션 */
.header-nav {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 90px;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(10px);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	z-index: 9999;
	transition: all 0.3s ease;
}

/* 메인 페이지 투명 헤더 */
.main-page .header-nav.transparent {
	background: transparent;
	backdrop-filter: none;
	box-shadow: none;
}

/* 투명 헤더일 때 hover 시 흰색 배경으로 전환 */
.main-page .header-nav.transparent:hover {
	background: rgba(255, 255, 255, 0.98) !important;
	backdrop-filter: blur(10px);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* hover 시 로고 전환 */
.main-page .header-nav.transparent:hover .nav-logo .logo-white {
	display: none !important;
}

.main-page .header-nav.transparent:hover .nav-logo .logo-dark {
	display: block !important;
}

/* hover 시 메뉴 색상 변경 */
.main-page .header-nav.transparent:hover .nav-menu a {
	color: #333 !important;
}

.main-page .header-nav.transparent:hover .nav-contact {
	color: #007bff !important;
}

.main-page .header-nav.transparent:hover .mobile-menu-btn span {
	background: #333 !important;
}

/* 스크롤 시 헤더 스타일 - 우선순위를 높이기 위해 .main-page 추가 */
.header-nav.scrolled {
	height: 80px;
	background: rgba(255, 255, 255, 0.98) !important;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

/* 스크롤 시 로고 전환 */
.main-page .header-nav.scrolled .nav-logo .logo-white {
	display: none !important;
}

.main-page .header-nav.scrolled .nav-logo .logo-dark {
	display: block !important;
}

/* 스크롤 시 메뉴 색상 변경 */
.main-page .header-nav.scrolled .nav-menu a {
	color: #333 !important;
}

.main-page .header-nav.scrolled .nav-contact {
	color: #007bff !important;
}

.main-page .header-nav.scrolled .mobile-menu-btn span {
	background: #333 !important;
}

.nav-container {
	max-width: 1400px;
	height: 100%;
	margin: 0 auto;
	padding: 0 30px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

/* 로고 */
.nav-logo {
	flex-shrink: 0;
}

.nav-logo a {
	display: flex;
	align-items: center;
	text-decoration: none;
}

.nav-logo img {
	height: 60px;
	width: auto;
	transition: opacity 0.3s ease;
}

/* 로고 전환을 위한 스타일 */
.nav-logo .logo-white {
	display: none;
}

.nav-logo .logo-dark {
	display: block;
}

/* 투명 헤더일 때 로고 전환 */
.main-page .header-nav.transparent .nav-logo .logo-white {
	display: block;
}

.main-page .header-nav.transparent .nav-logo .logo-dark {
	display: none;
}

/* 메인 메뉴 */
.nav-menu {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 45px;
}

.nav-menu li {
	position: relative;
}

/* 서브메뉴 스타일 */
.nav-menu .submenu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 180px;
	background: rgba(255, 255, 255, 0.98);
	backdrop-filter: blur(10px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	border-radius: 8px;
	padding: 10px 0;
	margin-top: 0;
	list-style: none;
	z-index: 10000;
}

.nav-menu .has-submenu:hover .submenu {
	display: block;
	animation: fadeInDown 0.3s ease;
}

.nav-menu .submenu li {
	padding: 0;
}

.nav-menu .submenu a {
	display: block;
	padding: 12px 20px;
	color: #333;
	font-size: 15px;
	font-weight: 400;
	white-space: nowrap;
	border-radius: 0;
}

.nav-menu .submenu a:hover {
	background: rgba(0, 123, 255, 0.1);
	color: #007bff;
}

.nav-menu .submenu a::after {
	display: none;
}

@keyframes fadeInDown {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.nav-menu a {
	display: block;
	padding: 10px 0;
	color: #333;
	text-decoration: none;
	font-size: 17px;
	font-weight: 500;
	transition: color 0.3s ease;
	position: relative;
}

/* 투명 헤더일 때 메뉴 텍스트 흰색 */
.main-page .header-nav.transparent .nav-menu a {
	color: #fff;
}

.nav-menu a:hover {
	color: #007bff;
}

.main-page .header-nav.transparent .nav-menu a:hover {
	color: rgba(255, 255, 255, 0.8);
}

.nav-menu a::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0;
	height: 2px;
	background: #007bff;
	transition: width 0.3s ease;
}

/* 투명 헤더일 때 언더라인 흰색 */
.main-page .header-nav.transparent .nav-menu a::after {
	background: #fff;
}

.nav-menu a:hover::after,
.nav-menu li.active a::after {
	width: 100%;
}

/* 전화번호 */
.nav-contact {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #007bff;
	font-size: 18px;
	font-weight: 600;
	text-decoration: none;
	transition: color 0.3s ease;
}

/* 투명 헤더일 때 전화번호 흰색 */
.main-page .header-nav.transparent .nav-contact {
	color: #fff;
}

.nav-contact:hover {
	color: #0056b3;
}

.main-page .header-nav.transparent .nav-contact:hover {
	color: rgba(255, 255, 255, 0.8);
}

/* 전화 아이콘 스타일 */
.nav-contact .phone-icon {
	font-size: 20px;
	transition: color 0.3s ease;
}

/* 모바일 메뉴 버튼 */
.mobile-menu-btn {
	display: none;
	width: 30px;
	height: 24px;
	position: relative;
	cursor: pointer;
	background: none;
	border: none;
	padding: 0;
}

.mobile-menu-btn span {
	display: block;
	position: absolute;
	height: 3px;
	width: 100%;
	background: #333;
	left: 0;
	transition: all 0.3s ease;
}

/* 투명 헤더일 때 모바일 메뉴 버튼 흰색 */
.main-page .header-nav.transparent .mobile-menu-btn span {
	background: #fff;
}

.mobile-menu-btn span:nth-child(1) {
	top: 0;
}

.mobile-menu-btn span:nth-child(2) {
	top: 10px;
}

.mobile-menu-btn span:nth-child(3) {
	bottom: 0;
}

.mobile-menu-btn.active span:nth-child(1) {
	transform: rotate(45deg);
	top: 10px;
}

.mobile-menu-btn.active span:nth-child(2) {
	opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
	transform: rotate(-45deg);
	bottom: 11px;
}

/* 모바일 메뉴 */
.mobile-menu {
	display: none;
	position: fixed;
	top: 90px;
	left: 0;
	width: 100%;
	max-height: calc(100vh - 90px); /* 화면 높이에서 헤더 높이 제외 */
	background: white;
	box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
	overflow-y: auto; /* 세로 스크롤 활성화 */
	-webkit-overflow-scrolling: touch; /* iOS 부드러운 스크롤 */
	z-index: 9998;
}

.mobile-menu.active {
	display: block;
}

.mobile-menu ul {
	list-style: none;
	margin: 0;
	padding: 20px 0;
}

.mobile-menu li {
	border-bottom: 1px solid #eee;
}

.mobile-menu li:last-child {
	border-bottom: none;
}

.mobile-menu a {
	display: block;
	padding: 15px 30px;
	color: #333;
	text-decoration: none;
	font-size: 16px;
}

.mobile-menu a:hover {
	background: #f8f9fa;
	color: #007bff;
}

/* 모바일 서브메뉴 스타일 */
.mobile-menu .mobile-submenu {
	display: none;
	list-style: none;
	background: #f8f9fa;
	padding: 0;
	margin: 0;
}

.mobile-menu .has-submenu.active .mobile-submenu {
	display: block;
	animation: slideDown 0.3s ease;
}

.mobile-menu .mobile-submenu li {
	border-bottom: 1px solid #e0e0e0;
}

.mobile-menu .mobile-submenu li:last-child {
	border-bottom: none;
}

.mobile-menu .mobile-submenu a {
	padding: 12px 30px 12px 50px;
	font-size: 15px;
	color: #555;
}

.mobile-menu .mobile-submenu a:hover {
	background: #e9ecef;
	color: #007bff;
}

.mobile-menu .mobile-menu-parent {
	position: relative;
}

.mobile-menu .mobile-menu-parent::after {
	content: '\f107';
	font-family: 'Font Awesome 6 Free';
	font-weight: 900;
	position: absolute;
	right: 30px;
	top: 50%;
	transform: translateY(-50%);
	transition: transform 0.3s ease;
}

.mobile-menu .has-submenu.active .mobile-menu-parent::after {
	transform: translateY(-50%) rotate(180deg);
}

@keyframes slideDown {
	from {
		opacity: 0;
		max-height: 0;
	}
	to {
		opacity: 1;
		max-height: 200px;
	}
}

.mobile-contact {
	display: block;
	padding: 15px 30px;
	background: #007bff;
	color: white;
	text-align: center;
	font-size: 18px;
	font-weight: 600;
	text-decoration: none;
}

/* 모바일 반응형 */
@media (max-width: 1024px) {
	.nav-menu {
		gap: 30px;
	}

	.nav-menu a {
		font-size: 16px;
	}
}

@media (max-width: 768px) {
	.header-nav {
		height: 60px;
	}

	.header-nav.scrolled {
		height: 60px;
	}

	.nav-container {
		padding: 0 20px;
	}

	.nav-logo a {
		font-size: 20px;
	}

	.nav-logo img {
		height: 45px;
	}

	.nav-menu {
		display: none;
	}

	.nav-contact {
		display: none;
	}

	.mobile-menu-btn {
		display: block;
	}

	.mobile-menu {
		top: 60px;
		max-height: calc(100vh - 60px); /* 모바일에서 헤더 높이 60px 제외 */
	}

	.nav-right {
		display: none;
	}
}

/* ==================== 로그인/로그아웃 버튼 스타일 ==================== */

/* 우측 영역 (전화번호 + 로그인/로그아웃) */
.nav-right {
	display: flex;
	align-items: center;
	gap: 20px;
}

/* 사용자 정보 영역 */
.user-info {
	display: flex;
	align-items: center;
	gap: 12px;
}

/* 사용자 이름 */
.user-name {
	display: flex;
	align-items: center;
	gap: 6px;
	color: #333;
	font-size: 14px;
	font-weight: 500;
}

.user-name i {
	font-size: 18px;
	color: #667eea;
}

/* 로그인 버튼 (아이콘만, 배경 없음) */
.btn-login {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	height: auto;
	padding: 0;
	background: none;
	color: #333 !important;
	border-radius: 0;
	font-size: 24px;
	text-decoration: none;
	transition: all 0.3s ease;
}

.btn-login:hover {
	color: #667eea !important;
	transform: scale(1.15);
}

.btn-login i {
	font-size: 24px;
}

/* 로그아웃 버튼 */
.btn-logout {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	background: #ff6b6b;
	color: white !important;
	border-radius: 25px;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	transition: all 0.3s ease;
	box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.btn-logout:hover {
	background: #ee5a52;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.btn-logout i {
	font-size: 14px;
}

/* 상담관리 버튼 */
.btn-admin {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
	color: white !important;
	border-radius: 25px;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	transition: all 0.3s ease;
	box-shadow: 0 2px 8px rgba(240, 147, 251, 0.3);
}

.btn-admin:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(240, 147, 251, 0.4);
}

.btn-admin i {
	font-size: 14px;
}

/* 투명 헤더일 때 버튼 스타일 */
.main-page .header-nav.transparent .user-name {
	color: white;
}

.main-page .header-nav.transparent .user-name i {
	color: white;
}

.main-page .header-nav.transparent:hover .user-name {
	color: #333;
}

.main-page .header-nav.transparent:hover .user-name i {
	color: #667eea;
}

/* 투명 헤더일 때 로그인 버튼 */
.main-page .header-nav.transparent .btn-login {
	color: white !important;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.main-page .header-nav.transparent .btn-login:hover {
	color: #667eea !important;
	text-shadow: none;
	filter: none;
}

/* 투명 헤더에 hover 시 로그인 버튼 */
.main-page .header-nav.transparent:hover .btn-login {
	color: #333 !important;
	text-shadow: none;
	filter: none;
}

.main-page .header-nav.transparent:hover .btn-login:hover {
	color: #667eea !important;
}

/* 스크롤 시 로그인 버튼 */
.main-page .header-nav.scrolled .btn-login {
	color: #333 !important;
}

.main-page .header-nav.scrolled .btn-login:hover {
	color: #667eea !important;
}

/* 모바일: 사용자 정보 */
.mobile-user-info {
	padding: 15px 20px;
	background: rgba(102, 126, 234, 0.1);
	border-left: 4px solid #667eea;
}

.mobile-user-info span {
	display: flex;
	align-items: center;
	gap: 8px;
	color: #333;
	font-weight: 500;
}

.mobile-user-info i {
	font-size: 18px;
	color: #667eea;
}

/* 모바일: 로그인 버튼 */
.mobile-login {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
	color: white !important;
	font-weight: 500 !important;
	text-align: center;
	border-radius: 8px;
	margin: 10px 20px;
	padding: 15px !important;
}

.mobile-login i {
	margin-right: 8px;
}

/* 모바일: 로그아웃 버튼 */
.mobile-logout {
	background: #ff6b6b !important;
	color: white !important;
	font-weight: 500 !important;
	text-align: center;
	border-radius: 8px;
	margin: 10px 20px;
	padding: 15px !important;
}

.mobile-logout i {
	margin-right: 8px;
}

/* 데스크톱에서 전화번호와 로그인 버튼 간격 조정 */
@media (min-width: 1025px) {
	.nav-contact {
		margin-right: 0;
	}
}

/* 태블릿에서 로그인/로그아웃 버튼 조정 */
@media (max-width: 1024px) and (min-width: 769px) {
	.nav-right {
		gap: 15px;
	}

	.user-name {
		font-size: 13px;
	}

	.btn-login i {
		font-size: 22px;
	}

	.btn-logout,
	.btn-admin {
		padding: 7px 14px;
		font-size: 13px;
	}
}

/* 모바일에서 nav-right 완전히 숨김 */
@media (max-width: 768px) {
	.nav-right {
		display: none !important;
	}
}
