/* Language Switcher Styles for Homepage */
.language-switcher-nav {
    margin-right: 15px;
    position: relative;
    z-index: 1050;
}

.language-switcher-nav .nav-link {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 25px;
    padding: 10px 18px;
    color: white !important;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    min-width: 120px;
    justify-content: center;
}

.language-switcher-nav .nav-link:hover,
.language-switcher-nav .nav-link:focus,
.language-switcher-nav .nav-link:active {
    background: rgba(255,255,255,0.25) !important;
    border-color: rgba(255,255,255,0.5) !important;
    /* color: white !important; */
    text-decoration: none !important;
    transform: translateY(-1px);
}

.language-switcher-nav .nav-link:active {
    transform: translateY(0px);
}

/* Ensure it doesn't affect login button */
.language-switcher-nav + .nav-item .button {
    margin-left: 0;
}

.language-switcher-nav .dropdown-menu {
    border-radius: 12px;
    border: none;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    min-width: 180px;
    padding: 8px 0;
    margin-top: 8px;
    display: none;
    position: absolute;
    z-index: 1000;
    top: 100%;
    left: 0;
    background: white;
}

.language-switcher-nav .dropdown-menu.show {
    display: block;
}

.language-switcher-nav .dropdown-item {
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
    cursor: pointer;
    user-select: none;
    border: none;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.language-switcher-nav .dropdown-item::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.5s ease;
}

.language-switcher-nav .dropdown-item:hover::before {
    left: 100%;
}

.language-switcher-nav .dropdown-item:hover {
    background: linear-gradient(135deg, #052CFF, #0ADCC7) !important;
    color: white !important;
    text-decoration: none !important;
    transform: translateX(3px);
}

.language-switcher-nav .dropdown-item:active {
    transform: translateX(1px);
}

.language-switcher-nav .dropdown-item.active {
    background: rgba(5, 44, 255, 0.1);
    color: #052CFF;
    font-weight: 600;
    border-left: 3px solid #052CFF;
}

.language-switcher-nav .dropdown-item.active:hover {
    background: linear-gradient(135deg, #052CFF, #0ADCC7) !important;
    color: white !important;
    border-left: 3px solid white;
}

.language-switcher-nav .flag-icon {
    font-size: 18px;
    width: 24px;
    height: 18px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    transition: transform 0.2s ease;
}

.language-switcher-nav .dropdown-item:hover .flag-icon {
    transform: scale(1.1);
}

/* Add subtle animation to the dropdown arrow */
.language-switcher-nav .nav-link::after {
    content: "▼";
    font-size: 10px;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.language-switcher-nav .nav-link[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

/* Add ripple effect on click */
.language-switcher-nav .dropdown-item {
    position: relative;
    overflow: hidden;
}

.language-switcher-nav .dropdown-item:active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    to {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

/* Mobile responsiveness for language switcher */
@media (max-width: 991px) {
    .language-switcher-nav {
        margin-left: 0;
        margin-right: 0;
        margin-top: 10px;
        width: 100%;
    }
    
    .language-switcher-nav .nav-link {
        padding: 8px 16px;
        font-size: 13px;
        min-width: 100px;
        justify-content: center;
    }
    
    .language-switcher-nav .dropdown-menu {
        width: 100%;
        left: 0;
        right: 0;
        margin-top: 5px;
    }
    
    .language-switcher-nav .dropdown-item {
        padding: 10px 16px;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .language-switcher-nav .nav-link {
        padding: 6px 12px;
        font-size: 12px;
        min-width: 90px;
    }
    
    .language-switcher-nav .dropdown-item {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Admin Header Language Switcher Styles */
.language-switcher-admin .nav-link {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 25px;
    padding: 8px 16px;
    color: #6c757d !important;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    min-width: 120px;
    justify-content: center;
}

.language-switcher-admin .nav-link:hover,
.language-switcher-admin .nav-link:focus,
.language-switcher-admin .nav-link:active {
    background: rgba(0,0,0,0.05) !important;
    border-color: rgba(0,0,0,0.1) !important;
    color: #495057 !important;
    text-decoration: none !important;
    transform: translateY(-1px);
}

.language-switcher-admin .nav-link:active {
    transform: translateY(0px);
}

.language-switcher-admin .dropdown-menu {
    border-radius: 12px;
    border: none;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    min-width: 200px;
    padding: 8px 0;
    margin-top: 8px;
}

.language-switcher-admin .dropdown-title {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 4px;
}

.language-switcher-admin .dropdown-item {
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex !important;
    align-items: center;
    gap: 10px;
    color: #333;
    cursor: pointer;
    user-select: none;
    border: none;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.language-switcher-admin .dropdown-item::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.5s ease;
}

.language-switcher-admin .dropdown-item:hover::before {
    left: 100%;
}

.language-switcher-admin .dropdown-item:hover {
    background: linear-gradient(135deg, #052CFF, #0ADCC7) !important;
    color: white !important;
    text-decoration: none !important;
    transform: translateX(3px);
}

.language-switcher-admin .dropdown-item:active {
    transform: translateX(1px);
}

.language-switcher-admin .dropdown-item.active {
    background: rgba(5, 44, 255, 0.1);
    color: #052CFF;
    font-weight: 600;
    border-left: 3px solid #052CFF;
}

.language-switcher-admin .dropdown-item.active:hover {
    background: linear-gradient(135deg, #052CFF, #0ADCC7) !important;
    color: white !important;
    border-left: 3px solid white;
}

.language-switcher-admin .flag-icon {
    font-size: 16px;
    width: 20px;
    height: 16px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    transition: transform 0.2s ease;
}

.language-switcher-admin .dropdown-item:hover .flag-icon {
    transform: scale(1.1);
}

/* Add subtle animation to the dropdown arrow */
.language-switcher-admin .nav-link::after {
    /* content: "▼"; */
    font-size: 10px;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.language-switcher-admin .nav-link[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

/* Mobile Navigation Fix */
@media (max-width: 991px) {
    .navbar-collapse {
        display: none !important;
    }
    
    .navbar-collapse.show {
        display: block !important;
    }
    
    .navbar-collapse.collapsing {
        display: block !important;
        height: auto !important;
    }
}
