@import '../../css/global.css';

/*---------------------------------------
  Navbar
-----------------------------------------*/  
header {
    display: absolute !important;
    width: 90vw; /* Set the width of the header */
    max-width: 1200px; /* Optional: Limit the max width for larger screens */
    z-index: 100;
}

nav {
    position: relative;
    z-index: 1000;
    display: flex;
    flex-wrap: nowrap; /* Ensures items stay in a single row */
    justify-content: space-between; /* Space between logo and nav items */
    align-items: center;
    width: 80vw; /* Use 100% to respect the header's width */
    padding: 1rem 0; /* Add padding for vertical spacing */

}

.navbar-brand {
    margin-right: auto; /* Ensures logo stays to the far left */
}

.navbar-brand img {
    max-width: 100px; /* Ensure the image doesn't exceed the width of its container */
}

.navbar-nav {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0; /* Remove default margin */
    padding: 0; /* Remove default padding */
    justify-content: flex-end; /* Ensures items are aligned to the right */
    gap: 1rem; /* Add space between nav items */
}

.nav-link {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    font-size: 18px;
    color: var(--bg-color);
    padding: 0.3rem;
    text-align: left;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {

    nav {
        width: 90vw; /* Use 100% to respect the header's width */
    
    }

    .navbar-nav {
        display: none; /* Hide navbar items on small screens */
        flex-direction: column;
        position: absolute;
        right: 0;
        top: 5rem;
        background-color: var(--accent-color);
        padding: 1rem;
        z-index: 10;
        backdrop-filter: blur(10px);
        border-radius: 0 0 20px 20px;
        width: 100%; /* Full width of the parent */
    }

    .navbar-nav.show {
        display: flex; /* Show navbar items when toggled */
    }

    .nav-item {
        background-color: rgba(217, 217, 217, 0.3);
        width: 100%;
        padding: 1rem;
        text-align: center;
    }

    .navbar-toggler {
        display: block; /* Show the toggler on smaller screens */
        margin-left: auto;
        cursor: pointer;
    }
}

/* Hide the navbar toggler on larger screens */
@media (min-width: 769px) {
    .navbar-toggler {
        display: none; /* Hide the toggler on larger screens */
    }
}

/* Dropdown Styling */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.dropdown-content > a > img {
    width: 25px;
}

/* Hamburger Icon */
.navbar-toggler {
    border: none !important;
}

#nav-icon3 {
    width: 50px;
    height: 45px;
    position: relative;
    transition: .5s ease-in-out;
    cursor: pointer;
}

#nav-icon3 span {
    display: block;
    position: absolute;
    height: 5px;
    width: 100%;
    border-radius: 3px;
    transition: 0.25s ease-in-out;
}

#nav-icon3 span:nth-child(1) {
    top: 0;
    background: var(--white-color);
    opacity: 0.9;
}

#nav-icon3 span:nth-child(2),
#nav-icon3 span:nth-child(3) {
    top: 16px;
    background: var(--white-color);
    opacity: 0.7;
}

#nav-icon3 span:nth-child(4) {
    top: 32px;
    background: var(--white-color);
    opacity: 0.9;
}

#nav-icon3.open span:nth-child(1),
#nav-icon3.open span:nth-child(4) {
    top: 18px;
    width: 0;
    left: 50%;
}

#nav-icon3.open span:nth-child(2) {
    transform: rotate(45deg);
    opacity: 0.9;
}

#nav-icon3.open span:nth-child(3) {
    transform: rotate(-45deg);
    opacity: 0.9;
}

/* Language Flags */
.navbar-language-flag {
    width: 35px;
    margin-left: 2rem;
}
