/* wp-content/plugins/ceca-widgets/widgets/event-materials/event-materials.css */
/* Event Materials (Figma 92:473 "Key Materials"): member-only card grid on
   the single-event template. White bordered cards — 25/30 Bold title,
   "{type} — {date}" 16px grey line, thumbnail below (with a play badge for
   Vimeo videos); the meta line pins above the image, and to the card foot
   on imageless cards, matching the design's mixed cards. */

.ceca-em {
	margin-top: 50px;
}

.ceca-em .ceca-em__heading {
	margin: 0 0 20px;
	font-size: 30px;
	line-height: 40px;
	font-weight: 700;
	color: #000;
}

.ceca-em__grid {
	--ceca-em-cols: 4;

	display: grid;
	grid-template-columns: repeat(var(--ceca-em-cols), minmax(0, 1fr));
	gap: 24px;
}

/* Double specificity + explicit states so theme/kit link globals cannot
   repaint the cards. */
.ceca-em a.ceca-em__card,
.ceca-em a.ceca-em__card:hover,
.ceca-em a.ceca-em__card:focus {
	display: flex;
	flex-direction: column;
	min-height: 380px;
	border: 1px solid #e0e0e0;
	background: #fff;
	padding: 20px 20px 0;
	color: #000;
	text-decoration: none;
}

.ceca-em a.ceca-em__card:hover .ceca-em__title,
.ceca-em a.ceca-em__card:focus .ceca-em__title {
	text-decoration: underline;
}

.ceca-em .ceca-em__title {
	font-size: 25px;
	line-height: 30px;
	font-weight: 700;
}

.ceca-em .ceca-em__meta {
	margin-top: auto;
	padding: 20px 0;
	font-size: 16px;
	line-height: 20px;
	color: #7e7e7e;
}

.ceca-em__media {
	position: relative;
	display: block;
	margin: 0 -20px;
	aspect-ratio: 306 / 204;
	overflow: hidden;
}

.ceca-em__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ceca-em__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: rgba(26, 26, 26, 0.85);
	color: #fff;
}

.ceca-em__play svg {
	width: 24px;
	height: 24px;
	margin-left: 3px;
}

/* Cards without an image keep the border box; the meta line sits at the
   foot with its bottom padding restored. */
.ceca-em a.ceca-em__card:not(:has(.ceca-em__media)),
.ceca-em a.ceca-em__card:not(:has(.ceca-em__media)):hover,
.ceca-em a.ceca-em__card:not(:has(.ceca-em__media)):focus {
	padding-bottom: 0;
}

.ceca-em__empty {
	padding: 24px;
	background: #f7f7f7;
	border: 1px dashed #c4c4c4;
	border-radius: 8px;
	font-size: 14px;
	color: #666;
}

@media (max-width: 1024px) {
	.ceca-em__grid {
		--ceca-em-cols: 2;
	}
}

@media (max-width: 767px) {
	.ceca-em__grid {
		--ceca-em-cols: 1;
	}

	.ceca-em a.ceca-em__card,
	.ceca-em a.ceca-em__card:hover,
	.ceca-em a.ceca-em__card:focus {
		min-height: 0;
	}

	.ceca-em .ceca-em__meta {
		padding-top: 30px;
	}
}

/* --- mobile design pass (Figma 2372:9636): horizontal card scroller ------- */
@media (max-width: 767px) {
	.ceca-em__grid {
		display: flex;
		gap: 24px;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x proximity;
		scrollbar-width: none;
		margin-right: -20px;
		padding-right: 20px;
	}

	.ceca-em__grid::-webkit-scrollbar {
		display: none;
	}

	.ceca-em__grid > * {
		flex: 0 0 306px;
		scroll-snap-align: start;
	}
}
