/* ==========================================================================
   CVV — Premium Website
   Aesthetic: Cinematic Mediterranean — Italian luxury meets open sky
   ========================================================================== */

/* --- Google Fonts loaded in HTML <head> ---
   Display: Syne (bold geometric sans — changeable via Admin panel)
   Body:    Outfit (modern geometric sans — changeable via Admin panel)
   Font prefs saved in localStorage, applied via inline <script> before paint
   ========================================== */

/* ---------- Custom Properties ---------- */
:root {
	/* Palette — soft Mediterranean blues */
	--deep: #070e1b;
	--navy: #0e2240;
	--blue: #1a5276;
	--sky: #4a8cc7;
	--light: #7cb5e4;
	--pale: #b8d8f0;
	--white: #ffffff;
	--soft: rgba(255, 255, 255, 0.75);
	--muted: rgba(255, 255, 255, 0.45);
	--faint: rgba(255, 255, 255, 0.18);

	/* Glass */
	--glass: rgba(255, 255, 255, 0.04);
	--glass-hover: rgba(255, 255, 255, 0.09);
	--glass-border: rgba(255, 255, 255, 0.12);
	--glass-strong: rgba(255, 255, 255, 0.07);

	/* Accent */
	--gold: #c9a961;
	--danger: #e25c5c;

	/* Typography — defaults, overridden by localStorage via JS */
	--font-display: "Syne", sans-serif;
	--font-body: "Outfit", "Helvetica Neue", Arial, sans-serif;

	/* Spacing */
	--sp-xs: 0.5rem;
	--sp-sm: 1rem;
	--sp-md: 1.5rem;
	--sp-lg: 2.5rem;
	--sp-xl: 4rem;
	--sp-2xl: 6rem;

	/* Motion */
	--ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
	--ease-out: cubic-bezier(0.22, 1, 0.36, 1);
	--dur: 0.4s;
	--dur-slow: 0.8s;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	font-family: var(--font-body);
	font-weight: 300;
	color: var(--white);
	background: var(--deep);
	line-height: 1.6;
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

a {
	color: inherit;
	text-decoration: none;
}

button {
	font-family: inherit;
	border: none;
	background: none;
	color: inherit;
	cursor: pointer;
}

/* Focus states for accessibility */
:focus-visible {
	outline: 2px solid var(--light);
	outline-offset: 3px;
}

/* ---------- Subtle Film Grain Overlay ---------- */
.grain::after {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 9999;
	pointer-events: none;
	opacity: 0.028;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
	background-repeat: repeat;
	mix-blend-mode: overlay;
}

/* ==========================================================================
   HOMEPAGE — Fullscreen Hero
   ========================================================================== */

/* --- Hero Container --- */
.hero {
	position: relative;
	width: 100%;
	height: 100vh;
	min-height: 600px;
	display: flex;
	flex-direction: column;
	/* Fallback gradient when video hasn't loaded yet */
	background: linear-gradient(
		160deg,
		#0b1a30 0%,
		#163d64 40%,
		#2a6ea3 75%,
		#4a9ad4 100%
	);
}

/* --- Background Video --- */
.hero__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 0;
	opacity: 1;
	transform: scale(1.03);
	filter: saturate(0.9) contrast(1.03);
	transition:
		opacity 0.6s var(--ease),
		transform 1.4s var(--ease-out),
		filter 1.2s var(--ease-out);
}

.hero__video.is-loaded {
	transform: scale(1);
	filter: saturate(1) contrast(1);
}

.hero--video-fallback .hero__video {
	display: none;
}

/* --- Cinematic Overlay (vignette + tint) --- */
.hero__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background:
    /* Vignette — darker edges */
		radial-gradient(
			ellipse at center,
			transparent 40%,
			rgba(7, 14, 27, 0.5) 100%
		),
		/* Top-to-bottom gradient for text readability */
		linear-gradient(
				to bottom,
				rgba(10, 22, 45, 0.65) 0%,
				rgba(15, 34, 64, 0.35) 30%,
				rgba(20, 50, 90, 0.25) 55%,
				rgba(10, 22, 45, 0.7) 100%
			);
}

