/*
 * [ct_events_section] — minimal base layout.
 * Only structure (map left, cards right, map height, highlight). Visual design belongs in style.css,
 * which loads after this file, so any rule here can be overridden there.
 */

/* Tabs */
.ct-events__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 24px;
}
.ct-events__tab {
	cursor: pointer;
}

/* Layout: map left, cards right */
.ct-events__layout {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	gap: 32px;
	align-items: start;
}
.ct-events__map-col {
	position: sticky;
	top: 32px;
}

/* Leaflet needs an explicit height, otherwise the map is invisible */
#ct-leaflet-map,
.ct-events__map {
	width: 100%;
	height: 520px;
	border-radius: 16px;
	overflow: hidden;
	z-index: 0; /* keep Leaflet panes below sticky headers / menus */
}

/* Card list */
.ct-lista {
	list-style: none;
	margin: 0;
	padding: 0;
}
.ct-card.has-location {
	cursor: pointer;
}
.ct-card {
	transition: box-shadow .2s ease, outline-color .2s ease;
	outline: 3px solid transparent;
	outline-offset: 2px;
}
.ct-card.is-active {
	outline-color: #0b2a8f;
}
.ct-card:focus-visible {
	outline-color: #0b2a8f;
}

/* Active pin */
.ct-events-marker.is-active {
	filter: drop-shadow(0 0 6px rgba(11, 42, 143, .8));
}

/* Popup */
.ct-events-popup__title,
.ct-events-popup__date,
.ct-events-popup__venue {
	display: block;
}

/* Mobile: map on top, cards below */
@media (max-width: 767px) {
	.ct-events__layout {
		grid-template-columns: 1fr;
	}
	.ct-events__map-col {
		position: relative;
		top: auto;
	}
	#ct-leaflet-map,
	.ct-events__map {
		height: 320px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ct-card {
		transition: none;
	}
}
