#header {
    position: fixed;
    z-index: 100;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 1rem;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.2) 20%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0.6) 60%, rgba(0, 0, 0, 0.8) 100%);
    backdrop-filter: blur(0.2px);
    -webkit-backdrop-filter: blur(5.1px);
    transition: top 0.3s;
}

#header.hidden {
    top: -100px;
}

.content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.content .logo {
    max-width: 250px;
    transition: 0.3s ease-out;
    cursor: pointer;
    margin-left: 5rem;
    max-width: 200px;
}

.content .logo:hover {
    transform: scale(1.05)
}

.content .navigation {
    display: flex;
    gap: 20px;
    text-transform: uppercase;
    align-items: center;
    margin-right: 5rem;

}

/* ---------- Desktop Styles ---------- */
.dropdown {
    position: relative;
    display: inline-block;
}

.menu-btn {
    background: #222;
    color: white;
    padding: 10px 15px;
    border: none;
    cursor: pointer;
}

.dropdown-menu {
    max-height: 0;
    opacity: 0;
    position: absolute;
    top: 120%;
    left: -190px;
    background: #222;
    min-width: 300px;
    padding: 0;
    overflow: hidden;
    transform: translateY(-20px);
    transition: max-height 0.4s ease, opacity 0.4s ease, transform 0.4s ease;
}

.dropdown:hover .dropdown-menu {
    max-height: 500px;
    opacity: 1;
    padding: 10px 0;
    transform: translateY(0);
    overflow: visible;
}

.dropdown-menu.open {
    max-height: 500px;
    opacity: 1;
    padding: 10px 0;
    transform: translateY(0);
    overflow: visible;
}

.dropdown-menu a {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: #ffffff;
}

.dropdown-menu .all:hover {
    background: #73b806b7;
}

.dropdown-menu .submenu a:hover {
    background: #71b503;
}

/* Submenus (desktop hover, float right) */
.dropdown-submenu {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    color: #ffffff;
    padding: 0 5px;
}

.dropdown-menu .all {
    padding: 10px !important;
}

.dropdown-submenu a span {
    position: absolute;
    top: 10px;
    right: 5px;
}

.submenu {
    position: absolute;
    top: 0;
    left: 100%;
    background: #222;
    min-width: 200px;
    display: none;
    /* hover reveals it */
}

.dropdown-submenu:hover .submenu {
    display: block;
}

.dropdown-submenu:hover>.submenu {
    display: block;
}

.dropdown-submenu:hover {
    background: #73b806b7;
}

@media (max-width: 768px) {
    .dropdown-menu {
        position: static;
        /* sits under Products */
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, opacity 0.4s ease, padding 0.4s ease;
        padding: 0;
    }

    .dropdown-submenu {
        position: relative;
        flex-direction: column;
        align-items: start;
    }

    .submenu {
        position: static;
        /* inline flow, no floating */
        display: block;
        /* always in the DOM */
        max-height: 0;
        /* collapsed by default */
        opacity: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, opacity 0.4s ease, padding 0.4s ease;
        top: 0;
        left: -100%;
        justify-items: start;
        padding: 5px !important;
        width: 100%;

    }
    .submenu a{
        width:100%;
        text-align: center;
    }

    .submenu hr {
        width: 100%;
        height: 1px;
    }

    .dropdown-submenu.open>.submenu {
        max-height: 1000px;
        /* expands smoothly */
        opacity: 1;
        padding: 10px !important;
        margin-bottom: 5px !important;
    }



    .dropdown-submenu>a span {
        display: inline-block;
        transition: transform 0.3s ease;
    }

    .dropdown-submenu.open>a span {
        transform: rotate(90deg);
    }
}


.navigation .menu-btn {
    background: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 5px 10px;
    transition: all 0.2s ease-in-out;
    border: 0;
    position: relative;
    display: inline-block;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    font-size: 0.8rem;
}

.navigation .contact-btn,
.buttons-container .contact-btn {
    display: inline-block;
    padding: 7px 12px;
    border: 0;
    text-decoration: none;
    border-radius: 15px;
    background-color: #71b503;
    color: rgba(255, 255, 255);
    letter-spacing: 0.1rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 2.2);
    font-size: 0.8rem;

}


.navigation .contact-btn:hover,
.buttons-container .contact-btn:hover {
    background-color: #427536;
    transform: scale(1.1);
}

.navigation .menu-btn::after,
.navigation .menu-btn::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, #6d6d6d80, #ffffff7e);
    bottom: -5px;
    left: 0;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease-out;
}

.navigation .menu-btn::before {
    top: -5px;
    transform-origin: left;
}

.navigation .menu-btn:hover::after,
.navigation .menu-btn:hover::before {
    transform: scaleX(1);
}

/* Styles for the hamburger button */
.hamburger-btn {
    display: none;
    /* Hidden by default */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1000;
    /* Ensure it's above other elements */
    transition: transform 0s ease, opacity 0.3s ease;

}

.hamburger-btn .bar {
    height: 3px;
    width: 100%;
    background-color: #fff;
    /* Adjust color as needed */
    border-radius: 10px;
    transition: transform 0s ease, opacity 0.3s ease;
}

/* Styles for when the hamburger menu is open (optional - for animation) */
.hamburger-btn.open .bar:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-btn.open .bar:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.open .bar:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Media query to show the hamburger button and hide the navigation on smaller screens */
@media (max-width: 1000px) {

    .hamburger-btn {
        margin-right: 1rem;

    }

    .content .logo {
        max-width: 200px;
        transition: 0.3s ease-out;
        cursor: pointer;
        margin-left: 1rem;

    }

    .content .navigation {
        position: fixed;
        top: 0;
        right: 0;
        height: 120vh;
        width: max-content;
        /* Only as wide as the content */
        max-width: 80vw;
        background-color: rgba(0, 0, 0, 0.822);
        flex-direction: column;
        align-items: start;
        padding: 10% 5%;
        gap: 15px;
        z-index: 999;
        transform: translateX(500px);
        transition: transform 0.4s ease-in-out;
        display: flex !important;
        /* Always use flex, control visibility via transform */

    }

    .navigation.open {
        justify-content: start;
        align-items: start;
        margin: 0 !important;
        transform: translateX(0);
    }

    .navigation .menu-btn,
    .navigation .contact-btn {

        width: 100%;
        text-align: left;
        padding: 12px 10px;
        border: none;
        background-color: transparent;
        color: #fff;
        cursor: pointer;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);

    }

    .navigation .contact-btn {}

    .hamburger-btn {
        display: flex;
        /* Show the hamburger button */
    }

    .hamburger-btn:hover .bar {
        background-color: #cccccc;
    }
}