/* Photo Gallery Plugin - Frontend Styles */

.pgp-gallery {
    display: grid;
    gap: 15px;
    margin: 20px 0;
}

.pgp-gallery[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.pgp-gallery[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.pgp-gallery[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

.pgp-gallery[data-columns="5"] {
    grid-template-columns: repeat(5, 1fr);
}

@media screen and (max-width: 768px) {
    .pgp-gallery {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media screen and (max-width: 480px) {
    .pgp-gallery {
        grid-template-columns: 1fr !important;
    }
}

.pgp-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #f5f5f5;
}

.pgp-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.pgp-gallery-link {
    display: block;
    position: relative;
    overflow: hidden;
    padding-bottom: 100%;
}

.pgp-gallery-link img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.pgp-gallery-link:hover img {
    transform: scale(1.1);
}

.pgp-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pgp-gallery-link:hover .pgp-overlay {
    opacity: 1;
}

.pgp-zoom-icon {
    font-size: 48px;
    color: white;
}

/* Lightbox Styles */
.pgp-lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.pgp-lightbox.active {
    display: block;
}

.pgp-lightbox-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.pgp-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10000;
}

.pgp-close:hover,
.pgp-close:focus {
    color: #bbb;
}

.pgp-prev,
.pgp-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    padding: 20px;
    user-select: none;
    transition: background-color 0.3s;
    z-index: 10000;
}

.pgp-prev:hover,
.pgp-next:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.pgp-prev {
    left: 0;
}

.pgp-next {
    right: 0;
}

.pgp-no-images {
    text-align: center;
    padding: 40px 20px;
    background: #f5f5f5;
    border-radius: 8px;
    color: #666;
    font-size: 16px;
}
