/* ============================================================
   HOMEPAGE.CSS — Homepage-only Sections
   Hero, Feature Panel, Frontpage Posts Grid, Post List
   ============================================================ */

/* ----------------------------------------------------------
   Legacy Hero Section (used in sections/hero.php)
   ---------------------------------------------------------- */
.wl-hero {
	background-color: var(--wl-color-primary);
	color: var(--wl-color-white);
	padding: 6rem 0;
	text-align: center;
}

.wl-hero h2 {
	color: var(--wl-color-white);
	font-size: 3rem;
	margin-bottom: 1.5rem;
}

.wl-hero p {
	font-size: 1.25rem;
	color: var(--wl-color-muted);
	max-width: 600px;
	margin: 0 auto 2rem;
}

.wl-hero-actions {
	display: flex;
	gap: 1rem;
	justify-content: center;
}

/* ----------------------------------------------------------
   index.php Hero Section (inline-style replacement)
   ---------------------------------------------------------- */
.wl-hero-section {
	background-color: var(--wl-color-blue-light);
	border-radius: var(--wl-radius-md);
	padding: 3rem 2rem;
	margin-bottom: 2.5rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.wl-hero-text {
	max-width: 60%;
}

.wl-hero-eyebrow {
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--wl-color-blue);
	text-transform: uppercase;
	letter-spacing: 1px;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.wl-hero-heading {
	font-size: 2.5rem;
	font-weight: 800;
	color: var(--wl-color-primary);
	line-height: 1.2;
	margin-bottom: 1rem;
}

.wl-hero-heading span {
	color: var(--wl-color-blue);
}

.wl-hero-image {
	display: flex;
	justify-content: center;
	align-items: center;
}

.wl-hero-image img {
	max-width: 100%;
	height: auto;
	max-height: 220px;
	border-radius: 12px;
}

/* ----------------------------------------------------------
   Frontpage Posts Grid — Dynamic Columns
   ---------------------------------------------------------- */
.wl-frontpage-posts {
	display: grid;
	gap: 1.25rem;
	margin-bottom: 2rem;
	/* NO grid-template-columns here — let .wl-posts-cols-* handle it */
}

/* Grid column variants */
.wl-posts-cols-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wl-posts-cols-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wl-posts-cols-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Fallback: if no col class, default to 3 */
.wl-posts-grid:not(.wl-posts-cols-2):not(.wl-posts-cols-3):not(.wl-posts-cols-4) {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wl-frontpage-posts .wl-card {
	height: 100%;
	display: flex;
	flex-direction: column;
}

/* List layout */
.wl-posts-list .wl-card {
	flex-direction: row;
	align-items: stretch;
}

.wl-posts-list .wl-card-image {
	width: 280px;
	flex-shrink: 0;
}

.wl-posts-list .wl-card-image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	background-color: #f8f9fa;
}

.wl-frontpage-posts .wl-card-content {
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.wl-frontpage-posts .wl-card-title {
	font-size: 1.15rem;
}

/* Clamp excerpt to 3 lines so cards look uniform */
.wl-frontpage-posts .wl-card-excerpt p,
.wl-frontpage-posts .wl-card-excerpt {
	font-size: 0.9rem;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	flex: 1;
}

/* Responsive */
@media (max-width: 768px) {
	.wl-posts-cols-2,
	.wl-posts-cols-3,
	.wl-posts-cols-4,
	.wl-frontpage-posts {
		grid-template-columns: 1fr;
	}
	.wl-posts-list .wl-card {
		flex-direction: column;
	}
	.wl-posts-list .wl-card-image {
		width: 100%;
	}
}

@media (min-width: 769px) and (max-width: 1024px) {
	.wl-posts-cols-3,
	.wl-posts-cols-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* ----------------------------------------------------------
   Post List (vertical list of articles)
   ---------------------------------------------------------- */
.wl-post-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-bottom: 3rem;
}
