/* ==========================================================================
   HOSTMEV2 MODERN HEADER - Glassmorphism Menu Design
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS CUSTOM PROPERTIES
   -------------------------------------------------------------------------- */
:root {
	--glass-bg: rgba(255, 255, 255, 0.72);
	--glass-bg-scroll: rgba(255, 255, 255, 0.92);
	--glass-blur: 20px;
	--glass-border: rgba(255, 255, 255, 0.25);
	--glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
	--topbar-bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
	--topbar-text: rgba(255, 255, 255, 0.85);
	--cta-gradient: linear-gradient(90deg, #00c6ff, #0072ff, #00c6ff);
	--cta-glow: rgba(0, 114, 255, 0.3);
	--mega-bg: rgba(255, 255, 255, 0.97);
	--menu-transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
	--accent-color: #0072ff;
	--text-primary: #1a1a2e;
	--text-secondary: #555;
}

/* --------------------------------------------------------------------------
   2. TOPBAR REDESIGN
   -------------------------------------------------------------------------- */
.modern-header .topbar {
	background: var(--topbar-bg);
	color: var(--topbar-text);
	height: 40px;
	line-height: 40px;
	font-size: 12px;
	letter-spacing: 0.3px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	overflow: visible;
	position: relative;
	z-index: 3002;
}

/* Topbar inner: keep original sizing, only add flex layout */
.modern-header .topbar .inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 100%;
}

/* topbar_left/right: keep original width:50% and display:inline-block from style.css */

.modern-header .topbar_left {
	gap: 6px;
	justify-content: flex-start;
}

.modern-header .topbar_right {
	gap: 4px;
	justify-content: flex-end;
}

/* Topbar generic content (from Theme Options HTML) */
.modern-header .topbar_left,
.modern-header .topbar_right {
	color: var(--topbar-text);
	font-size: 12px;
}

.modern-header .topbar_left a,
.modern-header .topbar_right a {
	color: var(--topbar-text);
	text-decoration: none;
	transition: all 0.3s ease;
}

.modern-header .topbar_left a:hover,
.modern-header .topbar_right a:hover {
	color: #fff;
}

.modern-header .topbar_left i.fa,
.modern-header .topbar_right i.fa {
	margin-right: 5px;
	font-size: 14px;
	transition: transform 0.3s ease, color 0.3s ease;
}

.modern-header .topbar_left a:hover i.fa,
.modern-header .topbar_right a:hover i.fa {
	transform: scale(1.2);
}

.modern-header .topbar_left strong,
.modern-header .topbar_right strong {
	font-weight: 600;
	letter-spacing: 0.2px;
}

/* Topbar widget styling */
.modern-header .topbar .widget {
	margin: 0;
	padding: 0;
	line-height: 40px;
	color: var(--topbar-text);
}

.modern-header .topbar .widget a {
	color: var(--topbar-text);
	text-decoration: none;
	transition: all 0.3s ease;
}

.modern-header .topbar .widget a:hover {
	color: #fff;
}

.modern-header .topbar .widget h3.widget-title {
	display: none;
}

/* Topbar sociables list (from theme) */
.modern-header .topbar .atpsocials {
	display: flex;
	gap: 2px;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
	float: none;
}

.modern-header .topbar .atpsocials li {
	display: inline-flex;
	width: auto;
}

.modern-header .topbar .atpsocials li a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	color: rgba(255, 255, 255, 0.65);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-header .topbar .atpsocials li a:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.12);
	transform: translateY(-2px) scale(1.1);
}

.modern-header .topbar .atpsocials li a:hover .fa-facebook {
	color: #1877f2;
}

.modern-header .topbar .atpsocials li a:hover .fa-instagram {
	color: #e4405f;
}

.modern-header .topbar .atpsocials li a:hover .fa-twitter {
	color: #1da1f2;
}

.modern-header .topbar .atpsocials li a:hover .fa-youtube-play,
.modern-header .topbar .atpsocials li a:hover .fa-youtube {
	color: #ff0000;
}

.modern-header .topbar .atpsocials li a:hover .fa-linkedin {
	color: #0a66c2;
}

