/*
 * TOPOSEL Home – "As Featured In" logo band and "Our Latest Blog Posts".
 * Scoped under .tsl-home; loaded ONLY on the approved test page.
 *
 * Sizes and colours are ESTIMATES from the reference screenshots
 * (desktop ≈ 1.36 screenshot px per CSS px).
 */

/* ---------- As Featured In (extends the "Our Platforms" band) ---------- */

/* Plain band on #eceafb (no purple border). */
.tsl-home .tsl-featured {
	border: 0;
	background: #eceafb;
}

.tsl-home .tsl-featured .tsl-platforms__inner {
	min-height: 161px;
}

/* Two large logos visible at a time. */
.tsl-home .tsl-featured .tsl-platforms__carousel {
	--tsl-per-view: 2;
}

.tsl-home .tsl-featured .tsl-platforms__logo {
	max-height: 88px;
	max-width: 320px;
}

@media (max-width: 1024px) {
	.tsl-home .tsl-featured .tsl-platforms__carousel {
		--tsl-per-view: 2;
	}

	.tsl-home .tsl-featured .tsl-platforms__logo {
		max-height: 72px;
	}
}

@media (max-width: 767px) {
	/* Each logo stays inside its own half of the row (they overlapped before). */
	.tsl-home .tsl-featured .tsl-platforms__logo {
		max-width: 100%;
		max-height: 44px;
		margin: 0 auto;
	}

	.tsl-home .tsl-featured .tsl-carousel__slide {
		justify-content: center;
		padding: 0 8px;
	}

	/* Both logos fit, so the (hidden) arrows give their space back to the logos. */
	.tsl-home .tsl-featured .tsl-carousel--static {
		grid-template-columns: minmax(0, 1fr);
	}

	.tsl-home .tsl-featured .tsl-carousel--static .tsl-carousel__btn {
		display: none;
	}
}

/* ---------- Our Latest Blog Posts ---------- */

.tsl-home .tsl-blog {
	padding: 100px 0;
}

.tsl-home .tsl-blog__head {
	max-width: 1100px;
}

.tsl-home .tsl-blog__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px;
	max-width: 1110px;
	margin: 52px auto 0;
	padding: 0;
	list-style: none;
}

.tsl-home .tsl-post {
	display: flex;
	flex-direction: column;
	margin: 0;
	background: #fff;
}

/* Image with a purple overlay on hover/focus (seen in the recording). */
.tsl-home .tsl-post__media {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 476 / 328;
}

.tsl-home .tsl-post__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(79, 47, 217, 0.45);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.tsl-home .tsl-post:hover .tsl-post__media::after,
.tsl-home .tsl-post:focus-within .tsl-post__media::after {
	opacity: 1;
}

.tsl-home .tsl-post__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tsl-home .tsl-post__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding: 26px 20px 40px;
}

.tsl-home .tsl-post__title {
	margin: 0 0 18px;
	font-family: inherit;
	font-size: 19px;
	font-weight: 600;
	line-height: 1.3;
}

/* Long titles stop after two lines with "…" (reference). */
.tsl-home .tsl-post__title a {
	display: -webkit-box;
	overflow: hidden;
	color: #111;
	text-decoration: none;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
}

.tsl-home .tsl-post__meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0 0 22px;
	color: #111;
	font-size: 16px;
}

.tsl-home .tsl-post__author,
.tsl-home .tsl-post__date {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.tsl-home .tsl-meta-icon {
	flex: 0 0 auto;
	width: 17px;
	height: 17px;
}

.tsl-home .tsl-post__excerpt {
	margin: 0 0 22px;
	color: var(--tsl-color-text);
	font-size: 16px;
	line-height: 1.55;
}

.tsl-home .tsl-post__more {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 14px;
	margin-top: auto;
	color: #111;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
}

.tsl-home .tsl-arrow-icon {
	width: 20px;
	height: 20px;
}

@media (prefers-reduced-motion: reduce) {
	.tsl-home .tsl-post__media::after {
		transition: none;
	}
}

@media (max-width: 1024px) {
	.tsl-home .tsl-blog {
		padding: 80px 0;
	}

	.tsl-home .tsl-blog__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 30px;
		margin-top: 44px;
	}

	.tsl-home .tsl-post__title {
		font-size: 18px;
	}
}

@media (max-width: 767px) {
	.tsl-home .tsl-blog {
		padding: 70px 0;
	}

	.tsl-home .tsl-blog__grid {
		grid-template-columns: minmax(0, 1fr);
		padding: 0 30px;
	}
}
