/**
 * TechBBQ Featured Speakers — Airtable main-speakers carousel with speaker cards.
 *
 * Figma refs in widget PHP (1440 / 1024 / 768 / 380).
 *
 * Breakpoints (mobile-first): 0–767 (base), 768–1023, 1024–1440, 1440+.
 */

.techbbq-speakers {
	--techbbq-speakers-title-block-gap: var(--techbbq-space-3);
	--techbbq-speakers-track-gap: var(--techbbq-space-1);
	--techbbq-speakers-card-radius: 12px;
	--techbbq-speakers-photo-radius: 4px;
	--techbbq-speakers-photo-aspect: 306 / 306;
	--techbbq-speakers-card-gap: var(--techbbq-space-3);
	--techbbq-speakers-name-line-height: 1.32;
	--techbbq-speakers-name-letter-spacing: -0.01em;
	--techbbq-speakers-role-letter-spacing: 0.02em;
	--techbbq-speakers-card-hover-bg: url("../../images/speakers/card-hover.svg");

	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: var(--techbbq-speakers-section-gap);
	width: 100%;
	color: var(--techbbq-content-primary);
	background-color: var(--techbbq-bg-main);
}

.techbbq-speakers > .section-inner {
	display: block;
	width: 100%;
}

/* ── Header ─────────────────────────────────────────────────── */

.techbbq-speakers__header {
	display: flex;
	gap: var(--techbbq-space-3);
	align-items: flex-end;
	justify-content: space-between;
	width: 100%;
}

.techbbq-speakers__title-block {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: var(--techbbq-speakers-title-block-gap);
	min-width: 0;
}

.techbbq-speakers__headline {
	display: flex;
	flex-direction: column;
	gap: var(--techbbq-section-eyebrow-title-gap);
	min-width: 0;
}

.techbbq-speakers__title {
	margin: 0;
}

.techbbq-speakers__description {
	max-width: 660px;
	margin: 0;
	color: var(--techbbq-content-secondary);
	text-align: center;
}

.techbbq-speakers--has-description .techbbq-speakers__headline {
	align-items: center;
	text-align: center;
}

.techbbq-speakers--no-nav .techbbq-speakers__header {
	justify-content: center;
}

.techbbq-speakers--no-nav .techbbq-speakers__title-block {
	width: 100%;
}

/* ── Buttons (layout only — visuals in components/button.css) ─ */

.techbbq-speakers__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: var(--techbbq-space-1);
}

.techbbq-speakers__mobile-footer {
	display: none;
}

.techbbq-speakers__empty {
	margin: 0;
	font-family: var(--techbbq-font-family-body);
	font-size: var(--techbbq-text-paragraph-m-size);
	color: var(--techbbq-content-secondary);
}

/* ── Carousel nav (visuals in components/carousel-nav.css) ───── */

.techbbq-speakers__body {
	display: contents;
}

.techbbq-speakers__mobile-bar {
	display: none;
}

/* ── Carousel ───────────────────────────────────────────────── */

.techbbq-speakers__carousel {
	width: 100%;
}

/* ── Card ───────────────────────────────────────────────────── */

.techbbq-speakers .techbbq-swiper .swiper-slide.techbbq-speakers__card {
	position: relative;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: var(--techbbq-speakers-card-gap);
	width: var(--techbbq-speakers-card-width);
	height: auto;
	padding: var(--techbbq-speakers-card-padding);
	overflow: hidden;
	border-radius: var(--techbbq-speakers-card-radius);
	background: var(--techbbq-bg-surface);
	isolation: isolate;
}

.techbbq-speakers a.swiper-slide.techbbq-speakers__card {
	text-decoration: none;
	color: inherit;
}

/* Reset global link underline on linked carousel cards (see link.css). */
.techbbq-speakers a.swiper-slide.techbbq-speakers__card:hover,
.techbbq-speakers a.swiper-slide.techbbq-speakers__card:focus-visible,
.techbbq-speakers a.swiper-slide.techbbq-speakers__card:hover .techbbq-speakers__name,
.techbbq-speakers a.swiper-slide.techbbq-speakers__card:hover .techbbq-speakers__role,
.techbbq-speakers a.swiper-slide.techbbq-speakers__card:focus-visible .techbbq-speakers__name,
.techbbq-speakers a.swiper-slide.techbbq-speakers__card:focus-visible .techbbq-speakers__role {
	text-decoration: none;
}

.techbbq-speakers__card::before {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 0;
	height: 55%;
	background-color: transparent;
	background-image: var(--techbbq-speakers-card-hover-bg);
	background-repeat: no-repeat;
	background-position: center bottom;
	background-size: 100% auto;
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.techbbq-speakers__photo {
	position: relative;
	z-index: 2;
	flex-shrink: 0;
	width: 100%;
	aspect-ratio: var(--techbbq-speakers-photo-aspect);
	overflow: hidden;
	border-radius: var(--techbbq-speakers-photo-radius);
	background:
		radial-gradient(
			120% 120% at 66% 0%,
			#5a5a5a 0%,
			#373737 32%,
			#262626 52%,
			#151515 72%
		);
}

.techbbq-speakers__photo-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center bottom;
	filter: grayscale(100%);
	transition: filter 0.3s ease;
}

