/**
 * IEMA "Our Partners" block styles.
 *
 * Two-column section: a left aside (heading, intro, prev/next controls)
 * and a horizontally-scrolling carousel of partner cards on the right.
 * On mobile the columns stack, the controls move below the carousel and
 * centre, and cards show one-at-a-time with a peek of the next.
 *
 * Built on the shared IEMA tokens (navy #002147, grey #767676,
 * Helvetica, 16px card radius, pill buttons) so it reads as part of the
 * same system as the Projects section. Fully scoped to `.iema-partners`.
 */

.iema-partners {
	background-color: #ffffff;
	color: #002147;
	font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
}

.iema-partners__inner {
	box-sizing: border-box;
	max-width: 1440px;
	margin: 0 auto;
	padding: 64px 80px;
}

.iema-partners__layout {
	display: flex;
	align-items: flex-start;
	gap: 48px;
}

/* Left aside: heading, intro, controls ------------------------------ */
.iema-partners__aside {
	flex: 0 0 340px;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.iema-partners__heading {
	margin: 0;
	color: #002147;
	font-weight: 700;
	font-size: 40px;
	line-height: 44px;
	letter-spacing: 0;
}

.iema-partners__intro {
	color: #767676;
	font-weight: 400;
	font-size: 14px;
	line-height: 140%;
}

.iema-partners__intro p {
	margin: 0 0 12px;
}

.iema-partners__intro p:last-child {
	margin-bottom: 0;
}

.iema-partners__nav {
	display: flex;
	align-items: center;
	gap: 16px;
}

.iema-partners__nav--aside {
	margin-top: 8px;
}

.iema-partners__nav--foot {
	display: none;
}

/* Round prev/next arrow buttons ------------------------------------- */
.iema-partners__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid #002147;
	border-radius: 50%;
	background-color: transparent;
	color: #002147;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.iema-partners__arrow:hover:not(:disabled),
.iema-partners__arrow:focus-visible {
	background-color: #002147;
	border-color: #002147;
	color: #ffffff;
	outline: none;
}

.iema-partners__arrow:disabled {
	opacity: 0.35;
	cursor: default;
}

.iema-partners__arrow svg {
	display: block;
	width: 24px;
	height: 24px;
}

/* Carousel viewport + track ----------------------------------------- */
.iema-partners__viewport {
	flex: 1 1 auto;
	min-width: 0;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-ms-overflow-style: none;
	scrollbar-width: none;
}

.iema-partners__viewport:focus-visible {
	outline: 2px solid #c1d82a;
	outline-offset: 4px;
}

.iema-partners__viewport::-webkit-scrollbar {
	display: none;
}

.iema-partners__track {
	display: flex;
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.iema-partners__slide {
	flex: 0 0 calc((100% - 2 * 24px) / 3);
	margin: 0;
	scroll-snap-align: start;
}

/* Partner card ------------------------------------------------------ */
.iema-partner-card {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.iema-partner-card:hover .iema-partner-card__figure img {
	transform: scale(1.1);
}

.iema-partner-card:hover .iema-partner-card__cta {
	background-color: #00152D;
	border-color: #C1D82A;
	color: #FFFFFF;
	box-shadow: 0 5px 25px 0 rgba(0, 0, 0, 0.15);
}

.iema-partner-card__figure {
	position: relative;
	aspect-ratio: 277 / 240;
	overflow: hidden;
	border-radius: 16px;
	background-color: #f4f5f7;
}

.iema-partner-card__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.50s ease;
}

.iema-partner-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #002147 0%, #00152d 100%);
}

.iema-partner-card__logo {
	display: flex;
	align-items: center;
	height: 44px;
	margin-top: 24px;
}

.iema-partner-card__logo img {
	display: block;
	width: auto;
	max-width: 190px;
	max-height: 40px;
	object-fit: contain;
}

.iema-partner-card__logo-text {
	font-weight: 700;
	font-size: 26px;
	line-height: 1;
	color: #002147;
}

.iema-partner-card__desc {
	margin: 12px 0 0;
	color: #767676;
	font-weight: 400;
	font-size: 14px;
	line-height: 140%;
	min-height: 44px;
}

.iema-partner-card__cta {
	margin-top: 24px;
	align-self: flex-start;
}

/* Tablet: stack columns, show two cards ----------------------------- */
@media (max-width: 1024px) {
	.iema-partners__layout {
		flex-direction: column;
		gap: 32px;
	}

	.iema-partners__aside {
		flex: 0 0 auto;
		width: 100%;
		max-width: 640px;
	}

	/* In the stacked (column) layout the viewport is a cross-axis flex
	   item; without an explicit width it grows to the track's content
	   width and overflows the page. Pin it to the container width so the
	   track scrolls within it instead. */
	.iema-partners__viewport {
		width: 100%;
	}

	.iema-partners__nav--aside {
		display: none;
	}

	.iema-partners__nav--foot {
		display: flex;
		justify-content: center;
		margin-top: 40px;
	}

	.iema-partners__slide {
		flex: 0 0 calc((100% - 24px) / 2);
	}
}

/* Mobile: one card + peek ------------------------------------------- */
@media (max-width: 640px) {
	.iema-partners__inner {
		padding: 40px 24px;
	}

	.iema-partners__heading {
		font-size: 32px;
		line-height: 35.2px;
	}

	.iema-partners__track {
		gap: 16px;
	}

	.iema-partners__slide {
		flex: 0 0 82%;
	}
}
