/* style/footer.css */

/* ============================================
   ПОДВАЛ САЙТА (FOOTER)
   ============================================ */
   .site-footer {
    background: rgba(255, 255, 255, 0.6); /* Для темной темы: rgba(15, 23, 42, 0.6) */
    -webkit-backdrop-filter: var(--glass-blur, blur(12px));
    backdrop-filter: var(--glass-blur, blur(12px));
    border-top: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
    margin-top: 80px;
    padding: 60px 0 30px;
    position: relative;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-top {
    display: grid;
    /* ИСПРАВЛЕНО: 4 колонки для логичного разделения контента */
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-logo img {
    height: 36px;
    width: auto;
}

.footer-logo span {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
}

.footer-brand p {
    color: var(--text-secondary, #64748b);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 24px;
    max-width: 350px;
}

.footer-socials {
    display: flex;
    gap: 12px;
}

.footer-socials a {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(79, 110, 247, 0.08);
    color: var(--primary-blue, #4f6ef7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
    text-decoration: none;
}

.footer-socials a:hover {
    background: var(--primary-blue, #4f6ef7);
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(79, 110, 247, 0.3);
}

.footer-col h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 3px;
    background: var(--gradient-primary, linear-gradient(90deg, #4f6ef7, #7c3aed));
    border-radius: 2px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col ul li a {
    color: var(--text-secondary, #64748b);
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.footer-col ul li a::before {
    content: '';
    width: 0;
    height: 2px;
    background: var(--gradient-primary, linear-gradient(90deg, #4f6ef7, #7c3aed));
    transition: width 0.3s ease;
}

.footer-col ul li a:hover {
    color: var(--primary-blue, #4f6ef7);
    transform: translateX(5px);
}

.footer-col ul li a:hover::before {
    width: 15px;
}

.footer-bottom {
    position: relative;
    padding-top: 20px;
}

.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-blue, #4f6ef7), transparent);
    margin-bottom: 20px;
    opacity: 0.5;
}

.footer-copyright {
    text-align: center;
    color: var(--text-muted, #94a3b8);
    font-size: 14px;
}

.back-to-top {
    position: absolute;
    right: 0;
    top: -22px; /* Чуть поднял для идеального центрирования на линии */
    width: 44px;
    height: 44px;
    background: var(--gradient-primary, linear-gradient(135deg, #4f6ef7, #7c3aed));
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 8px 20px rgba(79, 110, 247, 0.3);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    border: none;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(79, 110, 247, 0.4);
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */
@media (max-width: 992px) {
    .footer-top {
        grid-template-columns: 1fr 1fr; /* 2 колонки на планшетах */
        gap: 30px;
    }
    .footer-brand {
        grid-column: 1 / -1; /* Бренд на всю ширину */
        text-align: center;
    }
    .footer-brand p {
        max-width: 100%;
        margin: 0 auto 24px;
    }
    .footer-logo {
        justify-content: center;
    }
    .footer-socials {
        justify-content: center;
    }
    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .footer-col ul {
        align-items: center;
    }
    .footer-col ul li a:hover {
        transform: none;
    }
}

@media (max-width: 576px) {
    .footer-top {
        grid-template-columns: 1fr; /* 1 колонка на мобильных */
        text-align: center;
    }
    .back-to-top {
        right: 50%;
        transform: translateX(50%);
        top: -22px;
    }
    .back-to-top:hover {
        transform: translateX(50%) translateY(-5px);
    }
}