/* Gallery Grid Layout */
.sasq-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

/* Gallery Item Styling */
.sasq-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    height: 300px;
    cursor: pointer;
    background: #f0f0f0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.sasq-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: block;
}

.sasq-gallery-item:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.sasq-gallery-item:hover img {
    transform: scale(1.08);
}

/* Hover Overlay & Icon */
.sasq-gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.sasq-gallery-item:hover .sasq-gallery-overlay {
    opacity: 1;
}

.sasq-gallery-overlay svg {
    width: 40px;
    height: 40px;
    color: #fff;
    transform: scale(0.5);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sasq-gallery-item:hover .sasq-gallery-overlay svg {
    transform: scale(1);
}

/* Item Captions */
.sasq-gallery-caption {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: bottom 0.3s ease;
    z-index: 2;
}

.sasq-gallery-item:hover .sasq-gallery-caption {
    bottom: 0;
}

/* Responsive Grid Heights & Columns */
@media (max-width: 1024px) {
    .sasq-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .sasq-gallery-item {
        height: 200px;
    }
}

@media (max-width: 767px) {
    .sasq-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .sasq-gallery-item {
        height: 180px;
    }
}

/* Load More Button */
.sasq-load-more-container {
    text-align: center;
    margin-top: 30px;
}

.sasq-load-more-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(118, 75, 162, 0.4);
    position: relative;
    overflow: hidden;
}

.sasq-load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(118, 75, 162, 0.6);
}

/* Button Loading Shimmer */
.sasq-load-more-btn.loading {
    pointer-events: none;
    color: transparent;
}

.sasq-load-more-btn.loading::after {
    content: "";
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% { left: 200%; }
}

/* Newly Loaded Items Animation */
.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

/* Lightbox Styling */
.sasq-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
}

.sasq-lightbox.active {
    display: flex;
}

.sasq-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.sasq-lightbox.active .sasq-lightbox-overlay {
    opacity: 1;
}

.sasq-lightbox-content {
    position: relative;
    z-index: 2;
    max-width: 90vw;
    max-height: 85vh;
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.4s ease;
}

.sasq-lightbox.active .sasq-lightbox-content {
    opacity: 1;
    transform: scale(1);
}

.sasq-lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    display: block;
}

.sasq-lightbox-caption {
    color: #fff;
    text-align: center;
    background: #00a7dbd6;
    font-size: 16px;
    font-weight: 500;
}

.sasq-lightbox-close,
.sasq-lightbox-prev,
.sasq-lightbox-next {
    position: absolute;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 40px;
    cursor: pointer;
    z-index: 3;
    transition: color 0.3s ease, transform 0.3s ease;
}

.sasq-lightbox-close:hover,
.sasq-lightbox-prev:hover,
.sasq-lightbox-next:hover {
    color: #fff;
    transform: scale(1.1);
}

.sasq-lightbox-close { top: 20px; right: 30px; }
.sasq-lightbox-prev { left: 30px; top: 50%; transform: translateY(-50%); }
.sasq-lightbox-next { right: 30px; top: 50%; transform: translateY(-50%); }

@media (max-width: 767px) {
    .sasq-lightbox-prev { left: 10px; }
    .sasq-lightbox-next { right: 10px; }
    .sasq-lightbox-close { top: 10px; right: 15px; font-size: 30px; }
}