/* ## MENU-OPENER ## */
body.open-menu {overflow: hidden;}
.menu-opener {
    z-index: 16000;
    right: 10px;
    top: 11.5px;
    width: 35px;
    height: 35px;
    transform: rotate(0deg);
    transition: .5s ease-in-out;
    cursor: pointer;
    background: transparent;
}
.menu-opener span {
    display: block;
    position: absolute;
    height: 1px;
    left: 5px;
    width: calc(100% - 10px);
    background: #000;
    border-radius: 3px;
    opacity: 1;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}
.menu-opener.open span { height: 2px;}
.menu-opener span:nth-child(1) {top: 8px;}
.menu-opener span:nth-child(2), .menu-opener span:nth-child(3) {top: 16px;}
.menu-opener span:nth-child(4) {top: 24px;}
.menu-opener.open span:nth-child(1) {top: 12px; width: 0; left: 50%;}
.menu-opener.open span:nth-child(2) {transform: rotate(45deg);}
.menu-opener.open span:nth-child(3) {transform: rotate(-45deg);}
.menu-opener.open span:nth-child(4) {top: 10px; width: 0; left: 50%;}

.header {
    height: 125px;
    position: sticky;
    top: 0;
    left: 0;
    z-index: 100;
    background: var(--color-white);
    width: 100%;
    box-shadow: 0 0 2px 3px #b9b9b929;
    transition: all .3s linear;
    display: flex;
}
.header .i-in1 {display: none;}
.header nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.header .i-logo {transition: all .1s linear; max-height: 99px}
.header .i-btn-action {font-size: 16px; color: var(--color-default); text-align: center;}
.header .i-btn-action a:not(.btn) {color: var(--color-default);}
.header .i-btn-action a:not(.btn):hover {color: var(--color-primary);}
.header .i-btn-action.v-mobile {display: none; margin-bottom: 10px;}
.header .i-btn-action.v-mobile .btn {min-height: 40px; height: 40px; font-size: 15px;}

/* .header.v-b2c */
.header.v-b2c {background: var(--color-alt);}

.sm-menu li:hover > .sub-menu {display: block;}
.sm-menu li a {overflow: hidden; position: relative;}


.sm-menu li a span.sub-arrow {
    display: inline-block;
    transition: transform .2s ease-in-out;
}

.sm-menu li a span.sub-arrow::after {
    font-family: "Font Awesome 6 Pro";
    content: "\f078";
    font-weight: 300;
    font-size: 14px;
    color: var(--color-default);
    margin-left: 2px;
    margin-bottom: 2px;
}


.sm-menu li a:hover span.sub-arrow,
.sm-menu li a.highlighted span.sub-arrow {
    transform-origin: center;
}


.sm-menu li a:hover span.sub-arrow::after,
.sm-menu li a.highlighted span.sub-arrow::after {
    color: var(--color-primary);
}

.sm-menu .sub-menu {
    display: none;
    position: absolute;
    min-width: 280px;
    background-color: #fff;
    top: 20px;
    left: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    z-index: 99;
    padding: 15px;
}
.sm-menu .sub-menu li {margin-left: 0; padding: 10px 0;}

