/* ==========================================================================
   Sidebar (left side menu, language switcher, menu items, sub-pages,
   social icons, cert icons)
   ========================================================================== */

/* Side Menu - Desktop: permanent left sidebar */
#side-menu {
    position: fixed;
    top: 151px;
    left: 0;
    bottom: 0;
    width: 306px;
    z-index: 100;
    overflow-y: auto;
    background-color: #3a3a3a;
}
.side-menu-inner {
    width: 100%;
    min-height: 100%;
}
/* Push page content to the right on desktop */
#content,
#footer {
    margin-left: 306px;
}
/* Keep the menu column solid all the way to the top. #header is position:relative
   and scrolls away, so once the page was scrolled (a reload can restore a scrolled
   position) an empty band appeared above the fixed menu. This fixed backdrop fills
   that band with the menu colour; the header (z-index:200) covers it while the page
   is at the top, so nothing changes there. Desktop only — the mobile menu is an
   overlay that starts at top:53px. */
@media screen and (min-width: 901px) {
    #side-menu::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 306px;
        height: 151px;
        background-color: #3a3a3a;
        z-index: -1;
    }
}

/* Mobile: overlay mode */
@media screen and (max-width: 900px) {
    #side-menu {
        top: 53px !important;
        padding-top: 0;
        width: auto;
        right: 0;
        background-color: rgba(0, 0, 0, 0.7);
        z-index: 999999;
        display: none;
    }
    body.left-menu-open #side-menu {
        display: block;
    }
    .side-menu-inner {
        height: 100%;
    }
    #header,
    #content,
    #footer {
        margin-left: 0;
    }
    #content {
        /* padding-top: 53px; */
    }
}

/* Menu wrap */
.menu-wrap {
    padding: 20px 0 0;
    min-height: 100%;
    position: relative;
    transition: all 0.5s ease-out;
    font-family: 'Poppins', Arial, Helvetica, sans-serif;
    font-weight: 500;
}
.menu-wrap a {
    text-decoration: none;
    display: block;
}
.menu-wrap a:hover {
    text-decoration: none;
}
.menu-wrap ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.menu-wrap ul:after {
    content: "";
    clear: both;
    display: block;
}

/* Language switcher moved to the header (header.php / components/header.css). */

/* Mobile section (close/back buttons) - hidden on desktop */
.menu-wrap .mobile-section {
    display: none;
    justify-content: space-between;
    align-items: center;
    height: 66px;
    padding: 10px;
    background-color: #fff;
}
@media screen and (max-width: 900px) {
    .menu-wrap .mobile-section {
        display: flex;
    }
}
.menu-wrap .mobile-section .section-left {
    display: flex;
    height: 100%;
}
.menu-wrap .mobile-section .section-left a {
    height: 100%;
    font-weight: 300;
    font-size: 21px;
}
.menu-wrap .mobile-section .section-left a#closeMenu {
    margin-right: 10px;
}
.menu-wrap .mobile-section .section-left a#backToMainMenu {
    display: none;
}
.menu-wrap .mobile-section .section-left a i {
    display: inline-flex;
    height: 100%;
    width: 43px;
    align-items: center;
    justify-content: center;
    background-color: #F8F8F8;
}

/* Desktop/mobile visibility */
.menu-wrap .menu ul li .menu-title.mobile {
    display: none;
}
.menu-wrap .menu ul li .menu-title.desctop {
    display: flex;
}
.menu-wrap .menu ul li.hidden {
    display: none;
}
@media screen and (max-width: 900px) {
    .menu-wrap .menu ul li .menu-title.mobile {
        display: flex;
    }
    .menu-wrap .menu ul li .menu-title.desctop {
        display: none;
    }
    .menu-wrap .menu ul li.hidden {
        display: list-item;
    }
    .menu-wrap .menu ul li .mobile-menu-toggle {
        display: block;
    }
}

/* Menu mobile wrap (main content area) */
.menu-mobile-wrap {
    overflow-y: auto;
}
@media screen and (max-width: 900px) {
    .menu-mobile-wrap {
        height: 100%;
    }
    /* No page scroll behind the open mobile menu overlay. */
    body.left-menu-open {
        overflow: hidden;
    }
    .menu-wrap {
        /* padding-top: 0; */
        height: 100%;
        background-color: #fff;
    }
}

/* Menu items */
.menu-wrap .menu ul {
    border-bottom: 1px solid #F7F7F7;
}

/* Menu title (country header - e.g. "Dubai") */
.menu-wrap .menu ul li .menu-title {
    position: relative;
    background-color: #fff;
    color: #354649;
    padding: 20px 21px 12px;
    font-size: 20px;
    line-height: 1.5;
    margin-top: 3px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}
