.sp-gallery {
	--sp-gal-cols: 3;
	--sp-gal-cols-t: 2;
	--sp-gal-cols-m: 1;
	--sp-gal-gap: 0.85rem;
	--sp-gal-accent: #36731f;
	box-sizing: border-box;
	max-width: 100%;
}

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

.sp-gallery__header {
	margin-bottom: 1rem;
}

.sp-gallery__title {
	margin: 0 0 0.35rem;
	font-size: 1.35rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: #142033;
}

.sp-gallery__desc {
	margin: 0;
	color: #5a6b7d;
	font-size: 0.95rem;
	line-height: 1.45;
}

.sp-gallery__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(var(--sp-gal-cols), minmax(0, 1fr));
	gap: var(--sp-gal-gap);
}

.sp-gallery__item {
	margin: 0;
	position: relative;
}

.sp-gallery__link {
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: #e8eef2;
	text-decoration: none;
	line-height: 0;
}

.sp-gallery__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	object-position: center;
	max-width: 100%;
	transition: opacity 0.2s ease, transform 0.25s ease;
}

.sp-gallery__link:hover .sp-gallery__img,
.sp-gallery__link:focus-visible .sp-gallery__img {
	opacity: 0.92;
	transform: scale(1.02);
}

.sp-gallery__caption {
	margin-top: 0.4rem;
	font-size: 0.875rem;
	color: #5a6b7d;
	line-height: 1.35;
}

.sp-gallery__badge {
	position: absolute;
	top: 0.4rem;
	left: 0.4rem;
	font-size: 0.7rem;
	padding: 0.15rem 0.4rem;
	border-radius: 4px;
	background: #142033;
	color: #fff;
}

.sp-gallery__item.is-inactive {
	opacity: 0.55;
}

.sp-gallery--empty,
.sp-gallery__empty {
	padding: 1rem;
	border: 1px dashed #c5d0da;
	border-radius: 10px;
	color: #5a6b7d;
}

/* Archive cards */
.sp-gallery__cards {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(var(--sp-gal-cols), minmax(0, 1fr));
	gap: 1.25rem;
}

.sp-gallery__card {
	margin: 0;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e5ebe3;
	border-radius: 8px;
	overflow: hidden;
}

.sp-gallery__card-media {
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: #e8efe4;
	text-decoration: none;
	line-height: 0;
}

.sp-gallery__card-img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	object-position: center;
	max-width: 100%;
	transition: opacity 0.2s ease, transform 0.25s ease;
}

.sp-gallery__card-media:hover .sp-gallery__card-img,
.sp-gallery__card-media:focus-visible .sp-gallery__card-img {
	opacity: 0.92;
	transform: scale(1.02);
}

.sp-gallery__card-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 10rem;
	background: linear-gradient(135deg, #dfe9d8, #f2f6ef);
}

.sp-gallery__card-body {
	padding: 1rem 1.1rem 1.15rem;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	flex: 1;
}

.sp-gallery__card-date {
	font-size: 0.8rem;
	color: #6a7a68;
}

.sp-gallery__card-title {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.3;
}

.sp-gallery__card-title a {
	color: #1a2a14;
	text-decoration: none;
}

.sp-gallery__card-title a:hover,
.sp-gallery__card-title a:focus-visible {
	color: var(--sp-gal-accent);
}

.sp-gallery__card-count {
	margin: 0;
	font-size: 0.9rem;
	color: #5a6b7d;
}

.sp-gallery__card-cta {
	margin: 0.65rem 0 0;
}

/* Latest teaser */
.sp-gallery__latest-header {
	margin-bottom: 1.1rem;
}

.sp-gallery__label {
	margin: 0 0 0.35rem;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--sp-gal-accent);
}

.sp-gallery__latest-title {
	margin: 0;
	font-size: clamp(1.6rem, 2.5vw, 2.25rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	color: #142033;
	line-height: 1.15;
}

.sp-gallery__latest-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.15rem;
}

.sp-gallery__back {
	margin: 0 0 1rem;
}

.sp-gallery__back a {
	color: var(--sp-gal-accent);
	text-decoration: none;
	font-weight: 600;
}

.sp-gallery__back a:hover,
.sp-gallery__back a:focus-visible {
	text-decoration: underline;
}

.sp-gallery__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.65rem 1.15rem;
	border-radius: 999px;
	border: 1px solid var(--sp-gal-accent);
	background: var(--sp-gal-accent);
	color: #fff !important;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none !important;
	line-height: 1.2;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sp-gallery__btn:hover,
.sp-gallery__btn:focus-visible {
	background: #2c5e19;
	border-color: #2c5e19;
	color: #fff !important;
}

.sp-gallery__btn--ghost {
	background: transparent;
	color: var(--sp-gal-accent) !important;
}

.sp-gallery__btn--ghost:hover,
.sp-gallery__btn--ghost:focus-visible {
	background: var(--sp-gal-accent);
	color: #fff !important;
}

/* Lightbox */
.sp-lb {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(10, 16, 24, 0.92);
	padding: 1rem;
}

.sp-lb.is-open {
	display: flex;
}

.sp-lb__img {
	max-width: min(96vw, 1200px);
	max-height: 86vh;
	object-fit: contain;
	border-radius: 4px;
}

.sp-lb__btn {
	position: absolute;
	border: 0;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 999px;
	cursor: pointer;
	font-size: 1.4rem;
	line-height: 1;
}

.sp-lb__btn:hover,
.sp-lb__btn:focus-visible {
	background: rgba(255, 255, 255, 0.22);
	outline: 2px solid #9fe8d8;
}

.sp-lb__close {
	top: 1rem;
	right: 1rem;
}

.sp-lb__prev {
	left: 0.75rem;
	top: 50%;
	transform: translateY(-50%);
}

.sp-lb__next {
	right: 0.75rem;
	top: 50%;
	transform: translateY(-50%);
}

@media (max-width: 900px) {
	.sp-gallery__grid,
	.sp-gallery__cards {
		grid-template-columns: repeat(var(--sp-gal-cols-t), minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	.sp-gallery__grid,
	.sp-gallery__cards {
		grid-template-columns: repeat(var(--sp-gal-cols-m), minmax(0, 1fr));
	}

	.sp-lb__prev,
	.sp-lb__next {
		width: 2.4rem;
		height: 2.4rem;
	}
}