/* Desktop styles */
@media screen and (min-width: 1200px) {
    .header .i-social-icons {display: none !important;}

    body.scrolled .header {height: 80px;}
    body.scrolled .header .i-logo {max-height: 50px;}
    body.scrolled .header .i-btn-action .btn {min-height: 30px; height: 30px; font-size: 15px;}

    .sm-menu {
        display: flex;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .sm-menu > li {
        position: relative;
        margin: 0 5px;
        font-size: 20px;
    }

    .sm-menu > li > a {
        display: block;
        padding: 10px 15px;
        color: var(--color-default);
        text-decoration: none;
        transition: color 0.3s ease;
    }

    .sm-menu > li > a:hover,
    .sm-menu > li > a.current {
        color: var(--color-primary) !important;
    }

    /* Główne style dla headera */
    .sm-menu ul {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 250px;
        background: white;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        z-index: 1000;
        list-style: none;
        margin: 0;
    }

    /* Pokazanie submenu przy hover */
    .sm-menu li:hover > ul {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* Style dla linków w submenu */
    .sm-menu ul li {
        margin: 0;
        width: 100%;
    }

    .sm-menu ul li a {
        display: block;
        padding: 12px 20px;
        color: var(--color-default) !important;
        text-decoration: none;
        transition: all 0.3s ease;
        border-left: 3px solid transparent;
        font-size: 16px;
        white-space: nowrap;
    }

    .sm-menu ul li a:hover,
    .sm-menu ul li a.current {
        /*background-color: #f8f9fa;*/
        border-left-color: var(--color-secondary);
        color: var(--color-primary) !important;
        padding-left: 25px;
    }

    /* Dodatkowe animacje dla submenu items */
    .sm-menu ul li {
        animation: fadeInUp 0.3s ease forwards;
        opacity: 0;
        transform: translateY(10px);
    }

    .sub-arrow {
        margin-left: 15px;
        margin-bottom: 2px;
    }
}
@media all and (max-width: 1280px){
    .sm-menu > li {
        font-size: 16px;
    }
}

@media screen and (min-width: 1000px) and (max-width: 1500px) {
    .header .i-logo {max-height: 55px}
}

/* Mobile styles */
@media all and (max-width: 1199px) {
    .header .i-application-link img {max-height: 35px;}
    .header .i-application-link:hover, .header .i-application-link:focus {opacity: .8;}
    .menu-opener {display: block}

    .header {height: 60px; padding:5px 0;}
    .header nav {display: flex; justify-content: space-between; align-items: center; height: unset}
    .header .i-logo {max-height: 35px}
    .header .i-btn-action {display: none;}
    .header .i-btn-action.v-mobile {display: block;}

    .sm-menu li a.highlighted {color: var(--color-primary) !important;}
    .top-menu ul li,
    .top-menu ul div {width: 100%;}
    .bx-flags {order: 3; margin: 40px 0 0 0; padding: 20px 0; display: flex; }

    .top-menu ul li {
        text-align: center;
        font-size: 18px;
    }

    /*.top-menu ul li.current{color:var(--color-secondary);}*/
    body.open-menu {overflow: hidden;}
    .header .i-in1 {display: block;}
    .top-menu {
        position: fixed;
        z-index: 98;
        top: 0;
        left: 0;
        width: 100%;
        height: 0;
        opacity: 0;
        visibility: hidden;
        transition: opacity .35s, visibility .35s, height .35s;
        overflow-y: auto;
        overflow-x: hidden;
        padding-top: 20px;
        background: var(--color-white);
        display: flex;
        flex-direction: column;
    }
    .top-menu.open {
        opacity: 1;
        visibility: visible;
        height: calc(100dvh - 60px);
        overflow-y: auto;
        top: 60px;
    }

    .scrolled .top-menu.open {
        height: calc(100vh - 60px);
    }

    .sm-menu > li {line-height: normal; border-bottom: 1px solid var(--color-gray4); margin: 0;}
    .sm-menu li a {
        color: var(--color-dark);
        padding: 12px 20px;
        position: relative;
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .sm-menu > li > a.current {color: var(--color-secondary-dark);background: rgba(255, 255, 255, .3);}
    .sm-menu ul {display: none; padding: 0 0 15px 30px; margin-bottom: 0;}
    .sm-menu .has-submenu.current + ul {display: block;}
    .sm-menu ul li {margin: 0;}
    .sm-menu ul li a {padding: 10px 0; color: var(--color-default); font-size: 17px;}
    .top-menu.open li {
        animation-name: fadeInUp;
        animation-duration: 0.5s;
    }


    .header.v-b2c .top-menu {background: var(--color-alt);}
}


.sm-menu .highlighted {
    color: var(--color-primary) !important;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}