/* ==========================================================
   FQ CUSTOM HEADER — farooque.dev
   Unique namespace: .fq-  (won't clash with Elementor classes)
   ========================================================== */

:root {
	--fq-max-width: 1250px;
	--fq-accent: #2f6fed;      /* adjust to match your brand blue */
	--fq-accent-dark: #1f4fc4;
	--fq-ink: #10131a;
	--fq-ink-soft: #565b66;
	--fq-border: #ecedf1;
	--fq-bg: #ffffff;
	--fq-header-h: 82px;
	--fq-header-h-scrolled: 64px;
	--fq-radius: 30px;
	--fq-logo-size: 25px;   /* medium size, text-based logo */
}

/* -------------------------------------------------
   0. Reset-ish helpers
   NOTE: .fq-mobile-nav and .fq-overlay live OUTSIDE
   the <header class="fq-header"> element in the markup
   (they're siblings, not children), so they need their
   own reset rules too — otherwise the browser's default
   UL bullet + left padding leaks into the mobile menu.
------------------------------------------------- */
.fq-header, .fq-header *,
.fq-mobile-nav, .fq-mobile-nav *,
.fq-overlay, .fq-overlay * { box-sizing: border-box; }

.fq-header a, .fq-mobile-nav a { text-decoration: none; color: inherit; }

.fq-header ul, .fq-mobile-nav ul,
.fq-header li, .fq-mobile-nav li { list-style: none; margin: 0; padding: 0; }

.fq-header li::marker, .fq-mobile-nav li::marker { content: ''; }

/* -------------------------------------------------
   1. HEADER SHELL — full width, sticky
------------------------------------------------- */
.fq-header {
	position: sticky;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 9999;
	background: var(--fq-bg);
	box-shadow: 0 2px 14px rgba(16, 19, 26, 0.06);
	transition: box-shadow .25s ease, background .25s ease;
}

.fq-header.is-scrolled {
	box-shadow: 0 4px 20px rgba(16, 19, 26, 0.10);
}

.fq-header__inner {
	max-width: var(--fq-max-width);
	margin: 0 auto;
	padding: 14px 24px; /* compact top/bottom padding */
	display: flex;
	align-items: center;
	justify-content: space-between;
	position: relative;
	min-height: 54px;
}

/* -------------------------------------------------
   2. LOGO (left)
------------------------------------------------- */
.fq-header__logo { flex: 0 0 auto; z-index: 2; }

.fq-header__logo img { display: block; max-height: 40px; width: auto; }

.fq-header__logo-text {
	font-size: var(--fq-logo-size);
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--fq-ink);       /* "Farooque" — black */
	line-height: 1;
}
.fq-header__logo-accent { color: var(--fq-accent); } /* ".dev" — brand blue */

/* -------------------------------------------------
   3. MAIN NAV — truly centered regardless of
      logo / button width, via absolute centering
      inside a relatively-positioned header inner.
------------------------------------------------- */
.fq-header__nav {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	z-index: 1;
}

.fq-menu {
	display: flex;
	align-items: center;
	gap: 6px;
}

.fq-menu__item { position: relative; }

.fq-menu__link {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 14px;
	font-size: 15px;
	font-weight: 600;
	color: var(--fq-ink);
	border-radius: 8px;
	transition: color .2s ease, background .2s ease;
	white-space: nowrap;
}

.fq-menu__item:hover > .fq-menu__link,
.fq-menu__link:focus-visible {
	color: var(--fq-accent);
	background: rgba(47, 111, 237, 0.06);
}

.fq-menu__caret {
	display: inline-flex;
	font-size: 10px;
	transition: transform .25s ease;
}

.fq-menu__item.has-mega:hover .fq-menu__caret,
.fq-menu__item.has-mega.is-open .fq-menu__caret {
	transform: rotate(180deg);
}

/* -------------------------------------------------
   4. CTA BUTTON (right) + mobile toggle
------------------------------------------------- */
.fq-header__actions {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 16px;
	z-index: 2;
}

