/**
 * Development Offerings block — see init.php's/block.php's top comments
 * for the Figma source (node 2001:7007 @1920) and why cards are a
 * manual repeater rather than auto-built from the Service CPT.
 *
 * Masonry simplification: Figma manually assigns each card to one of 3
 * fixed columns so column heights end up visually balanced (e.g.
 * "Mobile Development" + "Custom CRM Development" together in column 1
 * are about as tall as 4 shorter cards stacked in column 2). Doing that
 * from this block's own repeater would mean hand-tuning a per-card
 * column assignment every time a card is added, renamed, or reordered —
 * fragile and easy to forget. Instead this uses a plain CSS
 * multi-column layout (`column-count`), which self-balances height
 * automatically from the repeater's own order, at the cost of not
 * matching Figma's exact card-to-column assignment pixel-for-pixel.
 * Flagged in the project's plan doc as an open/expected divergence, not
 * an oversight.
 *
 * @package intobi
 */

.development-offerings__container {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 32px;
	padding-top: var(--io-section-py);
	padding-bottom: var(--io-section-py);
}

@media (min-width: 1024px) {
	.development-offerings__container {
		gap: var(--io-section-py);
	}
}

.development-offerings__heading {
	/* font-size now comes from the base h2 cascade (css/base.css) */
	text-align: center;
}

/* ---------------------------------------------------------------
   Grid — CSS multi-column masonry. 1 column below 768px, 2 at
   768–1239px (confirmed still 2-column at the 1024-wide frame — only
   two "Cols" sub-frames there, vs three at 1240), 3 at ≥1240px.
------------------------------------------------------------------ */

.development-offerings__grid {
	width: 100%;
	column-count: 1;
	column-gap: 16px;
}

@media (min-width: 768px) {
	.development-offerings__grid {
		column-count: 2;
	}
}

@media (min-width: 1240px) {
	.development-offerings__grid {
		column-count: 3;
	}
}

.development-offerings__card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 24px;
	width: 100%;
	break-inside: avoid;
	margin-bottom: 16px;
	background: var(--io-bg);
	border: 1px solid var(--io-border);
	border-radius: var(--io-radius-card);
	padding: 32px 24px;
}

@media (min-width: 414px) {
	.development-offerings__card {
		padding: 32px;
	}
}

.development-offerings__title {
	display: flex;
	align-items: center;
	gap: 24px;
	width: 100%;
}

/* Icon badge — Figma's own decorative version is a blurred gradient
   "sphere" behind the glyph; approximated here as a flat tinted
   rounded-square, same simplification approach as every other icon
   spot in this theme (technology_block's plain 48×48 icon, etc.). */
.development-offerings__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 60px;
	height: 48px;
	border-radius: 16px;
	background-image: url('/wp-content/themes/intobi/images/Sphere.svg');
}

.development-offerings__icon .icon,
.development-offerings__icon img {
	width: 24px;
	height: 24px;
	object-fit: contain;
}

.development-offerings__card-title {
	flex: 1 1 0%;
	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
	   running out of the card. */
	overflow-wrap: break-word;
}

/* Phones under 360px: "Development" at 20px beside the 60px icon is
   wider than the card, so the title gets a smaller gap and font. */
@media (max-width: 359px) {
	.development-offerings__title {
		gap: 16px;
	}
	.development-offerings__card-title {
		font-size: 18px;
	}
}

.development-offerings__card-title:hover {
	color: var(--io-primary-dark);
}

.development-offerings__divider {
	width: 100%;
	height: 1px;
	background: var(--io-gradient-highlight);
}

/* Text-only mode — see block.php's top comment / init.php's `text`
   field: renders in place of the divider+list when a card has no Rows
   but does have this set (Tech page "Cols" cards, node 2001:14381). */
.development-offerings__text {
	width: 100%;
	margin: 0;
	font-family: var(--io-font-body);
	font-weight: 400;
	font-size: 16px;
	line-height: 1.5;
	color: var(--io-body);
}

.development-offerings__list {
	list-style: none;
	margin: 0;
	padding: 0;
	width: 100%;
}

.development-offerings__item-link {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 12px 0;
	font-family: var(--io-font-body);
	font-weight: 600;
	font-size: 16px;
	text-transform: capitalize;
	color: var(--io-ink);
}

.development-offerings__item-link:hover {
	color: var(--io-primary-dark);
}

.development-offerings__item-link:hover svg path {
	stroke: var(--io-primary-dark);
}

.development-offerings__item-link .icon {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
}

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

/* ---------------------------------------------------------------
   "Grid" layout — init.php's "layout" field. The single Service
   page's own "Related Services" section (Figma node 2001:9668 @1920):
   same "Card" component as "Masonry" above (icon badge, divider,
   linked-rows list) byte-for-byte, just 2 per row instead of 3, in the
   narrower 1024px content-column (same convention as
   related_services_block/content_list_block/block.css), heading
   left-aligned instead of centered. Plain CSS grid instead of the
   masonry `column-count` above — no self-balancing needed at only 2
   columns — so `.development-offerings__card`'s own `margin-bottom`
   (the masonry column's vertical gap) is reset to let `.development-
   offerings__grid`'s own `gap` handle both directions instead.

   "Grid — wide" (14.09, per Oleksandr: same as "Grid" but 3 columns,
   full page width) reuses every one of the rules above via a combined
   selector — it only diverges on two points, each broken out into its
   own rule below: no 1024px container cap (so it spans the normal
   full-page `.container` width, same as "Masonry"), and a 3rd grid
   column at the same ≥1240px breakpoint "Masonry" switches to 3
   columns at (2 columns at 1024–1239px: three cards did not fit there
   and widened the page).

   Tracks are `minmax(0, 1fr)`, not `1fr`: a plain `1fr` track never
   gets narrower than its longest word, so one long card title widened
   the whole page instead of wrapping.
------------------------------------------------------------------ */

.development-offerings--grid .development-offerings__container,
.development-offerings--grid-wide .development-offerings__container {
	align-items: flex-start;
}

.development-offerings--grid .development-offerings__container {
	max-width: 1024px;
}

.development-offerings--grid .development-offerings__heading,
.development-offerings--grid-wide .development-offerings__heading {
	text-align: left;
}

.development-offerings--grid .development-offerings__grid,
.development-offerings--grid-wide .development-offerings__grid {
	column-count: initial;
	column-gap: initial;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
}

@media (min-width: 1024px) {
	.development-offerings--grid .development-offerings__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px 8px;
	}
	.development-offerings--grid-wide .development-offerings__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1240px) {
	.development-offerings--grid-wide .development-offerings__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.development-offerings--grid .development-offerings__card,
.development-offerings--grid-wide .development-offerings__card {
	margin-bottom: 0;
}



.site-main__toc-content .development-offerings--grid .development-offerings__grid {
	grid-template-columns: minmax(0, 1fr);
	gap: 8px;
}

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

@media (min-width: 1024px) {
	.site-main__toc-content .development-offerings--grid .development-offerings__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (min-width: 1240px) {
	.site-main__toc-content .development-offerings--grid .development-offerings__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
