.nav-menu-open {
    overflow: hidden;
}

.navbar {
    background: linear-gradient(90deg, var(--nav-gradient-start, #007a3d) 0%, var(--nav-primary, #006633) 48%, var(--nav-gradient-end, #004f29) 100%);
    color: #fff;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    box-shadow: 0 14px 34px rgba(0, 68, 30, 0.16);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: min(1200px, calc(100% - 2rem));
    margin: 0 auto;
    min-height: 86px;
    padding: 0.75rem 20px;
}

.logo {
    display: inline-flex;
    align-items: center;
}

.logo img {
    height: 64px;
    display: block;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.75rem 0.95rem;
    border-radius: 999px;
    white-space: nowrap;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    right: 0.95rem;
    bottom: 0.5rem;
    left: 0.95rem;
    height: 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}

.nav-caret {
    display: inline-block;
    margin-left: 0.45rem;
    font-size: 0.58rem;
    vertical-align: middle;
    transition: transform 0.25s ease;
}

.has-submenu > a {
    gap: 0.15rem;
}

.submenu {
    position: absolute;
    top: calc(100% + 0.65rem);
    left: 0;
    min-width: 230px;
    padding: 0.5rem;
    margin: 0;
    list-style: none;
    background: linear-gradient(90deg, var(--nav-gradient-start, #007a3d) 0%, var(--nav-primary, #006633) 48%, var(--nav-gradient-end, #004f29) 100%);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    z-index: 120;
}

.submenu li {
    margin-left: 0;
}

.submenu a {
    display: block;
    padding: 0.8rem 0.95rem;
    color: #fff;
    white-space: nowrap;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.015em;
    border-radius: 12px;
}

.submenu a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.has-submenu:hover .submenu,
.has-submenu:focus-within .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu-toggle {
    display: none;
}

.nav-links a:hover {
    color: #fff;
    background: transparent;
}

.nav-links a:hover::after,
.has-submenu:hover > a::after,
.has-submenu:focus-within > a::after {
    transform: scaleX(1);
}

.has-submenu:hover .nav-caret,
.has-submenu:focus-within .nav-caret {
    transform: rotate(180deg);
}

.nav-social {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-left: 1rem;
}

.nav-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 0 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 700;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.nav-social svg {
    width: 18px;
    height: 18px;
    color: #fff;
    fill: currentColor;
    display: block;
}

.nav-social a:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.36);
    transform: translateY(-1px);
}

.burger {
    display: none;
    cursor: pointer;
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.25s ease, transform 0.25s ease;
}

.truck-icon {
    position: relative;
    display: block;
    width: 28px;
    height: 24px;
}

.truck-bed,
.truck-cab,
.truck-base,
.truck-wheel,
.truck-load {
    position: absolute;
    display: block;
}

.truck-bed {
    top: 3px;
    left: 1px;
    width: 14px;
    height: 8px;
    border: 2px solid #fff;
    border-radius: 3px 3px 2px 2px;
    background: transparent;
    transform-origin: 100% 100%;
    transition: transform 0.3s ease;
}

.truck-cab {
    top: 7px;
    right: 1px;
    width: 9px;
    height: 8px;
    border: 2px solid #fff;
    border-left: 0;
    border-radius: 0 3px 3px 1px;
    background: transparent;
}

.truck-cab::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -5px;
    width: 7px;
    height: 10px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
    border-radius: 0 3px 0 0;
    transform: skewX(-18deg);
}

.truck-base {
    right: 2px;
    bottom: 6px;
    width: 24px;
    height: 2px;
    border-radius: 999px;
    background: #fff;
}

.truck-wheel {
    bottom: 1px;
    width: 6px;
    height: 6px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: transparent;
}

.truck-wheel-left {
    left: 4px;
}

.truck-wheel-right {
    right: 3px;
}

.truck-load {
    top: 0;
    left: 2px;
    width: 10px;
    height: 10px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.truck-load::before,
.truck-load::after {
    content: "";
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fff;
}

.truck-load::before {
    top: 3px;
    left: 0;
}

.truck-load::after {
    top: 7px;
    left: 4px;
}

.toggle .truck-bed {
    transform: rotate(-34deg) translate(-1px, -5px);
}

.toggle .truck-load {
    opacity: 1;
    animation: truckDump 0.7s ease forwards;
}

.toggle .truck-wheel-left,
.toggle .truck-wheel-right {
    animation: truckBounce 0.45s ease;
}

@keyframes truckDump {
    0% {
        transform: translate(0, 0);
        opacity: 0;
    }
    25% {
        opacity: 1;
    }
    100% {
        transform: translate(-6px, 9px);
        opacity: 0;
    }
}

@keyframes truckBounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-1px);
    }
}