/* --- Hero Content Layer --- */
.hero__content {
	position: relative;
	z-index: 2;
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	padding: clamp(2rem, 5vh, 4rem) clamp(1.5rem, 4vw, 3rem);
}

/* --- Top Logo --- */
.hero__header {
	width: 100%;
	display: flex;
	justify-content: center;
	/* Staggered reveal animation */
	opacity: 0;
	transform: translateY(-20px);
	animation: fadeSlideDown var(--dur-slow) var(--ease-out) 0.3s forwards;
}

.logo {
	display: inline-block;
	transition: opacity var(--dur) var(--ease);
}

.logo:hover {
	opacity: 0.8;
}

.logo img {
	width: 100%;
	height: auto;
	filter: brightness(1) drop-shadow(0 2px 12px rgba(0, 0, 0, 0.25));
}

/* Top logo — large and responsive */
.logo--top {
	width: clamp(180px, 28vw, 380px);
}

/* --- CTA Button --- */
.hero__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	/* Staggered reveal */
	opacity: 0;
	transform: translateY(20px);
	animation: fadeSlideUp var(--dur-slow) var(--ease-out) 0.7s forwards;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var(--font-body);
	font-weight: 400;
	letter-spacing: 0.25em;
	text-transform: uppercase;
	text-decoration: none;
	transition:
		background var(--dur) var(--ease),
		color var(--dur) var(--ease),
		border-color var(--dur) var(--ease),
		transform var(--dur) var(--ease),
		box-shadow var(--dur) var(--ease);
}

.btn--primary {
	position: relative;
	font-size: clamp(0.75rem, 1.2vw, 0.9rem);
	padding: clamp(0.95rem, 2vh, 1.25rem) clamp(2.6rem, 5.2vw, 3.7rem);
	border: 1px solid rgba(255, 255, 255, 0.42);
	border-radius: 100px;
	isolation: isolate;
	overflow: hidden;
	background:
		linear-gradient(
			165deg,
			rgba(255, 255, 255, 0.3) 0%,
			rgba(255, 255, 255, 0.09) 45%,
			rgba(255, 255, 255, 0.03) 100%
		),
		rgba(210, 233, 255, 0.1);
	color: var(--white);
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
	-webkit-backdrop-filter: blur(14px) saturate(180%);
	backdrop-filter: blur(14px) saturate(180%);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.52),
		inset 0 -12px 24px rgba(108, 161, 214, 0.26),
		0 16px 38px rgba(8, 23, 45, 0.35),
		0 2px 10px rgba(8, 23, 45, 0.26);
}

.btn--primary::before {
	content: "";
	position: absolute;
	inset: -30% -12%;
	border-radius: inherit;
	background: linear-gradient(
		95deg,
		rgba(255, 255, 255, 0) 20%,
		rgba(255, 255, 255, 0.72) 50%,
		rgba(255, 255, 255, 0) 80%
	);
	transform: translateX(-70%) rotate(7deg);
	opacity: 0.65;
	transition:
		transform 0.75s var(--ease-out),
		opacity 0.45s var(--ease);
	z-index: -1;
	pointer-events: none;
}

.btn--primary::after {
	content: "";
	position: absolute;
	inset: 2px;
	border-radius: inherit;
	border: 1px solid rgba(255, 255, 255, 0.34);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
	pointer-events: none;
}

.btn--primary:hover {
	border-color: rgba(255, 255, 255, 0.65);
	transform: translateY(-2px) scale(1.025);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.62),
		inset 0 -12px 26px rgba(120, 178, 236, 0.34),
		0 22px 44px rgba(8, 23, 45, 0.45),
		0 4px 12px rgba(8, 23, 45, 0.22);
}

.btn--primary:hover::before {
	transform: translateX(68%) rotate(7deg);
	opacity: 0.95;
}

.btn--primary:active {
	transform: translateY(0) scale(0.985);
}

