.site-header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: height 0.3s ease, background-color 0.3s ease;
    height: calc(var(--logo-size, 70px) + 20px);
    background-color: <?php echo esc_attr(get_option('adam_g_header_settings_header_background_color', '#CCC')); ?>;
}

.site-header.sticky {
    height: calc((var(--logo-size, 70px) / 2) + 20px);
}

.header-inner {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-branding a {
    display: contents;
}

.custom-logo {
    height: var(--logo-size, 70px);
    width: calc(var(--logo-size, 70px) * 3 / 5);
    margin: 10px;
    object-fit: contain;
}

.site-header.sticky .custom-logo {
    height: calc(var(--logo-size, 70px) / 2);
    width: calc((var(--logo-size, 70px) * 3 / 5) / 2);
    margin: 10px;
}

.custom-logo path {
    transition: fill 0.3s ease;
}

.custom-logo path {
    fill: <?php echo esc_attr(get_option('adam_g_branding_settings_logo_color', '#000000')); ?>;
}

.site-header.sticky .custom-logo path {
    fill: <?php echo esc_attr(get_option('adam_g_branding_settings_logo_color_sticky', '#000000')); ?>;
}

/* Responsywność */
@media (max-width: 576px) {
    .custom-logo {
        height: var(--logo-size, 70px);
        width: calc(var(--logo-size, 70px) * 3 / 5);
        margin: 10px;
    }

    .site-header.sticky .custom-logo {
        height: calc(var(--logo-size, 70px) / 2);
        width: calc((var(--logo-size, 70px) * 3 / 5) / 2);
        margin: 10px;
    }
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-grow: 1;
}

.main-navigation {
    display: flex;
    align-items: center;
}

#primary-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

#primary-menu li {
    margin-left: 1.5rem;
}

#primary-menu a {
    color: #3f3f46;
    text-decoration: none;
    font-size: min(1rem, 2.5vw);
    transition: color 0.3s ease;
}

#primary-menu a:hover {
    color: #e11d48;
}

.toggle {
    display: none;
    cursor: pointer;
}

.toggle input {
    display: none;
}

.toggle input:checked ~ #nav-icon2 {
    transform: rotate(90deg);
}

#nav-icon2 {
    width: 42px;
    height: 32px;
    position: relative;
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    transform: rotate(0deg);
    -webkit-transition: 0.5s ease-in-out;
    -moz-transition: 0.5s ease-in-out;
    -o-transition: 0.5s ease-in-out;
    transition: 0.5s ease-in-out;
    cursor: pointer;
}

#nav-icon2 span {
    display: block;
    position: absolute;
    height: 6px;
    width: 50%;
    background: #2a2a2a;
    opacity: 1;
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    transform: rotate(0deg);
    -webkit-transition: 0.25s ease-in-out;
    -moz-transition: 0.25s ease-in-out;
    -o-transition: 0.25s ease-in-out;
    transition: 0.25s ease-in-out;
}

#nav-icon2 span:nth-child(even) {
    left: 50%;
    border-radius: 0 6px 6px 0;
}

#nav-icon2 span:nth-child(odd) {
    left: 0px;
    border-radius: 6px 0 0 6px;
}

#nav-icon2 span:nth-child(1), #nav-icon2 span:nth-child(2) {
    top: 0px;
}

#nav-icon2 span:nth-child(3), #nav-icon2 span:nth-child(4) {
    top: 12.6px;
}

#nav-icon2 span:nth-child(5), #nav-icon2 span:nth-child(6) {
    top: 25.2px;
}

#nav-icon2.open span:nth-child(1), #nav-icon2.open span:nth-child(6) {
    -webkit-transform: rotate(45deg);
    -moz-transform: rotate(45deg);
    -o-transform: rotate(45deg);
    transform: rotate(45deg);
}

#nav-icon2.open span:nth-child(2), #nav-icon2.open span:nth-child(5) {
    -webkit-transform: rotate(-45deg);
    -moz-transform: rotate(-45deg);
    -o-transform: rotate(-45deg);
    transform: rotate(-45deg);
}

#nav-icon2.open span:nth-child(1) {
    left: 3.5px;
    top: 4.9px;
}

#nav-icon2.open span:nth-child(2) {
    left: calc(50% - 3.5px);
    top: 4.9px;
}

#nav-icon2.open span:nth-child(3) {
    left: -50%;
    opacity: 0;
}

#nav-icon2.open span:nth-child(4) {
    left: 100%;
    opacity: 0;
}

#nav-icon2.open span:nth-child(5) {
    left: 3.5px;
    top: 20.3px;
}

#nav-icon2.open span:nth-child(6) {
    left: calc(50% - 3.5px);
    top: 20.3px;
}

.nav-controls {
    display: flex;
    align-items: center;
}

.nav-controls .toggle {
    margin-right: 2.5rem;
}

@media (max-width: 992px) {
    .main-navigation {
        display: none;
    }

    .main-navigation.active {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #CCC;
        border-top: 1px solid #e7e5e4;
        padding: 1rem;
    }

    #primary-menu {
        flex-direction: column;
        align-items: flex-start;
    }

    #primary-menu li {
        margin: 0.5rem 0;
    }

    .toggle {
        display: flex;
    }
}

@media (max-width: 576px) {
    .site-branding .custom-logo {
        height: 40px;
        width: auto;
        margin: 10px;
    }

    .site-header.sticky .custom-logo {
        height: 20px;
        width: auto;
        margin: 10px;
    }
}