/* ==========================================================
   Custom Site Header — Premium Professional Design
   ========================================================== */
:root {
	--iq-header-h: 80px;
	--iq-navy: #0a1f3d;
	--iq-navy-dark: #06152b;
	--iq-navy-light: #132d54;
	--iq-text: #1a2b3c;
	--iq-text-light: #5a6b7c;
	--iq-border: rgba(10, 31, 61, 0.08);
	--iq-bg: rgba(5, 11, 22, 0.96);
	--iq-cta: #3b82f6;
	--iq-cta-dark: #2563eb;
	--iq-cta-glow: rgba(37, 99, 235, 0.35);
	--iq-hover-bg: rgba(96, 165, 250, 0.14);
	--iq-shadow: 0 1px 2px rgba(10, 31, 61, 0.04);
	--iq-shadow-scrolled: 0 8px 30px rgba(10, 31, 61, 0.12);
	--iq-gradient-bar: linear-gradient(90deg, #2563eb 0%, #60a5fa 50%, #2563eb 100%);
	--iq-font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
	padding-top: 0;
}

.iq-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 999999;
	height: var(--iq-header-h);
	background: var(--iq-bg);
	backdrop-filter: blur(18px) saturate(140%);
	-webkit-backdrop-filter: blur(18px) saturate(140%);
	border-bottom: 1px solid var(--iq-border);
	box-shadow: var(--iq-shadow);
	transition: box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1), background 0.35s ease;
	font-family: var(--iq-font);
}

.iq-header::after {
	content: none;
}

.iq-header.iq-header-scrolled {
	box-shadow: var(--iq-shadow-scrolled);
	background: rgba(5, 11, 22, 0.99);
}

.iq-header.iq-header-scrolled::after {
	opacity: 1;
}

/* Spacer */
.iq-header-spacer {
	display: block;
	width: 100%;
	height: var(--iq-header-h);
	background: #050b16;
}

body.admin-bar .iq-header {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar .iq-header {
		top: 46px;
	}
}

/* Inner Container */
.iq-header-inner {
	max-width: 1280px;
	margin: 0 auto;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
	padding: 0 32px;
}

/* Logo */
.iq-header-logo a {
	display: flex;
	align-items: center;
	text-decoration: none;
	gap: 12px;
}

.iq-logo-img {
	max-height: 44px;
	width: auto;
	display: block;
	border-radius: 6px;
	transition: transform 0.3s ease;
}

.iq-header-logo:hover .iq-logo-img {
	transform: scale(1.03);
}

.iq-logo-text {
	font-size: 22px;
	font-weight: 800;
	color: #ffffff;
	letter-spacing: -0.6px;
	line-height: 1.1;
}

.iq-logo-text span {
	display: block;
	font-size: 11px;
	font-weight: 600;
	color: #9db2ce;
	letter-spacing: 0.8px;
	text-transform: uppercase;
}

/* Navigation */
.iq-header-nav {
	flex: 1;
	display: flex;
	justify-content: center;
	height: 100%;
}

ul.iq-menu {
	list-style: none;
	display: flex;
	align-items: center;
	height: 100%;
	gap: 6px;
	margin: 0;
	padding: 0;
}

.iq-menu-item {
	position: relative;
	height: 100%;
	display: flex;
	align-items: center;
}

.iq-top-link {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 10px 16px;
	color: #d9e6f5;
	text-decoration: none;
	font-size: 15px;
	font-weight: 650;
	border-radius: 10px;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	white-space: nowrap;
	position: relative;
	letter-spacing: -0.1px;
}

