/* Blog Alternating — homepage News/Guides as an EV-section-style carousel: centered accent title,
 * photo (visual-right in RTL) + text (visual-left): post title, excerpt, green CTA. Industries-style
 * prev/next arrows swap the active post. Typography mirrors the EV section (Polin). Shared by both
 * per-CPT widgets. */

.greengrass-blog-alt {
	padding-block: clamp(48px, 5vw, 96px);
	background: #F3F3F3;
	font-family: 'Polin', sans-serif;
	direction: rtl;
}

.greengrass-blog-alt__container {
	max-width: 1440px;
	margin-inline: auto;
	padding-inline: clamp(16px, 2vw, 48px);
}

/* ── Title — identical to the EV section (centered, dark, cyan accent, 55px) ──── */
.greengrass-blog-alt__title {
	margin: 0 0 clamp(32px, 4vw, 64px);
	font-family: 'Polin', sans-serif;
	font-size: clamp(28px, 3.5vw, 55px);
	font-weight: 700;
	line-height: 1.1;
	color: #2C3D41;
	text-align: center;
}

.greengrass-blog-alt__title .accent {
	color: #00A3E9;
}

/* ── Two-column content ─────────────────────────────── */
.greengrass-blog-alt__content {
	display: flex;
	gap: clamp(24px, 3vw, 64px);
	align-items: center;
}

/* Photo column — logical-start (visual-right in RTL): stacked slides + arrow controls. */
.greengrass-blog-alt__photo-col {
	flex: 1 1 0;
	min-width: 0;
	position: relative;
	aspect-ratio: 822 / 532;
}

.greengrass-blog-alt__photo {
	position: absolute;
	inset: 0;
	border-radius: 15px;
	overflow: hidden;
	background: #d9d9d9;
}

/* Only .is-active is visible; the rest stay in the DOM (preloaded) for instant swaps. */
.greengrass-blog-alt__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease;
}

.greengrass-blog-alt__slide.is-active {
	opacity: 1;
	visibility: visible;
}

.greengrass-blog-alt__slide img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Controls — bottom-start (visual-right in RTL) of the photo, Industries style. */
.greengrass-blog-alt__controls {
	position: absolute;
	inset-block-end: clamp(16px, 1.5vw, 24px);
	inset-inline-start: clamp(16px, 1.5vw, 24px);
	display: flex;
	gap: 12px;
	z-index: 2;
}

/* `!important` on bg/border/color so the theme's generic button:hover can't override us. */
.greengrass-blog-alt__arrow,
.greengrass-blog-alt__arrow:link,
.greengrass-blog-alt__arrow:visited {
	display: flex;
	align-items: center;
	justify-content: center;
	width: clamp(48px, 4.5vw, 70px);
	height: clamp(48px, 4.5vw, 70px);
	box-sizing: border-box;
	background-color: rgba(248, 255, 253, 0.69) !important;
	color: #2C3D41 !important;
	border: 1px solid #2C3D41 !important;
	border-radius: 15px;
	padding: 0;
	font-family: 'Polin', sans-serif;
	font-size: clamp(22px, 2.4vw, 32px);
	font-weight: 400;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.greengrass-blog-alt__arrow:hover,
.greengrass-blog-alt__arrow:focus {
	background-color: #ffffff !important;
	color: #2C3D41 !important;
	border-color: #2C3D41 !important;
	transform: translateY(-1px);
}

/* Text column — logical-end (visual-left in RTL): stacked text slides (only .is-active shows). */
.greengrass-blog-alt__text-col {
	flex: 0 0 38%;
	max-width: 480px;
	display: flex;
	align-items: center;
}

.greengrass-blog-alt__text {
	display: none;
	flex-direction: column;
	gap: clamp(16px, 1.6vw, 28px);
	text-align: start;
	width: 100%;
}

.greengrass-blog-alt__text.is-active {
	display: flex;
}

.greengrass-blog-alt__post-title {
	margin: 0;
	font-family: 'Polin', sans-serif;
	font-size: clamp(20px, 2.2vw, 32px);
	font-weight: 700;
	line-height: 1.1;
	color: #2C3D41;
}

.greengrass-blog-alt__post-title a {
	color: inherit;
	text-decoration: none;
}
.greengrass-blog-alt__post-title a:hover {
	color: #00A3E9;
}

/* Paragraph — identical to EV section __para. */
.greengrass-blog-alt__para {
	margin: 0;
	font-family: 'Polin', sans-serif;
	font-size: clamp(15px, 1.5vw, 24px);
	font-weight: 400;
	line-height: 1.12;
	color: #2C3D41;
}

/* CTA — identical to EV section __cta (green pill, 15px radius). */
.greengrass-blog-alt__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-block-start: clamp(8px, 1vw, 16px);
	padding: 14px 28px;
	background-color: #629C55;
	color: #F8FFFD;
	font-family: 'Polin', sans-serif;
	font-size: clamp(15px, 1.4vw, 20px);
	font-weight: 400;
	line-height: 1.2;
	text-decoration: none;
	border: 0;
	border-radius: 15px;
	align-self: flex-start;
	text-align: center;
	transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.greengrass-blog-alt__cta:hover {
	background-color: #4f7d44;
	transform: translateY(-1px);
	box-shadow: 0 8px 20px rgba(98, 156, 85, 0.32);
}

.greengrass-blog-alt__empty {
	text-align: center;
	color: #5a6b66;
	font-size: 16px;
}

/* Responsive — stack columns (photo above text); arrows stay on the photo. */
@media (max-width: 960px) {
	.greengrass-blog-alt__content {
		flex-direction: column;
		gap: clamp(24px, 3vw, 40px);
	}
	.greengrass-blog-alt__photo-col {
		flex: none;
		width: 100%;
	}
	.greengrass-blog-alt__text-col {
		flex: none;
		max-width: none;
		width: 100%;
	}
}
