/*
 * AST VPN — документы, справка и подвал.
 *
 * Эти страницы живут вне лендинга, но делят с ним палитру и подвал.
 * Стили вынесены отдельно от vpn-landing.css, чтобы переработка
 * лендинга не ломала документы — и наоборот.
 */

.ast-doc-hero {
    text-align: center;
    padding: 0 0 1.5rem;
}

.ast-doc-title {
    margin: 0 auto;
    max-width: 16em;
    font-size: clamp(2rem, 4.2vw, 3.15rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: var(--ast-text);
}

.ast-doc-lead {
    margin: 0.85rem auto 0;
    max-width: 40rem;
    color: var(--ast-text-2);
    font-size: 1.05rem;
    line-height: 1.55;
}

.ast-doc .vpn-features,
.ast-doc .vpn-pricing {
    padding: 0 0 0.35rem;
    background: transparent;
}

.ast-doc .container {
    width: min(1200px, calc(100% - 48px));
    max-width: none;
    margin: 0 auto;
    padding: 0;
}

.ast-doc .vpn-plan {
    min-height: 0;
    width: min(860px, 100%);
    margin: 0 auto 0.9rem;
    border-radius: 20px;
    background: var(--ast-surface);
    border: 1px solid var(--ast-line);
    box-shadow: var(--ast-shadow-pop);
}

.ast-doc .vpn-plan:hover {
    transform: none;
}

.ast-doc .vpn-plan a {
    color: var(--ast-accent-text);
}

.ast-doc-copy,
.ast-doc .vpn-plan p,
.ast-doc .vpn-plan li {
    color: var(--ast-text-2);
    line-height: 1.7;
}

.ast-doc .vpn-plan-list li {
    color: var(--ast-text-2);
}

.ast-doc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.35rem;
}

/* ================================================================
   ПОДВАЛ — единый язык с лендингом
   ------------------------------------------------------------
   Подвал берёт те же токены, что и страница, и отличается только
   тоном подложки. Раньше он был отдельным визуальным миром: свой
   #0F172A, свои цветные рамки, вложенные карточки и анимированная
   полоса на градиенте.
   ================================================================ */

.footer {
    background: var(--ast-bg-deep);
    border-top: 1px solid var(--ast-line);
    padding: var(--ast-space-12, 48px) 0 var(--ast-space-6, 24px);
    margin-top: var(--ast-space-12, 48px);
    position: relative;
    z-index: 1;
}

.footer .container {
    max-width: 1200px;
    position: relative;
}

/* --- Колонки ----------------------------------------------------- */

.footer .footer-content {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.9fr);
    gap: var(--ast-space-8, 32px);
    align-items: start;
    margin-bottom: var(--ast-space-10, 40px);
}

.footer .footer-panel {
    min-width: 0;
    height: fit-content;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

/* Подложки колонок — тихие. Колонки разделены воздухом, а не
   рамками: подвал читается частью страницы, а не набором
   вложенных коробок. */
.footer .footer-panel--brand,
.footer .footer-col-card {
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.footer .footer-panel--brand {
    text-align: left;
}

.footer .footer-panel--brand .logo-img-small {
    margin: 0 0 0.35rem;
    max-width: 180px;
    height: auto;
}

/* --- Заголовки колонок ------------------------------------------- */

.footer .footer-links-title {
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--ast-text);
    margin: 0;
}

/* Короткая линия под заголовком — единственный цветной знак в
   колонке. Она отмечает раздел, а не украшает его. */
.footer .footer-title-accent {
    display: block;
    width: 20px;
    height: 1px;
    margin: 0.6rem 0 0.9rem;
    background: var(--ast-accent);
    opacity: 0.7;
}

.footer .footer-note {
    margin: 0 0 0.35rem;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--ast-text-3);
}

/* --- Ссылки ------------------------------------------------------ */

.footer .footer-link--item,
.footer .footer-link--doc {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    width: auto;
    padding: 0.34rem 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 0.88rem;
    line-height: 1.35;
    color: var(--ast-text-2);
    text-decoration: none;
    transition: color var(--ast-dur-fast, 120ms) ease;
    white-space: normal;
    overflow: visible;
}

.footer .footer-link--item:hover,
.footer .footer-link--doc:hover {
    transform: none;
    padding: 0.34rem 0;
    background: transparent;
    border-color: transparent;
    color: var(--ast-text);
}

