/* ===================================
   AUFG GLOBAL HEADER STYLES
   Replicates Elementor Header Design
   =================================== */

/* Import Global Colors */
@import url('global-colors.css');
@import url('global-poppins-font.css');

/* ===== BASE HEADER STRUCTURE ===== */
.aufg-global-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 9998;
	min-height: 123px;
	background: linear-gradient(180deg, #054780E5 0%, #1169B500 100%);
	transition: background 0.3s ease, min-height 0.3s ease, padding 0.3s ease;
	transform: translateY(0);
	font-family: "Poppins", sans-serif;
}

/* Remove all default browser outlines */
.aufg-global-header *:focus,
.aufg-global-header *:active {
	outline: none !important;
	-webkit-tap-highlight-color: transparent !important;
}

.aufg-header-wrapper {
	width: 100%;
	max-width: 100%;
	padding: 0;
}

.aufg-header-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 40px;
	gap: 30px;
}

/* ===== LOGO SECTION ===== */
.aufg-logo-section {
	flex-shrink: 0;
}

.aufg-logo-link {
	display: inline-block;
	text-decoration: none;
	transition: all 0.3s ease;
}

.aufg-logo {
	max-width: 130px;
	max-height: 80px;
	width: auto;
	height: auto;
	display: block;
	transition: all 0.3s ease;
}

