.frat-gallery-wrap {
	--frat-cols-desktop: 4;
	--frat-cols-tablet: 2;
	--frat-cols-mobile: 1;
	--frat-animation-speed: 300ms;
	--frat-lightbox-bg: #000000;
	--frat-tab-bg: #f5f5f5;
	--frat-tab-text: #374151;
	--frat-tab-hover-bg: #e5e7eb;
	--frat-tab-hover-text: #1f2937;
	--frat-tab-active-bg: #263A4F;
	--frat-tab-active-text: #ffffff;
	--frat-tab-radius: 8px;
	--frat-tab-font-size: 15px;
	--frat-tab-font-weight: 500;
	--frat-tab-gap: 8px;
	--frat-tab-shadow-value: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.frat-gallery-tabs-wrapper {
	display: flex;
	justify-content: center;
	margin-bottom: 1.5rem;
	overflow: hidden;
}

.frat-gallery-tabs-wrapper[data-tab-align="left"] { justify-content: flex-start; }
.frat-gallery-tabs-wrapper[data-tab-align="center"] { justify-content: center; }
.frat-gallery-tabs-wrapper[data-tab-align="right"] { justify-content: flex-end; }

.frat-gallery-content-wrap {
	position: relative;
	min-height: 1px;
}

.frat-gallery-mobile-nav {
	display: none;
}

.frat-gallery-mobile-nav-btn {
	border: none;
	background: rgba(15, 23, 42, 0.75);
	color: #ffffff;
	width: 32px;
	height: 32px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 18px rgba(15, 23, 42, 0.4);
	cursor: pointer;
	transition: background 180ms cubic-bezier(0.4, 0, 0.2, 1), transform 180ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

.frat-gallery-mobile-nav-btn:hover {
	background: rgba(37, 99, 235, 0.9);
	transform: translateY(-1px);
	box-shadow: 0 10px 25px rgba(15, 23, 42, 0.5);
}

.frat-gallery-mobile-nav-icon::before {
	content: '';
	display: block;
	width: 0;
	height: 0;
	border-top: 6px solid transparent;
	border-bottom: 6px solid transparent;
}

.frat-gallery-mobile-nav-btn--prev .frat-gallery-mobile-nav-icon::before {
	border-right: 8px solid #ffffff;
	margin-left: 2px;
}

.frat-gallery-mobile-nav-btn--next .frat-gallery-mobile-nav-icon::before {
	border-left: 8px solid #ffffff;
	margin-right: 2px;
}

.frat-gallery-grid.frat-gallery-transition-out {
	will-change: transform, opacity;
	opacity: 0;
	transform: scale(0.98) translateZ(0);
	transition: opacity 220ms cubic-bezier(0.4, 0, 0.2, 1), transform 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

.frat-gallery-grid.frat-gallery-transition-in {
	will-change: transform, opacity;
	opacity: 0;
	transform: scale(0.98) translateZ(0);
	transition: opacity 260ms cubic-bezier(0.4, 0, 0.2, 1), transform 260ms cubic-bezier(0.4, 0, 0.2, 1);
}

.frat-gallery-grid.frat-gallery-transition-in.frat-gallery-transition-in--active {
	opacity: 1;
	transform: scale(1) translateZ(0);
}

.frat-gallery-wrap[data-transitioning="1"] .frat-tab-btn {
	pointer-events: none;
	opacity: 0.7;
}

.frat-gallery-tabs {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	gap: var(--frat-tab-gap);
	will-change: auto;
}

.frat-tab-indicator {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0;
	height: 2px;
	background: var(--frat-tab-active-bg);
	transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1), width 250ms cubic-bezier(0.4, 0, 0.2, 1);
	transform-origin: left;
	pointer-events: none;
}

.frat-gallery-wrap[data-tab-underline="1"] .frat-tab-indicator {
	display: none;
}

/* Premium tab - default state: always visible on white */
.frat-tab-btn {
	--frat-tab-transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
	padding: 0.6rem 1.25rem;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: var(--frat-tab-radius);
	background: var(--frat-tab-bg);
	color: var(--frat-tab-text);
	cursor: pointer;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: var(--frat-tab-font-size);
	font-weight: var(--frat-tab-font-weight);
	letter-spacing: 0.3px;
	transition: background var(--frat-tab-transition), color var(--frat-tab-transition),
		transform var(--frat-tab-transition), box-shadow var(--frat-tab-transition),
		border-color var(--frat-tab-transition);
	will-change: transform;
	white-space: nowrap;
}

.frat-tab-btn:hover {
	background: var(--frat-tab-hover-bg);
	color: var(--frat-tab-hover-text);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.frat-tab-btn.frat-active {
	background: var(--frat-tab-active-bg);
	color: var(--frat-tab-active-text);
	border-color: transparent;
	box-shadow: var(--frat-tab-shadow-value, 0 4px 14px rgba(0, 0, 0, 0.12));
	animation: frat-tab-active 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes frat-tab-active {
	0% { transform: scale(0.97); }
	100% { transform: scale(1); }
}

.frat-tab-btn:focus-visible {
	outline: 2px solid var(--frat-tab-active-bg);
	outline-offset: 2px;
}

/* Underline mode */
.frat-gallery-wrap[data-tab-underline="1"] .frat-gallery-tabs .frat-tab-btn {
	background: transparent;
	border-color: transparent;
	box-shadow: none;
}

.frat-gallery-wrap[data-tab-underline="1"] .frat-gallery-tabs .frat-tab-btn::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	width: 0;
	height: 2px;
	background: var(--frat-tab-active-bg);
	transform: translateX(-50%);
	transition: width var(--frat-tab-transition);
}

.frat-gallery-wrap[data-tab-underline="1"] .frat-gallery-tabs .frat-tab-btn:hover::after,
.frat-gallery-wrap[data-tab-underline="1"] .frat-gallery-tabs .frat-tab-btn.frat-active::after {
	width: 100%;
}

.frat-gallery-wrap[data-tab-underline="1"] .frat-gallery-tabs .frat-tab-btn.frat-active {
	background: transparent;
	color: var(--frat-tab-active-text);
}

.frat-gallery-wrap[data-tab-underline="1"] .frat-gallery-tabs .frat-tab-btn:hover {
	transform: none;
	box-shadow: none;
}

/* Mobile: horizontal scroll */
@media (max-width: 767px) {
	.frat-gallery-tabs-wrapper {
		position: relative;
		justify-content: flex-start;
		-webkit-overflow-scrolling: touch;
		margin: 0 -16px 1.25rem;
		padding: 0 16px;
	}

	.frat-gallery-tabs {
		flex-wrap: nowrap;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		-ms-overflow-style: none;
		padding-bottom: 4px;
		gap: 6px;
	}

	.frat-gallery-tabs::-webkit-scrollbar {
		display: none;
	}

	.frat-tab-btn {
		flex-shrink: 0;
		scroll-snap-align: center;
		padding: 0.5rem 1.1rem;
		font-size: 14px;
		border-radius: 999px;
		box-shadow: 0 4px 14px rgba(15, 23, 42, 0.14);
	}

	.frat-gallery-tabs-wrapper::before,
	.frat-gallery-tabs-wrapper::after {
		content: '';
		position: absolute;
		top: 0;
		bottom: 0;
		width: 18px;
		pointer-events: none;
		z-index: 1;
	}

	.frat-gallery-tabs-wrapper::before {
		left: 0;
		background: linear-gradient(to right, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
	}

	.frat-gallery-tabs-wrapper::after {
		right: 0;
		background: linear-gradient(to left, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
	}
}

.frat-gallery-grid {
	display: grid;
	grid-template-columns: repeat(var(--frat-cols-mobile), 1fr);
	gap: 1rem;
	list-style: none;
	margin: 0;
	padding: 0;
	will-change: transform;
	backface-visibility: hidden;
	transform: translateZ(0);
}

/* Mobilde yatay kaydırmalı tek kart görünümü */
@media (max-width: 767px) {
	.frat-gallery-content-wrap {
		position: relative;
	}

	.frat-gallery-mobile-nav {
		position: absolute;
		inset: 0;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0 10px;
		pointer-events: none;
	}

	.frat-gallery-mobile-nav-btn {
		pointer-events: auto;
	}

	.frat-gallery-grid {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		-ms-overflow-style: none;
		gap: 12px;
		padding-bottom: 8px;
	}

	.frat-gallery-grid::-webkit-scrollbar {
		display: none;
	}

	.frat-gallery-item {
		flex: 0 0 80vw;
		max-width: 80vw;
		aspect-ratio: 4 / 3;
		scroll-snap-align: center;
	}
}


@media (min-width: 768px) {
	.frat-gallery-grid {
		grid-template-columns: repeat(var(--frat-cols-tablet), 1fr);
	}
	.frat-gallery-wrap[data-featured-first="1"] .frat-gallery-item--featured {
		grid-column: span 2;
	}
}

@media (min-width: 1024px) {
	.frat-gallery-grid {
		grid-template-columns: repeat(var(--frat-cols-desktop), 1fr);
	}
}

.frat-gallery-item {
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 8px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 4px 24px rgba(0, 0, 0, 0.04);
	opacity: 0;
	transform: translateY(20px);
	transition: box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.frat-gallery-item.frat-gallery-item--no-entrance {
	opacity: 1;
	transform: none;
}

.frat-gallery-grid.frat-gallery-entered .frat-gallery-item:not(.frat-gallery-item--no-entrance) {
	animation: frat-grid-entrance 500ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes frat-grid-entrance {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.frat-gallery-link {
	display: block;
	width: 100%;
	height: 100%;
	text-decoration: none;
	cursor: zoom-in;
}

.frat-gallery-item__img-wrap {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.frat-gallery-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
	will-change: transform;
}

.frat-gallery-item__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 50%);
	opacity: 0;
	transition: opacity 300ms cubic-bezier(0.4, 0, 0.2, 1);
	pointer-events: none;
}

.frat-gallery-item__caption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 16px 14px 12px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 0.9rem;
	font-weight: 500;
	color: #fff;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 300ms cubic-bezier(0.4, 0, 0.2, 1), transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
	pointer-events: none;
}

.frat-gallery-link:hover .frat-gallery-img {
	transform: scale(1.06);
}

.frat-gallery-link:hover .frat-gallery-item__overlay {
	opacity: 1;
}

.frat-gallery-link:hover .frat-gallery-item__caption {
	opacity: 1;
	transform: translateY(0);
}

.frat-gallery-link:hover {
	text-decoration: none;
}

.frat-gallery-item:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1), 0 16px 48px rgba(0, 0, 0, 0.06);
}

.frat-gallery-loading {
	text-align: center;
	padding: 2rem;
}

.frat-spinner {
	display: inline-block;
	width: 32px;
	height: 32px;
	border: 3px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	animation: frat-spin 0.8s linear infinite;
}

@keyframes frat-spin {
	to { transform: rotate(360deg); }
}

.frat-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: var(--frat-lightbox-bg);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
}

.frat-lightbox[hidden] {
	display: none !important;
}

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

.frat-lightbox.frat-lightbox-visible .frat-lightbox-content {
	transform: scale(1);
	opacity: 1;
}

.frat-lightbox.frat-lightbox-closing {
	opacity: 0;
}

.frat-lightbox.frat-lightbox-closing .frat-lightbox-content {
	transform: scale(0.95);
	opacity: 0;
}

.frat-lightbox-backdrop {
	position: absolute;
	inset: 0;
	z-index: 0;
	cursor: pointer;
}

.frat-lightbox-overlay {
	position: absolute;
	inset: 0;
	z-index: 0;
	background: rgba(0, 0, 0, 0.85);
	pointer-events: none;
}

.frat-lightbox.frat-lightbox-blur .frat-lightbox-overlay {
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.frat-lightbox-toolbar {
	position: absolute;
	top: 1.25rem;
	right: 1.25rem;
	display: flex;
	gap: 10px;
	z-index: 20;
	pointer-events: none;
}

.frat-lightbox-toolbar .frat-lightbox-btn {
	pointer-events: auto;
}

.frat-lightbox-btn {
	width: 56px;
	height: 56px;
	border: none;
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
	cursor: pointer;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s, transform 0.2s;
	box-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}

.frat-lightbox-btn svg {
	width: 26px;
	height: 26px;
	transition: transform 0.2s ease;
}

.frat-lightbox-fullscreen:hover svg {
	transform: rotate(5deg);
}

.frat-lightbox-btn:hover {
	background: rgba(255, 255, 255, 0.35);
	transform: scale(1.05);
}

.frat-lightbox-content {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1;
	width: 100%;
	z-index: 1;
	pointer-events: none;
	transform: scale(0.95);
	opacity: 0;
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
}

.frat-lightbox-content > * {
	pointer-events: auto;
}

.frat-lightbox-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 52px;
	height: 52px;
	border: none;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	cursor: pointer;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
	opacity: 0.6;
	transition: background 0.25s, transform 0.25s, opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.frat-lightbox-arrow svg {
	width: 22px;
	height: 22px;
}

.frat-lightbox-arrow:hover:not(.frat-disabled) {
	background: rgba(255, 255, 255, 0.15);
	opacity: 1;
	transform: translateY(-50%) scale(1.1);
}

.frat-lightbox-arrow.frat-disabled {
	opacity: 0.25;
	cursor: not-allowed;
	pointer-events: none;
}

.frat-lightbox-prev { left: 1.5rem; }
.frat-lightbox-next { right: 1.5rem; }

.frat-lightbox-image-wrap {
	position: relative;
	max-width: 90vw;
	max-height: 90vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

.frat-lightbox-loader {
	position: absolute;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	background: transparent;
}

.frat-lightbox-loader.frat-active {
	display: flex;
}

.frat-lightbox-loader::after {
	content: '';
	width: 40px;
	height: 40px;
	border: 3px solid rgba(255, 255, 255, 0.2);
	border-top-color: #fff;
	border-radius: 50%;
	animation: frat-spin 0.7s linear infinite;
}

.frat-lightbox-img {
	max-width: 100%;
	max-height: 90vh;
	object-fit: contain;
	opacity: 0;
	transform: scale(0.98);
	transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.frat-lightbox-img.frat-loaded {
	opacity: 1;
	transform: scale(1);
}

.frat-lightbox-bottom {
	position: relative;
	width: 100%;
	padding: 1rem 0 1.5rem;
	z-index: 1;
	pointer-events: none;
}

.frat-lightbox-bottom > * {
	pointer-events: auto;
}

.frat-lightbox-counter {
	text-align: center;
	color: rgba(255, 255, 255, 0.9);
	font-size: 0.9rem;
	margin-bottom: 0.75rem;
	font-variant-numeric: tabular-nums;
}

.frat-lightbox-download {
	position: absolute;
	bottom: 1.5rem;
	right: 1.25rem;
	width: 48px;
	height: 48px;
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	z-index: 10;
	transition: background 0.2s, transform 0.2s;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.frat-lightbox-download:hover {
	background: rgba(255, 255, 255, 0.2);
	transform: scale(1.05);
	color: #fff;
}

.frat-lightbox-thumbs-wrap {
	display: flex;
	justify-content: center;
	margin-top: 0.5rem;
}

.frat-lightbox-thumbs {
	position: relative;
	display: flex;
	gap: 8px;
	max-width: 90vw;
	overflow-x: auto;
	padding: 14px 20px;
	background: rgba(0, 0, 0, 0.45);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-radius: 14px;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
	box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.2);
}

.frat-lightbox-thumbs::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
	pointer-events: none;
}

.frat-lightbox-thumbs::after {
	content: '';
	position: absolute;
	inset: 0;
	background-image: 
		repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.015) 2px, rgba(255,255,255,0.015) 4px),
		repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255,255,255,0.015) 2px, rgba(255,255,255,0.015) 4px);
	border-radius: 14px;
	pointer-events: none;
}

