/* ========== BASE RESET ========== */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html, body {
	width: 100%;
	height: 100%;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	margin: 0;
	padding: 0;
}

body {
	background: #000000;
	color: #ffffff;
}

/* ========== FLORENCE-INSPIRED ATMOSPHERIC BACKGROUND ========== */
.florence-background {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	z-index: -1;
	background: 
		radial-gradient(ellipse at 20% 30%, rgba(107, 92, 231, 0.15) 0%, transparent 50%),
		radial-gradient(ellipse at 80% 70%, rgba(255, 107, 157, 0.12) 0%, transparent 50%),
		radial-gradient(ellipse at 50% 50%, rgba(139, 69, 19, 0.08) 0%, transparent 60%),
		linear-gradient(180deg, 
			rgba(26, 11, 46, 0.95) 0%, 
			rgba(42, 25, 70, 0.9) 30%, 
			rgba(20, 15, 35, 0.95) 70%, 
			rgba(10, 5, 20, 1) 100%
		);
	background-attachment: fixed;
}

/* Subtle texture overlay for depth */
.florence-background::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-image: 
		repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255, 255, 255, 0.02) 2px, rgba(255, 255, 255, 0.02) 4px);
	opacity: 0.3;
	pointer-events: none;
}

/* ========== ANIMATED PARTICLES ========== */
.particle-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	z-index: -0.5;
	pointer-events: none;
	overflow: hidden;
}

.animated-particle {
	position: absolute;
	border-radius: 50%;
	filter: blur(2px);
	opacity: 0;
	animation: floatParticle 15s infinite ease-in-out;
}

@keyframes floatParticle {
	0% {
		transform: translateY(100vh) translateX(0) scale(0);
		opacity: 0;
	}
	10% {
		opacity: 0.8;
	}
	50% {
		opacity: 0.6;
		transform: translateY(50vh) translateX(var(--drift-x)) scale(1);
	}
	90% {
		opacity: 0.4;
	}
	100% {
		transform: translateY(-10vh) translateX(var(--drift-x)) scale(0.5);
		opacity: 0;
	}
}

/* Particle color variants */
.particle-teal {
	background: radial-gradient(circle, rgba(94, 234, 212, 0.8), transparent);
	box-shadow: 0 0 20px rgba(94, 234, 212, 0.6);
}

.particle-purple {
	background: radial-gradient(circle, rgba(107, 92, 231, 0.8), transparent);
	box-shadow: 0 0 20px rgba(107, 92, 231, 0.6);
}

.particle-pink {
	background: radial-gradient(circle, rgba(255, 107, 157, 0.8), transparent);
	box-shadow: 0 0 20px rgba(255, 107, 157, 0.6);
}

.particle-orange {
	background: radial-gradient(circle, rgba(255, 165, 0, 0.8), transparent);
	box-shadow: 0 0 20px rgba(255, 165, 0, 0.6);
}

/* ========== MAIN WRAPPER ========== */
.main-wrapper {
	width: 100%;
	height: 100vh;
	overflow-y: scroll;
	overflow-x: hidden;
	scroll-behavior: smooth;
	position: relative;
}

/* ========== 3D CANVAS ========== */
#canvas-container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	z-index: 0;
}

.canvas-section {
	position: relative;
	height: 100vh;
	width: 100%;
	z-index: 1;
}

/* Content wrapper to create scrollable height */
.content-wrapper {
	min-height: 200vh;
	position: relative;
}

/* ========== NAVIGATION FROM COURSE_LIST.HTML ========== */
.main-nav * {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

.main-nav {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	background: rgba(26, 11, 46, 0.95);
	backdrop-filter: blur(20px);
	border-bottom: 3px solid rgba(107, 92, 231, 0.5);
	box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3), 0 0 40px rgba(107, 92, 231, 0.3);
}

.nav-container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 1rem 2rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.logo a {
	display: block;
	background: linear-gradient(135deg, rgba(107, 92, 231, 0.25), rgba(255, 107, 157, 0.25));
	padding: 0.7rem 1.5rem;
	border-radius: 15px;
	border: 3px solid rgba(167, 139, 250, 0.5);
	transition: all 0.3s ease;
	text-decoration: none;
	box-shadow: 0 0 25px rgba(107, 92, 231, 0.4);
}

