/**
 * Footer Styles
 * Modern dark footer inspired by BET ON GAME layout
 */

/* Footer Base Styles */
.site-footer {
    background: var(--tcm-footer-bg, linear-gradient(135deg, #0F1419 0%, #1a1d29 100%));
    border-top: 1px solid #2a2d3a;
    margin-top: auto;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #681AE6 50%, transparent 100%);
    opacity: 0.6;
}

.footer-content {
    max-width: 1570px;
    margin: 0 auto;
    padding: 40px 20px 30px;
}

/* Первая строка: Логотип + Текст + Иконки */
.footer-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    gap: 20px;
    flex-wrap: wrap;
}

/* Секция бренда (логотип + текст поддержки) */
.footer-brand-section {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
}

.footer-logo a {
    display: flex;
    align-items: center;
}

.footer-logo img {
    max-height: 40px;
    width: auto;
}

.footer-site-title {
    color: #ffffff;
    text-decoration: none;
    font-size: 24px;
    font-weight: 700;
    transition: color 0.3s ease;
}

.footer-site-title:hover {
    color: #2CD8B9;
}

.footer-support-text {
    color: #8b91a7;
    font-size: 14px;
    margin: 0;
}

.footer-support-text p {
    margin: 0;
    line-height: 1.4;
}

/* Промежуток для выравнивания */
.footer-spacer {
    flex: 1;
}

/* Секция иконок */
.footer-icons-section {
    display: flex;
    align-items: center;
    gap: 30px;
}

/* Социальные ссылки */
.footer-social {
    display: flex;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #8b91a7;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(104, 26, 230, 0.2), transparent);
    transition: left 0.5s ease;
}

.social-link:hover::before {
    left: 100%;
}

.social-link:hover {
    background: rgba(44, 216, 185, 0.1);
    border-color: #2CD8B9;
    color: #2CD8B9;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(44, 216, 185, 0.2);
}

.social-link svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Social Icons (PNG) */
.social-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: brightness(0.6) contrast(1.2);
    transition: filter 0.3s ease;
}

.social-link:hover .social-icon {
    filter: brightness(1.2) contrast(1.4);
}

/* Логотипы партнеров */
.footer-partner-logos {
    display: flex;
    align-items: center;
    gap: 20px;
}

.payment-methods {
    display: flex;
    align-items: center;
    gap: 12px;
}

.payment-logo {
    height: 32px;
    width: auto;
    max-width: 50px;
    opacity: 0.8;
    transition: all 0.3s ease;
    object-fit: contain;
    filter: brightness(1.1);
}

.payment-logo:hover {
    opacity: 1;
    transform: scale(1.05);
}

.license-logos {
    display: flex;
    align-items: center;
    gap: 15px;
}

.gamble-aware-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #8b91a7;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.gamble-aware-logo:hover {
    color: #2CD8B9;
}

.license-icon {
    width: 145px;
    object-fit: contain;
    opacity: 0.8;
    transition: all 0.3s ease;
    filter: brightness(1.1);
}

.gamble-aware-logo:hover .license-icon {
    opacity: 1;
    transform: scale(1.05);
}

/* Вторая строка: Footer Menu в виде колонок */
.footer-menu-row {
    padding-bottom: 40px;
    margin-left: 20px;
    margin-right: 20px;
}

