/**
 * STL Resource Grid — colour themes layered on top of research-grid.css.
 *
 *   --red     (tools page):        dark STL red (#521519, as in the banners)
 *                                  featured cards with white text; grid-card
 *                                  topic label stays orange.
 *   --orange  (free reports page): darker orange (#E69635) featured cards,
 *                                  white text, with the normally-orange text
 *                                  switched to STL navy; grid cards unchanged.
 *   The filter bar stays navy on every theme.
 *   (none)    navy, identical to the Research Grid.
 *
 * !important on the text colours: the shared .stl-block .stl-link-arrow rule
 * in stl-tokens.css is itself !important, and the live site's CSS combiner
 * can reorder equal-specificity rules.
 */
.stl-block--resource-grid--red    { --rsg-accent: #521519;    --rsg-on-accent: #fff;            --rsg-hover: rgba(255,255,255,.75); }
.stl-block--resource-grid--orange { --rsg-accent: #E69635; --rsg-on-accent: var(--stl-navy); --rsg-hover: #fff; }

/* Featured cards */
.stl-block--resource-grid--red .stl-block--research-grid__featured,
.stl-block--resource-grid--orange .stl-block--research-grid__featured {
	background: var(--rsg-accent) !important;
}
.stl-block--resource-grid--red .stl-block--research-grid__featured-eyebrow,
.stl-block--resource-grid--red .stl-block--research-grid__featured .stl-block--research-grid__meta-label,
.stl-block--resource-grid--orange .stl-block--research-grid__featured-eyebrow,
.stl-block--resource-grid--orange .stl-block--research-grid__featured .stl-block--research-grid__meta-label {
	color: var(--rsg-on-accent) !important;
}
.stl-block--resource-grid--red .stl-block--research-grid__featured .stl-block--research-grid__meta-sep,
.stl-block--resource-grid--orange .stl-block--research-grid__featured .stl-block--research-grid__meta-sep {
	color: #fff;
}
.stl-block--resource-grid--red .stl-block--research-grid__featured:hover .stl-link-arrow {
	color: var(--rsg-hover) !important;
	border-bottom-color: var(--rsg-hover) !important;
}
.stl-block--resource-grid--orange .stl-block--research-grid__featured:hover .stl-link-arrow {
	color: var(--stl-navy) !important;
	border-bottom-color: var(--stl-navy) !important;
}

/* Grid cards keep the standard orange topic label on every theme. */

/* Red theme: orange "Latest" eyebrow, topic label and Read more hover on the featured cards */
.stl-block--resource-grid--red .stl-block--research-grid__featured-eyebrow,
.stl-block--resource-grid--red .stl-block--research-grid__featured .stl-block--research-grid__meta-label {
	color: var(--stl-orange) !important;
}
.stl-block--resource-grid--red .stl-block--research-grid__featured:hover .stl-link-arrow {
	color: var(--stl-orange) !important;
	border-bottom-color: var(--stl-orange) !important;
}

/* Webinar blurbs keep the excerpt's own line breaks (e.g. bullet lines). */
.stl-block--resource-grid--webinar .stl-block--research-grid__card-desc,
.stl-block--resource-grid--webinar .stl-block--research-grid__featured-desc {
	white-space: pre-line;
}

/* ------------------------------------------------------------
   WEBINAR BANNERS: never crop the image, never cover its text.
   The webinar banner is a 16:9 graphic that already carries the title,
   speakers and date, so every image box is the same shape (15:8) and each banner is
   fitted to it edge to edge (a few percent of stretch, no cropping, no bars),
   which keeps the badge, title and button level across cards. The
   Upcoming / On demand badge sits under the image instead of on top of it.
   ------------------------------------------------------------ */
.stl-block--resource-grid--webinar .stl-block--research-grid__card-media,
.stl-block--resource-grid--webinar .stl-block--research-grid__featured-media {
	aspect-ratio: 15 / 8 !important;
	height: auto !important;
	min-height: 0 !important;
	flex: 0 0 auto !important;
	background-size: var(--rg-fit, 100% 100%) !important;
	background-repeat: no-repeat !important;
	background-position: center !important;
	background-color: var(--stl-navy);
}
.stl-block--resource-grid--webinar .stl-block--resource-grid__badge--inline {
	position: static !important;
	display: inline-block;
	align-self: flex-start;
	margin: 0 0 var(--stl-space-3);
}

/* Webinar cards no longer repeat the title (the banner carries it), so they are shorter. */
.stl-block--resource-grid--webinar {
	--rg-card-h: 470px;
}
.stl-block--resource-grid--webinar .stl-block--research-grid__card-body,
.stl-block--resource-grid--webinar .stl-block--research-grid__featured-body {
	padding-top: var(--stl-space-4);
}

/* Webinar Grid: on the featured cards the label sits on the dark blue body, so its own dark pill disappeared;
   give it an STL orange pill with navy text. */
.stl-block--resource-grid--webinar .stl-block--research-grid__featured .stl-block--resource-grid__badge--inline {
	background: var(--stl-orange) !important;
	color: var(--stl-navy) !important;
}
