/* ═══════════════════════════════════════════════════════
   KAYA PEYZAJ — Gallery, Lightbox & Before/After
   ═══════════════════════════════════════════════════════ */

/* ─── Gallery Filters ─── */
.gallery-filters {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-2xl);
}

.filter-btn {
    padding: 10px 24px;
    border-radius: var(--radius-full);
    border: 2px solid var(--border-light);
    background: transparent;
    cursor: pointer;
    font-weight: 500;
    font-size: var(--fs-small);
    font-family: var(--font-body);
    color: var(--text-secondary);
    transition: all var(--duration-normal) var(--ease-premium);
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    color: var(--text-white);
    border-color: var(--primary);
}

/* ─── Gallery Grid ─── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4 / 3;
    transition: all var(--duration-normal) var(--ease-smooth);
}

.gallery-item.hidden {
    display: none;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-slow) var(--ease-premium);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(10, 31, 19, 0.85) 0%,
        rgba(10, 31, 19, 0.3) 40%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-smooth);
    display: flex;
    align-items: flex-end;
    padding: var(--space-lg);
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-title {
    color: var(--text-white);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
}

.gallery-item-category {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--fs-small);
}

/* ─── Before / After Slider ─── */
.before-after-container {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    cursor: col-resize;
    aspect-ratio: 16 / 9;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
    user-select: none;
    -webkit-user-select: none;
}

.ba-before,
.ba-after {
    position: absolute;
    inset: 0;
}

.ba-before img,
.ba-after img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ba-before {
    clip-path: inset(0 50% 0 0);
    z-index: 2;
}

.ba-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: var(--text-white);
    z-index: 5;
    transform: translateX(-50%);
    cursor: col-resize;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
}

.ba-handle-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: var(--text-white);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--duration-fast);
}

.ba-handle:hover .ba-handle-circle {
    transform: translate(-50%, -50%) scale(1.1);
}

.ba-label {
    position: absolute;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text-white);
    border-radius: var(--radius-sm);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    z-index: 3;
    pointer-events: none;
}

.ba-label-before {
    top: 16px;
    left: 16px;
}

.ba-label-after {
    top: 16px;
    right: 16px;
}

/* ─── Lightbox ─── */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: var(--z-lightbox);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-normal) var(--ease-smooth);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: var(--radius-lg);
    object-fit: contain;
    transition: transform var(--duration-normal) var(--ease-premium);
    transform: scale(0.9);
}

.lightbox.active .lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--duration-fast);
    border: none;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--duration-fast);
    border: none;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.15);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}
