/*
 * Шапка, подвал и окна («Заказать звонок», поиск) — как на прежнем сайте ДЦ ТСТ-МОТО.
 * Стили перенесены из старого сайта, все классы с префиксом tst- (не пересекаются с темой дистрибьютора).
 * Пересобрать из исходного CSS:  python port_tst_css.py style.css tst-ported.css (см. README).
 */

/* Изолированный сброс: действует только внутри .tst-scope, специфичность как у элементов */
:where(.tst-scope),
:where(.tst-scope) *,
:where(.tst-scope) *::before,
:where(.tst-scope) *::after {
    box-sizing: border-box;
}
.tst-scope {
    font-family: Impact, 'Impact Regular', Arial, sans-serif;
    font-size: 16px;
    font-weight: normal;
    line-height: 1.15; /* как normalize.css на прежнем сайте */
    color: #000;
    text-align: left;
}
:where(.tst-scope) :is(div, p, ul, ol, li, h1, h2, h3, h4, h5, h6, a, span, strong, nav, form, input, button, textarea, label, img, svg) {
    padding: 0;
    margin: 0;
    border: none;
}
:where(.tst-scope) :is(h1, h2, h3, h4, h5, h6, p) {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
    position: static;
    text-transform: none;
    letter-spacing: normal;
    max-width: none;
}
:where(.tst-scope) :is(ul, li) {
    list-style: none;
    max-width: none;
}
:where(.tst-scope) a,
:where(.tst-scope) a:hover {
    text-decoration: none;
}
:where(.tst-scope) img {
    vertical-align: top;
}
:where(.tst-scope) :is(img, svg) {
    max-width: 100%;
    height: auto;
}
:where(.tst-scope) :is(input, textarea, button, select) {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background-color: transparent;
    border-radius: 0;
    max-width: none;
    box-shadow: none;
}
/* отдельными селекторами, как в оригинале: в :is() кнопка получила бы вес input[type=submit]
   и перебивала бы .tst-header__burger { display: none } */
:where(.tst-scope) button,
:where(.tst-scope) input[type='submit'] {
    display: inline-block;
    background: none;
    cursor: pointer;
}
:where(.tst-scope) :is(input, button):is(:focus, :active) {
    outline: none;
}
:where(.tst-scope) label {
    cursor: pointer;
}