.menu-wrap .menu ul li .menu-title:before {
    content: "";
    position: absolute;
    top: 0;
    height: 100%;
    left: 0;
    width: 100%;
    background: linear-gradient(to bottom, #ffdd94 0%, #ffefc4 24%, #b1832b 47%, #ffdb7a 72%, #ffd86f 86%, #7a4d17 99%);
    opacity: 0.5;
}
.menu-wrap .menu ul li .menu-title.home {
    justify-content: center;
}
.menu-wrap .menu ul li .menu-title .title-flag {
    margin-right: 15px;
    position: relative;
    margin-top: auto;
    margin-bottom: 5px;
}
.menu-wrap .menu ul li .menu-title .title-flag span {
    width: 60px;
    height: 0;
    padding-top: 75%;
    box-shadow: 2px 2px 4px 0px #a0a0a0;
    display: block;
    border-radius: 3px;
    overflow: hidden;
}
.menu-wrap .menu ul li .menu-title .title-flag span.flag-icon-round {
    width: 45px;
    padding-top: 100%;
    border-radius: 50%;
}
.menu-wrap .menu ul li .menu-title .title-wrap {
    position: relative;
}
.menu-wrap .menu ul li .menu-title .title-wrap span.title-wrap-title {
    display: inline-block;
    position: relative;
    line-height: 1.3;
    top: -7px;
    margin-bottom: -5px;
    font-size: 20px;
    font-weight: 500;
}
.menu-wrap .menu ul li .menu-title .title-wrap span.title-wrap-title:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #525E6B;
    opacity: 0.7;
}
.menu-wrap .menu ul li .menu-title.home .title-wrap span.title-wrap-title {
    font-size: 30px;
}
.menu-wrap .menu ul li .menu-title .title-wrap span.title-wrap-sub-title {
    display: block;
    font-size: 13px;
    opacity: 0.8;
    position: relative;
    margin-top: -7px;
}

/* Mobile-specific menu-title overrides */
@media screen and (max-width: 900px) {
    .menu-wrap .menu ul li .menu-title {
        background-color: #F8F8F8;
        padding: 10px 15px 10px 20px;
        margin-top: 0;
        border-bottom: 1px solid #F8F8F8;
    }
    .menu-wrap .menu ul li .menu-title:before {
        background-image: none;
    }
    .menu-wrap .menu ul li .menu-title .title-flag span {
        width: 30px;
        box-shadow: none;
    }
    .menu-wrap .menu ul li .menu-title .title-flag span.flag-icon-round {
        border-radius: 5px;
        width: 30px;
        margin-top: 5px;
    }
    .menu-wrap .menu ul li .menu-title .title-wrap span.title-wrap-title {
        font-weight: 300;
        font-size: 21px;
        top: 0;
        margin: 0;
    }
    .menu-wrap .menu ul li .menu-title .title-wrap span.title-wrap-title:after {
        content: none;
    }
    .menu-wrap .menu ul li .menu-title .title-wrap span.title-wrap-sub-title {
        font-weight: 300;
        font-size: 7.5px;
        line-height: normal;
    }
}

