/* ==========================================
   MASTERMIND BAJA | LUXURY HEADER
   Header scope only
   ========================================== */


/* ==========================================
   01. HEADER FOUNDATION
   ========================================== */

.mc-luxury-header,
.mc-header-nav {
    color: var(--mc-cream);
    background: var(--mc-black);
    font-family: var(--mc-font-body);
}


/* ==========================================
   02. TOP CONTACT BAR
   ========================================== */

.mc-contact-bar {
    border-bottom: 1px solid rgb(229 196 119 / 35%);
    font-size: .75rem;
    letter-spacing: .025em;
}

.mc-contact-inner,
.mc-contact-links,
.mc-socials {
    display: flex;
    align-items: center;
    gap: 1.4rem;
}

.mc-contact-inner {
    justify-content: space-between;
    min-height: 42px;
    flex-wrap: wrap;
    padding-block: 5px;
}

.mc-contact-links {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 1.25rem;
}

.mc-contact-bar a {
    color: inherit;
    text-decoration: none;
    font-weight: 300;
    letter-spacing: .5px;
}

.mc-contact-bar a:hover {
    color: var(--mc-champagne);
}


/* ==========================================
   03. SOCIAL MEDIA ICONS
   ========================================== */

.mc-socials {
    gap: .35rem;
}

.mc-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
}

.mc-socials svg {
    fill: currentColor;
}


/* ==========================================
   04. SOLID BLACK BRAND HEADER
   ========================================== */

.mc-brand-panorama {
    height: clamp(156px, 12vw, 187.5px);
    display: grid;
    place-items: center;
    background: #111111;
}

.mc-panorama-logo {
    display: grid;
    place-items: center;
    width: min(52%, 410px);
}

.mc-panorama-logo .mc-brand,
.mc-panorama-logo .custom-logo-link {
    display: block;
    max-width: 100%;
    width: 100%;
    filter: drop-shadow(0 3px 8px #000);
}

.mc-panorama-logo img {
    display: block;
    margin-inline: auto;
    width: 270px;
    height: auto;
    max-width: 100%;
}


/* ==========================================
   05. STICKY NAVIGATION
   ========================================== */

.mc-sticky-sentinel {
    height: 1px;
    margin-bottom: -1px;
    pointer-events: none;
}

.mc-header-nav {
    position: sticky;
    top: 0;
    z-index: 999;
    border-block: 1px solid rgb(229 196 119 / 55%);
    box-shadow: 0 4px 18px #0002;
}

.admin-bar .mc-header-nav {
    top: 32px;
}

.mc-nav-inner {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    min-height: 72px;
    margin-bottom: -5px;
}


/* ==========================================
   06. COMPACT STICKY LOGO
   ========================================== */

.mc-compact-logo {
    flex: 0 0 122px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s;
}

.mc-compact-logo .mc-brand,
.mc-compact-logo .custom-logo-link {
    display: flex;
    justify-content: center;
    width: 122px;
    max-width: 100%;
}

.mc-compact-logo img {
    display: block;
    width: 100%;
    height: auto;
    margin-top: -5px;
}

.mc-is-sticky .mc-compact-logo {
    opacity: 1;
    visibility: visible;
}


/* ==========================================
   07. PRIMARY NAVIGATION
   ========================================== */

.mc-primary-panel {
    flex: 1;
    min-width: 0;
}

.mc-header-menu,
.mc-header-menu .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mc-header-menu {
    display: flex;
    padding-bottom: 5px;
    align-items: center;
    justify-content: center;
    gap: clamp(.1rem, 1vw, 1rem);
    flex-wrap: wrap;
}

.mc-header-menu li {
    position: relative;
}

.mc-header-menu a {
    display: inline-block;
    padding: .8rem .4rem;
    color: var(--mc-cream);
    font-size: .86rem;
    letter-spacing: .5px;
    font-weight: var(--mc-weight-ui);
    text-decoration: none;
    text-underline-offset: .55rem;
}

.mc-header-menu a:hover,
.mc-header-menu .current-menu-item > a,
.mc-header-menu .current-menu-ancestor > a {
    color: var(--mc-champagne);
}

.mc-header-menu .current-menu-item > a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
}