.modern-header .topbar .atpsocials li a:hover .fa-whatsapp {
	color: #25d366;
}

/* Topbar Contact Items (structured HTML) */
.topbar-contact-item {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-right: 20px;
	color: var(--topbar-text);
	text-decoration: none;
	transition: var(--menu-transition);
	font-size: 12px;
}

.topbar-contact-item:last-child {
	margin-right: 0;
}

.topbar-contact-item i {
	font-size: 14px;
	transition: transform 0.3s ease, color 0.3s ease;
}

.topbar-contact-item:hover {
	color: #fff;
}

.topbar-contact-item:hover i {
	transform: scale(1.25);
}

.topbar-contact-item.topbar-whatsapp:hover i {
	color: #25d366;
}

.topbar-contact-item.topbar-phone:hover i {
	color: #00c6ff;
}

.topbar-contact-item.topbar-email:hover i {
	color: #ff6b6b;
}

/* Topbar Social Icons */
.topbar-social {
	display: inline-flex;
	gap: 2px;
	align-items: center;
}

.topbar-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	color: rgba(255, 255, 255, 0.65);
	text-decoration: none;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	font-size: 13px;
}

.topbar-social a:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.12);
	transform: translateY(-2px) scale(1.1);
}

.topbar-social a:hover .fa-facebook {
	color: #1877f2;
}

.topbar-social a:hover .fa-instagram {
	color: #e4405f;
}

.topbar-social a:hover .fa-twitter {
	color: #1da1f2;
}

.topbar-social a:hover .fa-youtube-play,
.topbar-social a:hover .fa-youtube {
	color: #ff0000;
}

.topbar-social a:hover .fa-linkedin {
	color: #0a66c2;
}

/* Topbar Separator */
.topbar-separator {
	width: 1px;
	height: 16px;
	background: rgba(255, 255, 255, 0.15);
	margin: 0 12px;
	display: inline-block;
	vertical-align: middle;
}

/* --------------------------------------------------------------------------
   3. GLASSMORPHISM HEADER
   -------------------------------------------------------------------------- */
.modern-header .header {
	background: var(--glass-bg) !important;
	backdrop-filter: blur(var(--glass-blur));
	-webkit-backdrop-filter: blur(var(--glass-blur));
	border-bottom: 1px solid var(--glass-border);
	box-shadow: none;
	transition: background 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
	min-height: 70px;
}

/* header-area: keep original display:table and sizing from style.css */

.modern-header .header .logo {
	/* keep original display:table-cell from style.css */
	padding-right: 40px;
}

