/* ==========================================================================
   Events & Conferences — scoped styles for events-template.php only.
   Brand tokens match the rest of RXI: teal #00B2A9 / #11C2B9, navy #243A72,
   ground #090F1D, Satoshi display. Nothing here leaks to other templates
   (every selector is prefixed .ev-).
   ========================================================================== */

:root {
	--ev-teal: #00B2A9;
	--ev-teal-br: #11C2B9;
	--ev-navy: #243A72;
	--ev-ground: #090F1D;
	--ev-ease: cubic-bezier(.16, 1, .3, 1);
}

#page .ev-hero,
#page .ev-section {
	position: relative;
	width: 100%;
}

/* --- Reveal animation. No-JS: content is simply visible (no .ev-js on root). - */
html.ev-js .ev-reveal {
	opacity: 0;
	transform: translateY(22px);
}
html.ev-js .ev-reveal.is-in {
	opacity: 1;
	transform: none;
	transition: opacity .7s var(--ev-ease), transform .7s var(--ev-ease);
}
@media (prefers-reduced-motion: reduce) {
	html.ev-js .ev-reveal { opacity: 1; transform: none; transition: none; }
}

/* --- Hero ---------------------------------------------------------------- */
.ev-hero {
	padding: clamp(7rem, 12vw, 10.5rem) 24px clamp(2.5rem, 5vw, 4rem);
	text-align: center;
	overflow: hidden;
}
.ev-hero::before {
	content: "";
	position: absolute;
	top: -30%;
	left: 50%;
	width: min(900px, 120vw);
	height: 720px;
	transform: translateX(-50%);
	background: radial-gradient(50% 50% at 50% 50%, rgba(0, 178, 169, .22), rgba(9, 15, 29, 0) 70%);
	pointer-events: none;
	z-index: 0;
}
.ev-hero-inner { position: relative; z-index: 1; max-width: 880px; margin: 0 auto; }
.ev-eyebrow {
	display: inline-block;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ev-teal-br);
	margin: 0 0 18px;
	padding: 7px 16px;
	border: 1px solid rgba(17, 194, 185, .3);
	border-radius: 999px;
	background: rgba(0, 178, 169, .07);
}
.ev-h1 {
	font-family: 'Satoshi', system-ui, sans-serif;
	font-weight: 700;
	color: #fff;
	font-size: clamp(2.4rem, 6vw, 4.1rem);
	line-height: 1.04;
	letter-spacing: -.02em;
	margin: 0 0 22px;
}
.ev-h1 span { color: rgba(255, 255, 255, .55); font-weight: 400; }
.ev-lede {
	font-size: clamp(1rem, 1.5vw, 1.18rem);
	line-height: 1.6;
	color: rgba(255, 255, 255, .66);
	max-width: 60ch;
	margin: 0 auto;
}

/* --- Section scaffolding ------------------------------------------------- */
.ev-section { padding: clamp(3rem, 6vw, 5.5rem) 24px; }
.ev-section-past {
	background: linear-gradient(180deg, rgba(36, 58, 114, 0) 0%, rgba(36, 58, 114, .12) 50%, rgba(9, 15, 29, 0) 100%);
}
.ev-wrap { max-width: 1240px; margin: 0 auto; }
.ev-sec-head { margin-bottom: clamp(2rem, 4vw, 3rem); }
.ev-sec-title {
	display: flex;
	align-items: center;
	gap: 14px;
	font-family: 'Satoshi', system-ui, sans-serif;
	font-weight: 700;
	color: #fff;
	font-size: clamp(1.7rem, 3.4vw, 2.5rem);
	letter-spacing: -.015em;
	margin: 0 0 8px;
}
.ev-sec-sub { color: rgba(255, 255, 255, .55); font-size: 1.02rem; margin: 0; padding-left: 28px; }
.ev-dot {
	width: 12px; height: 12px; border-radius: 50%;
	background: rgba(255, 255, 255, .25); flex: 0 0 auto;
}
.ev-dot-live {
	background: var(--ev-teal-br);
	box-shadow: 0 0 0 0 rgba(17, 194, 185, .55);
	animation: evPulse 2.4s infinite;
}
@keyframes evPulse {
	0% { box-shadow: 0 0 0 0 rgba(17, 194, 185, .5); }
	70% { box-shadow: 0 0 0 11px rgba(17, 194, 185, 0); }
	100% { box-shadow: 0 0 0 0 rgba(17, 194, 185, 0); }
}
@media (prefers-reduced-motion: reduce) { .ev-dot-live { animation: none; } }