/* ==========================================
   08. DROPDOWN MENUS
   ========================================== */

.mc-header-menu .sub-menu {
    padding: .5rem;
    background: var(--mc-black);
    border: 1px solid rgb(229 196 119 / 45%);
    min-width: 220px;
    max-width: min(280px, 85vw);
}

.mc-header-menu .sub-menu a {
    padding: .7rem;
    overflow-wrap: anywhere;
}

.mc-nav-enhanced .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 2;
}

.mc-nav-enhanced .sub-menu .sub-menu {
    top: 0;
    left: 100%;
}

.mc-header-nav [hidden] {
    display: none !important;
}


/* ==========================================
   09. MENU LABEL AND CHEVRON ALIGNMENT
   ========================================== */

.mc-header-menu .menu-item-has-children {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px;
    align-items: center;
}

.mc-header-menu .menu-item-has-children > .sub-menu {
    grid-column: 1 / -1;
}

.mc-header-nav .mc-submenu-toggle {
    appearance: none;
    display: grid;
    place-items: center;
    align-self: center;
    box-sizing: border-box;
    float: none;
    width: 32px;
    min-width: 32px;
    height: 44px;
    min-height: 44px;
    margin-left: -8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--mc-champagne);
    font: inherit;
    line-height: 1;
    cursor: pointer;
    transform: none;
    transition: color .15s;
}

.mc-header-nav .mc-submenu-toggle:hover {
    color: var(--mc-cream);
}

.mc-header-nav .mc-submenu-toggle::before {
    content: "";
    display: block;
    width: 14px;
    height: 10px;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 10'%3E%3Cpath d='M2 2.5 9 7.5 16 2.5' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    transform: none;
}

.mc-header-nav .mc-submenu-toggle[aria-expanded="true"]::before {
    transform: none;
}


/* ==========================================
   10. SEARCH LISTINGS BUTTON
   ========================================== */

.mc-listing-search {
    flex-shrink: 0;
    margin-top: -5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    min-height: 44px;
    box-sizing: border-box;
    padding: .6rem 1rem;
    border: 1px solid var(--mc-champagne);
    background: #C49A42;
    color: #080808;
    font-size: .82rem;
    font-weight: var(--mc-weight-ui);
    text-decoration: none;
    letter-spacing: .025em;
    transition: background .2s;
}

.mc-listing-search:hover {
    background: var(--mc-champagne);
    color: #080808;
}


/* ==========================================
   11. MOBILE MENU TOGGLE
   ========================================== */

