/* ==========================================================================
   Webinar Custom Modules — Flip Cards + Crystal Ball Countdown
   Color palette: #221f54 (navy) | #7259ef (purple) | #d5dcef (light blue)
                  #a88f4d (gold)  | #ffffff (white)
   ========================================================================== */

/* ─── Shared ─────────────────────────────────────────────────────────────── */

.wcm-flip-cards-section,
.wcm-crystal-ball-section {
	position: relative;
	overflow: hidden;
	padding: 80px 0;
}

.wcm-section-heading {
	color: #a88f4d;
	font-size: clamp(1.5rem, 3vw, 2.2rem);
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.15em;
	margin: 0 0 56px;
	font-weight: 700;
}

/* Stars shared between both sections */
.wcm-stars-bg {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 0;
}

.wcm-star {
	position: absolute;
	background: #ffffff;
	border-radius: 50%;
	width: var(--size, 2px);
	height: var(--size, 2px);
	opacity: 0;
	animation: wcm-twinkle 3s ease-in-out infinite;
	animation-delay: var(--delay, 0ms);
}

@keyframes wcm-twinkle {
	0%,  100% { opacity: 0; }
	50%       { opacity: 0.75; }
}

/* Ensure module content sits above stars */
.wcm-flip-cards-section > .container,
.wcm-crystal-ball-section > .container {
	position: relative;
	z-index: 1;
}


/* ==========================================================================
   FLIP CARDS SECTION
   ========================================================================== */

.wcm-flip-cards-section {
	background: linear-gradient(to bottom, #181541 0%, #221E54 100%);
}

/* ─── Grid ───────────────────────────────────────────────────────────────── */

.wcm-flip-cards-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 28px;
	justify-content: center;
}

/* ─── Card container ─────────────────────────────────────────────────────── */

.wcm-flip-card {
	width: 240px;
	height: 360px;
	perspective: 1200px;
	cursor: pointer;
	outline: none;
}

.wcm-flip-card-inner {
	position: relative;
	width: 100%;
	height: 100%;
	transition: transform 0.75s cubic-bezier(0.4, 0.2, 0.2, 1);
	transform-style: preserve-3d;
}

/* Hover / keyboard / JS-toggled flip */
.wcm-flip-card:hover       .wcm-flip-card-inner,
.wcm-flip-card:focus       .wcm-flip-card-inner,
.wcm-flip-card.wcm-flipped .wcm-flip-card-inner {
	transform: rotateY(180deg);
}

/* ─── Shared face styles ─────────────────────────────────────────────────── */

.wcm-flip-card-front,
.wcm-flip-card-back {
	position: absolute;
	width: 100%;
	height: 100%;
	border-radius: 10px;
	overflow: hidden;
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
}

/* ─── Front face ─────────────────────────────────────────────────────────── */

.wcm-flip-card-front {
	background: #1a1840;
	border: 2px solid #a88f4d;
	box-shadow:
		0 0 18px rgba(168, 143, 77, 0.25),
		0 6px 28px rgba(0, 0, 0, 0.5);
}

.wcm-flip-card-front img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wcm-flip-card-front-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(145deg, #221f54, #7259ef 60%, #16133d);
}

.wcm-flip-card-front-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 20px 12px 14px;
	background: linear-gradient(to top, rgba(22, 19, 61, 0.92) 0%, transparent 100%);
	display: flex;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.wcm-flip-card:hover .wcm-flip-card-front-overlay,
.wcm-flip-card:focus .wcm-flip-card-front-overlay {
	opacity: 1;
}

.wcm-flip-hint {
	color: #d5dcef;
	font-size: 0.7rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	font-weight: 600;
}

/* ─── Back face ──────────────────────────────────────────────────────────── */

.wcm-flip-card-back {
	background: linear-gradient(155deg, #221f54 0%, #1a1840 100%);
	border: 2px solid #a88f4d;
	box-shadow:
		0 0 24px rgba(114, 89, 239, 0.35),
		0 6px 28px rgba(0, 0, 0, 0.5);
	transform: rotateY(180deg);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px 18px;
}

/* Subtle corner ornaments on back */
.wcm-flip-card-back::before,
.wcm-flip-card-back::after {
	content: '';
	position: absolute;
	width: 28px;
	height: 28px;
	border-color: rgba(168, 143, 77, 0.5);
	border-style: solid;
}
.wcm-flip-card-back::before {
	top: 8px;
	left: 8px;
	border-width: 1px 0 0 1px;
}
.wcm-flip-card-back::after {
	bottom: 8px;
	right: 8px;
	border-width: 0 1px 1px 0;
}

.wcm-flip-card-back-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	height: 100%;
	justify-content: space-between;
	gap: 10px;
}

/* Ornament row (decorative line + symbol) */
.wcm-card-ornament {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
	width: 100%;
	justify-content: center;
}

.wcm-card-ornament::before,
.wcm-card-ornament::after {
	content: '';
	flex: 1;
	height: 1px;
	background: linear-gradient(to right, transparent, rgba(168, 143, 77, 0.6), transparent);
	max-width: 48px;
}

.wcm-card-ornament-top::before  { background: linear-gradient(to right, transparent, rgba(168, 143, 77, 0.6)); }
.wcm-card-ornament-top::after   { background: linear-gradient(to left,  transparent, rgba(168, 143, 77, 0.6)); }
.wcm-card-ornament-bottom::before { background: linear-gradient(to right, transparent, rgba(168, 143, 77, 0.6)); }
.wcm-card-ornament-bottom::after  { background: linear-gradient(to left,  transparent, rgba(168, 143, 77, 0.6)); }