/* --- Bottom Footer Bar --- */
.hero__footer {
	width: 100%;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--sp-lg);
	/* Staggered reveal */
	opacity: 0;
	animation: fadeIn var(--dur-slow) var(--ease-out) 1.1s forwards;
}

/* REPLACE: Edit contact details in index.html */
.hero__contact {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.hero__contact p {
	font-size: clamp(0.65rem, 1vw, 0.78rem);
	font-weight: 300;
	color: var(--soft);
	letter-spacing: 0.06em;
	line-height: 1.5;
}

.hero__brand {
	display: flex;
	align-items: flex-end;
}

.hero__brand img {
	/* REPLACE: Adjust bottom logo size as needed */
	width: clamp(120px, 18vw, 260px);
	height: auto;
	opacity: 0.85;
	filter: brightness(1) drop-shadow(0 1px 8px rgba(0, 0, 0, 0.2));
}

/* ==========================================================================
   EVENTS PAGE
   ========================================================================== */

.events-page {
	position: relative;
	min-height: 100vh;
	overflow-x: hidden;
}

/* --- Animated Gradient Background --- */
.events-bg {
	position: fixed;
	inset: 0;
	z-index: 0;
	background: linear-gradient(
		135deg,
		#070e1b 0%,
		#0e2240 25%,
		#163d64 50%,
		#1a5276 75%,
		#0e2240 100%
	);
	background-size: 300% 300%;
	animation: gradientDrift 25s ease infinite;
}

@keyframes gradientDrift {
	0% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
	100% {
		background-position: 0% 50%;
	}
}

/* --- Events Content Wrapper --- */
.events-content {
	position: relative;
	z-index: 1;
	max-width: 1100px;
	margin: 0 auto;
	padding: clamp(2rem, 5vh, 4rem) clamp(1.5rem, 4vw, 3rem);
	padding-bottom: var(--sp-2xl);
}

/* --- Events Header --- */
.events-header {
	display: flex;
	justify-content: center;
	margin-bottom: var(--sp-xl);
	opacity: 0;
	transform: translateY(-16px);
	animation: fadeSlideDown var(--dur-slow) var(--ease-out) 0.2s forwards;
}

/* --- Events Title --- */
.events-title {
	text-align: center;
	font-family: var(--font-display);
	font-weight: 400;
	font-size: clamp(2rem, 4.5vw, 3.2rem);
	letter-spacing: 0.08em;
	color: var(--white);
	margin-bottom: var(--sp-xl);
	opacity: 0;
	animation: fadeIn var(--dur-slow) var(--ease-out) 0.5s forwards;
}

.events-title::after {
	content: "";
	display: block;
	width: 50px;
	height: 1px;
	background: var(--muted);
	margin: var(--sp-sm) auto 0;
}

/* ==========================================================================
   CALENDAR
   ========================================================================== */

.calendar {
	background: var(--glass-strong);
	backdrop-filter: blur(24px);
	-webkit-backdrop-filter: blur(24px);
	border: 1px solid var(--glass-border);
	border-radius: 20px;
	padding: clamp(1.5rem, 3vw, 2.5rem);
	margin-bottom: var(--sp-xl);
	opacity: 0;
	animation: fadeSlideUp var(--dur-slow) var(--ease-out) 0.7s forwards;
}

/* --- Calendar Navigation --- */
.calendar__nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: var(--sp-lg);
}

.calendar__nav-btn {
	width: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	border: 1px solid var(--glass-border);
	background: var(--glass);
	color: var(--soft);
	font-size: 1.2rem;
	transition:
		background var(--dur) var(--ease),
		color var(--dur) var(--ease),
		border-color var(--dur) var(--ease);
}

.calendar__nav-btn:hover {
	background: var(--glass-hover);
	color: var(--white);
	border-color: rgba(255, 255, 255, 0.25);
}

.calendar__nav-btn svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.calendar__title {
	font-family: var(--font-display);
	font-weight: 400;
	font-size: clamp(1.3rem, 2.5vw, 1.8rem);
	letter-spacing: 0.06em;
	color: var(--white);
}

