/**
 * Feeds plugin — feed display.
 *
 * Self-contained `feeds__*` classes (no dependency on the old Feedzy
 * `.rss_item` styles). Two layouts: `.feeds--grid` (cards) and
 * `.feeds--list` (divided rows). Colours/fonts inherit the site's Elementor
 * globals when present, with sensible fallbacks.
 */

.feeds-wrap {
	margin: 0;
}

.feeds {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Optional feed heading --------------------------------------------------- */

.feeds__feed-title {
	margin: 0 0 16px;
	font-family: var(--e-global-typography-primary-font-family, "DM Serif Display"), Georgia, serif;
	font-weight: 400;
	font-size: 28px;
	line-height: 1.2;
	color: var(--e-global-color-primary, #05224d);
}

/* Shared item content ----------------------------------------------------- */

.feeds__title-wrap {
	display: block;
}

.feeds__title {
	display: inline-block;
	font-family: var(--e-global-typography-primary-font-family, "DM Serif Display"), Georgia, serif;
	font-weight: 400;
	font-size: 24px;
	line-height: 1.2;
	color: var(--e-global-color-primary, #05224d);
	text-decoration: none;
}

.feeds__title:hover,
.feeds__title:focus {
	color: var(--e-global-color-secondary, #2861b1);
	text-decoration: underline;
}

.feeds__date {
	display: block;
	margin: 10px 0 8px;
	font-size: 13px;
	color: #6b7280;
}

.feeds__summary {
	margin: 0;
	font-family: var(--e-global-typography-text-font-family, inherit);
	font-size: 15px;
	line-height: 1.55;
	color: var(--e-global-color-text, #374151);
}

.feeds__read-more {
	display: inline-block;
	margin-top: 10px;
	font-family: var(--e-global-typography-text-font-family, inherit);
	font-size: 14px;
	font-weight: 600;
	color: var(--e-global-color-secondary, #2861b1);
	text-decoration: none;
}

.feeds__read-more:hover,
.feeds__read-more:focus {
	text-decoration: underline;
}

.feeds__read-more::after {
	content: " \2192"; /* right arrow */
}

.feeds--empty p {
	margin: 0;
	color: #6b7280;
}

/* Pagination controls ----------------------------------------------------- */

.feeds__controls {
	margin-top: 24px;
	text-align: center;
}

.feeds__controls:empty {
	margin-top: 0;
}

.feeds__more {
	display: inline-block;
	padding: 10px 24px;
	font-family: var(--e-global-typography-text-font-family, inherit);
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	background: var(--e-global-color-secondary, #2861b1);
	border: 0;
	border-radius: 6px;
	cursor: pointer;
}

.feeds__more:hover,
.feeds__more:focus {
	filter: brightness(0.94);
}

.feeds__pager {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
}

.feeds__page {
	min-width: 38px;
	padding: 8px 12px;
	font-family: var(--e-global-typography-text-font-family, inherit);
	font-size: 15px;
	color: var(--e-global-color-secondary, #2861b1);
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	cursor: pointer;
}

.feeds__page:hover,
.feeds__page:focus {
	border-color: var(--e-global-color-secondary, #2861b1);
}

.feeds__page.is-current {
	color: #fff;
	background: var(--e-global-color-secondary, #2861b1);
	border-color: var(--e-global-color-secondary, #2861b1);
	cursor: default;
}

/* Featured image ---------------------------------------------------------- */

.feeds__image-link {
	display: block;
	line-height: 0;
}

.feeds__image {
	display: block;
	width: 100%;
	max-width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	background: #eef0f2;
}

/* Grid layout (cards) ----------------------------------------------------- */

.feeds--grid {
	display: grid;
	grid-template-columns: repeat(var(--feeds-cols, 3), minmax(0, 1fr));
	gap: 16px;
}

.feeds--grid .feeds__item {
	background: #fff;
	padding: 18px 20px;
	border-radius: 6px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
	overflow: hidden;
}

/* Image becomes a flush card header. */
.feeds--grid .feeds__item--has-image {
	padding-top: 0;
}

.feeds--grid .feeds__item--has-image .feeds__image-link {
	width: calc(100% + 40px);
	margin: 0 -20px 14px;
}

.feeds--grid .feeds__image {
	border-radius: 0;
}

@media (max-width: 1024px) {
	.feeds--grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 700px) {
	.feeds--grid {
		grid-template-columns: 1fr;
	}
}

/* List layout (divided rows) ---------------------------------------------- */

.feeds--list .feeds__item {
	padding: 16px 0;
	border-bottom: 1px solid #e5e7eb;
}

.feeds--list .feeds__item:first-child {
	padding-top: 0;
}

.feeds--list .feeds__item:last-child {
	border-bottom: 0;
}

/* Image becomes a left-side thumbnail. */
.feeds--list .feeds__item--has-image {
	display: flex;
	gap: 16px;
	align-items: flex-start;
}

.feeds--list .feeds__item--has-image .feeds__image-link {
	flex: 0 0 160px;
}

.feeds--list .feeds__image {
	border-radius: 6px;
}

.feeds--list .feeds__body {
	flex: 1 1 auto;
	min-width: 0;
}

@media (max-width: 480px) {
	.feeds--list .feeds__item--has-image .feeds__image-link {
		flex-basis: 104px;
	}
}