.footer-columns {
    display: flex;
    justify-content: space-between;
    gap: 60px;
    max-width: 1340px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.footer-column {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.footer-column-title {
    color: var(--tcm-footer-text, #E9ECFC);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Clash Display', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 0;
    margin: 0 0 20px 0;
}

.footer-column-title:hover {
    color: var(--tcm-footer-text-hover, #2CD8B9);
}

.footer-column-title::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #681AE6, #2CD8B9);
    transition: width 0.3s ease;
}

.footer-column-title:hover::after {
    width: 100%;
}

.footer-column-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-column-menu li {
    margin: 0;
    padding: 0;
}

.footer-column-menu a {
    color: #8b91a7;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
}

.footer-column-menu a:hover {
    color: #2CD8B9;
    transform: translateX(3px);
}

/* Social links в футере */
.footer-social-links a {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-social-links svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* App links */
.footer-app-links {
    gap: 15px;
}

.app-badge-link {
    display: block !important;
    transition: all 0.3s ease;
}

.app-badge-link:hover {
    transform: scale(1.05);
    opacity: 0.8;
}

.app-badge {
    width: auto;
    display: block;
    object-fit: contain;
    border-radius: 8px;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #681AE6 0%, #7C3AED 100%);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(104, 26, 230, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(104, 26, 230, 0.4);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .footer-content {
        padding: 30px 20px 20px;
        display: flex;
        flex-direction: column;
    }

    /* Переопределяем порядок элементов для мобильных */
    .footer-top-row {
        display: contents; /* Убираем wrapper, чтобы дочерние элементы участвовали в основном flex */
    }

    .footer-brand-section {
        display: none; /* Скрываем на мобильных, показываем отдельно */
    }

    /* Первая строка - блок с PNG */
    .footer-icons-section {
        order: 1;
        width: 100%;
        display: flex;
        gap: 60px;
        justify-content: center;
        align-items: center;
        margin-bottom: 20px;
    }

    .footer-partner-logos {
        flex-direction: row;
        align-items: center;
        gap: 20px;
        justify-content: center;
    }

    .payment-methods {
        gap: 60px;
        justify-content: center;
    }

    .license-logos {
        justify-content: center;
    }

    /* Вторая строка - мобильный логотип */
    .footer-mobile-logo {
        display: block !important; /* Принудительно показываем на мобильных */
        order: 2;
        text-align: center;
        margin-bottom: 20px;
        padding: 10px 0;
    }

    .footer-mobile-logo img {
        height: 100%;
        width: 140px;
    }

    .footer-mobile-logo a {
        display: inline-block;
    }

    .footer-mobile-logo .footer-site-title {
        color: #E9ECFC;
        text-decoration: none;
        font-size: 24px;
        font-weight: bold;
    }

    /* Третья строка - текст */
    .footer-mobile-text {
        display: block !important; /* Принудительно показываем на мобильных */
        order: 3;
        text-align: left;
        margin-bottom: 25px;
        padding: 0 20px;
    }

    .footer-mobile-text p {
        color: #787878;
        font-size: 16px;
        line-height: 1.5;
        margin: 0;
    }

    /* Две колонки навигации */
    .footer-menu-row {
        justify-content: flex-start;
        order: 4;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 20px;
        margin-bottom: 20px;
        margin-left: 20px;
    }

    .footer-menu {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px 30px;
        justify-items: center;
    }

    .footer-menu li {
        width: 100%;
    }

    .footer-menu a {
        font-size: 16px;
        display: block;
        padding: 8px 0;
    }

    /* Разделитель */
    .footer-separator {
        order: 5;
        margin: 15px 0;
    }

    /* Копирайт */
    .footer-copyright {
        order: 6;
        margin-top: 15px;
        padding-top: 10px;
    }

    .footer-copyright p {
        font-size: 11px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .footer-content {
        padding: 25px 0 0;
    }

    .payment-logo {
        height: 30px;
    }

    /* Две колонки навигации */
    .footer-menu {
        grid-template-columns: 1fr 1fr;
        gap: 12px 20px;
    }

    .footer-menu a {
        padding: 6px 0;
    }

    .social-link {
        width: 35px;
        height: 35px;
    }

    .social-link svg {
        width: 16px;
        height: 16px;
    }
}

/* Footer separator */
.footer-separator {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    margin: 20px 0;
}

/* Footer copyright */
.footer-copyright {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
}

.footer-copyright p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin: 0;
    font-weight: 300;
}

/* Мобильные элементы скрыты на десктопе */
.footer-mobile-logo,
.footer-mobile-text {
    display: none;
}