/* --- Day-of-Week Headers --- */
.calendar__days {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	margin-bottom: 8px;
}

.calendar__day-label {
	text-align: center;
	font-size: 0.7rem;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--muted);
	padding: var(--sp-xs) 0;
}

/* --- Calendar Grid --- */
.calendar__grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}

.calendar__cell {
	position: relative;
	aspect-ratio: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	font-size: clamp(0.8rem, 1.2vw, 0.95rem);
	font-weight: 400;
	color: var(--soft);
	transition:
		background var(--dur) var(--ease),
		color var(--dur) var(--ease);
	user-select: none;
}

.calendar__cell--empty {
	pointer-events: none;
}

.calendar__cell--day:hover {
	background: var(--glass-hover);
	color: var(--white);
	cursor: pointer;
}

.calendar__cell--today {
	color: var(--white);
	font-weight: 500;
	box-shadow: inset 0 0 0 1px var(--muted);
}

.calendar__cell--has-event {
	color: var(--white);
	font-weight: 500;
}

/* Event dot indicator */
.calendar__cell--has-event::after {
	content: "";
	position: absolute;
	bottom: clamp(4px, 10%, 8px);
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--light);
	box-shadow: 0 0 6px rgba(124, 181, 228, 0.6);
}

.calendar__cell--selected {
	background: rgba(74, 140, 199, 0.3);
	color: var(--white);
	box-shadow: inset 0 0 0 1px var(--sky);
}

/* Other-month faded dates */
.calendar__cell--other {
	color: rgba(255, 255, 255, 0.15);
}

.calendar__cell--other:hover {
	color: var(--muted);
}

/* ==========================================================================
   EVENTS LIST
   ========================================================================== */

.events-section-title {
	font-family: var(--font-display);
	font-weight: 400;
	font-size: clamp(1.3rem, 2.5vw, 1.8rem);
	letter-spacing: 0.06em;
	color: var(--white);
	margin-bottom: var(--sp-lg);
	opacity: 0;
	animation: fadeIn var(--dur-slow) var(--ease-out) 0.9s forwards;
}

.events-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
	gap: var(--sp-md);
}

/* --- Event Card --- */
.event-card {
	position: relative;
	background: var(--glass);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid var(--glass-border);
	border-radius: 16px;
	padding: var(--sp-md) clamp(1.2rem, 2vw, 1.5rem);
	cursor: pointer;
	transition:
		background var(--dur) var(--ease),
		border-color var(--dur) var(--ease),
		transform var(--dur) var(--ease),
		box-shadow var(--dur) var(--ease);
	/* Stagger animation — set via JS inline style */
	opacity: 0;
	transform: translateY(16px);
	animation: fadeSlideUp var(--dur-slow) var(--ease-out) forwards;
}

.event-card:hover {
	background: var(--glass-hover);
	border-color: rgba(255, 255, 255, 0.2);
	transform: translateY(-4px);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.event-card__category {
	display: inline-block;
	font-size: 0.6rem;
	font-weight: 500;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--light);
	background: rgba(74, 140, 199, 0.15);
	border: 1px solid rgba(74, 140, 199, 0.25);
	border-radius: 100px;
	padding: 0.2rem 0.7rem;
	margin-bottom: var(--sp-sm);
}

.event-card__title {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: clamp(1.1rem, 2vw, 1.35rem);
	color: var(--white);
	line-height: 1.3;
	margin-bottom: 0.6rem;
}

.event-card__meta {
	display: flex;
	gap: var(--sp-sm);
	margin-bottom: 0.4rem;
}

.event-card__date,
.event-card__time {
	font-size: 0.78rem;
	font-weight: 400;
	color: var(--soft);
	letter-spacing: 0.03em;
}

.event-card__location {
	font-size: 0.75rem;
	font-weight: 300;
	color: var(--muted);
	letter-spacing: 0.02em;
}

/* Highlighted card — when its date is selected in the calendar */
.event-card--highlighted {
	border-color: rgba(124, 181, 228, 0.4);
	background: rgba(74, 140, 199, 0.12);
}