.frat-lightbox-thumbs::-webkit-scrollbar {
	height: 5px;
}

.frat-lightbox-thumbs::-webkit-scrollbar-track {
	background: rgba(255, 255, 255, 0.05);
	border-radius: 3px;
}

.frat-lightbox-thumbs::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.25);
	border-radius: 3px;
}

.frat-lightbox-thumb {
	position: relative;
	z-index: 1;
	flex-shrink: 0;
	width: 60px;
	height: 60px;
	object-fit: cover;
	cursor: pointer;
	opacity: 0.6;
	border: 2px solid transparent;
	border-radius: 8px;
	transition: opacity 0.2s, transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.frat-lightbox-thumb:hover {
	opacity: 0.9;
}

.frat-lightbox-thumb.frat-active {
	opacity: 1;
	border-color: #fff;
	transform: scale(1.05);
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5), 0 0 16px rgba(255, 255, 255, 0.25);
}

@media (max-width: 768px) {
	.frat-lightbox-arrow {
		width: 48px;
		height: 48px;
	}

	.frat-lightbox-prev { left: 1rem; }
	.frat-lightbox-next { right: 1rem; }

	.frat-lightbox-btn {
		width: 52px;
		height: 52px;
	}

	.frat-lightbox-btn svg {
		width: 24px;
		height: 24px;
	}

	.frat-lightbox-thumb {
		width: 52px;
		height: 52px;
	}
}

[dir="rtl"] .frat-lightbox-toolbar { right: auto; left: 1.25rem; }
[dir="rtl"] .frat-lightbox-prev { left: auto; right: 1.5rem; }
[dir="rtl"] .frat-lightbox-next { right: auto; left: 1.5rem; }
