/*
 * MFM-3B Phase 1 — Header + Global Shell
 * Scoped to header/navigation surfaces only. No content-section ownership.
 */

:root{
    --mfm-3b-shell:1240px;
    --mfm-3b-header-h:72px;
    --mfm-3b-mobile-brand-h:64px;
    --mfm-3b-mobile-tabs-h:44px;
    --mfm-3b-shell-bg:rgba(9,7,7,.94);
    --mfm-3b-shell-surface:#151110;
    --mfm-3b-shell-gold:#ddb266;
    --mfm-3b-shell-gold-strong:#efc873;
    --mfm-3b-shell-text:#f7f1e9;
    --mfm-3b-shell-muted:rgba(247,241,233,.72);
    --mfm-3b-shell-border:rgba(221,178,102,.16);
}

.mfm-skip-link{
    position:fixed;
    top:12px;
    left:12px;
    z-index:10001;
    display:inline-flex;
    min-height:44px;
    align-items:center;
    padding:0 18px;
    border:2px solid var(--mfm-3b-shell-gold-strong);
    border-radius:999px;
    background:#0b0707;
    color:var(--mfm-3b-shell-text);
    font-weight:800;
    text-decoration:none;
    transform:translateY(-180%);
    transition:transform .16s ease;
}

.mfm-skip-link:focus,
.mfm-skip-link:focus-visible{
    outline:3px solid #fff;
    outline-offset:3px;
    transform:translateY(0);
}

main[tabindex="-1"]:focus{
    outline:none;
}

@media (prefers-reduced-motion: reduce){
    html:focus-within{
        scroll-behavior:auto;
    }

    *,
    *::before,
    *::after{
        animation-duration:.01ms !important;
        animation-iteration-count:1 !important;
        transition-duration:.01ms !important;
    }
}

html.mfm-nav-open,
html.mfm-nav-open body{
    overflow:hidden;
}

body{
    padding-top:0 !important;
}

header.mfm-header{
    position:sticky !important;
    top:0;
    left:auto;
    right:auto;
    z-index:999;
    margin:0 !important;
    background:var(--mfm-3b-shell-bg) !important;
    border-bottom:1px solid rgba(255,255,255,.055) !important;
    box-shadow:0 12px 34px rgba(0,0,0,.16);
    backdrop-filter:blur(16px) saturate(125%);
    -webkit-backdrop-filter:blur(16px) saturate(125%);
}

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

header.mfm-header > .mfm-container{
    width:min(calc(100% - 36px),var(--mfm-3b-shell)) !important;
    max-width:var(--mfm-3b-shell) !important;
    margin-inline:auto !important;
    padding:0 !important;
}

header.mfm-header .mfm-header__row{
    height:var(--mfm-3b-header-h) !important;
    min-height:var(--mfm-3b-header-h) !important;
    gap:clamp(18px,2.2vw,32px) !important;
}

header.mfm-header .mfm-logo{
    display:inline-flex;
    align-items:center;
    flex:0 0 auto;
    min-width:88px;
    color:var(--mfm-3b-shell-text);
}

header.mfm-header .mfm-logo img{
    display:block;
    width:auto;
    height:42px !important;
    max-width:154px !important;
    object-fit:contain;
}

header.mfm-header .mfm-nav{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:clamp(16px,1.7vw,25px) !important;
    min-width:0;
    margin-left:auto;
}

header.mfm-header .mfm-nav > a,
header.mfm-header .mfm-nav-services-toggle{
    position:relative;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    height:40px;
    min-height:40px;
    padding:0 2px;
    border:0;
    background:transparent;
    color:var(--mfm-3b-shell-muted) !important;
    font-family:inherit;
    font-size:14px !important;
    font-weight:700 !important;
    line-height:1;
    text-decoration:none;
    white-space:nowrap;
    cursor:pointer;
    transition:color .18s ease;
}

header.mfm-header .mfm-nav > a::after,
header.mfm-header .mfm-nav-services-toggle::after{
    content:"";
    position:absolute;
    left:50%;
    right:50%;
    bottom:3px;
    height:2px;
    border-radius:999px;
    background:var(--mfm-3b-shell-gold);
    transition:left .18s ease,right .18s ease;
}

