/**
 * Desktop Mega Menu Styles - Professional Green Theme
 * Place this file in: /themes/Divi-child/mega-menu.css (same folder as style.css)
 * Desktop-only mega menu with hover dropdowns
 */

.mega-menu-container {
    width: 100%;
    position: relative;
}

/* Main menu items horizontal */
.et-l--header ul.mega-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    /* background: #fff; */
    /* box-shadow: 0 2px 5px rgba(0,0,0,0.1); */
}

.mega-menu-item {
    position: relative;
    list-style: none;
}

.mega-menu-item.has-children::after {
    content: "▼";
    font-size: 0.75rem;
    margin-left: 0.5rem;
    opacity: 0.6;
    transition: transform 0.3s ease;
}

.mega-menu-item:hover.has-children::after {
    transform: rotate(180deg);
}

.mega-menu-link {
    text-decoration: none;
    /* color: #263843; */
    font-weight: 500;
    padding: 20px 30px 20px 10px;
    display: block;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-weight: 700;
    font-size: 16px;
    color: #263843;
    -webkit-transition: all .4s ease-in-out;
    transition: all .4s ease-in-out;
    height: 100%;
    display: flex;
    align-items: center;
}

.mega-menu-link:hover {
    background: unset;
    color: rgba(0,0,0,.6);
}

.mega-menu-description {
    font-size: 0.875rem;
    color: #666;
    display: block;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Mega dropdown container - hidden by default */
/*.mega-menu-submenu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    background: #0b6a30; 
    border-top: 4px solid #e01021;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    padding: 3rem;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    list-style: none;
    margin: 0;
    display: none; 
}*/

/* Show dropdown on hover - only level 1 */
.mega-menu-item:hover > .mega-menu-submenu {
    opacity: 1;
    visibility: visible;
    display: block;
}

/* Level 1 submenu (direct children of main items) */
.et-l--header ul.mega-menu-level-1 {
    display: none; /* Hidden by default */
    gap: 3rem;
    background: #0b6a30; /* Green background */
    border-top: 4px solid #e01021; /* Red top border */
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    padding: 3rem;
    z-index: 9999;
    /* list-style: disc; */ /* Add bullets */
    padding-left: 4rem; /* Space for bullets */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    position: fixed;
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    min-height: 35vh;
}

/* Position dropdown right below the menu bar */
.mega-menu-item:hover > .mega-menu-level-1 {
    /*top: 100%;*/
}

/* Show level 1 on hover as grid */
.mega-menu-item:hover > .mega-menu-level-1 {
    display: flex;
}

/* Position the dropdown dynamically based on menu container position */
.mega-menu-container {
    width: 100%;
    position: relative;
    display: flex;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 0 30px;
}
.mega-menu-container .et_pb_menu__logo-wrap{
    -webkit-box-flex: 0;
    -ms-flex: 0 1 auto;
    flex: 0 1 auto;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}
.mega-menu-container .et_pb_menu__logo {
    margin-right:30px;
}
.mega-menu-container:hover .mega-menu-level-1 {
    /*top: calc(100% + var(--menu-offset, 0px));*/
}

/* Level 2 items (columns in mega menu) */
.mega-menu-level-1 > .mega-menu-subitem {
    margin-bottom: 0;
    list-style: none; /* Bullets for level 1 items */
    /* padding-right: 20px; */
    position: relative;
    /* min-width: 300px; */
    /* width: -webkit-fill-available; */
}

.mega-menu-level-1 > .mega-menu-subitem > .mega-menu-sublink {
    font-weight: 600;
    font-size: 1.1rem;
    color: #fff; /* White text on green background */
    padding: 0 0 1rem 0;
    border-bottom: 2px solid rgba(255,255,255,0.2);
    margin-bottom: 1.5rem;
    display: block;
    text-decoration: none;
}

.mega-menu-level-1 > .mega-menu-subitem > .mega-menu-sublink:hover {
    color: #f0f8ff;
    text-decoration: none;
}

/* Level 3+ items (vertical under each column) */
.mega-menu-level-2,
.mega-menu-level-3,
.mega-menu-level-4 {
    position: static;
    display: block; /* Always visible within the mega menu */
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0;
    margin: 5px 0 0 0;
    min-width: 250px;
    list-style: none; /* Add bullets */
}

.mega-menu-level-2 .mega-menu-subitem,
.mega-menu-level-3 .mega-menu-subitem,
.mega-menu-level-4 .mega-menu-subitem {
    margin-bottom: 10px;
    list-style: none; /* Bullets for all items */
    position: relative;
}
.mega-menu-level-2 .mega-menu-subitem {
    /* padding-left: 25px; */
}

.et-l--header ul.mega-menu-level-3 {
    padding-left: 10px;
    padding-bottom: 1px;
}

.mega-menu-level-3 .mega-menu-subitem {
    list-style: none;
    
}

.mega-menu-level-2 .mega-menu-subitem a:hover:before, 
.mega-menu-level-3 .mega-menu-subitem a:hover:before, 
.mega-menu-level-4 .mega-menu-subitem a:hover:before {
    content: '➤'; /* of '➤', '➔', '›' voor andere stijlen */
    position: absolute;
    left: -25px;
    color: white;
    float: left;
    width: 10px;
    margin-right: 16px;
    top: 3px;
}

.mega-menu-level-3 .mega-menu-sublink:before {
    
}

.mega-menu-level-2 .mega-menu-sublink,
.mega-menu-level-3 .mega-menu-sublink,
.mega-menu-level-4 .mega-menu-sublink {
    font-size: 0.95rem;
    color: #fff; /* White text on green background */
    padding: 0.25rem 0;
    display: block;
    /* transition: all 0.2s ease; */
    text-decoration: none;
}

.mega-menu-level-2 .mega-menu-sublink:hover,
.mega-menu-level-3 .mega-menu-sublink:hover,
.mega-menu-level-4 .mega-menu-sublink:hover {
    color: #f0f8ff;
    text-decoration: none;
    /* padding-left: 0.5rem; */
    
}

/* Progressive indentation for deeper levels */
.mega-menu-level-3 {
    margin-left: 0px;
}

.mega-menu-level-3 .mega-menu-sublink {
    font-size: 0.8rem;
    color: #ffffff;
    margin-bottom: -10px;
}

.mega-menu-level-4 {
    margin-left: 3rem;
}

.mega-menu-level-4 .mega-menu-sublink {
    font-size: 0.85rem;
}

/* Submenu item indicators - remove since we have bullets now */
/*
.mega-menu-level-2 .mega-menu-subitem.has-children > .mega-menu-sublink::before,
.mega-menu-level-3 .mega-menu-subitem.has-children > .mega-menu-sublink::before {
    display: none;
}
*/
.mega-menu-subdescription {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.8);
    display: block;
    margin-top: 0.25rem;
    font-style: italic;
    line-height: 1.3;
}

