/* ============================================
   Infera Systems — Custom Styles
   ============================================ */

/* --- Base & Reset -------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	background-color: #0F172A;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* ─── Hero Section ──────────────────────────────── */
/* ISW-203: hero-bg.jpg was a 7001x4001 (28MP, 1.35MB) source used directly as
   the CSS background — the single largest driver of page weight and LCP.
   Plain url() fallback first (for browsers without image-set support), then
   image-set() with WebP/JPEG pairs at 750px (mobile) and 2000px (tablet+)
   widths, generated from the same source. Preload hints matching these same
   breakpoints/files live in functions.php (wp_head), since CSS background
   images aren't discovered by the browser's preload scanner. */
.hero-section {
	background-image: url('../images/hero-bg-750.jpg') !important;
	background-image: image-set(
		url('../images/hero-bg-750.webp') type('image/webp'),
		url('../images/hero-bg-750.jpg') type('image/jpeg')
	) !important;
	background-size: cover !important;
	background-position: center top !important;
	background-repeat: no-repeat !important;
	background-color: #0F172A !important;
	position: relative;
	overflow: hidden;
}
/* ISW-199: min-height:100vh previously forced the hero to fill the entire
   viewport regardless of content, leaving a growing dead gap before the
   next section on any viewport taller than the hero's natural content
   height (~812px with its own padding) — worse on taller monitors. Content
   + the hero's existing 7rem top/bottom padding is sufficient visual
   weight on its own; removed the artificial min-height so the section
   hugs its actual content. */

@media (min-width: 769px) {
	.hero-section {
		background-image: url('../images/hero-bg-2000.jpg') !important;
		background-image: image-set(
			url('../images/hero-bg-2000.webp') type('image/webp'),
			url('../images/hero-bg-2000.jpg') type('image/jpeg')
		) !important;
	}
}

