/* Hero Language Switch Button - Blur Style */

.hero-language-switch {
    position: absolute;
    top: 2rem;
    right: 2rem;
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hide language switch button on desktop */
@media (min-width: 769px) {
    .hero-language-switch {
        display: none;
    }
}

.hero-language-switch:hover {
    transform: translateY(-2px);
}

.hero-language-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.hero-language-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.hero-language-btn:hover::before {
    left: 100%;
}

.hero-language-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

.hero-language-btn:active {
    transform: translateY(0);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.hero-language-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: all 0.3s ease;
}

.hero-language-btn:hover .hero-language-icon {
    transform: scale(1.1) rotate(5deg);
}

.hero-language-text {
    font-weight: 700;
    transition: all 0.3s ease;
}

.hero-language-btn:hover .hero-language-text {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Language-specific styling */
.hero-language-btn[data-lang="ar"] {
    direction: rtl;
}

.hero-language-btn[data-lang="ar"] .hero-language-icon {
    transform: scaleX(-1);
}

.hero-language-btn[data-lang="ar"]:hover .hero-language-icon {
    transform: scaleX(-1) scale(1.1) rotate(-5deg);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-language-switch {
        top: 1.5rem;
        right: 1.5rem;
    }
    
    .hero-language-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
        gap: 0.4rem;
    }
    
    .hero-language-icon {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .hero-language-switch {
        top: 1rem;
        right: 1rem;
    }
    
    .hero-language-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.75rem;
        gap: 0.3rem;
        border-radius: 40px;
    }
    
    .hero-language-icon {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 360px) {
    .hero-language-switch {
        top: 0.75rem;
        right: 0.75rem;
    }
    
    .hero-language-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
        gap: 0.25rem;
        border-radius: 35px;
    }
    
    .hero-language-icon {
        width: 14px;
        height: 14px;
    }
}

/* RTL Support */
.rtl .hero-language-switch {
    right: auto;
    left: 2rem;
}

/* Hide RTL language switch button on desktop */
@media (min-width: 769px) {
    .rtl .hero-language-switch {
        display: none;
    }
}

.rtl .hero-language-btn {
    direction: rtl;
}

@media (max-width: 768px) {
    .rtl .hero-language-switch {
        left: 1.5rem;
    }
}

@media (max-width: 480px) {
    .rtl .hero-language-switch {
        left: 1rem;
    }
}

@media (max-width: 360px) {
    .rtl .hero-language-switch {
        left: 0.75rem;
    }
}

/* Animation for smooth entrance */
@keyframes languageButtonSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-language-switch {
    animation: languageButtonSlideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

/* Accessibility improvements */
.hero-language-btn:focus {
    outline: 2px solid rgba(1, 79, 182, 0.5);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero-language-btn {
        background: rgba(255, 255, 255, 0.9);
        border: 2px solid rgba(0, 0, 0, 0.3);
        color: #000;
    }
    
    .hero-language-btn:hover {
        background: rgba(1, 79, 182, 0.2);
        color: #014fb6;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .hero-language-switch,
    .hero-language-btn,
    .hero-language-icon {
        transition: none;
        animation: none;
    }
    
    .hero-language-btn::before {
        display: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .hero-language-btn {
        background: rgba(0, 0, 0, 0.3);
        border-color: rgba(255, 255, 255, 0.1);
        color: rgba(255, 255, 255, 0.9);
    }
    
    .hero-language-btn:hover {
        background: rgba(0, 0, 0, 0.5);
        border-color: rgba(255, 255, 255, 0.2);
        color: white;
    }
}
