/**
 * JavaESPORTS - Premium Footer Styles
 * Comprehensive footer with quick links, social media, and responsive design
 * @version 2.0
 * @date 2025
 */

/* ============================================================================
   FOOTER BASE STYLES
   ============================================================================ */

.footer {
    margin-top: 0;
    padding: 0;
    background: linear-gradient(180deg, 
        rgba(15, 17, 35, 0.95) 0%, 
        rgba(10, 12, 25, 0.98) 100%);
    border-top: 1px solid rgba(139, 92, 246, 0.2);
    color: rgba(255, 255, 255, 0.85);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(139, 92, 246, 0.5) 50%, 
        transparent 100%);
}

[data-theme="light"] .footer {
    background: linear-gradient(180deg, 
        rgba(248, 249, 255, 0.98) 0%, 
        rgba(240, 242, 255, 1) 100%);
    border-top-color: rgba(139, 92, 246, 0.15);
    color: rgba(30, 27, 75, 0.85);
}

.footer__container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

/* ============================================================================
   FOOTER TOP SECTION - Main Content
   ============================================================================ */

.footer__top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 3rem;
    padding: 4rem clamp(1.25rem, 4vw, 3rem);
}

/* ========== Brand Section ========== */
.footer__brand-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer__logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    transition: transform 0.2s ease, opacity 0.2s ease;
    width: fit-content;
}

.footer__logo:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

[data-theme="light"] .footer__logo {
    color: #1e1b4b;
}

.footer__slogan {
    font-size: 1.125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    line-height: 1.4;
}

[data-theme="light"] .footer__slogan {
    color: rgba(30, 27, 75, 0.95);
}

.footer__description {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    max-width: 320px;
}

[data-theme="light"] .footer__description {
    color: rgba(30, 27, 75, 0.7);
}

/* ========== Links Sections ========== */
.footer__social-section,
.footer__legal-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.footer__section-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(139, 92, 246, 0.3);
}

[data-theme="light"] .footer__section-title {
    color: rgba(30, 27, 75, 0.95);
    border-bottom-color: rgba(139, 92, 246, 0.2);
}

.footer__nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer__nav-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    padding-left: 0;
    width: fit-content;
}

.footer__nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
    transition: width 0.3s ease;
}

.footer__nav-link:hover {
    color: #fff;
    padding-left: 1rem;
}

.footer__nav-link:hover::before {
    width: 100%;
}

[data-theme="light"] .footer__nav-link {
    color: rgba(30, 27, 75, 0.75);
}

[data-theme="light"] .footer__nav-link:hover {
    color: #1e1b4b;
}

/* ========== Social Media Section ========== */
.footer__social-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.875rem;
}

/* Desktop - Icon only */
.footer__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    padding: 0;
    border-radius: 14px;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.footer__social-link:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
}

[data-theme="light"] .footer__social-link {
    background: rgba(139, 92, 246, 0.06);
    border-color: rgba(139, 92, 246, 0.15);
    color: rgba(30, 27, 75, 0.9);
}

[data-theme="light"] .footer__social-link:hover {
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.35);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.25);
}

/* Desktop - Hide labels */
.footer__social-label {
    display: none;
}

.footer__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    transition: all 0.3s ease;
}

.footer__icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    transition: all 0.3s ease;
}

.footer__social-link:hover .footer__icon {
    transform: scale(1.1);
}

