/* ======================================================
   CEZEL 2.0
   GALLERY.CSS
   REALIZACJE — WERSJA PRODUKCYJNA
====================================================== */


/* ======================================================
   SEKCJA REALIZACJE
====================================================== */

.gallery {

    background: #ffffff;

    padding: 120px 0;

}


/* ======================================================
   KONTENER
====================================================== */

.gallery-container {

    width: min(1200px, 90%);

    margin: 0 auto;

}


/* ======================================================
   NAGŁÓWEK
====================================================== */

.gallery-header {

    max-width: 760px;

    margin: 0 auto 70px;

    text-align: center;

}

.gallery-header h2 {

    font-family: var(--font-heading);

    font-size: 52px;

    font-weight: 700;

    color: var(--color-dark);

    margin-bottom: 24px;

}

.gallery-header p {

    font-size: 20px;

    line-height: 1.8;

    color: #666;

}


/* ======================================================
   KATEGORIE
====================================================== */

.gallery-categories {

    display: flex;

    justify-content: center;

    flex-wrap: wrap;

    gap: 12px;

    margin-bottom: 45px;

}

.gallery-category {

    border: 0;

    background: transparent;

    padding: 10px 18px;

    font-family: inherit;

    font-size: 16px;

    color: #666;

    cursor: pointer;

    transition: .3s;

}

.gallery-category:hover {

    color: var(--color-dark);

}

.gallery-category.active {

    color: var(--color-dark);

    font-weight: 600;

}


/* ======================================================
   GŁÓWNA GALERIA
====================================================== */

.gallery-viewer {

    position: relative;

    width: 100%;

    overflow: hidden;

    border-radius: 20px;

    background: #f3f1ee;

    box-shadow: 0 12px 35px rgba(0,0,0,.07);

}


/* ======================================================
   GŁÓWNE ZDJĘCIE
====================================================== */

.gallery-main {

    position: relative;

    width: 100%;

    height: 650px;

    overflow: hidden;

    cursor: pointer;

}

.gallery-main img {

    width: 100%;

    height: 100%;

    object-fit: contain;

    display: block;

    transition: opacity .45s ease;

}


/* ======================================================
   WARSTWA STEROWANIA
====================================================== */

.gallery-controls {

    position: absolute;

    left: 50%;

    bottom: 24px;

    transform: translateX(-50%);

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 8px 12px;

    background: rgba(0,0,0,.45);

    backdrop-filter: blur(8px);

    border-radius: 14px;

    opacity: 0;

    visibility: hidden;

    transition: .3s;

    z-index: 5;

}

.gallery-viewer.is-active .gallery-controls {

    opacity: 1;

    visibility: visible;

}


/* ======================================================
   PRZYCISKI
====================================================== */

.gallery-control {

    width: 42px;

    height: 42px;

    border: 0;

    border-radius: 10px;

    background: transparent;

    color: #ffffff;

    font-size: 20px;

    cursor: pointer;

    transition: .25s;

}

.gallery-control:hover {

    background: rgba(255,255,255,.16);

}


/* ======================================================
   PASEK MINIATUREK
====================================================== */

.gallery-thumbs {

    position: absolute;

    left: 0;

    bottom: 0;

    width: 100%;

    display: flex;

    align-items: center;

    gap: 8px;

    padding: 12px 16px;

    overflow-x: auto;

    background: rgba(0,0,0,.42);

    backdrop-filter: blur(8px);

    opacity: 0;

    visibility: hidden;

    transform: translateY(10px);

    transition: .3s;

    z-index: 4;

}

.gallery-viewer.show-thumbs .gallery-thumbs {

    opacity: 1;

    visibility: visible;

    transform: translateY(0);

    pointer-events: auto;

}


/* ======================================================
   MINIATURA
====================================================== */

.gallery-thumb {

    flex: 0 0 90px;

    width: 90px;

    height: 62px;

    padding: 0;

    border: 2px solid transparent;

    border-radius: 8px;

    overflow: hidden;

    background: transparent;

    cursor: pointer;

    opacity: .72;

    transition: .25s;

}

