/* ================================================
   HEADER ENHANCEMENTS CSS - Directory Optimized
   Enhanced styles for header elements using -enh suffix
   Minimal CSS to avoid conflicts with existing styles
   ================================================ */

/* CSS Variables */
:root {
	--org: #F26122;
	--menu: #33334C;
	--transition-speed: 0.3s;
}

/* Logo - Enhanced with responsive sizing and hover effect */
.logo-enh {
	cursor: pointer;
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
	.logo-enh:hover {
		transform: scale(1.02);
	}
}

.logo-enh img {
	width: 13.375rem;
	min-width: 195px;
	max-width: 230px;
	height: auto;
	display: block;
	object-fit: contain;
}

/* Responsive Logo Sizing */
/* Tablet: 769px to 991px - smooth transition from desktop */
@media (max-width: 991px) and (min-width: 769px) {
	.logo-enh img {
		width: clamp(10rem, 14vw, 12rem);
		max-width: 192px;
	}
}

/* Mobile logo sizing - starts at 768px so logo is mobile size when hamburger appears at 767px */
/* This prevents jump: logo reaches mobile size at 768px, hamburger appears at 767px */
@media (max-width: 768px) {
	.logo-enh img {
		width: clamp(8.5rem, 25vw, 10rem);
		max-width: 160px;
	}
}

@media (max-width: 380px) {
	.logo-enh img {
		width: clamp(7rem, 35vw, 8.5rem);
		max-width: 136px;
	}
}

/* Menu Icon - Make it thinner and smaller (as requested) */
.top_right_menu .menu_icon-enh {
	padding: 0;
	vertical-align: middle;
	margin-left: 0.25rem;
}

.top_right_menu .menu_icon-enh a {
	display: inline-flex;
	align-items: center;
}

.top_right_menu .menu_icon-enh a i {
	font-size: 1.875rem; /* 30px - thinner than original 47px */
	font-weight: 300; /* Make it thinner as requested */
	transition: color var(--transition-speed) ease;
	margin-left: -0.25rem;
}

@media (hover: hover) and (pointer: fine) {
	.top_right_menu .menu_icon-enh a:hover i {
		color: var(--org);
	}
}

/* Dropdown Styles - Enhanced with smooth animations */
.has_dropdown-enh {
	position: relative;
	display: inline-block;
}

.has_dropdown-enh .dropdown-menu-enh {
	position: absolute;
	top: 100%;
	left: 0;
	background-color: #fff;
	min-width: 10rem;
	box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
	z-index: 999999;
	padding: 0.375rem 0;
	margin: 0;
	border-radius: 0.3125rem;
	border: 1px solid rgba(0, 0, 0, 0.05);
	visibility: hidden;
	opacity: 0;
	transform: translateY(-0.625rem);
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s 0.25s;
	display: block;
	flex-direction: column;
}

.has_dropdown-enh .dropdown-menu-enh li {
	padding: 0;
	list-style: none;
	display: block;
	margin: 0;
}

.has_dropdown-enh .dropdown-menu-enh li a {
	color: #333;
	text-decoration: none;
	display: block;
	font-size: 0.875rem;
	padding: 0.5rem 0.8125rem;
	transition: none;
	border-left: 4px solid transparent;
	font-weight: 400;
	background: transparent;
	white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
	.has_dropdown-enh .dropdown-menu-enh li a:hover {
		background: linear-gradient(to right, rgba(242, 97, 34, 0.2), rgba(255, 255, 255, 0.2));
		border-left: 4px solid #f26122;
		color: #f26122;
	}
}