/* ---------------------------------------------------------- перенесённые стили старого сайта */
@font-face {
    font-family: 'Impact Regular';
    font-style: normal;
    font-weight: normal;
    src: local('Impact Regular'), url('/static/tst/fonts/impact.woff') format('woff');
}
.tst-container {
    position: relative;
    max-width: 1332px;
    margin: 0 auto;
}
.tst-expand-more {
    vertical-align: middle;
}
.tst-no-scroll {
    overflow: hidden;
}
.tst-warning-input {
    border: 1px solid red !important;
}
.tst-warning-checkbox {
    outline: 1px solid red;
    outline-offset: 1px;
}
.tst-loader {
    width: 20px;
    aspect-ratio: 1;
    --_c: no-repeat radial-gradient(farthest-side, #fff 92%, #0000);
    background: var(--_c) top,
    var(--_c) left,
    var(--_c) right,
    var(--_c) bottom;
    background-size: 6px 6px;
    animation: l7 1s infinite;
}
@keyframes l7 {
    to {
        transform: rotate(.5turn)
    }
}
.tst-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}
.tst-header__background {
    position: static;
    height: max-content;
    padding-bottom: 38px;
    margin-bottom: 30px;
    background-image: url(/static/tst/images/header_background.svg);
}
.tst-header__info {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.tst-header__logo {
    display: flex;
}
.tst-header__logo-link {
    margin: auto;
}
.tst-header__menu {
    display: flex;
    width: 100%;
}
.tst-header__menu-logo,
.tst-header__menu-close,
.tst-header__socials-list {
    display: none;
}
.tst-header__nav {
    width: 100%;
    background-color: rgba(113, 113, 113, 0.15);
}
.tst-header__nav-list {
    height: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
}
.tst-header__nav-item {
    position: relative;
    display: block;
    height: 100%;
}
.tst-header__nav-link {
    display: flex;
    align-items: center;
    height: 100%;
    font-size: 14px;
    color: #fff;
}
.tst-header__expand-more {
    margin-left: 3px;
}
.tst-nav-link_active {
    color: #009bb4;
}
.tst-header__nav-sublist {
    display: flex;
    padding-top: 7px;
    flex-direction: column;
    gap: 10px;
}
.tst-header__nav-sublist-link {
    padding: 0 20px;
}
.tst-nav-link_dealers {
    display: inline-block;
    padding: 35px 3px 3px 3px;
    min-width: fit-content;
    background-color: #078896;
    background-image: url(/static/tst/icons/location.svg);
    background-repeat: no-repeat;
    background-position: center 3px;
}
.tst-nav-link_cofigurator {
    display: inline-block;
    padding: 3px;
    padding-top: 35px;
    background-color: #00aabc;
    background-image: url(/static/tst/icons/quad-bike.svg);
    background-repeat: no-repeat;
    background-position: center 3px;
}
.tst-header__location_wrapper {
    max-width: min-content;
    padding-left: 25px;
    background-image: url(/static/tst/icons/location-accent.svg);
    background-repeat: no-repeat;
    background-position: left 10%;
    font-size: 17px;
    color: #fff;
}
.tst-header__location {
    font-size: 17px;
    line-height: 25px;
    color: #fff;
}
.tst-header__phone-number_wrapper {
    display: flex;
}
.tst-header__phone-number_link-list {
    display: flex;
    flex-direction: column;
    margin-right: 10px;
}
.tst-header__phone-number {
    font-size: 22px;
    color: #fff;
    padding-left: 25px;
    background-image: url(/static/tst/icons/phone.svg);
    background-repeat: no-repeat;
    background-position: left center;
}
.tst-header__order-call {
    
    width: min-content;
    font-size: 12px;
    text-decoration: underline;
    color: #009bb4;
}
.tst-header__search {
}
.tst-footer {
    padding: 58px 0;
    background-color: #333;
}
.tst-footer__menu {
    display: flex;
    justify-content: space-between;
    margin-bottom: 56px;
}
.tst-footer__logo {
    margin-bottom: 42px;
}
.tst-footer__clients {
    margin-bottom: 42px;
}
.tst-footer__title__clients {
    margin-bottom: 17px;
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    color: #fff;
}
.tst-footer__title__commerce {
    margin-bottom: 3px;
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    color: #fff;
}
.tst-footer__phone-number {
    display: block;
    width: fit-content;
    line-height: 44px;
    font-size: 32px;
    color: #fff;
}
.tst-footer__mail {
    display: block;
    width: fit-content;
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    color: #fff;
}
.tst-footer__contacts {
    margin-bottom: 89px;
}
.tst-footer__socials {
}
.tst-footer__title {
    margin-bottom: 27px;
    font-size: 18px;
    color: #fff;
}
.tst-socials-title {
    margin-bottom: 19px;
}
.tst-footer__socials-list {
    display: flex;
    column-gap: 3px;
}
.tst-footer__socials-item {
    height: 24px;
    width: 24px;
    overflow: hidden;
}
.tst-footer__socials-img,
.tst-header__socials-img {
    background-color: #fff;
    overflow: hidden;
    object-fit: contain;
}
.tst-footer__nav-item {
    margin-bottom: 8px;
}
.tst-footer__nav-link-title {
    font-family: 'Impact', 'Impact Regular', 'Arial', sans-serif;
    color: #fff;
}
.tst-footer__nav-link {
    font-family: 'Arial', sans-serif;
    color: #fff;
}
.tst-footer__info {
    display: flex;
    justify-content: space-between;
    padding-top: 28px;
    border-top: 1px solid #fff;
}
.tst-footer__offer {
    max-width: 540px;
}
.tst-footer__offer-text {
    font-family: 'Arial Narrow', sans-serif;
    font-size: 16px;
    line-height: 20px;
    color: #fff;
}
.tst-footer__offer-text:not(:last-child) {
    margin-bottom: 20px;
}
.tst-footer__copyright {
    max-width: 210px;
}
.tst-footer__company {
    max-width: 288px;
}
.tst-footer__copyright-text,
.tst-footer__company-text {
    font-family: 'Arial', sans-serif;
    font-size: 12px;
    color: #f5f5f5;
}
.tst-footer__company-link {
    font-weight: 700;
    color: #f5f5f5;
    text-decoration: underline;
}
.tst-modal {
    display: none; 
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}
.tst-modal__content {
    position: relative;
    width: fit-content;
    
    background: #000;
    text-align: center;
}
.tst-modal__close {
    position: absolute;
    top: -30px;
    right: -30px;
    font-size: 30px;
    color: #fff;
    stroke: #fff;
    transition: all 0.3s ease-in-out;
}
.tst-modal__close:hover {
    stroke: red;
    transform: scale(1.2);
}
.tst-modal__search-container {
    position: relative;
    display: flex;
    flex-direction: column;
    margin-top: 179px;
}
.tst-modal__search-close {
    align-self: flex-end;
    margin-bottom: 8px;
    stroke: #fff;
    transition: all 0.3s ease-in-out;
}
.tst-modal__search-close:hover {
    stroke: red;
    transform: scale(1.2);
}
.tst-modal__search-input {
    width: 100%;
    padding: 17px 67px;
    font-family: 'Arial Narrow', sans-serif;
    background: url(/static/tst/icons/search-accent.svg);
    background-color: #fff;
    border-radius: 5px;
    background-repeat: no-repeat;
    background-position: 27px center;

}
.tst-offer__modal,
.tst-order-call__modal,
.tst-test-drive__modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}
.tst-offer__modal-content,
.tst-order-call__modal-content,
.tst-test-drive__modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border-radius: 5px;
    width: 50%;
    min-width: 450px;
    max-width: 650px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.tst-offer__modal-close,
