.sg-filters {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 30px;
    width: 100%;
}

.sg-filter-btn {
    background-color: #e8e8e8;
    border: none;
    padding: 8px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #333333;
    text-align: center;
    width: auto !important;
    transition: all 0.3s ease;
    font-family: inherit;
    text-transform: capitalize;
}

.sg-filter-btn.active, 
.sg-filter-btn:hover {
    background-color: #936F34;
    color: #ffffff;
}

.sg-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.sg-item {
    position: relative;
    overflow: hidden;
    background: #f4f4f4;
    border-radius: 0;
    transition: transform 0.3s ease;
    cursor: pointer; 
    height: 400px; 
    display: flex; 
}

.sg-item img {
    width: 100%;
    height: 100%; 
    object-fit: cover !important;
    display: block;
}

.sg-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.65);
    border-radius: 50%;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    pointer-events: none; 
}

.sg-item:hover .sg-play-btn {
    background: rgba(220, 38, 38, 0.9);
}

.sg-play-btn svg {
    width: 24px;
    height: 24px;
    margin-left: 4px;
}

.sg-lightbox-modal {
    display: none; 
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    overflow-y: auto; 
}

.sg-lightbox-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 900px;
    height: 65vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sg-lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.sg-lightbox-content iframe {
    width: 100%;
    height: 100%;
    border-radius: 4px;
}

.sg-close-btn {
    position: fixed;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 1000000;
}

.sg-close-btn:hover {
    color: #ff4747;
}

@media (max-width: 1024px) {
    .sg-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .sg-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .sg-filters {
        justify-content: center;
    }
}

.main-gallery-loader {
    position: relative !important;
    min-height: 400px !important;
}

.main-gallery-loader::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ffffff;
    z-index: 998;
    transition: opacity 0.6s ease;
}

.main-gallery-loader::after {
    content: "";
    position: absolute;
    top: 150px;
    left: calc(50% - 25px);
    width: 50px; 
    height: 50px;
    border: 4px solid #e2e2e2;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spinLoaderFixed 1s linear infinite;
    z-index: 999;
    transition: opacity 0.6s ease;
}

@keyframes spinLoaderFixed {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.main-gallery-loader.is-loaded::before,
.main-gallery-loader.is-loaded::after {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none;
}