/* Smart Media Gallery for Elementor */

.smg-gallery {
	--smg-columns: 3;
	--smg-gap: 16px;
	--smg-ratio: 16 / 9;
}

/* ---------- Filtre çubuğu ---------- */

.smg-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin-bottom: 24px;
}

.smg-filter__btn {
	background: transparent;
	border: 1px solid currentColor;
	border-radius: 999px;
	color: inherit;
	cursor: pointer;
	font: inherit;
	line-height: 1.2;
	padding: 8px 18px;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.smg-filter__btn:hover {
	opacity: 0.75;
}

.smg-filter__btn.is-active {
	background-color: #14161c;
	border-color: #14161c;
	color: #fff;
	opacity: 1;
}

.smg-filter__btn:focus-visible,
.smg-item__trigger:focus-visible,
.smg-lightbox button:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* ---------- Izgara ---------- */

.smg-grid {
	display: grid;
	grid-template-columns: repeat(var(--smg-columns), minmax(0, 1fr));
	gap: var(--smg-gap);
}

.smg-grid--masonry {
	column-count: var(--smg-columns);
	column-gap: var(--smg-gap);
	display: block;
}

.smg-grid--masonry .smg-item {
	break-inside: avoid;
	margin-bottom: var(--smg-gap);
	-webkit-column-break-inside: avoid;
}

.smg-item {
	min-width: 0;
}

.smg-item.is-hidden {
	display: none;
}

.smg-item__inner {
	overflow: hidden;
	position: relative;
	border-radius: 12px;
	background: rgba(0, 0, 0, 0.04);
}

.smg-item__media {
	margin: 0;
	position: relative;
	aspect-ratio: var(--smg-ratio);
	overflow: hidden;
}

.smg-grid--masonry .smg-item__media {
	aspect-ratio: auto;
}

.smg-item__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), filter 0.4s ease;
}

.smg-grid--masonry .smg-item__img {
	height: auto;
}

/* ---------- Üzerine gelince efektler ---------- */

.smg-grid {
	--smg-blur: 6px;
	--smg-gray: 100%;
	--smg-zoom: 1.06;
	--smg-dim: 0.6;
}

.smg-grid--fx-zoom .smg-item:is(:hover, :focus-within) .smg-item__img {
	transform: scale(var(--smg-zoom));
}

.smg-grid--fx-blur .smg-item:is(:hover, :focus-within) .smg-item__img {
	filter: blur(var(--smg-blur));
}

.smg-grid--fx-gray .smg-item:is(:hover, :focus-within) .smg-item__img {
	filter: grayscale(var(--smg-gray));
}

.smg-grid--fx-blur-gray .smg-item:is(:hover, :focus-within) .smg-item__img {
	filter: blur(var(--smg-blur)) grayscale(var(--smg-gray));
}

.smg-grid--fx-zoom-gray .smg-item:is(:hover, :focus-within) .smg-item__img {
	transform: scale(var(--smg-zoom));
	filter: grayscale(var(--smg-gray));
}

.smg-grid--fx-dim .smg-item:is(:hover, :focus-within) .smg-item__img {
	filter: brightness(var(--smg-dim));
}

/* Kutular siyah-beyaz durur, üzerine gelince renklenir. */
.smg-grid--fx-color .smg-item__img {
	filter: grayscale(var(--smg-gray));
}

.smg-grid--fx-color .smg-item:is(:hover, :focus-within) .smg-item__img {
	filter: grayscale(0);
}

/* ---------- Oynat düğmesi ---------- */

.smg-play {
	--smg-play-size: 64px;
	position: absolute;
	inset: 0;
	margin: auto;
	width: var(--smg-play-size);
	height: var(--smg-play-size);
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	color: #fff;
	background-color: rgba(17, 19, 24, 0.55);
	backdrop-filter: blur(4px);
	transition: transform 0.25s ease, background-color 0.25s ease;
	pointer-events: none;
	z-index: 2;
}

