﻿/* ============================================================================
   PROFESSIONAL LANGUAGE SELECTOR - GLASSMORPHISM (FIXED DESKTOP)
   ============================================================================ */

.language-selector {
    position: relative;
}

.current-flag-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    overflow: hidden;
    padding: 0;
}

.header.scrolled .current-flag-btn {
    width: 38px;
    height: 38px;
}

.current-flag-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px) scale(1.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.current-flag-btn:active {
    transform: translateY(0) scale(1);
}

.flag-display {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
}

/* Language Dropdown Menu - FIXED FOR DESKTOP */
.language-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 999999999;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 16px 64px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    padding: 10px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.6, 1);
    pointer-events: none;
}

.language-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    transform: rotate(45deg);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.language-selector.open .language-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Language Options */
.language-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin-bottom: 4px;
}

.language-option:last-child {
    margin-bottom: 0;
}

.language-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: 14px;
}

.language-option:hover::before {
    opacity: 1;
}

.language-option:hover {
    transform: translateX(4px);
    background: rgba(212, 165, 116, 0.1);
}

.language-option.active {
    background: linear-gradient(135deg, #d4a574 0%, #c4956f 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: white;
    box-shadow: 0 4px 16px rgba(212, 165, 116, 0.40), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.language-option .flag {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    display: flex;
}

.language-name {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: #212529;
}

.language-option.active .language-name {
    color: white;
}

.language-check {
    font-size: 18px;
    color: #d4a574;
    opacity: 0;
    transition: opacity 0.2s;
}

.language-option.active .language-check {
    opacity: 1;
    color: white;
}

/* Flag Styles */

/* Italian Flag */
.flag.italian {
    display: flex;
    width: 100%;
    height: 100%;
}

.flag.italian .flag-green {
    width: 33.33%;
    background-color: #009246;
}

.flag.italian .flag-white {
    width: 33.33%;
    background-color: white;
}

.flag.italian .flag-red {
    width: 33.33%;
    background-color: #ce2b37;
}

/* Albanian Flag */
.flag.albanian {
    position: relative;
    width: 100%;
    height: 100%;
    background: #e41e20;
}

.flag-red-bg {
    width: 100%;
    height: 100%;
    background: #e41e20;
}

.flag-eagle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    filter: brightness(0.1);
}

/* British Flag */
.flag.british {
    width: 100%;
    height: 100%;
    position: relative;
    background: #012169;
}

.uk-flag {
    width: 100%;
    height: 100%;
    background: linear-gradient(to top right, transparent calc(50% - 2px), #fff calc(50% - 2px), #fff calc(50% + 2px), transparent calc(50% + 2px)), linear-gradient(to bottom right, transparent calc(50% - 2px), #fff calc(50% - 2px), #fff calc(50% + 2px), transparent calc(50% + 2px)), linear-gradient(#fff, #fff) no-repeat center / 20% 100%, linear-gradient(#fff, #fff) no-repeat center / 100% 20%, linear-gradient(to top right, transparent calc(50% - 1px), #c8102e calc(50% - 1px), #c8102e calc(50% + 1px), transparent calc(50% + 1px)), linear-gradient(to bottom right, transparent calc(50% - 1px), #c8102e calc(50% - 1px), #c8102e calc(50% + 1px), transparent calc(50% + 1px)), linear-gradient(#c8102e, #c8102e) no-repeat center / 12% 100%, linear-gradient(#c8102e, #c8102e) no-repeat center / 100% 12%, #012169;
}

/* German Flag */
.flag.german {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.germany-black {
    height: 33.33%;
    background: #000000;
}

.germany-red {
    height: 33.33%;
    background: #DD0000;
}

.germany-yellow {
    height: 33.33%;
    background: #FFCE00;
}

/* French Flag */
.flag.french {
    display: flex;
    width: 100%;
    height: 100%;
}

.france-blue {
    width: 33.33%;
    background: #0055A4;
}

.france-white {
    width: 33.33%;
    background: #FFFFFF;
}

.france-red {
    width: 33.33%;
    background: #EF4135;
}

/* Staggered Animation */
.language-option {
    animation: slideInLangOption 0.3s ease backwards;
}

.language-option:nth-child(1) {
    animation-delay: 0.05s;
}

.language-option:nth-child(2) {
    animation-delay: 0.1s;
}

.language-option:nth-child(3) {
    animation-delay: 0.15s;
}

.language-option:nth-child(4) {
    animation-delay: 0.2s;
}

.language-option:nth-child(5) {
    animation-delay: 0.25s;
}

@keyframes slideInLangOption {
    from {
        opacity: 0;
        transform: translateX(-15px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .current-flag-btn {
        width: 40px;
        height: 40px;
    }

    .language-dropdown-menu {
        min-width: 180px;
    }

    .language-option {
        padding: 10px 14px;
    }

    .language-option .flag {
        width: 28px;
        height: 28px;
    }

    .language-name {
        font-size: 14px;
    }
}

/* Very Small Mobile */
@media (max-width: 480px) {
    .language-dropdown-menu {
        right: -10px;
    }
}

/* ============================================================================
   GOOGLE TRANSLATE STYLING
   ============================================================================ */

/* Hide Google Translate top frame */
.goog-te-banner-frame.skiptranslate {
    display: none !important;
}

body {
    top: 0px !important;
}

/* Hide default Google widget */
#google_translate_element {
    display: none !important;
}

.goog-te-gadget {
    display: none !important;
}

/* Hide "Powered by Google" */
.goog-logo-link {
    display: none !important;
}

.goog-te-gadget {
    color: transparent !important;
}

.goog-te-gadget .goog-te-combo {
    display: none !important;
}

/* Prevent Google Translate from breaking layout */
.translated-ltr {
    margin-top: 0 !important;
}

/* Fix for iframe that Google adds */
body > .skiptranslate {
    display: none;
}

iframe.skiptranslate {
    display: none !important;
}

/* Style the Google Translate notification */
.goog-te-banner-frame {
    display: none !important;
}