.tst-order-call__modal-close,
.tst-test-drive__modal-close {
    float: right;
    font-size: 24px;
    cursor: pointer;
}
.tst-offer__modal-status,
.tst-order-call__modal-status,
.tst-test-drive__modal-status {
    font-family: 'Arial', sans-serif;
    line-height: 28px;
}
.tst-offer__form-group,
.tst-order-call__form-group,
.tst-test-drive__form-group {
    margin-bottom: 10px;
}
.tst-offer__form-label,
.tst-order-call__form-label,
.tst-test-drive__form-label {
    display: block;
    margin-bottom: 5px;
}
.tst-offer__form-input,
.tst-order-call__form-input,
.tst-test-drive__form-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: 'Arial', sans-serif;
    resize: vertical;
}
.tst-offer__form-description,
.tst-order-call__form-description,
.tst-test-drive__form-description {
    
    font-family: 'Arial', sans-serif;
    font-size: 12px;
}
.tst-offer__form-btn,
.tst-order-call__form-btn,
.tst-test-drive__form-btn {
    padding: 15px 30px;
    margin-bottom: 10px;
    background-color: #00aabc;
    font-family: 'Arial', sans-serif;
    color: #fff;
    border-radius: 5px;
}
.tst-news__text,
.tst-privacy-policy__text,
.tst-page-text {
    margin-bottom: 14px;
    font-size: 14px;
    line-height: 20px;
    font-family: 'Arial', sans-serif;
}
.tst-all-news__title,
.tst-news__title,
.tst-search__title,
.tst-page-title {
    margin: 0;
    margin-bottom: 20px;
    font-size: 32px;
}
.tst-about,
.tst-test-drive,
.tst-faq,
.tst-privacy-policy,
.tst-employees,
.tst-article,
.tst-all-news,
.tst-all-article,
.tst-accessory {
    margin-bottom: 5%;
}
.tst-employees__list {
    display: grid;
    justify-items: center;
    gap: 40px;
}
.tst-employees__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
.tst-employees__img-wrapper {
    width: 100%;
    margin-bottom: 10px;
}
.tst-employees__img {
    width: 100%;
    object-fit: contain;
}
.tst-employees__info {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.tst-employees__name {
    font-size: 20px;
    line-height: 1.5;
}
.tst-employees__post {
    font-size: 16px;
    line-height: 1.5;
}
.tst-header__burger {
    display: none;
}
.tst-hidden {
    display: none;
}
@media (max-width: 1400px) {
  .tst-container {
        width: 100%;
        padding: 0 3%;
        overflow: hidden;
    }
  .tst-header {
        padding: 25px 0;
        z-index: 1;
    }
  .tst-header__logo-cfmoto {
        max-width: 136px;
    }
  .tst-header__logo-tst {
        display: none;
    }
  .tst-header__phone-number {
        font-size: 17px;
    }
  .tst-header__order-call {
        font-size: 10px;
    }
  .tst-header__location_wrapper {
        display: none;
    }
  .tst-header__search {
        display: none;
    }
  .tst-header__burger {
        display: block;
    }
  .tst-footer {
        padding: 20px 0;
    }
  .tst-footer__menu {
        margin-bottom: 0;
        flex-wrap: wrap;
    }
  .tst-footer__column {
        margin-bottom: 40px;
        width: calc(50% - 20px);
    }
  .tst-footer__contacts-wrapper {
        width: 100%;
        margin-bottom: 30px;
        order: 5;
    }
  .tst-footer__contacts-wrapper {
        .tst-footer__logo {
            display: none;
        }
    }
  .tst-footer__logo-mobile {
        display: block;
        width: 50%;
        margin-bottom: 40px;
    }
  .tst-footer__contacts {
        margin-bottom: 30px;
    }
  .tst-footer__title {
        margin-bottom: 11px;
        font-size: 16px;
    }
  .tst-footer__nav-item {
        line-height: 10px;
    }
  .tst-footer__nav-link {
        font-size: 10px;
    }
  .tst-footer__title__clients {
        margin-bottom: 5px;
        font-size: 14px;
    }
  .tst-footer__phone-number {
        margin-bottom: 5px;
        font-size: 24px;
        line-height: 30px;
    }
  .tst-footer__mail {
        font-size: 14px;
    }
  .tst-footer__title__commerce {
        font-size: 14px;
    }
  .tst-footer__socials-list {
        gap: 10px;
    }
  .tst-footer__info {
        flex-direction: column;
    }
  .tst-footer__offer {
        margin-bottom: 30px;
    }
  .tst-footer__offer-text {
        font-size: 10px;
        line-height: 10px;
    }
  .tst-footer__offer-text:not(:last-child) {
        margin-bottom: 10px;
    }
  .tst-footer__copyright {
        margin-bottom: 30px;
    }
  .tst-header__background {
        max-height: 89px;
    }
  .tst-header__menu {
        position: relative;
        flex-direction: column;
        z-index: 1;
    }
  .tst-header__menu-bg {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(74, 74, 74, 0.8);
        z-index: 0;
    }
  .tst-header__menu-logo {
        display: flex;
        align-items: center;
        margin-bottom: 22px;
    }
  .tst-header__menu-logo-cfmoto {
        max-width: 136px;
    }
  .tst-header__menu-logo-tst {
        max-width: 90px;
    }
  .tst-header__menu-logo-link:not(:last-child) {
        margin-right: 16px;
    }
  .tst-header__nav {
        background-color: transparent;
    }
  .tst-header__nav-list {
        margin-bottom: 7px;
        padding-left: 8px;
        flex-direction: column;
        align-items: flex-start;
        gap: 7px;
    }
  .tst-nav-link_dealers {
        padding: 10px 0 10px 32px;
        background-size: 16px;
        background-position: 8px center;
    }
  .tst-nav-link_cofigurator {
        padding: 10px 0 10px 34px;
        background-size: 19px;
        background-position: 8px center;
        margin-bottom: 40px;
    }
  .tst-header__socials-list {
        display: flex;
        column-gap: 10px;
    }
  .tst-header__socials-item {
        height: 24px;
        width: 24px;
        overflow: hidden;
    }
  .tst-modal__search {
        display: block;
        position: relative;
        margin-bottom: 17px;
    }
  .tst-modal__search-input {
        padding: 8px 16px;
        font-size: 10px;
        background-image: none;
    }
  .tst-modal__search-btn {
        position: absolute;
        height: 100%;
        width: 15px;
        right: 16px;
    }
  .tst-modal__search-btn {
        svg {
            height: 100%;
        }
    }
  .tst-header__menu-close {
        display: block;
        height: 100%;
        line-height: 39px;
        margin-left: auto;
    }
}
@media (min-width: 320px) {
  .tst-modal__content {
        max-width: 100%;
    }
  .tst-employees__list {
        grid-template-columns: repeat(1, 1fr);
    }
  .tst-header__phone-number {
        font-size: 15px;
    }
}
@media (min-width: 768px) {
  .tst-employees__list {
        grid-template-columns: repeat(2, 1fr);
    }
  .tst-header__phone-number {
        font-size: 17px;
    }
}
@media (min-width: 1024px) {
  .tst-employees__list {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (min-width: 1400px) {
  .tst-header__menu {
        display: flex;

        .tst-modal__search {
            display: none;
        }
    }
  .tst-footer__logo-mobile {
        display: none;
    }
  .tst-modal__content {
        max-width: 70%;
    }
  .tst-employees__list {
        grid-template-columns: repeat(3, 1fr);
    }
  .tst-header__nav-sublist {
        display: none;
        position: absolute;
        padding: 20px 0;
        left: -20px;
        background-color: rgba(100, 100, 100, 0.45);
        z-index: -1;
    }
  #tst-productsNav:hover {
        #tst-productsSubnav {
            display: flex;
            z-index: 10;
        }
    }
  #tst-cfmotoNav:hover {
        #tst-cfmotoSubnav {
            display: flex;
            z-index: 10;
        }
    }
  #tst-testDriveNav:hover {
        #tst-testDriveSubnav {
            display: flex;
            z-index: 10;
        }
    }
  #tst-articlesNav:hover {
        #tst-articlesSubnav {
            display: flex;
            z-index: 10;
        }
    }
}
/* ---------------------------------------------------------- стыковка с остальными страницами */

