/* Lightbox Gallery Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

#lightbox-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

#lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 10000;
    transition: opacity 0.3s ease;
    line-height: 1;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#lightbox-close:hover {
    opacity: 0.7;
}

#lightbox-prev,
#lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    padding: 20px;
    border-radius: 50%;
    transition: background 0.3s ease;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#lightbox-prev {
    left: 20px;
}

#lightbox-next {
    right: 20px;
}

#lightbox-prev:hover,
#lightbox-next:hover {
    background: rgba(255,255,255,0.4);
}

#lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 18px;
    background: rgba(0,0,0,0.5);
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 500;
}

#lightbox-caption {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 16px;
    background: rgba(0,0,0,0.7);
    padding: 12px 24px;
    border-radius: 8px;
    max-width: 80%;
    text-align: center;
    line-height: 1.5;
    display: none;
}

.gallery-more {
    position: relative;
}

.gallery-more::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive styles */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .gallery-item {
        height: 150px;
    }

    #lightbox-prev,
    #lightbox-next {
        padding: 15px;
        font-size: 30px;
        width: 50px;
        height: 50px;
    }

    #lightbox-prev {
        left: 10px;
    }

    #lightbox-next {
        right: 10px;
    }

    #lightbox-img {
        max-width: 95%;
        max-height: 80%;
    }

    #lightbox-counter {
        font-size: 14px;
        padding: 8px 15px;
        bottom: 10px;
    }

    #lightbox-caption {
        font-size: 14px;
        padding: 10px 20px;
        bottom: 50px;
        max-width: 90%;
    }

    #lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 35px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .gallery-item {
        height: 120px;
    }
}
