.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}
.gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 15px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    opacity: 1 !important;
    visibility: visible !important;
}

.gallery-item h3,
.gallery-item p,
.gallery-item span {
    opacity: 1 !important;
    visibility: visible !important;
    color: #ffffff !important;
}
.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}
.gallery-item:hover img {
    transform: scale(1.1);
}
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s;
}
.lightbox-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: var(--color-white);
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    z-index: 2001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}
.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-white);
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    z-index: 2001;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    user-select: none;
}
.lightbox-prev { left: 40px; }
.lightbox-next { right: 40px; }
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}
.lightbox-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--color-white);
    text-align: center;
    font-size: 1.1rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 1rem 2rem;
    border-radius: 10px;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    .lightbox-close {
        top: 15px;
        right: 15px;
        font-size: 1.8rem;
        width: 40px;
        height: 40px;
    }
    .lightbox-prev,
    .lightbox-next {
        width: 45px;
        height: 45px;
        font-size: 1.8rem;
    }
    .lightbox-prev { left: 15px; }
    .lightbox-next { right: 15px; }
    .lightbox-caption {
        bottom: 20px;
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.75rem;
    }
    .lightbox-image {
        max-width: 95%;
        max-height: 85%;
    }
    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 1.5rem;
        width: 35px;
        height: 35px;
    }
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
    .lightbox-caption {
        bottom: 15px;
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }
}

