/* Стили для подвала сайта */

.footer {
    background: linear-gradient(135deg, var(--color-gray-900) 0%, var(--color-gray-800) 100%);
    color: var(--color-white);
    padding: var(--spacing-3xl) 0 var(--spacing-lg);
    margin-top: auto;
}

.footer__content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-2xl);
}

.footer__section {
    display: flex;
    flex-direction: column;
}

.footer__title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary-light);
    margin-bottom: var(--spacing-md);
    line-height: var(--line-height-tight);
}

.footer__subtitle {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-white);
    margin-bottom: var(--spacing-md);
    position: relative;
}

.footer__subtitle::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--color-primary);
}

.footer__description {
    color: var(--color-gray-300);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--spacing-md);
}

.footer__contacts {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.footer__contact-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    transition: transform var(--transition-fast);
}

.footer__contact-item:hover {
    transform: translateX(5px);
}

.footer__contact-icon {
    font-size: var(--font-size-lg);
    color: var(--color-primary);
    flex-shrink: 0;
}

.footer__contact-link {
    color: var(--color-gray-300);
    text-decoration: none;
    transition: color var(--transition-fast);
    font-weight: var(--font-weight-medium);
}

.footer__contact-link:hover {
    color: var(--color-primary-light);
}

.footer__contact-text {
    color: var(--color-gray-300);
    font-weight: var(--font-weight-medium);
}

.footer__services {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.footer__services li {
    position: relative;
    padding-left: var(--spacing-md);
}

.footer__services li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-size: var(--font-size-xs);
    transition: transform var(--transition-fast);
}

.footer__services li:hover::before {
    transform: translateX(3px);
}

.footer__link {
    color: var(--color-gray-300);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer__link:hover {
    color: var(--color-primary-light);
}

.footer__schedule {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.footer__schedule p {
    margin: 0;
    color: var(--color-gray-300);
    font-size: var(--font-size-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid var(--color-gray-700);
}

.footer__schedule p:last-child {
    border-bottom: none;
}

.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--color-gray-700);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer__legal {
    flex-grow: 1;
}

.footer__disclaimer {
    font-size: var(--font-size-xs);
    color: var(--color-gray-400);
    margin-bottom: var(--spacing-xs);
    line-height: var(--line-height-normal);
}

.footer__copyright {
    font-size: var(--font-size-xs);
    color: var(--color-gray-400);
    margin: 0;
    font-weight: var(--font-weight-medium);
}

.footer__privacy {
    margin: var(--spacing-xs) 0 0 0;
}

.footer__privacy-link {
    color: var(--color-gray-400);
    text-decoration: none;
    font-size: var(--font-size-xs);
    transition: color var(--transition-fast);
    border-bottom: 1px solid transparent;
}

.footer__privacy-link:hover {
    color: var(--color-primary-light);
    border-bottom-color: var(--color-primary-light);
}

.footer__social {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--color-gray-700);
    color: var(--color-gray-300);
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left var(--transition-slow);
}

.social-link:hover::before {
    left: 100%;
}

.social-link:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.social-link svg {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-fast);
}

.social-link:hover svg {
    transform: scale(1.1);
}

/* Специальные цвета для социальных сетей */
.social-link[href*="whatsapp"]:hover {
    background: #25d366;
}

.social-link[href*="telegram"]:hover {
    background: #0088cc;
}

.social-link[href*="vk.com"]:hover {
    background: #4680c2;
}

.social-link[href*="instagram"]:hover {
    background: #e4405f;
}

.social-link[href*="facebook"]:hover {
    background: #1877f2;
}

/* Кнопка "Наверх" */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-fast);
    z-index: var(--z-fixed);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.back-to-top--visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.back-to-top:active {
    transform: translateY(-1px);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-fast);
}

.back-to-top:hover svg {
    transform: translateY(-2px);
}

/* Адаптивность */
@media (max-width: 1024px) {
    .footer__content {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xl);
    }
}