/* ==========================================================================
   EVENT DETAIL MODAL
   ========================================================================== */

.modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 5000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(7, 14, 27, 0.75);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	opacity: 0;
	visibility: hidden;
	transition:
		opacity var(--dur) var(--ease),
		visibility var(--dur) var(--ease);
}

.modal-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

.modal {
	position: relative;
	width: min(92vw, 520px);
	max-height: 85vh;
	overflow-y: auto;
	background: rgba(14, 34, 64, 0.85);
	backdrop-filter: blur(32px);
	-webkit-backdrop-filter: blur(32px);
	border: 1px solid var(--glass-border);
	border-radius: 24px;
	padding: clamp(2rem, 4vw, 3rem);
	transform: translateY(30px) scale(0.97);
	transition: transform var(--dur) var(--ease-out);
}

.modal-overlay.is-open .modal {
	transform: translateY(0) scale(1);
}

.modal__close {
	position: absolute;
	top: 1.2rem;
	right: 1.2rem;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	border: 1px solid var(--glass-border);
	background: var(--glass);
	color: var(--soft);
	font-size: 1.1rem;
	transition:
		background var(--dur) var(--ease),
		color var(--dur) var(--ease);
}

.modal__close:hover {
	background: var(--glass-hover);
	color: var(--white);
}

.modal__category {
	display: inline-block;
	font-size: 0.6rem;
	font-weight: 500;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--light);
	background: rgba(74, 140, 199, 0.15);
	border: 1px solid rgba(74, 140, 199, 0.25);
	border-radius: 100px;
	padding: 0.25rem 0.8rem;
	margin-bottom: var(--sp-md);
}

.modal__title {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: clamp(1.6rem, 3.5vw, 2.2rem);
	color: var(--white);
	line-height: 1.2;
	margin-bottom: var(--sp-md);
}

.modal__details {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	margin-bottom: var(--sp-md);
	padding-bottom: var(--sp-md);
	border-bottom: 1px solid var(--glass-border);
}

.modal__detail {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-size: 0.85rem;
	color: var(--soft);
}

.modal__detail-icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	fill: none;
	stroke: var(--light);
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.modal__description {
	font-size: 0.9rem;
	font-weight: 300;
	color: var(--soft);
	line-height: 1.7;
}

/* ==========================================================================
   BACK LINK (Events → Home)
   ========================================================================== */

.back-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.75rem;
	font-weight: 400;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
	margin-bottom: var(--sp-lg);
	transition: color var(--dur) var(--ease);
	opacity: 0;
	animation: fadeIn var(--dur-slow) var(--ease-out) 0.3s forwards;
}

.back-link:hover {
	color: var(--white);
}

.back-link svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* ==========================================================================
   KEYFRAME ANIMATIONS
   ========================================================================== */

@keyframes fadeSlideDown {
	from {
		opacity: 0;
		transform: translateY(-20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes fadeSlideUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}

	.events-bg {
		animation: none;
	}
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* Tablet */
@media (max-width: 768px) {
	.hero__footer {
		flex-direction: column;
		align-items: center;
		text-align: center;
		gap: var(--sp-md);
	}

	.hero__contact {
		align-items: center;
	}

	.calendar__cell {
		border-radius: 8px;
		font-size: 0.8rem;
	}

	.calendar__nav-btn {
		width: 36px;
		height: 36px;
	}

	.events-grid {
		grid-template-columns: 1fr;
	}

	.modal {
		border-radius: 18px;
		padding: 1.8rem;
	}
}

/* Mobile small */
@media (max-width: 480px) {
	.btn--primary {
		letter-spacing: 0.2em;
		padding: 0.9rem 2.2rem;
	}

	.calendar {
		padding: 1rem;
		border-radius: 14px;
	}

	.calendar__day-label {
		font-size: 0.6rem;
	}

	.calendar__cell {
		border-radius: 6px;
		font-size: 0.75rem;
	}

	.event-card {
		padding: 1rem;
		border-radius: 12px;
	}

	.modal {
		border-radius: 14px;
		padding: 1.5rem;
	}
}

/* ==========================================================================
   ADMIN PANEL
   ========================================================================== */

.admin-content {
	position: relative;
	z-index: 1;
	max-width: 820px;
	margin: 0 auto;
	padding: clamp(2rem, 5vh, 4rem) clamp(1.5rem, 4vw, 3rem);
	padding-bottom: var(--sp-2xl);
}

/* --- Glass Section Card --- */
.admin-section {
	background: var(--glass-strong);
	-webkit-backdrop-filter: blur(24px);
	backdrop-filter: blur(24px);
	border: 1px solid var(--glass-border);
	border-radius: 20px;
	padding: clamp(1.5rem, 3vw, 2rem);
	margin-bottom: var(--sp-lg);
}

.admin-section__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--sp-sm);
	flex-wrap: wrap;
	margin-bottom: var(--sp-md);
}

