/* Общая шапка и подвал. Подключается после main.css и site-responsive.css. */
.topbar {
    background: #7f7f7f;
    color: #dedede;
    font-family: "Inter", sans-serif;
}

.topbar__tabs {
    flex-shrink: 0;
}

.topbar__nav {
    gap: 32px;
}

.topbar__link {
    color: #dedede;
    font-family: "Inter", sans-serif;
    font-size: 13px;
    font-weight: 400;
}

.topbar__more {
    position: relative;
}

.topbar__link--more {
    min-height: 40px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #80c552;
    line-height: 1.2;
    cursor: pointer;
}

.topbar__more-icon {
    display: inline-block;
    width: auto;
    height: auto;
    border: 0;
    font-family: "Inter", sans-serif;
    font-size: 15px;
    line-height: 1;
    transform: translateY(-3px);
}

.topbar__dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 60;
    min-width: 220px;
    padding: 8px 0;
    border: 1px solid #d1d1d1;
    border-radius: 0 0 4px 4px;
    background: #fff;
    box-shadow: 0 8px 20px rgb(0 0 0 / 12%);
}

.topbar__dropdown[hidden] {
    display: none;
}

.topbar__dropdown a {
    display: block;
    padding: 11px 18px;
    color: #666;
    font-size: 13px;
    line-height: 1.3;
}

.topbar__dropdown a:hover,
.topbar__dropdown a:focus-visible {
    background: #f5f5f5;
    color: #80c552;
}

.topbar__link--more:focus-visible,
.mainnav__link:focus-visible,
.footer a:focus-visible {
    outline: 2px solid #80c552;
    outline-offset: 4px;
}

.header,
.mainnav {
    background: #fff;
}

.header__phone {
    color: #4c4c4c;
    font-family: "Roboto", sans-serif;
    font-size: 23px;
    font-weight: 300;
}

.header__hours {
    color: #4c4c4c;
    font-family: "Inter", sans-serif;
    font-size: 11px;
    font-weight: 400;
}

.header .link-underline {
    color: #80c552;
    font-family: "Raleway", sans-serif;
    font-size: 13px;
    font-weight: 700;
}

.header__status {
    cursor: default;
}

.mainnav {
    border-color: #d1d1d1;
}

.mainnav__list {
    gap: 18px;
    margin-left: 35px;
}

.mainnav__link {
    color: #7f7f7f;
    font-family: "Raleway", sans-serif;
    font-size: 19px;
    font-weight: 700;
}

.mainnav__link:hover,
.mainnav__link--active {
    color: #80c552;
}

.footer {
    padding: 60px 0 40px;
    background: #fff;
    color: #7f7f7f;
    font-family: "Inter", sans-serif;
}

.footer__inner {
    grid-template-columns: 274px minmax(0, 1fr) minmax(0, 1fr) 260px;
    column-gap: 32px;
    row-gap: 24px;
}

.footer__logo picture,
.footer__social picture {
    display: block;
}

.footer__logo {
    width: 227px;
    min-height: 49px;
}

.footer__navs {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 32px;
}

.footer__col {
    gap: 9.4px;
}

.footer__col--cats {
    gap: 14px;
}

.footer__link {
    color: #929292;
    font-family: "Inter", sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
}

.footer__link--cat {
    font-weight: 700;
}

.footer__phone {
    color: #7f7f7f;
    font-family: "Inter", sans-serif;
    font-size: 23px;
    font-weight: 400;
}

.footer__note {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 400;
}

.footer__email {
    margin-top: 24px;
    color: #7f7f7f;
    font-size: 15px;
    font-weight: 400;
}

.footer__socials {
    gap: 20px;
    margin-top: 23px;
}

.footer__social {
    width: 22px;
    height: 22px;
}

.footer__social--tg img {
    width: 19px;
    height: auto;
}

.footer__social--vk img {
    width: 11.204px;
    height: auto;
}

.footer__social--ok img {
    width: 10px;
    height: auto;
}

.footer__bottom {
    margin-top: 40px;
    padding-top: 34px;
    border-color: #c5c5c5;
}

.footer__copy {
    color: #ababab;
    font-size: 13px;
    font-weight: 400;
}

.footer__credit {
    color: #7f7f7f;
    font-size: 15px;
    font-weight: 400;
}

@media (min-width: 993px) and (max-width: 1230px) {
    .topbar__nav {
        gap: 20px;
    }

    .header__search {
        flex: 1 1 170px;
        min-width: 140px;
        max-width: 240px;
    }

    .header__contacts {
        margin-left: 24px;
    }

    .header__extra {
        margin-left: 20px;
    }

    .footer__inner {
        grid-template-columns: 230px minmax(0, 1fr) minmax(0, 1fr) 233px;
        column-gap: 24px;
    }

    .footer__navs {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 24px;
    }
}