@media (max-width: 768px) {
    .navbar .container {
        min-height: 88px;
        padding: 0.9rem 16px;
    }

    .burger {
        display: inline-flex;
    }

    .nav-social {
        margin-left: auto;
        margin-right: 0.55rem;
        gap: 0.4rem;
    }

    .nav-social a {
        min-width: 38px;
        min-height: 38px;
        padding: 0 0.65rem;
    }

    .nav-social svg {
        width: 16px;
        height: 16px;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 0.45rem);
        right: max(0.6rem, env(safe-area-inset-right));
        left: max(0.6rem, env(safe-area-inset-left));
        width: auto;
        max-height: calc(100dvh - 6.2rem);
        overflow-y: auto;
        overflow-x: hidden;
        background: var(--nav-primary, #006633);
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        margin-left: 0;
        gap: 0.38rem;
        padding: 0.8rem;
        border-radius: 22px;
        border: 1px solid rgba(255, 255, 255, 0.14);
        box-shadow: 0 22px 45px rgba(0, 0, 0, 0.26);
        transform: translateY(-12px) scale(0.98);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    }

    .nav-links li {
        opacity: 0;
        width: 100%;
    }

    .nav-links a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 52px;
        padding: 0.85rem 1rem;
        border-radius: 14px;
        font-size: 0.92rem;
        line-height: 1.2;
        white-space: normal;
        background: rgba(255, 255, 255, 0.06);
    }

    .nav-links a::after {
        right: 1rem;
        bottom: 0.42rem;
        left: 1rem;
    }

    .submenu-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .submenu {
        position: static;
        min-width: unset;
        max-height: 0;
        padding: 0;
        width: 100%;
        margin-top: 0.32rem;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 16px;
        box-shadow: none;
        opacity: 0;
        visibility: hidden;
        transform: none;
        overflow: hidden;
        border: 0;
        transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.2s ease;
    }

    .submenu a {
        min-height: 46px;
        padding: 0.78rem 0.95rem 0.78rem 1.15rem;
        color: #fff;
        font-size: 0.86rem;
        line-height: 1.2;
        white-space: normal;
        background: transparent;
    }

    .submenu a:hover {
        background: rgba(255, 255, 255, 0.08);
        color: #fff;
    }

    .has-submenu:hover .submenu,
    .has-submenu:focus-within .submenu {
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        padding: 0;
    }

    .has-submenu.is-open .submenu {
        max-height: 14rem;
        padding: 0.38rem;
        opacity: 1;
        visibility: visible;
    }

    .has-submenu.is-open .nav-caret {
        transform: rotate(180deg);
    }

    .nav-caret {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 34px;
        min-height: 34px;
        margin: -0.35rem -0.35rem -0.35rem 0.45rem;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.08);
    }

    .nav-active {
        transform: translateY(0) scale(1);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav-active li {
        opacity: 1;
    }

    @keyframes navLinkFade {
        from {
            opacity: 0;
            transform: translateX(18px);
        }
        to {
            opacity: 1;
            transform: translateX(0px);
        }
    }
}

@media (max-width: 540px) {
    .navbar .container {
        min-height: 82px;
        padding: 0.75rem 12px;
    }

    .logo img {
        height: 58px;
    }

    .nav-links {
        top: calc(100% + 0.35rem);
        right: max(0.45rem, env(safe-area-inset-right));
        left: max(0.45rem, env(safe-area-inset-left));
        max-height: calc(100dvh - 5.8rem);
        padding: 0.72rem;
        border-radius: 20px;
    }

    .nav-links a {
        min-height: 50px;
        padding: 0.8rem 0.92rem;
        font-size: 0.9rem;
    }

    .submenu a {
        min-height: 44px;
        padding: 0.74rem 0.9rem 0.74rem 1.05rem;
        font-size: 0.84rem;
    }
}

@media (max-width: 380px) {
    .navbar .container {
        min-height: 78px;
        padding: 0.7rem 10px;
    }

    .logo img {
        height: 52px;
    }

    .nav-social {
        margin-right: 0.45rem;
        gap: 0.3rem;
    }

    .nav-social a {
        min-width: 34px;
        min-height: 34px;
        padding: 0 0.55rem;
    }

    .burger {
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }

    .nav-links {
        max-height: calc(100dvh - 5.35rem);
        padding: 0.65rem;
        border-radius: 18px;
    }

    .nav-links a {
        min-height: 48px;
        padding: 0.75rem 0.85rem;
        font-size: 0.86rem;
    }

    .submenu a {
        min-height: 42px;
        padding: 0.7rem 0.82rem 0.7rem 0.98rem;
        font-size: 0.82rem;
    }
}
