/* The 44 Dubai: header-specific navigation overrides.
   Loaded after Bootstrap and the legacy style.css so the fullPage/slider styles stay untouched. */
#header.the44-header {
    box-sizing: border-box;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 58px;
    padding: 0 3.5% 0 3%;
    text-align: left;
    pointer-events: auto;
    overflow: visible;
    z-index: 1001;
}

body.admin-bar #header.the44-header { top: 32px; }

#header.the44-header #logo {
    position: relative;
    left: auto;
    top: 18px;
    float: none;
    width: 78px;
    flex: 0 0 78px;
    align-self: flex-start;
    text-align: left;
    z-index: 2;
}

#header.the44-header #logo a { display: block; }
#header.the44-header #logo img {
    display: block;
    width: 75px;
    max-width: 100%;
    height: auto;
    pointer-events: auto;
}

#header.the44-header #social-wrapper {
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    position: static;
    float: none;
    right: auto !important;
    width: auto !important;
    height: 100%;
    max-width: calc(100% - 90px);
    margin: 0 0 0 auto;
    padding: 0;
    overflow: visible;
    pointer-events: auto;
    z-index: 2;
}

#header.the44-header .social-col {
    flex: 0 0 auto;
    padding: 0;
    white-space: nowrap;
    pointer-events: auto;
}

#header.the44-header #social-wrapper .btn {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 32px;
    margin: 0 !important;
    padding: 8px 11px;
    background: #fff;
    color: #0b3328;
    border: 1px solid #dedede;
    border-radius: 3px;
    box-shadow: none;
    font-family: 'Lato', sans-serif;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: normal;
    text-decoration: none;
    white-space: nowrap;
    text-shadow: none;
    cursor: pointer;
}

#header.the44-header #social-wrapper .btn:hover,
#header.the44-header #social-wrapper .btn:focus-visible {
    background: #f1eee8;
    color: #0b3328;
    border-color: #9c8e75;
}

#header.the44-header #social-wrapper .btn:focus-visible,
#header.the44-header .the44-submenu a:focus-visible,
#header.the44-header .the44-nav-toggle:focus-visible,
#header.the44-header .the44-social-links a:focus-visible {
    outline: 2px solid #d9c8a0;
    outline-offset: 3px;
}

#header.the44-header .the44-social-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

#header.the44-header .the44-social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    width: 25px;
    height: 32px;
}

#header.the44-header #social-wrapper .the44-social-links img.social-ico {
    width: 21px;
    height: auto;
    opacity: 1;
}

/* Brochure dropdown (the only menu overlay added by this change). */
#header.the44-header .the44-menu-group { position: relative; }
/* Bridge the small visual gap so pointer users can reach the dropdown. */
#header.the44-header .the44-menu-group.is-open::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 8px;
}
#header.the44-header .the44-menu-chevron {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
}

#header.the44-header .the44-submenu {
    box-sizing: border-box;
    display: none;
    position: absolute;
    top: calc(100% + 7px);
    left: 0;
    z-index: 1004;
    width: max-content;
    min-width: 210px;
    max-width: min(90vw, 320px);
    padding: 6px 0;
    margin: 0;
    background: #fff;
    color: #0b3328;
    border: 1px solid #e5e2db;
    border-radius: 3px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    list-style: none;
    text-align: left;
}

#header.the44-header .the44-menu-group.is-open .the44-submenu { display: block; }

#header.the44-header .the44-submenu li {
    display: block;
    list-style: none;
    float: none;
    padding: 0;
    margin: 0;
}

#header.the44-header .the44-submenu li a,
#header.the44-header .the44-submenu li .the44-link-pending {
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-height: 42px;
    padding: 12px 15px;
    margin: 0;
    color: #0b3328;
    background: transparent;
    font: 400 13px/1.35 'Lato', sans-serif;
    white-space: normal;
    text-decoration: none;
    box-shadow: none;
}

#header.the44-header .the44-submenu li a:hover,
#header.the44-header .the44-submenu li a:focus-visible {
    color: #0b3328;
    background: #f0eee9;
}

#header.the44-header .the44-submenu .the44-link-pending {
    opacity: 0.5;
    cursor: not-allowed;
}

#header.the44-header .the44-nav-toggle { display: none; }

/* WP's admin toolbar sits above this fixed header. */
@media (max-width: 782px) {
    body.admin-bar #header.the44-header { top: 46px; }
}

/* Switch the header controls to a compact panel before tablet buttons can wrap. */
@media (max-width: 1024px) {
    #header.the44-header {
        height: 62px;
        padding: 0 15px;
    }

    #header.the44-header #logo {
        top: 11px;
        left: 0;
        width: 65px;
        flex-basis: 65px;
    }

    #header.the44-header #logo img {
        width: 65px;
        max-width: 65px;
    }

    #header.the44-header .the44-nav-toggle {
        box-sizing: border-box;
        display: inline-flex;
        align-items: center;
        gap: 9px;
        min-width: 44px;
        min-height: 44px;
        margin: 0 0 0 auto;
        padding: 8px 10px;
        color: #fff;
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.65);
        border-radius: 3px;
        cursor: pointer;
        font: 400 12px/1.2 'Lato', sans-serif;
        text-transform: uppercase;
    }

    #header.the44-header .the44-nav-toggle-bars {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    #header.the44-header .the44-nav-toggle-bars span {
        display: block;
        width: 18px;
        height: 2px;
        background: currentColor;
        border-radius: 1px;
    }

    #header.the44-header #social-wrapper {
        box-sizing: border-box;
        display: none;
        position: absolute;
        top: 100%;
        right: 12px !important;
        left: auto;
        width: min(350px, calc(100vw - 24px)) !important;
        max-width: calc(100vw - 24px);
        height: auto;
        max-height: calc(100vh - 112px);
        max-height: calc(100dvh - 112px);
        overflow-x: hidden;
        overflow-y: auto;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 14px;
        margin: 0;
        background: #0b3328;
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 0 0 4px 4px;
        box-shadow: 0 12px 22px rgba(0, 0, 0, 0.24);
        z-index: 1002;
    }

    #header.the44-header #social-wrapper.is-open { display: flex; }
    #header.the44-header #social-wrapper > .social-col { width: 100%; }
    #header.the44-header #social-wrapper .btn {
        justify-content: space-between;
        width: 100%;
        min-height: 44px;
        padding: 12px 14px;
        font-size: 12px;
        text-align: left;
    }

    #header.the44-header .the44-submenu {
        position: static;
        top: auto;
        left: auto;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        margin: 7px 0 0;
        box-shadow: none;
    }

    #header.the44-header .the44-social-links {
        justify-content: flex-start;
        padding: 3px 8px 0;
        gap: 18px;
    }
    #header.the44-header .the44-social-links a {
        min-height: 44px;
        min-width: 44px;
    }
}

@media (max-width: 420px) {
    #header.the44-header #logo { width: 58px; flex-basis: 58px; }
    #header.the44-header #logo img { width: 58px; max-width: 58px; }
}
