/* sectors.css — Our Sectors page template styles
   Loads after: tokens.css → layout.css → animations.css → components.css
   Scope: templates/page-sectors.php only (enqueued conditionally)
   Reuses: .section-overline, .section-title, .section-header from home.css
   ─────────────────────────────────────────────────────────────────────── */

/* ══════════════════════════════════════════════════════════
   1. SECTORS PAGE HERO
   ══════════════════════════════════════════════════════════ */

.sectors-hero {
	position: relative;
	min-height: clamp(300px, 48vh, 480px);
	display: flex;
	align-items: flex-end;
	background-color: var(--pb-navy);
	background-size: cover;
	background-position: center;
	overflow: hidden;
}

.sectors-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		100deg,
		rgba(11, 31, 58, 0.92) 0%,
		rgba(11, 31, 58, 0.65) 55%,
		rgba(11, 31, 58, 0.28) 100%
	);
	z-index: 1;
}

.sectors-hero .container {
	position: relative;
	z-index: 2;
	padding-block-start: var(--pb-space-24);
	padding-block-end: var(--pb-space-16);
	width: 100%;
}

.sectors-hero__content {
	max-width: 620px;
}

.sectors-hero__heading {
	font-family: var(--pb-font-display);
	font-weight: 900;
	font-size: clamp(1.875rem, 4vw, 3.5rem);
	line-height: var(--pb-leading-tight);
	color: var(--pb-white);
	margin: var(--pb-space-3) 0 var(--pb-space-4);
}

.sectors-hero__sub {
	font-family: var(--pb-font-body);
	font-size: var(--pb-text-lg);
	color: rgba(255, 255, 255, 0.78);
	line-height: var(--pb-leading-normal);
	max-width: 52ch;
	margin: 0;
}

/* Hero elements use pb-reveal (IntersectionObserver) — no duplicate keyframe here */

[dir="rtl"] .sectors-hero__overlay {
	background: linear-gradient(
		-100deg,
		rgba(11, 31, 58, 0.92) 0%,
		rgba(11, 31, 58, 0.65) 55%,
		rgba(11, 31, 58, 0.28) 100%
	);
}

/* ══════════════════════════════════════════════════════════
   2. SECTOR BLOCKS
   ══════════════════════════════════════════════════════════ */

.sector-block {
	padding-block: 0;
	background-color: var(--pb-white);
}

.sector-block--alt {
	background-color: var(--pb-gray-50);
}

.sector-block__inner {
	display: grid;
	grid-template-columns: 1fr;
	min-height: clamp(400px, 60vh, 680px);
}

/* Desktop: 50/50 two-column split — image left, content right */
@media (min-width: 1024px) {
	.sector-block__inner {
		grid-template-columns: 1fr 1fr;
	}

	/* Reversed: image moves to the right visually (content first in DOM for a11y) */
	.sector-block--reversed .sector-block__image-col {
		order: 2;
	}
}

/* ── Image column ─────────────────────────────────────── */

.sector-block__image-col {
	position: relative;
	overflow: hidden;
	background-color: var(--pb-navy-2);
	min-height: clamp(260px, 40vw, 480px);
}

@media (min-width: 1024px) {
	.sector-block__image-col {
		min-height: unset;
	}
}

.sector-block__image-wrap {
	position: absolute;
	inset: 0;
}

.sector-block__image-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

@media (prefers-reduced-motion: no-preference) {
	.sector-block__image-wrap img {
		transition: transform 600ms ease-out;
	}

	.sector-block:hover .sector-block__image-wrap img {
		transform: scale(1.03);
	}
}

.sector-block__image-placeholder {
	position: absolute;
	inset: 0;
	background-color: var(--pb-navy-2);
}

/* ── Content column ───────────────────────────────────── */

.sector-block__content-col {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: var(--pb-space-12) var(--pb-space-8);
	overflow: hidden;
}

@media (min-width: 1280px) {
	.sector-block__content-col {
		padding: var(--pb-space-16) var(--pb-space-16);
	}
}

/* Large sector number — decorative watermark */
.sector-block__number {
	position: absolute;
	top: var(--pb-space-6);
	inset-inline-end: var(--pb-space-6);
	font-family: var(--pb-font-display);
	font-weight: 900;
	font-size: clamp(6rem, 12vw, 11rem);
	line-height: 1;
	color: var(--pb-navy);
	opacity: 0.04;
	pointer-events: none;
	user-select: none;
	z-index: 0;
}

.sector-block--alt .sector-block__number {
	color: var(--pb-gray-900);
}

/* Arabic overline sits above the heading */
.sector-block__arabic {
	display: block;
	font-family: var(--pb-font-arabic), var(--pb-font-body);
	font-size: var(--pb-text-sm);
	color: var(--pb-gray-700);
	margin-bottom: var(--pb-space-2);
	font-weight: var(--pb-weight-medium);
	letter-spacing: 0;
	text-transform: none;
}

