/* ==================================================
   ELEMENTY KLIKALNE
   ================================================== */

a,
button,
[role="button"] {
    -webkit-tap-highlight-color: transparent;
}


/* ==================================================
   HEADER
   ================================================== */

header {
    position: sticky;
    top: 0;
    z-index: 1000;

    background: #fff;
    border-bottom: 1px solid #ddd;

    transition:
        box-shadow 0.3s ease,
        transform 0.3s ease;
}

header.scrolled {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}


/* ==================================================
   NAV
   ================================================== */

.nav {
    max-width: 1200px;
    min-height: 82px;

    margin: 0 auto;
    padding: 0 25px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    transition: min-height 0.35s ease;
}

header.scrolled .nav {
    min-height: 44px;
}


/* ==================================================
   LOGO
   ================================================== */

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    display: block;
    width: auto;
    height: 55px;

    transition: height 0.35s ease;
}

header.scrolled .logo img {
    height: 30px;
}


/* ==================================================
   GŁÓWNE MENU
   ================================================== */

.menu {
    list-style: none;

    display: flex;
    align-items: center;

    gap: 34px;
}

.menu li {
    position: relative;
}

.menu > li > a {
    display: block;

    color: #222;
    text-decoration: none;

    font-size: 15px;
    font-weight: 600;

    padding: 30px 0;

    transition:
        padding 0.35s ease,
        color 0.25s ease;
}

header.scrolled .menu > li > a {
    padding: 12px 0;
}

.menu > li > a:hover,
.menu > li > a.active {
    color: #39704b;
}


/* ==================================================
   ANIMOWANA LINIA - GŁÓWNE MENU
   ================================================== */

.menu > li > a .menu-text {
    position: relative;
    display: inline-block;
}

.menu > li > a .menu-text::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: -5px;

    width: 0;
    height: 2px;

    background: currentColor;

    transition: width 0.25s ease;
}

.menu > li > a:hover .menu-text::after,
.menu > li > a.active .menu-text::after {
    width: 100%;
}


/* ==================================================
   SUBMENU - DESKTOP
   ================================================== */

.submenu {
    display: none;

    position: absolute;
    z-index: 100;

    top: 100%;
    left: -20px;

    width: 260px;

    background: #fff;
    border: 1px solid #e3e3e3;

    list-style: none;

    padding: 10px 20px;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.submenu a {
    position: relative;

    display: table;

    color: #222;
    text-decoration: none;

    padding: 12px 0;

    font-size: 15px;
    font-weight: 400;
}

.submenu a:hover,
.submenu a.active {
    color: #39704b;
}

.menu li:hover > .submenu {
    display: block;
}


/* ==================================================
   ANIMOWANA LINIA - SUBMENU
   ================================================== */

.submenu a::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: 7px;

    width: 0;
    height: 2px;

    background: currentColor;

    transition: width 0.25s ease;
}

.submenu a:hover::after,
.submenu a.active::after {
    width: 100%;
}


/* ==================================================
   HAMBURGER
   ================================================== */

.hamburger {
    display: none;

    width: 42px;
    height: 42px;

    border: 0;
    background: transparent;

    cursor: pointer;

    padding: 7px;
}

.hamburger span {
    display: block;

    width: 27px;
    height: 2px;

    margin: 6px auto;

    background: #234d32;

    transition: 0.25s ease;
}


/* ==================================================
   TELEFON / TABLET
   ================================================== */

@media (max-width: 850px) {

    .nav {
    min-height: 72px;
    padding: 0 20px;

    }

    .logo img {
        height: 50px;
    }

    header.scrolled .nav {
        min-height: 44px;

        padding-top: 0;
        padding-bottom: 0;
    }

    header.scrolled .logo img {
        height: 30px;
    }

header.scrolled .menu > li > a {
    padding: 14px 5px;
}
    /* =============================================
       HAMBURGER
       ============================================= */

    .hamburger {
        display: block;
    }


    /* =============================================
       PŁYNNE OTWIERANIE / ZAMYKANIE MENU
       ============================================= */

    .menu {
        display: flex;

        position: absolute;
        z-index: 1000;

        top: 100%;
        left: 0;
        right: 0;

        flex-direction: column;
        align-items: stretch;

        gap: 0;

        background: #fff;

        max-height: 0;
        opacity: 0;

        overflow: hidden;

        padding: 0 20px;

        border-top: 0 solid #eee;

        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);

        pointer-events: none;

        transition:
            max-height 0.5s ease,
            opacity 0.35s ease,
            padding 0.5s ease;
    }

    .menu.active {
        max-height: 700px;
        opacity: 1;

        padding: 10px 20px 20px;

        border-top-width: 1px;

        pointer-events: auto;
    }


    /* =============================================
       LINKI GŁÓWNE
       ============================================= */

    .menu > li > a {
        padding: 14px 5px;

        font-size: 16px;

        border-bottom: 1px solid #eee;
    }


    /* =============================================
       SUBMENU OFERTY
       W HAMBURGERZE ZAWSZE WIDOCZNE
       ============================================= */

    .menu .has-submenu .submenu {
        display: block;

        position: static;

        width: auto;

        opacity: 1;
        visibility: visible;

        transform: none;

        background: transparent;

        border: 0;

        box-shadow: none;

        padding: 0 0 5px 18px;
        margin: 0;
    }

    .menu .has-submenu:hover > .submenu {
        display: block;
    }


    /* =============================================
       LINKI SUBMENU
       ============================================= */

    .submenu a {
        display: table;

        padding: 10px 5px;

        margin-left: 10px;

        font-size: 14px;
        font-weight: 400;
    }

    .submenu a::after {
        left: 5px;
        bottom: 4px;
    }

    .submenu a:hover::after,
    .submenu a.active::after {
        width: calc(100% - 10px);
    }


    /* =============================================
       OFERTA BEZ LINII W HAMBURGERZE
       ============================================= */

    #offerToggle .menu-text::after,
    #offerToggle:hover .menu-text::after,
    #offerToggle.active .menu-text::after {
        width: 0 !important;
    }

    .menu .has-submenu > a.active::after {
        width: 0;
    }
}