.admin-section__title {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: clamp(1.1rem, 2vw, 1.4rem);
	color: var(--white);
	letter-spacing: 0.04em;
}

.admin-section__footer {
	margin-top: var(--sp-md);
	padding-top: var(--sp-md);
	border-top: 1px solid var(--glass-border);
	display: flex;
	flex-wrap: wrap;
	gap: var(--sp-sm);
}

.admin-icon {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: var(--light);
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex-shrink: 0;
}

.admin-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 24px;
	height: 24px;
	padding: 0 6px;
	font-family: var(--font-body);
	font-size: 0.7rem;
	font-weight: 600;
	color: var(--white);
	background: rgba(74, 140, 199, 0.35);
	border-radius: 100px;
}

/* --- Admin Buttons --- */
.btn-admin {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	font-family: var(--font-body);
	font-size: 0.78rem;
	font-weight: 500;
	letter-spacing: 0.04em;
	padding: 0.6rem 1.2rem;
	border-radius: 10px;
	border: 1px solid transparent;
	cursor: pointer;
	transition:
		background var(--dur) var(--ease),
		color var(--dur) var(--ease),
		border-color var(--dur) var(--ease),
		transform 0.15s var(--ease);
}

.btn-admin:active {
	transform: scale(0.97);
}

.btn-admin--primary {
	background: rgba(74, 140, 199, 0.25);
	color: var(--white);
	border-color: rgba(74, 140, 199, 0.35);
}
.btn-admin--primary:hover {
	background: rgba(74, 140, 199, 0.4);
	border-color: rgba(74, 140, 199, 0.5);
}

.btn-admin--ghost {
	background: transparent;
	color: var(--soft);
	border-color: var(--glass-border);
}
.btn-admin--ghost:hover {
	background: var(--glass-hover);
	color: var(--white);
	border-color: rgba(255, 255, 255, 0.2);
}

.btn-admin--danger {
	background: rgba(226, 92, 92, 0.12);
	color: var(--danger);
	border-color: rgba(226, 92, 92, 0.2);
}
.btn-admin--danger:hover {
	background: rgba(226, 92, 92, 0.22);
	border-color: rgba(226, 92, 92, 0.35);
}

/* --- Font Picker --- */
.font-picker {
	display: flex;
	flex-direction: column;
	gap: var(--sp-md);
}

.font-picker__row {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.font-picker__label {
	font-size: 0.72rem;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
}

.font-picker__select,
.form-field select,
.form-field input,
.form-field textarea {
	width: 100%;
	padding: 0.65rem 0.9rem;
	font-family: var(--font-body);
	font-size: 0.85rem;
	font-weight: 400;
	color: var(--white);
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid var(--glass-border);
	border-radius: 10px;
	transition:
		border-color var(--dur) var(--ease),
		background var(--dur) var(--ease);
	outline: none;
}

.font-picker__select:focus,
.form-field select:focus,
.form-field input:focus,
.form-field textarea:focus {
	border-color: var(--sky);
	background: rgba(255, 255, 255, 0.09);
}

.font-picker__select,
.form-field select {
	appearance: none;
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.45)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.8rem center;
	padding-right: 2.5rem;
}