/* Click toggle - works on all screen sizes */
.has_dropdown-enh.mobile-open .dropdown-menu-enh {
	visibility: visible;
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.has_dropdown-enh.mobile-closed .dropdown-menu-enh {
	visibility: hidden;
	opacity: 0;
	transform: translateY(-0.625rem);
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s 0.25s;
}

/* Hover - only works on devices with mouse/trackpad */
@media (hover: hover) and (pointer: fine) {
	.has_dropdown-enh:not(.mobile-open):not(.mobile-closed):hover .dropdown-menu-enh {
		visibility: visible;
		opacity: 1;
		transform: translateY(0);
		transition: opacity 0.25s ease, transform 0.25s ease;
	}
}

/* Login icon dropdown - right-aligned */
.last_header_menu-enh .dropdown-menu-enh {
	left: auto;
	right: 0;
	min-width: 12rem;
	width: max-content;
}

/* Mobile Menu Dropdown Enhancements */
@media (max-width: 700px) {
	/* Mobile dropdown menus */
	.side_menu .has_dropdown-enh .dropdown-menu-enh {
		position: static;
		box-shadow: none;
		background: #f9f9f9;
		margin-top: 0.5rem;
		margin-left: 1rem;
		min-width: 100%;
		border: none;
		padding: 0.5rem 0;
		display: none;
		opacity: 0;
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.3s ease, opacity 0.3s ease;
	}
	
	.side_menu .has_dropdown-enh.mobile-open .dropdown-menu-enh {
		display: block;
		opacity: 1;
		max-height: 1000px;
	}
	
	.side_menu .dropdown-menu-enh li {
		border-bottom: none;
		margin: 0;
		padding: 0;
	}
	
	.side_menu .dropdown-menu-enh li a {
		font-size: 0.8125rem;
		padding: 0.4375rem 1rem;
		padding-left: 1.75rem;
		color: #666;
		transition: background-color 0.2s ease, padding-left 0.2s ease, color 0.2s ease;
	}
	
	/* Active state for dropdown items */
	.side_menu .dropdown-menu-enh li a:active,
	.side_menu .dropdown-menu-enh li a.clicked {
		background: linear-gradient(to right, rgba(242, 97, 34, 0.2), transparent);
		padding-left: 2.25rem;
		color: var(--org);
	}
}

/* Navbar Container - Enhanced */
.flex-container-enh {
	display: flex;
	gap: 1rem;
}

.top_head .flex-container-enh {
	justify-content: space-between;
	align-items: center;
}

/* Top Right Menu - Enhanced */
.top_right_menu-enh {
	flex: 1;
	display: flex;
	justify-content: flex-end;
}

.top_right_menu-enh li {
	margin: 0 0.9375rem;
	padding: 0.75rem 0;
}

.top_right_menu-enh li a {
	color: var(--menu);
	font-size: 1rem;
	line-height: 1.3;
	font-weight: 400;
	letter-spacing: 0.01875rem;
	transition: color var(--transition-speed) ease;
	white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
	.top_right_menu-enh li a:hover {
		color: var(--org);
	}
}

.top_right_menu-enh li a i {
	margin-left: 0.3125rem;
	font-size: 0.75rem;
}

.top_right_menu-enh.li_m li {
	text-transform: uppercase;
}

/* Side Menu - Enhanced (Desktop) */
.side_menu-enh {
	display: flex;
}

/* Menu Button - Enhanced */
.top_right_menu-enh .menu_button a {
	background: var(--org);
	color: #fff;
	border: 1px solid var(--org);
	font-size: 0.875rem;
	border-radius: 0.3125rem;
	padding: 0.5625rem 1rem;
	transition: all var(--transition-speed) ease;
	font-weight: 500;
}

@media (hover: hover) and (pointer: fine) {
	.top_right_menu-enh .menu_button a:hover {
		background: #fff;
		color: var(--org);
	}
}

/* Large Desktop (above 1200px) */
@media (min-width: 1200px) {
	.top_right_menu-enh li {
		margin: 0 0.9375rem;
	}
	
	.top_right_menu-enh li a {
		font-size: 1rem;
	}
}

/* Tablet Responsive (701-991px) */
@media (max-width: 991px) and (min-width: 701px) {
	.top_right_menu-enh li {
		margin: 0 clamp(0.375rem, 0.8vw, 0.625rem);
		padding: 0.5rem 0;
	}
	
	.top_right_menu-enh li a {
		font-size: clamp(0.8125rem, 0.95vw, 0.9375rem);
	}
	
	.top_right_menu-enh .menu_button a {
		font-size: 0.8125rem;
		padding: 0.4375rem 0.75rem;
	}
	
	.has_dropdown-enh .dropdown-menu-enh {
		min-width: 8.5rem;
	}
	
	.has_dropdown-enh .dropdown-menu-enh li a {
		font-size: 0.8125rem;
		padding: 0.375rem 0.625rem;
	}
}

/* Mobile Responsive (below 701px) */
@media (max-width: 700px) {
	.top_right_menu-enh {
		justify-content: flex-end;
	}
	
	.top_right_menu-enh li {
		margin: 0 0.25rem;
		padding: 0.375rem 0;
	}
	
	/* Mobile side menu styles */
	.side_menu-enh {
		width: clamp(12rem, 18vw, 16.875rem);
		position: fixed !important;
		background: white;
		top: 0 !important;
		left: clamp(-16.875rem, -18vw, -12rem);
		height: 100vh;
		z-index: 999;
		box-shadow: 0 0.625rem 1.25rem 0.625rem rgba(0, 0, 0, 0.1);
		transition: left 0.5s ease;
		padding: 1.5625rem;
		display: flex;
		flex-direction: column;
		overflow-y: auto;
		pointer-events: auto;
		transform: translateZ(0) !important;
		will-change: transform;
	}
	
	.side_menu-enh.activepanel {
		left: 0 !important;
		transform: translateZ(0) !important;
		position: fixed !important;
		top: 0 !important;
		display: flex !important;
		visibility: visible !important;
		opacity: 1 !important;
		z-index: 999 !important;
	}
	
	.side_menu-enh li {
		width: 100%;
		margin: 0.625rem 0;
		padding: 0.3125rem 0;
		border-bottom: 1px solid #f0f0f0;
		display: block !important;
	}
	
	.side_menu-enh li:last-child {
		border-bottom: none;
	}
	
	.side_menu-enh li a {
		font-size: 0.875rem;
		padding: 0.5rem 0;
		padding-left: 1rem;
		display: block;
		width: 100%;
		transition: background-color 0.2s ease, padding-left 0.2s ease;
		text-transform: uppercase;
	}
	
	.side_menu-enh li a:active,
	.side_menu-enh li a.clicked {
		background: linear-gradient(to right, rgba(242, 97, 34, 0.15), transparent);
		padding-left: 1.5rem;
	}
	
	.side_menu-enh .menu_button a {
		background: var(--org);
		color: #fff;
		border-radius: 0.3125rem;
		padding: 0.625rem 1rem;
		margin: 0.5rem 0;
		margin-left: 1rem;
		display: inline-block;
		width: auto;
		font-weight: 500;
		text-align: center;
	}
	
	.side_menu-enh .menu_button a:active,
	.side_menu-enh .menu_button a.clicked {
		background: #fff;
		color: var(--org);
		border: 1px solid var(--org);
		padding-left: 1rem;
	}
}
