/**
 * Home page adjustments.
 *
 * The ported stylesheet was written against slick-carousel markup. These rules
 * map the same look onto Swiper: slick laid its dots out in normal flow below
 * the track, while Swiper positions them absolutely over the last row.
 */

/* Quotes ------------------------------------------------------------------ */

.section_review .mida-review-slider {
	position: relative;
	padding-bottom: 2.5rem;
}

.section_review .mida-review-slider .swiper-pagination,
.section_brands .mida-brand-slider .swiper-pagination,
.section_index--blogs .mida-blog-slider .swiper-pagination {
	position: static;
	margin-top: 1rem;
	transform: none;
}

.section_review .mida-slider-prev,
.section_review .mida-slider-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	color: #fff;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 2px;
	cursor: pointer;
	transition: all 0.25s ease;
}

.section_review .mida-slider-prev {
	left: 0;
}

.section_review .mida-slider-next {
	right: 0;
}

.section_review .mida-slider-prev:hover,
.section_review .mida-slider-next:hover {
	border-color: #fff;
	background: rgba(255, 255, 255, 0.1);
}

.section_review .mida-slider-prev:focus-visible,
.section_review .mida-slider-next:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* Partner logos ----------------------------------------------------------- */

.section_brands .mida-brand-slider {
	padding-bottom: 0.5rem;
}

/* Swiper's grid rows need the slide height pinned, or row two collapses. */
.section_brands .mida-brand-slider .swiper-slide {
	height: auto;
}

/* Dots -------------------------------------------------------------------- */

.section_review .swiper-pagination-bullet,
.section_brands .swiper-pagination-bullet,
.section_index--blogs .swiper-pagination-bullet {
	width: 8px;
	height: 8px;
	background: #fff;
	opacity: 0.35;
	transition: opacity 0.25s ease;
}

.section_review .swiper-pagination-bullet-active,
.section_brands .swiper-pagination-bullet-active,
.section_index--blogs .swiper-pagination-bullet-active {
	opacity: 1;
}

/* Uninitialised fallback ---------------------------------------------------
 *
 * Swiper's own stylesheet sizes .swiper-slide at 100%, so if the script never
 * runs (JS off, load error) a single card stretches across the whole row.
 * These rules lay the slides out as a plain grid until Swiper takes over.
 */

.mida-blog-slider:not(.swiper-initialized) .swiper-wrapper,
.mida-brand-slider:not(.swiper-initialized) .swiper-wrapper {
	flex-wrap: wrap;
}

.mida-blog-slider:not(.swiper-initialized) .swiper-slide {
	width: 100%;
}

.mida-brand-slider:not(.swiper-initialized) .swiper-slide {
	width: 50%;
}

@media (min-width: 576px) {
	.mida-blog-slider:not(.swiper-initialized) .swiper-slide {
		width: 50%;
	}
}

@media (min-width: 768px) {
	.mida-brand-slider:not(.swiper-initialized) .swiper-slide {
		width: 33.3333%;
	}
}

@media (min-width: 992px) {
	.mida-blog-slider:not(.swiper-initialized) .swiper-slide {
		width: 33.3333%;
	}

	.mida-brand-slider:not(.swiper-initialized) .swiper-slide {
		width: 25%;
	}
}

/* Posts ------------------------------------------------------------------- */

/* Equal-height cards regardless of title length. */
.section_index--blogs .mida-blog-slider .swiper-slide {
	height: auto;
}


.section_index--blogs .mida-blog-slider .article-item-wrap {
	height: 100%;
	display: flex;
	flex-direction: column;
}

.section_index--blogs .mida-blog-slider .article-item-detail {
	flex: 1 1 auto;
}

/* Achievements ------------------------------------------------------------
 *
 * Sits between two image-heavy sections, so it deliberately carries no photo:
 * the pause is what makes the numbers register. Type does the work — the
 * figures are set large enough to read as the section's subject, the labels
 * pick up the same muted grey the rest of the home page uses for supporting
 * copy.
 */

.section_achievement {
	padding: 3.5rem 0 4rem;
}

.achievement-list {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1px;
	margin: 0;
	padding: 0;
	list-style: none;
	background: #262626;
	border: 1px solid #262626;
	border-radius: var(--border_radius);
	overflow: hidden;
}

/* The 1px grid gap plus a solid background draws the dividers, so no cell
   needs its own border and none doubles up at the seams. */
.achievement-item {
	padding: 2.25rem 1.75rem;
	text-align: center;
	background: #0d0d0d;
	list-style: none;
}

.achievement-figure {
	margin: 0 0 0.35rem;
	line-height: 1;
	color: #fff;
	white-space: nowrap;
}

.achievement-value {
	font-size: 3.25rem;
	font-weight: 600;
	letter-spacing: -0.02em;
	/* Digits change width as the counter runs; tabular figures stop the line
	   from twitching while it does. */
	font-variant-numeric: tabular-nums;
}

.achievement-affix {
	font-size: 1.15rem;
	font-weight: 400;
	color: #8a8a8a;
	vertical-align: 0.35em;
}

.achievement-affix.is-suffix {
	margin-left: 2px;
	color: #fff;
}

.achievement-label {
	margin: 0 0 0.6rem;
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #fff;
}

.achievement-note {
	max-width: 300px;
	margin: 0 auto;
	font-size: 14px;
	font-weight: 300;
	line-height: 1.65;
	color: #999;
}

/*
 * One per row on phones, then straight to as many columns as fit. The jump
 * skips the two-column state on purpose: with the three figures the site
 * actually publishes, two columns leave a visibly empty third cell. Above this
 * width the count still comes from the data rather than a hard-coded three, so
 * a fourth figure added through the filter reflows instead of overflowing.
 */
@media (min-width: 768px) {
	.achievement-list {
		grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	}
}

@media (max-width: 767px) {
	.section_achievement {
		padding: 2rem 0 2.5rem;
	}

	.achievement-item {
		padding: 1.75rem 1.25rem;
	}

	.achievement-value {
		font-size: 2.6rem;
	}
}
