/* ==========================================================================
   Block styles registered in inc/blocks.php. Loaded on the front end and in the editor,
   so every color has a fallback for the editor where Customizer variables are absent.
   Sizes were measured from the previous Avada build of the home page.
   ========================================================================== */

/* Headings: navy bar and red bar */

.wp-block-heading.is-style-gsbdc-navy-bar,
.wp-block-heading.is-style-gsbdc-red-bar {
	margin: 0 0 20px;
	padding: 8px;
	color: #fff;
	font-size: 22px;
	font-weight: 700;
	line-height: 23px;
}

.wp-block-heading.is-style-gsbdc-navy-bar {
	background: var(--gsbdc-bottom-bg, #002e63);
}

.wp-block-heading.is-style-gsbdc-red-bar {
	padding-inline: 27px;
	background: var(--gsbdc-primary, #d11441);
	font-size: 21px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

/* Heading: black, as used for the success story titles */

.wp-block-heading.is-style-gsbdc-dark {
	color: #000;
}

/* Buttons: red outline, and an equal-width row of them */

.wp-block-button.is-style-gsbdc-outline .wp-block-button__link {
	display: block;
	padding: 9px 12px;
	border: 3px solid var(--gsbdc-primary, #d11441);
	border-radius: 0;
	background: #fff;
	color: #222;
	font-size: 14px;
	font-weight: 500;
	line-height: 16px;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.wp-block-button.is-style-gsbdc-outline .wp-block-button__link:hover,
.wp-block-button.is-style-gsbdc-outline .wp-block-button__link:focus {
	background: var(--gsbdc-primary, #d11441);
	color: #fff;
}

.wp-block-buttons.is-style-gsbdc-equal {
	display: grid;
	grid-auto-columns: minmax(0, 1fr);
	grid-auto-flow: column;
	gap: 4%;
	margin-bottom: 19px;
}

.wp-block-buttons.is-style-gsbdc-equal > .wp-block-button {
	width: auto;
	margin: 0;
}

.wp-block-buttons.is-style-gsbdc-equal .wp-block-button__link {
	padding: 3px 8px;
	font-size: 12px;
	font-weight: 700;
	line-height: 15px;
}

.wp-block-buttons:has(> .wp-block-button__width-100) {
	margin-bottom: 20px;
}

/* Columns: main content and sidebar with Avada's 4% gutter */

.wp-block-columns.is-style-gsbdc-content-sidebar {
	gap: 4%;
	margin-bottom: 0;
}

.wp-block-column.is-style-gsbdc-sidebar-rule {
	padding-left: 16px;
	border-left: 1px solid #e9c3cc;
}

.wp-block-column.is-style-gsbdc-justified p {
	text-align: justify;
}

.wp-block-column.is-style-gsbdc-sidebar-rule h4,
.wp-block-column.is-style-gsbdc-sidebar-rule h5 {
	margin-bottom: 12px;
	color: #333;
	font-size: 14px;
}

.wp-block-column.is-style-gsbdc-sidebar-rule .wp-block-image {
	margin-bottom: 20px;
}

.wp-block-column.is-style-gsbdc-sidebar-rule > :last-child {
	margin-bottom: 0;
}

.wp-block-column.is-style-gsbdc-sidebar-rule a {
	overflow-wrap: anywhere;
}

/* Square photo beside a success story (200 x 200 like the old page) */

.wp-block-image.gsbdc-story-photo img {
	width: 200px;
	height: 200px;
	object-fit: cover;
}

/* Separator */

.wp-block-separator {
	margin: 20px 0;
	border: 0;
	border-top: 1px solid #e7e7e7;
	opacity: 1;
}

/* Logo strip: a row of partner logos between two light rules */

.wp-block-group.is-style-gsbdc-logo-strip {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-evenly;
	gap: 30px;
	margin-top: 25px;
	padding: 32px 0;
	border-top: 1px solid #e7e7e7;
	border-bottom: 1px solid #e7e7e7;
}

.wp-block-group.is-style-gsbdc-logo-strip .wp-block-image {
	margin: 0;
}

.wp-block-group.is-style-gsbdc-logo-strip img {
	width: auto;
	max-width: 200px;
	max-height: 116px;
}

/* Read more link under a section */

.gsbdc-read-more a {
	color: #222;
}

.gsbdc-read-more a:hover,
.gsbdc-read-more a:focus {
	color: var(--gsbdc-primary, #d11441);
}

/* Small screens */

@media (max-width: 781px) {
	.wp-block-buttons.is-style-gsbdc-equal {
		grid-auto-flow: row;
		gap: 10px;
	}

	.wp-block-columns.is-style-gsbdc-content-sidebar {
		gap: 30px;
	}

	.wp-block-column.is-style-gsbdc-sidebar-rule {
		padding-left: 0;
		border-left: 0;
	}
}

/* Logo strip: 2 x 2 grid once the four logos no longer fit on one line. */
@media (max-width: 860px) {
	.wp-block-group.is-style-gsbdc-logo-strip {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 28px 20px;
		justify-items: center;
	}

	.wp-block-group.is-style-gsbdc-logo-strip img {
		max-width: min(100%, 200px);
		max-height: 100px;
	}
}
