﻿.sp-gallery {
    padding: 70px 0;
}

.sp-gallery-head {
    text-align: center;
    margin-bottom: 32px;
}

    .sp-gallery-head h2 {
        font-family: 'Space Grotesk', sans-serif;
        font-weight: 600;
        font-size: clamp(26px, 3.4vw, 38px);
        color: var(--sp-ink);
    }

.sp-gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 32px;
}

.sp-gallery-filter {
    padding: 9px 18px;
    border-radius: 20px;
    border: 1px solid var(--sp-line);
    background: var(--sp-white);
    color: var(--sp-text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
}

    .sp-gallery-filter.active,
    .sp-gallery-filter:hover {
        background: var(--sp-ink);
        color: var(--sp-white);
        border-color: var(--sp-ink);
    }

.sp-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.sp-gallery-item {
    aspect-ratio: 4/3;
    border-radius: 10px;
    overflow: hidden;
}

    .sp-gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .4s ease;
    }

    .sp-gallery-item:hover img {
        transform: scale(1.05);
    }

.sp-gallery-item {
    cursor: pointer;
}

.sp-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(18, 33, 29, 0.95);
    align-items: center;
    justify-content: center;
}

    .sp-lightbox.sp-open {
        display: flex;
    }

.sp-lightbox-content {
    max-width: 88vw;
    max-height: 84vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

    .sp-lightbox-content img {
        max-width: 88vw;
        max-height: 78vh;
        object-fit: contain;
        border-radius: 8px;
    }

.sp-lightbox-counter {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    letter-spacing: 0.05em;
}

.sp-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--sp-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

    .sp-lightbox-close svg {
        width: 18px;
        height: 18px;
    }

    .sp-lightbox-close:hover {
        background: rgba(255, 255, 255, 0.2);
    }

.sp-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--sp-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

    .sp-lightbox-nav svg {
        width: 20px;
        height: 20px;
    }

    .sp-lightbox-nav:hover {
        background: rgba(255, 255, 255, 0.2);
    }

.sp-lightbox-prev {
    left: 20px;
}

.sp-lightbox-next {
    right: 20px;
}

@media (max-width: 600px) {
    .sp-lightbox-nav {
        width: 40px;
        height: 40px;
    }

    .sp-lightbox-prev {
        left: 10px;
    }

    .sp-lightbox-next {
        right: 10px;
    }

    .sp-lightbox-close {
        top: 10px;
        right: 10px;
    }
}

.sp-gallery-showmore-wrap {
    display: none;
    justify-content: center;
    margin-top: 24px;
}

.sp-gallery-showmore {
    padding: 11px 26px;
    border-radius: 24px;
    border: 1px solid var(--sp-line);
    background: var(--sp-white);
    color: var(--sp-ink);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
}

    .sp-gallery-showmore:hover {
        background: var(--sp-ink);
        color: var(--sp-white);
        border-color: var(--sp-ink);
    }

@media (max-width: 700px) {
    .sp-gallery-showmore-wrap {
        display: flex;
    }
}
