.photo-gallery {
	--row-h: 300px;
	--gap: 16px;
	position: relative;
}

/* Kenarlarda yumuşak kararma */
.photo-gallery__track {
	display: flex;
	flex-direction: column;
	gap: var(--gap);
	overflow: hidden;
	-webkit-mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
	mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
}

/* Her satır 4 kopya içerir; yarısı kadar kayınca başa dönmesi fark edilmez */
.photo-gallery__row {
	display: flex;
	width: max-content;
	animation: photo-gallery-flow var(--duration, 90s) linear infinite;
	will-change: transform;
}
.photo-gallery__row--reverse {
	animation-direction: reverse;
}
.photo-gallery:has(:focus-visible) .photo-gallery__row,
.photo-gallery.is-paused .photo-gallery__row {
	animation-play-state: paused;
}
@media (hover: hover) {
	.photo-gallery:hover .photo-gallery__row {
		animation-play-state: paused;
	}
}

@keyframes photo-gallery-flow {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}

.photo-gallery__item {
	position: relative;
	display: block;
	flex: none;
	overflow: hidden;
	height: var(--row-h);
	margin-right: var(--gap);
	border-radius: 6px;
	background: var(--lx-surface-2);
	color: #fff;
	text-decoration: none;
}
.photo-gallery__item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.9s cubic-bezier(0.2, 0.6, 0.3, 1);
}
.photo-gallery__item::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 55%);
	opacity: 0;
	transition: opacity 0.4s ease;
}

.photo-gallery__caption {
	position: absolute;
	left: 18px;
	right: 18px;
	bottom: 16px;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 2px;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.4s ease, transform 0.4s ease;
}
.photo-gallery__caption strong {
	color: #fff;
	font-family: var(--lx-serif, Georgia, serif);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
}
.photo-gallery__caption span {
	color: var(--lx-gold-light);
	font-family: "Open Sans", sans-serif;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

/* Temanın genel a:hover rengi (koyu gri) başlığı karartmasın */
.photo-gallery__item:hover,
.photo-gallery__item:focus,
.photo-gallery__item:visited {
	color: #fff;
	text-decoration: none;
}

.photo-gallery__item:hover img,
.photo-gallery__item:focus-visible img {
	transform: scale(1.06);
}
.photo-gallery__item:hover::after,
.photo-gallery__item:focus-visible::after,
.photo-gallery__item:hover .photo-gallery__caption,
.photo-gallery__item:focus-visible .photo-gallery__caption {
	opacity: 1;
	transform: none;
}
.photo-gallery__item:focus-visible {
	outline: 2px solid var(--lx-gold, #d9b08c);
	outline-offset: -2px;
}

/* Dokunmatik ekranlarda hover olmadığı için başlık hep görünür */
@media (hover: none) {
	.photo-gallery__item::after,
	.photo-gallery__caption {
		opacity: 1;
		transform: none;
	}
	.photo-gallery__caption strong {
		font-size: 15px;
	}
	.photo-gallery__caption span {
		font-size: 10px;
	}
}

@media (max-width: 1199px) {
	.photo-gallery {
		--row-h: 240px;
	}
}
@media (max-width: 767px) {
	.photo-gallery {
		--row-h: 170px;
		--gap: 10px;
	}
	.photo-gallery__item {
		border-radius: 4px;
	}
	.photo-gallery__caption {
		left: 10px;
		right: 10px;
		bottom: 8px;
	}
}

/* Lightbox */
.photo-lightbox {
	width: 100vw;
	max-width: 100vw;
	height: 100vh;
	max-height: 100vh;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
	overflow: hidden;
}
.photo-lightbox::backdrop {
	background: rgba(8, 6, 4, 0.94);
}
.photo-lightbox[open] {
	display: grid;
	place-items: center;
	animation: photo-lightbox-in 0.3s ease;
}
.photo-lightbox__figure {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	margin: 0;
	padding: 70px 90px;
}
.photo-lightbox__img {
	display: block;
	max-width: min(1100px, calc(100vw - 180px));
	max-height: calc(100vh - 200px);
	width: auto;
	height: auto;
	border-radius: 4px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.photo-lightbox__caption {
	font-family: var(--lx-serif, Georgia, serif);
	font-size: 20px;
	text-align: center;
}
.photo-lightbox__caption span {
	display: block;
	margin-top: 4px;
	color: var(--lx-gold-light);
	font-family: "Open Sans", sans-serif;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}
.photo-lightbox__counter {
	position: absolute;
	top: 26px;
	left: 30px;
	margin: 0;
	color: rgba(255, 255, 255, 0.7);
	font-family: "Open Sans", sans-serif;
	font-size: 14px;
	letter-spacing: 0.15em;
}

.photo-lightbox__btn {
	position: absolute;
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.3);
	color: #fff;
	cursor: pointer;
	transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.photo-lightbox__btn svg {
	width: 22px;
	height: 22px;
}
.photo-lightbox__btn:hover,
.photo-lightbox__btn:focus-visible {
	background: #fff;
	color: #111;
	transform: scale(1.08);
}
.photo-lightbox__close {
	top: 16px;
	right: 20px;
}
.photo-lightbox__nav {
	top: 50%;
	margin-top: -26px;
}
.photo-lightbox__nav--prev {
	left: 20px;
}
.photo-lightbox__nav--next {
	right: 20px;
}

@media (max-width: 767px) {
	.photo-lightbox__figure {
		padding: 70px 16px 90px;
	}
	.photo-lightbox__img {
		max-width: calc(100vw - 32px);
		max-height: calc(100vh - 220px);
	}
	.photo-lightbox__nav {
		top: auto;
		bottom: 20px;
		margin-top: 0;
	}
	.photo-lightbox__nav--prev {
		left: calc(50% - 64px);
	}
	.photo-lightbox__nav--next {
		right: calc(50% - 64px);
	}
}

@keyframes photo-lightbox-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.photo-gallery__item img,
	.photo-gallery__caption {
		transition: none;
	}
	/* Hareket azaltma açıksa akış durur, elle kaydırılır */
	.photo-gallery__track {
		overflow-x: auto;
	}
	.photo-gallery__row {
		animation: none;
	}
	.photo-lightbox[open] {
		animation: none;
	}
}
