/* =============================================================================
 * SEVA GLOBAL — MULTICULTURAL ROADSHOW
 * Site-top banner (template-parts/roadshow-banner.php) and the homepage
 * section below the hero (template-parts/home/roadshow.php).
 *
 * Hand-authored, NOT Tailwind-compiled: edits here take effect without a
 * build step. Colours come from the design tokens in seva-tokens.css; change
 * the --rs-* values below to re-skin the whole block in one place.
 * Loaded after main.css and before seva-custom.css (see inc/enqueue.php).
 * ============================================================================= */

.sg-rs,
.sg-rs-banner {
	/* Bound to the runtime brand variables printed from Theme Settings →
	   Colours (inc/enqueue.php → seva_inline_brand_css), so re-skinning the
	   site in the admin re-skins this block too. */
	--rs-band:        rgb(var(--sg-nav, 33 48 84));
	--rs-band-deep:   var(--color-navy-deep, #152747);
	--rs-banner-text: #FFFFFF;
	--rs-on-band:     #FFFFFF;
	--rs-on-band-2:   var(--color-brand-light, #C0D4EB);
	--rs-card:        rgb(var(--sg-surface, 255 255 255));
	--rs-ink:         rgb(var(--sg-nav, 33 48 84));
	--rs-text:        rgb(var(--sg-muted, 107 117 133));
	--rs-tile:        rgb(var(--sg-brand-light, 232 241 249));
	--rs-accent:      rgb(var(--sg-brand, 60 96 168));
	--rs-radius:      8px;
	font-family: var(--sg-font-body, inherit);
}

.sg-rs__heading,
.sg-rs-card__city {
	font-family: var(--sg-font-heading, inherit);
}

/* -----------------------------------------------------------------------------
 * 1. Site-top banner
 * -------------------------------------------------------------------------- */
.sg-rs-banner {
	background: var(--rs-band-deep);
	color: var(--rs-banner-text);
}

.sg-rs-banner__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	column-gap: 1rem;
	row-gap: 0.25rem;
	padding-top: 0.625rem;
	padding-bottom: 0.625rem;
	text-align: center;
}

.sg-rs-banner__text {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.45;
}

.sg-rs-banner__link {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.45;
	color: var(--rs-on-band-2);
	text-decoration: underline;
	text-underline-offset: 3px;
	white-space: nowrap;
}

.sg-rs-banner__link:hover {
	color: var(--rs-banner-text);
}

.sg-rs-banner__link:focus-visible {
	outline: 2px solid var(--rs-on-band);
	outline-offset: 3px;
	border-radius: 2px;
}

.sg-rs-banner__icon {
	flex-shrink: 0;
	transition: transform 200ms ease;
}

.sg-rs-banner__link:hover .sg-rs-banner__icon {
	transform: translateY(2px);
}

/* -----------------------------------------------------------------------------
 * 2. Section band
 * -------------------------------------------------------------------------- */
.sg-rs {
	background: var(--rs-band);
	color: var(--rs-on-band);
	padding: 3rem 0;
	/* Keep the heading clear of the sticky header when jumped to via #roadshow. */
	scroll-margin-top: 110px;
}

.sg-rs__head {
	max-width: 46rem;
	margin: 0 auto 2.25rem;
	text-align: center;
}

.sg-rs__heading {
	margin: 0;
	color: var(--rs-on-band);
	font-size: 1.625rem;
	font-weight: 700;
	line-height: 1.25;
	text-wrap: balance;
}

.sg-rs__subhead {
	max-width: 38rem;
	margin: 1rem auto 0;
	color: var(--rs-on-band-2);
	font-size: 1.0625rem;
	line-height: 1.6;
	text-wrap: pretty;
}

/* -----------------------------------------------------------------------------
 * 3. Event cards
 *    Phone: stacked. Tablet: stacked, date tile beside the details.
 *    Desktop (>=1024px): three across.
 * -------------------------------------------------------------------------- */
.sg-rs__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sg-rs-card {
	display: flex;
	margin: 0;
}

.sg-rs-card__body {
	display: flex;
	flex-direction: column;
	width: 100%;
	padding: 1.5rem;
	background: var(--rs-card);
	border-radius: var(--rs-radius);
	color: var(--rs-text);
}

.sg-rs-card__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.25rem;
}

/* The date tile is the one bold element: month over a large day numeral. */
.sg-rs-card__date {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 4.5rem;
	padding: 0.5rem 0.75rem 0.625rem;
	background: var(--rs-tile);
	border-radius: 6px;
	color: var(--rs-ink);
	line-height: 1;
}

