/* Header dropdowns: a floating card with icon tiles, built from the site tokens
   (brand gradient, #f3f6f9 surfaces, 20px radius, tooltip shadow). Icons are CSS masks keyed by href. */

/* an empty "configurator" link in the CMS menu only adds a blank row */
.nav__sublink:empty {
    display: none;
}

.nav__sublink {
    --nav-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M5 12h14M13 6l6 6-6 6%22/%3E%3C/svg%3E");
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    min-height: 56px;
    padding: 8px 14px 8px 8px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.25;
    color: #14233c;
    transition: background-color .2s ease, color .2s ease;
}

/* icon tile */
.nav__sublink::before {
    content: '';
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(85.41deg, rgba(0, 187, 228, .12) 40.54%, rgba(162, 213, 55, .14) 102.22%);
    transition: background .2s ease;
}

/* icon: the brand gradient seen through the line icon */
.nav__sublink::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 17px;
    width: 22px;
    height: 22px;
    margin-top: -11px;
    background: linear-gradient(135deg, #00a2de 30%, #7cc95a 100%);
    -webkit-mask: var(--nav-icon) center / contain no-repeat;
    mask: var(--nav-icon) center / contain no-repeat;
}

.nav__sublink:hover,
.nav__sublink:focus-visible {
    background-color: #f3f6f9;
    color: #00a2de;
    outline: none;
}

