/**
 * Feed sections: what the front page's Events and Industry news sections and
 * the News page share — the section header with its "All …" link, the grid of
 * cards beside a compact list, the compact list item and the publication
 * card. Until October 3, 2026 this was the last part of home.css; the News
 * page is built from the same parts, so that the two read as one design, see
 * docs/news.md.
 *
 * Markup from includes/raskin/home-feeds.php and includes/raskin/news.php.
 * Enqueued on the front page and on the News page, before news.css; the
 * Feed component (components/feed/) enqueues it wherever it is placed.
 */

/* --------------------------------------------------------------------------
 * Feed sections: events and news
 *
 * The prototype's EventsSection and NewsSection: a SectionHeader (title left,
 * "All events" / "All news" right, on one baseline from 768px up), then cards
 * next to a compact list on a twelve-column grid from 1024px up — events two
 * cards in eight columns and the list in four, news the list in eight and the
 * publication card in four. Markup from the [raskin_home_events] and
 * [raskin_home_news] shortcodes, see includes/raskin/home-feeds.php; the event
 * cards are listing-cards.css's.
 * -------------------------------------------------------------------------- */

.sba-feed-section .sba-feed-head {
	margin-bottom: 32px;
}

.sba-feed-head .sba-section-title .elementor-heading-title {
	font-size: 30px;
	line-height: 36px;
}

.sba-feed-head .sba-section-title .elementor-heading-title a {
	color: inherit;
}

/* "All events": a text link with an arrow, below the title on phones. "All
   platforms" is the same link, centered below the platform tiles. */
.sba-feed-head .sba-feed-cta .elementor-button,
.sba-values .sba-feed-cta .elementor-button {
	padding: 0;
	background-color: transparent;
	color: var(--sba-red-dark);
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
	transition: color var(--sba-duration-hover) ease;
}

.sba-feed-head .sba-feed-cta .elementor-button:hover,
.sba-values .sba-feed-cta .elementor-button:hover {
	color: var(--sba-red-darker);
}

.sba-feed-head .sba-feed-cta .elementor-button-content-wrapper,
.sba-values .sba-feed-cta .elementor-button-content-wrapper {
	gap: 4px;
}

.sba-feed-head .sba-feed-cta .elementor-button-icon,
.sba-values .sba-feed-cta .elementor-button-icon {
	margin: 0;
	font-size: 16px;
	transition: transform var(--sba-duration-hover) ease;
}

.sba-feed-head .sba-feed-cta .elementor-button:hover .elementor-button-icon,
.sba-values .sba-feed-cta .elementor-button:hover .elementor-button-icon {
	transform: translateX(2px);
}

@media (max-width: 767px) {
	.sba-feed-head .elementor-widget.sba-feed-cta {
		margin-top: 20px;
		text-align: left;
	}
}

@media (min-width: 768px) {
	.sba-feed-head > .elementor-container {
		align-items: flex-end;
		gap: 32px;
	}

	.sba-feed-head > .elementor-container > .elementor-column:last-child {
		width: auto;
		flex: 0 0 auto;
	}

	.sba-feed-head > .elementor-container > .elementor-column:first-child {
		width: auto;
		flex: 1 1 auto;
	}

	.sba-feed-head .sba-section-title .elementor-heading-title {
		font-size: 36px;
		line-height: 40px;
	}
}

/* The grid ---------------------------------------------------------------- */

.sba-home-feed {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 32px;
}

.sba-home-feed-cards {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
}

.sba-home-feed-cards .lf-item-container {
	margin: 0;
}

@media (min-width: 768px) {
	.sba-home-feed-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.sba-home-feed {
		grid-template-columns: repeat(12, minmax(0, 1fr));
		gap: 40px;
	}

	.sba-home-events .sba-home-feed-cards,
	.sba-home-news .sba-home-feed-list {
		grid-column: span 8;
	}

	.sba-home-events .sba-home-feed-list,
	.sba-home-news .sba-home-feed-aside {
		grid-column: span 4;
	}
}

/* The compact list: CompactListItem --------------------------------------- */

.sba-home-feed-list > [role="listitem"] + [role="listitem"] .sba-list-item {
	border-top: 1px solid var(--sba-border);
}

.sba-list-item {
	display: grid;
	grid-template-columns: 5.5rem minmax(0, 1fr);
	gap: 12px;
	padding: 20px 8px;
	color: var(--sba-charcoal);
	text-decoration: none;
	transition: background-color var(--sba-duration-hover) ease;
}

