/* Galeria z karuzelą */
.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-carousel {
    position: relative;
    width: 100%;
    height: 192px; /* h-48 */
}

.gallery-carousel img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}

.gallery-carousel img.active {
    opacity: 1;
    pointer-events: auto;
}

/* Przyciski nawigacji w miniaturkach */
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.gallery-item:hover .gallery-nav-btn {
    opacity: 1;
}

.gallery-nav-btn.prev {
    left: 10px;
}

.gallery-nav-btn.next {
    right: 10px;
}

/* Kropki wskaźnika */
.gallery-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-dot.active {
    background: white;
    width: 24px;
    border-radius: 4px;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.lightbox-close:hover {
    color: #ddd;
}

/* Przyciski nawigacji w lightbox */
.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 36px;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-nav-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.lightbox-nav-btn.prev {
    left: 40px;
}

.lightbox-nav-btn.next {
    right: 40px;
}

.lightbox-info {
    margin-top: 20px;
    text-align: center;
    color: white;
}

.lightbox-info h3 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
}

.lightbox-info p {
    font-size: 16px;
    color: #ddd;
}

.lightbox-dots {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}

.lightbox-dots .gallery-dot {
    width: 10px;
    height: 10px;
}

/* Mobile responsywność */
@media (max-width: 768px) {
    .gallery-nav-btn {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
    
    .lightbox-nav-btn {
        width: 50px;
        height: 50px;
        font-size: 30px;
    }
    
    .lightbox-nav-btn.prev {
        left: 10px;
    }
    
    .lightbox-nav-btn.next {
        right: 10px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 32px;
    }
}