/**
 * Page Hero block — see init.php's top comment for the Figma source
 * (node 2001:6918 @1920, Services page) and the single-frame caveat.
 *
 * Media band and heading scale intentionally mirror hero_block/block.css
 * (homepage Hero) — media height 320px → 360px at ≥1440, heading via the
 * shared .io-hero-heading class (css/base.css) — since only the 1920
 * frame was available for this page and the homepage Hero's own tiered
 * scale is the best evidence in the file for how this theme handles the
 * same media band + H1 combo at narrower widths.
 *
 * @package intobi
 */

.page-hero {
	position: relative;
}

.page-hero.alignfull {
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

/* ---------------------------------------------------------------
   Media band — flat 16px inset from the viewport edge, same as
   hero_block.
------------------------------------------------------------------ */

.page-hero__media {
	margin: 16px;
	height: 320px;
	border-radius: var(--io-radius-card);
	overflow: hidden;
	position: relative;
	background: linear-gradient( 135deg, var(--io-primary-light), var(--io-brand) );
}
.post-template-default .page-hero__media::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	background: rgba(255, 255, 255, 0.4);
	backdrop-filter: blur(8px);
	height: 100%;
	width: 100%;
	z-index: 1;
}

/* Bumped at 1440px (not a separate 1920px step) — matches this theme's
   one shared "large desktop" breakpoint instead of a one-off 1920px. */
@media (min-width: 1920px) {
	.page-hero__media {
		height: 360px;
	}
}

.page-hero__media-el {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.page-hero__media-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient( 135deg, var(--io-primary-light) 0%, var(--io-brand) 60%, var(--io-primary) 100% );
}

/* ---------------------------------------------------------------
   Content — one centered column: breadcrumbs, heading/subtext,
   buttons, then a full-width divider.
------------------------------------------------------------------ */

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

.page-hero__content.case-hero__content {
	padding-bottom: 8px;
}

@media (min-width: 768px) {
	.page-hero__content.case-hero__content,
	.post-68 .page-hero__content {
		gap: 128px;
	}
	.post-68 .page-hero__title {
		margin-bottom: 0;
	}
}

@media (min-width: 1024px) {
	.page-hero__content {
		gap: 64px;
	}
}

@media (min-width: 1240px) {
	.post-354 .page-hero__content {
		padding-bottom: 128px;
	}
}

.page-hero__title {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 64px;
	text-align: center;
	margin-bottom: 32px;
}
.post-81 .page-hero__title {
	margin-bottom: 0;
}

@media (min-width: 1024px) {
	.page-hero__title {
		margin-bottom: 64px;
	}
}

@media (max-width: 767px) {
	.page-id-68 .page-hero__title {
		margin-bottom: 0;
	}
}

.archive .page-hero__title,
.blog .page-hero__title,
.single-technology .page-hero__title {
	margin-bottom: 0;
}

.page-hero__breadcrumbs {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center; /* .page-hero__title centers its other children
	                             (heading, buttons) — this needs the same,
	                             which a plain shrink-to-fit row already got
	                             for free but a width:100% row (needed so
	                             block.js can actually measure overflow —
	                             .page-hero__title's own align-items:center
	                             otherwise sizes this to its content, and
	                             scrollWidth can never exceed clientWidth)
	                             does not. .page-hero__breadcrumbs--truncated
	                             below switches this to flex-start once the
	                             row is genuinely full. */
	gap: 8px;
	/* nowrap from the very first paint, not just once block.js adds
	   --collapsed/--truncated — 24.09, per Oleksandr: wrap-then-nowrap
	   was causing a visible jump (the row growing to two lines, then
	   snapping back to one) in the window before the script runs. A
	   too-long trail can briefly spill past the row's right edge in
	   that same window instead — deliberately preferred over the jump;
	   no overflow:hidden here to contain it, since that would clip
	   .page-hero__crumbs-dropdown below (itself a position:absolute
	   child of this row) the same way it did before that was fixed. */
	flex-wrap: nowrap;
	width: 100%;
}

.page-hero__crumb {
	font-family: var(--io-font-body);
	font-weight: 600;
	font-size: 16px;
	text-transform: capitalize;
	text-decoration: none;
	flex-shrink: 0;
}

.page-hero__crumb--link {
	color: var(--io-ink);
}

.page-hero__crumb--link:hover {
	color: var(--io-primary-dark);
}

