/*
 * FBK public Announcements and News: the listing ([fbk_list]) and the card row ([fbk_scroller]).
 * Same checked palette as portal.css: text #212121, headings #035566, links #8A0471, controls #04718A.
 * Fonts follow the page. `!important` only where the theme was measured to override us (see portal.css).
 */

.fbk-list,
.fbk-scroller {
	font-size: 18px;
	line-height: 1.6;
	color: #212121;
}
.fbk-list [hidden],
.fbk-scroller [hidden],
.fbk-scroller[hidden] {
	display: none !important;
}

/* Listing page. */

.fbk-list {
	display: grid;
	gap: 40px;
	margin: 0 0 40px;
}
.fbk-list .fbk-item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 32px;
	align-items: start;
	padding: 0 0 40px;
	border-bottom: 2px solid #8FA3A8;
	scroll-margin-top: 140px; /* Clears the sticky header when a card link jumps here. */
}
.fbk-list .fbk-item:not(:has(.fbk-item-picture)) {
	grid-template-columns: minmax(0, 1fr);
}
.fbk-list .fbk-item-picture img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 8px;
}
.fbk-list h2.fbk-item-title {
	font-size: 30px;
	line-height: 1.25;
	font-weight: 700;
	color: #035566;
	margin: 0 0 14px;
	text-transform: none !important;
	letter-spacing: normal !important;
}
.fbk-list .fbk-item-body p {
	font-size: 18px;
	color: #212121;
	margin: 0 0 14px;
}
.fbk-list .fbk-item-body a {
	color: #8A0471;
	text-decoration: underline;
}
.fbk-list .fbk-item-body a:hover {
	color: #6A0357;
}
.fbk-list .fbk-item-body a:focus-visible {
	outline: 3px solid #035566;
	outline-offset: 3px;
}
.fbk-list .fbk-list-empty {
	font-size: 18px;
	color: #212121;
	margin: 0;
}
@media (max-width: 900px) {
	.fbk-list .fbk-item {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}
}

/* Card row. */

.fbk-scroller {
	margin: 0 0 32px;
}
.fbk-scroller h2.fbk-scroller-heading {
	font-size: 32px;
	line-height: 1.25;
	font-weight: 700;
	color: #035566;
	margin: 0 0 16px;
	text-transform: none !important;
	letter-spacing: normal !important;
}
.fbk-scroller .fbk-scroller-track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(300px, calc((100% - 48px) / 3));
	gap: 24px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	/* The scroll box clips its edges: 8px of padding clears a card's 3px ring at a 3px offset, and
	   scroll-padding stops a snapped card 8px in, so its left ring is never cut off. */
	padding: 8px 8px 14px;
	scroll-padding-inline: 8px;
}
/* When every card fits, centre them in the row, under the section's centred heading. The script adds
   the class only while nothing overflows: centring an overflowing grid would push its first cards
   out of reach to the left. */
.fbk-scroller.fbk-scroller--fits .fbk-scroller-track,
.fbk-scroller.fbk-scroller--fits .fbk-scroller-controls {
	justify-content: center;
}
.fbk-scroller.fbk-scroller--fits a.fbk-scroller-all {
	margin-left: 0;
}
.fbk-scroller a.fbk-card {
	display: flex;
	flex-direction: column;
	scroll-snap-align: start;
	background: #fff;
	border: 2px solid #8FA3A8;
	border-radius: 10px;
	overflow: hidden;
	color: #212121;
	text-decoration: none !important;
}
.fbk-scroller a.fbk-card:hover {
	border-color: #04718A;
}
.fbk-scroller a.fbk-card:focus-visible {
	outline: 3px solid #035566;
	outline-offset: 3px;
}
.fbk-scroller .fbk-card-picture img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}
.fbk-scroller .fbk-card-title {
	display: block;
	font-size: 22px;
	line-height: 1.3;
	font-weight: 700;
	color: #035566;
	padding: 16px 18px 6px;
}
.fbk-scroller .fbk-card-text {
	display: block;
	font-size: 18px;
	color: #212121;
	padding: 0 18px 12px;
}
.fbk-scroller .fbk-card-more {
	display: block;
	margin-top: auto;
	padding: 0 18px 18px;
	font-size: 18px;
	font-weight: 700;
	color: #8A0471;
	text-decoration: underline;
}
.fbk-scroller a.fbk-card:hover .fbk-card-more {
	color: #6A0357;
}

.fbk-scroller .fbk-scroller-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	margin: 14px 0 0;
}
/* Resting rules name :focus too: the theme paints focused buttons olive (see portal.css). */
.fbk-scroller button.fbk-scroller-prev,
.fbk-scroller button.fbk-scroller-next,
.fbk-scroller button.fbk-scroller-prev:focus,
.fbk-scroller button.fbk-scroller-next:focus {
	font-family: inherit;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	min-height: 44px;
	padding: 10px 20px;
	background: #fff;
	border: 2px solid #04718A;
	border-radius: 6px;
	color: #04718A;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	cursor: pointer;
}
.fbk-scroller button.fbk-scroller-prev:hover,
.fbk-scroller button.fbk-scroller-next:hover {
	background: #04718A;
	color: #fff;
}
/* At the end of the row: a grey outline and the default cursor, never lighter text. aria-disabled,
   not disabled, so a keyboard user's focus stays on the button when the row runs out.
   Same specificity as the :hover rule above, so this block MUST stay after it. */
.fbk-scroller button.fbk-scroller-prev[aria-disabled="true"],
.fbk-scroller button.fbk-scroller-next[aria-disabled="true"] {
	background: #fff;
	border-color: #8FA3A8;
	color: #4A4A4A;
	cursor: default;
}
.fbk-scroller button:focus-visible {
	outline: 3px solid #035566;
	outline-offset: 3px;
}
.fbk-scroller a.fbk-scroller-all {
	margin-left: auto;
	font-size: 18px;
	font-weight: 700;
	color: #8A0471;
	text-decoration: underline !important;
}
.fbk-scroller a.fbk-scroller-all:hover {
	color: #6A0357;
}
.fbk-scroller a.fbk-scroller-all:focus-visible {
	outline: 3px solid #035566;
	outline-offset: 3px;
}