.modern-header .header .logo img {
	max-height: 50px;
	width: auto;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-header .header .primarymenu.menuwrap {
	/* keep original display:table-cell from style.css */
}

/* Fixed Header (on scroll) */
.modern-header .fixed-header {
	position: fixed !important;
	width: 100%;
	top: 0;
	left: 0;
	z-index: 3000;
	background: var(--glass-bg-scroll) !important;
	backdrop-filter: blur(24px);
	-webkit-backdrop-filter: blur(24px);
	box-shadow: var(--glass-shadow);
	border-bottom: 1px solid rgba(0, 0, 0, 0.04);
	animation: headerSlideDown 0.4s ease forwards;
}

@keyframes headerSlideDown {
	from {
		transform: translateY(-100%);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.modern-header .fixed-header .logo img {
	max-height: 38px;
}

/* --------------------------------------------------------------------------
   4. MENU TYPOGRAPHY & HOVER EFFECTS
   -------------------------------------------------------------------------- */
.modern-header .sf-menu {
	float: none;
	display: flex;
	align-items: center;
	gap: 0;
	margin: 0;
	padding: 0;
}

.modern-header .sf-menu > li {
	float: none;
	position: relative;
}

.modern-header .sf-menu > li > a {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	color: var(--text-primary);
	padding: 1.5em 1.1em;
	position: relative;
	transition: color 0.3s ease;
	display: block;
}

.modern-header .sf-menu > li > a:hover {
	color: var(--accent-color);
	background: transparent;
}

/* Animated Underline */
.modern-header .sf-menu > li > a::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%) scaleX(0);
	width: 70%;
	height: 2.5px;
	background: var(--cta-gradient);
	background-size: 200% auto;
	border-radius: 2px;
	transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-header .sf-menu > li:hover > a::after,
.modern-header .sf-menu > li.sfHover > a::after,
.modern-header .sf-menu > li.current-menu-item > a::after,
.modern-header .sf-menu > li.current-menu-ancestor > a::after {
	transform: translateX(-50%) scaleX(1);
}

/* Active menu item */
.modern-header .sf-menu > li.current-menu-item > a,
.modern-header .sf-menu > li.current-menu-ancestor > a {
	color: var(--accent-color);
	font-weight: 700;
}

/* --------------------------------------------------------------------------
   5. DROPDOWN / MEGA MENU WITH GLASS
   -------------------------------------------------------------------------- */
.modern-header .sf-menu ul {
	background: var(--mega-bg);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-top: 2.5px solid var(--accent-color);
	border-radius: 0 0 12px 12px;
	box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
	padding: 8px 0;
	min-width: 220px;
	animation: megaSlideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.modern-header .sf-menu ul li {
	background: transparent;
	box-shadow: none;
	border: none;
}

.modern-header .sf-menu ul li a {
	color: var(--text-secondary);
	padding: 10px 20px;
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 0.2px;
	border-bottom: none;
	transition: all 0.25s ease;
	position: relative;
}

.modern-header .sf-menu ul li a::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	background: var(--accent-color);
	transform: scaleY(0);
	transition: transform 0.25s ease;
	border-radius: 0 3px 3px 0;
}

.modern-header .sf-menu ul li:hover > a,
.modern-header .sf-menu ul li.sfHover > a {
	color: var(--accent-color);
	background: rgba(0, 114, 255, 0.04);
	padding-left: 26px;
}

.modern-header .sf-menu ul li:hover > a::before {
	transform: scaleY(1);
}

/* Mega Menu */
.modern-header .sf-mega {
	background: var(--mega-bg);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-top: 2.5px solid var(--accent-color);
	border-radius: 0 0 12px 12px;
	box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
	padding: 24px 20px;
	animation: megaSlideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.modern-header .sf-mega .sf-mega-section {
	border-right: 1px solid rgba(0, 0, 0, 0.06);
}

.modern-header .sf-mega .sf-mega-section:last-child {
	border-right: none;
}

.modern-header .sf-mega h3,
.modern-header .sf-mega .col_title {
	font-size: 14px;
	font-weight: 700;
	color: var(--text-primary);
	letter-spacing: 0.5px;
	text-transform: uppercase;
	margin-bottom: 12px;
	padding-bottom: 8px;
	border-bottom: 2px solid rgba(0, 114, 255, 0.15);
}

/* Nested submenu positioning */
.modern-header .sf-menu ul ul {
	top: -8px;
	border-radius: 8px;
}

/* Dropdown arrows */
.modern-header .sf-menu > li > a .sf-sub-indicator,
.modern-header .sf-arrows .sf-with-ul::after {
	color: var(--text-secondary);
	font-size: 10px;
}

/* --------------------------------------------------------------------------
   6. CTA BUTTON (Animated Gradient)
   -------------------------------------------------------------------------- */
.modern-header .sf-menu > li.menu-cta > a {
	background: var(--cta-gradient);
	background-size: 200% auto;
	color: #fff !important;
	border-radius: 50px;
	padding: 10px 26px !important;
	margin-left: 14px;
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 1px;
	box-shadow: 0 4px 18px var(--cta-glow);
	animation: gradientShift 3s ease infinite;
	transition: all 0.3s ease;
	line-height: 1.4;
}

.modern-header .sf-menu > li.menu-cta > a:hover {
	transform: scale(1.06);
	box-shadow: 0 6px 24px rgba(0, 114, 255, 0.5);
}

.modern-header .sf-menu > li.menu-cta > a::after {
	display: none !important;
}

.modern-header .sf-menu > li.menu-cta:hover > a {
	background-color: transparent;
}

@keyframes gradientShift {
	0% { background-position: 0% center; }
	50% { background-position: 100% center; }
	100% { background-position: 0% center; }
}

/* --------------------------------------------------------------------------
   7. MOBILE HAMBURGER
   -------------------------------------------------------------------------- */
.modern-header #iva-mobile-nav-icon {
	width: 28px;
	height: 22px;
	cursor: pointer;
	position: relative;
	z-index: 100001;
}

.modern-header #iva-mobile-nav-icon span {
	background: var(--text-primary);
	height: 3px;
	border-radius: 3px;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-header #iva-mobile-nav-icon.open span {
	background: #fff;
}

/* --------------------------------------------------------------------------
   8. MOBILE MENU - SLIDE-IN OVERLAY
   -------------------------------------------------------------------------- */
.modern-header .iva-mobile-menu {
	position: fixed !important;
	top: 0;
	right: -100%;
	width: 100%;
	max-width: 100%;
	height: 100vh;
	height: 100dvh;
	background: #141423;
	z-index: 100000;
	padding: 80px 28px 30px;
	overflow-y: auto;
	transition: right 0.45s cubic-bezier(0.4, 0, 0.2, 1);
	display: block !important;
	border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.modern-header .iva-mobile-menu.is-open {
	right: 0;
	pointer-events: auto;
}

/* Mobile Overlay (dark backdrop) */
.mobile-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.7);
	z-index: 99999;
	opacity: 0;
	visibility: hidden;
	transition: all 0.35s ease;
}