.wcm-card-ornament-top::before,
.wcm-card-ornament-bottom::before {
	/* rendered via :before/:after above — suppress default content */
}

/* Star symbol in ornament center */
.wcm-card-ornament-top,
.wcm-card-ornament-bottom {
	color: #a88f4d;
	font-size: 12px;
}
.wcm-card-ornament-top::before   { content: ''; }
.wcm-card-ornament-top::after    { content: ''; }
.wcm-card-ornament-bottom::before { content: ''; }
.wcm-card-ornament-bottom::after  { content: ''; }
/* The star symbol is the element's text (empty, but pseudo-element can't overlay text) */
/* Using box model instead: */
.wcm-card-ornament-top,
.wcm-card-ornament-bottom {
	position: relative;
}

/* Simpler: just use the element for the center diamond */
.wcm-card-ornament::before,
.wcm-card-ornament::after {
	content: '';
	display: block;
	flex: 1;
	max-width: 50px;
	height: 1px;
	background: rgba(168, 143, 77, 0.5);
}
/* Override individual sides */
.wcm-card-ornament-top::before,
.wcm-card-ornament-top::after,
.wcm-card-ornament-bottom::before,
.wcm-card-ornament-bottom::after {
	/* keep defaults */
}

.wcm-card-diamond {
	color: #a88f4d;
	font-size: 10px;
	opacity: 0.8;
	flex-shrink: 0;
}

.wcm-card-back-title {
	color: #a88f4d;
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	margin: 0;
	flex-shrink: 0;
	line-height: 1.3;
}

.wcm-card-divider {
	width: 52px;
	height: 1px;
	background: linear-gradient(to right, transparent, rgba(168, 143, 77, 0.7), transparent);
	flex-shrink: 0;
}

.wcm-card-back-text {
	color: #d5dcef;
	font-size: 0.82rem;
	line-height: 1.65;
	overflow-y: auto;
	flex: 1;
	max-height: 200px;
	scrollbar-width: thin;
	scrollbar-color: rgba(168, 143, 77, 0.4) transparent;
}

.wcm-card-back-text p {
	margin: 0 0 8px;
}
.wcm-card-back-text p:last-child {
	margin-bottom: 0;
}

/* ─── Responsive flip cards ──────────────────────────────────────────────── */

@media (max-width: 600px) {
	.wcm-flip-cards-grid {
		gap: 20px;
	}
	.wcm-flip-card {
		width: calc(50% - 10px);
		min-width: 140px;
		height: 300px;
	}
}

@media (max-width: 400px) {
	.wcm-flip-card {
		width: 100%;
		height: 280px;
	}
}


/* ==========================================================================
   CRYSTAL BALL COUNTDOWN SECTION
   ========================================================================== */

.wcm-crystal-ball-section {
	background: #221e54;
}

/* ─── Layout ─────────────────────────────────────────────────────────────── */

.wcm-crystal-ball-layout {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 48px;
}

@media (min-width: 800px) {
	.wcm-crystal-ball-layout {
		flex-direction: row;
		justify-content: center;
		align-items: center;
		gap: 72px;
	}
}

/* ─── Crystal Ball Visual ────────────────────────────────────────────────── */

.wcm-crystal-ball {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	flex-shrink: 0;
}

.wcm-crystal-ball-video {
	width: 280px;
	height: 280px;
	object-fit: contain;
	display: block;
}

/* ─── Countdown wrapper ───────────────────────────────────────────────────── */

.wcm-countdown-wrapper {
	text-align: center;
}

.wcm-countdown-label {
	color: #d5dcef;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.22em;
	margin: 0 0 20px;
	opacity: 0.85;
}

/* ─── Countdown digits ───────────────────────────────────────────────────── */

.wcm-countdown {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	justify-content: center;
}

.wcm-countdown-unit {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 72px;
}

.wcm-countdown-number {
	display: block;
	font-size: clamp(2.8rem, 6vw, 4rem);
	font-weight: 800;
	color: #a88f4d;
	line-height: 1;
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.02em;
	text-shadow: 0 0 24px rgba(168, 143, 77, 0.55);
}

.wcm-countdown-unit-label {
	display: block;
	font-size: 0.65rem;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	color: #d5dcef;
	margin-top: 6px;
	opacity: 0.75;
}

.wcm-countdown-sep {
	font-size: clamp(2.4rem, 5vw, 3.4rem);
	font-weight: 700;
	color: #a88f4d;
	line-height: 1.08;
	opacity: 0.5;
	flex-shrink: 0;
	padding-top: 2px;
}

/* ─── Date label ─────────────────────────────────────────────────────────── */

.wcm-event-date {
	color: #d5dcef;
	font-size: 0.88rem;
	margin: 20px 0 0;
	opacity: 0.7;
	letter-spacing: 0.04em;
}

/* ─── Ended state ────────────────────────────────────────────────────────── */

.wcm-countdown.wcm-ended .wcm-countdown-number {
	color: #d5dcef;
	text-shadow: none;
}

.wcm-countdown-ended-msg {
	color: #a88f4d;
	font-size: 1.1rem;
	text-align: center;
	margin: 20px 0 0;
	letter-spacing: 0.08em;
	font-style: italic;
}

/* ─── Responsive countdown ───────────────────────────────────────────────── */

@media (max-width: 480px) {
	.wcm-countdown-unit {
		min-width: 56px;
	}
	.wcm-crystal-ball-video {
		width: 220px;
		height: 220px;
	}
}
