/* =============================================
   Case Study Gallery — taubenloft/case-study-gallery
   Figma 81:7790
   3-up row of project photos. container 1200 · 3 cols gap 24 ·
   photo 464×600 (ratio .773) · card vgap 16 · caption fs16/24 grey
   ============================================= */

.tl-csg {
	background: #eaebe6;
	color: #333a42;
	font-family: 'Nunito Sans', 'Nunito Sans Fallback', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	padding: 96px 24px;
}
.tl-csg__container {
	max-width: 1200px;
	margin: 0 auto;
}

/* ── Grid ───────────────────────────────────── */
.tl-csg__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	align-items: start;
}

/* ── Card ───────────────────────────────────── */
.tl-csg__card {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.tl-csg__media {
	width: 100%;
	aspect-ratio: 464 / 600;
	overflow: hidden;
	border-radius: 4px;
}
.tl-csg__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ── Text ───────────────────────────────────── */
.tl-csg__text {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.tl-csg__link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 20px;
	line-height: 27px;
	font-weight: 500;
	text-transform: uppercase;
	color: #333a42;
	text-decoration: none;
	transition: opacity .15s ease;
}
.tl-csg__link--static { cursor: default; }
a.tl-csg__link:hover { opacity: .7; }
.tl-csg__arrow { flex: 0 0 auto; width: 24px; height: 24px; transition: transform .15s ease; }
a.tl-csg__link:hover .tl-csg__arrow { transform: translate(3px, 0); }

.tl-csg__caption {
	margin: 0;
	font-size: 16px;
	line-height: 24px;
	font-weight: 400;
	color: #787d84;
}

/* ── Tablet ≤1024 — 2 columns ───────────────── */
@media (max-width: 1024px) {
	.tl-csg__grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

/* ── Mobile ≤767 — horizontal swipe slider (scroll-snap) ─────────────────
   Cards become a swipeable row; the next card peeks so it reads as a slider. */
@media (max-width: 767px) {
	.tl-csg { padding: 48px 0 48px; }
	.tl-csg__container { max-width: none; }
	.tl-csg__grid {
		display: flex;
		grid-template-columns: none;
		gap: 16px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		padding: 0 20px;
		scroll-padding-left: 20px;
		scrollbar-width: none;
	}
	.tl-csg__grid::-webkit-scrollbar { display: none; }
	.tl-csg__card {
		flex: 0 0 46%;          /* two cards in view (+ peek of the third) */
		scroll-snap-align: start;
	}
	.tl-csg__media { aspect-ratio: 408 / 480; }
}

/* ── Narrow phones ≤480 — one card in view (+ peek) ─────────────────────── */
@media (max-width: 480px) {
	.tl-csg__card { flex: 0 0 80%; }
}
