
/* ==========================================================================
   Общий футер сайта (.site-footer)

   Используется двумя шаблонами:
     - внутренние страницы и кабинет  — <footer class="pc-footer site-footer">
     - главная и лендинги /p/*        — <footer class="footer site-footer">
   Оформление общее, различия сведены в два блока «привязка к шаблону» ниже.
   ========================================================================== */

.site-footer {
    --sf-ink: #1b2129;
    --sf-muted: #5b6b79;
    --sf-brand: #673ab7;
    --sf-brand-soft: #9170c8;
    --sf-line: rgba(103, 58, 183, 0.13);

    position: relative;
    padding: 0;
}

.site-footer__inner {
    padding-top: 52px;
    padding-bottom: 26px;
}

/* --- Привязка к шаблону: внутренние страницы (Able Pro) --- */
.pc-footer.site-footer {
    margin-top: 72px;
    background: transparent;
    border-top: none;
}

/* Отступы как у .pc-content.container — колонки встают под контент */
.pc-footer.site-footer .footer-wrapper {
    padding-left: 52px;
    padding-right: 52px;
}

@media (max-width: 1199.98px) {
    .pc-footer.site-footer .footer-wrapper.container {
        max-width: 95%;
    }
}

/* --- Привязка к шаблону: главная и лендинги --- */
.footer.site-footer {
    --sf-brand: var(--prime, #6835b4);
    --sf-brand-soft: #9a6fd8;
    padding-top: 0;
}

/* --- Сетка: бренд + колонки ссылок --- */
.site-footer__main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 34px;
}

.site-footer__nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 30px 24px;
}

/* --- Бренд --- */
.site-footer__brand {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(27, 33, 41, 0.07);
}

.site-footer__logo {
    display: inline-block;
    line-height: 0;
}

.site-footer__logo img {
    height: 30px;
    width: auto;
}

.site-footer__tagline {
    flex: 1 1 320px;
    max-width: 60ch;
    margin: 0;
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.65;
    color: var(--sf-muted);
}

.site-footer__support {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px 10px 11px;
    border: 1px solid var(--sf-line);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(27, 33, 41, 0.04);
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.site-footer__support:hover {
    border-color: rgba(103, 58, 183, 0.35);
    box-shadow: 0 8px 20px rgba(103, 58, 183, 0.13);
    transform: translateY(-1px);
}

.site-footer__support-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: linear-gradient(135deg, #f0ebf8 0%, #e4daf6 100%);
    color: var(--sf-brand);
    font-size: 14px;
}

.site-footer__support-body {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
}

.site-footer__support-label {
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--sf-muted);
}

.site-footer__support-mail {
    font-size: 14px;
    font-weight: 500;
    color: var(--sf-ink);
}

.site-footer__support:hover .site-footer__support-mail {
    color: var(--sf-brand);
}

/* --- Колонки ссылок --- */
.site-footer__title {
    display: block;
    min-height: 29px; /* две строки: подчёркивания и списки выравниваются по колонкам */
    margin-bottom: 16px;
    padding-bottom: 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--sf-ink);
    position: relative;
}

.site-footer__title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--sf-brand) 0%, var(--sf-brand-soft) 100%);
}

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

.site-footer__list li + li {
    margin-top: 9px;
}

.site-footer__list a {
    display: inline-block;
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.45;
    color: var(--sf-muted);
    text-decoration: none;
    transition: color 0.18s ease, transform 0.18s ease;
}

.site-footer__list a:hover {
    color: var(--sf-brand);
    transform: translateX(3px);
}

/* --- Нижняя строка --- */
.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 28px;
    margin-top: 44px;
    padding-top: 20px;
    border-top: 1px solid rgba(27, 33, 41, 0.08);
}

.site-footer__copy {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin: 0;
    font-size: 12.5px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--sf-muted);
}

.site-footer__copy span + span {
    position: relative;
    padding-left: 15px;
}

.site-footer__copy span + span::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 3px;
    margin-top: -1.5px;
    border-radius: 50%;
    background: rgba(91, 107, 121, 0.5);
}

.site-footer__docs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer__docs a {
    font-size: 12.5px;
    font-weight: 400;
    color: var(--sf-muted);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.18s ease, border-color 0.18s ease;
}

.site-footer__docs a:hover {
    color: var(--sf-brand);
    border-bottom-color: rgba(103, 58, 183, 0.4);
}

/* --- Адаптив --- */

@media (max-width: 1024px) {
    .site-footer__inner {
        padding-top: 44px;
        padding-bottom: 24px;
    }

    .pc-footer.site-footer .footer-wrapper {
        padding-left: 42px;
        padding-right: 42px;
    }
}

@media (max-width: 991.98px) {
    .site-footer__nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .site-footer__brand {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .site-footer__tagline {
        flex: 0 0 auto;
    }

    .site-footer__support {
        margin-left: 0;
    }

    .site-footer__nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 26px 20px;
    }
}

@media (max-width: 575.98px) {
    .pc-footer.site-footer {
        margin-top: 48px;
    }

    .site-footer__inner {
        padding-top: 36px;
        padding-bottom: 22px;
    }

    .pc-footer.site-footer .footer-wrapper {
        padding-left: 20px;
        padding-right: 20px;
    }

    .site-footer__title {
        min-height: 0;
    }

    .site-footer__bottom {
        margin-top: 32px;
        justify-content: flex-start;
    }

    /* На узких экранах реквизиты в столбик — точки-разделители не нужны */
    .site-footer__copy {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .site-footer__copy span + span {
        padding-left: 0;
    }

    .site-footer__copy span + span::before {
        content: none;
    }
}

@media (max-width: 400px) {
    .site-footer__nav {
        grid-template-columns: 1fr;
    }
}
