/**
 * Language Switcher Styles
 * Beautiful floating language selector for ExpoBeton website
 */

/* Ensure navigation items display inline */
.main-header .main-menu .navigation {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

.main-header .main-menu .navigation > li {
    display: inline-block;
    white-space: nowrap;
}

/* Header Language Switcher */
.header-language-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 15px;
}

.lang-switch-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    overflow: hidden;
}

.lang-switch-btn:hover {
    transform: scale(1.1);
    border-color: #f8b034;
    box-shadow: 0 4px 12px rgba(248, 176, 52, 0.3);
}

.lang-switch-btn.active {
    border-color: #f8b034;
    background: linear-gradient(135deg, #f8b034 0%, #f59f35 100%);
    box-shadow: 0 4px 15px rgba(248, 176, 52, 0.4);
}

.lang-switch-btn.active:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(248, 176, 52, 0.5);
}

.flag-icon-header {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.lang-switch-btn:hover .flag-icon-header {
    transform: rotate(5deg) scale(1.05);
}

/* Responsive adjustments for header switcher */
@media (max-width: 991px) {
    .header-language-switcher {
        display: none; /* Hide on mobile, use floating switcher instead */
    }
}

@media (max-width: 768px) {
    .header-language-switcher {
        gap: 6px;
        margin-left: 10px;
    }
    
    .lang-switch-btn {
        width: 35px;
        height: 35px;
    }
    
    .flag-icon-header {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .header-language-switcher {
        gap: 4px;
        margin-left: 8px;
    }
    
    .lang-switch-btn {
        width: 32px;
        height: 32px;
        border-width: 1.5px;
    }
    
    .flag-icon-header {
        width: 22px;
        height: 22px;
    }
}

/* Floating Language Switcher (Original) */

.language-switcher {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: transparent;
    padding: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation: slideInLeft 0.6s ease-out;
}

.language-switcher:hover {
    gap: 8px;
}

.language-switcher:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

.lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-weight: 600;
    font-size: 0;
    color: transparent;
    position: relative;
    overflow: hidden;
    width: 50px;
    height: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: scale(0);
    pointer-events: none;
}

.lang-btn.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: all;
    background: linear-gradient(135deg, #f6af34 0%, #f6af34 100%);
    border-color: #f6af34;
    box-shadow: 0 6px 25px rgba(255, 215, 0, 0.4);
}

.language-switcher:hover .lang-btn {
    opacity: 1;
    transform: scale(1);
    pointer-events: all;
}

.lang-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #f6af34 0%, #f6af34 100%);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    z-index: -1;
}

.lang-btn:hover::before {
    width: 200%;
    height: 200%;
}

.lang-btn:hover {
    transform: scale(1.15) !important;
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.5);
    border-color: #f6af34;
}





.flag-icon {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: none;
    transition: transform 0.3s ease;
}



.lang-text {
    display: none;
}

/* Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .language-switcher {
        bottom: 15px;
        left: 15px;
    }
    
    .lang-btn {
        width: 45px;
        height: 45px;
    }
    
    .flag-icon {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .language-switcher {
        bottom: 10px;
        left: 10px;
    }
    
    .lang-btn {
        width: 40px;
        height: 40px;
        border-width: 2px;
    }
    
    .flag-icon {
        width: 24px;
        height: 24px;
    }
}

/* Accessibility improvements */
.lang-btn:focus {
    outline: 3px solid #f6af34;
    outline-offset: 2px;
}

.lang-btn:focus:not(:focus-visible) {
    outline: none;
}

.lang-btn:focus-visible {
    outline: 3px solid #f6af34;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .language-switcher {
        border: 2px solid currentColor;
    }
    
    .lang-btn {
        border-width: 2px;
    }
    
    .lang-btn.active {
        border-color: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .language-switcher {
        animation: none;
    }
    
    .lang-btn,
    .lang-btn::before,
    .flag-icon {
        transition: none;
    }
    
    .lang-btn.active .flag-icon {
        animation: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .language-switcher {
        background: #1a1a1a;
        box-shadow: 0 8px 32px rgba(255, 255, 255, 0.1);
    }
    
    .lang-btn {
        color: #fff;
    }
    
    .lang-btn:not(.active):hover {
        background: rgba(255, 255, 255, 0.1);
    }
}
