.gallery-page {
	padding: 0;
}

.gallery-page .gallery-section {
	padding: 56px 0 18px;
}

.gallery-page .gallery-title {
	margin: 16px 0 0;
	max-width: none;
	font-size: clamp(2.2rem, 4vw, 4rem);
	line-height: 1.02;
	letter-spacing: -0.04em;
}

.gallery-page .gallery-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
}

.gallery-page .gallery-card {
	background: rgba(255, 250, 242, 0.92);
	border: 1px solid var(--line, #ddd2c3);
	border-radius: var(--radius-lg, 28px);
	box-shadow: 0 14px 36px rgba(52, 45, 42, 0.04);
	overflow: hidden;
}

.gallery-page .gallery-trigger {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	text-align: left;
	cursor: zoom-in;
}

.gallery-page .gallery-image {
	position: relative;
	overflow: hidden;
	background: #f3ede4;
	border-bottom: 1px solid var(--line, #ddd2c3);
	aspect-ratio: 4 / 3;
}

.gallery-page .gallery-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.gallery-page .gallery-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(52, 45, 42, 0.18);
	opacity: 0;
	transition: opacity 0.25s ease;
	pointer-events: none;
}

.gallery-page .gallery-overlay-label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 14px;
	border-radius: 999px;
	background: rgba(255, 250, 242, 0.96);
	color: var(--brand-deep, #342d2a);
	font-size: 13px;
	font-weight: 700;
	border: 1px solid rgba(255, 250, 242, 0.96);
	box-shadow: 0 10px 24px rgba(52, 45, 42, 0.16);
}

.gallery-page .gallery-trigger:hover .gallery-image img,
.gallery-page .gallery-trigger:focus-visible .gallery-image img {
	transform: scale(1.05);
}

.gallery-page .gallery-trigger:hover .gallery-overlay,
.gallery-page .gallery-trigger:focus-visible .gallery-overlay {
	opacity: 1;
}

.gallery-page .gallery-trigger:focus-visible {
	outline: 3px solid rgba(243, 108, 76, 0.35);
	outline-offset: -3px;
}

.gallery-page .gallery-card-body {
	padding: 18px 20px 20px;
}

.gallery-page .gallery-card-body h3 {
	margin: 0;
	font-size: 1.05rem;
	letter-spacing: -0.02em;
	color: var(--text, #2f2927);
}

/* Lightbox */

body.gallery-lightbox-open {
	overflow: hidden;
}

.gallery-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.gallery-lightbox.is-open {
	opacity: 1;
	visibility: visible;
}

.gallery-lightbox-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20, 18, 17, 0.82);
	backdrop-filter: blur(4px);
}

.gallery-lightbox-dialog {
	position: relative;
	z-index: 2;
	width: min(1200px, calc(100% - 32px));
	height: min(90vh, 920px);
	margin: 5vh auto;
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr) 64px;
	align-items: center;
	gap: 16px;
}

.gallery-lightbox-content {
	min-width: 0;
	background: rgba(32, 28, 26, 0.92);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 24px;
	overflow: hidden;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.gallery-lightbox-image-wrap {
	background: #161311;
	display: flex;
	align-items: center;
	justify-content: center;
	max-height: calc(90vh - 110px);
	overflow: hidden;
}

.gallery-lightbox-image-wrap img {
	display: block;
	max-width: 100%;
	max-height: calc(90vh - 110px);
	width: auto;
	height: auto;
	object-fit: contain;
}

.gallery-lightbox-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 22px;
	background: rgba(40, 35, 33, 0.96);
	color: #fffaf2;
}

.gallery-lightbox-meta h2 {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 600;
	letter-spacing: -0.02em;
	color: #fffaf2;
}

.gallery-lightbox-count {
	font-size: 13px;
	color: rgba(255, 250, 242, 0.72);
	white-space: nowrap;
}

.gallery-lightbox-close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 4;
	width: 46px;
	height: 46px;
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	background: rgba(255, 250, 242, 0.96);
	color: var(--brand-deep, #342d2a);
	font-size: 30px;
	line-height: 1;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.gallery-lightbox-nav {
	width: 52px;
	height: 52px;
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	background: rgba(255, 250, 242, 0.96);
	color: var(--brand-deep, #342d2a);
	font-size: 24px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
	transition: transform 0.2s ease, background 0.2s ease;
}

.gallery-lightbox-nav:hover,
.gallery-lightbox-close:hover {
	transform: translateY(-1px);
	background: #ffffff;
}

.gallery-lightbox-nav:focus-visible,
.gallery-lightbox-close:focus-visible {
	outline: 3px solid rgba(243, 108, 76, 0.35);
	outline-offset: 2px;
}

@media (max-width: 1080px) {
	.gallery-page .gallery-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.gallery-lightbox-dialog {
		grid-template-columns: 52px minmax(0, 1fr) 52px;
		width: min(100%, calc(100% - 20px));
	}
}

@media (max-width: 760px) {
	.gallery-page .gallery-grid {
		grid-template-columns: 1fr;
	}

	.gallery-lightbox-dialog {
		grid-template-columns: 1fr;
		gap: 12px;
		height: auto;
		margin: 16px auto;
		width: calc(100% - 16px);
	}

	.gallery-lightbox-content {
		order: 2;
	}

	.gallery-lightbox-nav {
		position: fixed;
		bottom: 18px;
		z-index: 5;
	}

	.gallery-lightbox-prev {
		left: 16px;
	}

	.gallery-lightbox-next {
		right: 16px;
	}

	.gallery-lightbox-image-wrap {
		max-height: 68vh;
	}

	.gallery-lightbox-image-wrap img {
		max-height: 68vh;
	}

	.gallery-lightbox-meta {
		flex-direction: column;
		align-items: flex-start;
	}
}