/* Footer "Join us at an upcoming event" cards (inc/ks-events.php, footer.php). Round 2, approved by Eric 2026-12-03.
   Board: claude-design/rounds/2026-12-03-footer-event-card-canvas, EventCards (Ev-card-1up / Ev-card-3up at 1280).
   The card is the catalog product card (.ks-cat-card, css/ks-catalog.css) with a square image well.
   Sizes in px: the theme sets html to 62.5%. Breakpoints match the board: phone < 768, tablet < 1200. */

.ks-foot-events--bands {
	--ks-ev-gutter: 77px;
	--ks-ev-gap: 32px;
	background: #FFFFFF;
	color: #242B3B;
}

.ks-foot-events--bands h2.footer_line {
	margin: 0;
	padding: 116px 20px 0;
	text-wrap: balance;
}

.ks-events-wrap {
	position: relative;
	padding: 0 var(--ks-ev-gutter);
	margin: 45px 0 97px;
}

/* The board's gap to the footer is the wrap's own bottom margin (97 / 73 / 40); ks-footer.css's 75px top margin would win at 900 and 375. */
.ks-foot-events--bands + .ks-foot { margin-top: 0; }

/* ---------- Two or more: the slider (same .event-slider slick instance, options in js/custom.js) ---------- */
.ks-events.event_class { margin: 0; padding: 0; }

/* Before slick starts: lay the cards out as slick will, so nothing jumps. */
.ks-events--many:not(.slick-initialized) {
	--ks-ev-per: min(3, var(--ks-ev-count, 1));
	display: flex;
	gap: var(--ks-ev-gap);
	overflow: hidden;
}
.ks-events--many:not(.slick-initialized) > .ks-events__item {
	flex: 0 0 calc((100% - (var(--ks-ev-per) - 1) * var(--ks-ev-gap)) / var(--ks-ev-per));
	min-width: 0;
	display: flex;
}

.ks-events.slick-initialized .slick-list { margin: 0 calc(var(--ks-ev-gap) / -2); }
.ks-events.slick-initialized .slick-track { display: flex; }
.ks-events.slick-initialized .slick-slide {
	display: flex;
	height: auto;
	box-sizing: border-box;
	padding: 0 calc(var(--ks-ev-gap) / 2);
}

.ks-events .slick-prev,
.ks-events .slick-next {
	z-index: 1;
	width: 30px;
	height: 30px;
}
.ks-events .slick-prev { left: -53px; }
.ks-events .slick-next { right: -53px; }
.ks-events .slick-arrow:focus-visible {
	outline: 2px solid #242B3B;
	outline-offset: 2px;
}

/* ---------- The card ---------- */
.ks-event {
	width: 100%;
	box-sizing: border-box;
	background: #FFFFFF;
	border: 1px solid #E7E7E7;
	border-radius: 6px;
	padding: 12px 12px 31px;
	display: flex;
	flex-direction: column;
	color: #242B3B;
	font-family: 'IBM Plex Sans', sans-serif;
}