.smg-play svg {
	transform: translateX(6%);
}

.smg-item:hover .smg-play {
	transform: scale(1.08);
}

/* ---------- Başlık katmanı ---------- */

.smg-item__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	z-index: 1;
	pointer-events: none;
}

.smg-item__overlay::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(10, 12, 16, 0.55) 0%, transparent 70%);
	z-index: -1;
}

.smg-item__content {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 18px;
	width: 100%;
	color: #fff;
}

.smg-item__title {
	margin: 0;
	font-size: 1.05em;
	line-height: 1.3;
	color: #fff;
}

.smg-item__desc {
	margin: 0;
	font-size: 0.85em;
	line-height: 1.45;
	color: rgba(255, 255, 255, 0.82);
}

.smg-grid--caption-hover .smg-item__overlay {
	opacity: 0;
	transition: opacity 0.3s ease;
}

.smg-grid--caption-hover .smg-item:hover .smg-item__overlay,
.smg-grid--caption-hover .smg-item:focus-within .smg-item__overlay {
	opacity: 1;
}

/* ---------- Tıklama alanı ---------- */

.smg-item__trigger {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	background: transparent;
	border: 0;
	padding: 0;
	margin: 0;
	cursor: pointer;
	z-index: 3;
	display: block;
	color: inherit;
	text-decoration: none;
	box-shadow: none;
	appearance: none;
	-webkit-appearance: none;
}

/* Temanın a:hover / button:hover renkleri bu şeffaf katmanı boyamasın. */
.smg-gallery .smg-item__trigger:hover,
.smg-gallery .smg-item__trigger:focus,
.smg-gallery .smg-item__trigger:active,
.smg-gallery .smg-item__trigger:visited {
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	border: 0 !important;
	box-shadow: none !important;
	text-decoration: none !important;
	color: inherit !important;
	opacity: 1 !important;
	transform: none !important;
}

.smg-item__frame {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	z-index: 4;
	background: #000;
}

.smg-empty {
	padding: 24px;
	border: 1px dashed rgba(0, 0, 0, 0.25);
	border-radius: 8px;
	text-align: center;
}

/* ---------- Lightbox ---------- */

.smg-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(6, 8, 12, 0.94);
	padding: 5vh 6vw;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.smg-lightbox.is-open {
	display: flex;
	opacity: 1;
}

.smg-lightbox__stage {
	position: relative;
	width: 100%;
	max-width: 1200px;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	gap: 12px;
	align-items: center;
	justify-content: center;
}