.font-picker__select option,
.form-field select option {
	background: #0e2240;
	color: var(--white);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
	color: var(--muted);
}

.form-field textarea {
	resize: vertical;
	min-height: 72px;
}

.form-field input[type="date"],
.form-field input[type="time"] {
	color-scheme: dark;
}

/* Font Preview */
.font-preview {
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid var(--glass-border);
	border-radius: 12px;
	padding: var(--sp-md);
}

.font-preview__display {
	font-family: var(--font-display);
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 600;
	color: var(--white);
	margin-bottom: 0.5rem;
	line-height: 1.3;
}

.font-preview__body {
	font-family: var(--font-body);
	font-size: 0.9rem;
	font-weight: 300;
	color: var(--soft);
	line-height: 1.6;
}

/* --- Event Form (slide-down) --- */
.event-form {
	max-height: 0;
	overflow: hidden;
	opacity: 0;
	transition:
		max-height 0.5s var(--ease-out),
		opacity 0.3s var(--ease),
		margin 0.3s var(--ease);
	margin-bottom: 0;
}

.event-form.is-open {
	max-height: 700px;
	opacity: 1;
	margin-bottom: var(--sp-md);
}

.form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--sp-sm);
}

.form-field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.form-field--full {
	grid-column: 1 / -1;
}

.form-field label {
	font-size: 0.7rem;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
}

.form-actions {
	display: flex;
	gap: var(--sp-sm);
	margin-top: var(--sp-md);
}

/* --- Admin Event List --- */
.admin-events {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.admin-empty {
	color: var(--muted);
	font-size: 0.85rem;
	padding: var(--sp-md) 0;
	text-align: center;
}

.admin-event {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--sp-sm);
	padding: 0.9rem 1rem;
	background: var(--glass);
	border: 1px solid var(--glass-border);
	border-radius: 12px;
	transition:
		background var(--dur) var(--ease),
		border-color var(--dur) var(--ease);
}

.admin-event:hover {
	background: var(--glass-hover);
	border-color: rgba(255, 255, 255, 0.18);
}

.admin-event__body {
	flex: 1;
	min-width: 0;
}

.admin-event__title {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 1rem;
	color: var(--white);
	line-height: 1.3;
	margin-top: 0.35rem;
}