.sba-list-item:hover {
	background-color: color-mix(in srgb, var(--sba-muted) 70%, transparent);
	color: var(--sba-charcoal);
}

.sba-list-item:focus-visible {
	outline: 2px solid var(--sba-ring);
	outline-offset: -2px;
}

.sba-list-item-date {
	color: var(--sba-red-dark);
	font-size: 14px;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	line-height: 20px;
}

.sba-list-item-body {
	min-width: 0;
}

.sba-list-item-title {
	display: block;
	color: var(--sba-charcoal);
	font-size: 16px;
	font-weight: var(--sba-heading-weight);
	line-height: 1.375;
	transition: color var(--sba-duration-hover) ease;
}

.sba-list-item:hover .sba-list-item-title {
	color: var(--sba-red-dark);
}

/* Event titles stop at two lines; news titles run to their end. */
.sba-home-events .sba-list-item-title {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.sba-list-item-meta {
	display: block;
	margin-top: 4px;
	overflow: hidden;
	color: var(--sba-slate);
	font-size: 14px;
	line-height: 20px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

@media (min-width: 1024px) {
	.sba-home-events .sba-list-item {
		padding-top: 32px;
		padding-bottom: 32px;
	}

	.sba-home-news .sba-list-item {
		padding-top: 22px;
		padding-bottom: 22px;
	}
}

/* The publication card: PublicationCard ------------------------------------ */

.sba-pub-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 24px;
	overflow: hidden;
	border: 1px solid color-mix(in srgb, var(--sba-border) 50%, transparent);
	border-radius: var(--sba-radius);
	background-color: var(--sba-surface);
	box-shadow: 0 1px 2px 0 hsl(var(--sba-charcoal-hsl) / 0.05);
	transition: box-shadow var(--sba-duration-hover) ease;
}

.sba-pub-card:hover {
	box-shadow:
		0 10px 15px -3px hsl(var(--sba-charcoal-hsl) / 0.1),
		0 4px 6px -4px hsl(var(--sba-charcoal-hsl) / 0.1);
}

.sba-pub-card:has(.sba-pub-card-title a:focus-visible) {
	outline: 2px solid var(--sba-ring);
	outline-offset: 2px;
}

/* A news item's image: 16:9 above the text, beside it on tablets. */
.sba-pub-card-media {
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background-color: var(--sba-muted);
}

.sba-pub-card-media > img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.sba-pub-card:hover .sba-pub-card-media > img {
	transform: scale(1.02);
}

/*
 * A publication's cover, as a book: A4 proportions, a deep shadow, a darker
 * spine on the left, and a turn of 8 degrees on hover. The spine is an
 * overlay of the cover's own size, so it turns about the same axis.
 */
.sba-pub-card.is-publication .sba-pub-card-media {
	width: 50%;
	max-width: 200px;
	aspect-ratio: auto;
	align-self: flex-start;
	overflow: visible;
	background-color: transparent;
}

.sba-pub-card-book {
	position: relative;
}

.sba-pub-card-book img,
.sba-pub-card-book::after {
	transition: transform 0.5s ease;
}

.sba-pub-card-book img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1.414;
	object-fit: cover;
	border-radius: 0 2px 2px 0;
	box-shadow:
		0 25px 50px -12px rgb(0 0 0 / 0.25),
		0 0 0 1px rgb(0 0 0 / 0.1);
}

.sba-pub-card-book::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 0 2px 2px 0;
	background-image: linear-gradient(to right, rgb(0 0 0 / 0.3), rgb(0 0 0 / 0) 6px);
	pointer-events: none;
}

.sba-pub-card:hover .sba-pub-card-book img,
.sba-pub-card:hover .sba-pub-card-book::after {
	transform: perspective(1200px) rotateY(-8deg);
}

.sba-pub-card-body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
	padding-top: 20px;
}

.sba-pub-card-eyebrow {
	margin: 0 0 12px;
	color: var(--sba-red-dark);
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
}

.sba-pub-card-title {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	color: var(--sba-charcoal);
	font-size: 20px;
	font-weight: var(--sba-heading-weight);
	letter-spacing: normal;
	line-height: 1.375;
}

.sba-pub-card-title a,
.sba-pub-card-title a:hover {
	color: inherit;
	text-decoration: none;
}

.sba-pub-card-title a:focus-visible {
	outline: none;
}

/* The title's link covers the card; the links below sit above it. */
.sba-pub-card-title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.sba-pub-card-text {
	display: -webkit-box;
	margin: 12px 0 0;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	color: var(--sba-slate);
	font-size: 14px;
	line-height: 1.625;
}

