/* ==========================================================================
   Divi Mega Menu – Frontend Styles
   ========================================================================== */

/* ── Variables ─────────────────────────────────────────────────────────── */
:root {
    --dmm-bg:           #f8fdff;
    --dmm-bg-highlight: #CEEBF5;
    --dmm-font-size:     12px;
    --dmm-font-weight:   200;    
    --dmm-shadow:       0 4px 12px rgba(0,0,0,.25);
    --dmm-border:       none;
    --dmm-radius:       15px 15px 15px 15px;
    --dmm-speed:        .25s;
    --dmm-overlay-bg:   rgba(0,0,0,.35);
    --dmm-gap:          24px;
    --dmm-z:            9999;       /* overridden by inline style from settings */
    --dmm-color:        #08094E;    
}

/* ── Overlay ───────────────────────────────────────────────────────────── */
.dmm-overlay {
    position: fixed;
    inset: 0;
    background: var(--dmm-overlay-bg);
    z-index: calc(var(--dmm-z) - 1);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dmm-speed) ease;
}
.dmm-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}


/* ── Nav item wrapper ──────────────────────────────────────────────────── */
.dmm-has-megamenu {
    position: static !important; /* panel is positioned relative to the menu bar */
}

.dmm-has-megamenu .sub-menu {
    display: none !important;
}

.dmm-has-megamenu > a::after,
#main-header #top-menu li.menu-item-has-children > a::after {
    content: '';
    font-family: inherit;
    display: inline-block;
    position: relative;
    margin: 0 0 0 6px;
    width: 8px;
    height: 8px;
    background-image: url("data:image/svg+xml,%3Csvg width='8' height='8' viewBox='0 0 8 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.13978 4.242H4.31178V7.14H2.82778V4.242H-0.000222579V2.898H2.82778V-2.38419e-07H4.31178V2.898H7.13978V4.242Z' fill='%2308094E'/%3E%3C/svg%3E%0A");
    font-size: inherit;
    font-weight: inherit;
    transition: all var(--dmm-speed) ease;
}

.dmm-has-megamenu.is-open > a::after,
#main-header #top-menu li.menu-item-has-children.is-open > a::after  {
    transform: rotate(45deg);
}

/* ── Panel ─────────────────────────────────────────────────────────────── */
.dmm-panel {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--dmm-width, 100%);
    background: var(--dmm-bg);
    border: var(--dmm-border);
    border-top: none;
    box-shadow: var(--dmm-shadow);
    border-radius: var(--dmm-radius);
    z-index: var(--dmm-z);
    display: none;          /* JS controls visibility */
    overflow: hidden;
    font-size: var(--dmm-font-size);
    font-weight: var(--dmm-font-weight);
    font-family: 'Poppins', sans-serif;
}

/* Opened state */
.dmm-has-megamenu.is-open > .dmm-panel {
    display: block;
}

/* ── Animation: fade ───────────────────────────────────────────────────── */
.dmm-anim-fade .dmm-panel {
    display: block !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dmm-speed) ease,
                transform var(--dmm-speed) ease;
    /*transform: translateX(-50%) translateY(-6px);*/
}
.dmm-anim-fade .dmm-has-megamenu.is-open > .dmm-panel {
    opacity: 1;
    pointer-events: auto;
   /*transform: translateX(-50%) translateY(0);*/
}

/* ── Animation: slide ──────────────────────────────────────────────────── */
.dmm-anim-slide .dmm-panel {
    display: block !important;
    max-height: 0;
    overflow: hidden;
    pointer-events: none;
    transition: max-height var(--dmm-speed) ease,
                opacity var(--dmm-speed) ease;
    opacity: 0;
    transform: translateX(-50%);
}
.dmm-anim-slide .dmm-has-megamenu.is-open > .dmm-panel {
    max-height: 1000px;
    opacity: 1;
    pointer-events: auto;
}

/* ── Inner grid ────────────────────────────────────────────────────────── */
.dmm-panel__inner {
    /*padding: 32px var(--dmm-gap);*/
}

/* Divi wraps content in sections/rows – let it flow naturally */
.dmm-panel__content {
    width: 100%;
}

/* For panels with explicit column count when NOT using Divi */
/*.dmm-cols-1 .dmm-panel__content { columns: 1; }
.dmm-cols-2 .dmm-panel__content { columns: 2; }
.dmm-cols-3 .dmm-panel__content { columns: 3; }
.dmm-cols-4 .dmm-panel__content { columns: 4; }
.dmm-cols-5 .dmm-panel__content { columns: 5; }*/

.dmm-panel__content .et_pb_section {}

.dmm-panel__content .et_pb_section .et_pb_row { 
    width: auto;  
    display: flex;
    align-items: stretch;
}

.dmm-panel__content .et_pb_section .et_pb_column { 
    display: flex;
    flex-direction: column;
    padding: 32px var(--dmm-gap);
    margin-right: 0%;
    width: 100%;
    border-right: 1px color #ECECEC;
}

.dmm-panel__content .et_pb_section .et_pb_column:last-child { 
    border: none !important;
}

.dmm-panel__content .et_pb_section .et_pb_column.et_pb_column_empty {
    display: none;
}

.dmm-panel__content .et_pb_section .et_pb_row.et_pb_row_5col .et_pb_column:nth-child(1) {
    width: 68%;
    font-weight: 400;
}

.dmm-panel__content .et_pb_section .et_pb_row.et_pb_row_5col .et_pb_column:nth-child(5) {
     width: 100%;  
}