.page-hero__crumb--current {
	color: var(--io-muted);
}

.page-hero__crumb-sep {
	color: var(--io-muted);
	font-weight: 600;
	flex-shrink: 0;
}

/* ---------------------------------------------------------------
   Collapsible middle crumbs — everything between Home and the
   current page. See intobi_render_breadcrumbs() (inc/template-
   functions.php) for the markup this styles.

   24.09 rework: whether this needs collapsing at all depends on the
   actual rendered length of the current page's own title, not the
   viewport width alone — "Retail" and "Custom Mobile App Development
   for iOS, Android & Cross-Platform" don't need the same breakpoint,
   so a fixed one (was 414px) either collapses short titles that never
   needed it or leaves long ones to wrap mid-row. block.js measures
   the real thing (scrollWidth vs clientWidth) instead, in two steps —
   collapse the middle first, then, only if STILL too wide, truncate
   the current crumb too — and toggles these two classes accordingly.
   Plain classes rather than the `hidden` attribute, since an element
   with its own `display` rule (both of these have one) ignores
   `[hidden]`'s UA-stylesheet `display: none` entirely — author CSS
   always wins over UA CSS regardless of specificity. */

.page-hero__crumbs-middle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.page-hero__crumbs-toggle {
	display: none;
	flex-shrink: 0;
	font-family: var(--io-font-body);
	font-weight: 600;
	font-size: 16px;
	text-transform: capitalize;
	color: var(--io-ink);
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	cursor: pointer;
}

.page-hero__breadcrumbs--collapsed .page-hero__crumbs-middle {
	display: none;
}

.page-hero__breadcrumbs--collapsed .page-hero__crumbs-toggle {
	display: inline-flex;
}

/* Only reached when collapsing the middle crumbs still isn't enough —
   a long current-page title gets its own "…" instead of overflowing
   or wrapping. Only the LAST crumb (direct child, so this skips the
   unrelated .page-hero__crumb--current a middle crumb with no URL can
   render) grows/shrinks and clips; Home/separators/the toggle stay
   flex-shrink:0 above so they're never what gives way. */
.page-hero__breadcrumbs--truncated {
	justify-content: flex-start; /* flex-wrap:nowrap is already the base's
	                                 permanent default now, nothing to add
	                                 here for it */
}

.page-hero__breadcrumbs--truncated > .page-hero__crumb--current {
	flex: 1 1 0%;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.page-hero__crumbs-toggle:hover {
	color: var(--io-primary-dark);
}

.page-hero__crumbs-dropdown {
	position: absolute;
	top: calc(100% + 4px);
	left: 40px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 128px;
	max-width: calc(100vw - 32px);
	background: var(--io-bg);
	border: 1px solid var(--io-border);
	border-radius: var(--io-radius-card);
	box-shadow: 0 4px 8px rgba(20, 27, 39, 0.04), 0 16px 32px -12px rgba(20, 27, 39, 0.16);
	padding: 3px;
	z-index: 10;
}

/* Same UA-vs-author `display` precedence issue as .page-hero__crumbs-
   middle/-toggle above — this one still genuinely needs the `hidden`
   attribute (block.js toggles it open/closed), so it needs the
   matching override instead of avoiding `display` altogether. */
.page-hero__crumbs-dropdown[hidden] {
	display: none;
}

.page-hero__crumbs-dropdown-link {
	display: block;
	font-family: var(--io-font-body);
	font-weight: 600;
	font-size: 16px;
	text-transform: capitalize;
	text-decoration: none;
	color: var(--io-ink);
	padding: 8px 12px;
	border-radius: var(--io-radius-btn);
}

.page-hero__crumbs-dropdown-link:hover {
	background: var(--io-surface);
	color: var(--io-primary-dark);
}

.page-hero__crumbs-dropdown-link--current {
	color: var(--io-muted);
	cursor: default;
}

.page-hero__texts {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
	width: 100%;
}

/* .page-hero__heading — the 3-tier scale (32/56/72 at 0/768/1440) now
   comes from the shared .io-hero-heading class (css/base.css) added
   alongside it in block.php, same as hero_block's .hero__heading. No
   max-width here — unlike hero_block's two-column heading, Figma
   doesn't constrain this centered, one-column heading's width. */

.page-hero__subtext {
	max-width: 560px;
	font-size: 16px;
}

.page-hero__buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 16px;
}