.iq-top-link::after {
	content: "";
	position: absolute;
	bottom: 2px;
	left: 50%;
	transform: translateX(-50%) scaleX(0);
	width: 18px;
	height: 2px;
	background: var(--iq-cta);
	border-radius: 2px;
	transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.iq-top-link:hover,
.iq-menu-item:hover > .iq-top-link,
.iq-menu-item.current-menu-item > .iq-top-link {
	background: var(--iq-hover-bg);
	color: #ffffff;
}

.iq-menu-item.current-menu-item > .iq-top-link::after,
.iq-top-link:hover::after {
	transform: translateX(-50%) scaleX(1);
}

/* Dropdown Caret */
.iq-caret {
	width: 6px;
	height: 6px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	margin-top: -2px;
	opacity: 0.5;
	transition: transform 0.25s ease, opacity 0.25s ease;
	flex-shrink: 0;
}

.iq-has-dropdown:hover > .iq-top-link .iq-caret {
	transform: rotate(225deg);
	margin-top: 2px;
	opacity: 0.8;
}

.iq-dropdown-toggle {
	display: none;
}

/* Dropdown Menu */
ul.iq-sub-menu {
	list-style: none;
	position: absolute;
	top: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%) translateY(4px);
	background: #0b1f3a;
	border: 1px solid rgba(125, 169, 223, 0.28);
	border-radius: 12px;
	box-shadow: 0 20px 40px rgba(10, 31, 61, 0.16), 0 0 0 1px rgba(10, 31, 61, 0.04);
	min-width: 220px;
	padding: 8px;
	margin: 0;
	opacity: 0;
	visibility: hidden;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	z-index: 100;
}

.iq-has-dropdown:hover > ul.iq-sub-menu,
.iq-has-dropdown:focus-within > ul.iq-sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}

.iq-sub-link {
	display: block;
	padding: 10px 14px;
	border-radius: 8px;
	color: #d9e6f5;
	text-decoration: none;
	font-size: 14px;
	font-weight: 550;
	transition: all 0.15s ease;
}

.iq-sub-link:hover {
	background: var(--iq-hover-bg);
	color: #ffffff;
	transform: translateX(2px);
}

.iq-menu-notice {
	font-size: 13px;
	color: #b45309;
	background: #fff7ed;
	padding: 8px 14px;
	border-radius: 8px;
	border: 1px solid #fde68a;
}

/* Right Actions */
.iq-header-actions {
	display: flex;
	align-items: center;
	gap: 14px;
}

.iq-phone-pill {
	display: flex;
	align-items: center;
	gap: 8px;
	border: 1.5px solid var(--iq-navy);
	color: var(--iq-navy);
	font-weight: 700;
	font-size: 13.5px;
	padding: 9px 18px;
	border-radius: 999px;
	text-decoration: none;
	white-space: nowrap;
	transition: all 0.2s ease;
	font-family: var(--iq-font);
	letter-spacing: -0.1px;
}

.iq-phone-pill:hover {
	background: var(--iq-navy);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(10, 31, 61, 0.2);
}

.iq-phone-icon {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: currentColor;
	display: inline-block;
	flex-shrink: 0;
}

.iq-cta-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	background: var(--iq-cta);
	color: #fff !important;
	font-weight: 700;
	font-size: 14px;
	padding: 12px 24px;
	border-radius: 10px;
	text-decoration: none;
	white-space: nowrap;
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 8px 20px var(--iq-cta-glow);
	font-family: var(--iq-font);
	letter-spacing: -0.1px;
	overflow: hidden;
}

.iq-cta-btn::before {
	content: "";
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
	transition: left 0.5s ease;
}

.iq-cta-btn:hover {
	background: var(--iq-cta-dark);
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(247, 127, 29, 0.45);
}

@keyframes iq-cta-shake {
	0%, 76%, 100% { transform: translateX(0); }
	80% { transform: translateX(-3px); }
	86% { transform: translateX(3px); }
	92% { transform: translateX(-2px); }
	97% { transform: translateX(2px); }
}

.iq-cta-btn {
	animation: iq-cta-shake 3s ease-in-out infinite;
}

.iq-cta-btn:hover {
	animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
	.iq-cta-btn {
		animation: none;
	}
}