.sba-pub-card-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 20px;
	margin-top: auto;
	padding-top: 20px;
}

.sba-pub-card-link {
	position: relative;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	color: var(--sba-red-dark);
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
	text-decoration: none;
	transition: color var(--sba-duration-hover) ease;
}

.sba-pub-card-link:hover {
	color: var(--sba-red-darker);
}

.sba-pub-card-link.is-download {
	gap: 6px;
}

.sba-pub-card-link.is-more {
	gap: 4px;
}

.sba-pub-card-link.is-download::before,
.sba-pub-card-link.is-more::after {
	content: "";
	width: 16px;
	height: 16px;
	background-color: currentColor;
	-webkit-mask: var(--sba-pub-card-icon) center / contain no-repeat;
	mask: var(--sba-pub-card-icon) center / contain no-repeat;
	transition: transform var(--sba-duration-hover) ease;
}

.sba-pub-card-link.is-download {
	--sba-pub-card-icon: url("../icons/lucide/download.svg");
}

.sba-pub-card-link.is-more {
	--sba-pub-card-icon: url("../icons/lucide/arrow-right.svg");
}

.sba-pub-card:hover .sba-pub-card-link.is-more::after {
	transform: translateX(2px);
}

/* Tablets: the image beside the text, two equal columns. */
@media (min-width: 768px) and (max-width: 1023px) {
	.sba-pub-card {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px;
	}

	.sba-pub-card-media {
		aspect-ratio: auto;
		height: 100%;
	}

	.sba-pub-card.is-publication .sba-pub-card-media {
		width: 100%;
		height: auto;
	}

	.sba-pub-card-body {
		padding-top: 0;
	}
}

/*
 * Several highlights take turns (Trello card 118): the cards lie on top of
 * one another, so the carousel is as tall as the tallest, and fade into one
 * another; the dots and two 32px discs stand in a row under them. The script
 * is the hero carousel's, which unhides the controls; without it the first
 * card shows alone.
 */
.sba-pub-carousel {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto;
	grid-template-rows: minmax(0, 1fr);
	align-items: center;
	gap: 16px 8px;
	height: 100%;
}

.sba-pub-carousel .sba-c-carousel-slides {
	display: grid;
	grid-column: 1 / -1;
	align-self: stretch;
}

.sba-pub-carousel .sba-c-carousel-slide {
	grid-area: 1 / 1;
	min-width: 0;
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.7s ease, visibility 0s linear 0.7s;
}

.sba-pub-carousel .sba-c-carousel-slide.is-active {
	visibility: visible;
	opacity: 1;
	transition: opacity 0.7s ease, visibility 0s;
}

.sba-pub-carousel .sba-c-carousel-dots {
	display: flex;
	gap: 8px;
}

.sba-pub-carousel .sba-c-carousel-dots[hidden],
.sba-pub-carousel .sba-c-carousel-arrow[hidden] {
	display: none;
}

.sba-pub-carousel .sba-c-carousel-dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background-color: hsl(var(--sba-charcoal-hsl) / 0.2);
	cursor: pointer;
	transition: width var(--sba-duration-hover) ease, background-color var(--sba-duration-hover) ease;
}

.sba-pub-carousel .sba-c-carousel-dot:hover {
	background-color: hsl(var(--sba-charcoal-hsl) / 0.4);
}

.sba-pub-carousel .sba-c-carousel-dot[aria-current="true"] {
	width: 32px;
	background-color: var(--sba-red);
}

.sba-pub-carousel .sba-c-carousel-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 1px solid var(--sba-border);
	border-radius: 50%;
	background-color: var(--sba-surface);
	color: var(--sba-charcoal);
	font-size: 16px;
	cursor: pointer;
	transition: background-color var(--sba-duration-hover) ease, color var(--sba-duration-hover) ease;
}

.sba-pub-carousel .sba-c-carousel-arrow:hover {
	background-color: var(--sba-muted);
	color: var(--sba-red-dark);
}

.sba-pub-carousel .sba-c-carousel-dot:focus-visible,
.sba-pub-carousel .sba-c-carousel-arrow:focus-visible {
	outline: 2px solid var(--sba-ring);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.sba-pub-carousel .sba-c-carousel-slide,
	.sba-pub-carousel .sba-c-carousel-slide.is-active {
		transition: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sba-pub-card:hover .sba-pub-card-book img,
	.sba-pub-card:hover .sba-pub-card-book::after,
	.sba-pub-card:hover .sba-pub-card-media > img {
		transform: none;
	}
}