.gallery-thumb:hover {

    opacity: 1;

}

.gallery-thumb.active {

    border-color: #ffffff;

    opacity: 1;

}

.gallery-thumb img {

    width: 100%;

    height: 100%;

    object-fit: cover;

    display: block;

}


/* ======================================================
   INFORMACJA O AUTENTYCZNOŚCI
====================================================== */

.gallery-note {

    margin-top: 28px;

    text-align: center;

    font-size: 14px;

    color: #777;

}


/* ======================================================
   PEŁNY EKRAN
====================================================== */

.gallery-lightbox {

    position: fixed;

    inset: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 30px;

    background: rgba(0,0,0,.94);

    opacity: 0;

    visibility: hidden;

    transition: .3s;

    z-index: 9999;

}

.gallery-lightbox.is-open {

    opacity: 1;

    visibility: visible;

}

.gallery-lightbox img {

    max-width: 95vw;

    max-height: 90vh;

    object-fit: contain;

    display: block;

}


/* ======================================================
   ZAMKNIĘCIE PEŁNEGO EKRANU
====================================================== */

.gallery-lightbox-close {

    position: absolute;

    top: 24px;

    right: 24px;

    width: 46px;

    height: 46px;

    border: 0;

    border-radius: 50%;

    background: rgba(255,255,255,.12);

    color: #ffffff;

    font-size: 28px;

    cursor: pointer;

}

/* ======================================================
   STRZAŁKI — PEŁNY EKRAN
====================================================== */

/* ======================================================
   STEROWANIE — PEŁNY EKRAN DESKTOP
====================================================== */

.gallery-lightbox-prev,
.gallery-lightbox-next {

    position: absolute;

    top: 50%;

    transform: translateY(-50%);

    width: 34px;

    height: 70px;

    border: 0;

    border-radius: 6px;

    background: rgba(255,255,255,.07);

    color: rgba(255,255,255,.9);

    font-size: 26px;

    line-height: 1;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;

    opacity: 0;

    visibility: hidden;

    transition:
        opacity .25s ease,
        background .25s ease;

    z-index: 10;

}

.gallery-lightbox-prev {

    left: 24px;

}

.gallery-lightbox-next {

    right: 24px;

}

.gallery-lightbox-prev:hover,
.gallery-lightbox-next:hover {

    background: rgba(255,255,255,.14);

}

.gallery-lightbox-controls {

    position: absolute;

    left: 50%;

    bottom: 28px;

    transform: translateX(-50%);

    display: flex;

    align-items: center;

    gap: 0;

    padding: 7px 10px;

    background: rgba(0,0,0,.55);

    backdrop-filter: blur(8px);

    border-radius: 10px;

    opacity: 0;

    visibility: hidden;

    transition: opacity .25s ease;

    z-index: 10;

}

.gallery-lightbox-controls button {

    border: 0;

    background: transparent;

    color: #ffffff;

    cursor: pointer;

}

.gallery-lightbox-play {

    width: 42px;

    height: 38px;

    font-size: 20px;

}

.gallery-lightbox-counter {

    min-width: 70px;

    padding: 0 12px;

    color: #ffffff;

    font-size: 14px;

    text-align: center;

}

.gallery-lightbox-speed {

    min-width: 55px;

    height: 38px;

    padding: 0 10px;

    color: #ffffff;

    font-size: 14px;

}

.gallery-lightbox-speed:hover {

    background: rgba(255,255,255,.10);

    border-radius: 6px;

}

.gallery-lightbox-speed-menu {

    position: absolute;

    right: 0;

    bottom: 48px;

    min-width: 120px;

    padding: 6px;

    background: rgba(20,20,20,.95);

    backdrop-filter: blur(10px);

    border-radius: 8px;

    box-shadow: 0 8px 25px rgba(0,0,0,.35);

    display: none;

}

.gallery-lightbox-speed-menu.is-open {

    display: block;

}