@media (min-width: 993px) and (max-width: 1100px) {
    .header__logo {
        width: 210px;
    }

    .header__search {
        margin-left: 24px;
    }

    .header__contacts {
        margin-left: 20px;
    }

    .header__extra {
        margin-left: 16px;
    }
}

@media (max-width: 992px) {
    .header {
        border-bottom: 1px solid #dedede;
    }

    .header__inner {
        min-height: 60px;
        gap: 32px;
    }

    .header__logo {
        width: 182px;
    }

    .header__actions .header__action--search,
    .header__actions .header__action--fav {
        display: none;
    }

    .header__actions .header__action--phone {
        display: flex;
        width: 28px;
        height: 60px;
    }

    .header__action--phone::before {
        width: 24px;
        height: 24px;
        background: #80c552;
        -webkit-mask: url("../images/calculate/icon-phone.svg") center / contain no-repeat;
        mask: url("../images/calculate/icon-phone.svg") center / contain no-repeat;
        content: "";
    }

    .mainnav__list {
        gap: 14px;
        margin-left: 0;
    }

    .mainnav__link {
        font-size: 16px;
    }

    .footer {
        padding: 50px 0 20px;
        background: #f2f2f2;
    }

    .footer__inner {
        grid-template-columns: 168px minmax(0, 1fr) 233px;
        grid-template-areas: "logo logo contacts" "navs navs meta" "bottom bottom bottom";
        column-gap: 24px;
        row-gap: 36px;
        padding-left: 48px;
        padding-right: 24px;
    }

    .footer__logo {
        width: 227px;
        min-height: 0;
    }

    .footer__col--cats {
        display: none;
    }

    .footer__navs {
        grid-template-columns: 168px minmax(0, 1fr);
        gap: 24px;
    }

    .footer__col {
        gap: 7.44px;
    }

    .footer__link {
        font-family: "Raleway", sans-serif;
        font-size: 14.05px;
        font-weight: 700;
    }

    .footer__aside {
        display: contents;
    }

    .footer__contacts {
        grid-area: contacts;
    }

    .footer__meta {
        grid-area: meta;
    }

    .footer__email {
        margin-top: 0;
    }

    .footer__bottom {
        margin-top: 8px;
        padding-top: 24px;
    }
}

@media (min-width: 651px) and (max-width: 740px) {
    .footer__inner {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 233px;
        column-gap: 18px;
        padding-left: 24px;
    }

    .footer__navs {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 18px;
    }
}

@media (max-width: 650px) {
    .footer {
        padding: 30px 0 0;
    }

    .footer__inner {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "logo" "aside" "navs" "bottom";
        justify-items: center;
        row-gap: 17px;
        padding-left: 24px;
        padding-right: 24px;
        text-align: center;
    }

    .footer__logo {
        width: 190.167px;
        min-height: 0;
    }

    .footer__aside {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-self: center;
        gap: 0;
    }

    .footer__contacts,
    .footer__meta {
        align-items: center;
    }

    .footer__phone {
        font-size: 26.165px;
    }

    .footer__note {
        margin-top: 6px;
        text-align: center;
    }

    .footer__email {
        margin-top: 8px;
    }

    .footer__socials {
        justify-content: center;
        gap: 25px;
        margin-top: 24px;
    }

    .footer__social {
        width: 38px;
        height: 30px;
    }

    .footer__social--tg img {
        width: 32px;
    }

    .footer__social--vk img {
        width: 36.343px;
    }

    .footer__social--ok img {
        width: 17px;
    }

    .footer__social-item--vk {
        order: 0;
    }

    .footer__social-item--tg {
        order: 1;
    }

    .footer__social-item--ok {
        order: 2;
    }

    .footer__navs {
        margin-top: 22px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 7.4px;
    }

    .footer__col {
        align-items: center;
        gap: 7.4px;
    }

    .footer__link {
        font-family: "Inter", sans-serif;
        font-size: 13px;
        font-weight: 300;
        line-height: 1.2;
    }

    .footer__bottom {
        justify-content: center;
        width: calc(100% + 48px);
        max-width: none;
        margin: 20px -24px 0;
        padding: 13px 16px;
        border-top: 0;
        background: #f9f9f9;
    }

    .footer__copy {
        color: #ccc;
        font-size: 11px;
    }

    .footer__credit {
        display: none;
    }
}

@media (max-width: 550px) {
    .header__inner {
        min-height: 40px;
        gap: 16px;
        padding-right: 12px;
    }

    .header__logo {
        width: 150px;
    }

    .header__actions .header__action--phone {
        height: 40px;
    }

    .header__action--phone::before {
        width: 20px;
        height: 20px;
    }
}

@keyframes header-dropdown-appear {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.topbar__dropdown:not([hidden]) {
    animation: header-dropdown-appear 160ms ease-out;
}

@media (prefers-reduced-motion: reduce) {
    .topbar__dropdown:not([hidden]) { animation: none; }
}

.mainnav__mobile-only {
    display: none;
}

@media (max-width: 992px) {
    .mainnav__mobile-only {
        display: block;
    }
}