.fq-btn.fq-btn--cta {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 15px 40px;      /* required spec */
	border-radius: 30px;     /* required spec */
	background: var(--fq-accent);
	color: #fff;
	font-weight: 700;
	font-size: 15px;
	line-height: 1;
	white-space: nowrap;
	box-shadow: 0 6px 16px rgba(47, 111, 237, 0.28);
	transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.fq-btn.fq-btn--cta:hover {
	background: var(--fq-accent-dark);
	transform: translateY(-1px);
	box-shadow: 0 8px 20px rgba(47, 111, 237, 0.34);
}
.fq-btn.fq-btn--cta i { font-size: 14px; }

.fq-toggle {
	display: none;   /* hidden by default (desktop); only shown ≤991px below */
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	width: 42px;
	height: 42px;
	background: rgba(47, 111, 237, 0.08);
	border: 1px solid rgba(47, 111, 237, 0.16);
	border-radius: 10px;
	cursor: pointer;
	padding: 0;
	transition: background .2s ease, border-color .2s ease;
}
.fq-toggle:hover {
	background: rgba(47, 111, 237, 0.14);
	border-color: rgba(47, 111, 237, 0.28);
}
.fq-toggle__bar {
	display: block;
	width: 20px;
	height: 2px;
	background: var(--fq-accent);
	border-radius: 2px;
	transition: transform .25s ease, opacity .25s ease;
}
.fq-toggle__bar:nth-child(2) { width: 15px; align-self: flex-end; margin-right: 2px; } /* subtle staggered look */
.fq-toggle:hover .fq-toggle__bar:nth-child(2) { width: 20px; margin-right: 0; }

.fq-toggle[aria-expanded="true"] { background: rgba(47, 111, 237, 0.12); border-color: rgba(47, 111, 237, 0.3); }
.fq-toggle[aria-expanded="true"] .fq-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.fq-toggle[aria-expanded="true"] .fq-toggle__bar:nth-child(2) { opacity: 0; }
.fq-toggle[aria-expanded="true"] .fq-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* -------------------------------------------------
   5. MEGA MENU (desktop) — 960px, professional
      dropdown with a small arrow/diamond on top
------------------------------------------------- */
.fq-mega {
	position: absolute;
	top: calc(100% + 18px);
	left: 50%;
	transform: translate(-50%, 8px);
	width: 960px;               /* required spec */
	max-width: 92vw;
	background: #fff;
	border: 1px solid var(--fq-border);
	border-radius: 16px;
	box-shadow: 0 24px 48px rgba(16, 19, 26, 0.14);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
	z-index: 50;
}

.fq-menu__item.has-mega:hover .fq-mega,
.fq-menu__item.has-mega.is-open .fq-mega {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translate(-50%, 0);
}

/* small diamond/arrow indicator on top of the panel */
.fq-mega__arrow {
	position: absolute;
	top: -8px;
	left: 50%;
	width: 0;
	height: 0;
	transform: translateX(-50%);
	border-left: 8px solid transparent;
	border-right: 8px solid transparent;
	border-bottom: 8px solid #fff;
	filter: drop-shadow(0 -2px 2px rgba(16, 19, 26, 0.06));
}

.fq-mega__inner {
	position: relative;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	padding: 28px;
}

.fq-mega__col + .fq-mega__col { border-left: 1px solid var(--fq-border); padding-left: 24px; }

.fq-mega__heading {
	display: block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--fq-accent);
	margin-bottom: 14px;
}

.fq-mega__list { display: flex; flex-direction: column; gap: 4px; }

