/* ==========================================================================
   AFE Growth — layout fixes for the existing Elementor widgets
   Goal: remove dead space, keep a steady vertical rhythm, stop the hero
   title being hidden under the fixed header, fix unreadable labels.
   Deactivating the AFE Growth plugin removes every rule below.
   ========================================================================== */

:root {
	--afe-navy: #0e2849;
	--afe-navy-2: #16365f;
	--afe-steel: #808285;
	--afe-ink: #0f172a;
	--afe-muted: #475569;
	--afe-line: #e2e8f0;
	--afe-soft: #f8fafc;
	--afe-accent: #2f7de1;
	--afe-header-h: 110px;
	--afe-sec: clamp(48px, 5.5vw, 76px);
	--afe-head-gap: clamp(28px, 3.2vw, 40px);
}
@media (max-width: 1024px) {
	:root { --afe-header-h: 92px; }
}

/* ---------- Hero: size to its content, clear the fixed header ---------- */
html body .ih-hero-wrapper {
	height: auto !important;
	min-height: clamp(560px, 80vh, 760px) !important;
	max-height: none !important;
	padding-top: var(--afe-header-h) !important;
	box-sizing: border-box !important;
}
html body:not(.home) .ih-hero-wrapper {
	min-height: clamp(480px, 64vh, 620px) !important;
}
html body .ih-hero-wrapper .ih-hero-content-container {
	padding-top: 32px !important;
	padding-bottom: 128px !important;
}
html body .ih-hero-wrapper .ih-hero-title {
	margin-bottom: 24px !important;
}
html body .ih-hero-wrapper .ih-hero-desc {
	margin-bottom: 28px !important;
}
@media (max-width: 767px) {
	html body .ih-hero-wrapper,
	html body:not(.home) .ih-hero-wrapper {
		min-height: 0 !important;
		height: auto !important;
		max-height: none !important;
	}
	html body .ih-hero-wrapper .ih-hero-content-container {
		padding-top: 48px !important;
		padding-bottom: 120px !important;
	}
	html body .ih-hero-wrapper .ih-hero-title {
		font-size: clamp(30px, 8.6vw, 38px) !important;
	}
}

/* ---------- Section rhythm ---------- */
html body .ih-intro-wrapper,
html body .ih-portfolio-wrapper,
html body .ih-services-wrapper,
html body .ih-env-wrapper,
html body .ih-methodology-wrapper {
	padding-top: var(--afe-sec) !important;
	padding-bottom: var(--afe-sec) !important;
}
html body .ih-intro-headline { margin-bottom: 28px !important; }
html body .ih-header-row { margin-bottom: var(--afe-head-gap) !important; padding-bottom: 24px !important; }
html body .ih-services-header,
html body .ih-env-header { margin-bottom: var(--afe-head-gap) !important; }
html body .ih-challenges-grid { margin-bottom: var(--afe-head-gap) !important; }
html body .ih-sectors-section { padding-top: 32px !important; }
html body .ih-sectors-title { margin-bottom: 28px !important; }
html body .ih-methodology-header { margin-bottom: 32px !important; }
html body .ih-partners-wrapper { padding-top: 40px !important; padding-bottom: 40px !important; }
html body .ih-partners-header { margin-bottom: 24px !important; }
html body .ih-partners-container { padding-top: clamp(48px, 5vw, 72px) !important; padding-bottom: clamp(48px, 5vw, 72px) !important; }
html body .ih-partner-header { margin-bottom: 40px !important; }
html body .ih-widget-footer { padding: 32px 0 !important; }

/* Contact band: less air above and below the card */
html body .ih-contact-wrapper { padding-top: clamp(40px, 4.5vw, 64px) !important; padding-bottom: clamp(40px, 4.5vw, 64px) !important; }
html body .ih-contact-card { padding: clamp(32px, 4.5vw, 64px) clamp(20px, 4.5vw, 64px) !important; }
html body .ih-contact-desc { margin-bottom: 32px !important; }

/* ---------- Technology showcase (services + technologies pages) ----------
   Each block was forced to a full screen height (100vh) whatever its content,
   which produced the large empty bands between blocks. */
html body .ih-tech-section {
	min-height: 0 !important;
	padding-top: clamp(44px, 5vw, 72px) !important;
	padding-bottom: clamp(44px, 5vw, 72px) !important;
	scroll-margin-top: calc(var(--afe-header-h) + 56px) !important;
}
html body .ih-tech-section + .ih-tech-section { border-top: 1px solid rgba(14, 40, 73, 0.06); }
html body .ih-grid-header { margin-bottom: 32px !important; }
html body .ih-banner-wrapper { padding: clamp(28px, 4vw, 56px) !important; }

/* Services page: "Our Technologies" heading sat flush against the screen edge */
html body .elementor-element-8767d55 {
	width: 100% !important;
	max-width: 1200px !important;
	margin: 0 auto !important;
	padding: clamp(40px, 5vw, 64px) 20px 0 !important;
	box-sizing: border-box !important;
}
html body .elementor-element-8767d55 .elementor-heading-title { font-size: clamp(30px, 3.4vw, 40px) !important; }

