.gallery-container {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    perspective: 1000px;
    margin: 50px auto;
}

.gallery-item {
    background-color: var(--card-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    transform-style: preserve-3d;
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.05) rotateX(10deg);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

#lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-bg);
    justify-content: center;
    align-items: center;
}

#lightbox-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    animation: fadeIn 0.3s ease;
}

#close-lightbox {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    background: none;
    border: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@media screen and (max-width: 768px) {
    .gallery-container {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media screen and (max-width: 480px) {
    .gallery-container {
        grid-template-columns: 1fr;
    }
}