/* =====================================================
   ОБЩИЕ НАСТРОЙКИ
===================================================== */

.stm-contact-banner,
.stm-footer {
    --stm-bg: #f2f5ff;
    --stm-text: #17213b;
    --stm-muted: #56627a;
    --stm-border: #dce3f4;
    --stm-green: #1baa1d;

    width: 100%;
    max-width: none;
    margin: 0;
    color: var(--stm-text);
    background: var(--stm-bg);
    font-family: inherit;
    box-sizing: border-box;
}

.stm-contact-banner *,
.stm-footer *,
.stm-contact-banner *::before,
.stm-contact-banner *::after,
.stm-footer *::before,
.stm-footer *::after {
    box-sizing: border-box;
}

.stm-contact-banner a,
.stm-footer a {
    text-decoration: none !important;
    box-shadow: none !important;
}

/* =====================================================
   ВЕРХНИЙ БЛОК СВЯЗИ
===================================================== */

.stm-contact-banner {
    margin-top: 20px;
    border-bottom: 1px solid var(--stm-border);
}

.stm-contact-banner__inner {
    width: 100%;
    max-width: 1500px;
    min-height: 165px;
    margin: 0 auto;
    padding: 30px 38px;
    display: grid;
    grid-template-columns: minmax(270px, .85fr) minmax(350px, 2.2fr) 150px;
    align-items: center;
    gap: 38px;
}

.stm-contact-banner__title {
    margin: 0 !important;
    padding: 0 !important;
    color: var(--stm-text) !important;
    font-size: 27px !important;
    font-weight: 750 !important;
    line-height: 1.22 !important;
    letter-spacing: -.35px;
}

.stm-contact-banner__text {
    margin: 0 !important;
    padding: 0 !important;
    border-left: none !important;
    color: var(--stm-muted);
    font-size: 17px;
    line-height: 1.75;
    text-align: left !important;
}

.stm-contact-banner__button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    min-height: 52px;
    margin: 0;
    padding: 14px 20px;
    border: 0 !important;
    border-radius: 7px !important;
    background: var(--stm-green) !important;
    color: #fff !important;
    font-family: inherit;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.3;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(27,170,29,.16) !important;
    transition: background .2s ease, transform .2s ease;
}

.stm-contact-banner__button:hover {
    background: #168e19 !important;
    color: #fff !important;
    transform: translateY(-1px);
}

/* =====================================================
   ОСНОВНОЙ ФУТЕР
===================================================== */

.stm-footer {
    position: relative;
    isolation: isolate;
    width: 100%;
    max-width: none;
    margin: 0;
}

.stm-footer__main {
    max-width: 1500px;
    margin-left: auto;
    margin-right: auto;
    padding: 48px 38px 38px;
}

.stm-footer__grid {
    display: grid;
    grid-template-columns:
        minmax(180px, 1.25fr)
        minmax(155px, 1fr)
        minmax(155px, 1fr)
        minmax(140px, .8fr)
        minmax(290px, 1.55fr);
    gap: 35px;
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
}

.stm-footer__column {
    min-width: 0;
}

.stm-footer__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 17px;
}

.stm-footer__heading-link {
    display: inline-block;
    color: #17213b !important;
    font-size: 19px;
    font-weight: 750;
    line-height: 1.4;
}

.stm-footer__toggle {
    display: none;
}

/* Списки и отступ пунктов от заголовков */

.stm-footer__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.stm-footer__list li {
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    line-height: 1.55;
}

.stm-footer__list a {
    color: #56627a;
    font-size: 16px;
    line-height: 1.55;
    overflow-wrap: anywhere;
    transition: color .2s ease;
}

.stm-footer__list a:hover,
.stm-footer__heading-link:hover,
.stm-footer__direct-link > a:hover {
    color: #001b72 !important;
}

/* =====================================================
   КНОПКИ РАСКРЫТИЯ СПИСКОВ
===================================================== */

.stm-footer__toggle {
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    color: #17213b !important;
    cursor: pointer;
}

.stm-footer__toggle svg {
    display: block;
    width: 13px;
    height: 15px;
    fill: currentColor;
    transition: transform .2s ease;
}

