.navbar {
    width: 100%;
    position: relative;
    top: 0;
    left: 0;
    background-color: #c3c3c3;
    z-index: 1000;
    height: clamp(150px, 10vh, 150px);
    padding: 0%;
}

.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo img {
    max-width: clamp(280px, 30vw, 300px);
    height: auto;
}

.menu {
    display: flex;
}

.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-links li {
    position: relative;
}

.nav-links li a {
    height: 100%;
    display: flex;
    align-items: center;
    padding: clamp(10px, 2vw, 20px);
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    text-decoration: none;
    color: #01396f;
    font-weight: bold;
}

.products_navbar {
    color: #01396f;
}

.products_navbar:hover {
    color: #ffffff !important;
    height: clamp(150px, 10vh, 150px);
}


/* Hover effect (ONLY for desktop screens) */
@media screen and (min-width: 769px) {
    .nav-links>li:hover {
        background-color: #01396f;
        color: #fff;
        height: clamp(150px, 10vh, 150px);
    }

    .nav-links>li:hover>a {
        color: #fff;
    }

    /* Desktop Dropdown */
    .dropdown-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        background: #01396f;
        border: 1px solid #c3c3c3;
        width: 300px;
        list-style: none;
        padding: 0;
        z-index: 1000;
    }

    .dropdown-menu li {
        padding: 10px;
        border-bottom: 1px solid #c3c3c3;
    }

    .dropdown-menu li a {
        color: white;
        font-size: 1.2rem;
        display: block;
        padding: 10px;
        transition: background 0.3s ease;
    }

    /* Invert colors on hover (ONLY desktop) */
    .dropdown-menu li:hover {
        background: white;
    }

    .dropdown-menu li:hover a {
        color: #01396f;
    }

    /* Show dropdown on hover (ONLY for desktop) */
    .dropdown:hover .dropdown-menu {
        display: block;
    }
}

/* Responsive Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle span {
    background: #01396f;
    height: clamp(3px, 1vw, 4px);
    width: clamp(20px, 4vw, 30px);
    margin: clamp(3px, 1vw, 5px) 0;
    display: block;
    transition: 0.3s;
}

/* ✅ Mobile View */
@media screen and (max-width: 768px) {

    /* ---------- Mobile Menu ---------- */
    .menu {
        /* layout */
        display: flex;
        /* keep flex so transform can animate */
        flex-direction: column;
        justify-content: center;
        /* centre links vertically */
        align-items: center;
        /* centre links horizontally */
        gap: 20px;

        /* dimensions / position */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: #01396f;
        text-align: center;
        color: white;
        z-index: 1000;

        /* animation start state */
        transform: translateY(-20px);
        opacity: 0;
        pointer-events: none;

        /* animation timing */
        transition: transform 0.35s ease, opacity 0.35s ease;
    }

    /* ▶ When the toggler adds .show_list */
    .menu.show_list {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
        /* clickable now */
    }

    /* ---------- Links ---------- */
    .nav-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a,
    .nav-links li a {
        color: #ffffff;
        text-decoration: none;
        font-size: 1.8rem;
        display: block;
        padding: 10px 0;
    }

    /* ---------- Dropdown (click‑to‑open) ---------- */
    .dropdown-menu {
        display: none;
        background: #01396f;
        width: 100%;
    }

    .dropdown-menu li a {
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        display: block;
        text-align: center;
    }

    .dropdown.open .dropdown-menu {
        display: block;
    }

    /* ---------- Hamburger ---------- */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        padding-right: 30px;
    }

    .menu-toggle span {
        background: #ffffff;
        height: 4px;
        width: 30px;
        margin: 5px 0;
        display: block;
        transition: 0.3s;
    }

    .menu-toggle.open span:nth-child(1) {
        transform: rotate(-45deg);
        top: 8px;
        position: relative;
    }

    .menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.open span:nth-child(3) {
        transform: rotate(45deg);
        top: -8px;
        position: relative;
    }

    /* ---------- Logo padding ---------- */
    .logo img {
        padding-left: 30px;
    }

    .products_navbar:hover {
        color: #ffffff !important;
        height: auto;
    }

}


/* Arrow Styling */
.arrow {
    margin-left: 5px;
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

/* Rotate arrow on desktop hover */
@media screen and (min-width: 769px) {
    .dropdown:hover .arrow {
        transform: rotate(180deg);
        /* Upside down arrow */
    }
}

/* Rotate arrow on mobile click */
@media screen and (max-width: 768px) {
    .dropdown.open .arrow {
        transform: rotate(180deg);
    }
}


/* Close Button Styling */
.close-btn {
    font-size: 2rem;
    color: #ffffff;
    background-color: red;
    cursor: pointer;
    display: none;
    position: absolute;
    top: 20vh;
    right: 30px;
    z-index: 1100;
}

@media screen and (max-width: 768px) {
    .close-btn {
        display: block;
    }
}