.page-hero__divider {
	width: 100%;
	height: 1px;
	background: var(--io-border-dark);
}

/* ---------------------------------------------------------------
   Ratings row — optional (see init.php/block.php). Figma "Reviews"
   page hero, node 2001:19967 @1920: 3 platform blocks, each a small
   logo beside a score+stars line, with the platform name below. Sits
   below .page-hero__divider (a direct .page-hero__content sibling, not
   nested in .page-hero__title) per Oleksandr — .page-hero__content's
   own flex column + gap positions it with no extra margin needed here.
------------------------------------------------------------------ */

.page-hero__ratings {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: center;
	gap: 32px 64px;
	margin-top: 32px;
}

.page-hero__rating {
	display: flex;
	align-items: center;
	gap: 12px;
}

/* Whole rating as a link (block.php, optional `link` field). */
a.page-hero__rating {
	color: inherit;
	text-decoration: none;
	transition: opacity 0.15s ease;
}

a.page-hero__rating:hover,
a.page-hero__rating:focus-visible {
	opacity: 0.75;
}

.page-hero__rating-logo {
	width: 45px;
	height: 45px;
	object-fit: contain;
	display: block;
}

.page-hero__rating-body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
}

.page-hero__rating-score {
	display: flex;
	align-items: center;
	gap: 8px;
}

.page-hero__rating-number {
	font-family: var(--io-font-heading);
	font-weight: 400;
	font-size: 24px;
	color: var(--io-brand);
	line-height: 30px;
}

.page-hero__rating-score .io-stars .icon {
	width: 24px;
   height: 24px;
}

.page-hero__rating-platform {
	font-family: var(--io-font-body);
	font-size: 20px;
	color: var(--io-body);
}

@media (min-width: 768px) {
	.page-hero__ratings {
		flex-wrap: nowrap;
		flex-direction: row;
		justify-content: space-around;
		gap: 32px;
	}
	.page-hero__rating-number {
		font-size: 16px;
		line-height: 1.5;
	}
	.page-hero__rating-score .io-stars .icon {
		width: 16px;
		height: 16px;
	}
}

@media (min-width: 1024px) {
	.page-hero__ratings {
		justify-content: center;
	}
	.page-hero__rating-logo {
		width: 63px;
		height: 63px;
	}
	.page-hero__rating-number {
		font-size: 24px;
	}
	.page-hero__rating-platform {
		font-weight: 500;
	}
	.page-hero__rating-score .io-stars .icon {
		width: 24px;
		height: 24px;
	}

}

@media (min-width: 1024px) {
	.page-hero__ratings {
		justify-content: center;
		gap: 64px;
	}
	.post-325 .page-hero__ratings {
		margin-top: 64px;
	}
}

/* .io-stars — see css/base.css */

/* ---------------------------------------------------------------
   Benefits grid + Stats row — optional, Careers page hero only (see
   init.php/block.php top comments). Benefits: an icon/title/text item
   grid inside one bordered card — same "single card, dividers between
   adjacent cells" shape as about_values_block's own item grid, just
   arranged 2 columns x N rows (dividers on both axes) instead of one
   row (a divider on one axis only) — Figma's own 2x2 card (node
   2001:22463) confirmed via get_design_context. Stats: a plain 3-up row
   of highlighted numbers, same visual language as partners_block's own
   stat callouts (var(--io-highlight) / var(--io-additional) below are
   the exact same tokens partners_block/block.css uses for its own
   stat value/label, already documented in css/base.css as "Partners
   stat numbers").
------------------------------------------------------------------ */

.page-hero__benefits-wrap {
	display: flex;
	flex-direction: column;
	gap: 64px;
	width: 100%;
}

.page-hero__benefits {
	display: grid;
	grid-template-columns: 1fr;
	width: 100%;
	background: var(--io-bg);
	border: 1px solid var(--io-border);
	border-radius: var(--io-radius-card);
	padding: 16px;
}

@media (min-width: 768px) {
	.page-hero__benefits {
		grid-template-columns: repeat(2, 1fr);
		padding: 32px;
	}

	/* Vertical divider between the two columns. */
	.page-hero__benefit:not(:nth-child(2n)) {
		border-right: 1px solid var(--io-border);
	}

	/* Horizontal divider between rows (skip the last row). */
	.page-hero__benefit:not(:nth-last-child(-n+2)) {
		border-bottom: 1px solid var(--io-border);
	}
}

