/* 1Office Features: Insights listing (Theme Builder archive, atomic Loop with one card).
   Card states: with a featured image the image replaces the numbered art panel; without one the art panel shows the
   post's position in the listing (oo_insight_number). Equal card heights, clamped title and summary, link at the bottom. */

/* Equal heights per row: each row is as tall as its tallest card (not the tallest card of the page), the loop item
   and the card fill the row, the link sits at the bottom. Elementor's own element rules set display, so they are
   overridden here on purpose. */
.oo-insights-grid { align-items: stretch; grid-auto-rows: auto !important; }
.oo-insights-grid > .e-con { display: flex !important; flex-direction: column; height: auto; }
.oo-insights-grid .e-con.oo-insight-card { display: flex !important; flex-direction: column; flex: 1 1 auto; }
.oo-insights-grid .oo-insight-link { margin-top: auto !important; padding-top: 4px; }

/* Even rhythm for uneven titles and summaries. */
.oo-insights-grid .oo-insight-title,
.oo-insights-grid .oo-insight-excerpt {
	display: -webkit-box !important;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.oo-insights-grid .oo-insight-title { -webkit-line-clamp: 3; line-clamp: 3; }
.oo-insights-grid .oo-insight-excerpt { -webkit-line-clamp: 3; line-clamp: 3; }
.oo-insights-grid .oo-insight-excerpt:empty,
.oo-insights-grid .oo-insight-meta span:empty { display: none; }

/* Numbered art panel: the three tints of the design alternate along the row. */
.oo-insights-grid .oo-insight-art-number { white-space: nowrap; }
.oo-insights-grid > :nth-child(3n+2) .oo-insight-art { background-color: #e6eddc; }
.oo-insights-grid > :nth-child(3n+2) .oo-insight-art-number { color: #bdcdb0; }
.oo-insights-grid > :nth-child(3n) .oo-insight-art { background-color: #f3f4ed; }
.oo-insights-grid > :nth-child(3n) .oo-insight-art-number { color: #d0d6c8; }

/* Image state: shown only when the post has a featured image (without one the image renders with no src). */
.oo-insights-grid .oo-insight-card img.oo-insight-thumb:not([src]),
.oo-insights-grid .oo-insight-card img.oo-insight-thumb[src=""] { display: none !important; }
.oo-insights-grid .oo-insight-card:has(img.oo-insight-thumb[src]:not([src=""])) .oo-insight-art { display: none; }

/* Numbered pages ([oo_insights_pagination]). */
.oo-insights-pages { margin-top: 56px; }
.oo-insights-pages ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}
.oo-insights-pages a.page-numbers,
.oo-insights-pages span.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 14px;
	border: 1px solid #dce2d7;
	border-radius: 999px;
	color: #293f27;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.oo-insights-pages a.page-numbers:hover { border-color: #427a35; color: #103e34; }
.oo-insights-pages span.page-numbers.current { background: #103e34; border-color: #103e34; color: #fff; }
.oo-insights-pages span.page-numbers.dots { border-color: transparent; min-width: 24px; padding: 0; }
.oo-insights-pages .prev,
.oo-insights-pages .next { gap: 6px; }
.oo-insights-pages a.page-numbers:focus-visible { outline: 3px solid rgba(66, 122, 53, 0.35); outline-offset: 2px; }
@media (max-width: 767px) {
	.oo-insights-pages { margin-top: 40px; }
	.oo-insights-pages a.page-numbers,
	.oo-insights-pages span.page-numbers { min-width: 40px; min-height: 40px; padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) {
	.oo-insights-pages a.page-numbers { transition: none; }
}
