/* SitePilot News — frontend */
.sp-news {
	--sp-news-cols: 3;
	--sp-news-cols-tablet: 2;
	--sp-news-cols-mobile: 1;
	--sp-news-gap: 20px;
	--sp-news-card-bg: #fff;
	--sp-news-radius: 12px;
	--sp-news-ratio: 16/9;
	--sp-news-title: #142033;
	--sp-news-text: #5a6b7d;
	--sp-news-date: #5a6b7d;
	--sp-news-btn-bg: #0e7c6b;
	--sp-news-btn-text: #fff;
	--sp-news-single-max: 860px;
	--sp-news-gallery-gap: 12px;
	--sp-news-media-radius: 8px;
	box-sizing: border-box;
	max-width: 100%;
}

.sp-news *,
.sp-news *::before,
.sp-news *::after {
	box-sizing: border-box;
}

.sp-news__grid {
	display: grid;
	grid-template-columns: repeat(var(--sp-news-cols), minmax(0, 1fr));
	gap: var(--sp-news-gap);
}

.sp-news__card {
	background: var(--sp-news-card-bg);
	border-radius: var(--sp-news-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.sp-news__card-media {
	display: block;
	aspect-ratio: var(--sp-news-ratio);
	overflow: hidden;
	border-radius: var(--sp-news-radius) var(--sp-news-radius) 0 0;
}

.sp-news__card-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.sp-news__card-body {
	padding: 1rem 1.1rem 1.2rem;
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	flex: 1;
}

.sp-news__date {
	font-size: 0.85rem;
	color: var(--sp-news-date);
}

.sp-news__card-title {
	margin: 0;
	font-size: 1.15rem;
	line-height: 1.3;
	color: var(--sp-news-title);
}

.sp-news__card-title a {
	color: inherit;
	text-decoration: none;
}

.sp-news__excerpt {
	color: var(--sp-news-text);
	font-size: 0.95rem;
	line-height: 1.45;
}

.sp-news__btn {
	display: inline-block;
	margin-top: 0.35rem;
	padding: 0.45rem 0.9rem;
	background: var(--sp-news-btn-bg);
	color: var(--sp-news-btn-text);
	text-decoration: none;
	border-radius: 6px;
	font-weight: 600;
}

.sp-news--single {
	max-width: var(--sp-news-single-max);
	margin: 0 auto;
	padding: 1rem 1rem 2rem;
}

.sp-news__title {
	margin: 0.35rem 0 1rem;
	color: var(--sp-news-title);
	font-size: clamp(1.6rem, 3vw, 2.2rem);
	line-height: 1.2;
	overflow-wrap: anywhere;
}

.sp-news__featured {
	margin: 0 0 1.25rem;
	border-radius: var(--sp-news-media-radius);
	overflow: hidden;
}

.sp-news__featured-img {
	width: 100%;
	height: auto;
	display: block;
}

.sp-news__content {
	color: var(--sp-news-text);
	line-height: 1.65;
	overflow-wrap: anywhere;
}

.sp-news__content img {
	max-width: 100%;
	height: auto;
}

.sp-news__gallery {
	margin: 1.75rem 0;
}

.sp-news__gallery-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--sp-news-gallery-gap);
}

.sp-news__videos {
	display: grid;
	gap: 1.25rem;
	margin: 1.75rem 0 0;
}

.sp-news__video-title {
	margin: 0 0 0.5rem;
	font-weight: 600;
	color: var(--sp-news-title);
}

.sp-news__video-frame--embed {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--sp-news-media-radius);
	background: #0b1220;
}

.sp-news__video-frame--embed iframe,
.sp-news__video-frame--embed embed,
.sp-news__video-frame--embed object {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	max-width: 100%;
}

.sp-news__video-frame--file {
	border-radius: var(--sp-news-media-radius);
	overflow: hidden;
	background: #0b1220;
}

.sp-news__video-el {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
}

.sp-news-page__heading {
	margin: 1rem 1rem 0.5rem;
}

@media (max-width: 1024px) {
	.sp-news__grid {
		grid-template-columns: repeat(var(--sp-news-cols-tablet), minmax(0, 1fr));
	}

	.sp-news__gallery-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.sp-news__grid {
		grid-template-columns: repeat(var(--sp-news-cols-mobile), minmax(0, 1fr));
	}

	.sp-news__gallery-grid {
		grid-template-columns: 1fr;
	}
}

/* Category badges */
.sp-news__cats {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 8px;
}

.sp-news__cat {
	display: inline-block;
	padding: 2px 8px;
	font-size: 0.75rem;
	line-height: 1.4;
	font-weight: 600;
	color: #0e7c6b;
	background: rgba(14, 124, 107, 0.1);
	border-radius: 4px;
	text-decoration: none;
}

.sp-news__cat:hover {
	color: #0a5c50;
	background: rgba(14, 124, 107, 0.18);
}

.sp-news__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.5rem;
	margin: 0 0 0.75rem;
	font-size: 0.875rem;
	color: var(--sp-news-date, #5a6b7d);
}

.sp-news__meta-sep {
	opacity: 0.55;
}

.sp-news__meta-cats {
	color: inherit;
}

.sp-news__video-empty {
	margin: 0;
	padding: 0.75rem 1rem;
	font-size: 0.9rem;
	color: #5a6b7d;
	background: #f4f7f9;
	border-radius: 8px;
}
