/* ========================================================================
   BURGER MENU — Show hamburger toggle on all screen sizes (desktop + mobile)
   Porto hides .mobile-toggle above 991px by default.
   ======================================================================== */
#header .mobile-toggle {
    display: inline-block !important;
    font-size: 20px;
    padding: 8px 14px;
    color: #222529;
}
#header .mobile-toggle:hover {
    color: #73233c;
}

/* Hide any leftover horizontal main-menu on desktop (safety net) */
@media (min-width: 992px) {
    #header .main-menu-wrap,
    #header .mega-menu,
    #header .main-menu {
        display: none !important;
    }
}

/* ========================================================================
   SLIDE PANEL — White background, overlay (no push), close inside panel
   ======================================================================== */

/* --- Overlay, don't push --- */
html.panel-opened .page-wrapper,
html.panel-opened #header.sticky-header .header-main.sticky {
    left: 0 !important;
    right: 0 !important;
}

/* --- White panel background & dark text --- */
#side-nav-panel {
    background-color: #ffffff !important;
    color: #222529;
    padding-top: 48px !important;
    width: 360px !important;
    transform: translateX(-360px);
}
#side-nav-panel.panel-left {
    transform: translateX(-360px);
}
#side-nav-panel.panel-right {
    transform: translateX(360px);
}
html.panel-opened #side-nav-panel {
    transform: translateX(0) !important;
}
/* Ensure panel is fully hidden when not open (Porto offset may be narrower than panel width) */
html:not(.panel-opened) #side-nav-panel {
    visibility: hidden !important;
}
#side-nav-panel .accordion-menu li.menu-item > a,
#side-nav-panel .menu-custom-block a,
#side-nav-panel .accordion-menu li.menu-item > .arrow {
    color: #222529 !important;
    font-weight: 600 !important;
}
#side-nav-panel .accordion-menu li:not(:last-child),
#side-nav-panel .accordion-menu.porto-view-switcher > li {
    border-bottom-color: transparent !important;
}
#side-nav-panel .accordion-menu li.menu-item.active > a,
#side-nav-panel .menu-custom-block a:hover {
    background-color: #f5f5f5 !important;
}
#side-nav-panel .accordion-menu li.menu-item > a:hover {
    color: #73233c !important;
    background-color: #f9f9f9 !important;
}

/* --- Close button: visually inside the panel top-left --- */
.side-nav-panel-close {
    position: fixed !important;
    left: 12px !important;
    right: auto !important;
    top: 12px !important;
    z-index: 10001 !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
}
html.panel-opened .side-nav-panel-close {
    opacity: 1;
    pointer-events: auto;
}
/* Dark X icon for white panel */
.side-nav-panel-close svg line {
    stroke: #222529 !important;
}
.side-nav-panel-close:hover svg line {
    stroke: #73233c !important;
}

/* ========================================================================
   MULTI-COLUMN SUB-MENUS — desktop side-by-side columns
   ======================================================================== */

/* Base layout for .rbm-columns — block by default, overridden to flex on desktop */
#side-nav-panel .rbm-columns {
    display: block;
    overflow: hidden;
}
#side-nav-panel .rbm-columns > ul {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #ffffff;
}

/* Hide original nested sub-menus (we clone them into columns) */
#side-nav-panel .accordion-menu ul.sub-menu,
#side-nav-panel .rbm-col ul.sub-menu {
    display: none !important;
}

/* Arrow chevron instead of Porto +/- */
#side-nav-panel .accordion-menu .arrow:before,
#side-nav-panel .rbm-col .arrow:before {
    content: '\203A' !important;
    font-family: inherit !important;
    font-size: 22px !important;
    font-weight: 300;
}

/* Highlight active parent row */
#side-nav-panel li.rbm-highlight > a {
    background-color: #f5f5f5 !important;
    color: #73233c !important;
}

/* Column items styling (cloned sub-menus) */
#side-nav-panel .rbm-col {
    background: #ffffff;
}
#side-nav-panel .rbm-col li.menu-item {
    position: relative;
}
#side-nav-panel .rbm-col li.menu-item > a {
    display: block;
    padding: 14px 43px 14px 16px;
    color: #222529 !important;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 0;
}
#side-nav-panel .rbm-col li.menu-item > a:hover {
    color: #73233c !important;
    background-color: #f9f9f9 !important;
}
#side-nav-panel .rbm-col li.has-sub > .arrow {
    position: absolute;
    right: 5px;
    top: 0;
    width: 43px;
    height: 53px;
    line-height: 53px;
    text-align: center;
    cursor: pointer;
    z-index: 10;
    color: #222529 !important;
}