/* Labels that were white on a near-white background */
html body .ih-tech-section .ih-sub-point-label { color: var(--afe-navy) !important; }

/* ---------- Home: equipment portfolio as compact linked cards ---------- */
html body .ih-portfolio-item { padding: 28px 24px !important; }
html body .ih-item-icon { margin-bottom: 16px !important; }
a.afe-portfolio-link { display: block; height: 100%; color: inherit !important; text-decoration: none !important; }
a.afe-portfolio-link:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.afe-portfolio-media {
	position: relative;
	margin: -28px -24px 20px;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--afe-navy-2);
}
.afe-portfolio-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	filter: saturate(0.9);
	transition: transform 0.5s ease;
}
a.afe-portfolio-link:hover .afe-portfolio-media img { transform: scale(1.04); }
.afe-portfolio-more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 16px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #cbd5e1;
}
a.afe-portfolio-link:hover .afe-portfolio-more { color: #fff; }
.afe-portfolio-more svg { transition: transform 0.25s ease; }
a.afe-portfolio-link:hover .afe-portfolio-more svg { transform: translateX(4px); }
@media (max-width: 767px) {
	html body .ih-portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
	html body .ih-portfolio-item { padding: 18px 14px !important; }
	.afe-portfolio-media { margin: -18px -14px 14px; }
	html body .ih-portfolio-item .ih-item-title { font-size: 15px !important; }
	html body .ih-portfolio-item .ih-item-desc { font-size: 10.5px !important; }
	.afe-portfolio-more { font-size: 10.5px; margin-top: 10px; }
}

/* ---------- Partners and Gallery: the fixed title screens filled a whole screen ----------
   The title screen is fixed behind the content, which starts one "screen" further down; both use the same
   height so no gap appears (the content wrapper starts below the fixed site header). */
body:not(.elementor-editor-active) {
	--afe-veil: max(56vh, 420px);
}
body:not(.elementor-editor-active) .ih-gallery-hero,
body:not(.elementor-editor-active) .hero-header { height: calc(var(--afe-veil) + var(--afe-header-h)) !important; padding-top: var(--afe-header-h) !important; box-sizing: border-box !important; }
body:not(.elementor-editor-active) .ih-scroll-content,
body:not(.elementor-editor-active) .afe-main-wrapper { margin-top: var(--afe-veil) !important; }
body:not(.elementor-editor-active) .ih-scroll-content { margin-top: calc(var(--afe-veil) - 40px) !important; }
body.page-id-790 { background: #0b0b0f !important; }
@media (max-width: 767px) {
	body:not(.elementor-editor-active) { --afe-veil: max(46vh, 340px); }
}

/* ---------- Readability: low-contrast small labels ---------- */
html body .ih-portfolio-subtitle,
html body .ih-env-subtitle,
html body .ih-services-subtitle { color: #a9b4c2 !important; }
html body .ih-services-wrapper .ih-services-subtitle,
html body .ih-env-wrapper .ih-env-subtitle { color: #5b6573 !important; }
html body .ih-portfolio-wrapper .ih-header-right p,
html body .ih-portfolio-wrapper .ih-item-desc { color: #b6c2d1 !important; }

/* ---------- Accessibility: AA contrast for small text (brand steel grey #808285 is kept for large text) ---------- */
html body #ih-header .ih-nav-menu a:not(:hover):not(.active),
html body li.menu-item > a:not(:hover) { color: #5f6164 !important; }
html body .ih-header-subtitle,
html body .ih-card-sub,
html body .ih-sectors-title,
html body .ih-partners-title,
html body .ih-tech-nav-container a.ih-nav-link:not(.active) { color: #5f6164 !important; }
html body .ih-copyright,
html body .ih-powered-by,
html body .ih-powered-by-link,
html body .ih-bottom-link,
html body .ih-sec-subtitle,
html body p.v1MsoNormal { color: #5b6573 !important; }
html body .ih-sub-point-desc { color: #475569 !important; }
html body .afe-nav-link:not(.active) { color: #a1a1a6 !important; }
html body .ih-nav-btn:not(.active) { color: #a3aec0 !important; }
html body .ih-widget-footer { opacity: 1 !important; }
html body .ih-widget-footer p,
html body footer.py-20 p { color: #8e8e93 !important; }
.afe-sector__num { color: #5f6164 !important; }

/* ---------- Mobile rhythm ---------- */
@media (max-width: 767px) {
	:root { --afe-sec: 44px; --afe-head-gap: 24px; }
	html body .ih-intro-wrapper p { margin-bottom: 14px; }
	html body .ih-service-card { padding: 24px 20px !important; }
	html body .ih-challenge-card,
	html body .ih-step-card,
	html body .ih-intro-card { padding: 22px 20px !important; }
	html body .ih-services-grid,
	html body .ih-challenges-grid { gap: 14px !important; }
	html body .ih-tech-section {
		padding-top: 40px !important;
		padding-bottom: 40px !important;
	}
	html body .ih-contact-card { border-radius: 14px !important; }
}

/* Gallery: the grid is built by script after load; reserve space so the footer does not jump. */
body:not(.elementor-editor-active) #client-list { min-height: 120vh; }
