header {
    padding: 0;
}

.main-header {
    /* padding: 2em; */
    padding-right: 2em;
    font-family: 'Avenir-Light';
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    /* margin-bottom: 1em; */
    width: 100%; 
    transition: all 0.4s ease-in-out;
}

.menu li a {
    font-size: 20px !important;
}

.menu li {
    padding-bottom: .2em;
}

.nav{
    display: flex; 
    margin-right: -15px;
    margin-left: -15px;
    justify-content: space-between;
    padding: 1em;
}

.nav::before, .nav::after {
    content:none; 
}

.nav__item--selected {
    border-bottom: 4px solid #FD941E;
    color: black !important;
    padding-bottom: .5em; 
    margin-bottom: -.5em;
}

/* <!-- Dropdown --> */

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown__content {
    display: none;
    position: absolute;
    background-color: #F2F5F8;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    padding-left: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.dropdown__content li {
    width: 100%; 
}

.dropdown__content li a {
    padding: 1em;
}

.dropdown__content li:hover {
    background-color: #FD941E;
    transition: background-color 0.3s ease;
}

.dropdown__content li a:hover {
    color: #FFFFFF;
    transition: color 0.3s ease;
}

.dropdown:hover .dropdown__content {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0.1s;
}

/* Dropdown button specific styles */
.dropdown-toggle {
    position: relative;
    cursor: pointer;
}

.dropdown-toggle::after {
    content: '▼';
    margin-left: 8px;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

/* Ensure dropdown content appears above other elements */
.dropdown__content {
    z-index: 1000;
    border-radius: 8px;
    margin-top: 5px;
}

/* Remove button styling from dropdown menu items */
.dropdown__content li a {
    padding: 1em !important;
    border-radius: 0 !important;
    font-size: 16px !important;
    color: #333 !important;
    background-color: transparent !important;
    border-style: none !important;
    font-family: 'Calibri' !important;
    font-weight: normal !important;
    min-width: auto !important;
    width: 100% !important;
    text-align: left !important;
    display: block !important;
    text-decoration: none !important;
}

.dropdown__content li a:hover {
    background-color: #FD941E !important;
    color: #FFFFFF !important;
    transition: background-color 0.3s ease;
}

/* Blue dropdown hover effect for Business Space */
.btn--blue + .dropdown__content li a:hover {
    background-color: #1D78C5 !important;
    color: #FFFFFF !important;
    transition: background-color 0.3s ease;
}

/* Orange dropdown hover effect for Candidate Space */
.btn--orange + .dropdown__content li a:hover {
    background-color: #FD941E !important;
    color: #FFFFFF !important;
    transition: background-color 0.3s ease;
}

/* Dropdown button container styling */
.dropdown {
    position: relative;
    display: inline-block;
}

/* Ensure dropdown content appears below the button */
.dropdown .dropdown__content {
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    min-width: 200px;
}

/* Add a pseudo-element to create a hover bridge between button and dropdown */
.dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 10px;
    background: transparent;
    z-index: 999;
}

/* Improve dropdown menu item transitions */
.dropdown__content li {
    transition: background-color 0.2s ease;
}

.dropdown__content li a {
    transition: color 0.2s ease, background-color 0.2s ease;
}

/* Add a slight delay when leaving the dropdown */
.dropdown:not(:hover) .dropdown__content {
    transition-delay: 0.2s;
}

.topNavBtn {
    display: flex; 
    align-items: center; 
    gap: 1em;
    width: 100%; 
}

.topNavBtn div a {
    font-size: 18px; 
    padding: .5em;
}

.topNavBtn div a:first-child {
    border-right: 1px solid black; 
}

.topNavBtn div a:nth-child(2) {
    padding-left: .25em;
}

.nav__actions {
    gap: 1em; 
    align-items: center;
}

.nav__btn{
    padding: .8em 2em;
    border-radius: 50px;
    font-size: 18px;
    color: #FFFFFF;
    border-style: none;
    font-family: 'Calibri';
    font-weight: 550;  
    min-width:160px; 
}

.nav__btn:hover {
    cursor: pointer;
}

.btn--orange {
    background-color: #FD941E;
}

.btn--orange:hover {
    background-color: #e57514;
}

.btn--orange:hover, .btn--blue:hover {
    color: #FFFFFF;
    transition: background-color 0.5s ease;
    cursor: pointer;
}

.btn--blue {
    background-color: #1D78C5;
}

.btn--blue:hover {
    background-color: #0264b5;
}

.lang--selected {
    font-weight: bold; 
}

.logo-container {
    max-width: 156.16px;
    padding-left: 1em;
}



@media only screen and (min-width: 768px) and (max-width: 1024px) {
    .logo-h360 {
        width: 131.64 !important; 
        height: 74.16 !important;
    }
    .log-h360 img {
        width: 131.64 !important; 
        height: 74.16 !important;     
    }

    .nav {
        justify-content: center;
        width: 100%;
    }
}

@media (max-width: 770px) {
    .nav__btn {
        width: 204px; 
    }

    .nav {
        width: 75%;
    }

    ul.topNavBtn {
        width: 100%;
    }
}

@media (max-width: 824px) {
    .topNavBtn a{
        padding-bottom: 1em;
    }
}

@media (max-width: 1087px) {
    .topNavBtn {
        flex-flow: column; 
    }
    .width-100 {
        width: 100%; 
    }
    .main-header {
        padding-left: 3em;
    }
}

@media (max-width: 1200px) {    
    .nav__actions {
        width: 100%;
    }

    .menu .nav__item--selected {
        color: #FFFFFF !important;
        font-weight: bold; 
    }
}

@media (max-width: 1251px) {
    .topNavBtn div a:first-child {
        border-bottom: none; 
        border-right: 1px solid black;
    } 
}

@media (min-width: 1200px) and (max-width:1252px) {
    .topNavBtn div a:first-child {
        border-bottom: 1px solid black; 
        border-right: none;
    }
}

@media (min-width: 1252px) and (max-width:1655px) {
    .topNavBtn div a:first-child {
        border-bottom: none; 
        border-right: 1px solid black;
    }
}

/* Mobile Navigation Button Adjustments */
@media (max-width: 768px) {
    .nav__btn {
        padding: 0.6em 1.2em !important;
        font-size: 18px !important;
        min-width: 140px !important;
        height: auto !important;
        margin: 0.3em 0 !important;
        border-radius: 25px !important;
    }
    
    .nav__actions {
        flex-direction: column !important;
        gap: 0.5em !important;
        width: 100% !important;
        align-items: stretch !important;
    }
    
    .dropdown {
        width: 100% !important;
        margin: 0.2em 0 !important;
    }
    
    .dropdown-toggle {
        width: 100% !important;
        text-align: center !important;
    }
    
    .dropdown__content {
        min-width: 100% !important;
        left: 0 !important;
        right: 0 !important;
    }
}

@media (max-width: 480px) {
    .nav__btn {
        padding: 0.5em 1em !important;
        font-size: 18px !important;
        min-width: 120px !important;
        max-width:200px !important;
        height: auto !important;
        min-height: 40px !important;
        margin: 0.2em 0 !important;
        border-radius: 20px !important;
    }
    
    .nav__actions {
        gap: 0.3em !important;
    }
    
    .dropdown {
        margin: 0.1em 0 !important;
    }
    
    .main-header {
        padding: 1em !important;
    }
    
    .nav {
        padding: 0.5em !important;
        flex-direction: column !important;
        align-items: center !important;
    }
}