.mobile-overlay.is-visible {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

/* Mobile Menu Close Button */
.mobile-menu-close {
	position: absolute;
	top: 20px;
	right: 20px;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	color: rgba(255, 255, 255, 0.7);
	font-size: 20px;
	cursor: pointer;
	transition: all 0.3s ease;
	border: none;
	z-index: 2;
}

.mobile-menu-close:hover {
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	transform: rotate(90deg);
}

/* Mobile Menu Items */
.modern-header .iva-mobile-menu ul {
	padding: 0;
	margin: 0;
	list-style: none;
}

.modern-header .iva-mobile-menu ul li {
	opacity: 1;
	transform: none;
}

.modern-header .iva-mobile-menu.is-open ul > li {
	animation: fadeSlideIn 0.35s ease forwards;
}

.modern-header .iva-mobile-menu.is-open ul > li:nth-child(1) { animation-delay: 0.05s; }
.modern-header .iva-mobile-menu.is-open ul > li:nth-child(2) { animation-delay: 0.1s; }
.modern-header .iva-mobile-menu.is-open ul > li:nth-child(3) { animation-delay: 0.15s; }
.modern-header .iva-mobile-menu.is-open ul > li:nth-child(4) { animation-delay: 0.2s; }
.modern-header .iva-mobile-menu.is-open ul > li:nth-child(5) { animation-delay: 0.25s; }
.modern-header .iva-mobile-menu.is-open ul > li:nth-child(6) { animation-delay: 0.3s; }
.modern-header .iva-mobile-menu.is-open ul > li:nth-child(7) { animation-delay: 0.35s; }
.modern-header .iva-mobile-menu.is-open ul > li:nth-child(8) { animation-delay: 0.4s; }
.modern-header .iva-mobile-menu.is-open ul > li:nth-child(9) { animation-delay: 0.45s; }
.modern-header .iva-mobile-menu.is-open ul > li:nth-child(10) { animation-delay: 0.5s; }

@keyframes fadeSlideIn {
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

.modern-header .iva-mobile-menu ul li a {
	display: block;
	padding: 15px 0 !important;
	font-size: 15px;
	font-weight: 500;
	color: rgba(255, 255, 255, 1);
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	transition: all 0.3s ease;
	text-decoration: none;
	letter-spacing: 0.3px;
}

.modern-header .iva-mobile-menu ul li a:hover,
.modern-header .iva-mobile-menu ul li.current_page_item > a,
.modern-header .iva-mobile-menu ul li.current-menu-item > a {
	color: #fff;
	padding-left: 10px !important;
	border-bottom-color: rgba(0, 114, 255, 0.3);
}

.modern-header .iva-mobile-menu ul li ul {
	margin-left: 16px;
	border-left: 2px solid rgba(0, 114, 255, 0.2);
	padding-left: 12px;
}

.modern-header .iva-mobile-menu ul li ul li a {
	font-size: 13px;
	font-weight: 400;
	color: rgba(255, 255, 255, 0.55);
	padding: 10px 0 !important;
}

.modern-header .iva-children-indenter {
	color: rgba(255, 255, 255, 0.5);
	transition: all 0.3s ease;
}

.modern-header .iva-menu-open > .iva-children-indenter,
.modern-header .iva-children-indenter:hover {
	color: var(--accent-color);
}

/* Mobile CTA */
.modern-header .iva-mobile-menu .mobile-cta {
	display: block;
	margin-top: 24px;
	padding: 14px 24px;
	background: var(--cta-gradient);
	background-size: 200% auto;
	animation: gradientShift 3s ease infinite;
	color: #fff;
	text-align: center;
	border-radius: 50px;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 1px;
	text-transform: uppercase;
	text-decoration: none;
	box-shadow: 0 4px 18px var(--cta-glow);
}

/* --------------------------------------------------------------------------
   9. RESPONSIVE
   -------------------------------------------------------------------------- */

/* Desktop - Hide mobile elements */
@media (min-width: 960px) {
	.modern-header #iva-mobile-nav-icon {
		display: none !important;
	}
	.modern-header .iva-mobile-menu {
		display: none !important;
	}
	.mobile-overlay {
		display: none !important;
	}
}

/* Tablet & Mobile */
@media (max-width: 959px) {
	.modern-header .sf-menu {
		display: none !important;
	}

	.modern-header #iva-mobile-nav-icon {
		display: block !important;
	}

	.modern-header .iva-mobile-menu {
		display: block !important;
	}

	.modern-header .header .header-area {
		padding: 0 15px;
	}

	.modern-header .header .logo {
		min-height: 60px;
	}

	.modern-header .header .logo img {
		max-height: 40px;
	}

	.modern-header .header .primarymenu.menuwrap {
		position: absolute;
		top: 50%;
		right: 15px;
		transform: translateY(-50%);
	}

	.modern-header .fixed-header {
		position: relative !important;
		animation: none;
	}
}