header.mfm-header .mfm-nav > a:hover,
header.mfm-header .mfm-nav > a:focus-visible,
header.mfm-header .mfm-nav > a.is-active,
header.mfm-header .mfm-nav-services-toggle:hover,
header.mfm-header .mfm-nav-services-toggle:focus-visible,
header.mfm-header .mfm-nav-services-toggle.is-active{
    color:var(--mfm-3b-shell-text) !important;
}

header.mfm-header .mfm-nav > a.is-active::after,
header.mfm-header .mfm-nav > a:hover::after,
header.mfm-header .mfm-nav-services-toggle.is-active::after,
header.mfm-header .mfm-nav-services-toggle:hover::after{
    left:0;
    right:0;
}

header.mfm-header .mfm-nav-services-dropdown{
    position:relative;
    display:flex;
    align-items:center;
}

header.mfm-header .mfm-nav-services-toggle{
    gap:7px;
}

header.mfm-header .mfm-nav-services-toggle::before{
    content:"";
    order:2;
    width:6px;
    height:6px;
    margin-top:-4px;
    border-right:1.5px solid currentColor;
    border-bottom:1.5px solid currentColor;
    transform:rotate(45deg);
    opacity:.72;
}

header.mfm-header .mfm-nav-services-panel{
    position:absolute;
    top:calc(100% + 8px);
    left:50%;
    width:224px;
    min-width:224px;
    display:grid !important;
    gap:4px;
    padding:8px;
    border:1px solid var(--mfm-3b-shell-border);
    border-radius:16px;
    background:rgba(15,12,11,.98);
    box-shadow:0 24px 60px rgba(0,0,0,.46);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transform:translate(-50%,8px);
    transition:opacity .16s ease,transform .16s ease,visibility .16s ease;
}

header.mfm-header .mfm-nav-services-dropdown:hover .mfm-nav-services-panel,
header.mfm-header .mfm-nav-services-dropdown:focus-within .mfm-nav-services-panel,
header.mfm-header .mfm-nav-services-dropdown.is-open .mfm-nav-services-panel{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
    transform:translate(-50%,0);
}

header.mfm-header .mfm-nav-services-panel a{
    display:flex;
    align-items:center;
    min-height:42px;
    padding:9px 12px;
    border-radius:11px;
    color:rgba(247,241,233,.76) !important;
    font-size:13.5px !important;
    font-weight:700;
    text-decoration:none;
}

header.mfm-header .mfm-nav-services-panel a:hover,
header.mfm-header .mfm-nav-services-panel a:focus-visible,
header.mfm-header .mfm-nav-services-panel a.is-active{
    color:#fff !important;
    background:rgba(221,178,102,.12);
}

header.mfm-header .mfm-header__right{
    display:flex;
    align-items:center;
    flex:0 0 auto;
    gap:10px !important;
}

header.mfm-header .mfm-lang-dropdown{
    position:relative;
    display:block !important;
}

header.mfm-header .mfm-lang-current{
    height:40px !important;
    min-height:40px;
    display:inline-flex;
    align-items:center;
    gap:7px;
    padding:0 12px !important;
    border-radius:999px;
    border:1px solid rgba(255,255,255,.09);
    background:rgba(255,255,255,.025);
    color:#fff;
    font-size:12.5px;
    font-weight:800;
    cursor:pointer;
}

header.mfm-header .mfm-lang-current:hover,
header.mfm-header .mfm-lang-current:focus-visible,
header.mfm-header .mfm-lang-dropdown.is-open .mfm-lang-current{
    border-color:rgba(221,178,102,.34);
    background:rgba(221,178,102,.07);
}

header.mfm-header .mfm-lang-current::after{
    width:6px;
    height:6px;
    border-width:0 1.5px 1.5px 0;
}

header.mfm-header .mfm-lang-flag{
    width:20px !important;
    height:20px !important;
}

header.mfm-header .mfm-lang-panel{
    top:calc(100% + 10px);
    right:0;
    width:244px;
    padding:8px;
    border-radius:16px;
    background:rgba(15,12,11,.985);
    border:1px solid var(--mfm-3b-shell-border);
    box-shadow:0 24px 60px rgba(0,0,0,.46);
}

