/**
 * Leader card — shared by homepage leaders section and leadership / team page.
 * (Extracted from home.css for reuse.)
 */

.leaders__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
	justify-content: stretch;
}

.leader-card {
	background: transparent;
	display: flex;
	flex-direction: column;
	min-width: 0;
	position: relative;
}

.leader-card__link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.leader-card__media {
	position: relative;
	overflow: hidden;
	aspect-ratio: 306 / 400;
	background: #262a35;
	border-radius: 8px 8px 0 8px;
}

.leader-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 10%;
	display: block;
	filter: grayscale(1);
	transition: filter 550ms cubic-bezier(0.4, 0, 0.2, 1);
}

.leader-card:hover .leader-card__img,
.leader-card:focus-within .leader-card__img {
	filter: grayscale(0);
}

.leader-card__overlay {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 88px;
	background: linear-gradient(
		140deg,
		#06070a 0%,
		#262a35 45%,
		#445064 72%,
		#647494 100%
	);
	pointer-events: none;
	transition: height 380ms cubic-bezier(0.4, 0, 0.2, 1);
}

.leader-card:hover .leader-card__overlay,
.leader-card:focus-within .leader-card__overlay {
	height: 108px;
}

.leader-card__meta {
	position: absolute;
	left: 16px;
	right: 44px;
	bottom: 12px;
	z-index: 2;
	max-width: calc(100% - 60px);
	transition: bottom 380ms cubic-bezier(0.4, 0, 0.2, 1);
}

.leader-card:hover .leader-card__meta,
.leader-card:focus-within .leader-card__meta {
	bottom: 22px;
}

.leader-card__arrow {
	position: absolute;
	right: 0;
	bottom: 0;
	z-index: 3;
	width: 42px;
	height: 41px;
	display: block;
	color: #1a1e28;
	pointer-events: none;
}

.leader-card__union {
	position: absolute;
	top: 0;
	left: 1px;
	width: 41px;
	height: 41px;
	pointer-events: none;
	display: block;
	object-fit: contain;
}

.leader-card__btn {
	position: absolute;
	right: 0;
	bottom: 0;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--hypro-cyan, #2ec4e6);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #1a1e28;
	transition: background 0.25s ease, transform 0.2s ease;
}

.leader-card__btn svg {
	width: 16px;
	height: 16px;
	display: block;
	flex-shrink: 0;
}

.leader-card:hover .leader-card__btn,
.leader-card:focus-within .leader-card__btn {
	background: #0b9cbc;
}

.leader-card__name {
	margin: 0;
	font-family: Saira, Inter, sans-serif;
	font-weight: 400;
	font-size: 20px;
	line-height: 1.2;
	color: #f7f7f8;
}

.leader-card__role {
	margin: 0.2rem 0 0;
	font-size: 14px;
	font-weight: 300;
	line-height: 1.35;
	color: rgba(247, 247, 248, 0.72);
	overflow-wrap: anywhere;
	word-wrap: break-word;
}

@media (max-width: 1024px) {
	.leaders__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		justify-content: center;
	}
}

@media (max-width: 520px) {
	.leaders__grid {
		grid-template-columns: minmax(0, 1fr);
		justify-content: center;
	}
}

@media (max-width: 480px) {
	.leader-card__name {
		font-size: 1.125rem;
	}

	.leader-card__role {
		font-size: 0.8125rem;
	}
}

/* ─── Carousel when the grid wraps (homepage team strip, [Figma mobile team](https://www.figma.com/design/UYb9lsz3JqK9lsevNHMLR9/HyproMag-USA--Copy-?node-id=999-6558)) —──────────────── */

.leaders-carousel {
	position: relative;
	width: 100%;
}

.leaders-carousel__viewport {
	width: 100%;
}

.leaders-carousel--active .leaders-carousel__viewport {
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: 0;
	padding-bottom: 0.25rem;
	scrollbar-width: thin;
	scrollbar-color: rgba(247, 247, 248, 0.35) transparent;
}

.leaders-carousel--active .leaders-carousel__viewport::-webkit-scrollbar {
	height: 6px;
}

.leaders-carousel--active .leaders-carousel__viewport::-webkit-scrollbar-thumb {
	background: rgba(247, 247, 248, 0.35);
	border-radius: 4px;
}

.leaders-carousel--active .leaders__grid {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	grid-template-columns: none;
	justify-content: flex-start;
	width: max-content;
	max-width: none;
	min-width: 100%;
}

/* Leadership page: higher-specificity grid width rule must not block the carousel track. */
.hypro-team-main .leaders-carousel--active .leaders__grid.hypro-team-grid {
	width: max-content;
	max-width: none;
}

.leaders-carousel--active .leader-card {
	flex: 0 0 min(19rem, calc(100vw - 3.5rem));
	max-width: min(19rem, calc(100vw - 3.5rem));
	scroll-snap-align: start;
	scroll-snap-stop: normal;
}

@media (max-width: 480px) {
	.leaders-carousel--active .leader-card {
		flex-basis: calc(100vw - 2.25rem);
		max-width: calc(100vw - 2.25rem);
	}
}

.leaders-carousel__toolbar[hidden] {
	display: none !important;
}

.leaders-carousel__toolbar {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.5rem;
	margin-top: 1rem;
}

.leaders-carousel__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 1px solid rgba(247, 247, 248, 0.28);
	border-radius: 0.5rem;
	background: rgba(38, 42, 53, 0.6);
	color: #f7f7f8;
	cursor: pointer;
	transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.leaders-carousel__btn:hover:not(:disabled),
.leaders-carousel__btn:focus-visible:not(:disabled) {
	border-color: var(--hypro-cyan, #2ec4e6);
	color: #fff;
	outline: none;
}

.leaders-carousel__btn:focus-visible {
	box-shadow: 0 0 0 2px rgba(46, 196, 230, 0.35);
}

.leaders-carousel__btn:disabled {
	opacity: 0.35;
	cursor: default;
}

/* Light background (leadership directory) — homepage section stays dark above. */
.hypro-team-panel .leaders-carousel__btn {
	border-color: rgba(26, 30, 40, 0.18);
	background: #fff;
	color: #1a1e28;
	box-shadow: 0 1px 2px rgba(26, 30, 40, 0.06);
}

.hypro-team-panel .leaders-carousel__btn:hover:not(:disabled),
.hypro-team-panel .leaders-carousel__btn:focus-visible:not(:disabled) {
	border-color: var(--hypro-cyan, #2ec4e6);
	color: #1a1e28;
}

.hypro-team-panel .leaders-carousel__btn:focus-visible {
	box-shadow: 0 0 0 2px rgba(46, 196, 230, 0.35);
}

@media (prefers-reduced-motion: reduce) {
	.leaders-carousel--active .leaders-carousel__viewport {
		scroll-snap-type: none;
	}
}
