/* =====================================================================
   Подвал сайта (common/footer.twig). Подключается из самого подвала.
   ===================================================================== */

/* --- Перенесено из <style> старого подвала (footer_OLD.twig) без изменений --- */
.custom-schedule div span:first-child {
    color: #949494 !important;
}

.custom-schedule div span:last-child {
    color: #000 !important;
}
/* Установка цветов для графика работы через привязку к иконке времени */
img[src*="f-time.svg"] + div > div > span:first-child {
    color: #949494 !important;
}

img[src*="f-time.svg"] + div > div > span:last-child {
    color: #000 !important;
}
/* Те же цвета для графика на странице контактов (блок info-card__times). Значение поля общее с подвалом,
   а подвал рендерится и на странице контактов — поэтому правило доступно там же. */
.info-card__times > div > span:first-child {
    color: #949494 !important;
}

.info-card__times > div > span:last-child {
    color: #000 !important;
}

/* --- Новый подвал --- */

.site-footer {
    position: relative;
    font-family: 'Century Gothic', sans-serif;
    color: #4f4f4f;
}

/* Блок подписки: на всю ширину экрана, картинка janel_footer.svg фоном по центру */
.footer-news {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 235px;
    /* картинка вписывается в область внутри отступов (content-box): 15px от верха и низа блока */
    padding: 15px 16px;
    background: #748059 url('../image/footer/janel_footer.svg') no-repeat center / contain;
    background-origin: content-box;
    text-align: center;
    color: #fff;
}

.footer-news__inner {
    width: 100%;
    max-width: 760px;
}

.footer-news__title {
    margin: 0 0 10px;
    font-family: 'Century Gothic', sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    color: #fff;
}

.footer-news__text {
    margin: 0 0 16px;
    font-size: 12px;
    line-height: 1.35;
    color: #fff;
}

.footer-news__text a {
    color: #fff;
    text-decoration: underline;
}

.footer-news__text a:hover {
    color: #fff;
    opacity: 0.8;
}

.footer-news__form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.footer-news__field {
    position: relative;
    width: 300px;
    max-width: 100%;
}

/* Линия внутри поля: 7px от нижнего края на мобильном, 11px на ПК, с отступами по бокам (по макету) */
.footer-news__field::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 7px;
    height: 1px;
    background: rgba(199, 199, 199, 1);
    pointer-events: none;
}

.footer-news__input {
    display: block;
    width: 100%;
    height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 12px;
    background: #f5f5f5;
    font-family: 'Century Gothic', sans-serif;
    font-size: 14px;
    color: #4f4f4f;
    text-align: center;
    outline: none;
}

/* родной placeholder прозрачный (нужен только для :placeholder-shown), видна надпись .footer-news__placeholder */
.footer-news__input::placeholder {
    color: transparent;
}

.footer-news__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #b5b5b5;
    pointer-events: none;
}

.footer-news__input:not(:placeholder-shown) + .footer-news__placeholder {
    visibility: hidden;
}

.footer-news__input:focus {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6);
}

.footer-news__button {
    padding: 10px 20px;
    border: 0;
    border-radius: 20px;
    background: #fff;
    font-family: 'Century Gothic', sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 100%;
    color: #748059;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.footer-news__button:hover {
    opacity: 0.85;
}

/* Сообщения подписки (скрипт вставляет .text-success / .text-danger после #respond) */
.footer-news .text-success,
.footer-news .text-danger {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    color: #fff !important;
}

/* Основная часть подвала */
.site-footer__main {
    position: relative;
    max-width: 1660px;
    margin: 0 auto;
    padding: 24px 20px 90px; /* снизу — место под мобильную панель навигации */
    overflow: hidden;
}

.site-footer__top {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
}

.site-footer__logo img {
    display: block;
    width: 150px;
    height: auto;
}

.site-footer__label {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 400;
    color: #b5b5b5;
}

.site-footer__socials-list {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-footer__socials-list a {
    display: block;
    line-height: 0;
    transition: opacity 0.2s ease;
}

.site-footer__socials-list a:hover {
    opacity: 0.7;
}

.site-footer__socials-list img {
    width: 36px;
    height: 36px;
}

/* Декор: на мобильном — бледным фоном справа сверху, на ПК — правая колонка */
.site-footer__decor {
    position: absolute;
    top: 10px;
    right: 0;
    z-index: 0;
    width: 120px;
    pointer-events: none;
}

.site-footer__decor img {
    display: block;
    width: 100%;
    height: auto;
}

.site-footer__body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 24px;
}

/* Ссылки на статьи */
.site-footer__nav {
    order: 2; /* на мобильном — под контактами */
    background: rgba(116, 128, 89, 0.1);
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 8px 18px; /* по бокам 18px */
}

.site-footer__links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer__link {
    display: inline-block;
    padding: 7px 10px;
    border-radius: 20px;
    font-family: 'Century Gothic', sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 100%;
    color: #4f4f4f;
    text-decoration: none;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.site-footer__link:hover,
.site-footer__link:focus {
    background: rgba(116, 128, 89, 0.1);
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.1);
    color: rgba(116, 128, 89, 1);
    text-decoration: none;
}

