/* Gallery Grid */
.wplg-gallery-container {
    margin: 20px 0;
}

.wplg-grid {
    display: grid;
    grid-template-columns: repeat(var(--wplg-columns, 3), 1fr);
    gap: 15px;
}

.wplg-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    aspect-ratio: 1 / 1;
    /* Square aspect ratio */
}

.wplg-item:hover {
    transform: translateY(-5px);
}

.wplg-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.wplg-item:hover img {
    transform: scale(1.1);
}

.wplg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wplg-item:hover .wplg-overlay {
    opacity: 1;
}

.wplg-overlay .dashicons {
    color: white;
    font-size: 30px;
    width: 30px;
    height: 30px;
}

/* Pagination */
.wplg-pagination {
    margin-top: 20px;
    text-align: center;
}

.wplg-pagination .page-numbers {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 2px;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
}

.wplg-pagination .page-numbers.current {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

/* Lightbox */
.wplg-lightbox {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    /* Black w/ opacity */
    backdrop-filter: blur(5px);
    /* Glassmorphism */
    align-items: center;
    justify-content: center;
}

.wplg-lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.wplg-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10000;
}

.wplg-close:hover,
.wplg-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.wplg-prev,
.wplg-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.3);
}

.wplg-next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.wplg-prev {
    left: 0;
    border-radius: 3px 0 0 3px;
}

.wplg-prev:hover,
.wplg-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Responsive */
@media screen and (max-width: 768px) {
    .wplg-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        /* Force 2 columns on mobile */
    }
}

@media screen and (max-width: 480px) {
    .wplg-grid {
        grid-template-columns: 1fr !important;
        /* Force 1 column on small screens */
    }
}