/* Media Training Academy - Multilingual CSS Enhancements */

/* Language-specific typography */
[lang="zh"] {
    font-family: 'Noto Sans SC', 'SimHei', 'Microsoft YaHei', sans-serif;
}

[lang="ja"] {
    font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
}

[lang="ru"] {
    font-family: 'Roboto', 'Segoe UI', 'Arial', sans-serif;
}

[lang="fr"], [lang="es"] {
    font-family: 'Poppins', 'Segoe UI', 'Arial', sans-serif;
}

/* Enhanced Language Switcher Styles */
.language-switcher-enhanced {
    z-index: 1000;
}

.language-toggle {
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 164, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.language-toggle:hover {
    box-shadow: 0 12px 40px rgba(0, 164, 255, 0.2);
    transform: translateY(-2px);
}

.language-menu {
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 164, 255, 0.2);
}

.language-option {
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 164, 255, 0.1);
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: rgba(0, 164, 255, 0.1);
    transform: translateX(5px);
}

.language-option.active {
    background: rgba(0, 164, 255, 0.2);
}

/* Social Media Links Enhanced Styling */
.social-link {
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.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 0.5s ease;
}

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

.social-link:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 164, 255, 0.2);
}

/* Language Detection Notification */
.language-notification {
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* RTL/LTR Direction Enhancements */
[dir="rtl"] .language-toggle {
    flex-direction: row-reverse;
}

[dir="rtl"] .language-menu {
    right: 0;
    left: auto;
}

[dir="rtl"] .language-option {
    flex-direction: row-reverse;
}

[dir="rtl"] .social-link:hover {
    transform: scale(1.1) translateY(-2px) translateX(-5px);
}

[dir="ltr"] .social-link:hover {
    transform: scale(1.1) translateY(-2px) translateX(5px);
}

/* Font Loading Optimization */
@font-face {
    font-family: 'Noto Sans SC';
    src: url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');
    font-display: swap;
}

@font-face {
    font-family: 'Noto Sans JP';
    src: url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;600;700&display=swap');
    font-display: swap;
}

/* Language-specific text adjustments */
[lang="zh"] .hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
}

[lang="ja"] .hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
}

[lang="ru"] .hero-title {
    font-size: 4rem;
    line-height: 1.1;
}

/* Mobile responsiveness for language switcher */
@media (max-width: 768px) {
    .language-switcher-enhanced {
        top: 80px;
        left: 1rem;
    }
    
    .language-toggle {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .language-menu {
        min-width: 180px;
    }
    
    .language-option {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
}

/* Improved accessibility */
.language-toggle:focus,
.language-option:focus {
    outline: 2px solid #00A4FF;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .language-toggle {
        border: 2px solid #00A4FF;
        background: #000000;
    }
    
    .language-menu {
        border: 2px solid #00A4FF;
        background: #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .language-toggle,
    .language-menu,
    .language-option,
    .social-link {
        transition: none;
    }
    
    .language-notification {
        animation: none;
    }
}