/* Контакты и график работы */
.site-footer__info {
    order: 1;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.site-footer__contacts ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer__contacts li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 12px;
    color: #4f4f4f;
}

.site-footer__contacts li:last-child {
    margin-bottom: 0;
}

.site-footer__contacts img,
.site-footer__open img {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
}

.site-footer__contacts a {
    color: #4f4f4f;
    text-decoration: none;
    word-break: break-word;
}

.site-footer__contacts a:hover {
    color: #748059;
}

.site-footer__open {
    text-align: right;
}

.site-footer__open-body {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.site-footer__open-text {
    font-size: 12px;
    line-height: 1.4;
    color: #000;
    text-align: right;
}

.site-footer__open-text span:first-child {
    color: #949494;
}

/* Платёжные системы, линия, копирайт, сертификаты */
.site-footer__payments {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 28px;
}

.site-footer__payments img {
    display: block;
    width: auto;
    height: 18px;
}

.site-footer__copy {
    position: relative;
    z-index: 1;
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid #dbdbdb;
    font-size: 12px;
    color: #9e9e9e;
    text-align: center;
}

.site-footer__certs {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
}

.site-footer__certs div {
    flex: 0 1 auto;
    min-width: 0;
}

.site-footer__certs img {
    display: block;
    max-width: 100%;
    max-height: 26px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* --- ПК --- */
@media (min-width: 1024px) {
    .footer-news {
        min-height: 400px;
        padding: 15px 20px;
    }

    .footer-news__title {
        margin-bottom: 20px;
        font-size: 40px;
    }

    .footer-news__text {
        margin-bottom: 40px;
        font-size: 16px;
    }

    .footer-news__form {
        gap: 30px;
    }

    .footer-news__field {
        width: 420px;
    }

    .footer-news__field::after {
        bottom: 11px;
    }

    .footer-news__input {
        height: 54px;
        font-size: 16px;
    }

    .footer-news__placeholder {
        font-size: 16px;
    }

    .site-footer__main {
        padding: 50px 20px 40px;
    }

    /* Лого слева, соцсети справа */
    .site-footer__top {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }

    .site-footer__logo img {
        width: 380px;
    }

    .site-footer__socials {
        text-align: right;
    }

    .site-footer__label {
        margin-bottom: 18px;
        font-size: 18px;
    }

    .site-footer__socials-list {
        gap: 16px;
    }

    .site-footer__socials-list img {
        width: 64px;
        height: 64px;
    }

    /* Две колонки: слева ссылки и контакты, справа декор (шириной примерно как блок соцсетей) */
    .site-footer__grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 190px;
        /* промежуток ссылки ↔ декор: 120px от 1700 (ширина контейнера), плавно уменьшается до 40px к 1440;
           ниже 1440 — 40px, иначе 6 ссылок не помещаются в одну строку */
        column-gap: clamp(40px, calc(40px + (100vw - 1440px) * 0.3077), 120px);
        align-items: start;
        margin-top: 40px;
    }

    .site-footer__body {
        margin-top: 0;
        gap: 40px;
    }

    .site-footer__decor {
        position: static;
        width: auto;
        display: flex;
        justify-content: flex-end;
    }

    .site-footer__decor img {
        width: 190px;
    }

    .site-footer__nav {
        order: 0;
        padding: 10px 18px;
    }

    .site-footer__links {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between; /* ссылки растягиваются на всю ширину плашки */
        gap: 6px 0; /* расстояние между ссылками даёт space-between + их внутренние отступы 14px */
    }

    .site-footer__link {
        padding: 8px 14px;
    }

    .site-footer__link {
        font-size: 18px;
    }

    .site-footer__info {
        order: 0;
        align-items: flex-start;
    }

    /* часы работы — к нижнему краю ряда, контакты остаются вверху */
    .site-footer__open {
        align-self: flex-end;
    }

    .site-footer__contacts li {
        gap: 12px;
        margin-bottom: 14px;
        font-size: 18px;
    }

    .site-footer__contacts img,
    .site-footer__open img {
        width: 28px;
        height: 28px;
    }

    .site-footer__open-text {
        font-size: 18px;
    }

    .site-footer__payments {
        gap: 30px;
        margin-top: 50px;
    }

    .site-footer__payments img {
        height: 31px; /* родная высота иконок pay_*.png */
    }

    .site-footer__copy {
        margin-top: 30px;
        padding-top: 20px;
        font-size: 14px;
    }

    .site-footer__certs {
        flex-wrap: wrap;
        gap: 30px 60px;
        margin-top: 30px;
    }

    .site-footer__certs img {
        max-height: 60px;
    }
}

@media (min-width: 1440px) {
    .site-footer__logo img {
        width: 485px;
    }

    .site-footer__socials-list img {
        width: 77px;
        height: 77px;
    }

}