@media (max-width: 768px) {
    .footer {
        padding: var(--spacing-2xl) 0 var(--spacing-md);
    }
    
    .footer__content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        text-align: center;
    }
    
    .footer__title {
        font-size: var(--font-size-lg);
    }
    
    .footer__subtitle {
        font-size: var(--font-size-base);
    }
    
    .footer__subtitle::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer__contacts {
        align-items: center;
    }
    
    .footer__contact-item {
        justify-content: center;
    }
    
    .footer__services {
        align-items: center;
    }
    
    .footer__services li {
        padding-left: 0;
    }
    
    .footer__services li::before {
        display: none;
    }
    
    .footer__schedule p {
        justify-content: center;
        text-align: center;
    }
    
    .footer__bottom {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .footer__legal {
        order: 2;
    }
    
    .footer__social {
        order: 1;
        justify-content: center;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: var(--spacing-xl) 0 var(--spacing-md);
    }
    
    .footer__content {
        gap: var(--spacing-md);
    }
    
    .footer__title {
        font-size: var(--font-size-base);
    }
    
    .footer__subtitle {
        font-size: var(--font-size-sm);
    }
    
    .footer__description,
    .footer__contact-text,
    .footer__contact-link,
    .footer__link {
        font-size: var(--font-size-sm);
    }
    
    .footer__contact-item {
        flex-direction: column;
        gap: var(--spacing-xs);
        text-align: center;
    }
    
    .footer__contact-icon {
        font-size: var(--font-size-base);
    }
    
    .footer__schedule p {
        font-size: var(--font-size-xs);
        flex-direction: column;
        gap: 2px;
    }
    
    .footer__disclaimer,
    .footer__copyright,
    .footer__privacy-link {
        font-size: 10px;
    }
    
    .social-link {
        width: 35px;
        height: 35px;
    }
    
    .social-link svg {
        width: 16px;
        height: 16px;
    }
    
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    .back-to-top svg {
        width: 16px;
        height: 16px;
    }
}

/* Анимации для подвала */
.footer-animate {
    animation: fadeInUp 0.8s ease-out;
}

.footer__section {
    opacity: 0;
    transform: translateY(30px);
    transition: all var(--transition-slow);
}

.footer__section.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.footer__section:nth-child(1) { transition-delay: 0.1s; }
.footer__section:nth-child(2) { transition-delay: 0.2s; }
.footer__section:nth-child(3) { transition-delay: 0.3s; }
.footer__section:nth-child(4) { transition-delay: 0.4s; }

.social-link {
    opacity: 0;
    transform: scale(0.8);
    transition: all var(--transition-normal);
}

.social-link.animate-in {
    opacity: 1;
    transform: scale(1);
}

.social-link:nth-child(1) { transition-delay: 0.1s; }
.social-link:nth-child(2) { transition-delay: 0.2s; }
.social-link:nth-child(3) { transition-delay: 0.3s; }

/* Доступность */
@media (prefers-reduced-motion: reduce) {
    .footer__contact-item,
    .footer__services li::before,
    .social-link,
    .back-to-top,
    .footer__section {
        transition: none;
    }
    
    .footer-animate,
    .footer__section.animate-in,
    .social-link.animate-in {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* Печать */
@media print {
    .footer {
        background: none !important;
        color: var(--color-black) !important;
        box-shadow: none !important;
    }
    
    .footer__social,
    .back-to-top {
        display: none !important;
    }
    
    .footer__contact-link {
        color: var(--color-black) !important;
    }
}

/* Высокая контрастность */
@media (prefers-contrast: high) {
    .footer {
        background: var(--color-black);
        color: var(--color-white);
    }
    
    .footer__contact-link,
    .footer__link {
        color: var(--color-white);
        text-decoration: underline;
    }
    
    .social-link {
        background: var(--color-white);
        color: var(--color-black);
        border: 2px solid var(--color-black);
    }
}
