/**
 * Industries (Custom) block — 30.09, per Oleksandr: a literal copy of
 * industries_block/block.css (own file, own enqueue, so future edits
 * to one don't silently affect the other) — every class name here is
 * identical to that file's own, so its own top comment's Figma source
 * (node 2001:7061 @1920) and spacing/breakpoint reasoning applies here
 * unchanged. Only difference from that block is where items come from
 * (a manual repeater here, the `industry` CPT there) — see this
 * block's own init.php/block.php.
 *
 * @package intobi
 */

.industries__row {
	display: flex;
	flex-direction: column;
	gap: 64px;
	padding-top: var(--io-section-py);
	padding-bottom: var(--io-section-py);
}

@media (min-width: 1024px) {
	.industries__row {
		flex-direction: row;
		align-items: flex-start;
		gap: 64px;
	}
}

/* ---------------------------------------------------------------
   Aside — heading + subtext + CTA. Sticks under the fixed header at
   ≥1024px, same as Technology/FAQ (see css/header.css's
   --io-header-clearance).
------------------------------------------------------------------ */

.industries__aside {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 24px;
	width: 100%;
	max-width: 480px;
}

@media (min-width: 1024px) {
	.industries__aside {
		position: sticky;
		top: var(--io-header-clearance);
		flex: 1 1 0%;
		z-index: 2;
	}
}

/* .industries__heading — font-size now comes from the base h2 cascade (css/base.css) */

.industries__subtext {
	font-size: 16px;
}

/* ---------------------------------------------------------------
   Head — "stacked" layout's own heading+subtext+CTA wrapper (the
   non-aside counterpart of .industries__aside above). Same 24px gap
   and 480px column width Figma uses for this block's heading area at
   every width (confirmed against the Services page's own "stacked"
   section, node 2001:6916) — but no sticky/flex-basis, since this
   sits *above* the grid, not beside it.
------------------------------------------------------------------ */

.industries__head {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 24px;
	width: 100%;
}

/* ---------------------------------------------------------------
   Grid — 1 column below 768px, 2 columns at/above it.
------------------------------------------------------------------ */

.industries__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 64px;
	width: 100%;
}

.industries--wide-columns .industries__grid {
	gap: 32px 64px;
}

.site-main__toc-content .industries__grid {
	gap: 32px;
}

@media (min-width: 768px) {
	.industries__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 64px;
	}
	.site-main__toc-content .industries__grid {
		gap: 64px;
	}
}

@media (min-width: 1024px) {
	.industries__grid {
		flex: 1 1 0%;
	}
}

.industries__item {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	width: 100%;
}

.industries__item-title {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	width: 100%;
}

/* Now a plain <img> (uploaded .svg — see inc/acf-cpt-fields.php),
   sized in CSS so it stays 24×24 regardless of the uploaded file's own
   intrinsic size. */
.industries__icon {
	display: block;
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	object-fit: contain;
}

.industries__item-heading {
	min-width: 0;
	font-family: var(--io-font-heading);
	font-weight: 400;
	font-size: 20px;
	line-height: 1.25;
	color: var(--io-ink);
	/* Last resort: a word that still does not fit breaks instead of
	   widening the page. */
	overflow-wrap: break-word;
}

/* Phones under 360px: "Telecommunications" at 20px is wider than the
   column next to its icon. */
@media (max-width: 359px) {
	.industries__item-heading {
		font-size: 18px;
	}
}

.industries__item-heading:hover {
	color: var(--io-primary-dark);
}

.industries__item-text {
	font-family: var(--io-font-body);
	font-weight: 400;
	font-size: 16px;
	line-height: 1.5;
	color: var(--io-body);
	margin: 0;
}

.industries__read-more {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-family: var(--io-font-body);
	font-weight: 600;
	font-size: 16px;
	color: var(--io-ink);
}

.industries__read-more:hover {
	color: var(--io-primary-dark);
}

.industries__read-more:hover svg path {
	stroke: var(--io-primary-dark);
}

.industries__read-more .icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
}

/* .industries__empty-state — see .io-empty-state (css/base.css) */

/* ---------------------------------------------------------------
   Stacked layout — see init.php's "layout" field top comment. Plain
   full-width heading above the grid, no sticky aside/row split below
   1440px (unlike the default "aside" layout's row-at-≥1024px).

   15.09 correction: the Services hub page's own 2-column instance
   (stacked_columns=2, i.e. *not* `--wide-columns`) still switches to a
   sticky aside-beside-grid row at ≥1440px — confirmed against the
   1440-Services frame's own coordinates (Texts/List share the same y,
   side by side there; List sits below Texts at 1240-Services and
   1024-Services). Scoped off `--wide-columns` below so it doesn't
   touch the Tech page's "For whom" section, which stays a plain
   widening grid at every width, no row split ever.
------------------------------------------------------------------ */

.industries--stacked .industries__row {
	flex-direction: column;
}

.industries--stacked .industries__heading {
	width: 100%;
}

.industries__heading {
	max-width: 380px;
}

@media (min-width: 1024px) {
	.industries--stacked .industries__grid {
		flex: initial;
	}
}

@media (min-width: 1440px) {
	.industries--stacked:not(.industries--wide-columns) .industries__row {
		flex-direction: row;
		align-items: flex-start;
		gap: 64px;
	}

	.industries--stacked:not(.industries--wide-columns) .industries__head {
		position: sticky;
		top: var(--io-header-clearance);
		flex: 1 1 0%;
		max-width: 480px;
		z-index: 2;
	}

	.industries--stacked:not(.industries--wide-columns) .industries__grid {
		flex: 1 1 0%;
	}

	.industries__heading {
		max-width: 450px;
	}
}

.site-main__toc-content .industries--stacked .industries__head {
	position: relative;
}
.site-main__toc-content .industries--stacked .industries__row {
	flex-direction: column;
	gap: 16px;
}
.site-main__toc-content .industries__head,
.site-main__toc-content .industries__heading {
	max-width: 100%;
	position: relative;
}

@media (min-width: 1024px) {
	.industries--wide-columns .industries__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 1440px) {
	.industries--wide-columns .industries__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* ---------------------------------------------------------------
   Preview layout — heading above a 3-column row of the last 3
   Industries, ending in a "Show more" button (Figma node 2001:24498).
   Own rules only, scoped under .industries--preview so the aside/
   stacked layouts above stay untouched.
------------------------------------------------------------------ */

.industries--preview .industries__row {
	flex-direction: column;
}

@media (min-width: 1240px) {
	.industries--preview .industries__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.industries__show-more {
	align-self: flex-start;
}
