/* ==========================================================================
   STICKY FOOTER FIX & ASTRA CLEANUP
   ========================================================================== */
html, body {
    height: 100%;
    background: #050608; 
}

#page, .site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

#content, .site-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    /* САМОЕ ВАЖНОЕ: Отрезает невидимые фоновые элементы (.dp-bg), которые растягивали страницу вниз */
    overflow: hidden; 
    padding: 0 !important;
    margin: 0 !important;
}

/* Жестко убиваем системную стрелку "Наверх" и системный футер Astra */
#ast-scroll-top, 
.ast-scroll-top-icon,
.ast-scroll-top,
.site-footer {
    display: none !important;
}

/* ==========================================================================
   FOOTER STYLES
   ========================================================================== */
.sp-footer {
    position: relative;
    padding: 0 0 28px;
    margin-top: auto; /* Прижимает футер к самому низу */
    background: linear-gradient(180deg, #07090d 0%, #050608 100%);
    color: #ffffff;
    overflow: hidden;
    font-family: "Exo 2", Arial, sans-serif;
}

.sp-footer__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 122, 0, 0.08) 0%, rgba(255, 122, 0, 0) 28%),
        radial-gradient(circle at 88% 24%, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0) 22%);
}

.sp-footer__shell {
    position: relative;
    z-index: 2;
    border-radius: 32px;
    border: 1px solid rgba(255,255,255,0.08);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.028) 0%, rgba(255,255,255,0.012) 100%),
        linear-gradient(180deg, rgba(8,11,15,0.82) 0%, rgba(7,10,14,0.92) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 24px 80px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
    padding: 34px;
    overflow: hidden;
}

.sp-footer__shell::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,122,0,0) 0%, rgba(255,122,0,0.5) 50%, rgba(255,122,0,0) 100%);
    opacity: 0.9;
}

.sp-footer__top {
    display: grid;
    grid-template-columns: minmax(280px, 1.1fr) minmax(0, 1.4fr);
    gap: 34px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sp-footer__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.sp-footer__eyebrow-line {
    width: 42px;
    height: 1px;
    background: linear-gradient(90deg, #ff7a00 0%, rgba(255,122,0,0.12) 100%);
    box-shadow: 0 0 16px rgba(255,122,0,0.3);
}

.sp-footer__eyebrow-text {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.66);
}

.sp-footer__logo-wrap {
    margin-bottom: 18px;
}

.sp-footer__logo--image .custom-logo-link {
    display: inline-flex;
    align-items: center;
}

.sp-footer__logo--image img,
.sp-footer__logo--image .custom-logo {
    max-height: 54px;
    width: auto;
}

.sp-footer__logo-title {
    display: inline-block;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #ffffff;
    text-decoration: none;
}

.sp-footer__brand-text {
    margin: 0 0 18px;
    max-width: 420px;
    font-size: 14px;
    line-height: 1.82;
    color: rgba(216,224,232,0.74);
}

.sp-footer__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sp-footer__badges span {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.sp-footer__cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.sp-footer__col h3 {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #ffffff;
}

.sp-footer__col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.sp-footer__col ul li {
    margin: 0;
}

.sp-footer__col a,
.sp-footer__col span {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(214,223,232,0.65);
    text-decoration: none;
    transition: color 0.25s ease, transform 0.25s ease;
}

.sp-footer__col a:hover {
    color: #ff7a00;
    transform: translateX(4px);
}

.sp-footer__contacts li span {
    display: block;
}

.sp-footer__socials {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.sp-footer__social {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.sp-footer__social svg {
    width: 20px;
    height: 20px;
}

.sp-footer__social--tg:hover {
    color: #229ED9;
    border-color: rgba(34, 158, 217, 0.4);
    background: rgba(34, 158, 217, 0.1);
    box-shadow: 0 8px 20px rgba(34, 158, 217, 0.2);
    transform: translateY(-3px);
}

.sp-footer__social--wechat:hover {
    color: #07C160;
    border-color: rgba(7, 193, 96, 0.4);
    background: rgba(7, 193, 96, 0.1);
    box-shadow: 0 8px 20px rgba(7, 193, 96, 0.2);
    transform: translateY(-3px);
}

/* Особая логика наведения для логотипа Max (градиент) */
.sp-footer__social--max .max-base {
    fill: currentColor;
    transition: fill 0.3s ease;
}

.sp-footer__social--max:hover {
    background: rgba(165, 36, 255, 0.1);
    color: #A524FF;
    border-color: rgba(165, 36, 255, 0.4);
    box-shadow: 0 8px 20px rgba(165, 36, 255, 0.2);
    transform: translateY(-3px);
}

.sp-footer__social--max:hover .max-base {
    fill: url(#max-grad-footer);
}

.sp-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-top: 20px;
}

.sp-footer__copy {
    font-size: 13px;
    line-height: 1.7;
    color: rgba(255,255,255,0.5);
}

.sp-footer__bottom-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.sp-footer__bottom-links a {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.58);
    text-decoration: none;
    transition: color 0.25s ease;
}

.sp-footer__bottom-links a:hover {
    color: #ffffff;
}

@media (max-width: 1100px) {
    .sp-footer__top {
        grid-template-columns: 1fr;
    }

    .sp-footer__cols {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .sp-footer {
        padding-bottom: 20px;
    }

    .sp-footer__shell {
        padding: 22px 20px;
        border-radius: 24px;
    }

    .sp-footer__cols {
        grid-template-columns: 1fr;
    }

    .sp-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}