/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.header {
	width: 100%;
	background: rgba(255, 255, 255, 0.15);
	backdrop-filter: blur(20px) saturate(180%);
	-webkit-backdrop-filter: blur(20px) saturate(180%);
	box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
	position: sticky;
	top: 0;
	z-index: 1000;
	transition: all var(--transition-base);
	border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.header:hover {
	box-shadow: 0 6px 30px rgba(0, 0, 0, 0.12);
}

.navbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.5rem 1cqmax;
	max-width: 1400px;
	margin: 0 auto;
	position: relative;
	min-height: 60px;
}

.nav-brand {
	flex-shrink: 0;
	z-index: 1001;
}

.src_image {
	height: 40px;
	width: auto;
	max-width: 240px;
	transition: transform var(--transition-base);
	border-radius: var(--radius-md);
}

.src_image:hover {
	transform: scale(1.05);
}

.nav-links {
	flex: 1;
	display: flex;
	justify-content: flex-end;
	position: relative;
}

.nav-menu {
	display: flex;
	list-style: none;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	margin-left: 0px;
}

.nav-link {
	display: inline-block;
	padding: 0.5rem 1rem;
	font-size: clamp(0.875rem, 1vw, 0.9375rem);
	font-weight: 500;
	color: var(--text-primary);
	text-decoration: none;
	border-radius: var(--radius-full);
	transition: all var(--transition-base);
	position: relative;
	white-space: nowrap;
}

.nav-link::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: var(--radius-full);
	background: var(--gradient-primary);  /* Button background for hover effect */
	opacity: 0;
	transition: opacity var(--transition-base);
	z-index: -1;
}

.nav-link:hover {
	color: white;
	transform: translateY(-2px);
}

.nav-link:hover::before {
	opacity: 1;
}

/* Ensure nav links are always visible - override any conflicting styles */
.nav-link {
	color: var(--text-primary) !important;
}

.nav-link:hover {
	color: white !important;
}

.nav-link-primary {
	color: white !important;
}

.nav-link-primary {
	background: var(--gradient-primary);
	color: white !important;
	font-weight: 600;
	box-shadow: var(--shadow-md);
}

.nav-link-primary::before {
	opacity: 1;
}

.nav-link-primary:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow-lg);
}

.nav-link-secondary {
	color: white !important;
	background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
	font-weight: 600;
	box-shadow: var(--shadow-md);
}

.nav-link-secondary::before {
	opacity: 1;
}

.nav-link-secondary:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow-lg);
	color: white !important;
}

.user_logged {
	color: var(--primary-color) !important;
	font-weight: 600;
}

.user_logged::before {
	background: transparent;
}

.user_logged:hover {
	color: var(--primary-dark) !important;
	background: rgba(99, 102, 241, 0.1);
}

/* ============================================
   USER PROFILE DROPDOWN
   ============================================ */

.user-profile-container {
	position: relative;
	list-style: none;
	margin-left: var(--spacing-sm);
}

.user-profile-wrapper {
	position: relative;
}

.user-profile-trigger {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	background: var(--gradient-primary);
	border: none;
	border-radius: var(--radius-full);
	color: white;
	cursor: pointer;
	transition: all var(--transition-base);
	box-shadow: var(--shadow-md);
	font-size: clamp(0.875rem, 1vw, 0.9375rem);
	font-weight: 500;
	white-space: nowrap;
}

.user-profile-trigger:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-lg);
}

.user-profile-trigger.active {
	box-shadow: var(--shadow-lg);
}

.user-avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	font-size: 1.5rem;
	color: white;
}

.user-name {
	font-weight: 600;
	max-width: 120px;
	overflow: hidden;
	text-overflow: ellipsis;
}

.user-dropdown-icon {
	font-size: 0.75rem;
	transition: transform var(--transition-base);
}

.user-profile-trigger.active .user-dropdown-icon {
	transform: rotate(180deg);
}