.sector-block__heading {
	font-family: var(--pb-font-display);
	font-weight: 900;
	font-size: clamp(1.875rem, 3vw, 2.75rem);
	line-height: var(--pb-leading-tight);
	color: var(--pb-gray-900);
	margin: 0 0 var(--pb-space-6);
	position: relative;
	z-index: 1;
}

.sector-block__desc {
	font-family: var(--pb-font-body);
	font-size: var(--pb-text-base);
	color: var(--pb-gray-700);
	line-height: var(--pb-leading-relaxed);
	max-width: 55ch;
	margin: 0 0 var(--pb-space-8);
	position: relative;
	z-index: 1;
}

/* Sub-services list */
.sector-block__sub-services {
	list-style: none;
	margin: 0 0 var(--pb-space-8);
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--pb-space-3);
	position: relative;
	z-index: 1;
}

.sector-block__service-item {
	font-family: var(--pb-font-body);
	font-size: var(--pb-text-sm);
	color: var(--pb-gray-700);
	line-height: var(--pb-leading-snug);
	padding-inline-start: var(--pb-space-6);
	position: relative;
}

.sector-block__service-item::before {
	content: '';
	position: absolute;
	inset-inline-start: 0;
	top: 0.45em;
	width: 14px;
	height: 1.5px;
	background-color: var(--pb-blue);
}

/* CTA link */
.sector-block__cta {
	display: inline-flex;
	align-items: center;
	gap: var(--pb-space-2);
	font-family: var(--pb-font-body);
	font-weight: var(--pb-weight-semibold);
	font-size: var(--pb-text-sm);
	color: var(--pb-blue-dark);
	text-decoration: none;
	min-height: 44px;
	position: relative;
	z-index: 1;
}

@media (prefers-reduced-motion: no-preference) {
	.sector-block__cta {
		transition: gap 150ms ease-out, color 150ms ease-out;
	}
}

.sector-block__cta:hover {
	color: var(--pb-blue);
	gap: var(--pb-space-3);
	text-decoration: underline;
}

.sector-block__cta:focus-visible {
	outline: 2px solid var(--pb-blue-dark);
	outline-offset: 4px;
	border-radius: var(--pb-radius-sm);
}

/* ══════════════════════════════════════════════════════════
   2b. INDUSTRIES GRID (Session 9 IA restructure — "Sectors We
   Serve" now shows 10 industries instead of 3 sector blocks)
   ══════════════════════════════════════════════════════════ */

.industries-section {
	background: var(--pb-white);
	padding: var(--pb-space-16) 0 var(--pb-space-24);
}

.industries-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--pb-space-4);
	list-style: none;
	margin: 0;
	padding: 0;
}

@media (min-width: 640px) {
	.industries-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
	.industries-grid { grid-template-columns: repeat(5, 1fr); }
}

.industry-card {
	display: flex;
	flex-direction: column;
	gap: var(--pb-space-3);
	height: 100%;
	padding: var(--pb-space-6);
	background: var(--pb-white);
	border: 1px solid var(--pb-gray-200);
	border-radius: var(--pb-radius-lg);
}

@media (prefers-reduced-motion: no-preference) {
	.industry-card {
		transition: box-shadow var(--pb-transition-base), transform var(--pb-transition-base), border-color var(--pb-transition-base);
	}
	.industry-card:hover {
		box-shadow: var(--pb-shadow-md);
		transform: translateY(-2px);
		border-color: var(--pb-blue);
	}
}

.industry-card__icon {
	display: flex;
	width: 32px;
	height: 32px;
	color: var(--pb-blue-dark);
}

.industry-card__icon svg { width: 100%; height: 100%; }

.industry-card__name {
	font-family: var(--pb-font-display);
	font-weight: var(--pb-weight-bold);
	font-size: var(--pb-text-base);
	color: var(--pb-gray-900);
	margin: 0;
}

.industry-card__desc {
	font-family: var(--pb-font-body);
	font-size: var(--pb-text-sm);
	color: var(--pb-gray-700);
	line-height: var(--pb-leading-normal);
	margin: 0;
}

/* ══════════════════════════════════════════════════════════
   3. RESPONSIVE
   ══════════════════════════════════════════════════════════ */

@media (max-width: 1023px) {
	/* On mobile/tablet: stack image above content */
	.sector-block__inner {
		grid-template-columns: 1fr;
	}

	/* Reversed order resets below desktop — image always first on mobile (DOM order) */

	.sector-block__content-col {
		padding: var(--pb-space-10) var(--pb-space-6);
	}

	.sector-block__number {
		font-size: clamp(5rem, 18vw, 8rem);
	}
}

@media (max-width: 640px) {
	.sectors-hero__content {
		max-width: 100%;
	}

	.sectors-hero__sub {
		font-size: var(--pb-text-base);
	}

	.sector-block__content-col {
		padding: var(--pb-space-8) var(--pb-space-4);
	}

	.sector-block__desc {
		max-width: 100%;
	}
}