.logo a:hover {
	background: linear-gradient(135deg, rgba(107, 92, 231, 0.4), rgba(255, 107, 157, 0.4));
	border-color: rgba(167, 139, 250, 0.8);
	box-shadow: 0 0 35px rgba(107, 92, 231, 0.6);
	transform: translateY(-3px) scale(1.02);
}

.logo img {
	height: 50px;
	width: auto;
	display: block;
	filter: drop-shadow(0 0 10px rgba(167, 139, 250, 0.5));
}

.logo-text {
	font-size: 1.8rem;
	font-weight: 900;
	background: linear-gradient(135deg, #6b5ce7, #ff6b9d, #5eead4);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	letter-spacing: 3px;
	filter: drop-shadow(0 0 15px rgba(107, 92, 231, 0.6));
}

.nav-menu {
	display: flex;
	list-style: none;
	align-items: center;
	gap: 0.5rem;
	background: rgba(107, 92, 231, 0.15);
	border-radius: 20px;
	padding: 0.5rem;
	backdrop-filter: blur(10px);
	border: 2px solid rgba(107, 92, 231, 0.3);
}

.nav-link {
	color: #e0d4ff;
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 800;
	padding: 0.7rem 1.2rem;
	display: block;
	transition: all 0.3s ease;
	border-radius: 12px;
	letter-spacing: 1px;
	text-transform: uppercase;
	position: relative;
	overflow: hidden;
}

.nav-link::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.4), transparent);
	transition: left 0.5s ease;
}

.nav-link:hover::before {
	left: 100%;
}

.nav-link:hover {
	color: #5eead4;
	background: rgba(107, 92, 231, 0.25);
	box-shadow: 0 0 25px rgba(167, 139, 250, 0.4), inset 0 0 20px rgba(94, 234, 212, 0.1);
	transform: translateY(-2px);
}

.nav-item {
	position: relative;
}

.dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
	padding-top: 1rem;
	z-index: 1100;
	transform: translateY(-10px);
}

.dropdown-content {
	background: rgba(26, 11, 46, 0.98);
	backdrop-filter: blur(20px);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(107, 92, 231, 0.5);
	border-radius: 18px;
	padding: 1rem 0;
	min-width: 220px;
	border: 2px solid rgba(107, 92, 231, 0.4);
}

.dropdown-two-col {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.5rem;
	min-width: 520px;
	padding: 1rem;
}

.dropdown-two-col a {
	margin: 0.25rem;
}

.dropdown-content a {
	display: block;
	padding: 0.75rem 1.5rem;
	color: #e0d4ff;
	text-decoration: none;
	border-radius: 10px;
	transition: all 0.3s ease;
	font-weight: 600;
	font-size: 0.85rem;
	letter-spacing: 0.5px;
	position: relative;
	overflow: hidden;
}

.dropdown-content a::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	height: 100%;
	width: 4px;
	background: linear-gradient(180deg, #6b5ce7, #ff6b9d);
	transform: scaleY(0);
	transition: transform 0.3s ease;
	pointer-events: none;
}

.dropdown-content a:hover::before {
	transform: scaleY(1);
}

.dropdown-content a:hover {
	background: rgba(107, 92, 231, 0.3);
	color: #5eead4;
	transform: translateX(10px);
	box-shadow: 0 0 15px rgba(94, 234, 212, 0.3);
}

