/* DCMSAF Upcoming Events – colors fall back to Astra's global palette so the section follows the theme. */
.dcm-events {
	--dcm-accent: var(--ast-global-color-0, #1f4e79);
	--dcm-heading: var(--ast-global-color-2, #1b1f24);
	--dcm-text: var(--ast-global-color-3, #4a5058);
	--dcm-surface: var(--ast-global-color-5, #ffffff);
	--dcm-muted-bg: var(--ast-global-color-4, #f3f1ec);
	--dcm-border: rgba(0, 0, 0, 0.08);
	--dcm-radius: 10px;

	display: grid;
	gap: 24px;
	color: var(--dcm-text);
}

.dcm-events--grid {
	grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}

/* Card */
.dcm-event {
	display: grid;
	grid-template-columns: 1fr;
	grid-template-rows: auto 1fr;
	background: var(--dcm-surface);
	border: 1px solid var(--dcm-border);
	border-radius: var(--dcm-radius);
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.dcm-event:hover {
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}
.dcm-event.is-featured {
	border-color: var(--dcm-accent);
	box-shadow: 0 0 0 1px var(--dcm-accent);
}

@media (min-width: 768px) {
	.dcm-events--list .dcm-event {
		grid-template-columns: minmax(240px, 34%) 1fr;
		grid-template-rows: auto;
	}
}

/* Image + date badge */
.dcm-event__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	background: var(--dcm-muted-bg);
	overflow: hidden;
	text-decoration: none;
}
@media (min-width: 768px) {
	.dcm-events--list .dcm-event__media {
		aspect-ratio: auto;
		min-height: 220px;
	}
}
.dcm-event__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}
.dcm-event:hover .dcm-event__media img {
	transform: scale(1.04);
}

.dcm-event__date {
	position: absolute;
	top: 16px;
	left: 16px;
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 64px;
	padding: 8px 10px;
	background: var(--dcm-surface);
	border-radius: 8px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
	color: var(--dcm-heading);
	line-height: 1;
	text-align: center;
}
.dcm-event__mon,
.dcm-event__dow {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.dcm-event__mon { color: var(--dcm-accent); }
.dcm-event__day {
	margin: 4px 0;
	font-size: 30px;
	font-weight: 700;
}
.dcm-event__dow { opacity: 0.6; }

/* No featured image: large centered date tile in the accent color */
.dcm-event.no-image .dcm-event__media {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 180px;
	background: var(--dcm-accent);
}
.dcm-event.no-image .dcm-event__date {
	position: static;
	background: transparent;
	box-shadow: none;
	color: #fff;
}
.dcm-event.no-image .dcm-event__mon { color: #fff; font-size: 15px; }
.dcm-event.no-image .dcm-event__day { font-size: 56px; margin: 6px 0; }

/* Body */
.dcm-event__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	padding: 24px 26px;
}
.dcm-event__badge {
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--dcm-accent);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.dcm-event__when {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--dcm-accent);
}
.dcm-events .dcm-event__title {
	margin: 0;
	font-size: clamp(20px, 2.2vw, 24px);
	line-height: 1.25;
}
.dcm-event__title a {
	color: var(--dcm-heading);
	text-decoration: none;
}
.dcm-event__title a:hover { color: var(--dcm-accent); }
.dcm-event__excerpt {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
}

.dcm-event__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
	margin: 4px 0 0;
	padding: 0;
	list-style: none;
	font-size: 14px;
}
.dcm-event__meta li {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	margin: 0;
}
.dcm-event__meta svg {
	flex: none;
	width: 18px;
	height: 18px;
	margin-top: 1px;
	color: var(--dcm-accent);
}
.dcm-event__map {
	margin-left: 4px;
	font-weight: 600;
	color: var(--dcm-accent);
}

.dcm-event__more {
	margin-top: auto;
	padding-top: 6px;
	font-weight: 600;
	color: var(--dcm-accent);
	text-decoration: none;
}
.dcm-event__more:hover { text-decoration: underline; }

/* Footer link + empty state */
.dcm-events__all {
	grid-column: 1 / -1;
	margin: 8px 0 0;
	text-align: center;
}
.dcm-events__button {
	display: inline-block;
	padding: 12px 28px;
	border: 2px solid var(--dcm-accent);
	border-radius: 999px;
	color: var(--dcm-accent);
	font-weight: 600;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}
.dcm-events__button:hover {
	background: var(--dcm-accent);
	color: #fff;
}
.dcm-events__empty {
	grid-column: 1 / -1;
	margin: 0;
	padding: 32px;
	background: var(--dcm-muted-bg);
	border-radius: var(--dcm-radius);
	text-align: center;
}

@media (prefers-reduced-motion: reduce) {
	.dcm-event,
	.dcm-event__media img { transition: none; }
	.dcm-event:hover,
	.dcm-event:hover .dcm-event__media img { transform: none; }
}