.mc-menu-toggle {
    color: var(--mc-champagne);
    background: transparent;
    border: 1px solid #e5c47766;
    min-width: 44px;
    min-height: 44px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.mc-burger {
    display: grid;
    gap: 5px;
    width: 20px;
}

.mc-burger span {
    display: block;
    height: 1px;
    background: currentColor;
}


/* ==========================================
   12. ACCESSIBILITY
   ========================================== */

.mc-header-nav :where(a, button):focus-visible,
.mc-luxury-header a:focus-visible {
    outline: 2px solid var(--mc-champagne);
    outline-offset: 3px;
}


/* ==========================================
   13. RESPONSIVE | 1280px
   ========================================== */

@media (max-width: 80rem) {

    .mc-nav-inner {
        gap: .75rem;
    }

    .mc-compact-logo {
        flex-basis: 100px;
    }

    .mc-compact-logo .mc-brand,
    .mc-compact-logo .custom-logo-link {
        width: 100px;
    }

    .mc-header-menu a {
        font-size: .8rem;
    }

}


/* ==========================================
   14. RESPONSIVE | 1100px
   ========================================== */

@media (max-width: 1100px) {

    .mc-brand-panorama {
        display: none;
        height: 200px;
    }

    .mc-panorama-logo {
        width: 300px;
        max-width: 64%;
    }

    .mc-nav-inner {
        flex-wrap: wrap;
        min-height: 76px;
        padding-block: 10px;
        gap: .75rem;
    }

    .mc-compact-logo {
        opacity: 1;
        visibility: visible;
        flex: 1;
    }

    .mc-compact-logo .mc-brand,
    .mc-compact-logo .custom-logo-link {
        width: 110px;
    }

    .mc-menu-toggle:not([hidden]) {
        display: inline-flex;
        order: 3;
        margin-top: -5px;
        }

    .mc-listing-search {
        margin-left: auto;
    }

    .mc-primary-panel {
        order: 4;
        flex-basis: 100%;
    }

    .mc-nav-enhanced .mc-primary-panel:not(.mc-panel-open) {
        display: none;
    }

    .mc-header-menu {
        display: block;
        padding-block: .5rem;
        max-height: 65vh;
        max-height: 65dvh;
        overflow: auto;
        overscroll-behavior: contain;
    }

    .mc-header-menu a {
        font-size: .95rem;
        padding: .85rem .5rem;
        min-height: 44px;
        box-sizing: border-box;
    }

    .mc-header-menu > li {
        border-top: 1px solid #e5c47722;
    }

    .mc-nav-enhanced .sub-menu,
    .mc-nav-enhanced .sub-menu .sub-menu {
        position: static;
        min-width: 0;
        max-width: none;
        border: 0;
        border-left: 1px solid #e5c47755;
        margin-left: 1rem;
        padding: .25rem .75rem;
    }

    .mc-header-menu .menu-item-has-children {
        grid-template-columns: minmax(0, 1fr) 44px;
    }

    .mc-header-nav .mc-submenu-toggle {
        width: 44px;
        min-width: 44px;
    }

    .mc-contact-inner {
        gap: .2rem 1rem;
    }

    .mc-contact-links {
        gap: .4rem 1rem;
    }

}


/* ==========================================
   15. RESPONSIVE | 782px
   ========================================== */

@media (max-width: 782px) {

    .admin-bar .mc-header-nav {
        top: 46px;
    }

    .mc-contact-email {
        display: none;
    }

    .mc-contact-inner {
        font-size: .7rem;
    }

    .mc-contact-links {
        gap: .3rem;
    }

    .mc-location {
        flex: 1;
    }

    .mc-socials {
        gap: 0;
    }

    .mc-socials a {
        min-width: 28px;
    }

    .mc-brand-panorama {
        height: 180px;
    }

    .mc-panorama-logo {
        width: 260px;
        max-width: 66%;
    }

}


/* ==========================================
   16. RESPONSIVE | 600px
   ========================================== */

@media (max-width: 600px) {

    .admin-bar .mc-header-nav {
        top: 0;
    }

    .mc-contact-inner {
        justify-content: center;
    }

    .mc-contact-links {
        justify-content: center;
    }

    .mc-location {
        text-align: center;
        flex-basis: 100%;
    }

    .mc-nav-inner {
        gap: .5rem;
        min-height: 68px;
    }

    .mc-listing-search {
        padding: .65rem .75rem;
        font-size: .75rem;
        gap: .35rem;
    }

    .mc-compact-logo .mc-brand,
    .mc-compact-logo .custom-logo-link {
        width: 92px;
    }

    .mc-brand-panorama {
        height: 165px;
    }

    .mc-panorama-logo {
        max-width: 65%;
    }

}


/* ==========================================
   17. DESKTOP DROPDOWN POSITIONING
   ========================================== */

@media (min-width: 1101px) {

    .mc-header-menu > li:nth-last-child(-n+2) > .sub-menu {
        left: auto;
        right: 0;
    }

    .mc-header-menu > li:nth-last-child(-n+2) .sub-menu .sub-menu {
        left: auto;
        right: 100%;
    }

}


/* ==========================================
   18. REDUCED MOTION
   ========================================== */

@media (prefers-reduced-motion: reduce) {

    .mc-header-nav * {
        transition: none !important;
    }

}