/* ================================================================
   HEADER - BASE STYLES
   ================================================================ */

#site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	
	/* Layout */
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	max-width: 100%;
	height: var(--header-height);
	padding: 0 4rem;
	
	/* Visual */
	background: rgba(10, 10, 10, 0.95);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* ================================================================
   LOGO
   ================================================================ */

.logo {
	position: relative;
	z-index: 1001;
	font-size: 1.5rem;
	font-weight: bold;
	background: linear-gradient(135deg, var(--main-color) 0%, #764ba2 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

/* ================================================================
   NAVIGATION MENU
   ================================================================ */

.nav-menu {
	display: flex;
	gap: 2rem;
	list-style: none;
}

.nav-menu a {
	position: relative;
	color: white;
	text-decoration: none;
	font-size: 1rem;
	transition: color 0.3s;
}

.nav-menu a::after {
	content: '';
	position: absolute;
	bottom: -5px;
	left: 0;
	width: 0;
	height: 2px;
	background: var(--main-color);
	transition: width 0.3s;
}

.nav-menu a:hover::after {
	width: 100%;
}

/* Active states */
.nav-menu a.active,
.nav-menu li.active > a,
.nav-menu li.active.has-children ul.sub-menu li.sub-item.active > a {
	color: var(--main-color);
}

.nav-menu li.active > ul li a {
	color: #fff;
}

/* ================================================================
   SUBMENU (Desktop)
   ================================================================ */

.sub-menu {
	list-style: none;
}

/* ================================================================
   HAMBURGER BUTTON (Mobile)
   ================================================================ */

.nav-toggle {
	display: none;
	flex-direction: column;
	gap: 5px;
	position: relative;
	z-index: 1001;
	background: none;
	border: none;
	cursor: pointer;
	padding: 10px;
}

.nav-toggle span {
	display: block;
	width: 25px;
	height: 2px;
	background: white;
	transform-origin: center;
	transition: all 0.3s ease;
}

/* Hamburger to X animation */
.nav-toggle.active span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
	opacity: 0;
	transform: scaleX(0);
}

.nav-toggle.active span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ================================================================
   MOBILE OVERLAY
   ================================================================ */

.nav-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	background: rgba(0, 0, 0, 0.7);
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
	z-index: 999;
}

.nav-overlay.active {
	opacity: 1;
	visibility: visible;
}

/* ================================================================
   MEDIA QUERIES
   ================================================================ */

/* Desktop (min-width: 768px) */
@media (min-width: 768px) {
	.nav-menu li {
		position: relative;
		display: inline-block;
	}
	
	.sub-menu {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		min-width: 200px;
		padding: 2rem 0 1rem 0;
		background: #000;
		z-index: 999;
	}
	
	.sub-menu li {
		margin: .5rem 0;
		padding: 0 1rem;
	}
	
	.sub-menu li a {
		display: block;
		white-space: nowrap;
	}
	
	.nav-menu li:hover .sub-menu {
		display: block;
	}
}

/* Tablet & Mobile (max-width: 768px) */
@media (max-width: 768px) {
	#site-header {
		height: 60px;
		padding: 0 1.5rem;
	}
	
	.logo {
		font-size: 1.2rem;
	}
	
	/* Show hamburger button */
	.nav-toggle {
		display: flex;
	}
	
	/* Mobile navigation */
	nav {
		position: fixed;
		top: 0;
		right: -100%;
		width: 100%;
		max-width: 400px;
		height: 100vh;
		padding: 80px 2rem 2rem;
		background: rgba(10, 10, 10, 0.98);
		backdrop-filter: blur(20px);
		border-left: 1px solid rgba(255, 255, 255, 0.1);
		overflow-y: auto;
		transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
		z-index: 1000;
	}
	
	nav.active {
		right: 0;
	}
	
	.nav-menu {
		flex-direction: column;
		gap: 0;
	}
	
	.nav-menu li {
		border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	}
	
	.nav-menu a {
		display: block;
		padding: 1.2rem 0;
		font-size: 1.1rem;
	}
	
	.nav-menu a::after {
		display: none;
	}
	
	/* Submenu mobile */
	.sub-menu {
		padding: 0;
	}
	
	.sub-menu a::before {
		content: "- ";
	}
}

/* Small Mobile (max-width: 375px) */
@media (max-width: 375px) {
	#site-header {
		height: 55px;
		padding: 0 1rem;
	}
	
	.logo {
		font-size: 1rem;
	}
}