/* ==========================================================================
   Learning Forward – Event cards (The Events Calendar v2)
   Search bar / events-bar is untouched; only the event list is restyled.
   ========================================================================== */

:root {
	--lf-card-serif: Georgia, "Times New Roman", serif;
	--lf-card-sans: Helvetica;
	--lf-card-text: #1a1a1a;
	--lf-card-radius: 14px;
	--lf-card-gap: 48px;
	--lf-card-min: 300px;
}

/* ---------- Grid containers ---------- */

.tribe-events .tribe-events-calendar-list,
.tribe-events .tribe-events-calendar-latest-past {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(var(--lf-card-min), 1fr));
	gap: var(--lf-card-gap) 40px;
	align-items: stretch;
	margin: 0;
	padding: 0;
}

/* Month separators and the "Latest Past Events" heading span the full row */
.tribe-events .tribe-events-calendar-list__month-separator,
.tribe-events .tribe-events-calendar-latest-past__heading {
	grid-column: 1 / -1;
	margin: 0;
}

.tribe-events .tribe-events-calendar-list__month-separator + .lf-event-card-row {
	margin-top: 0;
}

.tribe-events .tribe-events-calendar-latest-past__heading {
	font-family: var(--lf-card-serif);
	font-weight: 700;
	color: var(--lf-card-text);
}

/* Reset TEC row spacing */
.tribe-events .lf-event-card-row {
	display: flex;
	margin: 0 !important;
	padding: 0 !important;
	min-width: 0;
}

/* ---------- Card ---------- */

.tribe-events .lf-event-card {
	--lf-accent: #0085CA;
	display: flex;
	flex-direction: column;
	width: 100%;
	background: #fff;
	border-radius: var(--lf-card-radius);
	overflow: hidden;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.06);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	color: var(--lf-card-text);
}

.tribe-events .lf-event-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1), 0 14px 32px rgba(0, 0, 0, 0.1);
}

/* Header band */
.tribe-events .lf-event-card__header {
	background: var(--lf-accent);
	color: #fff;
	padding: 26px 24px 22px;
}

.tribe-events .lf-event-card__label {
	display: block;
	font-family: var(--lf-card-sans);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	line-height: 1.3;
	margin-bottom: 10px;
}

.tribe-events .lf-event-card__date {
	display: block;
	font-family: var(--lf-card-serif);
	font-size: 18px;
	line-height: 1.3;
	color: #fff;
}

/* Body */
.tribe-events .lf-event-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 22px 22px 24px;
}

.tribe-events .lf-event-card__title {
	font-family: var(--lf-card-serif);
	font-size: 20px;
	font-weight: 400;
	line-height: 1.25;
	margin: 0 0 8px;
	padding: 0;
}

.tribe-events .lf-event-card__title a,
.tribe-events .lf-event-card__title a:visited {
	color: var(--lf-accent);
	text-decoration: none;
	border: 0;
	box-shadow: none;
}

.tribe-events .lf-event-card__title a:hover,
.tribe-events .lf-event-card__title a:focus {
	text-decoration: none;
	text-underline-offset: 3px;
}

.tribe-events .lf-event-card__excerpt {
	font-family: var(--lf-card-sans);
	font-size: 16px;
	line-height: 1.7;
	color: var(--lf-card-text);
	margin: 0 0 24px;
}

/* Footer */
.tribe-events .lf-event-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px 16px;
	margin-top: auto;
}

.tribe-events .lf-event-card__cta,
.tribe-events .lf-event-card__cta:visited {
	font-family: var(--lf-card-sans);
	font-size: 14px;
	font-weight: 700;
	color: var(--lf-accent);
	text-decoration: none;
	border: 0;
	box-shadow: none;
	white-space: nowrap;
}

.tribe-events .lf-event-card__cta:hover,
.tribe-events .lf-event-card__cta:focus {
	text-decoration: none;
	text-underline-offset: 3px;
}

.tribe-events .lf-event-card__arrow {
	display: inline-block;
	margin-left: 4px;
	transition: transform 0.2s ease;
}

.tribe-events .lf-event-card__cta:hover .lf-event-card__arrow {
	transform: translateX(3px);
}

.tribe-events .lf-event-card__meta {
	font-family: var(--lf-card-sans);
	font-size: 15px;
	color: var(--lf-card-text);
	text-align: right;
}

/* Past events: slightly muted */
.tribe-events .lf-event-card--past {
	opacity: 0.92;
}

/* ---------- Responsive ---------- */

@media (max-width: 767px) {
	:root {
		--lf-card-gap: 28px;
		--lf-card-min: 100%;
	}

	.tribe-events .lf-event-card__date { font-size: 20px; }
	.tribe-events .lf-event-card__title { font-size: 22px; }
	.tribe-events .lf-event-card__excerpt { font-size: 16px; }
	.tribe-events .lf-event-card__meta { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
	.tribe-events .lf-event-card,
	.tribe-events .lf-event-card__arrow { transition: none; }
	.tribe-events .lf-event-card:hover { transform: none; }
}


/* Cycle accent colours: blue → green → orange, repeating */
.tribe-events .lf-event-card-row:nth-child(3n+1 of .lf-event-card-row) .lf-event-card {
	--lf-accent: #0085CA !important;
}

.tribe-events .lf-event-card-row:nth-child(3n+2 of .lf-event-card-row) .lf-event-card {
	--lf-accent: #21B33B !important;
}

.tribe-events .lf-event-card-row:nth-child(3n+3 of .lf-event-card-row) .lf-event-card {
	--lf-accent: #F99D13 !important;
}