﻿/* main menu
----------------------------*/
#ddmenu {
    display: block;
    font-family: "Poppins", sans-serif; /* Updated font family */
    text-align: center; /* Specify the alignment of the whole UL if UL is not width:100%; */
    letter-spacing: normal;
    background: #ffffff;
    border-top: 2px solid #4F8324;
}

    #ddmenu ul {
        margin: 0 auto;
        padding: 0;
        text-align: center; /* Alignment of each top-level menu item within the UL */
        width: 100%;
        font-size: 0;
        display: inline-block;
        list-style: none;
        position: relative;
        
        max-width: 1400px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 4px;
    }

    #ddmenu li {
        margin: 0;
        padding: 0;
        font-size: 16px; /* Set font size for all categories */
        display: inline-block;
        position: relative;
        color: #3e454c;
        line-height: 36px; /* This determines the height of the menu */
        vertical-align: middle;
        transition: background-color 0.2s;
        outline: none;
        -moz-user-select: none;
        -webkit-user-select: none;
        -ms-user-select: none;
        text-decoration: none;
		border-bottom: 4px solid transparent;
    }

    #ddmenu .inner-heading {
        line-height: 1.1;
        margin-bottom: 10px;
        font-size: 16px; /* Updated font size */
        color: #bf1f2e;
        padding-bottom: 0;
    }

    #ddmenu #ddmenu_ul .inner-heading a {
        line-height: 1.1;
        margin-bottom: 6px;
        font-size: 16px; /* Updated font size */
        color: #4F8324;
        padding-bottom: 0;
        font-weight: 600;
    }

    #ddmenu .full-width {
        position: static;
    }

    #ddmenu .over {
        border-bottom: 4px solid #4F8324;
    }

    #ddmenu .top-heading {
        margin: 0 16px;
        color: inherit;
        text-decoration: none;
        display: inline-block;
        outline: 0;
        cursor: pointer;
    }

    /* Links of top-heading */
    #ddmenu a, #ddmenu a:link, #ddmenu a:hover {
        color: inherit;
    }

        #ddmenu a:hover {
            text-decoration: none;
        }

        #ddmenu a:focus {
            outline: 1px dotted #09F;
        }

    /* Caret (arrow icon) */
    #ddmenu .caret {
        color: inherit;
        left: -12px;
        width: 0;
        height: 0;
        overflow: hidden; /* for IE6 */
        vertical-align: middle;
        margin-bottom: 2px;
        border-top: 4px solid; /* caret size is 4px now */
        border-right: 4px solid transparent;
        border-left: 4px solid transparent;
        display: inline-block;
        position: relative;
    }

    /* Sub-menu layout
----------------------------*/

    #ddmenu .dropdown {
        width: auto;
        left: 0px;
        color: #000;
        padding: 0;
        margin: 0;
        display: none;
        position: absolute;
        overflow: hidden;
        top: 100%;
        border: 1px solid rgba(255, 255, 255, 0.35);
        border-top: none;
        border-radius: 2px;
        background-color: rgba(0, 0, 0, 0.2);
        background-color: #fff; /* fallback for old IE */
    }

    #ddmenu .full-width .dropdown {
        width: calc(100vw - 100px); /* Full width minus 2px for 1px padding on each side */
        left: 50%;
        transform: translateX(-50%);
        padding-left: 16px; /* 1px padding on the left */
        padding-right: 16px; /* 1px padding on the right */
        max-height: calc(100vh - 200px); /* Limits height to leave some space at the bottom */
        overflow-y: auto; 
        overflow-x: auto;
        border-radius: 4px;
        box-shadow: 3px 3px 6px #8888888c;
    }

    #ddmenu .offset300 {
        left: -300px;
        right: auto;
    }

    #ddmenu .right-aligned {
        left: auto;
        right: 0px;
    }

    #ddmenu .over .dropdown {
        display: block;
    }

    #ddmenu .dd-inner {
        text-align: left;
        padding-top: 16px;
        margin: 0px;
        background-color: #FFF;
        white-space: nowrap;
        font-size: 16px;
        text-decoration: none;
    }

    #ddmenu ul ul {
        margin: 0;
        padding: 0;
        text-align: left;
        width: auto;
        background: none;
        border: none;
        display: block;
        position: static;
        z-index: 0;
        border-radius: 0;
    }

        #ddmenu ul ul li {
            font-size: 16px; /* Updated font size */
            padding: 6px 0; /* It determines the line height */
            color: inherit;
            line-height: 1;
            margin: 0;
            display: block;
            position: static;
            background: none;
            border: none;
            transition: none;
            border-radius: 0;
            text-decoration: none;
        }

    /* Links in sub-menu
----------------------------*/

    #ddmenu .dropdown a {
        color: #000;
        line-height: 1;
        text-decoration: none;
        transition: color 0.4s;
    }

        #ddmenu .dropdown a:hover, #ddmenu .dropdown a:focus {
            text-decoration: none;
            color: #3e454c;
        }

    /* Blocks within the sub-menu
-----------------------------*/
    #ddmenu .column {
        text-align: left;
        vertical-align: top; /* or middle */
        display: inline-block;
        white-space: normal;
        width: auto;
        min-width: 200px;
        padding-left: 0px;
        padding-right: 32px;
        padding-bottom: 16px;
        /* Removed the border-right property */
    }

    #ddmenu .dd-inner ul:last-child {
        border-right: none;
    }

    #ddmenu h3 {
        font-weight: 500;
        line-height: 1.1;
        margin-top: 12px;
        margin-bottom: 8px;
        font-size: 24px;
        font-family: "Poppins", sans-serif; /* Updated font family */
    }

    #ddmenu div.column h3 {
        text-transform: uppercase;
    }

