/* Top header navigation */
header nav {
    width: 80%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
header nav .toggle,
header nav [id^=sub] {
    display: none;
}
header nav a {
    color: #fff;
    text-decoration: none;
}
header nav a#logo img {
    max-width: 120px;
    height: auto;
    display: block;
}
header nav ul {
    list-style: none;
    display: flex;
    background: #333;
}
header nav ul li a {
    display: flex;
    padding: 0 10px;
    white-space: nowrap;
    justify-content: space-between;
}
header nav ul li {
    position: relative;
    transition: .3s;
}
header nav ul li:hover {
    background: #777;
    transition: .3s;
}
/* First-level dropdown */
header nav ul li ul {
    flex-direction: column;
    position: absolute;
    display: none;
    min-width: 100%;
    width: max-content;
}
header nav ul li:hover > ul {
    display: flex; 
}
/* Second-level dropdown */
header nav ul li ul li ul {
    left: 100%;
    top: 0;
    width: max-content;
    min-width: auto;
}
header nav ul li a::after {
    content: '\f078'; 
    font-family: 'FontAwesome';
    font-size: 0.8em;
    margin-left: 5px;
    color: #2cf;
}
header nav ul li ul li a::after {
    content: '\f054'; 
}
header nav ul li a:only-child::after {
    content: '';
}

/* Media Queries */
@media all and (max-width:768px) {
    /* Top header nav (Mob) */
    header nav {
        width: 100%;
        flex-wrap: wrap;
    }
    header nav a#logo {
        flex-basis: 50%;
        padding-left: 10px;
    }
    header nav a#logo img {
        max-width: 100px;
    }
    header nav #burger {
        font-size: 1.5em;
        cursor: pointer;
        flex-basis: 50%;
        text-align: right;
        padding-right: 10px;
    }
    header nav .toggle {
        display: block;
    }
    header nav .toggle + a {
        display: none;
    }
    header nav [id^=sub]:checked + ul {
        display: flex;
    }
    header nav ul {
        display: none;
        flex-direction: column;
        flex-basis: 100%;
        background: #444;
    }
    header nav ul label,
    header nav ul li a {
        padding-left: 20px;
        background: #555;
        border-bottom: 1px dashed #999;
    }
    header nav ul li ul label,
    header nav ul li ul li a {
        padding-left: 40px;
        background: #666;
    }
    header nav ul li ul li ul label,
    header nav ul li ul li ul li a {
        padding-left: 60px;
        background: #777;
    }
    header nav ul li ul,
    header nav ul li ul li ul {
        position: static;
        width: 100% !important;
        min-width: 100% !important;
    }
    header nav ul li:hover > ul {
        display: none; 
    }
    header nav ul label::after {
        font-family: 'FontAwesome';
        content: '\2b';
        padding-left: 8px;
        font-size: 0.8em;
        color: #22ccff;
    }
    header nav #icon {
        transition: .3s;
    }
    header nav .fa-bars {
        transform: rotate(0deg);
    }
    header nav .fa-times {
        transform: rotate(90deg);
    }
}

/* Language Switcher Styles */
.language-switcher {
    display: block !important;
}

.language-switcher .toggle {
    display: flex; /* Change this to flex */
    align-items: center; /* Add this */
    padding: 0 10px;
    cursor: pointer;
    height: 100%; /* Keep this */
}

.language-switcher-toggle {
    display: flex;
    align-items: center; 
    gap: 5px;
}

.language-switcher ul {
    top: 100%;
    left: 0;
    min-width: 120px;
}

.language-switcher ul li {
    padding: 0;
}

.language-switcher ul li a {
    padding: 0 10px;
    color: #fff;
    display: flex;
    align-items: center; /* Center vertically */
    gap: 5px;
}

.language-switcher ul li a:hover {
    background: #777;
}

.flag {
    width: 20px;
    height: auto;
    border-radius: 2px;
}

/* Remove dropdown arrow for language switcher only */
.language-switcher > a::after,
.language-switcher > .toggle::after {
    content: '' !important;
}

/* Currency Switcher Styles - Same as language switcher */
.currency-switcher {
    display: block !important;
}

.currency-switcher .toggle {
    display: flex;
    align-items: center;
    padding: 0 10px;
    cursor: pointer;
    height: 100%;
}

.currency-switcher-toggle {
    display: flex;
    align-items: center; 
    gap: 5px;
}

.currency-switcher ul {
    top: 100%;
    left: 0;
    min-width: 120px;
}

.currency-switcher ul li {
    padding: 0;
}

.currency-switcher ul li a {
    padding: 0 10px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 5px;
}

.currency-switcher ul li a:hover {
    background: #777;
}

.currency-switcher ul li a.active {
    background: #555;
}

/* Remove dropdown arrow for currency switcher */
.currency-switcher > a::after,
.currency-switcher > .toggle::after {
    content: '' !important;
}

/* Media Queries for Currency Switcher */
@media all and (max-width:768px) {
    .currency-switcher .toggle {
        padding-left: 20px;
        background: #555;
        border-bottom: 1px dashed #999;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 5px;
    }
    
    .currency-switcher ul li a {
        padding-left: 40px;
        background: #666;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 5px;
    }
    
    .currency-switcher ul {
        position: static;
        width: 100% !important;
        min-width: 100% !important;
    }
}

/* Media Queries for Language Switcher */
@media all and (max-width:768px) {
    .language-switcher .toggle {
        padding-left: 20px;
        background: #555;
        border-bottom: 1px dashed #999;
        display: flex; /* Ensure flex in mobile */
        align-items: center; /* Center vertically in mobile */
        justify-content: flex-start; /* Add this - override space-between */
        gap: 5px;
    }
    
    .language-switcher ul li a {
        padding-left: 40px;
        background: #666;
        display: flex;
        align-items: center; /* Center vertically in mobile */
        justify-content: flex-start; /* Add this - override space-between */
        gap: 5px;
    }
    
    .language-switcher ul {
        position: static;
        width: 100% !important;
        min-width: 100% !important;
    }
}

/* Highlighted Menu Item */
header nav ul li.highlighted-menu-item {
    display: flex;
    align-items: center;
    padding: 0 5px;
}

header nav ul li.highlighted-menu-item > a {
    background-color: #ff0000;
    color: #fff !important;
    font-weight: bold;
    border-radius: 4px;
    padding: 0 15px;
    height: 32px; /* Fixed height to fit inside 50px header */
    line-height: 32px; /* Center text vertically inside the red box */
    display: flex;
    align-items: center;
}

header nav ul li.highlighted-menu-item:hover {
    background: transparent; /* Disable the gray hover background for this item */
}

header nav ul li.highlighted-menu-item:hover > a {
    background-color: #cc0000;
}