/* Individual social media brand colors - Desktop */
.footer__social-link--telegram:hover {
    background: linear-gradient(135deg, #0088cc, #229ED9);
    border-color: #0088cc;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 136, 204, 0.5);
}

.footer__social-link--instagram:hover {
    background: linear-gradient(135deg, #833AB4, #E1306C, #F77737);
    border-color: #E1306C;
    color: #fff;
    box-shadow: 0 8px 24px rgba(225, 48, 108, 0.5);
}

.footer__social-link--youtube:hover {
    background: linear-gradient(135deg, #FF0000, #CC0000);
    border-color: #FF0000;
    color: #fff;
    box-shadow: 0 8px 24px rgba(255, 0, 0, 0.5);
}

.footer__social-link--tiktok:hover {
    background: linear-gradient(135deg, #00f2ea, #ff0050);
    border-color: #00f2ea;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 242, 234, 0.5);
}

/* Tablet/Mobile - Different hover effects with icon backgrounds */
@media (max-width: 1023px) {
    .footer__social-link--telegram:hover {
        background: linear-gradient(135deg, rgba(0, 136, 204, 0.15), rgba(34, 158, 217, 0.1));
        border-color: rgba(0, 136, 204, 0.4);
        color: inherit;
        transform: translateX(4px);
    }
    
    .footer__social-link--telegram:hover .footer__icon {
        background: linear-gradient(135deg, #0088cc, #229ED9);
        color: #fff;
    }
    
    .footer__social-link--instagram:hover {
        background: linear-gradient(135deg, rgba(131, 58, 180, 0.15), rgba(225, 48, 108, 0.1));
        border-color: rgba(225, 48, 108, 0.4);
        color: inherit;
        transform: translateX(4px);
    }
    
    .footer__social-link--instagram:hover .footer__icon {
        background: linear-gradient(135deg, #833AB4, #E1306C, #F77737);
        color: #fff;
    }
    
    .footer__social-link--youtube:hover {
        background: linear-gradient(135deg, rgba(255, 0, 0, 0.15), rgba(204, 0, 0, 0.1));
        border-color: rgba(255, 0, 0, 0.4);
        color: inherit;
        transform: translateX(4px);
    }
    
    .footer__social-link--youtube:hover .footer__icon {
        background: linear-gradient(135deg, #FF0000, #CC0000);
        color: #fff;
    }
    
    .footer__social-link--tiktok:hover {
        background: linear-gradient(135deg, rgba(0, 242, 234, 0.15), rgba(255, 0, 80, 0.1));
        border-color: rgba(0, 242, 234, 0.4);
        color: inherit;
        transform: translateX(4px);
    }
    
    .footer__social-link--tiktok:hover .footer__icon {
        background: linear-gradient(135deg, #00f2ea, #ff0050);
        color: #fff;
    }
}

.footer__social-text {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-style: italic;
}

[data-theme="light"] .footer__social-text {
    color: rgba(30, 27, 75, 0.7);
}

/* ============================================================================
   FOOTER BOTTOM SECTION - Copyright & Credits
   ============================================================================ */

.footer__bottom {
    border-top: 1px solid rgba(139, 92, 246, 0.15);
    background: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .footer__bottom {
    border-top-color: rgba(139, 92, 246, 0.1);
    background: rgba(255, 255, 255, 0.3);
}

.footer__bottom-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem clamp(1.25rem, 4vw, 3rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer__copyright {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

[data-theme="light"] .footer__copyright {
    color: rgba(30, 27, 75, 0.7);
}

.footer__security {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(34, 197, 94, 0.95);
}

[data-theme="light"] .footer__security {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.2);
    color: rgba(22, 163, 74, 1);
}

.footer__security-icon {
    font-size: 1rem;
}

.footer__credits {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
}

[data-theme="light"] .footer__credits {
    color: rgba(30, 27, 75, 0.65);
}

.footer__credits-link {
    color: rgba(139, 92, 246, 0.95);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.footer__credits-link:hover {
    color: #8b5cf6;
    text-decoration: underline;
}

[data-theme="light"] .footer__credits-link {
    color: rgba(124, 58, 237, 0.95);
}

[data-theme="light"] .footer__credits-link:hover {
    color: #7c3aed;
}

/* ============================================================================
   RESPONSIVE DESIGN - TABLET
   ============================================================================ */

@media (min-width: 768px) and (max-width: 1023px) {
    .footer__top {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
        padding: 3rem 2rem;
    }

    .footer__brand-section {
        grid-column: 1 / -1;
    }

    /* Tablet - Show labels, horizontal layout */
    .footer__social-links {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .footer__social-link {
        flex-direction: row;
        gap: 0.625rem;
        width: auto;
        height: auto;
        padding: 0.875rem 1.125rem;
        flex: 1 1 calc(50% - 0.375rem);
        min-width: 0;
    }
    
    .footer__icon {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.1);
    }
    
    .footer__icon svg {
        width: 20px;
        height: 20px;
    }
    
    .footer__social-label {
        display: block;
        font-size: 0.8125rem;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    [data-theme="light"] .footer__icon {
        background: rgba(0, 0, 0, 0.06);
    }
}

/* ============================================================================
   RESPONSIVE DESIGN - MOBILE (< 768px)
   ============================================================================ */

@media (max-width: 767px) {
    .footer__top {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 3rem 1.25rem;
    }

    .footer__brand-section {
        text-align: center;
        align-items: center;
    }

    .footer__logo {
        justify-content: center;
        width: 100%;
    }

    .footer__description {
        text-align: center;
        max-width: 100%;
    }

    .footer__links-section,
    .footer__resources-section,
    .footer__social-section {
        text-align: center;
        align-items: center;
    }

    .footer__section-title {
        text-align: center;
        width: 100%;
    }

    .footer__nav {
        align-items: center;
    }

    .footer__nav-link {
        justify-content: center;
        width: 100%;
        padding: 0.75rem 1rem;
        background: rgba(139, 92, 246, 0.08);
        border-radius: 10px;
        min-height: 48px;
    }

    .footer__nav-link:hover {
        background: rgba(139, 92, 246, 0.15);
        padding-left: 1rem;
    }

    [data-theme="light"] .footer__nav-link {
        background: rgba(139, 92, 246, 0.05);
    }

    [data-theme="light"] .footer__nav-link:hover {
        background: rgba(139, 92, 246, 0.12);
    }

    /* Mobile - Horizontal layout, no labels */
    .footer__social-links {
        flex-direction: row;
        justify-content: center;
        gap: 0.75rem;
        flex-wrap: wrap;
    }

    .footer__social-link {
        flex-direction: row;
        gap: 0;
        width: auto;
        height: auto;
        padding: 0;
        justify-content: center;
    }
    
    .footer__icon {
        width: 56px;
        height: 56px;
        flex-shrink: 0;
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.12);
    }
    
    .footer__icon svg {
        width: 24px;
        height: 24px;
    }
    
    .footer__social-label {
        display: none;
    }
    
    [data-theme="light"] .footer__icon {
        background: rgba(0, 0, 0, 0.08);
    }

    .footer__social-text {
        text-align: center;
    }

    .footer__bottom-inner {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 1.25rem;
        gap: 1rem;
    }

    .footer__security {
        order: -1;
    }
}

/* ============================================================================
   SMALL MOBILE (< 480px)
   ============================================================================ */

@media (max-width: 479px) {
    .footer__top {
        padding: 2rem 1rem;
        gap: 2rem;
    }

    .footer__slogan {
        font-size: 1rem;
    }

    .footer__description {
        font-size: 0.875rem;
    }

    /* Small Mobile - Keep horizontal layout, no labels */
    .footer__social-link {
        padding: 0;
    }
    
    .footer__icon {
        width: 52px;
        height: 52px;
    }
    
    .footer__icon svg {
        width: 22px;
        height: 22px;
    }
    
    .footer__social-label {
        display: none;
    }

    .footer__bottom-inner {
        padding: 1.25rem 1rem;
    }
}

/* ============================================================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================================================ */

@media (hover: none) and (pointer: coarse) {
    .footer__nav-link {
        min-height: 48px;
    }
    
    .footer__social-link {
        min-height: 52px;
    }

    /* Remove hover animations, add active states */
    .footer__nav-link:hover {
        transform: none;
    }

    .footer__nav-link:active {
        transform: scale(0.98);
        opacity: 0.8;
    }

    .footer__social-link:hover {
        transform: none;
        background: rgba(139, 92, 246, 0.08);
    }

    .footer__social-link:active {
        transform: scale(0.98);
        box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
    }
    
    [data-theme="light"] .footer__social-link:hover {
        background: rgba(139, 92, 246, 0.06);
    }
}

/* ============================================================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================================================ */

.footer__nav-link:focus-visible,
.footer__social-link:focus-visible,
.footer__credits-link:focus-visible {
    outline: 3px solid #8b5cf6;
    outline-offset: 3px;
    border-radius: 4px;
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    .footer {
        background: white !important;
        border-top: 1px solid #ccc !important;
        color: black !important;
        page-break-inside: avoid;
    }

    .footer__social-links,
    .footer__security {
        display: none;
    }
}

/* ============================================================================
   END OF FOOTER STYLES
   ============================================================================ */

