/* BAFT Board of Committees — defaults match the existing homepage section. */
.baft-committees {
	--baft-per-view: 5;
	--baft-gap: 16px;
	--baft-radius: 14px;
	--baft-brand: #043856;
	position: relative;
}

@media (max-width: 1024px) {
	.baft-committees { --baft-per-view: 3; }
}

@media (max-width: 767px) {
	.baft-committees { --baft-per-view: 2; --baft-gap: 10px; }
}

/* Tabs ------------------------------------------------------------- */
.baft-committees__tabbar {
	display: flex;
	justify-content: center;
	margin-bottom: 25px;
}

.baft-committees__tabs {
	display: inline-flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 5px;
	padding: 5px;
	background: #fff;
	border-radius: 50px;
	max-width: 100%;
}

.baft-committees__tab {
	appearance: none;
	border: 0;
	margin: 0;
	padding: 20px 25px;
	border-radius: 30px;
	background: transparent;
	color: var(--baft-brand);
	font-family: "Poppins", sans-serif;
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: background-color .3s, color .3s;
}

.baft-committees__tab:hover { background-color: rgba(4, 56, 86, .08); }

.baft-committees__tab.is-active {
	background-color: var(--baft-brand);
	color: #fff;
}

.baft-committees__tab:focus-visible {
	outline: 2px solid var(--baft-brand);
	outline-offset: 2px;
}

@media (max-width: 767px) {
	.baft-committees__tab { font-size: 14px; padding: 14px 18px; }
}

/* Carousel --------------------------------------------------------- */
.baft-committees__panel[hidden] { display: none; }

.baft-committees__carousel { position: relative; }

.baft-committees__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - (var(--baft-per-view) - 1) * var(--baft-gap)) / var(--baft-per-view));
	gap: var(--baft-gap);
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
}

.baft-committees__track::-webkit-scrollbar { display: none; }

.baft-committees__item {
	margin: 0;
	padding: 0;
	scroll-snap-align: start;
	min-width: 0;
}

.baft-committees__nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	width: 40px;
	height: 40px;
	margin-top: -20px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: var(--baft-brand);
	font-size: 28px;
	line-height: 38px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
	cursor: pointer;
	opacity: 0;
	transition: opacity .2s;
}

.baft-committees__nav--prev { left: 8px; }
.baft-committees__nav--next { right: 8px; }

.baft-committees__carousel:hover .baft-committees__nav,
.baft-committees__nav:focus-visible { opacity: 1; }

.baft-committees__nav[disabled],
.baft-committees--no-arrows .baft-committees__nav,
.baft-committees__carousel.is-static .baft-committees__nav { display: none; }

@media (hover: none) {
	.baft-committees__nav { display: none; }
}

/* Cards ------------------------------------------------------------ */
.baft-card {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: var(--baft-radius);
	aspect-ratio: 272 / 350;
	background: #e9eef2;
	color: #fff;
	text-decoration: none;
}

.baft-card .baft-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0;
}

.baft-card--image { background: transparent; }
.baft-card--image .baft-card__img { object-fit: contain; }

.baft-card--generate::after {
	content: "";
	position: absolute;
	inset: 45% 0 0;
	background: linear-gradient(to bottom, rgba(4, 56, 86, 0), rgba(4, 30, 46, .85));
	pointer-events: none;
}

.baft-card__flag {
	position: absolute;
	top: 6%;
	right: 6%;
	z-index: 1;
	width: 16% !important;
	height: auto !important;
	aspect-ratio: 1;
	border-radius: 50% !important;
	object-fit: cover;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}

.baft-card__text {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 0 8% 7%;
	font-family: "Poppins", sans-serif;
	font-size: 13px;
	line-height: 1.25;
}

.baft-card__name { font-weight: 400; font-size: 1.05em; }
.baft-card__company,
.baft-card__position { font-weight: 700; }

a.baft-card:focus-visible {
	outline: 3px solid var(--baft-brand);
	outline-offset: 2px;
}

.baft-committees__empty {
	padding: 16px;
	border: 1px dashed #c3c4c7;
	text-align: center;
}

@media (prefers-reduced-motion: reduce) {
	.baft-committees__track { scroll-behavior: auto; }
}
