/* ===== Global overflow fix ===== */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

/* ===== Header ===== */
header.l-header {
    width: 100%;
    height: 70px !important;
    z-index: 99999;
    background-color: #fff;
    padding: 0 1rem;
    position: fixed;
    top: 0;
    left: 0;
    box-sizing: border-box;
}

#headA {
    width: 100%;
    height: 70px !important;
}

#head {
    width: 100%;
    padding: 0; 
    height: 70px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#head .logo {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

#head .logo img {
    height: 30px;
    cursor: pointer;
}

/* ===== Desktop Nav ===== */
#navi {
    font-family: 'Montserrat', sans-serif;
    margin-left: auto;
}

#navi ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end; /* Push to far right */
    padding: 0;
    margin: 0;
    list-style: none;
}

#navi li {
    position: relative;
    display: inline-block;
    text-align: center;
    margin: 0;
    font-size: 1.3rem;
}

#navi li a {
    display: block;
    padding: 22px 8px 10px;
    font-weight: bold;
    text-decoration: none;
    color: #2ba252;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
}

#navi li a:hover {
    color: #fff;
    background: #2ba252;
    border-radius: 5px;
}

/* Dropdown arrow on parent items with sub-menus */
#navi nav > ul > li:has(ul) > a::after {
    content: "▼";
    font-size: 0.7rem;
    color: #2ba252;
    display: block;
    margin: 2px auto 0;
    line-height: 1;
    text-align: center;
}
#navi nav > ul > li:has(ul) > a:hover::after {
    color: #fff;
}

/* ===== Sub-menu / Dropdown ===== */
#navi li ul {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 60px;
    left: 0;
    width: 280px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 2px 2px rgba(170, 170, 170, 0.1);
    transition: 0.3s;
    padding: 10px 0;
    z-index: 200;
}

#navi li:hover > ul {
    opacity: 1;
    visibility: visible;
}

#navi li ul li {
    list-style: none;
    width: 100%;
}

#navi li ul li a {
    display: flex;
    align-items: center;
    padding: 10px 10px 10px 20px;
    color: #555;
    font-size: 1.1rem;
    text-decoration: none;
    transition: 0.2s;
    font-weight: normal;
    white-space: normal;
}

#navi li ul li a:hover {
    background: #eee;
    color: #2ba252;
    border-radius: 5px;
}

#navi li ul li a img {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    flex-shrink: 0;
}

/* ===== Hamburger Menu (mobile) ===== */
#humberger {
    display: none;
}

.hamburger-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 16px;
    margin: 0 auto 4px;
}

.hamburger-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    text-align: center;
}

/* ===== Overlay ===== */
#overlay {
    display: none;
    z-index: -1;
    opacity: 0;
    background: #000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    position: fixed;
    transition: all 400ms cubic-bezier(1, 0, 0, 1);
}

/* ===== Body padding for fixed header ===== */
body {
    padding-top: 70px;
    box-sizing: border-box;
}

/* ===== Clearfix ===== */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* ===== Mobile styles ===== */
@media screen and (max-width: 768px) {
    header.l-header {
        height: 60px !important;
    }
    #headA { height: 60px !important; }
    #head { height: 60px !important; }

    #head .logo img {
        height: 22px;
    }

    /* Hide desktop nav on mobile */
    #navi {
        display: none;
    }

    /* Show hamburger on mobile */
    #humberger {
        background: #2ba252;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 6px;
        right: 6px;
        width: 48px;
        height: 48px;
        cursor: pointer;
        z-index: 99999;
        color: #fff;
        border-radius: 50%;
        transition: background 0.3s;
    }

    /* Drawer opened states */
    .drawer-opened #humberger {
        background: rgba(0,0,0,0.4);
    }

    .drawer-opened #overlay {
        display: initial;
        opacity: 0.5;
        left: -240px;
        position: fixed;
        z-index: 9999999;
        width: 100%;
        height: 100%;
    }

    body {
        padding-top: 60px;
        padding-bottom: 84px;
    }
}

/* ===== Hide on desktop/tablet ===== */
@media screen and (min-width: 769px) {
    .hidden-md {
        display: none !important;
    }
}
