/* Stingrays News Grid
 * Change the look by overriding these variables on .sng in your own CSS
 * (Breakdance: Global Settings → Custom CSS).
 */
.sng {
	--sng-accent: #000;
	--sng-accent-contrast: #fff;
	--sng-border: color-mix(in srgb, currentColor 20%, transparent);
	--sng-placeholder: color-mix(in srgb, currentColor 8%, transparent);
	--sng-radius: 6px;
	--sng-gap: clamp(20px, 3vw, 40px);
	--sng-columns: 3;
	width: 100%;
}

@media (max-width: 1024px) { .sng { --sng-columns: 2; } }
@media (max-width: 640px)  { .sng { --sng-columns: 1; } }

/* Filter */
.sng .sng__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 clamp(24px, 4vw, 40px);
}

.sng .sng__filter {
	appearance: none;
	margin: 0;
	padding: 0.55em 1.15em;
	font: inherit;
	font-size: 0.9375rem;
	line-height: 1.2;
	color: inherit;
	background: transparent;
	border: 1px solid var(--sng-border);
	border-radius: 999px;
	cursor: pointer;
	transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}

.sng .sng__filter:hover { border-color: currentColor; }

.sng .sng__filter.is-active {
	color: var(--sng-accent-contrast);
	background: var(--sng-accent);
	border-color: var(--sng-accent);
}

/* Grid */
.sng .sng__grid {
	display: grid;
	grid-template-columns: repeat(var(--sng-columns), minmax(0, 1fr));
	gap: var(--sng-gap);
	transition: opacity 0.2s;
}

.sng.is-loading .sng__grid { opacity: 0.5; }

/* Card */
.sng-card { margin: 0; min-width: 0; }

.sng-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.sng .sng-card__media {
	aspect-ratio: 16 / 10;
	margin: 0 0 16px;
	overflow: hidden;
	border-radius: var(--sng-radius);
	background: var(--sng-placeholder);
}

.sng .sng-card__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
}

.sng-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
}

.sng-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
	margin-bottom: 8px;
	font-size: 0.875rem;
	opacity: 0.7;
}

.sng .sng-card__title {
	margin: 0 0 8px;
	font-size: 1.25rem;
	line-height: 1.3;
	color: inherit;
}

.sng-card__link:hover .sng-card__title {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.sng-card__excerpt {
	margin: 0 0 14px;
	line-height: 1.55;
	opacity: 0.85;
}

.sng-card__readmore {
	margin-top: auto;
	font-size: 0.9375rem;
	font-weight: 600;
}

/* Load more */
.sng .sng__more-wrap {
	display: flex;
	justify-content: center;
	margin-top: clamp(32px, 5vw, 56px);
}

.sng .sng__more {
	appearance: none;
	margin: 0;
	padding: 0.9em 2.2em;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	color: var(--sng-accent-contrast);
	background: var(--sng-accent);
	border: 1px solid var(--sng-accent);
	border-radius: 999px;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s;
}

.sng .sng__more:hover {
	color: var(--sng-accent);
	background: transparent;
}

.sng .sng__more:disabled { cursor: progress; opacity: 0.7; }

/* States */
.sng .sng__empty,
.sng .sng__error {
	margin: 24px 0 0;
	text-align: center;
}

.sng [hidden] { display: none !important; }

.sng .sng__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* Focus */
.sng .sng__filter:focus-visible,
.sng .sng__more:focus-visible,
.sng .sng-card__link:focus-visible {
	outline: 2px solid var(--sng-accent);
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	.sng .sng__grid,
	.sng .sng__filter,
	.sng .sng__more { transition: none; }
}