.nav-item.has-dropdown:hover .dropdown {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.mobile-toggle {
	display: none;
	flex-direction: column;
	gap: 5px;
	cursor: pointer;
	padding: 0.5rem;
	background: rgba(107, 92, 231, 0.2);
	border-radius: 8px;
	border: 2px solid rgba(107, 92, 231, 0.4);
	z-index: 1003;
	position: relative;
	pointer-events: auto;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	transition: all 0.3s ease;
	-webkit-user-select: none;
	user-select: none;
}

.mobile-toggle:hover {
	background: rgba(107, 92, 231, 0.3);
	box-shadow: 0 0 20px rgba(107, 92, 231, 0.4);
}

.mobile-toggle:active {
	background: rgba(107, 92, 231, 0.5);
	transform: scale(0.95);
}

.mobile-toggle span {
	width: 25px;
	height: 3px;
	background: #e0d4ff;
	border-radius: 3px;
	transition: all 0.3s ease;
	pointer-events: none;
	display: block;
	box-shadow: 0 0 10px rgba(167, 139, 250, 0.5);
}

.mobile-toggle.active span:nth-child(1) {
	transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
	opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
	transform: rotate(-45deg) translate(7px, -6px);
}

/* ========== UI OVERLAY ========== */
.ui-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 100;
}

/* ========== CONTENT PANEL ========== */
.content-panel {
	position: fixed;
	left: 50%;
	top: 47%;
	transform: translate(-50%, -50%);
	max-width: 1200px;
	width: 95%;
	max-height: 70vh;
	padding: 2.5rem 3rem;
	padding-bottom: 2rem;
	background: rgba(10, 10, 10, 0.95);
	backdrop-filter: blur(30px);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 24px;
	pointer-events: auto;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.5s ease, visibility 0.5s ease;
	text-align: center;
	overflow-y: auto;
	z-index: 200;
}

.content-panel.active {
	opacity: 1;
	visibility: visible;
}

.content-label {
	font-size: 0.9rem;
	letter-spacing: 3px;
	text-transform: uppercase;
	margin-bottom: 1rem;
	font-weight: 600;
	color: #5eead4;
}

.content-title {
	font-size: 3rem;
	font-weight: 900;
	margin-bottom: 1rem;
	line-height: 1.1;
	letter-spacing: -2px;
	background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.content-description {
	font-size: 1.1rem;
	color: #e8e8e8;
	line-height: 1.6;
	margin-bottom: 2rem;
	font-weight: 500;
}

.course-list {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1rem;
	margin-top: 2rem;
	text-align: left;
}

.course-item {
	padding: 1rem;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	transition: all 0.3s ease;
	cursor: pointer;
	position: relative;
}

.course-item::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	border-radius: 12px;
	padding: 2px;
	background: linear-gradient(135deg, #5eead4, #6b5ce7, #ff6b9d);
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.course-item:hover::before {
	opacity: 1;
}

.course-item:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: transparent;
	transform: translateY(-3px);
	box-shadow: 0 0 20px rgba(94, 234, 212, 0.4), 0 0 40px rgba(107, 92, 231, 0.2);
}

.course-item h4 {
	font-size: 0.95rem;
	margin-bottom: 0.25rem;
	color: #ffffff;
}

.course-item p {
	font-size: 0.8rem;
	color: #a8d5d0;
	font-weight: 400;
	line-height: 1.4;
}

/* ========== WORLD NAVIGATION ========== */
.world-nav {
	position: fixed;
	bottom: 4rem;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 1.5rem;
	pointer-events: auto;
	background: rgba(10, 10, 10, 0.8);
	backdrop-filter: blur(20px);
	padding: 1rem 2rem;
	border-radius: 50px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	z-index: 500;
}

.world-btn {
	padding: 0.75rem 1.5rem;
	background: rgba(255, 255, 255, 0.05);
	border: 2px solid rgba(255, 255, 255, 0.2);
	color: #ffffff;
	border-radius: 50px;
	cursor: pointer;
	font-weight: 600;
	font-size: 0.85rem;
	transition: all 0.3s ease;
	letter-spacing: 0.5px;
}

.world-btn:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.4);
	transform: translateY(-2px);
}