/* Ensure dropdown stays full width */
.mega-menu-item:last-child .mega-menu-submenu,
.mega-menu-item:last-child .mega-menu-level-1 {
    left: 0;
    right: 0;
    width: 100%;
}

/* Smooth animations */
.mega-menu-item {
    transition: all 0.3s ease;
}

.mega-menu-item:hover {
    background: unset;
}

/* Add pipe separators between main menu items */
.mega-menu-item:not(:last-child)::after {
    content: "|";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #ccc;
    font-weight: normal;
    padding: 0 0.5rem;
    pointer-events: none;
}

.mega-menu-item:not(:last-child).has-children::after {
    content: "|";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #ccc;
    font-weight: normal;
    padding: 0 0.5rem;
    pointer-events: none;
    margin-left: 0;
    opacity: 1;
    font-size: 1rem;
}

.mega-menu-search-item {
  text-align: center;
  margin: 20px 0;
  min-width: 270px;
  padding-left: 10px;
}
.mega-menu-search-item form {
    display: flex;
}

.mega-menu-search-item input[type="search"] {
  padding: 10px;
  width: 80%;
  max-width: 400px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.mega-menu-search-item button {
    border: 0px;
    background-color: transparent;
    cursor: pointer;
}
.mega-menu-search-item button:hover {
    cursor: pointer;
}

.mega-menu-search-item button:after {
    font-family: ETmodules;
    content: "U";
    padding: 10px;
    color: #0b6a30;
    border-radius: 4px;
    /* margin-left: 5px; */
    cursor: pointer;
    border: 0px;
}

.read-more-link {
  display: block;
  margin-top: 0.5em;
  /* font-weight: bold; */
  color: #ccc;
  text-decoration: none;
  bottom: 0px;
  position: absolute;
  width: 100%;
  font-size: 100%;
  word-wrap: normal;
}
.read-more-link:hover {
  text-decoration: underline;
}