/* шапка поверх видео на главной и над содержимым страниц */
.tst-header {
    z-index: 50;
}
.tst-header.tst-header__background {
    position: relative;
}

/* выпадающие пункты меню для любых пунктов, а не только для четырёх с id */
@media (min-width: 1400px) {
    .tst-header__nav-item:hover > .tst-header__nav-sublist {
        display: flex;
        z-index: 10;
    }
}

/* окна поверх всего сайта */
.tst-modal,
.tst-order-call__modal {
    z-index: 2000;
}
.tst-order-call__modal-content {
    max-width: calc(100vw - 32px);
}
@media (max-width: 520px) {
    .tst-order-call__modal-content {
        min-width: 0;
        width: calc(100vw - 32px);
        margin-top: 60px;
    }
}
.tst-order-call__form-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    min-height: 50px;
}
.tst-order-call__form-btn[disabled] {
    opacity: .8;
    cursor: default;
}
.tst-page-link {
    color: #000;
    text-decoration: underline;
}

/* отступ темы дистрибьютора «под закреплённую шапку» не нужен: на внутренних страницах шапка стоит
   в потоке (иначе лишние ~100px до заголовка), на главной лежит поверх видео, как на прежнем сайте */
.tst-header ~ .content,
.tst-header ~ div > .content {
    padding-top: 0;
}

/* страница модели: шапка больше не закреплена, поэтому меню модели «прилипает» к верху при прокрутке */
.page-template-page-atv #content,
.page-template-page-moto #content {
    padding-top: 0 !important;
}
.page-template-page-atv .pagenav,
.page-template-page-moto .pagenav {
    position: sticky !important;
    top: 0 !important;
}
