:where(.is-layout-flow, .is-layout-constrained) > h2.wp-block-heading:not(.is-style-footer *) + * {
	margin-top: var(--wp--preset--spacing--heading);
}

a, .wp-element-button, .wp-block-button__link {
	transition: all 200ms;
}

a:where(:not(.wp-element-button, .wp-block-button__link, .footer-map > a)):hover {
	filter: brightness(.85);
}

a:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

:is(.wp-element-button, .wp-block-button__link, .footer-map > a):hover {
	scale: 1.05;
}

:where(
	.has-canvas-background-color,
	.has-navy-background-color,
	.is-style-section-water,
	.is-style-section-water-wave,
	.is-style-section-dark,
	.is-style-section-dark-wave,
	.is-style-footer
) {
	--sz-link-color: var(--wp--preset--color--gold);
}

:where(
	.has-gold-background-color,
	.has-paper-background-color,
	.has-white-background-color,
	.is-style-section-paper,
	.is-style-section-paper-wave,
	.is-style-faq-section
) {
	--sz-link-color: var(--wp--preset--color--azure);
}

.site-brand {
	&.wp-block-group { gap: var(--wp--custom--logo--gap); }

	img {
		display: block;
		width: var(--wp--custom--logo--size);
		height: var(--wp--custom--logo--size);
		flex-shrink: 0;
	}

	.wp-block-site-title { white-space: nowrap; }
}

:where(
	.has-navy-background-color,
	.is-style-footer,
	.is-style-section-dark,
	.is-style-section-dark-wave
) {
	--sz-outline-color: var(--wp--preset--color--white);
	--sz-outline-hover: var(--wp--preset--color--azure);
}

.wp-block-group {
	&:is(
		.is-style-section-paper,
		.is-style-section-water,
		.is-style-section-dark,
		.is-style-section-paper-wave,
		.is-style-section-water-wave,
		.is-style-section-dark-wave
	) {
		padding-top: var(--wp--preset--spacing--section);
		padding-bottom: var(--wp--preset--spacing--section);
		padding-left: var(--wp--preset--spacing--gutter);
		padding-right: var(--wp--preset--spacing--gutter);
		border-radius: 0;
	}

	&:is(
		.is-style-section-paper-wave,
		.is-style-section-water-wave,
		.is-style-section-dark-wave,
		.is-style-footer
	) {
		position: relative;
		margin-top: var(--wp--custom--wave--height);

		&::before, &:not(.is-style-footer)::after {
			content: '';
			position: absolute;
			inset: auto 0 100%;
			height: var(--wp--custom--wave--height);
			background: inherit;
			pointer-events: none;
			rotate: 180deg;
			mask: url('../images/wave.svg') center / 100% 100% no-repeat;
		}

		&:not(.is-style-footer) {
			margin-bottom: var(--wp--custom--wave--height);

			&::after {
				inset: 100% 0 auto;
				rotate: none;
			}
		}
	}
}

:is(.is-layout-flex, .is-layout-grid):has(> .is-style-card) {
	align-items: stretch;
}

.wp-block-columns:has(> .wp-block-column > .is-style-card) {
	align-items: stretch !important;

	> .wp-block-column:has(> .is-style-card) {
		display: flex;
		flex-direction: column;
		align-self: stretch;

		> .is-style-card { flex-grow: 1; }
	}
}

@media (max-width: 1160px) {
	.wp-block-columns:has(> .wp-block-column > .is-style-card) {
		flex-wrap: wrap !important;

		> .wp-block-column { flex-basis: 100% !important; }
	}

	.is-layout-flex:has(> .is-style-card) {
		flex-direction: column;

		> .is-style-card { width: 100%; }
	}

	.is-layout-grid:has(> .is-style-card) { grid-template-columns: minmax(0, 1fr); }
}

:root, .editor-styles-wrapper {
	@media (max-width: 1100px) { --wp--custom--spacing--section: 52px; }
	@media (max-width: 700px) { --wp--custom--spacing--section: 44px; }
}