.iq-cta-btn:hover::before {
	left: 100%;
}

/* Mobile Toggle */
.iq-mobile-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	width: 42px;
	height: 42px;
	background: transparent;
	border: 1.5px solid var(--iq-border);
	border-radius: 10px;
	cursor: pointer;
	flex-shrink: 0;
	transition: all 0.2s ease;
	padding: 0;
}

.iq-mobile-toggle:hover {
	background: var(--iq-hover-bg);
	border-color: var(--iq-navy-light);
}

.iq-mobile-toggle span {
	display: block;
	height: 2px;
	width: 18px;
	margin: 0 auto;
	background: var(--iq-text);
	border-radius: 2px;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	transform-origin: center;
}

.iq-mobile-toggle.iq-active {
	background: var(--iq-navy);
	border-color: var(--iq-navy);
}

.iq-mobile-toggle.iq-active span {
	background: #fff;
}

.iq-mobile-toggle.iq-active span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

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

.iq-mobile-toggle.iq-active span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* Responsive */
@media (max-width: 1050px) {
	.iq-header-inner {
		padding: 0 24px;
		gap: 20px;
	}

	.iq-top-link {
		padding: 9px 12px;
		font-size: 14px;
	}

	.iq-phone-pill {
		display: none;
	}
}

@media (max-width: 900px) {
	:root {
		--iq-header-h: 72px;
	}

	.iq-header {
		height: var(--iq-header-h);
	}

	.iq-header-spacer {
		height: var(--iq-header-h);
	}

	.iq-header-inner {
		padding: 0 20px;
		gap: 16px;
	}

	.iq-logo-img {
		max-height: 38px;
		max-width: 160px;
	}

	.iq-logo-text {
		font-size: 19px;
	}

	.iq-logo-text span {
		font-size: 10px;
	}

	.iq-header-nav {
		position: fixed;
		top: var(--iq-header-h);
		left: 0;
		right: 0;
		background: rgba(255, 255, 255, 0.98);
		backdrop-filter: blur(20px);
		border-top: 1px solid var(--iq-border);
		box-shadow: 0 20px 40px rgba(10, 31, 61, 0.16);
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
		justify-content: flex-start;
		z-index: 999998;
		opacity: 0;
	}

	body.admin-bar .iq-header-nav {
		top: calc(var(--iq-header-h) + 32px);
	}

	.iq-header-nav.iq-mobile-open {
		max-height: calc(100vh - var(--iq-header-h));
		overflow-y: auto;
		opacity: 1;
	}

	ul.iq-menu {
		flex-direction: column;
		align-items: stretch;
		height: auto;
		padding: 12px;
		gap: 2px;
	}

	.iq-menu-item {
		height: auto;
		display: block;
	}

	.iq-top-link {
		padding: 14px 14px;
		width: 100%;
		justify-content: space-between;
		font-size: 15px;
		border-radius: 10px;
	}

	.iq-top-link::after {
		display: none;
	}

	.iq-has-dropdown {
		position: relative;
		display: flex;
		flex-direction: column;
	}

	.iq-has-dropdown .iq-top-link {
		padding-right: 50px;
	}

	.iq-dropdown-toggle {
		display: flex;
		align-items: center;
		justify-content: center;
		position: absolute;
		top: 6px;
		right: 6px;
		width: 38px;
		height: 38px;
		background: transparent;
		border: none;
		cursor: pointer;
		border-radius: 8px;
		transition: background 0.15s ease;
	}

	.iq-dropdown-toggle:hover {
		background: var(--iq-hover-bg);
	}

	.iq-caret-mobile {
		width: 8px;
		height: 8px;
		border-right: 2px solid var(--iq-text);
		border-bottom: 2px solid var(--iq-text);
		transform: rotate(45deg);
		transition: transform 0.25s ease;
	}

	.iq-has-dropdown.iq-mobile-expanded .iq-caret-mobile {
		transform: rotate(225deg);
	}

	ul.iq-sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border: none;
		background: transparent;
		display: none;
		margin: 0 0 6px 14px;
		min-width: 0;
		padding: 0;
		border-radius: 0;
	}

	.iq-has-dropdown.iq-mobile-expanded > ul.iq-sub-menu {
		display: block;
	}

	.iq-sub-link {
		padding: 10px 14px;
		font-size: 14px;
		border-radius: 8px;
	}

	.iq-phone-pill {
		display: none;
	}

	.iq-mobile-toggle {
		display: flex;
	}

	.iq-header-actions {
		gap: 10px;
	}

	.iq-cta-btn {
		padding: 10px 18px;
		font-size: 13px;
	}
}

