﻿/* --- Logo Section --- */
.logos {
    position: relative;
    z-index: 123;
    padding: 10px;
    font: 18px Verdana, sans-serif;
    color: #6DDB07;
    float: left;
    width: 15%;
    font-weight: bold;
    letter-spacing: 1px;
}

    .logos a {
        color: #6DDB07;
        text-decoration: none;
    }

/* --- Navigation Wrapper --- */
nav {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

#cssmenu,
#cssmenu ul,
#cssmenu ul li,
#cssmenu ul li a,
#cssmenu #head-mobile {
    border: 0;
    list-style: none;
    display: block;
    position: relative;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

    /* Clearfix */
    #cssmenu:after, #cssmenu > ul:after {
        content: "";
        display: block;
        clear: both;
    }

/* --- Top Level --- */
#cssmenu {
    background: rgba(0, 0, 0, 0);
   
}

    #cssmenu > ul > li {
        float: left;
        position: relative;
    }

        #cssmenu > ul > li > a {
            font-size: 13px;
            text-decoration: none;
            color: #fff;
            font-weight: 600;
            padding: 10px 13px;
            transition: all 0.3s ease;
        }

        /* Hover + Active */
        #cssmenu > ul > li:hover > a,
        #cssmenu ul li.active > a {
            background: #66BB6A;
            color: #fff;
            border-radius: 6px 6px 0 0;
        }

    /* --- Dropdowns --- */
    #cssmenu ul ul {
        position: absolute;
        padding: 0;
        left: -9999px;
        background: #fff;
        min-width: 220px;
        width: auto;
        white-space: nowrap;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        overflow: hidden;
        z-index: 9999;

    }

    #cssmenu li:hover > ul {
        left: 0;
    }

    #cssmenu ul ul li {
        border-bottom: 1px solid #eee;
    }

        #cssmenu ul ul li:last-child {
            border-bottom: none;
        }

        #cssmenu ul ul li a {
            padding: 12px 18px;
            font-size: 13px;
            text-decoration: none;
            color: #444;
            background: #fff;
            transition: all 0.25s ease;
            display: flex;
            align-items: center;
            gap: 8px;
        }

            #cssmenu ul ul li a:hover {
                background: #F1F8E9;
                color: #2E7D32;
                font-weight: 600;
            }

    /* --- Nested Dropdowns --- */
    #cssmenu ul ul ul {
        margin-left: 100%;
        top: 0;
        border-radius: 8px;
    }

/* --- Mobile --- */
@media screen and (max-width: 1000px) {
    .logos {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 50px;
        text-align: center;
        padding: 10px 0;
        float: none;
    }

    nav {
        width: 100%;
    }

    #cssmenu {
        width: 100%;
    }

        #cssmenu ul {
            width: 100%;
            display: none;
            flex-direction: column;
            /* --- ADD THESE LINES --- */
            /* Set a max-height relative to the viewport height */
            max-height: calc(100vh - 50px); /* 50px is the height of your logo bar */
            /* Enable vertical scrolling only when needed */
            overflow-y: auto;
            /* Improves scrolling performance on touch devices */
            -webkit-overflow-scrolling: touch;
        }


            #cssmenu ul li {
                width: 100%;
                border-top: 1px solid rgba(255,255,255,0.1);
            }

                #cssmenu ul li a {
                    width: 100%;
                    padding: 14px;
                    color: #fff;
                }

                #cssmenu ul li:hover {
                    background: #388E3C;
                }

            #cssmenu ul ul {
                position: relative;
                left: 0;
                width: 100%;
                box-shadow: none;
            }

                #cssmenu ul ul li a {
                    padding-left: 28px;
                    /*background: #43A047;*/
                }

                    #cssmenu ul ul li a:hover {
                        background: #F1F8E9;
                        color: #2E7D32;
                        font-weight: 600;
                    }

    /* --- Mobile Button --- */
    .button {
        width: 50px;
        height: 50px;
        position: relative;  
        left: 15px;
        top: 0;
        cursor: pointer;
        z-index: 12399994;
    }

        .button:after, .button:before {
            content: '';
            position: absolute;
            left: 15px;
            right: 15px;
            height: 2px;
            background: #fff;
            transition: all 0.3s ease;
        }

        .button:before {
            top: 18px;
        }

        .button:after {
            top: 30px;
        }

        .button.menu-opened:before {
            transform: rotate(45deg);
            top: 24px;
        }

        .button.menu-opened:after {
            transform: rotate(-45deg);
            top: 24px;
        }
}