.nav__sublink:hover::before,
.nav__sublink:focus-visible::before,
.nav__sublink--current::before {
    background: linear-gradient(85.41deg, #00bbe4 40.54%, #a2d537 102.22%);
}

.nav__sublink:hover::after,
.nav__sublink:focus-visible::after,
.nav__sublink--current::after {
    background: #fff;
}

.nav__sublink--current {
    color: #00a2de;
}

.nav__sublink[href*="/private/wellcombo/"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M12 3.5 3.5 8 12 12.5 20.5 8z%22/%3E%3Cpath d=%22M3.5 12 12 16.5 20.5 12%22/%3E%3Cpath d=%22M3.5 16 12 20.5 20.5 16%22/%3E%3C/svg%3E"); }
.nav__sublink[href*="/private/internet/"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M3 9.5c5-4.7 13-4.7 18 0%22/%3E%3Cpath d=%22M6.3 13c3.2-2.9 8.2-2.9 11.4 0%22/%3E%3Cpath d=%22M9.6 16.5c1.4-1.2 3.4-1.2 4.8 0%22/%3E%3Ccircle cx=%2212%22 cy=%2219.6%22 r=%22.6%22/%3E%3C/svg%3E"); }
.nav__sublink[href*="/private/tv/"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%223%22 y=%226.5%22 width=%2218%22 height=%2212%22 rx=%222.5%22/%3E%3Cpath d=%22M9 21.5h6%22/%3E%3Cpath d=%22M8.5 2.5 12 6.5l3.5-4%22/%3E%3C/svg%3E"); }
.nav__sublink[href*="domofon"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%226%22 y=%222.5%22 width=%2212%22 height=%2219%22 rx=%223%22/%3E%3Ccircle cx=%2212%22 cy=%228.5%22 r=%222.5%22/%3E%3Cpath d=%22M9.5 14.5h5M9.5 17.5h5%22/%3E%3C/svg%3E"); }
.nav__sublink[href*="videonablyudenie"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%222.5%22 y=%226.5%22 width=%2213%22 height=%2211%22 rx=%222.5%22/%3E%3Cpath d=%22m15.5 10.5 6-3.5v10l-6-3.5%22/%3E%3C/svg%3E"); }
.nav__sublink[href*="stocks"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M3.5 3.5h8l9 9-8 8-9-9z%22/%3E%3Ccircle cx=%228%22 cy=%228%22 r=%221.3%22/%3E%3C/svg%3E"); }
.nav__sublink[href*="/private/tariffs/"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%224.5%22 y=%223%22 width=%2215%22 height=%2218%22 rx=%223%22/%3E%3Cpath d=%22M8.5 8h7M8.5 12h7M8.5 16h4%22/%3E%3C/svg%3E"); }
.nav__sublink[href*="/private/socialnye-tarify/"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M12 20s-8-4.8-8-10.5A4.5 4.5 0 0 1 12 6.8a4.5 4.5 0 0 1 8 2.7C20 15.2 12 20 12 20z%22/%3E%3C/svg%3E"); }
.nav__sublink[href*="/contacts/"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M12 21s-7-6.1-7-11.5a7 7 0 0 1 14 0C19 14.9 12 21 12 21z%22/%3E%3Ccircle cx=%2212%22 cy=%229.5%22 r=%222.5%22/%3E%3C/svg%3E"); }
.nav__sublink[href*="vacancy"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%223%22 y=%227%22 width=%2218%22 height=%2213%22 rx=%222.5%22/%3E%3Cpath d=%22M9 7V5.5A2 2 0 0 1 11 3.5h2a2 2 0 0 1 2 2V7M3 12.5h18%22/%3E%3C/svg%3E"); }
.nav__sublink[href*="#docs"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z%22/%3E%3Cpath d=%22M14 3v5h5M9 13h6M9 17h4%22/%3E%3C/svg%3E"); }
.nav__sublink[href*="internet-dlya-biznesa"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%229%22/%3E%3Cpath d=%22M3 12h18M12 3c2.5 2.6 3.7 5.6 3.7 9s-1.2 6.4-3.7 9M12 3c-2.5 2.6-3.7 5.6-3.7 9s1.2 6.4 3.7 9%22/%3E%3C/svg%3E"); }
.nav__sublink[href*="wellcom-its"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M4 6.5h9M19 6.5h1M4 12h3M11 12h9M4 17.5h11M19 17.5h1%22/%3E%3Ccircle cx=%2216%22 cy=%226.5%22 r=%222.2%22/%3E%3Ccircle cx=%229%22 cy=%2212%22 r=%222.2%22/%3E%3Ccircle cx=%2217%22 cy=%2217.5%22 r=%222.2%22/%3E%3C/svg%3E"); }
.nav__sublink[href*="arenda-kanalov"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%225.5%22 cy=%2212%22 r=%222.5%22/%3E%3Ccircle cx=%2218.5%22 cy=%225.5%22 r=%222.5%22/%3E%3Ccircle cx=%2218.5%22 cy=%2218.5%22 r=%222.5%22/%3E%3Cpath d=%22m7.8 10.9 8.4-4.2M7.8 13.1l8.4 4.2%22/%3E%3C/svg%3E"); }
.nav__sublink[href*="/smr/"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M9 3v5M15 3v5%22/%3E%3Cpath d=%22M6.5 8h11v3.5a5.5 5.5 0 0 1-11 0z%22/%3E%3Cpath d=%22M12 17v4%22/%3E%3C/svg%3E"); }

@media screen and (min-width: 993px) {
    /* float a little below the header line and slide in gently instead of from 50% down */
    .nav__hidden {
        padding-top: 66px;
        -webkit-transform: translateY(10px);
        transform: translateY(10px);
        transition: opacity .2s ease, transform .2s ease;
    }

    /* keep the parent label highlighted while its card is open */
    .nav__item._active .nav__show {
        color: #00a2de;
    }

    /* the open card is wider than its menu item: only the card itself (plus a small bridge
       over the gap above it) takes the hover, so the neighbouring items stay reachable */
    .nav__item._active .nav__hidden {
        pointer-events: none;
    }

    .nav__item._active .nav__hidden-inner {
        pointer-events: auto;
    }

    .nav__hidden-inner::before {
        content: '';
        position: absolute;
        top: -20px;
        left: 0;
        right: 0;
        height: 20px;
    }

    .nav__hidden-inner.m-dropdown {
        grid-template-columns: minmax(272px, 300px);
        gap: 2px;
        padding: 10px;
        border: 1px solid #eef1f4;
        border-radius: 20px;
        box-shadow: 0 4px 67px rgba(0, 0, 0, .11);
    }

    /* "Частным лицам": two columns of four */
    .nav__show[data-url*="/private/"] ~ .nav__hidden .nav__hidden-inner {
        grid-template-columns: repeat(2, 272px);
        grid-template-rows: repeat(4, auto);
        grid-auto-flow: column;
        column-gap: 6px;
    }
}

@media screen and (max-width: 992px) {
    /* the site lets the burger shrink to 0px wide on 320px screens */
    .header__burger {
        flex-shrink: 0;
    }

    .nav__hidden-inner {
        gap: 4px;
    }

    .nav__sublink {
        min-height: 52px;
        padding: 6px 12px 6px 6px;
        font-size: 17px;
    }

    .nav__sublink::before {
        width: 38px;
        height: 38px;
        border-radius: 11px;
    }

    .nav__sublink::after {
        left: 14px;
    }
}