/* При раскрытии плюс поворачивается на 45 градусов и выглядит как ×.
   Чтобы получить классический минус, горизонтальная полоса остаётся
   визуально, а вертикальная исчезает через масштабирование SVG. */
.stm-footer__accordion.is-open > .stm-footer__heading .stm-footer__toggle svg,
.stm-footer__contacts-accordion.is-open > .stm-footer__heading .stm-footer__toggle svg {
    transform: rotate(45deg);
}

/* =====================================================
   СТАНКИ Б/У, АКЦИИ, КОНТАКТЫ
===================================================== */

.stm-footer__quick-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
    min-width: 0;
}

.stm-footer__direct-link > a {
    display: inline-block;
    color: #17213b !important;
    font-size: 17px;
    font-weight: 750;
    line-height: 1.5;
}

.stm-footer__contacts-accordion {
    min-width: 0;
}

.stm-footer__contacts-accordion .stm-footer__heading {
    margin: 0;
}

.stm-footer__contacts-accordion .stm-footer__heading-link {
    font-size: 17px;
    font-weight: 750;
}

.stm-footer__city-list {
    margin-top: 8px !important;
    padding-left: 14px !important;
    border-left: 2px solid #dce3f4;
}

/* =====================================================
   ПОИСК
===================================================== */

.stm-footer__search {
    display: flex;
    align-items: center;
    height: 49px;
    width: 100%;
    margin: 0 0 24px;
    border: 1px solid #d2daec;
    background: rgba(255,255,255,.55);
}

.stm-footer__search input {
    flex: 1;
    width: 0;
    min-width: 0;
    height: 100%;
    margin: 0 !important;
    padding: 0 14px !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    color: #17213b !important;
    font: inherit;
    font-size: 16px;
}

.stm-footer__search input::placeholder {
    color: #77829a;
    opacity: 1;
}

.stm-footer__search button {
    display: grid;
    flex: 0 0 44px;
    place-items: center;
    height: 100%;
    margin: 0;
    padding: 11px;
    border: 0 !important;
    background: transparent !important;
    color: #56627a !important;
    cursor: pointer;
}

.stm-footer__search svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
}

/* =====================================================
   ПОЛИТИКА КОНФИДЕНЦИАЛЬНОСТИ
===================================================== */

.stm-footer__privacy {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 25px;
    color: #56627a;
    font-size: 15px;
    line-height: 1.5;
}

.stm-footer__privacy svg {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* =====================================================
   КОНТАКТЫ
===================================================== */

.stm-footer__contact-column {
    min-width: 0;
}

.stm-footer__contact-list {
    display: flex;
    flex-direction: column;
    gap: 23px;
}

.stm-footer__contact {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    min-width: 0;
}

.stm-footer__contact > svg {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    margin-top: 2px;
    fill: none;
    stroke: #17213b;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.stm-footer__contact > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    gap: 4px;
}

.stm-footer__contact a {
    color: #17213b;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.stm-footer__schedule {
    display: block;
    margin-top: 8px;
    color: #56627a;
    font-size: 15px;
    line-height: 1.7;
    font-weight: 400;
}

.stm-footer__contact .stm-footer__address {
    font-size: 15px;
    line-height: 1.65;
    font-weight: 600;
}

/* =====================================================
   СОЦСЕТИ
===================================================== */

.stm-footer__bottom {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 38px 25px;
}

.stm-footer__social-divider {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 25px;
}

.stm-footer__social-divider > span {
    flex: 1;
    height: 1px;
    background: #d5ddef;
}

.stm-footer__socials {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stm-footer__social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #fff !important;
    transition: opacity .2s ease;
}

.stm-footer__social:hover {
    opacity: .8;
}

.stm-footer__social svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.stm-footer__social--vk {
    background: #0077ff;
}

.stm-footer__social--vk svg path {
    fill: currentColor;
    stroke: none;
}

.stm-footer__social--whatsapp {
    background: #25d366;
}

/* =====================================================
   НИЖНЯЯ ПОЛОСА
===================================================== */

.stm-footer__bottom-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: center;
}

.stm-footer__copyright {
    margin: 0 !important;
    color: #56627a;
    font-size: 15px;
    line-height: 1.6;
}