/* Useful when http://www.menucool.com/ddmenu/one-menu-for-all-pages */
#ddmenuLink {
    display: none;
}

/* ######## Add additional styles for mobile-friendly responsive menu ######## */

#ddmenu .menu-icon {
    display: none; /* Hide menu icon initially */
}








/* Styles for mobile */
@media only screen and (max-width: 576px) {
    #ddmenu .column.mayHide {
        display: none;
    }

    /* Override the original settings */
    #ddmenu ul {
        width: 100%;
        display: none;
        border-radius: 0;
    }

    #ddmenu li {
        position: relative;
        display: block;
        font-size: 20px;
        text-align: left;
        border-bottom: 1px solid rgba(0, 0, 0, 0.2);
        border-radius: 0;
        text-decoration: none;
    }

    #ddmenu .full-width {
        position: relative;
    }

    #ddmenu .dropdown {
        position: relative;
        top: auto;
        border: none;
        border-radius: 0;
        box-shadow: none;
        background-color: #FFF;
    }

    #ddmenu .offset300 {
        left: 0;
    }

    #ddmenu .full-width .dropdown {
        width: auto;
    }

    #ddmenu .dd-inner {
        margin: 0;
        background: none;
        text-align: left;
    }

    /* Turn each column to list vertically instead of horizontally */
    #ddmenu .column {
        width: auto;
        padding: 0;
        padding-bottom: 24px;
        border: none;
        display: block;
    }

    /* Move the arrow icon to the right */
    #ddmenu .caret {
        position: absolute;
        left: auto;
        right: 14px;
        top: 20px;
        border-width: 5px;
    }

    /* All the following are for the .menu-icon (pure CSS) */
    #ddmenu .menu-icon {
        font-size: 32px; /* Icon size */
        display: block;
        position: relative;
        width: 40px;
        height: 36px;
        text-align: center;
        cursor: pointer;
        background-color: #eee;
        border-radius: 3px;
        margin-bottom: 6px;
        margin-left: auto;
        margin-right: 11px;
    }

        #ddmenu .menu-icon::before {
            content: "";
            position: absolute;
            top: 0.25em;
            left: 4px;
            width: 1em;
            height: 0.125em;
            border-top: 0.375em double #333;
            border-bottom: 0.125em solid #333;
            box-sizing: content-box;
        }

    #ddmenu .menu-icon-active {
        background-color: #333;
    }

        #ddmenu .menu-icon-active::before {
            border-color: #eee;
        }

    /* Ensures the image does not exceed 248x248 pixels */
    #ddmenu .column.image-column #article-img {
        max-width: 248px;
        max-height: 248px;
        width: auto;
        height: auto;
        display: block;
        margin: 0 auto; /* Centers the image horizontally */
    }

    /* Styles the helpful articles text below the image */
    #ddmenu .column.image-column #helpful-articles {
        margin-top: 10px !important;
        font-size: 16px;
        color: #333; /* Adjust color as needed */
        text-align: left;
    }

    #ddmenu .column.image-column #helpful-articles-title {
        font-weight: 600;
        font-size: 16px !important;
        margin-bottom: 8px;
        margin-top: 8px !important;
    }

    #ddmenu .column.image-column #helpful-articles ul {
        list-style: none;
        padding: 0;
    }

        #ddmenu .column.image-column #helpful-articles ul li {
            margin-bottom: 6px;
        }

            #ddmenu .column.image-column #helpful-articles ul li a {
                color: #4F8324; /* Adjust color as needed */
                text-decoration: none;
            }

                #ddmenu .column.image-column #helpful-articles ul li a:hover {
                    text-decoration: underline;
                }
}