.admin-event__meta {
	font-size: 0.75rem;
	font-weight: 300;
	color: var(--muted);
	margin-top: 0.25rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.admin-event__actions {
	display: flex;
	gap: 0.4rem;
	flex-shrink: 0;
}

.admin-event__btn {
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	border: 1px solid var(--glass-border);
	background: var(--glass);
	color: var(--soft);
	cursor: pointer;
	transition:
		background var(--dur) var(--ease),
		color var(--dur) var(--ease),
		border-color var(--dur) var(--ease);
}

.admin-event__btn svg {
	width: 15px;
	height: 15px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.admin-event__btn--edit:hover {
	background: rgba(74, 140, 199, 0.2);
	color: var(--light);
	border-color: rgba(74, 140, 199, 0.35);
}

.admin-event__btn--delete:hover {
	background: rgba(226, 92, 92, 0.15);
	color: var(--danger);
	border-color: rgba(226, 92, 92, 0.3);
}

/* --- Toast Notification --- */
.toast {
	position: fixed;
	bottom: 2rem;
	left: 50%;
	transform: translateX(-50%) translateY(16px);
	padding: 0.7rem 1.5rem;
	font-family: var(--font-body);
	font-size: 0.82rem;
	font-weight: 500;
	color: var(--white);
	background: rgba(14, 34, 64, 0.9);
	-webkit-backdrop-filter: blur(16px);
	backdrop-filter: blur(16px);
	border: 1px solid var(--glass-border);
	border-radius: 100px;
	opacity: 0;
	visibility: hidden;
	z-index: 6000;
	pointer-events: none;
	transition:
		opacity 0.35s var(--ease),
		transform 0.35s var(--ease-out),
		visibility 0.35s var(--ease);
}

.toast.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}

/* --- Admin Link on Homepage --- */
.hero__admin-link {
	position: absolute;
	bottom: clamp(1.2rem, 2vh, 2rem);
	right: clamp(1.2rem, 2vw, 2rem);
	z-index: 3;
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.65rem;
	font-weight: 400;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
	opacity: 0.4;
	transition:
		opacity var(--dur) var(--ease),
		color var(--dur) var(--ease);
}

.hero__admin-link:hover {
	opacity: 1;
	color: var(--soft);
}

.hero__admin-link svg {
	width: 14px;
	height: 14px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* --- File Input (hidden, triggered via button) --- */
.file-input-hidden {
	position: absolute;
	width: 0;
	height: 0;
	opacity: 0;
	pointer-events: none;
}

/* --- Admin Responsive --- */
@media (max-width: 768px) {
	.admin-section__header {
		flex-direction: column;
		align-items: flex-start;
	}

	.form-grid {
		grid-template-columns: 1fr;
	}

	.form-field--full {
		grid-column: 1;
	}

	.admin-event {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.6rem;
	}

	.admin-event__actions {
		align-self: flex-end;
	}

	.admin-event__meta {
		white-space: normal;
	}
}

/* ==========================================================================
   LOGIN OVERLAY (password gate)
   ========================================================================== */

.login-overlay {
	position: fixed;
	inset: 0;
	z-index: 8000;
	display: flex;
	align-items: center;
	justify-content: center;
	transition:
		opacity 0.5s var(--ease),
		visibility 0.5s var(--ease);
}

.login-overlay--hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.login-box {
	position: relative;
	z-index: 1;
	width: min(90vw, 400px);
	background: rgba(14, 34, 64, 0.85);
	-webkit-backdrop-filter: blur(32px);
	backdrop-filter: blur(32px);
	border: 1px solid var(--glass-border);
	border-radius: 24px;
	padding: clamp(2rem, 4vw, 3rem);
	text-align: center;
}

.login-box__icon {
	color: var(--light);
	margin-bottom: var(--sp-md);
}

.login-box__title {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 1.5rem;
	color: var(--white);
	margin-bottom: 0.3rem;
}

.login-box__subtitle {
	font-size: 0.82rem;
	font-weight: 300;
	color: var(--soft);
	margin-bottom: var(--sp-lg);
}

.login-box__error {
	font-size: 0.78rem;
	color: var(--danger);
	min-height: 1.2em;
	margin-top: 0.5rem;
}

.login-box__submit {
	width: 100%;
	margin-top: 0.8rem;
}

.login-box__hint {
	font-size: 0.68rem;
	color: var(--muted);
	margin-top: var(--sp-md);
}

.login-box__hint code {
	font-family: monospace;
	color: var(--soft);
	background: rgba(255, 255, 255, 0.06);
	padding: 0.15em 0.4em;
	border-radius: 4px;
}

/* Admin page hidden until authenticated */
.admin-page--locked {
	display: none;
}

/* ==========================================================================
   EVENT URL STYLES
   ========================================================================== */

/* URL link on event cards */
.event-card__link {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	font-size: 0.72rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	color: var(--light);
	margin-top: 0.5rem;
	transition: color var(--dur) var(--ease);
}

.event-card__link:hover {
	color: var(--white);
}

/* URL in event detail modal */
.modal__url {
	margin-top: var(--sp-md);
	padding-top: var(--sp-md);
	border-top: 1px solid var(--glass-border);
}

.modal__url-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.82rem;
	font-weight: 400;
	color: var(--light);
	transition: color var(--dur) var(--ease);
	word-break: break-all;
}

.modal__url-link:hover {
	color: var(--white);
}

/* "has link" indicator in admin event list */
.admin-event__url-indicator {
	color: var(--light);
	font-weight: 500;
}

/* ==========================================================================
   SCROLLBAR (Webkit)
   ========================================================================== */
::-webkit-scrollbar {
	width: 6px;
}

::-webkit-scrollbar-track {
	background: transparent;
}

::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.12);
	border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
	background: rgba(255, 255, 255, 0.2);
}
