/**
 * Events Block — homepage section
 *
 * Photo-background cards with smart 3-tier fallback.
 * Sourced by [gc_events_block] shortcode from gc_event post type.
 *
 * Enqueued in inc/enqueue.php TIER 2A homepage block.
 *
 * Class architecture (all prefixed .gc-eb-):
 *   .gc-eb-wrap          → outer section
 *   .gc-eb-header        → title + view-all link row
 *   .gc-eb-grid          → 3-up grid
 *   .gc-eb-card          → card link (modifier --photo-logo / --photo / --fallback)
 *     .gc-eb-card-bg     → background image + dark veil
 *     .gc-eb-card-fallback → no-image variant (navy gradient + brand initials)
 *     .gc-eb-card-top    → date pill + logo overlay
 *     .gc-eb-card-body   → type badge + title + meta + CTA
 *
 * No JS dependency. Pure CSS hover states. Aspect-ratio 4/5.
 */

.gc-eb-wrap {
	margin: 24px 0;
}

.gc-eb-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
	gap: 12px;
	flex-wrap: wrap;
}

/* Matches Case Studies / Premium Connections — separator under heading on home */
body.home .gc-eb-header {
	border-bottom: 1px solid var(--gc-border, #E4EAF2);
	padding-bottom: 16px;
	margin-bottom: 28px;
}

.gc-eb-title {
	font-family: var(--gc-font-display, 'Sora', system-ui, sans-serif);
	font-size: 22px;
	font-weight: 700;
	color: var(--gc-navy, #0D1B3E);
	letter-spacing: -0.4px;
	margin: 0;
}

.gc-eb-viewall {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 700;
	color: var(--gc-primary, #00C6AE);
	text-decoration: none;
	background: transparent;
	border: none;
	padding: 0;
	white-space: nowrap;
	flex-shrink: 0;
}

.gc-eb-viewall svg {
	transition: transform 0.2s ease;
}

.gc-eb-viewall:hover svg {
	transform: translateX(6px);
}

.gc-eb-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}


/* ──────────────────────────────────────────────────────────
   CARD — base
   ────────────────────────────────────────────────────────── */
.gc-eb-card {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	aspect-ratio: 1 / 1;
	min-height: 240px;
	padding: 16px;
	border-radius: 12px;
	background: var(--gc-navy, #0D1B3E);
	color: #fff;
	text-decoration: none;
	overflow: hidden;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	isolation: isolate;
}

.gc-eb-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 36px rgba(13, 27, 62, 0.18);
}


/* ──────────────────────────────────────────────────────────
   CARD — photo background (modes: --photo-logo, --photo)
   ────────────────────────────────────────────────────────── */
.gc-eb-card-bg {
	position: absolute;
	inset: 0;
	z-index: -1;
}

.gc-eb-card-bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.gc-eb-card-veil {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgba(13, 27, 62, 0.30) 0%,
		rgba(13, 27, 62, 0.65) 55%,
		rgba(13, 27, 62, 0.95) 100%
	);
}


/* ──────────────────────────────────────────────────────────
   CARD — fallback (no Featured Image)
   Navy gradient + teal accent stripe + huge brand initials
   ────────────────────────────────────────────────────────── */
.gc-eb-card--fallback {
	background: var(--gc-navy, #0D1B3E);
}

.gc-eb-card-fallback {
	position: absolute;
	inset: 0;
	z-index: -1;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.gc-eb-card-fallback-text {
	font-family: var(--gc-font-display, 'Sora', system-ui, sans-serif);
	font-size: 110px;
	font-weight: 800;
	letter-spacing: -3px;
	color: rgba(0, 198, 174, 0.18);
	line-height: 1;
	user-select: none;
}

.gc-eb-card-fallback-stripe {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: var(--cat-curr, #00C6AE);
}


/* ──────────────────────────────────────────────────────────
   CARD TOP — date pill + logo overlay
   ────────────────────────────────────────────────────────── */
.gc-eb-card-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
	position: relative;
	z-index: 1;
}

.gc-eb-card-date {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	color: #fff;
}

.gc-eb-card-date-eyebrow {
	font-size: 11px;
	font-weight: 700;
	color: #9FE1CB;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	line-height: 1;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.gc-eb-card-date-day {
	display: flex;
	align-items: baseline;
	gap: 4px;
}

.gc-eb-card-date-num {
	font-family: var(--gc-font-display, 'Sora', system-ui, sans-serif);
	font-size: 38px;
	font-weight: 700;
	line-height: 0.95;
	letter-spacing: -1.5px;
}

.gc-eb-card-date-range {
	font-size: 18px;
	font-weight: 500;
	opacity: 0.7;
}

/* Cross-month / cross-year fallback ("May 30 - Jun 5") */
.gc-eb-card-date-text {
	font-family: var(--gc-font-display, 'Sora', system-ui, sans-serif);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.5px;
	color: #fff;
}

.gc-eb-card-logo {
	width: 56px;
	height: 56px;
	background: #fff;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	overflow: hidden;
	padding: 7px;
}

.gc-eb-card-logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}


/* ──────────────────────────────────────────────────────────
   CARD BODY — type badge + title + meta + CTA
   ────────────────────────────────────────────────────────── */
.gc-eb-card-body {
	position: relative;
	z-index: 1;
}

.gc-eb-card-type {
	display: inline-block;
	padding: 2px 8px;
	background: rgba(0, 198, 174, 0.20);
	border: 0.5px solid rgba(0, 198, 174, 0.40);
	color: var(--cat-curr, #00C6AE);
	font-size: 9px;
	font-weight: 700;
	border-radius: 4px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	margin-bottom: 10px;
}

.gc-eb-card-title {
	font-family: var(--gc-font-display, 'Sora', system-ui, sans-serif);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.3px;
	margin-bottom: 6px;
	color: #fff;
}

.gc-eb-card-meta {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.85);
	margin-bottom: 14px;
	flex-wrap: wrap;
}

.gc-eb-card-flag {
	font-size: 12px;
	margin-right: 2px;
}

.gc-eb-card-dot {
	color: rgba(255, 255, 255, 0.5);
	margin: 0 2px;
}

.gc-eb-card-duration {
	color: rgba(255, 255, 255, 0.75);
}

.gc-eb-card-cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 22px;
	background: var(--gc-primary, #00C6AE);
	color: var(--gc-text-inverse, #fff);
	border-radius: 8px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: -0.1px;
	transition: background 0.15s;
}

.gc-eb-card-cta:hover,
.gc-eb-card:hover .gc-eb-card-cta {
	background: var(--gc-primary-dark, #00A894);
}

.gc-eb-card-cta svg {
	margin-left: 1px;
}


/* ──────────────────────────────────────────────────────────
   Responsive
   ────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
	.gc-eb-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.gc-eb-grid {
		grid-template-columns: 1fr;
	}
	.gc-eb-card {
		min-height: 280px;
	}
	.gc-eb-card-logo {
		width: 48px;
		height: 48px;
		padding: 6px;
	}
	.gc-eb-card-title {
		font-size: 16px;
	}
}


/* ──────────────────────────────────────────────────────────
   Dark mode adjustments
   ────────────────────────────────────────────────────────── */
[data-theme="dark"] .gc-eb-title {
	color: var(--gc-text, #E2E8F0);
}
/* ── Dark mode ──
   Event cards are an intentionally dark navy design with white text. In
   dark the navy var flips light, so pin the cards to a fixed dark navy.
   Logo plate stays light (brand wall). */
[data-theme="dark"] .gc-eb-card,
[data-theme="dark"] .gc-eb-card--fallback {
	background: #0D1B3E;
}
[data-theme="dark"] .gc-eb-card-logo {
	background: #fff;
}

/* ── Dark mode: "View event" teal button needs white text ── */
[data-theme="dark"] .gc-eb-card-cta {
	color: #ffffff;
}