/* ==========================================================================
   GALERIA - MISTRZOWSKA PRECYZJA
   KARUZELA I LIGHTBOX Z EFEKTEM WERNISAŻU
   ========================================================================== */

.inspiration-gallery {
    padding: clamp(4rem, 8vw, 6rem) 0;
    background: #fff;
    text-align: center;
}

.carousel-wrapper {
    position: relative;
    max-width: 1400px;
    margin: 40px auto 0;
    padding: 0 60px;
}

.carousel-track-container {
    overflow: hidden;
}

.carousel-track {
    display: flex;
    gap: 15px;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    list-style: none;
    padding: 0;
    margin: 0;
}

/* DESKTOP: 5 zdjęć w rzędzie */
.carousel-slide {
    flex: 0 0 calc(20% - 12px);
    cursor: zoom-in;
}

.carousel-slide img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    filter: grayscale(20%);
    opacity: 0.6;
    transition: all 0.5s ease;
    border-radius: 2px;
}

.carousel-slide img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* STRZAŁKI DOMYŚLNE (Desktop) */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #cbd5e1;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 10;
    transition: 0.3s ease;
}

.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }

.carousel-btn:hover {
    color: var(--clr-accent);
}

/* ==========================================================================
   OPTIMIZATION: MOBILE SLIDER (Naprawa "wertikali")
   ========================================================================== */

@media (max-width: 1024px) {
    .carousel-wrapper {
        padding: 0; /* Zdjęcia bliżej krawędzi na mobile */
        margin-top: 20px;
    }

    /* Wyświetlanie 1 zdjęcia na całą szerokość zamiast wąskich pasków */
    .carousel-slide {
        flex: 0 0 100%;
        cursor: default;
        pointer-events: none; /* Blokada kliknięcia/powiększenia na mobile */
    }

    .carousel-slide img {
        height: 400px; /* Wyższa miniatura dla lepszej prezentacji */
        filter: grayscale(0%);
        opacity: 1;
    }

    /* Stylizacja strzałek jako przycisków nałożonych na zdjęcie */
    .carousel-btn {
        background: rgba(255, 255, 255, 0.9);
        color: #060912;
        width: 45px;
        height: 45px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        pointer-events: auto; /* Strzałki muszą pozostać klikalne */
    }

    .carousel-btn.prev { left: 15px; }
    .carousel-btn.next { right: 15px; }

    /* Ukrycie elementów lightboxa na mobile */
    .lightbox, .close-tag {
        display: none !important;
    }
}

/* ==========================================================================
   LIGHTBOX (DESKTOP ONLY)
   ========================================================================== */
.lightbox {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(6, 9, 18, 0.98);
    z-index: 20000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.lightbox-content-wrapper {
    position: relative;
    width: clamp(300px, 85vw, 800px);
    margin: auto;
    transform: scale(0.94);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox.active .lightbox-content-wrapper {
    transform: scale(1);
    opacity: 1;
    transition-delay: 0.1s;
}

#lightboxImg {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 30px 90px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.05);
}

.close-tag {
    position: absolute;
    top: -40px;
    right: 0;
    background: var(--clr-accent);
    color: #fff;
    padding: 8px 25px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    cursor: pointer;
    z-index: 20001;
}

.lightbox-caption {
    color: #fff;
    text-align: center;
    margin-top: 25px;
    font-weight: 200;
    letter-spacing: 1px;
    font-size: 0.95rem;
}
