
.sana-gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px;
    margin: 0 auto;
    max-width: 1400px;
}

.sana-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    aspect-ratio: 4/3;
    background: #1e1e1e;
}

.sana-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.sana-gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.sana-gallery-item:hover .sana-gallery-image {
    transform: scale(1.05);
}

.sana-gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.sana-gallery-item:hover .sana-gallery-caption {
    transform: translateY(0);
}

.sana-gallery-category {
    font-size: 14px;
    font-weight: 600;
    color: #f1c40f;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.sana-gallery-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #fff;
}

/* Loading Animation */
.sana-gallery-loading {
    display: flex;
    justify-content: center;
    padding: 50px;
    grid-column: 1 / -1;
}

.sana-gallery-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #f1c40f;
    animation: sana-spin 1s ease-in-out infinite;
}

@keyframes sana-spin {
    to { transform: rotate(360deg); }
}


.sana-gallery-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #fff;
    background: rgba(255, 0, 0, 0.1);
    border-radius: 8px;
}

.mfp-img {
  max-width: 90vw !important;
  max-height: 90vh !important;
}

.mfp-content {
  max-width: 95vw;
}

#sana-gallery-filters .btn {
  margin: 5px;
  border-radius: 30px;
}


/* Responsive Adjustments */
@media (max-width: 1199px) {
    .sana-gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 991px) {
    .sana-gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 767px) {
    .sana-gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
        padding: 15px;
    }
    
    .sana-gallery-caption {
        padding: 15px;
    }
}

@media (max-width: 575px) {
    .sana-gallery-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .sana-gallery-caption {
        transform: translateY(0);
        background: rgba(0, 0, 0, 0.7);
    }
    
    .sana-gallery-title {
        font-size: 16px;
    }
}