/* --- Grid + cards -------------------------------------------------------- */
.ev-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
	gap: clamp(20px, 2.4vw, 32px);
}
.ev-card {
	display: flex;
	flex-direction: column;
	background: rgba(255, 255, 255, .035);
	border: 1px solid rgba(255, 255, 255, .09);
	border-radius: 20px;
	overflow: hidden;
	transition: transform .5s var(--ev-ease), border-color .5s var(--ev-ease), box-shadow .5s var(--ev-ease);
	will-change: transform;
}
@media (hover: hover) {
	.ev-card:hover {
		transform: translateY(-6px);
		border-color: rgba(17, 194, 185, .4);
		box-shadow: 0 30px 60px -28px rgba(0, 0, 0, .8), 0 0 0 1px rgba(17, 194, 185, .14);
	}
}
.ev-card-media {
	position: relative;
	aspect-ratio: 16 / 10;
	background: linear-gradient(135deg, #16233f, #0d1526);
	overflow: hidden;
}
.ev-card-media img {
	width: 100%; height: 100%; object-fit: cover; display: block;
	transition: transform .7s var(--ev-ease);
}
@media (hover: hover) { .ev-card:hover .ev-card-media img { transform: scale(1.05); } }
.ev-card-media-fallback {
	position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
	color: rgba(255, 255, 255, .22);
}
.ev-card-media-fallback svg { width: 54px; height: 54px; }
.ev-date-badge {
	position: absolute; top: 14px; left: 14px;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	min-width: 54px; padding: 8px 6px;
	background: rgba(9, 15, 29, .82);
	backdrop-filter: blur(6px);
	border: 1px solid rgba(255, 255, 255, .14);
	border-radius: 12px;
	line-height: 1;
}
.ev-date-badge b { font-family: 'Satoshi', sans-serif; font-size: 20px; font-weight: 700; color: #fff; white-space: nowrap; }
.ev-date-badge i { font-style: normal; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ev-teal-br); margin-top: 3px; white-space: nowrap; }
/* Multi-day badge carries a date range, so give it room and a smaller number. */
.ev-date-badge.is-range { padding: 8px 10px; }
.ev-date-badge.is-range b { font-size: 15px; letter-spacing: -.01em; }
.ev-type-pill {
	position: absolute; top: 16px; right: 14px;
	font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
	color: #fff; padding: 6px 12px; border-radius: 999px;
	background: rgba(0, 178, 169, .9);
	box-shadow: 0 6px 18px -6px rgba(0, 178, 169, .7);
}
.ev-card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.ev-when { font-size: 12.5px; font-weight: 600; letter-spacing: .03em; color: var(--ev-teal-br); margin: 0 0 8px; }
.ev-title {
	font-family: 'Satoshi', sans-serif; font-weight: 700; color: #fff;
	font-size: 1.28rem; line-height: 1.22; letter-spacing: -.01em; margin: 0 0 12px;
}
.ev-venue { display: flex; align-items: flex-start; gap: 7px; color: rgba(255, 255, 255, .62); font-size: 14px; margin: 0 0 12px; }
.ev-venue svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 2px; color: var(--ev-teal); }
.ev-desc { color: rgba(255, 255, 255, .6); font-size: 14.5px; line-height: 1.6; margin: 0 0 18px; }
.ev-card-body > :last-child { margin-top: auto; }

/* Register button */
.ev-register {
	display: inline-flex; align-items: center; justify-content: center; gap: 9px;
	align-self: flex-start;
	padding: 12px 22px; border-radius: 12px;
	font-weight: 700; font-size: 15px; color: #06231f;
	background: linear-gradient(180deg, var(--ev-teal-br), var(--ev-teal));
	box-shadow: 0 12px 26px -12px rgba(0, 178, 169, .8);
	transition: transform .25s var(--ev-ease), box-shadow .25s var(--ev-ease), filter .25s var(--ev-ease);
}
.ev-register svg { width: 17px; height: 17px; transition: transform .25s var(--ev-ease); }
.ev-register:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: 0 16px 32px -12px rgba(0, 178, 169, .9); }
.ev-register:hover svg { transform: translateX(3px); }
.ev-register:active { transform: translateY(0); }
.ev-concluded {
	display: inline-flex; align-self: flex-start; align-items: center;
	font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .5);
	padding: 8px 14px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 10px;
}

/* Card action row: View Details (secondary) + Register (primary) */
.ev-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ev-details {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 11px 20px; border-radius: 12px;
	font-weight: 700; font-size: 15px; color: #fff;
	border: 1px solid rgba(255, 255, 255, .18);
	background: rgba(255, 255, 255, .04);
	transition: transform .25s var(--ev-ease), border-color .25s var(--ev-ease), background .25s var(--ev-ease);
}
.ev-details svg { width: 16px; height: 16px; transition: transform .25s var(--ev-ease); }
.ev-details:hover { transform: translateY(-2px); border-color: rgba(17, 194, 185, .5); background: rgba(17, 194, 185, .1); }
.ev-details:hover svg { transform: translateX(3px); }

/* Past-event gallery strip */
.ev-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 18px; }
.ev-g-item { position: relative; display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .08); cursor: zoom-in; }
.ev-g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ev-ease); }
.ev-g-item:hover img { transform: scale(1.08); }
.ev-g-item.has-more::after {
	content: attr(data-more); position: absolute; inset: 0;
	display: flex; align-items: center; justify-content: center;
	background: rgba(9, 15, 29, .68); color: #fff; font-weight: 700; font-size: 15px;
}