.gallery-lightbox-speed-menu button {

    display: block;

    width: 100%;

    padding: 8px 10px;

    border-radius: 5px;

    color: #ffffff;

    font-size: 13px;

    text-align: left;

}

.gallery-lightbox-speed-menu button:hover {

    background: rgba(255,255,255,.12);

}

.gallery-lightbox.show-prev
.gallery-lightbox-prev {

    opacity: 1;

    visibility: visible;

}

.gallery-lightbox.show-next
.gallery-lightbox-next {

    opacity: 1;

    visibility: visible;

}

.gallery-lightbox.show-bottom
.gallery-lightbox-controls {

    opacity: 1;

    visibility: visible;

}

.gallery-lightbox.show-controls
.gallery-lightbox-controls {

    opacity: 1;

    visibility: visible;

}


/* ======================================================
   RESPONSYWNOŚĆ
====================================================== */

@media (max-width: 900px) {

    .gallery {

        padding: 90px 0;

    }

    .gallery-main {

        height: 520px;

    }

}


@media (max-width: 600px) {

    .gallery {

        padding: 55px 0 35px;

    }

    .gallery-container {

        width: 94%;

    }

    .gallery-header {

        max-width: 100%;

        margin-bottom: 16px;

    }

    .gallery-header h2 {

        font-size: 30px;

        line-height: 1.15;

        margin-bottom: 8px;

    }

    .gallery-header p {

        font-size: 18px;

        line-height: 1.35;

    }

    .gallery-categories {

        gap: 2px 8px;

        margin-bottom: 16px;

    }

    .gallery-category {

        font-size: 16px;

        padding: 5px 7px;

    }

    .gallery-viewer {

        width: 100%;

        border-radius: 14px;

    }

    .gallery-main {

        height: 320px;

    }

    .gallery-note {

        margin-top: 18px;

        font-size: 13px;

        line-height: 1.4;

    }

    .gallery-thumb {

        flex-basis: 72px;

        width: 72px;

        height: 50px;

    }

    .gallery-control {
        width: 42px;
        height: 42px;
        padding: 0;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0;
    }

    #gallery-prev::before,
    #gallery-next::before {
        content: "";
        position: absolute;
        width: 18px;
        height: 2px;
        background: #ffffff;
    }

    #gallery-prev::after,
    #gallery-next::after {
        content: "";
        position: absolute;
        width: 7px;
        height: 7px;
        border-bottom: 2px solid #ffffff;
        border-left: 2px solid #ffffff;
    }

    #gallery-prev::after {
        transform: rotate(45deg);
        left: 14px;
    }

    #gallery-next::after {
        transform: rotate(225deg);
        right: 14px;
    }

    #gallery-play {
        font-size: 23px;
        transform: translateY(-2px);
    }

}

/* ======================================================
   TRYB ODTWARZANIA — UKRYCIE STEROWANIA
====================================================== */

/* ======================================================
   TRYB ODTWARZANIA — UKRYCIE STEROWANIA
====================================================== */

.gallery-viewer.is-playing .gallery-controls {

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

}

/* ======================================================
   STREFA NAJECHANIA — DOLNA CZĘŚĆ GALERII
====================================================== */

.gallery-main {
    position: relative;
}

.gallery-main::after {

    content: "";

    position: absolute;

    left: 0;

    bottom: 0;

    width: 100%;

    height: 80px;

    z-index: 3;

}


/* ======================================================
   MINIATURY PO NAJECHANIU NA DÓŁ ZDJĘCIA
====================================================== */

.gallery-viewer.show-thumbs .gallery-thumbs {

    opacity: 1;

    visibility: visible;

    transform: translateY(0);

    pointer-events: auto;

}


/* ======================================================
   GALERIA — NATYWNY TRYB PEŁNOEKRANOWY
====================================================== */

.gallery-lightbox:fullscreen {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    box-sizing: border-box;
    background: rgba(0, 0, 0, .96);
}

.gallery-lightbox:fullscreen img {
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
}