.smg-lightbox__media {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.smg-lightbox__media img,
.smg-lightbox__media video {
	max-width: 100%;
	max-height: 80vh;
	display: block;
	border-radius: 6px;
}

.smg-lightbox__media iframe {
	width: 100%;
	aspect-ratio: 16 / 9;
	max-height: 80vh;
	border: 0;
	border-radius: 6px;
	background: #000;
}

.smg-lightbox__media--portrait iframe {
	aspect-ratio: 9 / 16;
	width: auto;
	height: 80vh;
}

.smg-lightbox__caption {
	color: #f2f3f5;
	text-align: center;
	max-width: 70ch;
	font-size: 0.95rem;
	line-height: 1.5;
}

.smg-lightbox__caption strong {
	display: block;
	font-size: 1.05rem;
	margin-bottom: 2px;
}

.smg-lightbox button {
	position: absolute;
	background: rgba(255, 255, 255, 0.1);
	border: 0;
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	line-height: 1;
	transition: background-color 0.2s ease;
}

.smg-lightbox button:hover {
	background: rgba(255, 255, 255, 0.22);
}

.smg-lightbox__close {
	top: 16px;
	right: 16px;
}

.smg-lightbox__prev {
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
}

.smg-lightbox__next {
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
}

.smg-lightbox__counter {
	position: absolute;
	top: 22px;
	left: 20px;
	color: rgba(255, 255, 255, 0.65);
	font-size: 0.85rem;
	letter-spacing: 0.04em;
}

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

@media (max-width: 767px) {
	.smg-lightbox {
		padding: 4vh 3vw;
	}

	.smg-lightbox__prev {
		left: 4px;
	}

	.smg-lightbox__next {
		right: 4px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.smg-item__img,
	.smg-play,
	.smg-item__overlay,
	.smg-lightbox {
		transition: none !important;
	}

	.smg-grid[class*="smg-grid--fx-"] .smg-item:is(:hover, :focus-within) .smg-item__img {
		transform: none;
	}
}

/* Tema .screen-reader-text tanımlamıyorsa yedek */
.smg-gallery .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* ---------- Albüm kutusu ---------- */

.smg-count {
	position: absolute;
	right: 12px;
	top: 12px;
	z-index: 2;
	padding: 5px 11px;
	border-radius: 999px;
	font-size: 0.75rem;
	letter-spacing: 0.02em;
	color: #fff;
	background: rgba(17, 19, 24, 0.6);
	backdrop-filter: blur(4px);
	pointer-events: none;
}

.smg-item--album .smg-item__inner::after {
	content: "";
	position: absolute;
	inset: auto 8px 8px auto;
	width: 100%;
	height: 100%;
	border-radius: inherit;
	border: 1px solid rgba(255, 255, 255, 0.35);
	transform: translate(6px, -6px) scale(0.97);
	z-index: -1;
	pointer-events: none;
}

.smg-item--album {
	position: relative;
	z-index: 0;
}

/* ---------- Lightbox: albüm modu ---------- */

.smg-lightbox {
	backdrop-filter: blur(18px) saturate(120%);
	background: rgba(6, 8, 12, 0.82);
}

.smg-lightbox__head {
	color: #fff;
	text-align: center;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.smg-lightbox__album {
	font-size: 1.15rem;
	line-height: 1.25;
}

.smg-lightbox__sub {
	color: rgba(255, 255, 255, 0.6);
	font-size: 0.85rem;
}

.smg-lightbox__strip {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	max-width: 100%;
	padding: 4px 2px 8px;
	scrollbar-width: thin;
}

.smg-strip__thumb {
	position: static;
	flex: 0 0 auto;
	width: 76px;
	height: 52px;
	padding: 0;
	border-radius: 6px;
	overflow: hidden;
	opacity: 0.5;
	background: rgba(255, 255, 255, 0.08);
	transition: opacity 0.2s ease, outline-color 0.2s ease;
	outline: 2px solid transparent;
}

.smg-strip__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.smg-strip__thumb.is-active,
.smg-strip__thumb:hover {
	opacity: 1;
}

.smg-strip__thumb.is-active {
	outline-color: #fff;
}

.smg-strip__thumb.is-video::after {
	content: "▶";
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	color: #fff;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.smg-strip__thumb.is-video {
	position: relative;
}

/* ---------- İzin kapısı ---------- */

.smg-consent {
	width: 100%;
	aspect-ratio: 16 / 9;
	max-height: 70vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	padding: 24px;
	border-radius: 8px;
	text-align: center;
	color: #fff;
	background-color: #14161c;
	background-size: cover;
	background-position: center;
	box-shadow: inset 0 0 0 9999px rgba(8, 10, 14, 0.78);
}

.smg-consent__text {
	margin: 0;
	max-width: 46ch;
	font-size: 0.95rem;
	line-height: 1.5;
}

.smg-consent__btn {
	position: static;
	width: auto;
	height: auto;
	border-radius: 999px;
	padding: 11px 22px;
	font-size: 0.95rem;
	background: #fff;
	color: #14161c;
	font-weight: 600;
}

.smg-consent__btn:hover {
	background: rgba(255, 255, 255, 0.85);
}

@media (max-width: 767px) {
	.smg-strip__thumb {
		width: 60px;
		height: 42px;
	}

	.smg-lightbox__album {
		font-size: 1rem;
	}
}