/* Sub-page triggers */
.menu-wrap .menu ul li.has-subs {
    position: relative;
    margin-bottom: 1px;
    transition: all 0.5s ease-out;
}
.menu-wrap .menu ul li.has-subs .sub-page-trigger {
    position: relative;
    display: flex;
    padding: 18px 30px 18px 12px;
    background-color: #f3efe5;
    justify-content: flex-start;
    align-items: center;
    color: #45656a;
    text-align: left;
    gap: 5px;
    /* smooth colour change on hover, both directions */
    transition: background-color 0.3s ease, color 0.3s ease;
}
.menu-wrap .menu ul li.has-subs .sub-page-trigger.highlighted {
    color: var(--brand-green-dark) !important;
    background: linear-gradient(to right, #f5eed9 0%, #f6e9c8 100%);
}
.menu-wrap .menu ul li.has-subs.show-subs .sub-page-trigger {
    background-color: #fff;
}
.menu-wrap .menu ul li.has-subs .sub-page-trigger:hover {
    background-color: #e7e4db;
    color: #45656a;
}
.menu-wrap .menu ul li.has-subs .sub-page-trigger .menu-icon {
    font-size: 22px;
    width: 33px;
    display: flex;
    justify-content: center;
}
.menu-wrap .menu ul li.has-subs .sub-page-trigger .menu-name {
    padding-left: 0;
    font-size: 15px;
    line-height: 1.1;
}
.menu-wrap .menu ul li.has-subs .sub-page-trigger.highlighted .menu-name {
    line-height: 1.4;
}
.menu-wrap .menu ul li.has-subs .sub-page-trigger .menu-name span {
    display: block;
}
.menu-wrap .menu ul li.has-subs .sub-page-trigger .menu-name span.menu-sub-name {
    font-size: 15px;
    color: #2f828c;
}
.menu-wrap .menu ul li.has-subs .sub-page-trigger.highlighted .menu-name span.menu-sub-name {
    font-size: 17px;
}
.menu-wrap .menu ul li.has-subs .sub-page-trigger .show-sub-menus {
    border-width: 0 3px 3px 0;
    border-style: solid;
    border-color: #4E5A68;
    width: 13px;
    height: 13px;
    transform: translateY(-50%) rotate(-45deg);
    position: absolute;
    top: 50%;
    right: 9px;
    transition: all 0.5s ease-out;
}
.menu-wrap .menu ul li.has-subs.show-subs .sub-page-trigger .show-sub-menus {
    transform: translateY(-50%) rotate(45deg);
    transition: all 0.5s ease-in;
}

/* Mobile sub-page-trigger overrides */
@media screen and (max-width: 900px) {
    .menu-wrap .menu ul li.has-subs {
        overflow: hidden;
        margin: 0;
    }
    .menu-wrap .menu ul li.has-subs .sub-page-trigger {
        background-color: #fff;
        padding: 15px 50px 15px 20px;
        border-bottom: 1px solid #f8f8f8;
    }
    .menu-wrap .menu ul li.has-subs .sub-page-trigger .menu-icon {
        display: none;
    }
    .menu-wrap .menu ul li.has-subs .sub-page-trigger .menu-name {
        padding-left: 0;
        font-weight: 400;
    }
    .menu-wrap .menu ul li.has-subs .sub-page-trigger .menu-name br {
        display: none;
    }
}

/* Sub pages */
.menu-wrap .menu ul li.has-subs .sub-pages-wrap {
    display: none;
    position: relative;
    margin-left: 20px;
    background-color: #ffffff;
}
.menu-wrap .menu ul li.has-subs.show-subs .sub-pages-wrap {
    display: block;
}
.menu-wrap .menu ul li.has-subs ul.sub-pages {
    top: 100%;
    left: 0;
    width: 100%;
    position: relative;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}
.menu-wrap .menu ul li.has-subs ul.sub-pages li {
    width: 100%;
    position: relative;
}
.menu-wrap .menu ul li.has-subs ul.sub-pages li:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #eceae2;
}
.menu-wrap .menu ul li.has-subs ul.sub-pages li:last-child:after {
    content: none;
}
.menu-wrap .menu ul li.has-subs ul.sub-pages li a {
    background-color: #fffef7;
    font-size: 15px;
    line-height: 1.2;
    position: relative;
    padding: 15px 20px 15px 13px;
    text-align: left;
    align-items: center;
    font-weight: 400;
}
/* smooth hover: link background + every child text colour + the arrow fade in
   and out, and the arrow nudges toward the edge */
.menu-wrap .menu ul li.has-subs ul.sub-pages li a,
.menu-wrap .menu ul li.has-subs ul.sub-pages li a *,
.menu-wrap .menu ul li.has-subs ul.sub-pages li a:after {
    transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, right 0.25s ease;
}
.menu-wrap .menu ul li.has-subs ul.sub-pages li a:hover:after {
    right: 9px;
}
.menu-wrap .menu ul li.has-subs ul.sub-pages li a:after {
    content: "";
    border-width: 0 2px 2px 0;
    border-style: solid;
    border-color: #737373;
    width: 6px;
    height: 6px;
    transform: translateY(-50%) rotate(-45deg);
    position: absolute;
    top: 50%;
    right: 9px;
    transition: all 0.5s ease-out;
}
.menu-wrap .menu ul li.has-subs ul.sub-pages li a i {
    color: var(--brand-green);
    margin-right: 15px;
}
.menu-wrap .menu ul li.has-subs ul.sub-pages li a span {
    color: var(--brand-green);
    font-size: 13px;
}
.menu-wrap .menu ul li.has-subs ul.sub-pages li a span b {
    font-size: 15px;
    color: #394b4e;
}
/* Two-line sub-item layout used in highlighted sections (Visa, Firmengründung).
   sidebar.php splits labels on " — " (em-dash) and emits two spans —
   .sub-name (primary, dark + bolder) over .sub-sub-name (secondary, small
   olive italic). Single-line sub-items continue to render as plain text. */
.menu-wrap .menu ul li.has-subs ul.sub-pages li a .sub-name {
    display: block;
    color: #394b4e;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.25;
}
.menu-wrap .menu ul li.has-subs ul.sub-pages li a .sub-sub-name {
    display: block;
    color: #785712;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.3;
    margin-top: 3px;
}
/* Active / hover sub-item — brand-green panel with the pattern texture + WHITE
   text (white-on-green CTA rule). Active class is on the <li> (set by sidebar.php). */