/* --- Site Header --------------------------------- */
.site-header {
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	background-color: rgba(15, 23, 42, 0.85) !important;
	transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* --- Navigation ---------------------------------- */
.wp-block-navigation .wp-block-navigation__container {
	align-items: center !important;
	flex-wrap: nowrap !important;
	gap: 2rem !important;
}
.wp-block-navigation .wp-block-navigation-item {
	display: flex !important;
	align-items: center !important;
	white-space: nowrap !important;
}
.wp-block-navigation a {
	color: #A8B6CA !important;
	transition: color 0.2s ease;
}
.wp-block-navigation a:hover { color: #FFFFFF !important; }

/* Active page highlight — exclude responsive container duplicate */
.wp-block-navigation__container > .wp-block-navigation-item > a[aria-current="page"] {
	color: #FFFFFF !important;
	position: relative;
}
.wp-block-navigation__container > .wp-block-navigation-item > a[aria-current="page"]::after {
	content: '';
	position: absolute;
	bottom: -4px;
	left: 0;
	right: 0;
	height: 2px;
	background: linear-gradient(90deg, #2563EB, #06B6D4);
	border-radius: 2px;
}
/* Active parent nav item (set via JS for block navigation) */
.wp-block-navigation-item.nav-active-parent > a.wp-block-navigation-item__content {
	color: #FFFFFF !important;
}
.wp-block-navigation-item.nav-active-parent {
	position: relative;
}
.wp-block-navigation-item.nav-active-parent::after {
	content: '';
	position: absolute;
	bottom: -4px;
	left: 0;
	right: 0;
	height: 2px;
	background: linear-gradient(90deg, #2563EB, #06B6D4);
	border-radius: 2px;
	z-index: 1;
}


.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	color: #FFFFFF !important;
}


.hero-section::before {
	content: '';
	position: absolute;
	inset: 0;
	background:
		linear-gradient(to bottom, rgba(15,23,42,0.72) 0%, rgba(15,23,42,0.55) 50%, rgba(15,23,42,0.80) 100%),
		radial-gradient(ellipse 80% 50% at 50% -10%, rgba(37, 99, 235, 0.18) 0%, transparent 60%),
		radial-gradient(ellipse 60% 40% at 80% 80%, rgba(124, 58, 237, 0.08) 0%, transparent 50%);
	pointer-events: none;
	z-index: 0;
}

.hero-section > * { position: relative; z-index: 1; }

.hero-badge {
	display: inline-flex !important;
	margin-left: auto;
	margin-right: auto;
}

/* Hero stats shimmer border */
.hero-stats {
	position: relative;
	overflow: hidden;
	width: fit-content !important;
	max-width: calc(100% - 2rem) !important;
	margin-left: auto !important;
	margin-right: auto !important;
}
.hero-stats > .wp-block-group,
.hero-stats > .wp-block-separator {
	flex-shrink: 0;
}
.hero-stats::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 16px;
	padding: 1px;
	background: linear-gradient(135deg, rgba(37,99,235,0.4), rgba(6,182,212,0.2), rgba(37,99,235,0.1));
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	pointer-events: none;
}

/* --- Solution Cards ------------------------------ */
.solution-card {
	transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
	height: 100%;
}
.solution-card:hover {
	transform: translateY(-4px);
	border-color: #2563EB !important;
	box-shadow: 0 8px 40px rgba(37, 99, 235, 0.2);
}
.solution-card.featured:hover {
	box-shadow: 0 8px 40px rgba(37, 99, 235, 0.35);
}

/* Feature list styling */
.feature-list {
	list-style: none !important;
	padding: 0 !important;
	margin: 0 !important;
}
.feature-list li {
	padding: 0.35rem 0 0.35rem 1.5rem;
	position: relative;
}
.feature-list li::before {
	content: '✓';
	position: absolute;
	left: 0;
	color: #06B6D4;
	font-weight: 700;
	font-size: 0.8rem;
}

/* --- Step Items ---------------------------------- */
.step-item {
	text-align: center !important;
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	width: 220px !important;
	flex-shrink: 0;
}

.step-item > * {
	width: 100%;
	text-align: center !important;
}

.step-number {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 56px !important;
	height: 56px !important;
	border-radius: 50% !important;
	margin: 0 auto !important;
	flex-shrink: 0;
}

.step-arrow {
	display: flex;
	align-items: center;
	color: #2563EB !important;
	opacity: 0.5;
	padding-top: 0 !important;
	align-self: center !important;
}

.wp-block-group.alignwide:has(.step-item) {
	align-items: flex-start !important;
}

.outcomes-box {
	justify-content: space-between !important;
}
.outcomes-box > .wp-block-group {
	align-items: center !important;
}
.outcomes-box p {
	text-align: center !important;
}

@media (max-width: 768px) {
	.step-arrow { display: none !important; }
	.step-item {
		width: 100% !important;
		max-width: 100% !important;
	}
	.wp-block-group.alignwide:has(.sol-step) {
		grid-template-columns: 1fr !important;
	}
	.outcomes-box {
		flex-direction: column !important;
		align-items: flex-start !important;
	}
	.outcomes-box > .wp-block-group {
		width: 100% !important;
		align-items: flex-start !important;
	}
	.outcomes-box p {
		text-align: left !important;
	}
	.outcomes-box p[style*="2.5rem"] {
		font-size: 1.75rem !important;
	}
}

/* --- Industry Cards ------------------------------ */
/* Scoped to desktop only (matches the .uc-card fix below) — this forces
   equal-width columns for row alignment, which fights WP core's own mobile
   column-stacking rule (each column -> flex-basis:100%) since both use
   !important at the same specificity and this file loads after core
   styles. Without the media query, mobile columns were forced to a razor-
   thin 1/4-width share instead of stacking full-width, wrapping every
   card's text to one character per line. */
@media (min-width: 769px) {
	.wp-block-columns:has(.industry-card) {
		align-items: stretch !important;
	}
	.wp-block-columns:has(.industry-card) > .wp-block-column {
		display: flex !important;
		flex-direction: column;
		/* Row 1 has 4 real (auto-width) columns; row 2 has 3 real (auto-width)
		   cards plus a 4th column with an explicit width:25% used purely as an
		   empty spacer. Auto columns don't divide evenly to exactly 25% each
		   around a fixed-width sibling, so row 2's cards came out ~1.5% (a few
		   px, growing left-to-right) narrower than row 1's, misaligning the
		   columns down the page. Forcing every column (real or spacer) to an
		   equal 1/4-share flex-basis, ignoring each one's own width setting,
		   makes both rows compute identical column widths. */
		flex: 1 1 0% !important;
	}
	.wp-block-columns:has(.industry-card) > .wp-block-column > .industry-card {
		flex: 1;
	}
}
/* The card's own block layout is authored with alignItems:flex-start (icon
   top-aligned with the heading/text column), but that never made it into
   the card's inline style — WP's default flex-layout support renders it as
   align-items:center instead. That's invisible while every card is exactly
   as tall as its content, but once flex:1 above stretches cards to match
   the tallest one in a row, centering pushes shorter cards' icon+text
   content down by differing amounts (depending on how much taller the
   stretched box is than that particular card's own content), so cards
   whose title wraps to 2 lines vs. 1 line no longer start at the same
   vertical position — looks misaligned despite equal card heights. */
.industry-card {
	align-items: flex-start !important;
	transition: transform 0.2s ease, border-color 0.2s ease;
}
.industry-card:hover {
	transform: translateX(4px);
	border-color: #2563EB !important;
}

/* --- Footer ------------------------------------- */
@media (max-width: 768px) {
	.footer-nav-row {
		flex-direction: column !important;
		gap: 2rem !important;
		align-items: center !important;
	}
	.footer-nav-row > .wp-block-group {
		align-items: center !important;
		text-align: center !important;
	}
	.footer-nav-row .footer-links {
		text-align: center !important;
		align-items: center !important;
	}
	.footer-legal-bar {
		justify-content: center !important;
	}
	.footer-legal-bar p {
		text-align: center !important;
	}
}

.footer-links {
	list-style: none !important;
	padding: 0 !important;
	margin: 0 !important;
}
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a {
	transition: color 0.2s ease;
}
.footer-links a:hover { color: #CBD5E1 !important; }

/* --- CTA Box ------------------------------------- */
.cta-box {
	position: relative;
	overflow: hidden;
}
.cta-box::after {
	content: '';
	position: absolute;
	top: -50%;
	left: 50%;
	transform: translateX(-50%);
	width: 600px;
	height: 600px;
	background: radial-gradient(circle, rgba(37,99,235,0.08) 0%, transparent 70%);
	pointer-events: none;
}

/* --- Buttons ------------------------------------- */
.wp-block-button__link {
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease !important;
}
.wp-block-button__link:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35);
}

/* --- Solutions Overview Cards -------------------- */

/* Force columns to stretch so all cards in a row reach equal height */
.wp-block-columns:has(.sol-overview-card) {
	align-items: stretch !important;
}
.wp-block-columns:has(.sol-overview-card) > .wp-block-column {
	display: flex !important;
	flex-direction: column;
}
.wp-block-columns:has(.sol-overview-card) > .wp-block-column > .wp-block-group {
	flex: 1;
}

.sol-overview-card {
	height: 100%;
	transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
	display: flex !important;
	flex-direction: column;
}
.sol-overview-card:hover {
	transform: translateY(-6px);
	border-color: #2563EB !important;
	box-shadow: 0 12px 40px rgba(37,99,235,0.18);
}
/* Push the metric/link footer row to the bottom of every card */
.sol-overview-card > .wp-block-group:last-child { margin-top: auto; }

/* Solutions steps */
.wp-block-group.alignwide:has(.sol-step) {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.5rem;
	align-items: start;
}
.sol-step {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	text-align: center;
	padding: 1.5rem !important;
}
.sol-step .wp-block-group {
	display: flex !important;
	justify-content: center !important;
	align-items: center !important;
	flex-shrink: 0;
}
.sol-step h4 { text-align: center !important; }
.sol-step p { text-align: center !important; }

/* Use-case cards */
/* On wide viewports the 2 columns sit side by side, each independently
   stacking 2 cards — so mismatched text lengths (e.g. a 2-line vs. 1-line
   description) make row 2's cards start at different heights across
   columns, looking staggered/unaligned. Scoped to min-width:769px (matching
   this file's 768px mobile breakpoint) because below that WordPress core
   already stacks .wp-block-columns into a single column (flex-basis:100%
   per column) — there's no side-by-side misalignment to fix on mobile, and
   forcing this same grid there would override that native stacking and
   squeeze all 4 cards into a cramped 2-column grid instead of stacking
   full-width. Turning the columns wrapper into a 2-column grid with
   grid-auto-flow:column, and the intermediate column divs into
   display:contents (so the actual card divs become direct grid items in
   their original left-then-right, top-then-bottom order), aligns row 1 and
   row 2 across both columns without touching any post content.

   Scoped by page ID (body.page-id-N, added by WP core automatically) to
   only the 9 Solution pages' "Use Cases" section, which is always exactly
   4 cards in a 2x2 layout (hence the hardcoded grid-template-rows:
   repeat(2, auto)). The .uc-card class is also reused on 3 Services pages
   (AI Strategy & Consulting: 6 cards, Custom AI Development: 5 cards, AI
   Integration: 6 cards) with different card counts per column — applying
   this same fixed 2-row grid there forced extra cards into unintended
   additional columns instead of additional rows, breaking their layout
   (regression found and reported after this fix first shipped). Rather
   than re-deriving a generic N-row solution, scoping by page ID keeps the
   fix exactly as narrow as the bug it was written for. */
@media (min-width: 769px) {
	body.page-id-19 .wp-block-columns:has(.uc-card),
	body.page-id-20 .wp-block-columns:has(.uc-card),
	body.page-id-21 .wp-block-columns:has(.uc-card),
	body.page-id-22 .wp-block-columns:has(.uc-card),
	body.page-id-23 .wp-block-columns:has(.uc-card),
	body.page-id-24 .wp-block-columns:has(.uc-card),
	body.page-id-25 .wp-block-columns:has(.uc-card),
	body.page-id-26 .wp-block-columns:has(.uc-card),
	body.page-id-27 .wp-block-columns:has(.uc-card) {
		display: grid;
		grid-template-columns: 1fr 1fr;
		grid-template-rows: repeat(2, auto);
		grid-auto-flow: column;
	}
	body.page-id-19 .wp-block-columns:has(.uc-card) > .wp-block-column,
	body.page-id-20 .wp-block-columns:has(.uc-card) > .wp-block-column,
	body.page-id-21 .wp-block-columns:has(.uc-card) > .wp-block-column,
	body.page-id-22 .wp-block-columns:has(.uc-card) > .wp-block-column,
	body.page-id-23 .wp-block-columns:has(.uc-card) > .wp-block-column,
	body.page-id-24 .wp-block-columns:has(.uc-card) > .wp-block-column,
	body.page-id-25 .wp-block-columns:has(.uc-card) > .wp-block-column,
	body.page-id-26 .wp-block-columns:has(.uc-card) > .wp-block-column,
	body.page-id-27 .wp-block-columns:has(.uc-card) > .wp-block-column {
		display: contents;
	}
	body.page-id-19 .uc-card,
	body.page-id-20 .uc-card,
	body.page-id-21 .uc-card,
	body.page-id-22 .uc-card,
	body.page-id-23 .uc-card,
	body.page-id-24 .uc-card,
	body.page-id-25 .uc-card,
	body.page-id-26 .uc-card,
	body.page-id-27 .uc-card {
		margin-bottom: 0 !important;
	}

	/* Custom AI Development ("What We Build") has 5 cards split 3+2 across
	   the 2 columns (not 4 split 2+2 like the Solution pages above), so it
	   needs its own row count: 3 explicit rows lets grid-auto-flow:column
	   place column 1's 3 cards into rows 1-3 and column 2's 2 cards into
	   rows 1-2 (row 3 col 2 stays empty, matching the original 3+2 intent)
	   while still equalizing row 1 and row 2's heights across columns. */
	body.page-id-72 .wp-block-columns:has(.uc-card) {
		display: grid;
		grid-template-columns: 1fr 1fr;
		grid-template-rows: repeat(3, auto);
		grid-auto-flow: column;
	}
	body.page-id-72 .wp-block-columns:has(.uc-card) > .wp-block-column {
		display: contents;
	}
	body.page-id-72 .uc-card {
		margin-bottom: 0 !important;
	}
}
.uc-card {
	transition: border-color 0.2s ease;
}
.uc-card:hover { border-color: #2563EB !important; }

/* --- About Page ---------------------------------- */
.about-stat-card {
	transition: transform 0.25s ease, border-color 0.25s ease;
}
.about-stat-card:hover {
	transform: translateX(4px);
	border-color: #2563EB !important;
}

.diff-card {
	transition: transform 0.25s ease, border-color 0.25s ease;
	height: 100%;
}
.diff-card:hover {
	transform: translateY(-4px);
	border-color: #2563EB !important;
}

.value-row {
	transition: background 0.2s ease;
}
.value-row:hover { background: rgba(37, 99, 235, 0.03); }

@media (max-width: 768px) {
	.value-row { flex-direction: column !important; gap: 0.75rem; }
	.value-row > p { min-width: unset !important; margin-right: 0 !important; }
}

/* --- Scrollbar ----------------------------------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #06060E; }
::-webkit-scrollbar-thumb { background: #1E2D4A; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #2563EB; }

/* --- Selection ----------------------------------- */
::selection { background: rgba(37, 99, 235, 0.3); color: #FFFFFF; }

/* --- Fade-in animation on scroll ----------------- */
.fade-in-up {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in-up.visible {
	opacity: 1;
	transform: translateY(0);
}

/* --- Responsive ---------------------------------- */
@media (max-width: 600px) {
	.hero-stats {
		flex-wrap: wrap !important;
		gap: 1.5rem 0 !important;
		padding: 1.5rem 1rem !important;
	}
	.hero-stats > .wp-block-group {
		flex-basis: 45% !important;
		align-items: center !important;
	}
	.hero-stats .wp-block-separator { display: none !important; }
	.hero-stats p[style*="2.25rem"] { font-size: 1.5rem !important; }
	.cta-box { padding: 3rem 1.5rem !important; }
}

/* Custom Location dropdown */
.cf7-custom-select {
	position: relative;
	width: 100%;
}
.cf7-custom-select__trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #0A0F1E;
	border: 1px solid #1E2D4A;
	border-radius: 10px;
	color: #475569;
	font-size: 0.9375rem;
	padding: 0.75rem 1rem;
	cursor: pointer;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	user-select: none;
}
.cf7-custom-select.open .cf7-custom-select__trigger,
.cf7-custom-select__trigger:hover {
	border-color: #2563EB;
}
.cf7-custom-select__trigger.selected { color: #FFFFFF; }
.cf7-custom-select__arrow { flex-shrink: 0; transition: transform 0.2s ease; }
.cf7-custom-select.open .cf7-custom-select__arrow { transform: rotate(180deg); }
.cf7-custom-select__list {
	display: none;
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	background: #0D1117;
	border: 1px solid #1E2D4A;
	border-radius: 10px;
	max-height: 220px;
	overflow-y: auto;
	z-index: 999;
	list-style: none;
	margin: 0;
	padding: 0.375rem 0;
	scrollbar-width: thin;
	scrollbar-color: #1E2D4A transparent;
}
.cf7-custom-select.open .cf7-custom-select__list { display: block; }
.cf7-custom-select__option {
	padding: 0.5rem 1rem;
	color: #94A3B8;
	font-size: 0.875rem;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}
.cf7-custom-select__option:hover,
.cf7-custom-select__option.selected {
	background: #1E2D4A;
	color: #FFFFFF;
}
/* --- Site Logo ----------------------------------- */
.wp-block-site-logo { width: 53px !important; flex-shrink: 0; }
.wp-block-site-logo img { width: 53px; height: 53px; display: block; }
.wp-block-group:has(.wp-block-site-logo) { gap: 0 !important; }
/* --- Services Dropdown --------------------------- */
.wp-block-navigation__submenu-container,
.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container {
	background-color: #0D1117 !important;
	border: 1px solid #1E2D4A !important;
	border-radius: 8px !important;
	padding: 0.5rem 0 !important;
	min-width: 260px !important;
	box-shadow: 0 8px 32px rgba(0,0,0,0.5) !important;
	color: #FFFFFF !important;
}

.wp-block-navigation__submenu-container .wp-block-navigation-item {
	background-color: transparent !important;
}

.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.65rem 1.25rem !important;
	border-radius: 0 !important;
	transition: background 0.15s ease !important;
	display: flex !important;
	flex-direction: column !important;
	align-items: flex-start !important;
	color: #FFFFFF !important;
	background-color: transparent !important;
}

.wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover,
.wp-block-navigation__submenu-container .wp-block-navigation-item:hover > .wp-block-navigation-item__content {
	background-color: #1E2D4A !important;
	color: #FFFFFF !important;
}

.wp-block-navigation__submenu-container .wp-block-navigation-item__label,
.wp-block-navigation__submenu-container a,
.wp-block-navigation__submenu-container a:visited {
	color: #FFFFFF !important;
	font-size: 0.875rem !important;
	font-weight: 500 !important;
	text-decoration: none !important;
}

.wp-block-navigation__submenu-container .wp-block-navigation-item__description {
	color: #94A3B8 !important;
	font-size: 0.75rem !important;
	margin-top: 0.15rem !important;
}

/* Chevron */
.wp-block-navigation-item.has-child > .wp-block-navigation-item__content .wp-block-navigation__submenu-icon svg {
	stroke: #9CA3AF !important;
}

/* --- Solutions Mega Menu ------------------------- */
.mega-menu-solutions > .wp-block-navigation__submenu-container {
	display: grid !important;
	grid-template-columns: repeat(3, 1fr) !important;
	grid-template-rows: repeat(4, auto) !important;
	grid-auto-flow: column !important;
	width: 720px !important;
	min-width: unset !important;
	padding: 1.25rem 0.5rem !important;
	gap: 0 !important;
	left: 50% !important;
	transform: translateX(-50%) !important;
}

/* Group headings */
.mega-menu-solutions .mega-heading > .wp-block-navigation-item__content {
	padding: 0.5rem 1rem 0.4rem !important;
	pointer-events: none !important;
	cursor: default !important;
}
.mega-menu-solutions .mega-heading .wp-block-navigation-item__label,
.mega-menu-solutions .mega-heading a {
	color: #3498DB !important;
	font-size: 0.65rem !important;
	font-weight: 700 !important;
	letter-spacing: 0.12em !important;
	text-transform: uppercase !important;
	text-decoration: none !important;
}
.mega-menu-solutions .mega-heading .wp-block-navigation-item__content:hover {
	background-color: transparent !important;
}

/* Solution links */
.mega-menu-solutions .wp-block-navigation__submenu-container .wp-block-navigation-item:not(.mega-heading) .wp-block-navigation-item__content {
	padding: 0.5rem 1rem !important;
}
.mega-menu-solutions .wp-block-navigation__submenu-container .wp-block-navigation-item:not(.mega-heading) .wp-block-navigation-item__label {
	font-size: 0.8125rem !important;
	font-weight: 500 !important;
}
.mega-menu-solutions .wp-block-navigation__submenu-container .wp-block-navigation-item:not(.mega-heading) .wp-block-navigation-item__description {
	color: #64748B !important;
	font-size: 0.7rem !important;
}

/* --- Header Contact Icons ------------------------ */
.header-contact-icons {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-shrink: 0;
}
.header-contact-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #94A3B8;
	transition: color 0.2s ease;
	line-height: 0;
}
.header-contact-icon:hover {
	color: #FFFFFF;
}

/* --- Contact Form 7 — dark theme styling ------------------- */
.wpcf7 form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}
/* CF7 wraps each field in a <p> — reset margins and make <p> the grid item */
.wpcf7 form > p { margin: 0; min-width: 0; }
/* Fieldset with hidden CF7 housekeeping inputs — keep in DOM but remove from grid flow */
.wpcf7 form > fieldset {
	grid-column: 1 / -1;
	padding: 0;
	margin: 0;
	border: 0;
	height: 0;
	overflow: hidden;
}
/* Full-width fields — target the <p> wrapper that CF7 generates */
.wpcf7 form > p:has([data-name="your-email"]),
.wpcf7 form > p:has([data-name="your-company"]),
.wpcf7 form > p:has([data-name="your-message"]),
.wpcf7 form > p:has([data-name="consent-checkbox"]),
.wpcf7 form > .wpcf7-response-output {
	grid-column: 1 / -1;
}
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 select,
.wpcf7 textarea {
	background: #0A0F1E;
	border: 1px solid #1E2D4A;
	border-radius: 8px;
	color: #FFFFFF;
	font-size: 0.9375rem;
	padding: 0.875rem 1rem;
	width: 100%;
	transition: border-color 0.2s ease;
	outline: none;
	box-sizing: border-box;
}
.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus { border-color: #2563EB; box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }
.wpcf7 input::placeholder,
.wpcf7 textarea::placeholder { color: #64748B; }

.wpcf7 select {
	appearance: none;
	cursor: pointer;
	color: #64748B;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748B' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1rem center;
	padding-right: 2.5rem;
}
.wpcf7 select option { background: #0F172A; color: #FFFFFF; }
.wpcf7 select option[value=""],
.wpcf7 select option:disabled { color: #64748B; background: #0F172A; }
/* Fixed-height textarea, no resize */
.wpcf7 textarea { resize: none; height: 130px; overflow-y: auto; }
/* Suppress browser autofill blue/yellow background */
.wpcf7 input:-webkit-autofill,
.wpcf7 input:-webkit-autofill:hover,
.wpcf7 input:-webkit-autofill:focus {
	-webkit-text-fill-color: #FFFFFF;
	-webkit-box-shadow: 0 0 0 1000px #0A0F1E inset;
	transition: background-color 5000s ease-in-out 0s;
	caret-color: #FFFFFF;
}
/* Turnstile bottom-left, Send Message bottom-right (both direct form
   children) — the consent checkbox sits on its own full-width row above
   this pair (see the full-width :has() group above), rather than sharing
   this row, so its text has room to breathe instead of wrapping tightly.
   CF7 core's native Turnstile widget renders as a bare
   <div class="wpcf7-turnstile cf-turnstile"> direct child of the form —
   NOT wrapped in a <p> and with no [data-name] attribute (that's only on
   CF7's <span class="wpcf7-form-control-wrap"> fields). Targeting
   `.cf7-cf-turnstile` (the unrelated third-party plugin's class) or
   `p:has([data-name="turnstile"])` matches nothing here; both were
   silently no-ops, leaving this element on `grid-column: auto` and
   relying on lucky grid auto-placement. */
.wpcf7 form > .wpcf7-turnstile {
	grid-column: 1;
	align-self: center;
	margin: 0 !important;
}
.wpcf7 form > p:has([type="submit"]) {
	grid-column: 2;
	display: flex;
	justify-content: flex-end;
	align-self: center;
	margin: 0;
	position: relative;
}
.wpcf7 form > p:has([type="submit"]) .wpcf7-spinner {
	position: absolute;
	right: 0;
}
.wpcf7 form > br { display: none; }

.wpcf7 input[type="submit"] {
	background: #2563EB;
	border: none;
	border-radius: 10px;
	color: #FFFFFF;
	cursor: pointer;
	font-size: 0.9375rem;
	font-weight: 600;
	padding: 0.875rem 2rem;
	transition: background 0.2s ease, transform 0.2s ease;
	width: auto;
	justify-self: end;
}
.wpcf7 input[type="submit"]:hover { background: #1D4ED8; transform: translateY(-1px); }
.wpcf7-response-output {
	border-radius: 8px;
	font-size: 0.875rem;
	padding: 0.75rem 1rem;
	margin-top: 0 !important;
}
.wpcf7 .wpcf7-not-valid-tip { color: #F87171; font-size: 0.8125rem; margin-top: 0.25rem; display: block; }

@media (max-width: 640px) {
	.wpcf7 form > p,
	.wpcf7 form > .wpcf7-turnstile {
		grid-column: 1 / -1 !important;
	}
	.wpcf7 form > p:has([type="submit"]) {
		justify-content: flex-end;
	}
}

/* ── Mobile hamburger menu ─────────────────────────── */

/* Hide hamburger and overlay on desktop */
#mobile-burger { display: none; }
#mobile-overlay { display: none; }

@media (max-width: 1023px) {

	/* Hide WP navigation block and header CTA button on mobile */
	.wp-block-navigation,
	.site-header .wp-block-buttons { display: none !important; }

	/* Show hamburger button */
	#mobile-burger {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		gap: 5px;
		width: 44px;
		height: 44px;
		background: transparent;
		border: 1px solid #2A3F5F;
		border-radius: 8px;
		cursor: pointer;
		padding: 0;
		flex-shrink: 0;
		margin-left: auto;
		z-index: 1001;
		transition: border-color 0.2s;
	}
	#mobile-burger:hover { border-color: #2563EB; }
	#mobile-burger span {
		display: block;
		width: 20px;
		height: 2px;
		background: #FFFFFF;
		border-radius: 2px;
		transition: transform 0.25s, opacity 0.25s;
	}
	#mobile-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
	#mobile-burger.open span:nth-child(2) { opacity: 0; }
	#mobile-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

	/* Full-screen overlay */
	#mobile-overlay {
		display: flex;
		position: fixed;
		inset: 0;
		background: rgba(15, 23, 42, 0.97);
		backdrop-filter: blur(12px);
		-webkit-backdrop-filter: blur(12px);
		z-index: 9999;
		flex-direction: column;
		padding: 5rem 2rem 2rem;
		overflow-y: auto;
		opacity: 0;
		pointer-events: none;
		transition: opacity 0.25s ease;
	}
	#mobile-overlay.open {
		opacity: 1;
		pointer-events: all;
	}

	/* Close button */
	#mobile-overlay-close {
		position: absolute;
		top: 1.25rem;
		right: 1.5rem;
		background: transparent;
		border: 1px solid #2A3F5F;
		border-radius: 8px;
		width: 44px;
		height: 44px;
		display: flex;
		align-items: center;
		justify-content: center;
		cursor: pointer;
		transition: border-color 0.2s;
	}
	#mobile-overlay-close:hover { border-color: #2563EB; }

	/* Nav items */
	.mobile-nav { display: flex; flex-direction: column; gap: 0; width: 100%; }

	.mobile-nav__item {
		border-bottom: 1px solid #2A3F5F;
	}

	.mobile-nav__link {
		display: flex;
		align-items: center;
		width: 100%;
		padding: 1.125rem 0;
		color: #E2E8F0;
		font-size: 1.0625rem;
		font-weight: 500;
		text-decoration: none;
		transition: color 0.2s;
	}
	.mobile-nav__link:hover { color: #FFFFFF; }

	/* Parent row: link + chevron side by side */
	.mobile-nav__parent-row {
		display: flex;
		align-items: center;
		justify-content: space-between;
	}
	.mobile-nav__parent-link {
		flex: 1;
		padding: 1.125rem 0;
		color: #E2E8F0;
		font-size: 1.0625rem;
		font-weight: 500;
		text-decoration: none;
		transition: color 0.2s;
	}
	.mobile-nav__parent-link:hover { color: #FFFFFF; }
	.mobile-nav__chevron-btn {
		background: transparent;
		border: none;
		cursor: pointer;
		padding: 0.5rem;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	/* Chevron */
	.mobile-nav__chevron {
		transition: transform 0.25s;
		flex-shrink: 0;
	}
	.mobile-nav__item.open .mobile-nav__chevron {
		transform: rotate(180deg);
	}

	/* Accordion sub-menu */
	.mobile-nav__sub {
		display: none;
		flex-direction: column;
		padding-bottom: 0.75rem;
		gap: 0;
	}
	.mobile-nav__item.open .mobile-nav__sub { display: flex; }

	.mobile-nav__sub-link {
		display: block;
		padding: 0.625rem 1rem;
		color: #A8B6CA;
		font-size: 0.9375rem;
		text-decoration: none;
		border-radius: 6px;
		transition: color 0.2s, background 0.2s;
	}
	.mobile-nav__sub-link:hover { color: #FFFFFF; background: #2A3F5F; }

	/* Active state for current page link in overlay */
	.mobile-nav__active {
		color: #06B6D4 !important;
	}

	/* CTA button */
	.mobile-nav__cta {
		display: inline-block;
		margin-top: 2rem;
		padding: 0.875rem 2rem;
		background: #2563EB;
		color: #FFFFFF;
		font-size: 1rem;
		font-weight: 600;
		text-decoration: none;
		border-radius: 8px;
		text-align: center;
		transition: background 0.2s;
	}
	.mobile-nav__cta:hover { background: #1D4ED8; }
}

/* ── Privacy Policy page ───────────────────────────── */
.page-id-3 .wp-block-post-content {
	padding-left: 3rem;
	padding-right: 3rem;
}
.page-id-3 .wp-block-paragraph {
	text-align: justify;
	overflow-wrap: break-word;
	line-height: 1.8;
}
.page-id-3 .wp-block-list li {
	text-align: justify;
	overflow-wrap: break-word;
	line-height: 1.8;
}
.page-id-3 .wp-block-heading {
	margin-top: 2rem;
}

/* ── Terms of Service page (ID: 77) ────────────────── */
.page-id-77 .wp-block-post-content {
	padding-left: 3rem;
	padding-right: 3rem;
}
.page-id-77 .wp-block-paragraph {
	text-align: justify;
	overflow-wrap: break-word;
	line-height: 1.8;
}
.page-id-77 .wp-block-list li {
	text-align: justify;
	overflow-wrap: break-word;
	line-height: 1.8;
}
.page-id-77 .wp-block-heading {
	margin-top: 2rem;
}

/* ── Cookie Policy page (ID: 80) ────────────────── */
.page-id-80 .wp-block-post-content {
	padding-left: 3rem;
	padding-right: 3rem;
}
.page-id-80 .wp-block-paragraph {
	text-align: justify;
	overflow-wrap: break-word;
	line-height: 1.8;
}
.page-id-80 .wp-block-list li {
	text-align: justify;
	overflow-wrap: break-word;
	line-height: 1.8;
}
.page-id-80 .wp-block-heading {
	margin-top: 2rem;
}

/* --- Legal pages (Privacy Policy, Terms of Service, Cookie Policy) --- */
.page-id-3 .entry-content p,
.page-id-3 .wp-block-group p,
.page-id-77 .entry-content p,
.page-id-77 .wp-block-group p,
.page-id-80 .entry-content p,
.page-id-80 .wp-block-group p {
	text-align: justify;
}

/* ── About page — "Why We Started" stat cards ───────────────
   The 3 cards' parent is a WP vertical flex group, which defaults to
   align-items:flex-start — children shrink-wrap to their own content
   width instead of stretching to the container width. Since each card's
   description text is a different length, the 3 cards render at 3
   different widths on tablet/desktop (confirmed broken at both 768px and
   1280px). Not gated behind a breakpoint: at true mobile widths (~375px)
   each card's text already wraps enough to independently fill the full
   container width, so width:100% is a no-op there — verified equal
   (343px) before and after this rule. Text is already left-aligned by
   default; text-align is set explicitly so it stays left-justified once
   cards stretch. */
.page-id-15 .about-stat-card {
	width: 100%;
	box-sizing: border-box;
	text-align: left;
}

/* The number ("50+" / "30d" / "100%") has no fixed width, so each card's
   label/description column started at a different x offset once the cards
   were made equal width above — the numbers render at different widths in
   JetBrains Mono, pushing the text next to them out of alignment across the
   3 stacked cards. Fixed width forces all 3 number columns (and therefore
   the text starting after them) to line up vertically. */
.page-id-15 .about-stat-card > p:first-child {
	width: 5.5rem;
	flex-shrink: 0;
	white-space: nowrap;
}


/* ISW-42: Rank Math breadcrumb navigation, styled to match the dark theme.
   Rank Math wraps output as <nav class="rank-math-breadcrumb"><p>...</p></nav>
   with unstyled black text/links by default. */

/* The breadcrumb is suppressed via a PHP filter on the homepage (a bare
   "Home" crumb has no navigational value there), but that filter only
   empties the shortcode's own output — the surrounding .breadcrumb-bar
   wrapper block still renders its padding, leaving a visible empty gap
   above the hero. Collapse the wrapper entirely on the front page instead. */
.home .breadcrumb-bar {
	display: none;
}

.rank-math-breadcrumb {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0;
}
.rank-math-breadcrumb p {
	margin: 0;
	font-size: 0.8125rem;
	color: #64748B;
}
.rank-math-breadcrumb a {
	color: #94A3B8;
	text-decoration: none;
}
.rank-math-breadcrumb a:hover {
	color: #2563EB;
	text-decoration: underline;
}
.rank-math-breadcrumb .separator {
	margin: 0 0.5rem;
	color: #334155;
}

/* --- FAQ Page (ISW-45) ---------------------------- */
/* Native <details>/<summary> accordion — no JS needed, accessible by
   default. Colors reuse existing tokens: #182338/#1E2D4A match the
   hero-stats card, #94A3B8/#2563EB match body/accent colors used
   throughout the rest of the theme. */
.faq-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}
.faq-item {
	background: #182338;
	border: 1px solid #1E2D4A;
	border-radius: 12px;
	overflow: hidden;
	/* WP core's "constrained" layout CSS applies content-width centering
	   (auto margins + a max-width) to the first direct child of the
	   .faq-list container specifically — the <details> items all come from
	   one raw wp:html block, so only the first one incidentally matches
	   that :first-child selector, leaving it narrower and off-center
	   relative to the rest. Force consistent full-width, no-margin sizing
	   on every item regardless of position. */
	width: 100% !important;
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}
.faq-item summary {
	list-style: none;
	cursor: pointer;
	padding: 1.25rem 1.5rem;
	color: #FFFFFF;
	font-weight: 600;
	font-size: 1rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	transition: color 0.2s ease;
}
.faq-item summary::-webkit-details-marker {
	display: none;
}
.faq-item summary::after {
	content: '+';
	color: #2563EB;
	font-size: 1.5rem;
	font-weight: 400;
	line-height: 1;
	flex-shrink: 0;
	margin-left: 1rem;
	transition: transform 0.25s ease;
}
.faq-item[open] summary::after {
	transform: rotate(45deg);
}
.faq-item summary:hover {
	color: #94A3B8;
}
.faq-item .faq-answer {
	padding: 0 1.5rem 1.25rem;
	color: #94A3B8;
	font-size: 0.9375rem;
	line-height: 1.7;
}
.faq-item .faq-answer p {
	margin: 0;
}

/* --- Blog card grids: stack on mobile ------------------------- */
@media (max-width: 768px) {
	.blog-post-grid,
	.blog-category-grid {
		grid-template-columns: 1fr !important;
	}
}
