/* ===== MEGAMENU — based on 22clinic, adapted for auto-online ===== */
.b-14 {
    position: fixed;
    top: 0;
    z-index: 999;
    width: 100%;
    box-sizing: border-box;
    background: rgba(255,255,255,0.95);
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
}
.b-14:hover { background: #fff; }

.b-14 .menu-list_1 {
    padding: 0 15px;
    position: relative;
    list-style: none;
    margin: 0 auto;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    max-width: 1006px;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
}

.b-14 .menu-item {
    display: inline-block;
    position: relative;
    text-align: left;
}
.b-14 .menu-item_parent { padding-right: 7px; }
.b-14 .menu-list_1 > .menu-item_parent::after {
    border: 4px solid transparent;
    border-top-color: #5e5e5e;
    bottom: 14px;
    content: "";
    position: absolute;
    right: 0;
}

.b-14 .menu-list_1 > .menu-item {
    flex: none;
}
.b-14 .menu-item__link {
    display: block;
    color: #333;
    font-family: 'Roboto Condensed', Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .02em;
    text-decoration: none;
    text-transform: uppercase;
    padding: 14px 10px;
}
.b-14 .menu-item__link_active,
.b-14 .menu-item__link:hover { color: #c00; }

/* CTA — Калькулятор */
.b-14 .menu-list_1 > .menu-item--cta .menu-item__link {
    background: #c00;
    color: #fff;
    border-radius: 3px;
    padding: 8px 16px;
    margin: 6px 0;
}
.b-14 .menu-list_1 > .menu-item--cta .menu-item__link:hover {
    background: #a00;
    color: #fff;
}

/* Level 2 — dropdown */
.b-14 .menu-list_2 {
    display: none;
    background: #c00;
    padding: 8px 0;
    position: absolute;
    top: 100%;
    left: 0;
    white-space: nowrap;
    z-index: 1000;
    list-style: none;
    margin: 0;
    min-width: 240px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.b-14 .menu-list_2::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 100%;
    height: 12px;
}
.b-14 .menu-list_1 > .menu-item:hover > .menu-list_2 { display: block; }

.b-14 .menu-list_2 .menu-item {
    display: block;
    position: relative;
    margin: 0;
}
.b-14 .menu-list_2 .menu-item_parent { padding: 0; }
.b-14 .menu-list_2 .menu-item_parent::after { content: none; }

.b-14 .menu-list_2 .menu-item__link {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 9px 20px;
    letter-spacing: .02em;
}
.b-14 .menu-list_2 .menu-item__link:hover { background: #a00; color: #ffd; }
.b-14 .menu-list_2 .menu-item:hover { background: #a00; }
.b-14 .menu-list_2 .menu-item:hover > .menu-list_3 { display: block; }

/* Level 3 — flyout */
.b-14 .menu-list_3 {
    display: none;
    background: #a00;
    position: absolute;
    left: 100%;
    top: 0;
    padding: 0;
    white-space: nowrap;
    z-index: 1001;
    list-style: none;
    margin: 0;
    min-width: 220px;
    box-shadow: 4px 4px 12px rgba(0,0,0,0.15);
}
.b-14 .menu-list_3 .menu-item { display: block; margin: 0; }
.b-14 .menu-list_3 .menu-item__link {
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 9px 18px;
}
.b-14 .menu-list_3 .menu-item__link:hover { background: #800; color: #ffd; }

/* Body offset */
body { padding-top: 46px !important; }

/* ===== Burger — hidden on desktop ===== */
.b-14 .slideout__toggle-button { display: none; }
.megamenu-burger {
    display: inline-block;
    width: 22px; height: 16px;
    position: relative; cursor: pointer;
}
.megamenu-burger span {
    display: block; width: 100%; height: 2px;
    background: #c00; position: absolute; left: 0;
    transition: 0.3s;
}
.megamenu-burger span:nth-child(1) { top: 0; }
.megamenu-burger span:nth-child(2) { top: 7px; }
.megamenu-burger span:nth-child(3) { top: 14px; }

/* ===== MOBILE ≤ 900px ===== */
@media (max-width: 900px) {
    body { padding-top: 48px !important; }
    .b-14 {
        background: #fff;
        display: flex;
        justify-content: flex-end;
    }
    .b-14 .menu-list_1 {
        display: none;
        flex-direction: column;
        padding: 0;
        text-align: left;
    }
    .b-14 .slideout__toggle-button {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 14px 20px;
        cursor: pointer;
        color: #c00;
        font-size: 22px;
        margin-left: auto;
    }
    .b-14.megamenu--open .menu-list_1 {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: #fff;
        max-height: 80vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    }
    .b-14 .menu-list_1 > .menu-item { flex: none; text-align: left; }
    .b-14 .menu-item__link {
        padding: 14px 20px;
        border-bottom: 1px solid #f0f0f0;
        font-size: 14px;
        line-height: 1.4;
    }
    .b-14 .menu-list_2,
    .b-14 .menu-list_3 {
        position: static;
        display: none;
        box-shadow: none;
        min-width: auto;
    }
    .b-14 .menu-list_2 { background: #f5f5f5; }
    .b-14 .menu-list_3 { background: #eee; }
    .b-14 .menu-list_2 .menu-item__link { color: #555; padding: 12px 20px 12px 36px; }
    .b-14 .menu-list_3 .menu-item__link { color: #555; padding: 12px 20px 12px 52px; }
    .b-14 .menu-list_2 .menu-item__link:hover,
    .b-14 .menu-list_3 .menu-item__link:hover { background: #e8e8e8; color: #c00; }

    /* Click-toggle for mobile */
    .b-14 .menu-item_parent.mm-open > .menu-list_2,
    .b-14 .menu-item_parent.mm-open > .menu-list_3 { display: block; }

    /* Burger X animation */
    .b-14.megamenu--open .megamenu-burger span:nth-child(1) { transform: rotate(45deg); top: 7px; }
    .b-14.megamenu--open .megamenu-burger span:nth-child(2) { opacity: 0; }
    .b-14.megamenu--open .megamenu-burger span:nth-child(3) { transform: rotate(-45deg); top: 7px; }
}
