﻿:root {
    --primary-blue: #1dd3f8;
    --primary-blue-dark: #17b8d9;
    --primary-blue-light: #4de0ff;
    --primary-blue-very-light: rgba(29, 211, 248, 0.1);
    --primary-blue-medium: rgba(29, 211, 248, 0.15);
    --primary-blue-hover: #2d55ff;
    --primary-blue-hover-light: rgba(45, 85, 255, 0.1);
}


.language-switcher-wrapper {
    position: relative;
    display: inline-block;
}

.language-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-blue) 0%, #1a9ef8 100%);
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 25px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(29, 211, 248, 0.3);
    font-weight: 600;
    min-width: 120px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

    .language-toggle-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, #1a9ef8 0%, var(--primary-blue) 100%);
        opacity: 0;
        transition: opacity 0.4s ease;
        z-index: -1;
    }

    .language-toggle-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(29, 211, 248, 0.4);
    }

        .language-toggle-btn:hover::before {
            opacity: 1;
        }

    .language-toggle-btn.active {
        background: linear-gradient(135deg, #4de0ff 0%, var(--primary-blue-dark) 100%);
    }

.language-icon {
    font-size: 18px;
    margin-right: 8px;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.2));
    transition: transform 0.3s ease;
}

.language-toggle-btn:hover .language-icon {
    transform: rotate(15deg);
}

.language-arrow {
    margin-left: 6px;
    font-size: 10px;
    transition: transform 0.3s ease;
    opacity: 0.8;
}

.language-dropdown-content {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) scale(0.95);
    min-width: 160px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    padding: 8px 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(29, 211, 248, 0.1);
}

    .language-dropdown-content.show {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) scale(1);
    }

    .language-dropdown-content::before {
        content: '';
        position: absolute;
        top: -6px;
        left: 50%;
        transform: translateX(-50%) rotate(45deg);
        width: 12px;
        height: 12px;
        background: white;
        border-left: 1px solid rgba(29, 211, 248, 0.1);
        border-top: 1px solid rgba(29, 211, 248, 0.1);
    }

.language-option {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #2d3748;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

    .language-option:not(:last-child) {
        border-bottom: 1px solid rgba(29, 211, 248, 0.05);
    }

    .language-option:hover {
        background: linear-gradient(90deg, var(--primary-blue-very-light) 0%, rgba(26, 158, 248, 0.1) 100%);
        color: var(--primary-blue-dark);
        padding-right: 25px;
    }

    .language-option.active {
        background: linear-gradient(90deg, var(--primary-blue-medium) 0%, rgba(26, 158, 248, 0.15) 100%);
        color: var(--primary-blue-dark);
        font-weight: 600;
    }

        .language-option.active::before {
            content: '✓';
            position: absolute;
            right: 5px;
            color: var(--primary-blue-dark);
            font-weight: bold;
            animation: checkmark 0.3s ease;
        }

    .language-option::after {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        width: 3px;
        height: 100%;
        background: linear-gradient(to bottom, var(--primary-blue), #1a9ef8);
        transform: scaleY(0);
        transition: transform 0.3s ease;
    }

    .language-option:hover::after {
        transform: scaleY(1);
    }

.language-flag {
    font-size: 20px;
    margin-left: 10px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

.language-name {
    flex-grow: 1;
    text-align: center;
    font-size: 14px;
}

span.language-current {
    padding: 0 5px;
}


@keyframes checkmark {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    70% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(29, 211, 248, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(29, 211, 248, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(29, 211, 248, 0);
    }
}

.language-toggle-btn.pulse {
    animation: pulse 2s infinite;
}

.language-option .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(29, 211, 248, 0.3);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.language-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(29, 211, 248, 0.1);
    z-index: 9998;
    backdrop-filter: blur(3px);
}

    .language-overlay.show {
        display: block;
        animation: fadeIn 0.3s ease;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 991px) {
    .language-switcher-wrapper {
        position: static;
        display: flex;
        justify-content: center;
        width: 100%;
    }



    .language-toggle-btn {
        margin: 10px auto !important;
        position: relative !important;
        right: auto !important;
        left: auto !important;
        transform: none !important;
        min-width: 100px;
        padding: 6px 12px;
        font-size: 13px;
        border-radius: 20px;
        background: linear-gradient(135deg, var(--primary-blue) 0%, #17b8d9 100%);
        box-shadow: 0 3px 10px rgba(29, 211, 248, 0.3);
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

        .language-toggle-btn .language-icon {
            font-size: 16px;
            margin-right: 5px;
        }

        .language-toggle-btn .language-current {
            padding: 0 3px;
            font-size: 12px;
        }

    .mobile-language-container {
        margin-top: 15px;
        position: absolute;
        left: 28% !important;
        transform: translateX(-50%);
        top: 47% !important;
        transform: translateY(-50%);
        z-index: 1001;
    }


    .language-dropdown-content {
        position: fixed;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) scale(0.9);
        min-width: 140px;
        max-width: 90vw;
        background: white;
        border-radius: 15px;
        box-shadow: 0 20px 60px rgba(29, 211, 248, 0.15);
        z-index: 9999;
        border: 2px solid var(--primary-blue-light);
    }

        .language-dropdown-content.show {
            transform: translate(-50%, -50%) scale(1) !important;
            margin-top: 70px !important;
        }

        .language-dropdown-content::before {
            display: none;
        }

    .language-option {
        height: auto;
        min-height: 45px;
        padding: 10px 20px;
        font-size: 14px;
        align-items: center;
        justify-content: space-between;
    }

        .language-option.active {
            background: var(--primary-blue-very-light);
            color: var(--primary-blue-dark);
        }

    .language-name {
        text-align: center;
        flex-grow: 1;
    }

    .language-flag {
        margin-left: 10px;
    }
}


@media (max-width: 480px) {
    .language-toggle-btn {
        min-width: 90px;
        padding: 5px 10px;
        background: var(--primary-blue);
    }

        .language-toggle-btn .language-current {
            font-size: 11px;
        }

    .language-dropdown-content {
        min-width: 120px;
    }

    .language-option {
        padding: 8px 15px;
        min-height: 40px;
    }
}

