/* Gallery Page */
.gallery_section {
	padding: 8rem 0 12rem;
	background: linear-gradient(to bottom, #FAF6EE 0%, #F5F3EA 100%);
	min-height: calc(100vh - 200px);
	position: relative;
}

.gallery_section::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(to right, transparent 0%, var(--primary) 50%, transparent 100%);
	opacity: 0.2;
}

.gallery_header {
	position: relative;
	margin-bottom: 6rem;
}

.back_button {
	display: inline-flex;
	align-items: center;
	gap: 0.8rem;
	padding: 1.2rem 2.4rem;
	background: var(--primary);
	color: #fff;
	border-radius: 3rem;
	font-size: 1.5rem;
	font-weight: 500;
	text-decoration: none;
	transition: all 0.3s ease;
	box-shadow: 0 4px 12px rgba(106, 168, 169, 0.2);
	margin-bottom: 3rem;
}

.back_button:hover {
	background: #005658;
	transform: translateX(-5px);
	box-shadow: 0 6px 20px rgba(106, 168, 169, 0.3);
}

.back_button .arrow {
	font-size: 1.8rem;
	transition: transform 0.3s ease;
}

.back_button:hover .arrow {
	transform: translateX(-3px);
}

.gallery_section h1 {
	text-align: center;
	font-size: 4.2rem;
	font-weight: 600;
	color: var(--primary);
	margin-bottom: 2rem;
	letter-spacing: 0.05em;
	position: relative;
	display: inline-block;
	width: 100%;
}

.gallery_section h1::after {
	content: '';
	position: absolute;
	bottom: -1.5rem;
	left: 50%;
	transform: translateX(-50%);
	width: 6rem;
	height: 0.3rem;
	background: var(--primary);
	border-radius: 2rem;
}

.gallery_grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 2.5rem;
	max-width: 1400px;
	margin: 6rem auto 0;
}

.gallery_item {
	position: relative;
	overflow: hidden;
	border-radius: 1.5rem;
	background: #fff;
	box-shadow: 0 4px 15px rgba(0,0,0,0.08);
	transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
	border: 2px solid transparent;
}

.gallery_item::before {
	content: '';
	position: absolute;
	top: -2px;
	left: -2px;
	right: -2px;
	bottom: -2px;
	background: linear-gradient(135deg, rgba(106, 168, 169, 0.4), rgba(124, 209, 211, 0.3), transparent);
	opacity: 0;
	transition: opacity 0.4s ease;
	z-index: -1;
	border-radius: 1.5rem;
	pointer-events: none;
}

.gallery_item::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
	opacity: 0;
	transition: opacity 0.4s ease;
	z-index: 1;
	pointer-events: none;
}

.gallery_item:hover {
	transform: translateY(-8px) scale(1.02);
	box-shadow: 0 12px 30px rgba(106, 168, 169, 0.25), 0 0 40px rgba(106, 168, 169, 0.15);
	border-color: rgba(106, 168, 169, 0.3);
}

.gallery_item:hover::before {
	opacity: 1;
}

.gallery_item:hover::after {
	opacity: 1;
}

.gallery_thumb {
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	cursor: pointer;
	position: relative;
}

.gallery_thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
	filter: brightness(1);
}

.gallery_thumb:hover img {
	transform: scale(1.15);
	filter: brightness(1.05);
}

/* Modal */
.modal {
	display: none;
	position: fixed;
	z-index: 10000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background-color: rgba(0, 0, 0, 0.96);
	justify-content: center;
	align-items: center;
	backdrop-filter: blur(10px);
	animation: fadeIn 0.3s ease;
}

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

.modal_content {
	max-width: 85%;
	max-height: 85vh;
	object-fit: contain;
	animation: zoomIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
	border-radius: 1rem;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

@keyframes zoomIn {
	from {
		transform: scale(0.7);
		opacity: 0;
	}
	to {
		transform: scale(1);
		opacity: 1;
	}
}

.modal_close {
	position: absolute;
	top: 2.5rem;
	right: 3.5rem;
	color: #fff;
	font-size: 4rem;
	font-weight: 300;
	cursor: pointer;
	z-index: 10001;
	transition: all 0.3s ease;
	line-height: 1;
	background: rgba(255, 255, 255, 0.1);
	width: 5rem;
	height: 5rem;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(10px);
}

.modal_close:hover {
	background: rgba(255, 255, 255, 0.2);
	transform: rotate(90deg);
}

.modal_prev,
.modal_next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	color: #fff;
	font-size: 3rem;
	font-weight: 300;
	cursor: pointer;
	padding: 1.5rem 2rem;
	user-select: none;
	transition: all 0.3s ease;
	z-index: 10001;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 1rem;
	backdrop-filter: blur(10px);
}

.modal_prev:hover,
.modal_next:hover {
	background: rgba(255, 255, 255, 0.2);
	transform: translateY(-50%) scale(1.1);
}

.modal_prev {
	left: 3rem;
}

.modal_next {
	right: 3rem;
}

.modal_counter {
	position: absolute;
	bottom: 3rem;
	left: 50%;
	transform: translateX(-50%);
	color: #fff;
	font-size: 1.6rem;
	background: rgba(255, 255, 255, 0.15);
	padding: 1.2rem 2.8rem;
	border-radius: 3rem;
	z-index: 10001;
	backdrop-filter: blur(10px);
	font-weight: 500;
	letter-spacing: 0.05em;
	border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Responsive */
@media(max-width: 1200px) {
	.gallery_grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media(max-width: 768px) {
	.gallery_section {
		padding: 8rem 0;
	}

	.back_button {
		font-size: 2rem;
		padding: 1.8rem 3rem;
	}

	.back_button .arrow {
		font-size: 2.4rem;
	}

	.gallery_section h1 {
		font-size: 5.8rem;
		margin-bottom: 4rem;
	}

	.gallery_grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 2rem;
	}

	.modal_close {
		top: 2rem;
		right: 2rem;
		font-size: 5rem;
	}

	.modal_prev,
	.modal_next {
		font-size: 5rem;
		padding: 1.5rem;
	}

	.modal_prev {
		left: 1rem;
	}

	.modal_next {
		right: 1rem;
	}

	.modal_counter {
		font-size: 2.5rem;
		bottom: 2rem;
	}
}

@media(max-width: 500px) {
	.gallery_section {
		padding: 12rem 0;
	}

	.back_button {
		font-size: 2.8rem;
		padding: 2.2rem 3.5rem;
	}

	.back_button .arrow {
		font-size: 3.2rem;
	}

	.gallery_grid {
		grid-template-columns: 1fr;
		gap: 3rem;
	}

	.gallery_item {
		border-radius: 2rem;
	}

	.modal_content {
		max-width: 95%;
	}

	.modal_close {
		top: 1.5rem;
		right: 1.5rem;
		font-size: 6rem;
	}

	.modal_prev,
	.modal_next {
		font-size: 6rem;
		padding: 1rem;
		background: rgba(0, 0, 0, 0.3);
		border-radius: 50%;
		width: 6rem;
		height: 6rem;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.modal_prev {
		left: 0.5rem;
	}

	.modal_next {
		right: 0.5rem;
	}

	.modal_counter {
		font-size: 3rem;
		bottom: 1.5rem;
		padding: 1.5rem 2.5rem;
	}
}