.aufg-logo-link:hover {
	transform: translateY(-2px);
	filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

/* ===== NAVIGATION SECTION ===== */
.aufg-nav-section {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

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

.aufg-nav-item {
	position: relative;
	margin: 0;
}

.aufg-nav-link {
	display: flex;
	align-items: center;
	padding: 13px 20px;
	color: #FFFFFF;
	text-decoration: none;
	font-size: 16px;
	font-weight: 400;
	transition: all 0.3s ease;
	position: relative;
	white-space: nowrap;
	outline: none !important;
}

/* Navigation Link Hover Effects */
.aufg-nav-link::before {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 50%;
	width: 0;
	height: 3px;
	background: linear-gradient(90deg, #038BB9 0%, #1169B5 100%);
	transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	transform: translateX(-50%);
	border-radius: 2px;
	box-shadow: 0 2px 8px rgba(3, 139, 185, 0.3);
}

.aufg-nav-link::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(135deg, rgba(3, 139, 185, 0.08) 0%, rgba(17, 105, 181, 0.08) 100%);
	border-radius: 8px;
	opacity: 0;
	transition: opacity 0.3s ease;
	z-index: -1;
}

.aufg-nav-link:hover,
.aufg-nav-link:focus,
.aufg-nav-link.active {
	color: #F8F9FA;
	transform: translateY(-2px);
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.aufg-nav-link:hover::before,
.aufg-nav-link:focus::before,
.aufg-nav-link.active::before {
	width: 100%;
}

.aufg-nav-link:hover::after,
.aufg-nav-link:focus::after,
.aufg-nav-link.active::after {
	opacity: 1;
}

/* Dropdown Arrow - Font Awesome Chevron */
.aufg-nav-link .fa-chevron-down {
	position: relative;
	display: inline-block;
	width: 12px;
	height: 12px;
	margin-left: 6px;
	vertical-align: middle;
	font-size: 0; /* Hide any text content */
}

/* Hide default FontAwesome icon */
.aufg-nav-link .fa-chevron-down:before {
	display: none;
}

/* Create CSS triangle chevron with animation */
.aufg-nav-link .fa-chevron-down:after {
	content: "";
	position: absolute;
	top: 3px;
	left: 2px;
	display: block;
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
	transition: transform 0.3s ease;
	transform-origin: center;
}

/* Rotate chevron 180 degrees on hover */
.aufg-nav-item:hover .fa-chevron-down:after {
	transform: rotate(180deg);
}

/* Dropdown Menu - Exact Elementor Match */
.aufg-dropdown-menu {
	position: absolute;
	top: 100%;
	left: 0;
	background: #ffffff;
	border: 1px solid rgba(3, 139, 185, 0.15);
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(3, 139, 185, 0.15);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	z-index: 9999;
	width: 320px;
	max-width: 320px;
	padding: 12px 0;
	list-style: none;
	margin: 2px 0 0 0;
	overflow: hidden;
}

/* Add invisible hover area to prevent dropdown disappearing */
.aufg-dropdown-menu::before {
	content: '';
	position: absolute;
	top: -10px;
	left: 0;
	right: 0;
	height: 10px;
	background: transparent;
}

.aufg-has-dropdown:hover .aufg-dropdown-menu,
.aufg-dropdown-menu:hover {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.aufg-dropdown-menu li {
	margin: 0;
	width: 100%;
	border-bottom: 1px solid rgba(3, 139, 185, 0.08);
	list-style: none;
}

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

/* Dropdown links with title/description structure */
.aufg-dropdown-menu a {
	display: block;
	padding: 16px 20px;
	color: #334155;
	text-decoration: none;
	transition: all 0.3s ease;
	border-radius: 8px;
	margin: 0 8px;
	position: relative;
	box-sizing: border-box;
}

.aufg-dropdown-menu a:hover {
	background: linear-gradient(135deg, rgba(3, 139, 185, 0.08) 0%, rgba(17, 105, 181, 0.08) 100%);
	color: #038BB9;
	transform: translateX(4px);
	text-shadow: none;
}

/* Dropdown content structure */
.aufg-dropdown-content {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.aufg-dropdown-title {
	font-weight: 600;
	font-size: 16px;
	color: #1e293b;
	text-shadow: none;
}

.aufg-dropdown-description {
	font-size: 13px;
	color: #64748b;
	font-weight: 400;
	line-height: 1.4;
	text-shadow: none;
	word-wrap: break-word;
	white-space: normal;
	overflow-wrap: break-word;
}

.aufg-dropdown-menu a:hover .aufg-dropdown-title {
	color: #038BB9;
	text-shadow: none;
}

.aufg-dropdown-menu a:hover .aufg-dropdown-description {
	text-shadow: none;
}

/* ===== MOBILE MENU TOGGLE ===== */
.aufg-mobile-toggle {
	display: none;
	background: none;
	border: none;
	padding: 10px;
	cursor: pointer;
	z-index: 1001;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	width: 40px;
	height: 40px;
}

.aufg-mobile-toggle span {
	display: block;
	width: 24px;
	height: 2px;
	background: #FFFFFF;
	margin: 3px 0;
	transition: all 0.3s ease;
	transform-origin: center;
}

/* Active state - hamburger to X */
.aufg-mobile-toggle.active span:nth-child(1) {
	transform: rotate(45deg) translate(6px, 6px);
}

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

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

/* Legacy support for menu-toggle class */
.aufg-menu-toggle {
	display: none;
	background: none;
	border: none;
	padding: 10px;
	cursor: pointer;
	z-index: 1001;
}

.aufg-menu-icon {
	display: block;
	width: 24px;
	height: 18px;
	position: relative;
}

.aufg-menu-icon span {
	display: block;
	width: 100%;
	height: 2px;
	background: #FFFFFF;
	position: absolute;
	left: 0;
	transition: all 0.3s ease;
}

.aufg-menu-icon span:nth-child(1) { top: 0; }
.aufg-menu-icon span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.aufg-menu-icon span:nth-child(3) { bottom: 0; }

/* Active state */
.aufg-menu-toggle.active .aufg-menu-icon span:nth-child(1) {
	top: 50%;
	transform: translateY(-50%) rotate(45deg);
}

.aufg-menu-toggle.active .aufg-menu-icon span:nth-child(2) {
	opacity: 0;
}

.aufg-menu-toggle.active .aufg-menu-icon span:nth-child(3) {
	bottom: 50%;
	transform: translateY(50%) rotate(-45deg);
}

/* ===== ACTIONS SECTION ===== */
.aufg-actions-section {
	display: flex;
	align-items: center;
	gap: 15px;
	flex-shrink: 0;
}

/* Login Button - Exact Elementor Match - Higher Specificity */
.aufg-global-header .aufg-btn-login {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 10px 54px !important;
	background: linear-gradient(90deg, #FFFFFF 0%, #FFFFFF 100%) !important;
	color: #112a3b !important;
	border-radius: 10px !important;
	text-decoration: none !important;
	font-size: 16px !important;
	font-weight: 400 !important;
	transition: all 0.4s ease !important;
	cursor: pointer !important;
	position: relative !important;
	overflow: hidden !important;
	border: none !important;
	height: 44px !important;
	min-height: auto !important;
	box-sizing: border-box !important;
}

.aufg-global-header .aufg-btn-login::before {
	content: '' !important;
	position: absolute !important;
	top: 0 !important;
	left: -100% !important;
	width: 100% !important;
	height: 100% !important;
	background: linear-gradient(135deg, #1169B5 0%, #038BB9 100%) !important;
	transition: left 0.5s ease !important;
	border-radius: inherit !important;
	z-index: 1 !important;
}

.aufg-global-header .aufg-btn-login:hover {
	transform: translateY(-2px) !important;
	box-shadow: 0 8px 25px rgba(3, 139, 185, 0.3) !important;
}

.aufg-global-header .aufg-btn-login:hover::before {
	left: 0 !important;
}

.aufg-global-header .aufg-btn-login span {
	position: relative !important;
	z-index: 10 !important;
	color: #112a3b !important;
	text-shadow: none !important;
}

.aufg-global-header .aufg-btn-login:hover span {
	color: #F8F9FA !important;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

/* Language Selector */
.aufg-language-selector {
	position: relative;
}

.aufg-lang-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 10px;
	color: #FFFFFF;
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 14px;
	font-family: "Poppins", sans-serif;
	height: 44px;
	box-sizing: border-box;
}

.aufg-lang-btn:hover {
	background: rgba(255, 255, 255, 0.15);
	border-color: rgba(3, 139, 185, 0.6);
	transform: translateY(-2px);
}

.aufg-globe-icon,
.aufg-lang-btn .aufg-dropdown-arrow {
	width: 16px;
	height: 16px;
}

.aufg-current-lang {
	font-weight: 500;
}

.aufg-lang-dropdown {
	position: fixed;
	top: 70px;
	right: 20px;
	z-index: 2147483647;
	background: white;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
	padding: 0;
	min-width: 160px;
	overflow: visible;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(-10px);
	transition: all 0.3s ease;
}

.aufg-language-selector.active .aufg-lang-dropdown {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0);
}

.aufg-lang-option {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 10px;
	padding: 12px 20px;
	background: none;
	border: none;
	width: 100%;
	cursor: pointer;
	transition: all 0.2s ease;
	font-family: "Poppins", sans-serif;
	font-size: 14px;
	color: #333;
	border-bottom: 1px solid rgba(3, 139, 185, 0.1);
}

.aufg-lang-option:last-child {
	border-bottom: none;
}

.aufg-lang-option:hover {
	background: linear-gradient(135deg, rgba(3, 139, 185, 0.08) 0%, rgba(17, 105, 181, 0.08) 100%);
	color: #038BB9;
}

.aufg-lang-flag {
	font-size: 18px;
}

/* ===== MOBILE NAVIGATION ===== */
.aufg-mobile-nav {
	display: none;
	position: fixed;
	top: 123px;
	left: 0;
	right: 0;
	background: linear-gradient(135deg, #054780 0%, #1169B5 100%);
	max-height: calc(100vh - 123px);
	overflow-y: auto;
	transform: translateX(-100%);
	transition: transform 0.3s ease;
	z-index: 9997;
}

.aufg-mobile-nav.active {
	transform: translateX(0);
}

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

.aufg-mobile-menu li {
	margin: 0;
}

.aufg-mobile-menu a {
	display: block;
	padding: 15px 30px;
	color: #FFFFFF;
	text-decoration: none;
	font-size: 16px;
	transition: all 0.3s ease;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.aufg-mobile-menu a:hover {
	background: rgba(255, 255, 255, 0.1);
	padding-left: 35px;
}

.aufg-submenu {
	list-style: none;
	margin: 0;
	padding: 0;
	background: rgba(0, 0, 0, 0.1);
}

.aufg-submenu a {
	padding-left: 50px;
	font-size: 14px;
}

/* ===== STICKY HEADER STATES ===== */
.aufg-global-header.scrolled {
	background: linear-gradient(135deg, 
		rgba(5, 71, 128, 0.35) 0%, 
		rgba(3, 139, 185, 0.30) 50%, 
		rgba(17, 105, 181, 0.35) 100%);
	backdrop-filter: blur(20px) saturate(180%);
	-webkit-backdrop-filter: blur(20px) saturate(180%);
	min-height: 80px;
}

.aufg-global-header.scrolled .aufg-header-container {
	padding: 8px 40px;
}

.aufg-global-header.scrolled .aufg-logo {
	max-width: 80px;
	max-height: 60px;
	width: auto;
	height: auto;
}

.aufg-global-header.scrolled .aufg-nav-link {
	padding: 10px 18px;
	font-size: 15px;
	color: rgba(255, 255, 255, 0.9);
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.aufg-global-header.scrolled .aufg-btn-login {
	padding: 8px 25px !important;
	font-size: 13px !important;
	background: linear-gradient(90deg, #FFFFFF 0%, #FFFFFF 100%) !important;
	border: 1px solid rgba(3, 139, 185, 0.3) !important;
	height: 38px !important;
}

.aufg-global-header.scrolled .aufg-lang-btn {
	padding: 8px 15px;
	font-size: 13px;
	background: rgba(3, 139, 185, 0.25);
	border: 1px solid rgba(3, 139, 185, 0.5);
}

/* Smooth hide animation */
.aufg-global-header.hidden {
	transform: translateY(-100%);
	transition: transform 0.4s cubic-bezier(0.4, 0, 0.6, 1);
}

/* Ensure smooth show animation */
.aufg-global-header:not(.hidden) {
	transform: translateY(0);
	transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 1400px) {
	.aufg-nav-link {
		padding: 13px 15px;
		font-size: 15px;
	}
}

@media (max-width: 1200px) {
	.aufg-nav-link {
		padding: 13px 12px;
		font-size: 14px;
	}
	
	.aufg-header-container {
		padding: 20px 30px;
	}
}

@media (max-width: 1024px) {
	.aufg-nav-link {
		padding: 13px 10px;
		font-size: 14px;
	}
	
	.aufg-header-container {
		padding: 15px 20px;
	}
}

@media (max-width: 768px) {
	.aufg-global-header {
		min-height: 90px;
	}
	
	.aufg-header-container {
		padding: 15px;
	}
	
	.aufg-logo {
		max-width: 100px;
		max-height: 60px;
		width: auto;
		height: auto;
	}
	
	.aufg-nav-menu {
		display: none;
	}
	
	.aufg-mobile-toggle,
	.aufg-menu-toggle {
		display: flex;
	}
	
	.aufg-mobile-nav {
		display: block;
		top: 90px;
		max-height: calc(100vh - 90px);
	}
	
	.aufg-global-header .aufg-btn-login {
		padding: 8px 25px !important;
		font-size: 14px !important;
	}
	
	.aufg-lang-btn {
		padding: 8px 12px;
		font-size: 13px;
	}
	
	.aufg-lang-btn .aufg-current-lang {
		display: none;
	}
	
	.aufg-global-header.scrolled {
		min-height: 70px;
	}
	
	.aufg-global-header.scrolled .aufg-logo {
		max-width: 80px;
		max-height: 60px;
		width: auto;
		height: auto;
	}
	
	.aufg-global-header.scrolled .aufg-btn-login {
		padding: 6px 20px !important;
		font-size: 13px !important;
	}
	
	.aufg-global-header.scrolled .aufg-lang-btn {
		padding: 6px 10px;
	}
	
	.aufg-actions-section {
		gap: 10px;
	}
}

@media (max-width: 480px) {
	.aufg-global-header {
		min-height: 70px;
	}
	
	.aufg-header-container {
		padding: 8px 15px;
		gap: 15px;
	}
	
	.aufg-logo {
		max-width: 70px;
		max-height: 50px;
	}
	
	.aufg-global-header .aufg-btn-login {
		padding: 6px 15px !important;
		font-size: 12px !important;
		min-width: 40px !important;
	}
	
	.aufg-global-header .aufg-btn-login span {
		display: none !important;
	}
	
	.aufg-global-header .aufg-btn-login::after {
		content: '👤' !important;
		font-size: 14px !important;
		position: relative;
		z-index: 11;
	}
	
	.aufg-lang-btn {
		padding: 6px 8px;
		font-size: 12px;
		min-width: 30px;
	}
	
	.aufg-lang-btn .aufg-current-lang,
	.aufg-lang-btn .fa-chevron-down {
		display: none;
	}
	
	.aufg-lang-btn::after {
		content: '🌐';
		font-size: 14px;
	}
	
	.aufg-actions-section {
		gap: 8px;
	}
	
	.aufg-mobile-toggle {
		width: 35px;
		height: 35px;
		padding: 5px;
	}
	
	.aufg-mobile-toggle span {
		width: 20px;
		height: 1.5px;
		margin: 2px 0;
	}
	
	.aufg-mobile-nav {
		top: 70px;
		max-height: calc(100vh - 70px);
	}
}

/* ===== BODY PADDING COMPENSATION ===== */
body {
	padding-top: 123px !important;
}

/* Compensate for first content section after header */
.aufg-global-header + .elementor-element:first-of-type {
	margin-top: -123px !important;
}

@media (max-width: 768px) {
	body {
		padding-top: 90px !important;
	}
	
	/* Mobile compensation for first content section */
	.aufg-global-header + .elementor-element:first-of-type {
		margin-top: -90px !important;
	}
}

@media (max-width: 480px) {
	body {
		padding-top: 70px !important;
	}
	
	/* Small mobile compensation for first content section */
	.aufg-global-header + .elementor-element:first-of-type {
		margin-top: -70px !important;
	}
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
	* {
		animation: none !important;
		transition: opacity 0.3s ease !important;
	}
}

/* Focus styles for keyboard navigation - remove default browser outline */
.aufg-nav-link:focus,
.aufg-btn-login:focus,
.aufg-lang-btn:focus,
.aufg-menu-toggle:focus {
	outline: none !important;
	box-shadow: 0 0 0 2px rgba(3, 139, 185, 0.5) !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
	.aufg-global-header {
		border-bottom: 2px solid #FFFFFF;
	}
	
	.aufg-nav-link {
		text-decoration: underline;
	}
	
	.aufg-btn-login {
		border: 2px solid #FFFFFF;
	}
}

/* ===== RTL MODE SUPPORT ===== */
/* RTL Mode - Apply RTL direction to body by default, then override specific header elements */
body.rtl-mode {
	direction: rtl;
}

/* Keep header controls LTR to prevent positioning issues */
body.rtl-mode .aufg-global-header {
	direction: ltr !important;
}

/* Ensure language selector stays in correct position */
body.rtl-mode .aufg-language-selector {
	direction: ltr !important;
}

/* Keep actions section properly aligned */
body.rtl-mode .aufg-actions-section {
	direction: ltr !important;
}

/* Keep navigation menu LTR for consistent positioning */
body.rtl-mode .aufg-nav-section {
	direction: ltr !important;
}

/* Arabic menu labels should use RTL direction */
body.rtl-mode .menu-label-ar {
	direction: rtl !important;
	text-align: right;
}

/* Ensure English labels stay LTR */
body.rtl-mode .menu-label-en {
	direction: ltr !important;
	text-align: left;
}

/* Mobile navigation RTL fixes */
body.rtl-mode .aufg-mobile-nav {
	direction: ltr !important;
}

body.rtl-mode .aufg-mobile-menu .menu-label-ar {
	direction: rtl !important;
	text-align: right;
}

body.rtl-mode .aufg-mobile-menu .menu-label-en {
	direction: ltr !important;
	text-align: left;
}