.dmm-panel__content .et_pb_section .et_pb_row.et_pb_row_4col .et_pb_column:nth-child(1) {
    width: 68%;
    font-weight: 400;
}

.dmm-panel__content .et_pb_section .et_pb_row.et_pb_row_4col .et_pb_column:nth-child(4) {
     width: 100%;
}

.dmm-panel__content .et_pb_section .et_pb_column > .et_pb_module .et_pb_module_inner { 
    height: 100%;
}

.dmm-panel__content .et_pb_section .et_pb_column > .et_pb_module .dmm-wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.dmm-panel__content .et_pb_section .et_pb_column .et_pb_module:last-child { 
    flex: 0 0 auto;
}

.dmm-panel__content .et_pb_section .et_pb_column.et_pb_column--with-menu:has(.dmm-has-divider) { 
    border-right: 1px solid #ECECEC;
}

.dmm-panel__content .et_pb_section .et_pb_column.et_pb_column--with-menu:has(.dmm-layout--highlight) { 
    background-color: var(--dmm-bg-highlight); 
}

.dmm-panel__content .et_pb_section .et_pb_column.et_pb_column--with-menu:has(.dmm-layout--info) .et_pb_menu_module {  
    flex: 1;
    margin-bottom: 10px;
}

.dmm-panel__content .et_pb_section .et_pb_column.et_pb_column--with-menu .et_pb_module .dmm-headline-container,
.dmm-panel__content .et_pb_section .et_pb_column.et_pb_column--with-menu .et_pb_module .dmm-headline-divider {
    min-height: 60px;
}

.dmm-panel__content .et_pb_section .et_pb_column.et_pb_column--with-menu .et_pb_module .dmm-headline-container p:empty {
    display: none;
}

.dmm-panel__content .et_pb_section .et_pb_column.et_pb_column--with-menu .et_pb_module .dmm-headline-container p {
    font-size: var(--dmm-font-size);
    line-height: 1.4;
    margin: 0;
    color: var(--dmm-color) !important;
}

.dmm-panel__content .et_pb_section .et_pb_column.et_pb_column--with-menu .et_pb_module .dmm-headline-container p  a {
    text-decoration: underline !important;
    color: var(--dmm-color) !important;
}

.dmm-panel__content .et_pb_section .et_pb_column.et_pb_column--with-menu .et_pb_module .dmm-headline-menu,
.dmm-panel__content .et_pb_section .et_pb_column.et_pb_column--with-menu .et_pb_module .dmm-headline-menu-divider {
    min-height: 40px;
}

.dmm-panel__content .et_pb_section .et_pb_column.et_pb_column--with-menu:has(.dmm-layout--info) .dmm-headline-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: unset;
    height: 100%;   
} 

.dmm-panel__content .et_pb_section .et_pb_column.et_pb_column--with-menu:has(.dmm-layout--info) .dmm-headline-menu-divider {
    min-height: unset;
}

.dmm-panel__content .et_pb_section .et_pb_column.et_pb_column--with-menu:has(.dmm-layout--info) .et_pb_button {
    text-align: left;
    color: var(--dmm-color) !important;
    font-weight: 500;
    text-transform: uppercase;
    width: 85%;
    padding: 14px 14px !important;
}

.dmm-panel__content .et_pb_section .et_pb_column.et_pb_column--with-menu:has(.dmm-layout--highlight) .dmm-headline-menu-divider {
    display: none;
}


/* ── Close button ──────────────────────────────────────────────────────── */
.dmm-panel__close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #555;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background .15s;
    display: none;
}
.dmm-panel__close:hover {
    background: rgba(0,0,0,.07);
}

/* Show close button on touch/mobile */
@media (hover: none) {
    .dmm-panel__close { display: block; }
}

/* ── Divi overrides ────────────────────────────────────────────────────── */

/* Remove Divi section padding inside the panel */
.dmm-panel .et_pb_section {
    padding: 0 !important;
}
.dmm-panel .et_pb_row {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ── Accessibility ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .dmm-panel,
    .dmm-anim-fade .dmm-panel,
    .dmm-anim-slide .dmm-panel {
        transition: none !important;
    }
}

/* ── Responsive +  Fullscreen Overlay ────────────────────────────────────────────────────────── */

.fullscreen-navigation-container .dmm-panel {
    position: relative;
}

.fullscreen-navigation-container .dmm-has-megamenu .dmm-panel {
    height: 0;
    background: inherit;
    border: none;
    box-shadow: none;
}

.fullscreen-navigation-container .dmm-has-megamenu.is-open .dmm-panel {
    height: auto;
}

.fullscreen-navigation-container .dmm-panel .et_pb_column  {
   border: none;
}

.fullscreen-navigation-container .et_pb_section .et_pb_row {
    flex-direction: column;
}

@media (max-width: 980px) {
    .dmm-panel {
        position: static !important;
        transform: none !important;
        width: 100% !important;
        border-radius: 0;
        box-shadow: none;
        border-left: none;
        border-right: none;
    }

    .dmm-panel__inner {
        padding: 20px 16px;
    }

    /* Stack Divi columns */
    .dmm-panel .et_pb_column {
        width: 100% !important;
        margin: 0 0 16px !important;
    }

    .dmm-panel__close { display: block; }
}

@media (max-width: 1300px) {

   .dmm-panel .et_pb_column--with-menu:has(.dmm-layout--highlight) {
        display: none; 
    }

}