.stm-footer__logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.stm-footer__logo img {
    display: block;
    width: auto;
    max-width: 170px;
    max-height: 60px;
    object-fit: contain;
    opacity: 1 !important;
    filter: none !important;
}

/* =====================================================
   ПЛАНШЕТЫ
===================================================== */

@media (min-width: 768px) and (max-width: 1250px) {
    .stm-contact-banner__inner {
        grid-template-columns: minmax(0, .9fr) minmax(0, 1.5fr) 135px;
        gap: 32px;
        padding-right: 25px;
        padding-left: 25px;
    }

    .stm-contact-banner__title {
        font-size: 23px !important;
        line-height: 1.3 !important;
        overflow-wrap: normal;
    }

    .stm-contact-banner__text {
        font-size: 15px;
        line-height: 1.65;
        transform: none;
        min-width: 0;
        overflow-wrap: break-word;
    }

    .stm-contact-banner__button {
        width: 135px;
    }

    .stm-footer__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 35px 25px;
    }

    .stm-footer__contact-column {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: minmax(250px, 1fr) minmax(280px, 1fr);
        gap: 22px 35px;
        align-items: start;
    }

    .stm-footer__contact-list {
        grid-column: 2;
        grid-row: 1 / span 3;
    }
}

/* =====================================================
   МОБИЛЬНАЯ ВЕРСИЯ
===================================================== */

@media (max-width: 767px) {
    .stm-contact-banner__inner {
        min-height: auto;
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 25px 20px;
        text-align: center;
    }

    .stm-contact-banner__title {
        width: 100%;
        font-size: 25px !important;
        line-height: 1.25 !important;
        text-align: center !important;
    }

    .stm-contact-banner__text {
        width: 100%;
        margin: 0 auto !important;
        padding: 0 !important;
        border-left: none !important;
        font-size: 16px;
        line-height: 1.65;
        text-align: center !important;
        transform: none !important;
    }

    .stm-contact-banner__button {
        width: 100%;
        min-height: 49px;
    }

    .stm-footer__main {
        padding: 0 20px;
    }

    .stm-footer__grid {
        display: flex !important;
        flex-direction: column;
        gap: 0 !important;
    }

    .stm-footer__accordion {
        width: 100%;
        min-width: 0;
    }

    .stm-footer__accordion > .stm-footer__heading,
    .stm-footer__contacts-accordion > .stm-footer__heading {
        display: flex;
        align-items: stretch;
        justify-content: space-between;
        gap: 0;
        margin: 0 !important;
        padding: 0 !important;
        border-bottom: 1px solid #dce3f4;
    }

    /* Ссылка заголовка сохраняет собственную ширину */
    .stm-footer__heading-link,
    .stm-footer__contacts-accordion .stm-footer__heading-link {
        flex: 0 1 auto;
        align-self: center;
        min-width: 0;
        display: inline-block;
        padding: 17px 0;
        color: #17213b !important;
        font-size: 15px !important;
        line-height: 1.4;
        font-weight: 750;
    }

    /* Кнопка плюса справа */
    .stm-footer__toggle {
        display: flex;
        flex: 0 0 42px;
        align-items: center;
        justify-content: center;
        width: 42px;
        min-height: 48px;
        padding: 0;
        margin: 0;
        border: 0 !important;
        background: transparent !important;
        color: #17213b !important;
        cursor: pointer;
    }

    .stm-footer__toggle svg {
        display: block;
        width: 12px;
        height: 14px;
        fill: currentColor;
        transition: transform .2s ease;
    }

    /* Раскрытый список: плюс поворачивается */
    .stm-footer__accordion.is-open > .stm-footer__heading .stm-footer__toggle svg,
    .stm-footer__contacts-accordion.is-open > .stm-footer__heading .stm-footer__toggle svg {
        transform: rotate(45deg);
    }

    .stm-footer__accordion > .stm-footer__list,
    .stm-footer__contacts-accordion > .stm-footer__list {
        display: none !important;
        padding: 10px 0 17px 10px !important;
        margin: 0 !important;
    }

    .stm-footer__accordion.is-open > .stm-footer__list,
    .stm-footer__contacts-accordion.is-open > .stm-footer__list {
        display: flex !important;
    }

    .stm-footer__list {
        gap: 9px;
    }

    .stm-footer__list a {
        font-size: 14px;
    }

    /* СТАНКИ Б/У и Акции остаются обычными ссылками */
    .stm-footer__quick-links {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .stm-footer__direct-link {
        display: block;
        width: 100%;
        border-bottom: 1px solid #dce3f4;
    }

    .stm-footer__direct-link > a {
        display: block;
        padding: 17px 0;
        color: #17213b !important;
        font-size: 15px;
        line-height: 1.4;
        font-weight: 750;
    }

    .stm-footer__contacts-accordion {
        border-bottom: 1px solid #dce3f4;
    }

    /* В мобильной версии убираем вертикальную линию у городов */
    .stm-footer__city-list {
        margin-top: 0 !important;
        padding-left: 10px !important;
        border-left: none !important;
    }

    .stm-footer__contact-column {
        width: 100%;
        margin-top: 20px;
        padding-bottom: 25px;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .stm-footer__search {
        margin: 0;
    }

    .stm-footer__privacy {
        margin: 0;
    }

    .stm-footer__contact-list {
        display: flex;
        flex-direction: column;
        gap: 21px;
    }

    .stm-footer__contact a {
        font-size: 15px;
    }

    .stm-footer__bottom {
        padding: 0 20px 25px;
    }

    .stm-footer__social-divider {
        gap: 14px;
        margin-bottom: 22px;
    }

    .stm-footer__bottom-row {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .stm-footer__logo {
        justify-content: flex-start;
    }

    .stm-footer__logo img {
        max-width: 145px;
        max-height: 52px;
    }

    .stm-footer__copyright {
        font-size: 14px;
    }
}

@media (max-width: 380px) {
    .stm-footer__main {
        padding-right: 14px;
        padding-left: 14px;
    }

    .stm-footer__bottom {
        padding-right: 14px;
        padding-left: 14px;
    }
}
	



/* =====================================================
   ТЕЛЕФОНЫ И РАСПИСАНИЕ — ВСЕ УСТРОЙСТВА
   ===================================================== */

#stm-footer .stm-footer__phones-layout {
    display: grid !important;
    grid-template-columns: max-content max-content;
    align-items: start;
    justify-content: start;
    column-gap: 44px;
    row-gap: 0;
    min-width: 0;
    width: 100%;
}

/* Два телефонных номера */
#stm-footer .stm-footer__phone-numbers {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 4px;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
}

#stm-footer .stm-footer__phone-numbers a {
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap;
    font-size: 15px;
    line-height: 1.5;
}