.footer .footer-link--item:focus-visible,
.footer .footer-link--doc:focus-visible {
    outline: 2px solid var(--ast-accent);
    outline-offset: 3px;
}

/* Иконка ссылки — без подложки. Вокруг каждой иконки была рамка с
   фоном: колонка читалась как список кнопок, а не ссылок. */
.footer .footer-item-icon,
.footer .footer-doc-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    margin-top: 2px;
    border-radius: 0;
    border: 0;
    background: transparent;
    color: var(--ast-text-3);
    transition: color var(--ast-dur-fast, 120ms) ease;
}

.footer .footer-link--item:hover .footer-item-icon,
.footer .footer-link--doc:hover .footer-doc-icon {
    background: transparent;
    border-color: transparent;
    color: var(--ast-accent);
}

.footer .footer-nav-divider {
    height: 1px;
    margin: 0.5rem 0;
    background: var(--ast-line);
}

/* --- Каналы связи ------------------------------------------------ */

/* Каналы — тихие строки с иконкой. Раньше каждая кнопка была
   отдельной карточкой с рамкой, а группа — ещё одной карточкой:
   три слоя вложенности на одну ссылку. */
.footer .footer-social-card {
    margin-top: 1rem;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-width: 320px;
}

.footer .footer-social-title {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--ast-text-3);
    margin-bottom: 0.25rem;
}

.footer .footer-social-divider {
    height: 1px;
    margin: 0.4rem 0;
    background: var(--ast-line);
}

.footer .footer-social-btn {
    text-decoration: none;
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    align-items: center;
    gap: 0.7rem;
    padding: 0.35rem 0;
    border-radius: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--ast-text);
    transition: color var(--ast-dur, 180ms) ease;
}

.footer .footer-social-btn:hover {
    transform: none;
    border-color: transparent;
    background: transparent;
    color: var(--ast-text);
}

.footer .footer-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 0;
    background: transparent;
    border: 0;
    color: var(--ast-text-3);
    transition: color var(--ast-dur, 180ms) ease;
}

.footer .footer-social-btn:hover .footer-social-icon {
    color: var(--ast-accent);
}

.footer .footer-social-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.footer .footer-social-name {
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--ast-text);
    line-height: 1.25;
}

.footer .footer-social-sub {
    font-size: 0.76rem;
    color: var(--ast-text-3);
    line-height: 1.3;
}

.footer .footer-social-btn--mail .footer-social-name {
    font-size: 0.86rem;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* --- Нижняя полоса ----------------------------------------------- */

.footer .footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    flex-wrap: wrap;
    padding-top: 1.5rem;
    border-top: 1px solid var(--ast-line);
    color: var(--ast-text-3);
    font-size: 0.85rem;
}

.footer .footer-copyright {
    margin: 0;
    color: var(--ast-text-3);
}

.footer .footer-bottom-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* Кнопки нижней полосы — тихие текстовые ссылки, не пилюли.
   Пилюля здесь читалась как третья кнопка подвала. */
.footer .footer-bottom-btn {
    appearance: none;
    -webkit-appearance: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--ast-text-3);
    font-family: inherit;
    font-size: 0.82rem;
    cursor: pointer;
    transition: color var(--ast-dur, 180ms) ease;
}

.footer .footer-bottom-btn:hover {
    color: var(--ast-text);
    border-color: transparent;
    background: transparent;
}

.footer .footer-bottom-btn:focus-visible {
    outline: 2px solid var(--ast-accent);
    outline-offset: 2px;
}

/* Подпись «AST VPN — часть экосистемы Astrafic» — тихая. */
.footer .footer-ecosystem {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--ast-text-3);
}

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

@media (max-width: 1024px) {
    .footer .footer-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .footer .footer-content {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .footer { padding: 2.15rem 0 1.2rem; }
    .footer .footer-content { grid-template-columns: 1fr; gap: 0.9rem; }
    .footer .footer-bottom { flex-direction: column; align-items: flex-start; }
    .footer .footer-bottom-actions { width: 100%; }
    .footer .logo-img-small { width: 168px; }
    .ast-doc .container { width: calc(100% - 32px); }
    .ast-doc-actions .ast-btn { width: 100%; }
}

@media (max-width: 360px) {
    .ast-doc .container { width: calc(100% - 24px); }
}