.user-dropdown-menu {
	position: absolute;
	top: calc(100% + 0.5rem);
	right: 0;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(20px) saturate(180%);
	-webkit-backdrop-filter: blur(20px) saturate(180%);
	border-radius: var(--radius-lg);
	box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
	border: 1px solid rgba(255, 255, 255, 0.18);
	min-width: 200px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: all var(--transition-base);
	z-index: 1002;
	overflow: hidden;
}

.user-dropdown-menu.active {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.dropdown-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.875rem 1.25rem;
	color: var(--text-primary);
	text-decoration: none;
	transition: all var(--transition-base);
	font-size: var(--fs-base);
	font-weight: 500;
	border: none;
	background: none;
	width: 100%;
	text-align: left;
	cursor: pointer;
}

.dropdown-item i {
	width: 20px;
	text-align: center;
	color: var(--primary-color);
	font-size: 1rem;
}

.dropdown-item:hover {
	background: rgba(99, 102, 241, 0.1);
	color: var(--primary-color);
}

.dropdown-item-danger {
	color: #ef4444;
}

.dropdown-item-danger i {
	color: #ef4444;
}

.dropdown-item-danger:hover {
	background: rgba(239, 68, 68, 0.1);
	color: #dc2626;
}

.dropdown-divider {
	height: 1px;
	background: rgba(0, 0, 0, 0.1);
	margin: 0.5rem 0;
}

/* Dark theme support for dropdown */
.dark-theme .user-dropdown-menu {
	background: rgba(30, 30, 30, 0.95);
	border-color: rgba(255, 255, 255, 0.1);
}

.dark-theme .dropdown-item {
	color: var(--text-primary);
}

.dark-theme .dropdown-item:hover {
	background: rgba(99, 102, 241, 0.2);
}

.dark-theme .dropdown-divider {
	background: rgba(255, 255, 255, 0.1);
}

/* ============================================
   NAV BAR THEME TOGGLE
   ============================================ */

.theme-toggle-nav {
	list-style: none;
	margin-left: var(--spacing-sm);
}

.nav-theme-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--gradient-primary);
	border: none;
	color: white;
	cursor: pointer;
	box-shadow: var(--shadow-md);
	transition: all var(--transition-base);
	font-size: 0.95rem;
	padding: 0;
	position: relative;
	overflow: hidden;
	flex-shrink: 0;
}

.nav-theme-toggle::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.2);
	transform: translate(-50%, -50%);
	transition: width 0.6s, height 0.6s;
	z-index: 1;
}

.nav-theme-toggle:hover::before {
	width: 100px;
	height: 100px;
}

.nav-theme-toggle:hover {
	transform: scale(1.1) rotate(180deg);
	box-shadow: var(--shadow-lg);
}

.nav-theme-toggle:hover i,
.nav-theme-toggle:hover span {
	color: white;
	transform: rotate(180deg);
}

.nav-theme-toggle:active {
	transform: scale(0.95);
}

.nav-theme-toggle i,
.nav-theme-toggle span {
	position: relative;
	z-index: 2;
	transition: transform var(--transition-base);
	color: white !important;
	font-size: 1.2rem;
	display: inline-block;
	line-height: 1;
	width: auto;
	height: auto;
	font-weight: normal;
}

/* ============================================
   MOBILE MENU TOGGLE
   ============================================ */

.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: space-around;
	width: 30px;
	height: 30px;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 0;
	z-index: 1001;
	position: relative;
}

.nav-toggle span {
	width: 100%;
	height: 3px;
	background: var(--primary-color);
	border-radius: var(--radius-full);
	transition: all var(--transition-base);
	transform-origin: center;
}

.nav-toggle.active span:nth-child(1) {
	transform: rotate(45deg) translate(8px, 8px);
}

.nav-toggle.active span:nth-child(2) {
	opacity: 0;
	transform: translateX(-20px);
}

.nav-toggle.active span:nth-child(3) {
	transform: rotate(-45deg) translate(7px, -7px);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 968px) {
	.navbar {
		padding: 1rem 1.5rem;
	}
	
	.nav-menu {
		gap: 0.25rem;
	}
	
	.nav-link {
		padding: 0.5rem 1rem;
		font-size: var(--fs-sm);
	}
}