.world-btn.active {
	background: linear-gradient(135deg, #6b5ce7, #ff6b9d);
	border-color: #6b5ce7;
	box-shadow: 0 0 20px rgba(107, 92, 231, 0.5);
}

/* ========== INSTRUCTIONS ========== */
.instructions {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	text-align: center;
	z-index: 50;
	opacity: 1;
	transition: opacity 1s ease;
	pointer-events: none;
}

.instructions.hidden {
	opacity: 0;
}

.instructions h1 {
	font-size: 5rem;
	font-weight: 900;
	margin-bottom: 1rem;
	background: linear-gradient(135deg, #ffffff 0%, #d4d4d4 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	letter-spacing: -3px;
}

.instructions p {
	font-size: 1.2rem;
	color: #e8e8e8;
	margin-bottom: 2rem;
	font-weight: 500;
}

.scroll-hint {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	color: #5eead4;
	font-size: 0.9rem;
	font-weight: 600;
	animation: bounce 2s infinite;
}

@keyframes bounce {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(10px); }
}

/* ========== LOADING ========== */
.loading {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: #000000;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2000;
	transition: opacity 0.5s ease;
}

.loading.hidden {
	opacity: 0;
	pointer-events: none;
}

.loading-spinner {
	width: 50px;
	height: 50px;
	border: 4px solid rgba(255, 255, 255, 0.1);
	border-top-color: #5eead4;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

/* ========== CUSTOM CURSOR ========== */
.custom-cursor {
	position: fixed;
	width: 20px;
	height: 20px;
	border: 2px solid #5eead4;
	border-radius: 50%;
	pointer-events: none;
	z-index: 9999;
	transition: transform 0.2s ease, border-color 0.2s ease;
	transform: translate(-50%, -50%);
}

.custom-cursor.hover {
	transform: translate(-50%, -50%) scale(1.5);
	border-color: #ff6b9d;
}

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 768px) {
	/* Ensure canvas doesn't interfere with navigation */
	#canvas-container {
		pointer-events: auto;
	}

	body.menu-open #canvas-container {
		pointer-events: none;
	}

	/* Increase nav container padding to prevent logo overlap */
	.nav-container {
		padding: 0.5rem 1rem;
	}

	.logo img {
		height: 40px;
	}

	.mobile-toggle {
		display: flex;
		position: relative;
		z-index: 1003;
		pointer-events: auto;
		background: rgba(107, 92, 231, 0.3);
		border: 3px solid rgba(107, 92, 231, 0.6);
		touch-action: manipulation;
	}

	.mobile-toggle:active {
		background: rgba(107, 92, 231, 0.5);
	}

	.nav-menu {
		position: fixed;
		top: 70px;
		left: 0;
		right: 0;
		flex-direction: column;
		background: rgba(26, 11, 46, 0.98);
		padding: 1.5rem;
		padding-bottom: 2rem;
		transform: translateX(-100%);
		transition: transform 0.3s ease;
		border-radius: 0;
		border: none;
		border-bottom: 3px solid rgba(107, 92, 231, 0.5);
		max-height: calc(100vh - 70px);
		overflow-y: auto;
		overflow-x: hidden;
		z-index: 1001;
		-webkit-overflow-scrolling: touch;
	}

	.nav-menu.active {
		transform: translateX(0);
	}

	.nav-item {
		width: 100%;
		display: flex;
		flex-direction: column;
		align-items: stretch;
	}

	.nav-link {
		width: 100%;
		text-align: center;
		padding: 0.8rem 1rem;
	}

	/* Facilities-style dropdown handling for mobile */
	.dropdown {
		position: static;
		opacity: 0;
		visibility: hidden;
		max-height: 0;
		overflow: hidden;
		padding-top: 0;
		transition: all 0.3s ease;
		pointer-events: none;
		transform: none;
	}

	.has-dropdown.active .dropdown {
		opacity: 1;
		visibility: visible;
		max-height: 2000px;
		padding-top: 0.5rem;
		overflow: visible;
		pointer-events: auto;
	}

	.dropdown-content {
		border: none;
		box-shadow: none;
		background: rgba(107, 92, 231, 0.15);
		padding: 0.5rem 0;
		pointer-events: auto;
		position: static;
		min-width: auto !important;
		max-width: none !important;
		max-height: none;
		overflow: visible;
	}

	.dropdown-content a {
		pointer-events: auto !important;
		touch-action: manipulation !important;
		-webkit-tap-highlight-color: rgba(107, 92, 231, 0.3);
		display: block !important;
		position: relative;
		padding: 0.75rem 1.5rem !important;
		text-align: center;
		width: 100%;
		box-sizing: border-box;
		cursor: pointer !important;
		-webkit-user-select: none;
		user-select: none;
		transform: none !important;
		z-index: 100 !important;
		color: #e0d4ff !important;
		font-weight: 600 !important;
		text-decoration: none !important;
	}

	.dropdown-content a * {
		pointer-events: none !important;
	}

	.dropdown-content a:active {
		background: rgba(107, 92, 231, 0.4) !important;
		transform: scale(0.98) !important;
	}

	.dropdown-content a::before {
		display: none !important;
	}

	.dropdown-content a::after {
		display: none !important;
	}

	/* Add indicator for expandable items */
	.has-dropdown > .nav-link::after {
		content: ' ▼';
		font-size: 0.7em;
		opacity: 0.6;
		margin-left: 0.5rem;
		transition: transform 0.3s ease;
		pointer-events: none;
	}

	.has-dropdown.active > .nav-link::after {
		transform: rotate(180deg);
	}

	.dropdown-two-col {
		grid-template-columns: 1fr;
		min-width: auto;
		gap: 0;
		padding: 0;
		width: 100%;
	}

	.dropdown-two-col a {
		margin: 0;
	}

	/* Make world-nav horizontal scrolling at very bottom */
	.world-nav {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		transform: none;
		padding: 0.6rem 0.5rem;
		gap: 0.6rem;
		flex-wrap: nowrap;
		justify-content: flex-start;
		max-width: 100%;
		width: 100%;
		background: rgba(10, 10, 10, 0.98);
		z-index: 500;
		box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.5);
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		border-top: 2px solid rgba(107, 92, 231, 0.5);
		scrollbar-width: none; /* Firefox */
		-ms-overflow-style: none; /* IE/Edge */
		pointer-events: auto;
	}

	.world-nav::-webkit-scrollbar {
		display: none; /* Chrome/Safari */
	}

	.world-btn {
		padding: 0.6rem 1.2rem;
		font-size: 0.8rem;
		white-space: nowrap;
		flex-shrink: 0;
		min-width: auto;
		pointer-events: auto;
		touch-action: manipulation;
		cursor: pointer;
		-webkit-tap-highlight-color: rgba(107, 92, 231, 0.3);
		user-select: none;
		-webkit-user-select: none;
	}

	.world-btn:active {
		transform: scale(0.95);
		background: rgba(107, 92, 231, 0.4);
	}

	/* Move content panel higher and make taller to show all courses */
	.content-panel {
		padding: 1rem 0.85rem;
		padding-bottom: 2rem;
		max-height: 68vh;
		top: 12%;
		bottom: auto;
		left: 50%;
		transform: translateX(-50%);
		width: 92%;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		z-index: 200;
	}

	.content-label {
		font-size: 0.7rem;
		margin-bottom: 0.4rem;
		letter-spacing: 2px;
	}

	.content-title {
		font-size: 1.5rem;
		margin-bottom: 0.5rem;
		letter-spacing: -0.5px;
		line-height: 1.2;
	}

	.content-description {
		font-size: 0.85rem;
		margin-bottom: 1rem;
		line-height: 1.5;
	}

	.course-list {
		grid-template-columns: 1fr;
		gap: 0.6rem;
		margin-top: 1rem;
		margin-bottom: 1.5rem;
		padding-bottom: 1rem;
	}

	.course-item {
		padding: 0.85rem 1rem;
		padding-bottom: 1rem;
		min-height: auto;
	}

	.course-item h4 {
		font-size: 0.85rem;
		margin-bottom: 0.3rem;
		line-height: 1.3;
	}

	.course-item p {
		font-size: 0.75rem;
		line-height: 1.5;
		margin-bottom: 0;
	}

	/* Position instructions at the very top, above content panel */
	.instructions {
		padding: 0 1rem;
		top: 8%;
		transform: translate(-50%, 0);
	}

	.instructions h1 {
		font-size: 1.6rem;
		line-height: 1.1;
		margin-bottom: 0.3rem;
	}

	.instructions p {
		font-size: 0.7rem;
		margin-bottom: 0.5rem;
	}

	.scroll-hint {
		font-size: 0.65rem;
	}
}