/* Расписание справа от телефонов */
#stm-footer .stm-footer__phones-layout .stm-footer__schedule {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 4px;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    color: #56627a !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    font-weight: 400 !important;
    white-space: nowrap;
}

/* Планшеты */
@media (min-width: 768px) and (max-width: 1250px) {
    #stm-footer .stm-footer__phones-layout {
        column-gap: 50px;
    }

    #stm-footer .stm-footer__phone-numbers a {
        font-size: 14px;
    }

    #stm-footer .stm-footer__phones-layout .stm-footer__schedule {
        font-size: 12px !important;
    }
}

/* Мобильные устройства */
@media (max-width: 767px) {
    #stm-footer .stm-footer__phones-layout {
        grid-template-columns: max-content max-content;
        column-gap: 40px;
        align-items: start;
        width: 100%;
    }

    #stm-footer .stm-footer__phone-numbers {
        gap: 4px;
    }

    #stm-footer .stm-footer__phone-numbers a {
        font-size: 13px;
        line-height: 1.6;
    }

    #stm-footer .stm-footer__phones-layout .stm-footer__schedule {
        gap: 4px;
        font-size: 12px !important;
        line-height: 1.6 !important;
        white-space: nowrap;
    }
}

/* Очень узкие экраны */
@media (max-width: 360px) {
    #stm-footer .stm-footer__phones-layout {
        column-gap: 22px;
    }

    #stm-footer .stm-footer__phone-numbers a {
        font-size: 12px;
    }

    #stm-footer .stm-footer__phones-layout .stm-footer__schedule {
        font-size: 11px !important;
    }
}


	
/* =====================================================
   STANKI-M: КНОПКИ РАСКРЫТИЯ В МОБИЛЬНОМ ФУТЕРЕ
   ===================================================== */

