/* Reset and Base Styles */
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	line-height: 1.6;
	background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
	background-attachment: fixed;
	color: #f8fafc;
	padding: 40px;
	min-height: 100vh;
}

header {
	text-align: center;
	margin-bottom: 50px;
}

h1 {
	font-size: 3rem;
	font-weight: 800;
	letter-spacing: -0.025em;
	background: linear-gradient(to right, #60a5fa, #a855f7);
	background-clip: text;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	margin-bottom: 10px;
}

/* Gallery Grid - Masonry Style */
.gallery-container {
	max-width: 1400px;
	margin: 0 auto;
}

.gallery-grid {
	column-count: 5;
	column-gap: 20px;
}

.gallery-img {
	width: 100%;
	height: auto;
	display: block;
	margin-bottom: 20px;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	border: 1px solid rgba(255, 255, 255, 0.1);
	box-shadow:
		0 4px 6px -1px rgba(0, 0, 0, 0.1),
		0 2px 4px -1px rgba(0, 0, 0, 0.06);
	break-inside: avoid; /* Prevents image from splitting between columns */
}

.gallery-img:hover {
	transform: scale(1.02);
	box-shadow:
		0 20px 25px -5px rgba(0, 0, 0, 0.3),
		0 10px 10px -5px rgba(0, 0, 0, 0.04);
	border-color: rgba(255, 255, 255, 0.2);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
	.gallery-grid {
		column-count: 4;
	}
}

@media (max-width: 900px) {
	.gallery-grid {
		column-count: 3;
	}
}

@media (max-width: 600px) {
	.gallery-grid {
		column-count: 2;
		column-gap: 10px;
	}
	.gallery-img {
		margin-bottom: 10px;
	}
}

/* Lightbox Modal (Glassmorphism) */
.lightbox {
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background: rgba(15, 23, 42, 0.7);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition:
		opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
		visibility 0.5s;
	pointer-events: none;
}

.lightbox.active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.lightbox-content {
	position: relative;
	max-width: 90%;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	transform: scale(0.9) translateY(20px);
	transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox.active .lightbox-content {
	transform: scale(1) translateY(0);
}

#lightbox-img {
	max-width: 100%;
	max-height: 85vh;
	object-fit: contain;
	border-radius: 20px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.1);
	user-select: none;
	transition:
		opacity 0.3s ease,
		transform 0.3s ease;
}

/* Navigation Buttons (Glass Style) */
.close-btn {
	position: absolute;
	top: 30px;
	right: 40px;
	color: rgba(255, 255, 255, 0.8);
	font-size: 44px;
	font-weight: 300;
	cursor: pointer;
	transition: all 0.3s;
	z-index: 1001;
	line-height: 1;
}

.close-btn:hover {
	color: #fff;
	transform: rotate(90deg);
}

.nav-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255, 255, 255, 0.05);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: white;
	border: 1px solid rgba(255, 255, 255, 0.1);
	font-size: 24px;
	width: 60px;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border-radius: 50%;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	z-index: 1001;
	user-select: none;
}

.nav-btn:hover {
	background: rgba(255, 255, 255, 0.15);
	border-color: rgba(255, 255, 255, 0.3);
	transform: translateY(-50%) scale(1.1);
}

.nav-btn:active {
	transform: translateY(-50%) scale(0.9);
}

.prev-btn {
	left: 30px;
}

.next-btn {
	right: 30px;
}

/* Animation Classes */
.slide-in-right {
	animation: slideInRight 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}
.slide-in-left {
	animation: slideInLeft 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes slideInRight {
	from {
		opacity: 0;
		transform: translateX(40px) scale(0.95);
	}
	to {
		opacity: 1;
		transform: translateX(0) scale(1);
	}
}

@keyframes slideInLeft {
	from {
		opacity: 0;
		transform: translateX(-40px) scale(0.95);
	}
	to {
		opacity: 1;
		transform: translateX(0) scale(1);
	}
}

/* Responsive adjustments */
@media (max-width: 768px) {
	h1 {
		font-size: 2rem;
	}
	.gallery-grid {
		column-count: 2;
		column-gap: 10px;
	}
	.nav-btn {
		width: 44px;
		height: 44px;
		font-size: 18px;
	}
	.prev-btn {
		left: 15px;
	}
	.next-btn {
		right: 15px;
	}
	.close-btn {
		top: 20px;
		right: 20px;
		font-size: 36px;
	}
}
