/**
 * IMS Section Heading
 *
 * Two-tone section intro:
 *  - eyebrow (small, uppercase)
 *  - large heading split into a black "lead" and a gold "accent"
 *  - short description
 *  - right-aligned ghost + solid action buttons
 *
 * Layout:
 *  - >= 900px : copy on the left (max ~58%), actions pinned bottom-right
 *  - <  900px : stacks vertically, actions left-aligned and full-width
 */

.ims-section-heading {
	width: 100%;
	margin-top: 24px;
	color: var( --wp--preset--color--dark, #111111 );
}

.ims-section-heading__inner {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 32px;
}

/* Copy column */
.ims-section-heading__copy {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
	max-width: 720px;
}

.ims-section-heading__eyebrow {
	display: block;
	font-size: 12px;
	font-weight: 300;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var( --wp--preset--color--dark, #111111 );
	line-height: 1.2;
}

.ims-section-heading__title {
	margin: 0;
	font-size: clamp( 32px, 4vw, 48px );
	line-height: 1.1;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: var( --wp--preset--color--dark, #111111 );
}

.ims-section-heading__title-lead {
	color: var( --wp--preset--color--dark, #111111 );
}

.ims-section-heading__title-accent {
	color: var( --wp--preset--color--primary, #FAB000 );
}

.ims-section-heading__desc {
	margin: 0;
	font-size: 15px;
	line-height: 1.55;
	color: var( --wp--preset--color--text-muted, #6B7280 );
	max-width: 56ch;
}

/* Actions column */
.ims-section-heading__actions {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.ims-section-heading__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 18px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
	white-space: nowrap;
}

.ims-section-heading__btn:focus-visible {
	outline: 2px solid var( --wp--preset--color--primary, #FAB000 );
	outline-offset: 2px;
}

.ims-section-heading__btn-icon {
	display: inline-block;
	flex: 0 0 auto;
}

/* Ghost (white / outlined) */
.ims-section-heading__btn--ghost {
	background: #ffffff;
	color: var( --wp--preset--color--dark, #111111 );
	border: 1px solid var( --wp--preset--color--dark, #111111 );
}

.ims-section-heading__btn--ghost:hover,
.ims-section-heading__btn--ghost:focus-visible {
	background: var( --wp--preset--color--dark, #111111 );
	color: #ffffff;
}

/* Solid gold (CTA) */
.ims-section-heading__btn--solid {
	background: var( --wp--preset--color--primary, #FAB000 );
	color: var( --wp--preset--color--dark, #111111 );
	border: 1px solid var( --wp--preset--color--primary, #FAB000 );
}

.ims-section-heading__btn--solid:hover,
.ims-section-heading__btn--solid:focus-visible {
	background: var( --wp--preset--color--gold-dark, #E09E00 );
	border-color: var( --wp--preset--color--gold-dark, #E09E00 );
	color: var( --wp--preset--color--dark, #111111 );
}

/* Disabled (no destination configured) */
.ims-section-heading__btn--disabled,
.ims-section-heading__btn--disabled:hover,
.ims-section-heading__btn--disabled:focus-visible {
	background: #f3f4f6;
	color: #9ca3af;
	border-color: #e5e7eb;
	cursor: not-allowed;
	box-shadow: none;
}

/* Editor preview parity */
.ims-section-heading--editor .ims-section-heading__btn {
	cursor: default;
}

.ims-section-heading--editor .ims-section-heading__title-accent:empty::before,
.ims-section-heading--editor .ims-section-heading__title-lead:empty::before {
	content: '';
}

/* Responsive */
@media ( max-width: 900px ) {
	.ims-section-heading__inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 20px;
	}

	.ims-section-heading__copy {
		max-width: none;
	}

	.ims-section-heading__actions {
		justify-content: flex-start;
		width: 100%;
	}
}

@media ( max-width: 540px ) {
	.ims-section-heading__title {
		font-size: clamp( 28px, 8vw, 36px );
	}

	.ims-section-heading__btn {
		flex: 1 1 auto;
		justify-content: center;
	}
}
