/* OSI Product Showcase - base frontend styles */

.osi-ps-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 20px;
	width: 100%;
}

.osi-ps-item {
	background-color: #ffffff;
	border: 1px solid #f7941d;
	border-radius: 8px;
	padding: 15px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.osi-ps-item:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

.osi-ps-link {
	display: block;
	width: 100%;
	text-decoration: none;
}

.osi-ps-img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: contain;
}

@media (max-width: 1024px) {
	.osi-ps-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 600px) {
	.osi-ps-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ===========================================================
 * OSI Post / Case Study Card
 * =========================================================== */
.osi-pc-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
	width: 100%;
}

.osi-pc-card {
	display: block;
	background: #ffffff;
	border-radius: 10px;
	overflow: visible; /* biar badge boleh menonjol keluar area gambar */
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	text-decoration: none;
	color: inherit;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.osi-pc-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.osi-pc-thumb-wrap {
	position: relative;
	/* overflow sengaja TIDAK hidden di sini, supaya badge yang menonjol
	 * (bottom: -16px) tidak ikut terpotong. Pembulatan sudut dipindah
	 * ke elemen gambar itu sendiri (lihat .osi-pc-img). */
}

.osi-pc-img {
	width: 100%;
	height: 220px;
	object-fit: cover;
	display: block;
	border-radius: 10px 10px 0 0;
}

/* Badge: ditaruh menumpuk di atas thumbnail, menempel di sisi bawah gambar */
.osi-pc-badge {
	position: absolute;
	left: 20px;
	bottom: -16px; /* menonjol keluar batas bawah gambar */
	display: inline-block;
	background: #fde3c8;
	color: #f2793a;
	font-size: 13px;
	font-weight: 600;
	padding: 6px 14px;
	border-radius: 20px;
	white-space: nowrap;
	z-index: 2;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.osi-pc-body {
	padding: 28px 20px 20px;
}

.osi-pc-title {
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 700;
	color: #14213d;
	line-height: 1.4;
}

.osi-pc-excerpt {
	margin: 0;
	font-size: 14px;
	color: #555;
	line-height: 1.6;
}

@media (max-width: 1024px) {
	.osi-pc-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ---------------------------------------------------------------
 * Mobile: 1 card landscape per layar, bisa digeser (swipe) horizontal
 * dengan scroll-snap. Struktur card TETAP vertikal: gambar di atas,
 * judul & teks di bawahnya (bukan side-by-side).
 * --------------------------------------------------------------- */
@media (max-width: 600px) {
	.osi-pc-grid {
		display: flex;
		grid-template-columns: none;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		gap: 14px;
		padding: 4px 4px 12px;
		margin: 0 -4px;
		scrollbar-width: none; /* Firefox */
	}

	.osi-pc-grid::-webkit-scrollbar {
		display: none; /* Chrome/Safari */
	}

	.osi-pc-card {
		flex: 0 0 85%;
		max-width: 85%;
		scroll-snap-align: start;
	}

	.osi-pc-img {
		height: 170px; /* rasio landscape, lebih pendek dari desktop (220px) */
	}

	.osi-pc-badge {
		font-size: 12px;
		padding: 5px 12px;
	}

	.osi-pc-body {
		padding: 22px 16px 16px;
	}

	.osi-pc-title {
		font-size: 14px;
		line-height: 1.35;
		margin: 0 0 6px;
	}

	.osi-pc-excerpt {
		font-size: 12px;
		line-height: 1.5;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}
}