@media (min-width: 768px) and (max-width: 926px) {
	.src_image {
		max-width: 100px;
		height: 30px;
		object-fit: contain;
	}
}

@media (max-width: 768px) {
	.nav-toggle {
		display: flex;
	}
	
	.nav-links {
		position: fixed;
		top: 60px;
		right: 0;
		width: 280px;
		height: calc(100vh - 60px);
		background: rgba(255, 255, 255, 0.15);
		backdrop-filter: blur(20px) saturate(180%);
		-webkit-backdrop-filter: blur(20px) saturate(180%);
		box-shadow: -4px 0 32px 0 rgba(31, 38, 135, 0.37);
		border-left: 1px solid rgba(255, 255, 255, 0.18);
		overflow-y: auto;
		z-index: 1000;
		transform: translateX(100%);
		transition: transform var(--transition-base);
		visibility: visible;
		opacity: 1;
	}
	
	.nav-links.active {
		transform: translateX(0);
	}
	
	.nav-menu {
		flex-direction: column;
		align-items: stretch;
		padding: 2rem 1.5rem;
		gap: 0.5rem;
		width: 100%;
	}
	
	.nav-link {
		display: block;
		padding: 1rem 1.25rem;
		border-radius: var(--radius-lg);
		width: 100%;
		text-align: left;
		font-size: var(--fs-base);
	}
	
	.nav-link::before {
		border-radius: var(--radius-lg);
	}
	
	.nav-link:hover {
		transform: translateX(5px);
	}
	
	.nav-link-primary {
		text-align: center;
	}
	
	.user-profile-container {
		margin-left: 0;
		width: 100%;
	}
	
	.user-profile-trigger {
		width: 100%;
		justify-content: center;
		padding: 1rem 1.25rem;
		border-radius: var(--radius-lg);
	}
	
	.user-dropdown-menu {
		position: static;
		width: 100%;
		margin-top: 0.5rem;
		transform: none;
		box-shadow: none;
		border: none;
		background: rgba(255, 255, 255, 0.1);
	}
	
	.user-dropdown-menu.active {
		transform: none;
	}
	
	.theme-toggle-nav {
		margin-left: 0;
		margin-top: var(--spacing-md);
		width: 100%;
		display: flex;
		justify-content: center;
	}
	
	.nav-theme-toggle {
		width: 100%;
		max-width: 200px;
		height: 50px;
		border-radius: var(--radius-lg);
	}
	
	body.menu-open {
		overflow: hidden;
	}
	
	body.menu-open::before {
		content: '';
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.5);
		z-index: 999;
		backdrop-filter: blur(4px);
	}
}

@media (max-width: 480px) {
	.navbar {
		padding: 0.75rem 1rem;
	}
	
	.src_image {
		height: 40px;
		max-width: 200px;
	}
	
	.nav-links {
		top: 55px;
		height: calc(100vh - 55px);
		width: 100%;
		right: 0;
		transform: translateX(100%);
		transition: transform var(--transition-base);
		visibility: visible;
		opacity: 1;
	}
	
	.nav-links.active {
		transform: translateX(0);
	}
	
	.nav-menu {
		padding: 1.5rem 1rem;
	}
	
	.nav-link {
		padding: 0.875rem 1rem;
		font-size: var(--fs-base);
	}
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes slideInRight {
	from {
		opacity: 0;
		transform: translateX(20px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

.nav-links.active .nav-menu li {
	animation: slideInRight 0.3s ease-out forwards;
	opacity: 0;
}

.nav-links.active .nav-menu li:nth-child(1) { animation-delay: 0.05s; }
.nav-links.active .nav-menu li:nth-child(2) { animation-delay: 0.1s; }
.nav-links.active .nav-menu li:nth-child(3) { animation-delay: 0.15s; }
.nav-links.active .nav-menu li:nth-child(4) { animation-delay: 0.2s; }
.nav-links.active .nav-menu li:nth-child(5) { animation-delay: 0.25s; }
.nav-links.active .nav-menu li:nth-child(6) { animation-delay: 0.3s; }
.nav-links.active .nav-menu li:nth-child(7) { animation-delay: 0.35s; }
