/*
 * Always full-bleed, regardless of any core alignment class — consistent
 * with how the Hero and Cards Section blocks behave. Horizontal/vertical
 * padding is this block's own (spacing/24), not a shared site-wide gutter.
 * Defaults to white; editable via the block's own "Background color" panel
 * (supports.color.background in block.json) — picking any theme.json
 * palette color there overrides this via WordPress's own inline style,
 * which always wins over this external stylesheet rule.
 *
 * Heading color (#002547) is the design's ink/navy "text-primary" — not yet
 * part of theme.json's palette (see square-card/style.css). Hardcoded here
 * for this first version.
 */
.wp-block-andrei-saguna-square-cards-section {
	box-sizing: border-box;
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding: var(--wp--preset--spacing--24) var(--wp--preset--spacing--4);
	background-color: var(--wp--preset--color--base-white);
}

.wp-block-andrei-saguna-square-cards-section__heading-row {
	max-width: var(--wp--style--global--content-size);
	margin-inline: auto;
	margin-bottom: var(--wp--preset--spacing--16);
}

.wp-block-andrei-saguna-square-cards-section__row {
	width: 100%;
	max-width: var(--wp--style--global--content-size);
	margin-inline: auto;
}

h2.wp-block-andrei-saguna-square-cards-section__heading {
	margin: 0;
	/* Aligns the heading above the cards column: sidebar width (200px) + row gap (spacing/6). */
	padding-left: calc(200px + var(--wp--preset--spacing--6));
	font-family: var(--wp--preset--font-family--ivypresto-headline);
	font-size: var(--wp--preset--font-size--h-1);
	line-height: 1.1;
	color: #002547;
}

.wp-block-andrei-saguna-square-cards-section__row {
	display: flex;
	align-items: flex-start;
	gap: var(--wp--preset--spacing--6);
}

.wp-block-andrei-saguna-square-cards-section__sidebar {
	flex: 0 0 200px;
	max-width: 200px;
	align-self: stretch;
}

.wp-block-andrei-saguna-square-cards-section__sidebar-heading,
.wp-block-andrei-saguna-square-cards-section__sidebar-text,
.wp-block-andrei-saguna-square-cards-section__link {
	margin: 0;
}

/*
 * Single sticky unit: the heading/text/link stick together as one block
 * while scrolling past the cards column, instead of each child being
 * sticky on its own (which pins them all to top:0 independently and
 * stacks them over each other once scrolled).
 */
.wp-block-andrei-saguna-square-cards-section__sidebar-inner {
	position: sticky;
	top: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--wp--preset--spacing--4);
}

.wp-block-andrei-saguna-square-cards-section__sidebar-heading {
	font-family: var(--wp--preset--font-family--ivypresto-headline);
	font-size: var(--wp--preset--font-size--h-4);
	line-height: 1.2;
	letter-spacing: 0.64px;
	color: #002547;
}

.wp-block-andrei-saguna-square-cards-section__sidebar-text {
	font-family: var(--wp--preset--font-family--neue-haas-grotesk);
	font-size: var(--wp--preset--font-size--body-small);
	line-height: 1.4;
	color: var(--wp--preset--color--neutral-700);
}

.wp-block-andrei-saguna-square-cards-section__link {
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	gap: var(--wp--preset--spacing--2);
	font-family: var(--wp--preset--font-family--neue-haas-grotesk);
	font-size: var(--wp--preset--font-size--ui-interactive);
	font-weight: 500;
	line-height: 1;
	color: var(--wp--preset--color--accent-500);
	text-decoration: none;
}

.wp-block-andrei-saguna-square-cards-section__link-text {
	text-decoration: underline;
	text-underline-offset: 0.1em;
}

.wp-block-andrei-saguna-square-cards-section__link-icon {
	display: flex;
	width: 16px;
	height: 16px;
}

.wp-block-andrei-saguna-square-cards-section__link-icon svg {
	width: 100%;
	height: 100%;
}

a.wp-block-andrei-saguna-square-cards-section__link:hover {
	color: var(--wp--preset--color--accent-600);
}

.wp-block-andrei-saguna-square-cards-section__grid {
	flex: 1 1 auto;
	min-width: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--6);
}

@media (max-width: 767px) {
	h2.wp-block-andrei-saguna-square-cards-section__heading {
		padding-left: 0;
	}

	.wp-block-andrei-saguna-square-cards-section__heading-row {
		margin-bottom: var(--wp--preset--spacing--8);
	}

	.wp-block-andrei-saguna-square-cards-section__row {
		flex-direction: column;
		gap: var(--wp--preset--spacing--8);
	}

	.wp-block-andrei-saguna-square-cards-section__sidebar {
		flex: 1 1 100%;
		max-width: 100%;
	}

	.wp-block-andrei-saguna-square-cards-section__sidebar-inner {
		position: static;
	}
}

@media (max-width: 480px) {
	.wp-block-andrei-saguna-square-cards-section__grid {
		grid-template-columns: 1fr;
	}
}
