/**
 * NovaBP Bookkeeping — Certifications & Partnerships
 *
 * Section 2 of the Bookkeeping page: a centred header capped at 800px above a
 * centred row of hug-width cards, each a 60px accreditation mark beside a bold
 * label.
 *
 * Depends on `novabp-tax-base` for the tokens and the eyebrow / heading / lede
 * primitives — the Bookkeeping sections are drawn from the same design system as
 * the Tax Advisor and Superannuation ones, so they reuse those classes rather
 * than restating the values.
 *
 * Figma reference: node 2165:6876 (card 2165:6886)
 */

.nova-book-certifications__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--nova-book-certifications-gap, 40px);
}

.nova-book-certifications__header {
	--nova-tax-header-max: 800px;
}

/*
 * The lede here is Text/Text Body rather than the 80% navy the shared primitive
 * defaults to.
 */
.nova-book-certifications .nova-tax-lede {
	color: var(--nova-book-certifications-lede, var(--nova-tax-body));
}

/*
 * Figma hugs the row around the cards. Wrapping and centring keeps the pair
 * centred and lets a third card drop to a second row rather than squeezing the
 * set below the width its label was drawn at.
 *
 * `stretch` rather than Figma's `center`: the two cards are the same height at
 * the drawn widths, and the alignments only diverge once a label wraps — where
 * equal-height cards read as a set and centred ones read as broken.
 */
.nova-book-certifications__row {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	justify-content: center;
	gap: var(--nova-book-certifications-card-gap, 24px);
	width: 100%;
}

/*
 * The card is a row — mark on the left, label on the right — and hugs its
 * content rather than sitting on a fixed width, so a longer accreditation name
 * widens its own card instead of wrapping inside a shared one.
 */
.nova-book-certifications__card {
	display: flex;
	flex: 0 0 auto;
	flex-direction: row;
	align-items: center;
	gap: 20px;
	max-width: 100%;
	padding: 20px 24px;
	border: 1px solid var(--nova-book-certifications-card-border, var(--nova-tax-border));
	border-radius: 20px;
	background-color: var(--nova-book-certifications-card-bg, var(--nova-tax-surface));
}

/*
 * Both marks sit on a 60px square in Figma, one vector and one bitmap. A fixed
 * square box with `contain` keeps a differently-proportioned logo — the TPA mark
 * is 101x100 — inside the same footprint instead of stretching it. `flex-shrink`
 * is pinned so a wrapping label never squashes the mark.
 */
.nova-book-certifications__logo {
	display: block;
	flex: 0 0 auto;
	width: var(--nova-book-certifications-logo-size, 60px);
	height: var(--nova-book-certifications-logo-size, 60px);
	object-fit: contain;
}

.nova-book-certifications__label {
	margin: 0;
	font-family: var(--nova-tax-font);
	font-size: var(--nova-book-certifications-label-size, 28px);
	font-weight: 600;
	line-height: 1.5;
	text-align: left;
	color: var(--nova-book-certifications-label, var(--nova-tax-heading));
}

/* ---------------------------------------------------------------------------
 * Responsive — Figma supplies desktop only; these mirror the breakpoints in
 * novabp-tax-base.css so the two tiers stay in step.
 * ------------------------------------------------------------------------ */

@media (max-width: 1024px) {
	.nova-book-certifications__inner {
		--nova-book-certifications-gap: 40px;
	}

	.nova-book-certifications__card {
		--nova-book-certifications-label-size: 24px;
	}
}

@media (max-width: 767px) {
	.nova-book-certifications__inner {
		--nova-book-certifications-gap: 32px;
	}

	.nova-book-certifications__row {
		--nova-book-certifications-card-gap: 16px;
	}

	/*
	 * Both cards at their hug width do not fit side by side on a phone, and a
	 * hugged pair would sit ragged against the section's own gutters — full
	 * width keeps the stack aligned with everything above it.
	 */
	.nova-book-certifications__card {
		--nova-book-certifications-logo-size: 48px;
		--nova-book-certifications-label-size: 20px;

		flex: 1 1 100%;
	}
}