.sg-rs-card__month {
	color: var(--rs-accent);
	font-size: 0.9375rem;
	font-weight: 700;
}

.sg-rs-card__day {
	margin-top: 0.25rem;
	font-size: 2.5rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	font-variant-numeric: lining-nums;
}

.sg-rs-card__icon {
	width: 44px;
	height: 44px;
	object-fit: contain;
	opacity: 0.85;
}

.sg-rs-card__city {
	margin: 0;
	color: var(--rs-ink);
	font-size: 1.375rem;
	font-weight: 700;
	line-height: 1.3;
}

.sg-rs-card__when {
	margin: 0.25rem 0 0;
	font-size: 1rem;
	line-height: 1.5;
}

.sg-rs-card__label {
	margin: 1.25rem 0 0.5rem;
	color: var(--rs-text);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.4;
}

.sg-rs-card__topics {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Session rows use the per-service colour ramps from seva-tokens.css. */
.sg-rs-topic {
	margin: 0;
	padding: 0.5rem 0.75rem;
	border-left: 3px solid var(--rs-tone);
	border-radius: 0 4px 4px 0;
	background: var(--rs-tone-tint);
	color: var(--rs-tone-ink);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.4;
}

.sg-rs-topic--magenta { --rs-tone: var(--color-magenta-mid, #D4537E); --rs-tone-tint: var(--color-magenta-tint, #FBEAF0); --rs-tone-ink: var(--color-magenta-dark, #4B1528); }
.sg-rs-topic--teal    { --rs-tone: var(--color-teal-mid, #22A07A);    --rs-tone-tint: var(--color-teal-tint, #E1F5EE);    --rs-tone-ink: var(--color-teal-dark, #04342C); }
.sg-rs-topic--purple  { --rs-tone: var(--color-purple-mid, #7F77DD);  --rs-tone-tint: var(--color-purple-tint, #EEEDFE);  --rs-tone-ink: var(--color-purple-dark, #26215C); }
.sg-rs-topic--amber   { --rs-tone: var(--color-amber-mid, #ECA72A);   --rs-tone-tint: var(--color-amber-tint, #FAEEDA);   --rs-tone-ink: var(--color-amber-dark, #412402); }

/* -----------------------------------------------------------------------------
 * 4. CTA under the cards (seva_cta_button, "light" variant)
 * -------------------------------------------------------------------------- */
.sg-rs__cta {
	display: flex;
	justify-content: center;
	margin-top: 2.25rem;
}

.sg-rs .sg-rs__button:focus-visible {
	outline-color: var(--rs-on-band);
}

/* -----------------------------------------------------------------------------
 * 5. Breakpoints
 * -------------------------------------------------------------------------- */

/* Phones: full-width button, a little less padding. */
@media (max-width: 639px) {
	.sg-rs {
		padding: 2.5rem 0;
	}
	.sg-rs__heading {
		font-size: 1.4375rem;
	}
	.sg-rs__subhead {
		font-size: 1rem;
	}
	.sg-rs-card__body {
		padding: 1.25rem;
	}
	.sg-rs__cta .sg-btn {
		width: 100%;
	}
	.sg-rs-banner__text,
	.sg-rs-banner__link {
		font-size: 0.875rem;
	}
}

/* Tablets: one card per row, date tile in a left column beside the details. */
@media (min-width: 640px) and (max-width: 1023px) {
	.sg-rs-card__body {
		display: grid;
		grid-template-columns: auto 1fr;
		column-gap: 1.5rem;
		align-content: start;
	}
	.sg-rs-card__body > * {
		grid-column: 2;
	}
	.sg-rs-card__top {
		grid-column: 1;
		grid-row: 1 / span 6;
		flex-direction: column;
		align-items: center;
		justify-content: flex-start;
		gap: 0.875rem;
		margin-bottom: 0;
	}
	.sg-rs-card__topics {
		flex-direction: row;
		flex-wrap: wrap;
	}
}

/* Desktop: three across. */
@media (min-width: 1024px) {
	.sg-rs {
		padding: 4rem 0;
		scroll-margin-top: 180px;
	}
	.sg-rs__head {
		margin-bottom: 2.75rem;
	}
	.sg-rs__heading {
		font-size: 2rem;
	}
	.sg-rs__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 1.5rem;
	}
	.sg-rs__cta {
		margin-top: 2.75rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sg-rs-banner__icon {
		transition: none;
	}
}
