/**
 * Cards Explore (inc/blocks-layout/cards-explore.php) — full-bleed row of
 * fixed-height (550px) photo cards, caption overlaid at the bottom with a
 * dark gradient for legibility. On hover the caption's background swaps to
 * solid gold (var(--goldHex)) and the caption text/arrow switch to black.
 * The gradient and gold layers are two stacked, opacity-crossfaded pseudo-
 * elements (a CSS gradient can't itself transition into a solid color), and
 * the caption/arrow get their own z-index so they always stay above both.
 *
 * "Cards Per Row" (2-5) sets --ce-cols-desktop / --ce-cols-tablet inline,
 * per row (see the PHP file) — 2 = 50% each, 3 = ~33%, 4 = 25%, 5 = 20%.
 * Steps down to at most 2 columns below 900px, and to a single stacked
 * column below 600px; a 2-up row never gets stretched wider than 2, even
 * above 900px, since --ce-cols-desktop can't exceed the configured value.
 */

.ce-grid {
	display: grid;
	grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 600px) {
	.ce-grid {
		grid-template-columns: repeat(var(--ce-cols-tablet, 2), 1fr);
	}
}

@media (min-width: 900px) {
	.ce-grid {
		grid-template-columns: repeat(var(--ce-cols-desktop, 3), 1fr);
	}
}

.ce-card {
	position: relative;
	height: 550px;
	overflow: hidden;
}

.ce-card-link {
	display: block;
	position: relative;
	width: 100%;
	height: 100%;
	text-decoration: none;
}

.ce-card-image {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ce-card-overlay {
	position: absolute;
	inset: auto 0 0 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content:center;
	gap: 1rem;
	padding: 1.5rem 1.5rem 1.5rem;
}

/* Gradient (default) and solid gold (hover) — layered, not blended, so the
   gold reads as a flat panel rather than a gold-tinted gradient. */
.ce-card-overlay::before,
.ce-card-overlay::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	transition: opacity 0.25s ease;
}

.ce-card-overlay::before {
	background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 100%);
	opacity: 1;
}

.ce-card-overlay::after {
	background: var(--goldHex);
	opacity: 0;
}

.ce-card-link:hover .ce-card-overlay::before {
	opacity: 0;
}

.ce-card-link:hover .ce-card-overlay::after {
	opacity: 1;
}

.ce-card-text {
	position: relative;
	z-index: 1;
	font-family: var(--font-primary);
	font-weight: var(--font-weight-regular);
	font-size: 1.5rem;
	color: #ffffff;
	transition: color 0.25s ease;
}

.ce-card-arrow {
	position: relative;
	z-index: 1;
	flex-shrink: 0;
	width: 28px;
	height: 28px;
	color: #ffffff;
	transition: color 0.25s ease, transform 0.2s ease;
}

.ce-card-link:hover .ce-card-text,
.ce-card-link:hover .ce-card-arrow {
	color: #000000;
}

.ce-card-link:hover .ce-card-arrow {
	transform: translateX(3px);
}