@media screen and (max-width: 782px) {
	body.admin-bar .iq-header {
		top: 46px;
	}

	body.admin-bar .iq-header-nav {
		top: calc(var(--iq-header-h) + 46px);
	}
}

@media (max-width: 480px) {
	.iq-cta-btn {
		padding: 9px 16px;
		font-size: 12px;
	}

	.iq-header-inner {
		padding: 0 14px;
		gap: 10px;
	}

	.iq-logo-text {
		font-size: 17px;
	}

	.iq-logo-text span {
		font-size: 9px;
	}

	.iq-mobile-toggle {
		width: 38px;
		height: 38px;
	}
}

/* Premium animations */
@keyframes iqHeaderFadeIn {
	from {
		opacity: 0;
		transform: translateY(-8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.iq-header {
	animation: iqHeaderFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Square button system requested for the site. */
body .iq-cta-btn,
body .iq-phone-pill,
body .iq-mobile-toggle,
body .iq-dropdown-toggle,
body .elementor-button,
body .wp-block-button__link,
body input[type="submit"],
body input[type="button"],
body button,
body .button,
body .isb-outline-button,
body .iq-form button {
	border-radius: 0 !important;
}

/* A solid, distraction-free off-canvas navigation on phones. */
@media (max-width: 900px) {
	.iq-header-nav {
		bottom: 0;
		left: auto;
		max-height: none;
		opacity: 1;
		right: 0;
		transform: translateX(100%);
		transition: transform .28s ease, visibility .28s ease;
		visibility: hidden;
		width: 100%;
		background: #fff;
		border-left: 1px solid rgba(10, 31, 61, .12);
		box-shadow: -18px 0 42px rgba(10, 31, 61, .16);
	}

	.iq-header-nav.iq-mobile-open {
		max-height: none;
		transform: translateX(0);
		visibility: visible;
	}

	ul.iq-menu {
		gap: 4px;
		padding: 18px;
		width: 100%;
	}

	.iq-top-link {
		border-bottom: 1px solid #e2e8f0;
		border-radius: 0;
		font-size: 16px;
		font-weight: 700;
		color: #0f172a;
		padding: 16px 20px;
	}

	.iq-top-link:hover {
		background: #f8fafc;
		color: #2563eb;
	}

	.iq-menu-item.current-menu-item > .iq-top-link {
		background: #eff6ff;
		color: #2563eb;
		font-weight: 800;
		border-left: 4px solid #2563eb;
		padding-left: 16px;
	}

	.iq-dropdown-toggle {
		border-left: 1px solid #e2e8f0 !important;
		border-radius: 0 !important;
		height: 48px;
		right: 0;
		top: 0;
		width: 48px;
	}

	.iq-sub-link {
		border-radius: 0;
		padding: 13px 20px 13px 36px;
		color: #334155;
		font-weight: 600;
		border-bottom: 1px solid #e2e8f0;
	}

	.iq-sub-link:hover {
		color: #2563eb;
		background: #eff6ff;
	}

	.iq-mobile-toggle {
		background: transparent;
		border: 0 !important;
		border-left: 1px solid rgba(10, 31, 61, .12) !important;
		height: var(--iq-header-h);
		margin-right: -20px;
		width: 54px;
	}

	.iq-mobile-toggle:hover { background: #f3f7fb; border-color: rgba(10, 31, 61, .12); }
	.iq-mobile-toggle.iq-active { background: var(--iq-cta); border-color: var(--iq-cta) !important; }
	.iq-mobile-toggle span { border-radius: 0; width: 20px; }
}

@media (max-width: 480px) {
	.iq-mobile-toggle { height: var(--iq-header-h); margin-right: -14px; width: 48px; }
	.iq-cta-btn { padding: 10px 13px; }
}

/* Mobile navigation must cover the entire available screen, including menu links. */
@media (max-width: 900px) {
	.iq-header-nav {
		background: #fff !important;
		bottom: 0 !important;
		height: calc(100dvh - var(--iq-header-h)) !important;
		left: 0 !important;
		max-height: none !important;
		padding: 0 !important;
		right: 0 !important;
		top: var(--iq-header-h) !important;
		width: 100vw !important;
		display: block !important;
		z-index: 999999 !important;
	}

	body.admin-bar .iq-header-nav { height: calc(100dvh - var(--iq-header-h) - 46px) !important; top: calc(var(--iq-header-h) + 46px) !important; }

	.iq-header-nav.iq-mobile-open { transform: translateX(0) !important; }
	.iq-header-nav ul.iq-menu { margin: 0 !important; padding: 0 !important; width: 100% !important; }
	.iq-header-nav .iq-menu-item { margin: 0 !important; width: 100% !important; }
	.iq-header-nav .iq-top-link {
		color: #0f172a !important;
		font-size: 16px !important;
		font-weight: 700 !important;
		border-bottom: 1px solid #e2e8f0 !important;
		padding: 16px 22px !important;
		width: 100% !important;
		background: #ffffff !important;
	}
	.iq-header-nav .iq-top-link:hover {
		color: #2563eb !important;
		background: #f8fafc !important;
	}
	.iq-header-nav .iq-menu-item.current-menu-item > .iq-top-link {
		color: #2563eb !important;
		background: #eff6ff !important;
		font-weight: 800 !important;
		border-left: 4px solid #2563eb !important;
		padding-left: 18px !important;
	}
	.iq-header-nav ul.iq-sub-menu {
		margin-left: 0 !important;
		background: #f8fafc !important;
	}
	.iq-header-nav .iq-sub-link {
		color: #334155 !important;
		font-weight: 600 !important;
		padding-left: 38px !important;
		border-bottom: 1px solid #e2e8f0 !important;
	}
	.iq-header-nav .iq-sub-link:hover {
		color: #2563eb !important;
		background: #eff6ff !important;
	}
}

/* Elementor hero text stays readable and balanced on narrow phones. */
@media (max-width: 650px) {
	.elementor .elementor-heading-title { font-size: clamp(30px, 9vw, 40px) !important; line-height: 1.12 !important; }
	.elementor .elementor-widget-text-editor { font-size: 16px !important; line-height: 1.55 !important; }
	.elementor .e-con { min-width: 0; }
}

/* This site hides the WP admin bar; do not retain its invisible mobile offset. */
@media (max-width: 900px) {
	body.admin-bar .iq-header { top: 0 !important; }
	body.admin-bar .iq-header-nav { height: calc(100dvh - var(--iq-header-h)) !important; top: var(--iq-header-h) !important; }
	.iq-header-nav.iq-mobile-open { background: #fff !important; }
	.iq-header-nav.iq-mobile-open::before { background: #fff; content: ""; inset: 0; pointer-events: none; position: absolute; z-index: -1; }
	.iq-header-nav.iq-mobile-open ul.iq-menu { padding-top: 0 !important; }
	.iq-header-nav.iq-mobile-open .iq-menu-item:first-child .iq-top-link { border-top: 0; }
}
