/* ============================================
   Soyo Gallery - Lightweight Portfolio Gallery
   ============================================ */

/* Filter Buttons */
.soyo-gallery-wrap {
    width: 100%;
    background: #000d22;
    padding: 40px 0;
}

.soyo-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 0 20px 40px;
}

.soyo-gallery-wrap .soyo-filter,
.soyo-gallery-wrap .soyo-filter:visited {
    display: inline-block !important;
    padding: 12px 24px !important;
    border-radius: 50px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease !important;
    border: 2px solid #d14800 !important;
    background: #d14800 !important;
    color: #ffffff !important;
    letter-spacing: 0.01em !important;
    text-decoration: none !important;
    box-shadow: none !important;
    outline: none !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    font-family: inherit !important;
}

.soyo-gallery-wrap .soyo-filter:hover {
    background: #b83d00 !important;
    border-color: #b83d00 !important;
    color: #ffffff !important;
}

.soyo-gallery-wrap .soyo-filter.active {
    background: transparent !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
}

.soyo-gallery-wrap .soyo-filter.active:hover {
    background: rgba(255,255,255,0.1) !important;
}

/* Gallery Grid - Masonry style using CSS columns */
.soyo-gallery-wrap .soyo-gallery-grid {
    columns: 2 !important;
    column-gap: 0 !important;
    padding: 0 !important;
    display: block !important;
}

@media (max-width: 600px) {
    .soyo-gallery-wrap .soyo-gallery-grid {
        columns: 1 !important;
    }
}

/* Gallery Items */
.soyo-gallery-item {
    break-inside: avoid;
    margin-bottom: 0;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    display: block;
}

.soyo-gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.soyo-gallery-item:hover img {
    transform: scale(1.02);
    opacity: 0.9;
}

/* Hidden items during filtering */
.soyo-gallery-item.hidden {
    display: none;
}

/* Filtering animation */
.soyo-gallery-item.fade-in {
    animation: soyoFadeIn 0.3s ease forwards;
}

@keyframes soyoFadeIn {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: scale(1); }
}

/* ============================================
   Lightbox
   ============================================ */

.soyo-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.soyo-lightbox.active {
    display: flex;
}

.soyo-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

.soyo-lightbox-container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 90vh;
    gap: 20px;
}

.soyo-lightbox-image-wrap {
    background: #f0f0f0;
    padding: 16px;
    max-width: 80vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.soyo-lightbox-image-wrap img {
    max-width: 75vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Close button */
.soyo-lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.5);
    border: none;
    color: #ffffff;
    font-size: 32px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s ease;
    z-index: 2;
}

.soyo-lightbox-close:hover {
    background: rgba(0,0,0,0.8);
}

/* Prev/Next buttons */
.soyo-lightbox-prev,
.soyo-lightbox-next {
    background: rgba(0,0,0,0.4);
    border: none;
    color: #ffffff;
    font-size: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.soyo-lightbox-prev:hover,
.soyo-lightbox-next:hover {
    background: rgba(0,0,0,0.8);
}

/* Mobile lightbox adjustments */
@media (max-width: 600px) {
    .soyo-lightbox-image-wrap {
        max-width: 95vw;
        padding: 10px;
    }

    .soyo-lightbox-image-wrap img {
        max-width: 88vw;
    }

    .soyo-lightbox-prev,
    .soyo-lightbox-next {
        position: fixed;
        top: 50%;
        transform: translateY(-50%);
    }

    .soyo-lightbox-prev {
        left: 10px;
    }

    .soyo-lightbox-next {
        right: 10px;
    }
}