/* --- Mobile: full-width drill-down (one column visible at a time) --- */
@media (max-width: 991px) {
    #side-nav-panel {
        width: 100vw !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }
    #side-nav-panel .rbm-columns {
        width: 100%;
    }
    /* Only the active (last) column is shown; previous ones are hidden */
    #side-nav-panel .rbm-columns > ul.rbm-hidden {
        display: none !important;
    }
    #side-nav-panel .rbm-columns > ul {
        width: 100%;
    }
    /* Back button at top of each drilled column */
    #side-nav-panel .rbm-back {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 14px 16px;
        color: #73233c !important;
        font-weight: 600;
        font-size: 14px;
        text-decoration: none;
        border-bottom: 1px solid #eee;
        cursor: pointer;
        background: #fafafa;
    }
    #side-nav-panel .rbm-back:before {
        content: '\2039';
        font-size: 22px;
        line-height: 1;
        font-weight: 300;
        padding-bottom: 0.3rem;
    }
}

/* --- Desktop only: expanding multi-column layout --- */
@media (min-width: 992px) {
    #side-nav-panel {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        transition: width .25s ease;
    }
    #side-nav-panel .rbm-columns {
        display: flex !important;
        flex-direction: row;
        align-items: stretch;
        min-height: 100%;
        overflow: visible;
        position: relative;
    }
    #side-nav-panel .rbm-columns > ul {
        min-width: 360px;
        max-width: 360px;
        flex-shrink: 0;
        border-right: 0;
        overflow-y: visible;
        position: relative;
        box-sizing: border-box;
    }
    #side-nav-panel .rbm-columns > ul:after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        width: 1px;
        height: 100vh;
        background: #eee;
        pointer-events: none;
    }
    /* Hide back button on desktop */
    #side-nav-panel .rbm-back {
        display: none !important;
    }
    /* Constrain sections to one column width on desktop */
    #side-nav-panel .rbm-config-sections > .rbm-sections-top > .rbm-menu-section,
    #side-nav-panel .rbm-config-sections > .rbm-sections-top > .rbm-image-section,
    #side-nav-panel .rbm-config-sections > .rbm-sections-bottom > .rbm-menu-section,
    #side-nav-panel .rbm-config-sections > .rbm-sections-bottom > .rbm-image-section,
    #side-nav-panel .rbm-image-section {
        width: 360px;
        max-width: 360px;
    }
}

/* ========================================================================
   COMPOSABLE SECTIONS — image blocks & section spacing
   ======================================================================== */

/* Keep configured sections at one base column width on desktop */
#side-nav-panel .rbm-config-sections {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 48px);
}
#side-nav-panel .rbm-sections-top,
#side-nav-panel .rbm-sections-bottom {
    flex-shrink: 0;
}
#side-nav-panel .rbm-sections-bottom {
    padding-bottom: 3rem;
}
#side-nav-panel .rbm-sections-spacer {
    flex-grow: 1;
}
#side-nav-panel .rbm-config-sections > .rbm-sections-top > .rbm-menu-section,
#side-nav-panel .rbm-config-sections > .rbm-sections-top > .rbm-image-section,
#side-nav-panel .rbm-config-sections > .rbm-sections-bottom > .rbm-menu-section,
#side-nav-panel .rbm-config-sections > .rbm-sections-bottom > .rbm-image-section {
    box-sizing: border-box;
    width: 100%;
}
#side-nav-panel .rbm-menu-section > .accordion-menu {
    width: 100%;
}

/* Image section inside the panel */
#side-nav-panel .rbm-image-section {
    padding: 12px 16px;
    border-bottom: 0;
    box-sizing: border-box;
    width: 100%;
}
#side-nav-panel .rbm-image-section img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 2px;
}
#side-nav-panel .rbm-image-section a {
    display: block;
}
#side-nav-panel .rbm-image-section .rbm-image-text {
    margin-top: 6px;
    font-size: 13px;
    font-weight: bold;
    line-height: 1.4;
    color: #222529 !important;
}
#side-nav-panel .rbm-image-section a {
    color: #222529;
}

/* Menu section wrapper */
#side-nav-panel .rbm-menu-section {
    border-bottom: 0;
}

/* Hide sibling sections when inside a drill-down submenu */
#side-nav-panel .rbm-section-hidden {
    display: none !important;
}

/* Hide Porto extras when we control the panel layout */
#side-nav-panel .menu-custom-block,
#side-nav-panel .switcher-wrap,
#side-nav-panel .porto-social-icons {
    display: none !important;
}

/* --- Center logo in header --- */
#header .header-col.header-center {
    flex: 1;
    text-align: center;
}
#header .header-col.header-center .logo {
    display: inline-block;
}
#header .header-col.header-left,
#header .header-col.header-right {
    flex: 0 0 auto;
    width: auto;
}

@media (max-width: 991px) {
    #side-nav-panel .rbm-config-sections .rbm-menu-section,
    #side-nav-panel .rbm-config-sections .rbm-image-section {
        width: 100%;
        max-width: 100%;
    }
    #side-nav-panel .rbm-config-sections {
        min-height: calc(100dvh - 48px);
    }
}


