/* ==========================================================================
   WTF Digest — grid + card styles for the [wtf_digest] shortcode
   FILE LOCATION: css/wtf-digest.css
   ========================================================================== */

.wtf-digest {
	margin: 20px 0 60px;
}

.wtf-digest-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 2rem;
}

.wtf-digest-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 6px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
	transition: box-shadow 0.15s ease;
}

.wtf-digest-card:hover {
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* The whole card is the link — no modal trigger to nest inside it. */
.wtf-digest-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
	color: inherit;
}

.wtf-digest-card__link:hover,
.wtf-digest-card__link:focus,
.wtf-digest-card__link:visited,
.wtf-digest-card__link:active {
	text-decoration: none;
	color: inherit;
}

.wtf-digest-card__link:focus-visible {
	outline: 3px solid #ffcc00;
	outline-offset: -3px;
}

/* --------------------------------------------------------------------------
   Poster image

   The weekly posters are always square (they double as the Instagram post),
   so no cropping decision is needed here — aspect-ratio 1/1 plus cover is
   effectively a no-op for them, and only guards against a stray non-square
   upload. Unlike the event cards, there's no fixed pixel height: the square
   ratio already keeps every row aligned.
   -------------------------------------------------------------------------- */

.wtf-digest-card__image {
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #f0f0f0;
}

.wtf-digest-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wtf-digest-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 20px;
	background: #ffcc00;
	color: #222;
	font-size: 1.2rem;
	font-weight: 700;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

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

.wtf-digest-card__body {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	padding: 1.25rem;
}

/* Yellow title bar, same treatment as the event cards. */
.wtf-digest-card__title {
	margin: -1.25rem -1.25rem 1rem -1.25rem;
	padding: 0.75rem 1.25rem;
	background: #ffcc00;
	color: #000;
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.3;
}

.wtf-digest-card:hover .wtf-digest-card__title {
	background: #e6b800;
}

.wtf-digest-card__date {
	margin: 0 0 0.9rem;
	color: #888;
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* Clamped so cards stay level regardless of excerpt length. Short excerpts
   leave a gap, which the auto margin on __more below absorbs. */
.wtf-digest-card__excerpt {
	margin: 0 0 1rem;
	color: #444;
	font-size: 0.95rem;
	line-height: 1.55;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.wtf-digest-card__more {
	align-self: flex-start;
	margin-top: auto;
	color: #a67c00;
	font-size: 0.85rem;
	font-weight: 600;
}

.wtf-digest-card__more::after {
	content: "\2192";
	margin-left: 6px;
}

.wtf-digest-card:hover .wtf-digest-card__more {
	text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Small screens — single column, and a little more room for the teaser
   since there's no neighbouring card to stay level with.
   -------------------------------------------------------------------------- */

@media (max-width: 480px) {

	.wtf-digest-grid {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.wtf-digest-card__excerpt {
		-webkit-line-clamp: 4;
		line-clamp: 4;
	}
}