@media (max-width: 767px) {

    #stm-footer .stm-footer__heading {
        display: flex !important;
        align-items: stretch !important;
        justify-content: space-between !important;
        width: 100%;
    }

    #stm-footer .stm-footer__toggle {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        flex: 0 0 42px !important;
        align-items: center !important;
        justify-content: center !important;
        width: 42px !important;
        min-width: 42px !important;
        min-height: 48px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        color: #17213b !important;
        cursor: pointer !important;
        box-shadow: none !important;
        transform: none !important;
    }

    #stm-footer .stm-footer__toggle svg {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 13px !important;
        height: 15px !important;
        min-width: 13px !important;
        fill: currentColor !important;
        stroke: none !important;
        overflow: visible !important;
    }

    #stm-footer .stm-footer__toggle svg path {
        fill: currentColor !important;
    }

    #stm-footer .stm-footer__toggle:focus,
    #stm-footer .stm-footer__toggle:hover {
        background: transparent !important;
        color: #001b72 !important;
        outline-offset: 2px;
    }
}
	
	
/* =====================================================
   STANKI-M: ИЗОБРАЖЕНИЕ ПЕРЕД БЛОКОМ СВЯЗИ
   На всю ширину экрана, без отступа после изображения
===================================================== */

.stm-news-bottom-image {
    display: block !important;
    position: relative !important;

    width: 100vw !important;
    max-width: none !important;

    /* Верхний отступ перенесён с контактного блока */
    margin-top: 20px !important;

    /* Между изображением и контактным блоком отступа нет */
    margin-bottom: 0 !important;

    /* Выход за границы контейнера WordPress */
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;

    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    line-height: 0 !important;
    font-size: 0 !important;
}

.stm-news-bottom-image img {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: 330px !important;
    max-height: none !important;

    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;

    object-fit: cover !important;
    object-position: center !important;
    vertical-align: bottom !important;
}

/* Убираем прежний верхний отступ контактного блока */
.stm-contact-banner {
    margin-top: 0 !important;
}

/* Планшеты */
@media (min-width: 601px) and (max-width: 1024px) {
    .stm-news-bottom-image {
        width: 100vw !important;
        margin-left: calc(50% - 50vw) !important;
        margin-right: calc(50% - 50vw) !important;
        margin-top: 20px !important;
        margin-bottom: 0 !important;
    }
}

/* Мобильные устройства */
@media (max-width: 600px) {
    .stm-news-bottom-image {
        width: 100vw !important;
        max-width: none !important;
        margin-top: 16px !important;
        margin-bottom: 0 !important;
        margin-left: calc(50% - 50vw) !important;
        margin-right: calc(50% - 50vw) !important;
        padding: 0 !important;
    }

    .stm-news-bottom-image img {
        width: 100% !important;
        height: 150px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .stm-contact-banner {
        margin-top: 0 !important;
    }
}
	

/* STANKI-M: принудительный синий цвет кнопки футера */
.stm-contact-banner .stm-contact-banner__button,
.stm-contact-banner .stm-contact-banner__button:hover,
.stm-contact-banner .stm-contact-banner__button:focus,
.stm-contact-banner .stm-contact-banner__button:focus-visible,
.stm-contact-banner .stm-contact-banner__button:active {
    background: #001b72 !important;
    background-color: #001b72 !important;
    border-color: #001b72 !important;
    color: #ffffff !important;
    box-shadow: 0 3px 8px rgba(0, 27, 114, .16) !important;
}


/* STANKI-M: нижнее изображение без боковых отступов */
.stm-news-bottom-image {
    display: block !important;
    position: relative !important;
    left: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 20px 0 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.stm-news-bottom-image img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 330px !important;
    margin: 0 !important;
    object-fit: cover !important;
    box-sizing: border-box !important;
}

@media (max-width: 600px) {
    .stm-news-bottom-image {
        margin-top: 16px !important;
    }

    .stm-news-bottom-image img {
        height: 150px !important;
    }
}
