/* HELSOLA — Archive events (mobile-first) */

.site-main:has(> .helsola-archive),
#main.site-main:has(> .helsola-archive) {
	padding-top: 0;
	max-width: none;
}

.helsola-archive .helsola-container {
	width: 100%;
	max-width: var(--helsola-archive-max-width, 1410px);
	margin-inline: auto;
	padding-inline: 1.25rem;
}

.helsola-archive {
	padding-block: 0 3rem;
}

.helsola-archive__hero {
	margin-bottom: 1.5rem;
	padding-block: 2.5rem 2.5rem;
	background: linear-gradient(135deg, color-mix(in srgb, var(--helsola-primary) 8%, transparent), color-mix(in srgb, var(--helsola-secondary) 12%, transparent));
}

.helsola-archive__title {
	margin: 0 0 0.5rem;
	font-size: clamp(1.5rem, 4vw, 2.25rem);
	font-weight: 700;
	color: var(--helsola-primary);
	line-height: 1.2;
}

.helsola-archive__subtitle {
	margin: 0 0 1rem;
	max-width: 52rem;
	font-size: 0.9375rem;
	line-height: 1.5;
	color: #5a6472;
}

.helsola-archive__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
}

.helsola-filter-pill {
	display: inline-flex;
	align-items: center;
	padding: 0.2rem 0.55rem;
	border: 1px solid color-mix(in srgb, var(--helsola-primary) 20%, #ccc);
	border-radius: 999px;
	background: #fff;
	color: var(--helsola-primary);
	font-size: 0.6875rem;
	font-weight: 500;
	line-height: 1.3;
	text-decoration: none;
	transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.helsola-filter-pill:hover,
.helsola-filter-pill:focus-visible {
	border-color: var(--helsola-primary);
	background: color-mix(in srgb, var(--helsola-primary) 6%, #fff);
}

.helsola-filter-pill.is-active {
	border-color: var(--helsola-primary);
	background: var(--helsola-primary);
	color: #fff;
}

.helsola-events-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
}

@media (min-width: 600px) {
	.helsola-events-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 960px) {
	.helsola-events-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.helsola-events-grid__item {
	min-width: 0;
}

/* Event card */
.helsola-event-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	text-decoration: none;
	color: inherit;
	transition: transform 0.2s, box-shadow 0.2s;
}

.helsola-event-card:hover,
.helsola-event-card:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.helsola-event-card__media {
	position: relative;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #e8edf2;
}

.helsola-event-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.helsola-event-card__image--placeholder {
	background: linear-gradient(135deg, #d8e0e8, #eef2f6);
}

.helsola-event-card__badge {
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0.625rem;
	border-radius: 6px;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.2;
}

.helsola-event-card__badge--type {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	background: var(--helsola-primary);
	color: #fff;
}

.helsola-event-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 0.5rem;
	padding: 1rem;
}

.helsola-event-card__title {
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.35;
	color: var(--helsola-primary);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
}

.helsola-event-card__accreditation {
	margin: 0;
	font-size: 0.8125rem;
	line-height: 1.45;
	color: #5a6472;
}

.helsola-event-card__accreditation p {
	margin: 0;
}

.helsola-event-card__meta {
	display: flex;
	align-items: flex-start;
	gap: 0.375rem;
	margin: 0;
	font-size: 0.8125rem;
	color: var(--helsola-primary);
	line-height: 1.4;
}

.helsola-event-card__meta .helsola-icon {
	flex-shrink: 0;
	margin-top: 0.125rem;
	color: var(--helsola-primary);
}

.helsola-event-card__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	margin-top: auto;
	padding-top: 0.25rem;
}

.helsola-event-card__badge--completed {
	background: #e8edf2;
	color: #5a6472;
}

.helsola-event-card__badge--free {
	background: color-mix(in srgb, var(--helsola-secondary) 20%, #fff);
	color: var(--helsola-primary);
}

.helsola-archive__empty {
	padding: 3rem 1rem;
	text-align: center;
	color: #5a6472;
}

.helsola-archive__sentinel {
	height: 1px;
}

.helsola-archive__loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 1.5rem;
	color: #5a6472;
	font-size: 0.875rem;
}

.helsola-archive__loading[hidden] {
	display: none !important;
}

.helsola-archive__sentinel[hidden] {
	display: none !important;
}

.helsola-spinner {
	width: 1.25rem;
	height: 1.25rem;
	border: 2px solid #e8edf2;
	border-top-color: var(--helsola-primary);
	border-radius: 50%;
	animation: helsola-spin 0.7s linear infinite;
}

@keyframes helsola-spin {
	to { transform: rotate(360deg); }
}

.helsola-icon {
	display: inline-block;
	vertical-align: middle;
}