/* Topbar responsive */
@media (max-width: 768px) {
	.modern-header .topbar {
		height: auto;
		line-height: 1.5;
		padding: 6px 0;
	}

	.modern-header .topbar .inner {
		flex-direction: column;
		gap: 4px;
	}

	.modern-header .topbar_left,
	.modern-header .topbar_right {
		justify-content: center;
	}

	.topbar-contact-item span.topbar-text-label {
		display: none;
	}
}

@media (max-width: 480px) {
	.modern-header .topbar {
		display: none;
	}

	.modern-header .iva-mobile-menu {
		width: 92%;
	}

	.modern-header .header .logo img {
		max-height: 35px;
	}
}

/* --------------------------------------------------------------------------
   10. SCROLLBAR STYLING (Mobile Menu)
   -------------------------------------------------------------------------- */
.modern-header .iva-mobile-menu::-webkit-scrollbar {
	width: 4px;
}

.modern-header .iva-mobile-menu::-webkit-scrollbar-track {
	background: transparent;
}

.modern-header .iva-mobile-menu::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.15);
	border-radius: 4px;
}

/* Mobile: remove blur from header so it doesn't affect mobile menu */
@media (max-width: 959px) {
	.modern-header .header,
	.modern-header .fixed-header {
		backdrop-filter: none !important;
		-webkit-backdrop-filter: none !important;
	}
}

/* --------------------------------------------------------------------------
   11. PRINT STYLES
   -------------------------------------------------------------------------- */
@media print {
	.modern-header .topbar,
	.modern-header #iva-mobile-nav-icon,
	.mobile-overlay {
		display: none !important;
	}

	.modern-header .header {
		background: #fff !important;
		backdrop-filter: none !important;
		box-shadow: none !important;
	}
}