/* --- Empty state --------------------------------------------------------- */
.ev-empty {
	display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center;
	padding: clamp(2.5rem, 6vw, 4.5rem) 24px;
	border: 1px dashed rgba(255, 255, 255, .14); border-radius: 20px;
	background: rgba(255, 255, 255, .02);
	color: rgba(255, 255, 255, .55); max-width: 640px; margin: 0 auto;
}
.ev-empty svg { width: 42px; height: 42px; color: var(--ev-teal); opacity: .8; }
.ev-empty p { margin: 0; font-size: 1.02rem; line-height: 1.55; }

/* --- Lightbox ------------------------------------------------------------ */
.ev-lightbox {
	position: fixed; inset: 0; z-index: 1000;
	display: flex; align-items: center; justify-content: center;
	background: rgba(5, 9, 18, .9); backdrop-filter: blur(8px);
	padding: 28px; opacity: 0; transition: opacity .3s ease;
}
.ev-lightbox.is-open { opacity: 1; }
.ev-lightbox[hidden] { display: none; }
.ev-lightbox img { max-width: min(1100px, 94vw); max-height: 88vh; border-radius: 14px; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .9); }
.ev-lb-close {
	position: absolute; top: 20px; right: 24px; width: 46px; height: 46px;
	border: none; border-radius: 50%; cursor: pointer; font-size: 26px; line-height: 1;
	color: #fff; background: rgba(255, 255, 255, .12);
	transition: background .2s ease, transform .2s ease;
}
.ev-lb-close:hover { background: rgba(255, 255, 255, .22); transform: rotate(90deg); }

/* --- Single event (details) page ----------------------------------------- */
.ev-single { padding: clamp(6.5rem, 11vw, 9rem) 24px clamp(3rem, 6vw, 5rem); }
.ev-single .ev-wrap { max-width: 920px; }
.ev-back {
	display: inline-flex; align-items: center; gap: 8px;
	color: rgba(255, 255, 255, .62); font-weight: 600; font-size: 14px;
	margin-bottom: 26px; transition: color .25s var(--ev-ease), transform .25s var(--ev-ease);
}
.ev-back svg { width: 17px; height: 17px; transition: transform .25s var(--ev-ease); }
.ev-back:hover { color: var(--ev-teal-br); }
.ev-back:hover svg { transform: translateX(-3px); }

.ev-single-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.ev-type-pill-static { position: static; box-shadow: none; }
.ev-single-status {
	font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
	padding: 6px 12px; border-radius: 999px;
}
.ev-single-status.is-up { color: #06231f; background: linear-gradient(180deg, var(--ev-teal-br), var(--ev-teal)); }
.ev-single-status.is-past { color: rgba(255, 255, 255, .62); border: 1px solid rgba(255, 255, 255, .16); }

.ev-single-title {
	font-family: 'Satoshi', system-ui, sans-serif; font-weight: 700; color: #fff;
	font-size: clamp(2rem, 4.6vw, 3.1rem); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 18px;
}
.ev-single-facts { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-bottom: 26px; }
.ev-fact { display: inline-flex; align-items: center; gap: 9px; color: rgba(255, 255, 255, .72); font-size: 15px; }
.ev-fact svg { width: 18px; height: 18px; color: var(--ev-teal); flex: 0 0 auto; }
.ev-single-reg { margin-bottom: 4px; }

.ev-single-banner {
	border-radius: 22px; overflow: hidden; margin: 8px 0 36px;
	border: 1px solid rgba(255, 255, 255, .09);
	box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .85);
}
.ev-single-banner img { width: 100%; height: auto; display: block; }

.ev-single-body { color: rgba(255, 255, 255, .78); font-size: 1.07rem; line-height: 1.75; margin-bottom: 40px; }
.ev-single-body > :first-child { margin-top: 0; }
.ev-single-body h2, .ev-single-body h3 { font-family: 'Satoshi', sans-serif; color: #fff; font-weight: 700; margin: 1.6em 0 .6em; }
.ev-single-body h2 { font-size: 1.6rem; }
.ev-single-body h3 { font-size: 1.3rem; }
.ev-single-body p { margin: 0 0 1.3em; }
.ev-single-body a { color: var(--ev-teal-br); text-decoration: underline; }
.ev-single-body ul, .ev-single-body ol { padding-left: 1.4em; margin: 0 0 1.3em; }
.ev-single-body ul { list-style: disc; }
.ev-single-body ol { list-style: decimal; }
.ev-single-body img { max-width: 100%; height: auto; border-radius: 14px; }

.ev-single-subhead {
	font-family: 'Satoshi', sans-serif; color: #fff; font-weight: 700;
	font-size: 1.5rem; letter-spacing: -.01em; margin: 0 0 18px;
}
.ev-gallery-grid {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px;
}
.ev-gallery-grid .ev-g-item { aspect-ratio: 4 / 3; }

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 680px) {
	.ev-grid { grid-template-columns: 1fr; }
	.ev-sec-sub { padding-left: 26px; }
	.ev-gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