@media (min-width: 1920px) {
	.page-hero__benefits {
		grid-template-columns: repeat(4, 1fr);
	}
	.page-hero__benefit:not(:nth-last-child(-n+2)) {
		border-bottom: 0;
	}
	.page-hero__benefit:not(:last-child) {
		border-right: 1px solid var(--io-border);
	}
}

.page-hero__benefit {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	padding: 32px 16px;
	text-align: left;
	border-bottom: 1px solid var(--io-border);
}

.page-hero__benefit:last-child {
	border-bottom: none;
}

@media (min-width: 768px) {
	.page-hero__benefit {
		border-bottom: none;
		padding: 32px;
	}
}

.page-hero__benefit-icon {
	display: inline-flex;
	flex-shrink: 0;
	width: 48px;
	height: 48px;
}

.page-hero__benefit-icon img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.page-hero__benefit-title {
	font-family: var(--io-font-heading);
	font-weight: 400;
	font-size: 24px;
	line-height: 1.25;
	color: var(--io-ink);
	margin: 0;
}

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

.page-hero__stats {
	display: grid;
	grid-template-columns: 1fr;
	gap: 64px;
	width: 100%;
	text-align: center;
}

.post-354 .page-hero__stats {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-around;
	gap: 32px;
	width: 100%;
	text-align: center;
}
.post-354 .page-hero__stat {
	flex-direction: column-reverse;
	gap: 16px;
}
.post-354 .page-hero__stat:nth-child(2) {
	order: -1;
	flex: 1 1 100%;
}
.post-354 .page-hero__stat-value {
	font-size: 48px;
	letter-spacing: 0;
}
.post-354 .page-hero__stat-label {
	color: #575C65;
}

@media (min-width: 768px) {
	.page-hero__stats {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (min-width: 1024px) {
	.post-354 .page-hero__stats {
		flex-wrap: nowrap;
		flex-direction: row;
	}
	.post-354 .page-hero__stat:nth-child(2) {
		order: unset;
		flex: 0 0 auto;
	}
}

@media (min-width: 1440px) {
	.post-354 .page-hero__stat-value {
		font-size: 72px;
	}
}

/* Portfolio's own Stats row (block.php: rendered standalone, below
   .page-hero__divider, when there's no Benefits grid) has 4 items, not
   3 — Figma (node 2001:20074 "Left") shows them 2-up at narrow widths,
   4-up with a wider 64px gap (vs. the 3-up row's 32px) from ≥768px.
   Keyed off the actual item count block.php writes into `data-count`
   rather than "is this the Portfolio page", so it stays correct however
   many pages end up using a standalone 4-stat row. */
.page-hero__stats[data-count="4"] {
	grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 768px) {
	.page-hero__stats[data-count="4"] {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (min-width: 1440px) {
	.page-hero__stats[data-count="4"] {
		grid-template-columns: repeat(4, 1fr);
	}
}

.page-hero__stats[data-count="3"] {
	grid-template-columns: repeat(2, 1fr);
}

.post-68 .page-hero__stats[data-count="3"] {
	grid-template-columns: repeat(1, 1fr);
}

.page-hero__stats[data-count="3"] .page-hero__stat:first-child {
	grid-column: 1 / -1;
}

@media (min-width: 768px) {
	.post-68 .page-hero__stats[data-count="3"] {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.page-hero__stats[data-count="3"] {
		grid-template-columns: repeat(3, 1fr);
	}

	.post-68 .page-hero__stats[data-count="3"] {
		grid-template-columns: repeat(3, 1fr);
	}

	.page-hero__stats[data-count="3"] .page-hero__stat:first-child {
		grid-column: auto;
	}
}

.page-hero__stat {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.page-hero__stat-value {
	font-family: var(--io-font-heading);
	font-size: 96px;
	line-height: 90%;
	letter-spacing: -9.6px;
	color: var(--io-highlight);
	margin: 0;
}

.page-hero__stat-label {
	font-family: var(--io-font-body);
	font-weight: 500;
	font-size: 20px;
	line-height: 1.5;
	color: var(--io-body);
	margin: 0;
}

@media (max-width: 767px) {
	.page-hero__ratings .io-stars .icon:not(:last-child) {
		display: none;
	}
	.page-hero__rating-number {
		font-size: 20px;
		line-height: 25px;
	}
	.page-hero__rating-platform {
		font-size: 14px;
		font-weight: 500;
	}
}