/* Square corners on the image: Eric's call on the canvas. */
.ks-event__media {
	flex: none;
	min-width: 0;
	position: relative;
	aspect-ratio: 2344 / 1132;
	border-radius: 0;
	overflow: hidden;
	background: #F4F4F4;
}
.ks-events .ks-event__media img.ks-event__img {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ks-event__body {
	flex: 1 1 auto;
	min-width: 0;
	padding: 0 10px;
	display: flex;
	flex-direction: column;
}

/* The text grows so the buttons line up along the bottom; its 24px bottom pad is the least space above the button. */
.ks-event__text {
	flex: 1 0 auto;
	display: flex;
	flex-direction: column;
}
.ks-event__text:not(:last-child) { padding-bottom: 24px; }

.ks-event__eyebrow {
	margin: 22px 0 0;
	font-family: 'Akkurat Mono LL', monospace;
	font-weight: 700;
	font-size: 12px;
	line-height: 18px;
	letter-spacing: 1.32px !important; /* style.css sets every p to .2px !important */
	text-transform: uppercase;
	color: #242B3B;
}

.ks-event h3.ks-event__name {
	margin: 8px 0 0;
	font-family: 'IBM Plex Sans', sans-serif;
	font-weight: 700;
	font-size: 22px;
	line-height: 30.8px;
	letter-spacing: normal;
	text-transform: none;
	text-wrap: pretty;
	color: #242B3B;
}
.ks-event__text > .ks-event__name:first-child { margin-top: 22px; }

.ks-event__location {
	margin: 8px 0 0;
	font-size: 16px;
	line-height: 22.4px;
	letter-spacing: .2px !important;
	text-wrap: pretty;
	color: #393939;
}

/* The button: the catalog's light gray pill, and the catalog's "Quote This Product" hover (yellow, navy text). */
.ks-event__link {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	box-sizing: border-box;
	width: 100%;
	padding: 14px 32px;
	border-radius: 500px;
	background: #F4F4F4;
	font-family: 'Akkurat Pro', sans-serif;
	font-weight: 700;
	font-size: 18px;
	line-height: 23.4px;
	color: #242B3B;
	text-decoration: none;
	transition: background-color .3s ease, color .3s ease;
}
.ks-event__link svg { flex: none; }
.ks-event__link:hover,
.ks-event__link:focus-visible {
	background: #FFC800;
	color: #242B3B;
	text-decoration: none;
}
.ks-event__link:focus-visible {
	outline: 2px solid #242B3B;
	outline-offset: 3px;
}

/* ---------- One event: one card across the content width ---------- */
.ks-events--one {
	container: ks-ev-one / inline-size;
}
.ks-events--one .ks-event {
	flex-direction: row;
	align-items: center;
	gap: 40px;
	padding: 12px;
}
.ks-events--one .ks-event__media { flex: 0 0 620px; }
.ks-events--one .ks-event__body { padding: 0 28px 0 0; }
.ks-events--one .ks-event__text { flex: none; }
.ks-events--one .ks-event__eyebrow { margin-top: 0; }
.ks-events--one .ks-event__text > .ks-event__name:first-child { margin-top: 0; }
.ks-events--one .ks-event__link {
	display: inline-flex;
	width: auto;
	align-self: flex-start;
}

@media (prefers-reduced-motion: reduce) {
	.ks-event__link { transition: none; }
}

@media (max-width: 1199.78px) {
	.ks-foot-events--bands { --ks-ev-gutter: 58px; }
	.ks-foot-events--bands h2.footer_line { padding-top: 87px; }
	.ks-events-wrap { margin: 33px 0 73px; }
	.ks-events--many:not(.slick-initialized) { --ks-ev-per: min(2, var(--ks-ev-count, 1)); }
	.ks-events--one .ks-event__media { flex: 0 0 56%; }
	.ks-events .slick-prev { left: -44px; }
	.ks-events .slick-next { right: -44px; }
}

/* One event on a narrow card (about 935px wide screens and down): stack, image on top, as the vertical card. */
@container ks-ev-one (max-width: 820px) {
	.ks-events--one .ks-event {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 12px 12px 31px;
	}
	.ks-events--one .ks-event__media { flex: none; }
	.ks-events--one .ks-event__body { padding: 0 10px; }
	.ks-events--one .ks-event__eyebrow,
	.ks-events--one .ks-event__text > .ks-event__name:first-child { margin-top: 22px; }
	.ks-events--one .ks-event__link {
		display: flex;
		width: 100%;
		align-self: stretch;
	}
}

@media (max-width: 767.9px) {
	.ks-foot-events--bands { --ks-ev-gutter: 40px; }
	.ks-foot-events--bands h2.footer_line { padding-top: 40px; }
	.ks-events-wrap { margin: 16px 0 40px; }
	.ks-events--many:not(.slick-initialized) { --ks-ev-per: 1; }
	.ks-events .slick-prev,
	.ks-events .slick-next { width: 20px; }
	.ks-events .slick-prev { left: -30px; }
	.ks-events .slick-next { right: -30px; }
}