header.mfm-header .mfm-lang-panel a{
    grid-template-columns:24px 30px 30px 1fr;
    gap:7px;
    min-height:40px;
    padding:7px 9px;
    border-radius:10px;
}

header.mfm-header .mfm-lang-panel small{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

header.mfm-header .mfm-header-booking{
    min-width:104px !important;
    height:42px !important;
    min-height:42px !important;
    padding:0 20px !important;
    border-radius:12px !important;
    background:linear-gradient(135deg,#efc873,#d8a84f) !important;
    box-shadow:none !important;
    color:#120d08 !important;
    font-size:13px !important;
    font-weight:850 !important;
    transform:none !important;
}

header.mfm-header .mfm-header-booking:hover,
header.mfm-header .mfm-header-booking:focus-visible,
header.mfm-header .mfm-header-booking.is-active{
    background:linear-gradient(135deg,#f5d283,#e0af55) !important;
    box-shadow:0 8px 24px rgba(221,178,102,.14) !important;
}

header.mfm-header a:focus-visible,
header.mfm-header button:focus-visible,
.mfm-mobile-menu a:focus-visible,
.mfm-mobile-menu button:focus-visible{
    outline:2px solid var(--mfm-3b-shell-gold-strong);
    outline-offset:3px;
}

header.mfm-header .mfm-mobile-brandbar,
header.mfm-header .mfm-mobile-tabs{
    display:none !important;
}

.mfm-mobile-menu{
    display:none;
}

@media(max-width:1100px) and (min-width:961px){
    header.mfm-header .mfm-nav{
        gap:13px !important;
    }

    header.mfm-header .mfm-nav > a,
    header.mfm-header .mfm-nav-services-toggle{
        font-size:12.5px !important;
    }

    header.mfm-header .mfm-logo img{
        height:38px !important;
        max-width:132px !important;
    }

    header.mfm-header .mfm-header-booking{
        min-width:92px !important;
        padding:0 15px !important;
    }
}

@media(max-width:960px){
    :root{
        --mfm-3b-mobile-shell-h:calc(var(--mfm-3b-mobile-brand-h) + var(--mfm-3b-mobile-tabs-h));
    }

    body{
        padding-top:0 !important;
    }

    header.mfm-header > .mfm-container{
        width:100% !important;
        max-width:none !important;
        margin:0 !important;
        padding:0 !important;
    }

    header.mfm-header .mfm-header__row{
        display:none !important;
    }

    header.mfm-header .mfm-mobile-brandbar{
        display:grid !important;
        grid-template-columns:56px minmax(0,1fr) 56px !important;
        align-items:center;
        height:var(--mfm-3b-mobile-brand-h) !important;
        min-height:var(--mfm-3b-mobile-brand-h) !important;
        padding:0 14px !important;
        background:rgba(12,9,9,.97) !important;
        border-bottom:1px solid rgba(255,255,255,.055) !important;
    }

    header.mfm-header .mfm-mobile-logo{
        display:flex;
        align-items:center;
        justify-content:center;
        min-width:0;
        text-decoration:none;
    }

    header.mfm-header .mfm-mobile-logo img{
        display:block;
        width:auto;
        max-width:112px !important;
        max-height:38px !important;
        object-fit:contain;
    }

    header.mfm-header .mfm-mobile-current-lang,
    header.mfm-header .mfm-mobile-trigger{
        display:flex !important;
        align-items:center;
        justify-content:center;
        width:40px !important;
        height:40px !important;
        min-width:40px;
        padding:0 !important;
        border-radius:12px !important;
        border:1px solid rgba(221,178,102,.22) !important;
        background:rgba(255,255,255,.025) !important;
        box-shadow:none !important;
    }

    header.mfm-header .mfm-mobile-current-lang img{
        width:23px !important;
        height:23px !important;
    }

    header.mfm-header .mfm-mobile-trigger{
        justify-self:end;
    }

    header.mfm-header .mfm-mobile-trigger::before{
        width:20px;
        height:14px;
        background:
            linear-gradient(#f7f1e9,#f7f1e9) 0 0 / 20px 1.5px no-repeat,
            linear-gradient(#f7f1e9,#f7f1e9) 0 6px / 20px 1.5px no-repeat,
            linear-gradient(#f7f1e9,#f7f1e9) 0 12px / 20px 1.5px no-repeat;
    }

    header.mfm-header .mfm-mobile-trigger.is-open::before{
        background:
            linear-gradient(#f7f1e9,#f7f1e9) 50% 50% / 20px 1.5px no-repeat;
        transform:translate(-50%,-50%) rotate(45deg);
    }

    header.mfm-header .mfm-mobile-trigger.is-open::after{
        content:"";
        position:absolute;
        left:50%;
        top:50%;
        width:20px;
        height:1.5px;
        background:#f7f1e9;
        transform:translate(-50%,-50%) rotate(-45deg);
    }

    header.mfm-header .mfm-mobile-tabs{
        display:grid !important;
        grid-template-columns:repeat(4,minmax(0,1fr)) !important;
        width:100% !important;
        max-width:none !important;
        height:var(--mfm-3b-mobile-tabs-h) !important;
        margin:0 !important;
        overflow:visible !important;
        background:#100d0c !important;
        border-bottom:1px solid rgba(221,178,102,.12) !important;
    }

    header.mfm-header .mfm-mobile-tabs > a{
        position:relative;
        display:flex !important;
        align-items:center;
        justify-content:center;
        min-width:0 !important;
        width:100% !important;
        height:var(--mfm-3b-mobile-tabs-h) !important;
        padding:0 7px !important;
        border-right:1px solid rgba(255,255,255,.05) !important;
        color:rgba(247,241,233,.68) !important;
        background:transparent !important;
        font-size:clamp(10.5px,2.8vw,12.5px) !important;
        font-weight:750 !important;
        line-height:1 !important;
        text-decoration:none;
        white-space:nowrap !important;
        overflow:hidden !important;
        text-overflow:ellipsis !important;
    }

    header.mfm-header .mfm-mobile-tabs > a:first-child{
        font-size:clamp(10.5px,2.8vw,12.5px) !important;
    }

    header.mfm-header .mfm-mobile-tabs > a:first-child::before{
        content:none !important;
    }

    header.mfm-header .mfm-mobile-tabs > a.is-active{
        color:#fff !important;
    }

    header.mfm-header .mfm-mobile-tabs > a.is-active::after{
        content:"";
        position:absolute;
        left:20%;
        right:20%;
        bottom:0;
        height:2px !important;
        border-radius:999px 999px 0 0;
        background:var(--mfm-3b-shell-gold) !important;
    }

    header.mfm-header .mfm-mobile-tabs > a.is-booking{
        color:#171009 !important;
        background:linear-gradient(135deg,#efc873,#d8a84f) !important;
        font-weight:850 !important;
        border-right:0 !important;
    }

    header.mfm-header .mfm-mobile-tabs > a.is-booking.is-active::after{
        background:#171009 !important;
    }

    header.mfm-header .mfm-mobile-lang-panel{
        top:calc(100% + 8px);
        left:0;
        width:min(250px,calc(100vw - 28px));
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:6px;
        padding:8px;
        border-radius:16px;
        background:rgba(15,12,11,.99);
        border:1px solid var(--mfm-3b-shell-border);
        box-shadow:0 20px 52px rgba(0,0,0,.5);
    }

    header.mfm-header .mfm-mobile-lang-panel a{
        min-height:44px;
        padding:7px 8px;
        border-radius:10px;
        background:rgba(255,255,255,.025);
    }

    .mfm-mobile-menu{
        position:fixed !important;
        inset:var(--mfm-3b-mobile-shell-h) 0 0 !important;
        z-index:998;
        display:none !important;
        padding:18px !important;
        overflow-y:auto;
        background:rgba(8,6,6,.985) !important;
        border-top:1px solid rgba(255,255,255,.04);
        backdrop-filter:blur(18px);
        -webkit-backdrop-filter:blur(18px);
    }

    body.admin-bar .mfm-mobile-menu{
        top:calc(32px + var(--mfm-3b-mobile-shell-h)) !important;
    }

    .mfm-mobile-menu.is-open{
        display:block !important;
    }

    .mfm-mobile-menu__inner{
        width:min(100%,520px);
        max-width:520px !important;
        margin:0 auto !important;
        padding:0 0 26px !important;
    }

    .mfm-mobile-menu__nav{
        display:grid !important;
        gap:7px !important;
    }

    .mfm-mobile-menu__nav > a,
    .mfm-mobile-menu-services-toggle{
        position:relative;
        display:flex !important;
        align-items:center;
        justify-content:space-between;
        width:100%;
        min-height:50px;
        padding:12px 14px !important;
        border:1px solid rgba(255,255,255,.055) !important;
        border-radius:12px !important;
        background:rgba(255,255,255,.025) !important;
        color:rgba(247,241,233,.8) !important;
        font-family:inherit;
        font-size:15px !important;
        font-weight:750 !important;
        line-height:1.25;
        text-align:left;
        text-decoration:none;
        cursor:pointer;
    }

    .mfm-mobile-menu__nav > a.is-active,
    .mfm-mobile-menu-services-toggle.is-active{
        color:#fff !important;
        border-color:rgba(221,178,102,.3) !important;
        background:rgba(221,178,102,.07) !important;
    }

    .mfm-mobile-menu-services-toggle::after{
        content:"";
        width:7px;
        height:7px;
        margin-right:3px;
        border-right:1.5px solid currentColor;
        border-bottom:1.5px solid currentColor;
        transform:rotate(45deg) translateY(-2px);
        transition:transform .16s ease;
    }

    .mfm-mobile-menu-services-dropdown.is-open .mfm-mobile-menu-services-toggle::after{
        transform:rotate(225deg) translate(-2px,-1px);
    }

    .mfm-mobile-menu-services-panel{
        display:none !important;
        grid-template-columns:1fr !important;
        gap:5px !important;
        padding:6px 6px 0 14px !important;
    }

    .mfm-mobile-menu-services-dropdown.is-open .mfm-mobile-menu-services-panel{
        display:grid !important;
    }

    .mfm-mobile-menu-services-panel a{
        min-height:42px;
        display:flex;
        align-items:center;
        padding:9px 12px;
        border-radius:10px;
        color:rgba(247,241,233,.68) !important;
        background:rgba(255,255,255,.018);
        border:1px solid rgba(255,255,255,.04);
        font-size:13.5px !important;
        font-weight:700;
        text-decoration:none;
    }

    .mfm-mobile-menu-services-panel a.is-active{
        color:#fff !important;
        border-color:rgba(221,178,102,.24);
        background:rgba(221,178,102,.06);
    }

    .mfm-mobile-booking{
        height:50px !important;
        margin-top:10px !important;
        border-radius:12px !important;
        background:linear-gradient(135deg,#efc873,#d8a84f) !important;
        color:#171009 !important;
        font-size:15px !important;
        font-weight:850 !important;
    }
}


@media(max-width:782px){
    body.admin-bar header.mfm-header{
        top:46px;
    }

    body.admin-bar .mfm-mobile-menu{
        top:calc(46px + var(--mfm-3b-mobile-shell-h)) !important;
    }
}

@media(max-width:600px){
    :root{
        --mfm-3b-mobile-brand-h:60px;
        --mfm-3b-mobile-tabs-h:42px;
    }

    header.mfm-header .mfm-mobile-brandbar{
        grid-template-columns:50px minmax(0,1fr) 50px !important;
        padding:0 10px !important;
    }

    header.mfm-header .mfm-mobile-logo img{
        max-width:104px !important;
        max-height:34px !important;
    }

    header.mfm-header .mfm-mobile-current-lang,
    header.mfm-header .mfm-mobile-trigger{
        width:38px !important;
        height:38px !important;
        min-width:38px;
    }

    .mfm-mobile-menu{
        padding:12px !important;
    }
}

@media(prefers-reduced-motion:reduce){
    header.mfm-header *,
    .mfm-mobile-menu *{
        scroll-behavior:auto !important;
        transition-duration:.001ms !important;
        animation-duration:.001ms !important;
    }
}
