/* Namų Spalva – Before / After Gallery */

.gallery {
	background: var(--color-bg, #f8fafa);
}

.gallery-carousel {
	position: relative;
	display: flex;
	align-items: center;
	gap: 16px;
	max-width: 960px;
	margin: 0 auto;
}

.gallery-viewport {
	flex: 1;
	overflow: hidden;
	border-radius: var(--radius-lg, 20px);
}

.gallery-track {
	display: flex;
	transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
	will-change: transform;
}

.gallery-slide {
	flex: 0 0 100%;
	min-width: 100%;
}

.gallery-nav {
	flex-shrink: 0;
	width: 52px;
	height: 52px;
	border: 1px solid var(--color-border, #e5e7eb);
	border-radius: 50%;
	background: var(--color-white, #ffffff);
	color: var(--color-dark, #1a1a2e);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all var(--transition, 0.3s ease);
	box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.06));
}

.gallery-nav svg {
	width: 24px;
	height: 24px;
}

.gallery-nav:hover {
	background: var(--color-primary, #4ecdc4);
	border-color: var(--color-primary, #4ecdc4);
	transform: scale(1.05);
}

.gallery-nav:disabled {
	opacity: 0.35;
	cursor: not-allowed;
	transform: none;
}

.gallery-slide-meta {
	text-align: center;
	margin-top: 20px;
}

.gallery-slide-category {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--color-primary-dark, #3ab8b0);
	background: var(--color-primary-light, #e8faf9);
	padding: 4px 12px;
	border-radius: 50px;
	margin-bottom: 8px;
}

.gallery-caption {
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--color-dark, #1a1a2e);
	text-align: center;
}

.gallery-footer {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 24px;
	margin-top: 28px;
	flex-wrap: wrap;
}

.gallery-counter {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--color-text-light, #6b6b7b);
}

.gallery-counter-current {
	color: var(--color-dark, #1a1a2e);
	font-size: 1.25rem;
	font-weight: 800;
}

.gallery-dots {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	justify-content: center;
}

.gallery-dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: var(--color-border, #e5e7eb);
	cursor: pointer;
	transition: all var(--transition, 0.3s ease);
}

.gallery-dot:hover {
	background: var(--color-primary, #4ecdc4);
}

.gallery-dot.active {
	width: 28px;
	border-radius: 50px;
	background: var(--color-primary, #4ecdc4);
}

.comparison-slider {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 10;
	border-radius: var(--radius-lg, 20px);
	overflow: hidden;
	cursor: ew-resize;
	user-select: none;
	touch-action: none;
}

.comparison-img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
}

.comparison-img--after {
	z-index: 1;
}

.comparison-img--before {
	filter: sepia(0.35) saturate(0.55) brightness(0.72) contrast(1.08);
	max-width: none;
}

.comparison-before-wrap {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	width: 50%;
	overflow: hidden;
	z-index: 2;
	border-right: 3px solid var(--color-white, #ffffff);
}

.comparison-handle {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 4px;
	height: 100%;
	z-index: 3;
	pointer-events: none;
}

.comparison-handle-line {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 3px;
	height: 100%;
	background: var(--color-white, #ffffff);
	box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

.comparison-handle-knob {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 48px;
	height: 48px;
	background: var(--color-white, #ffffff);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--shadow-md, 0 4px 20px rgba(0, 0, 0, 0.08));
	color: var(--color-dark, #1a1a2e);
}

.comparison-handle-knob svg {
	width: 22px;
	height: 22px;
}

.comparison-label {
	position: absolute;
	bottom: 16px;
	z-index: 4;
	padding: 6px 14px;
	font-size: 0.8125rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	border-radius: 50px;
	pointer-events: none;
}

.comparison-label--before {
	left: 16px;
	background: rgba(26, 26, 46, 0.85);
	color: var(--color-white, #ffffff);
}

.comparison-label--after {
	right: 16px;
	background: var(--color-primary, #4ecdc4);
	color: var(--color-dark, #1a1a2e);
}

@media (max-width: 768px) {
	.gallery-carousel {
		display: grid;
		grid-template-columns: 1fr;
		gap: 0;
		max-width: none;
		width: 100vw;
		margin-left: calc(50% - 50vw);
	}

	.gallery-viewport {
		grid-column: 1;
		grid-row: 1;
		border-radius: 0;
		min-width: 0;
	}

	.gallery-slide {
		padding: 0;
	}

	.gallery-slide-meta {
		padding: 0 24px;
	}

	.gallery-nav {
		grid-column: 1;
		grid-row: 1;
		z-index: 5;
		align-self: start;
		justify-self: start;
		margin: calc(37.5vw - 20px) 0 0 10px;
		width: 40px;
		height: 40px;
		box-shadow: var(--shadow-md, 0 4px 20px rgba(0, 0, 0, 0.08));
	}

	.gallery-nav--next {
		justify-self: end;
		margin-left: 0;
		margin-right: 10px;
	}

	.gallery-nav:hover:not(:disabled) {
		transform: scale(1.05);
	}

	.gallery-nav:disabled {
		transform: none;
	}

	.gallery-nav svg {
		width: 20px;
		height: 20px;
	}

	.comparison-slider {
		border-radius: 0;
		aspect-ratio: 4 / 3;
	}

	.comparison-handle-knob {
		width: 40px;
		height: 40px;
	}

	.comparison-label {
		font-size: 0.75rem;
		padding: 5px 10px;
	}
}
