/* =========================================================
   ZIELONE DRZEWKO - GRAFICZNY SLIDER HOME
   Moduł dopasowany do naturalnych proporcji grafiki
========================================================= */

.zd-graphic-slider {
    position: relative;
    width: min(1240px, calc(100% - 32px));
    margin: 34px auto 34px;
    overflow: hidden;
    border-radius: 34px;
    background: #eef4e8;
    box-shadow: 0 24px 70px rgba(15, 54, 36, 0.12);
}

.zd-graphic-slider-track {
    position: relative;
    width: 100%;
}

.zd-graphic-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(1.006);
    transition: opacity 0.55s ease, transform 0.55s ease, visibility 0.55s ease;
}

.zd-graphic-slide.is-active {
    position: relative;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: scale(1);
}

.zd-graphic-slide-link {
    display: block;
    width: 100%;
    height: auto;
    text-decoration: none;
    color: inherit;
}

.zd-graphic-slide picture {
    display: block;
    width: 100%;
    height: auto;
}

.zd-graphic-slide img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    object-position: center;
    background: #f7f5ec;
}

/* Nawigacja */

.zd-hero-nav {
    position: absolute;
    top: 50%;
    z-index: 6;
    width: 46px;
    height: 46px;
    transform: translateY(-50%);
    border-radius: 999px;
    border: 1px solid rgba(23, 77, 45, 0.16);
    background: rgba(255, 255, 255, 0.86);
    color: #143c25;
    cursor: pointer;
    font-size: 2rem;
    line-height: 1;
    font-weight: 800;
    box-shadow: 0 14px 34px rgba(15, 54, 36, 0.14);
    transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.zd-hero-nav:hover {
    background: #ffffff;
    transform: translateY(-50%) scale(1.04);
    box-shadow: 0 18px 42px rgba(15, 54, 36, 0.18);
}

.zd-hero-nav.prev {
    left: 18px;
}

.zd-hero-nav.next {
    right: 18px;
}

/* Kropki */

.zd-hero-dots {
    position: absolute;
    z-index: 7;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    backdrop-filter: blur(10px);
}

.zd-hero-dots button {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(23, 77, 45, 0.32);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.zd-hero-dots button.is-active {
    width: 30px;
    background: #174d2d;
}

/* Pasek postępu */

.zd-hero-progress {
    position: absolute;
    z-index: 7;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: rgba(23, 77, 45, 0.12);
}

.zd-hero-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: #174d2d;
}

.zd-graphic-slider.is-running .zd-hero-progress span {
    animation: zdHeroProgress 5s linear forwards;
}

@keyframes zdHeroProgress {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

/* Dark mode */

html[data-theme="dark"] .zd-graphic-slider,
html.dark .zd-graphic-slider,
body.dark .zd-graphic-slider {
    background: #0b1b14;
    box-shadow: 0 24px 74px rgba(0, 0, 0, 0.42);
}

html[data-theme="dark"] .zd-graphic-slide img,
html.dark .zd-graphic-slide img,
body.dark .zd-graphic-slide img {
    background: #0b1b14;
}

html[data-theme="dark"] .zd-hero-nav,
html.dark .zd-hero-nav,
body.dark .zd-hero-nav {
    background: rgba(12, 27, 20, 0.84);
    border-color: rgba(210, 232, 184, 0.18);
    color: #edf6e9;
}

html[data-theme="dark"] .zd-hero-nav:hover,
html.dark .zd-hero-nav:hover,
body.dark .zd-hero-nav:hover {
    background: rgba(18, 42, 29, 0.94);
}

html[data-theme="dark"] .zd-hero-dots,
html.dark .zd-hero-dots,
body.dark .zd-hero-dots {
    background: rgba(12, 27, 20, 0.48);
}

html[data-theme="dark"] .zd-hero-dots button,
html.dark .zd-hero-dots button,
body.dark .zd-hero-dots button {
    background: rgba(237, 246, 233, 0.34);
}

html[data-theme="dark"] .zd-hero-dots button.is-active,
html.dark .zd-hero-dots button.is-active,
body.dark .zd-hero-dots button.is-active,
html[data-theme="dark"] .zd-hero-progress span,
html.dark .zd-hero-progress span,
body.dark .zd-hero-progress span {
    background: #c8ec84;
}

/* Mobile */

@media (max-width: 760px) {
    .zd-graphic-slider {
        width: min(100% - 22px, 1240px);
        margin-top: 22px;
        margin-bottom: 28px;
        border-radius: 24px;
    }

    .zd-hero-nav {
        width: 40px;
        height: 40px;
        font-size: 1.75rem;
    }

    .zd-hero-nav.prev {
        left: 12px;
    }

    .zd-hero-nav.next {
        right: 12px;
    }

    .zd-hero-dots {
        bottom: 14px;
    }
}