.fq-mega__link {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 10px;
	border-radius: 10px;
	transition: background .18s ease;
}
.fq-mega__link:hover { background: #f4f7ff; }

.fq-mega__icon {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 9px;
	background: rgba(47, 111, 237, 0.10);
	color: var(--fq-accent);
	font-size: 14px;
}

.fq-mega__text { display: flex; flex-direction: column; gap: 2px; }
.fq-mega__label { font-size: 14px; font-weight: 700; color: var(--fq-ink); }
.fq-mega__desc { font-size: 12.5px; color: var(--fq-ink-soft); line-height: 1.3; }

/* -------------------------------------------------
   6. MOBILE OFF-CANVAS NAV
------------------------------------------------- */
.fq-overlay {
	position: fixed;
	inset: 0;
	background: rgba(16, 19, 26, 0.45);
	opacity: 0;
	visibility: hidden;
	transition: opacity .3s ease, visibility .3s ease;
	z-index: 10000;
}
.fq-overlay.is-active { opacity: 1; visibility: visible; }

.fq-mobile-nav {
	position: fixed;
	top: 0;
	right: 0;
	height: 100%;
	width: min(360px, 86vw);
	background: #fff;
	box-shadow: -12px 0 32px rgba(16, 19, 26, 0.18);
	transform: translateX(100%);
	transition: transform .32s ease;
	z-index: 10001;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
}
.fq-mobile-nav.is-active { transform: translateX(0); }

.fq-mobile-nav__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px;
	border-bottom: 1px solid var(--fq-border);
}
.fq-mobile-nav__close {
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(47, 111, 237, 0.08);
	border: 1px solid rgba(47, 111, 237, 0.16);
	width: 36px;
	height: 36px;
	border-radius: 50%;
	cursor: pointer;
	color: var(--fq-accent);
	font-size: 14px;
	line-height: 1;
	transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.fq-mobile-nav__close:hover {
	background: rgba(47, 111, 237, 0.14);
	border-color: rgba(47, 111, 237, 0.28);
	transform: rotate(90deg);
}

.fq-mobile-menu { padding: 8px 10px; }

.fq-mobile-menu__item { border-bottom: 1px solid var(--fq-border); }

.fq-mobile-menu__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.fq-mobile-menu__row a {
	flex: 1;
	padding: 14px 10px;
	font-weight: 600;
	font-size: 15px;
	color: var(--fq-ink);
}

.fq-mobile-menu__caret {
	background: transparent !important;
	border: none !important;
	padding: 14px 10px;
	color: var(--fq-ink-soft) !important;
	cursor: pointer;
}
.fq-mobile-menu__caret:hover,
.fq-mobile-menu__caret:focus {
	background: transparent !important;
	color: var(--fq-accent) !important;
}
.fq-mobile-menu__caret i { transition: transform .25s ease; }
.fq-mobile-menu__item.is-open > .fq-mobile-menu__row .fq-mobile-menu__caret i {
	transform: rotate(180deg); /* rotating arrow, mirrors desktop caret */
}

.fq-mobile-submenu {
	max-height: 0;
	overflow: hidden;
	transition: max-height .3s ease;
	padding: 0 10px;
}
.fq-mobile-menu__item.is-open .fq-mobile-submenu {
	max-height: 900px;
	padding-bottom: 10px;
}

.fq-mobile-submenu__group { margin-top: 10px; }
.fq-mobile-submenu__heading {
	display: block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--fq-accent);
	margin-bottom: 6px;
}
.fq-mobile-submenu__group ul { display: flex; flex-direction: column; }
.fq-mobile-submenu__group a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 6px;
	font-size: 13.5px;
	color: var(--fq-ink-soft);
}
.fq-mobile-submenu__group a i { color: var(--fq-accent); width: 16px; text-align: center; }

.fq-btn--mobile {
	margin: 18px 20px 24px;
	justify-content: center;
}

/* -------------------------------------------------
   7. RESPONSIVE BREAKPOINTS
------------------------------------------------- */
@media (max-width: 1100px) {
	.fq-mega { width: 92vw; }
}

@media (max-width: 991px) {
	.fq-header__nav { display: none; } /* desktop nav + mega menu hidden */
	.fq-toggle { display: flex; }
	.fq-btn.fq-btn--cta:not(.fq-btn--mobile) { display: none; } /* CTA lives inside off-canvas on mobile */
	.fq-header__inner { padding: 12px 20px; }
}

@media (min-width: 992px) {
	.fq-mobile-nav, .fq-overlay { display: none; }
	/* Force-hidden with extra specificity + !important so it can't be
	   overridden by theme/Elementor global button styles that sometimes
	   set `display: inline-flex !important` on all <button> elements. */
	.fq-header .fq-header__actions button.fq-toggle { display: none !important; }
}