.techbbq-speakers__card:hover .techbbq-speakers__photo-image,
.techbbq-speakers__card:focus-within .techbbq-speakers__photo-image {
	filter: grayscale(0);
}

.techbbq-speakers__linkedin {
	position: absolute;
	z-index: 2;
	top: 16px;
	right: 16px;
}

.techbbq-speakers__meta {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.techbbq-speakers__name {
	margin: 0;
	font-family: var(--techbbq-font-family-heading);
	font-size: var(--techbbq-speakers-name-size);
	font-weight: var(--techbbq-text-h6-weight);
	line-height: var(--techbbq-speakers-name-line-height);
	letter-spacing: var(--techbbq-speakers-name-letter-spacing);
	color: var(--techbbq-content-primary);
}

.techbbq-speakers__role {
	margin: 0;
	font-family: var(--techbbq-font-family-body);
	font-size: var(--techbbq-speakers-role-size);
	font-weight: 400;
	line-height: var(--techbbq-text-paragraph-line-height);
	letter-spacing: var(--techbbq-speakers-role-letter-spacing);
	color: var(--techbbq-content-secondary);
}

.techbbq-speakers__card:hover::before,
.techbbq-speakers__card:focus-within::before {
	opacity: 1;
}

/* Relocated from @media (max-width: 767px) — mobile (0–767) */
.techbbq-speakers {
	--techbbq-speakers-section-gap: 48px;
	--techbbq-speakers-card-width: 200px;
	--techbbq-speakers-card-gap: 20px;
	--techbbq-speakers-card-padding: 14px 14px 20px;
	--techbbq-speakers-name-size: 16px;
	--techbbq-speakers-name-line-height: 1.2;
	--techbbq-speakers-name-letter-spacing: 0;
	--techbbq-speakers-role-size: var(--techbbq-text-paragraph-s-size);
	--techbbq-speakers-role-letter-spacing: 0;
}

.techbbq-speakers__header {
	flex-direction: column;
	align-items: stretch;
}

.techbbq-speakers__buttons {
	flex-direction: column;
}

.techbbq-speakers__buttons .techbbq-btn--secondary {
	display: none;
}

.techbbq-speakers__mobile-bar {
	display: block;
	width: 100%;
}

.techbbq-speakers__body {
	display: flex;
	flex-direction: column;
	gap: var(--techbbq-space-5);
	width: 100%;
}

.techbbq-speakers__carousel {
	margin-top: 0;
}

.techbbq-speakers__mobile-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--techbbq-space-2);
	width: 100%;
}

.techbbq-speakers__mobile-footer .techbbq-btn {
	flex-shrink: 0;
}

.techbbq-speakers__linkedin {
	top: 10px;
	right: 10px;
}

/* ── Tablet (768–1023) ──────────────────────────────────────── */
@media (min-width: 768px) {
	/* Relocated from @media (max-width: 1024px) */
	.techbbq-speakers {
		--techbbq-speakers-section-gap: 72px;
		--techbbq-speakers-card-width: 280px;
		--techbbq-speakers-card-padding: 20px;
		--techbbq-speakers-card-gap: var(--techbbq-space-3);
		--techbbq-speakers-name-size: 24px;
		--techbbq-speakers-name-line-height: 1.32;
		--techbbq-speakers-name-letter-spacing: -0.01em;
		--techbbq-speakers-role-size: var(--techbbq-text-paragraph-xs-size);
		--techbbq-speakers-role-letter-spacing: 0.02em;
	}

	.techbbq-speakers__header {
		flex-direction: row;
		align-items: flex-end;
	}

	.techbbq-speakers__buttons {
		flex-direction: row;
	}

	.techbbq-speakers__buttons .techbbq-btn--secondary {
		display: inline-flex;
	}

	.techbbq-speakers__mobile-bar {
		display: none;
	}

	.techbbq-speakers__body {
		display: contents;
		width: unset;
		flex-direction: unset;
		gap: unset;
	}

	.techbbq-speakers__carousel {
		margin-top: unset;
	}

	.techbbq-speakers__mobile-footer {
		display: none;
	}

	.techbbq-speakers__linkedin {
		top: 16px;
		right: 16px;
	}
}

/* ── Desktop (1024–1440) ──────────────────────────────────────── */
@media (min-width: 1024px) {
	/* Restored from original base */
	.techbbq-speakers {
		--techbbq-speakers-section-gap: var(--techbbq-space-10);
		--techbbq-speakers-card-width: 342px;
	}
}
