/* ABOUTME: Styles for the event hero layout and image carousel on single event pages. */
/* ABOUTME: Handles hero card, carousel with blurred bg + contained foreground, dots overlay, and responsive stacking. */

/* ── Hero Container ── */

.mc-event-hero {
	max-width: var(--wp--style--global--wide-size, 1200px);
	margin: 0 auto;
	padding: 2rem 2rem 3rem;
}

.mc-event-hero-back {
	font-size: 0.9rem;
	margin: 0 0 1.25rem;
}

.mc-event-hero-back a {
	color: var(--wp--preset--color--primary, #2B678C);
	text-decoration: none;
}

.mc-event-hero-back a:hover {
	text-decoration: underline;
}

/* ── Side-by-side Row ── */

.mc-event-hero-row {
	display: grid;
	grid-template-columns: 45% 1fr;
	gap: 2.5rem;
	align-items: start;
}

/* ── Info Card ── */

.mc-event-hero-card {
	background-color: var(--wp--preset--color--surface, #F5F3EF);
	border-radius: 12px;
	padding: 2rem;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.mc-event-hero-title {
	font-size: clamp(1.75rem, 3vw, 2.5rem);
	line-height: 1.2;
	margin: 0 0 1rem;
	color: var(--wp--preset--color--contrast, #333333);
}

.mc-event-hero-terms {
	font-size: 0.9rem;
	margin-bottom: 1rem;
}

.mc-event-hero-terms a {
	color: var(--wp--preset--color--secondary, #265D73);
	text-decoration: none;
}

.mc-event-hero-terms a:hover {
	text-decoration: underline;
}

.mc-event-hero-card .mc-event-details {
	margin-bottom: 1rem;
}

.mc-event-hero-excerpt {
	margin-top: 0.5rem;
	color: var(--wp--preset--color--contrast, #333333);
	font-size: 1rem;
	line-height: 1.6;
}

.mc-event-hero-excerpt p {
	margin: 0;
}

/* ── Carousel ── */

.mc-event-hero-media {
	min-width: 0;
}

.mc-event-hero-media .mc-event-carousel {
	width: 100%;
}

.mc-event-carousel {
	position: relative;
	max-width: 100%;
}

.mc-event-carousel-track {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 3;
	background-color: #333;
	border-radius: 12px;
	overflow: hidden;
}

/* Blurred background image — fills the 16:9 area, muted + blurred */
.mc-event-carousel-slide {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	transition: opacity 0.5s ease;
}

.mc-event-carousel-slide.active {
	opacity: 1;
}

.mc-carousel-bg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	filter: blur(20px) saturate(0.5) brightness(0.7);
	transform: scale(1.1);
}

/* Foreground image — original aspect ratio, centered, not cropped */
.mc-carousel-fg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	z-index: 1;
}

/* ── Carousel Controls ── */

.mc-event-carousel-prev,
.mc-event-carousel-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.8);
	border: none;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #333;
	transition: background-color 0.2s;
	z-index: 2;
}

.mc-event-carousel-prev:hover,
.mc-event-carousel-next:hover {
	background-color: rgba(255, 255, 255, 1);
}

.mc-event-carousel-prev {
	left: 0.75rem;
}

.mc-event-carousel-next {
	right: 0.75rem;
}

/* Dots overlaid on the carousel image */
.mc-event-carousel-dots {
	position: absolute;
	bottom: 1rem;
	left: 0;
	right: 0;
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	z-index: 2;
}

.mc-event-carousel-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: none;
	background-color: rgba(255, 255, 255, 0.5);
	cursor: pointer;
	padding: 0;
	transition: background-color 0.2s;
}

.mc-event-carousel-dot.active {
	background-color: #fff;
}

.mc-event-carousel-dot:hover {
	background-color: rgba(255, 255, 255, 0.8);
}

/* ── Default image copper overlay ── */

.mc-event-carousel.mc-default-image .mc-event-carousel-track::after {
	content: '';
	position: absolute;
	inset: 0;
	background-color: rgba(191, 132, 59, 0.6);
	mix-blend-mode: multiply;
	border-radius: 12px;
	pointer-events: none;
	z-index: 1;
}

/* ── Responsive ── */

@media (max-width: 782px) {
	.mc-event-hero {
		padding: 1.5rem 0 2rem;
	}

	.mc-event-hero-back {
		padding-left: 1.25rem;
		padding-right: 1.25rem;
	}

	.mc-event-hero-row {
		display: flex;
		flex-direction: column;
		gap: 1.5rem;
	}

	.mc-event-hero-media {
		order: -1;
		width: 100%;
	}

	.mc-event-hero-media .mc-event-carousel,
	.mc-event-hero-media .mc-event-carousel-track {
		width: 100%;
	}

	.mc-event-hero-card {
		margin-left: 1.25rem;
		margin-right: 1.25rem;
		padding: 1.5rem;
	}

	.mc-event-carousel-track {
		border-radius: 0;
	}

	.mc-event-carousel-prev,
	.mc-event-carousel-next {
		width: 32px;
		height: 32px;
		font-size: 1.2rem;
	}
}
