/**
 * Home Posts Shortcode – Picture one design
 * Light blue section, 3-column white cards (image, title, excerpt, Se mer), Läs mer button below.
 *
 * @package Blocksy_Child
 */

.autohjul-home-posts {
	background-color: #e8f4fc;
	padding: 2.5rem 1.5rem;
	margin: 0 auto;
	max-width: 1320px;
	box-sizing: border-box;
}

.autohjul-home-posts__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
	margin-bottom: 2rem;
}

.autohjul-home-posts__card {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.2s ease;
}

.autohjul-home-posts__card:hover {
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* Image: same aspect ratio on mobile and desktop (like reference 1st/2nd pic) */
.autohjul-home-posts__card-image-link {
	display: block;
	line-height: 0;
	background: #f0f0f0;
	width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
	min-height: 140px;
	overflow: hidden;
}

.autohjul-home-posts__card-image-link--no-img {
	aspect-ratio: 16 / 9;
	min-height: 140px;
}

.autohjul-home-posts__card-img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
	object-position: center;
}

.autohjul-home-posts__card-img-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 140px;
	background: #e5e5e5;
}

.autohjul-home-posts__card-body {
	padding: 1.25rem 1.25rem 1.5rem;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.autohjul-home-posts__card-title {
	font-size: 1.1rem;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 0.5rem;
	color: #111;
}

.autohjul-home-posts__card-title a {
	color: inherit;
	text-decoration: none;
}

.autohjul-home-posts__card-title a:hover {
	text-decoration: underline;
}

/* Short description: max 2 lines, same on mobile and desktop */
.autohjul-home-posts__card-excerpt {
	font-size: 0.9rem;
	line-height: 1.5;
	color: #666;
	margin-bottom: 1rem;
	flex: 1;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
}

.autohjul-home-posts__btn {
	display: inline-block;
	text-decoration: none;
	font-weight: 600;
	border-radius: 6px;
	transition: background-color 0.2s, color 0.2s;
}

.autohjul-home-posts__btn--se-mer {
	background: #0066cc;
	color: #fff;
	padding: 0.5rem 1rem;
	font-size: 0.9rem;
}

.autohjul-home-posts__btn--se-mer:hover {
	background: #0052a3;
	color: #fff;
}

.autohjul-home-posts__btn--las-mer {
	background: #0066cc;
	color: #fff;
	padding: 0.65rem 2rem;
	font-size: 1rem;
}

.autohjul-home-posts__btn--las-mer:hover {
	background: #0052a3;
	color: #fff;
}

.autohjul-home-posts__las-mer-wrap {
	text-align: center;
}

@media (max-width: 992px) {
	.autohjul-home-posts__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 576px) {
	.autohjul-home-posts {
		padding: 1.5rem 1rem;
	}
	.autohjul-home-posts__grid {
		grid-template-columns: 1fr;
		gap: 1.25rem;
		margin-bottom: 1.5rem;
	}
}