.menu-wrap .menu ul li.has-subs ul.sub-pages li a:hover,
.menu-wrap .menu ul li.has-subs ul.sub-pages li.active a {
    color: #fff;
    background-color: var(--brand-green);
    background-image: url(/assets/img/icons/patern.png);
    background-size: cover;
    background-position: center;
}
.menu-wrap .menu ul li.has-subs ul.sub-pages li a:hover:after,
.menu-wrap .menu ul li.has-subs ul.sub-pages li.active a:after {
    border-color: #fff;
}
.menu-wrap .menu ul li.has-subs ul.sub-pages li a:hover i,
.menu-wrap .menu ul li.has-subs ul.sub-pages li.active a i,
.menu-wrap .menu ul li.has-subs ul.sub-pages li a:hover span,
.menu-wrap .menu ul li.has-subs ul.sub-pages li a:hover span b,
.menu-wrap .menu ul li.has-subs ul.sub-pages li.active a span,
.menu-wrap .menu ul li.has-subs ul.sub-pages li.active a span b,
.menu-wrap .menu ul li.has-subs ul.sub-pages li a:hover .sub-name,
.menu-wrap .menu ul li.has-subs ul.sub-pages li.active a .sub-name,
.menu-wrap .menu ul li.has-subs ul.sub-pages li a:hover .sub-sub-name,
.menu-wrap .menu ul li.has-subs ul.sub-pages li.active a .sub-sub-name {
    color: #fff;
}

/* Mobile sub-pages overrides */
@media screen and (max-width: 900px) {
    .menu-wrap .menu ul li.has-subs .sub-pages-wrap {
        margin-left: 10px;
    }
    .menu-wrap .menu ul li.has-subs ul.sub-pages li a {
        font-weight: 300;
        padding: 14px 20px 14px 14px;
        font-size: 14px;
        background-color: #FEFCF9;
    }
    .menu-wrap .menu ul li.has-subs ul.sub-pages li:after {
        left: 0;
        right: 0;
        background-color: #f8f8f8;
    }
}

/* Contact link special style */
.menu-wrap .menu ul li.has-subs .sub-page-trigger.sub-page-trigger--contact {
    color: #45656a;
}

/* Social icons in menu - hidden on desktop, visible on mobile */
.menu-wrap .social-icons {
    display: none;
    padding: 15px 15px 30px;
}
@media screen and (max-width: 900px) {
    .menu-wrap .social-icons {
        display: block;
    }
}
.menu-wrap .social-icons .social-wrap {
    display: flex;
    justify-content: center;
}
.menu-wrap .social-icons .social-wrap a {
    color: #4F5A68;
    height: 20px;
    width: 20px;
    margin: 0 5px;
    text-align: center;
    font-size: 18px;
}

/* Cert icons in menu - visible on desktop, hidden on mobile */
.menu-wrap .cert-icons {
    padding: 5px 15px;
}
@media screen and (max-width: 900px) {
    .menu-wrap .cert-icons {
        display: none;
    }
}
.menu-wrap .cert-icons .cert-wrap {
    margin: 0 -10px;
    display: flex;
}
.menu-wrap .cert-icons .cert-wrap a {
    flex-grow: 1;
    width: 100%;
    padding: 10px;
}
.menu-wrap .cert-icons .cert-wrap a img {
    width: 100%;
    border-radius: 7px;
}
.menu-wrap .cert-icons .cert-wrap a:hover img {
    border-radius: 0;
}

/* Current-page section row (and the Kontakt row on the contact page) — same
   green-panel + pattern + white-text treatment as the active sub-item, so the
   open page is marked at every menu level. Same markup on desktop and mobile,
   so the highlight shows on both. Appended last: wins the show-subs (white bg)
   and :hover ties; color needs !important to beat .highlighted's. */
.menu-wrap .menu ul li.has-subs.active-section > .sub-page-trigger {
    color: #fff !important;
    background: var(--brand-green) url(/assets/img/icons/patern.png) center / cover;
}
.menu-wrap .menu ul li.has-subs.active-section > .sub-page-trigger .menu-icon i,
.menu-wrap .menu ul li.has-subs.active-section > .sub-page-trigger .menu-name span {
    color: #fff;
}
.menu-wrap .menu ul li.has-subs.active-section > .sub-page-trigger .show-sub-menus {
    border-color: #fff;
}

/* Direct-link top items (Please Read This First / Tax Calculator Dubai) mark the
   current page with `active` on the <a> itself (matching live), not active-section
   on the <li>. Give them the same green-panel highlight. */
.menu-wrap .menu ul li.has-subs > .sub-page-trigger.active {
    color: #fff !important;
    background: var(--brand-green) url(/assets/img/icons/patern.png) center / cover;
}
.menu-wrap .menu ul li.has-subs > .sub-page-trigger.active .menu-icon i,
.menu-wrap .menu ul li.has-subs > .sub-page-trigger.active .menu-name span {
    color: #fff;
}
