.ecw-clinic-header{
    --ecw-dark:#353732;
    --ecw-orange:#FD5734;
    --ecw-gold:#BBB382;
    --ecw-line:#E9E7DF;
    --ecw-muted:#73756F;
    --ecw-bg:#FFFFFF;

    position:relative;
    z-index:999;
    width:100%;
    direction:rtl;
    font-family:var(--dr-font,"IRANSans",Tahoma,Arial,sans-serif);
}

.ecw-clinic-header *,
.ecw-clinic-header *::before,
.ecw-clinic-header *::after{
    box-sizing:border-box;
}

.ecw-clinic-header.is-sticky{
    position:sticky;
    top:0;
}

.admin-bar .ecw-clinic-header.is-sticky{
    top:32px;
}

.ecw-header-container{
    width:min(1240px,calc(100% - 40px));
    margin-inline:auto;
}

/* TOP BAR */

.ecw-header-topbar{
    background:var(--ecw-dark);
    color:#fff;
    font-size:12px;
}

.ecw-topbar-inner{
    min-height:34px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
}

.ecw-topbar-title{
    opacity:.82;
    font-weight:400;
}

.ecw-topbar-phone{
    display:inline-flex;
    align-items:center;
    gap:7px;
    color:#fff;
    text-decoration:none;
    font-weight:400;
    direction:ltr;
}

.ecw-topbar-phone:hover{
    color:#fff;
    opacity:.8;
}

/* MAIN */

.ecw-header-main{
    position:relative;
    background:rgba(255,255,255,.96);
    border-bottom:1px solid rgba(53,55,50,.08);
    backdrop-filter:blur(16px);
    -webkit-backdrop-filter:blur(16px);
    transition:
        box-shadow .25s ease,
        background .25s ease,
        border-color .25s ease;
}

.ecw-header-main-inner{
    min-height:82px;
    display:grid;
    grid-template-columns:108px minmax(0,1fr) auto;
    align-items:center;
    gap:24px;
    transition:min-height .25s ease;
}

.ecw-clinic-header.ecw-scrolled .ecw-header-main{
    background:rgba(255,255,255,.985);
    border-color:rgba(53,55,50,.1);
    box-shadow:0 10px 32px rgba(35,38,34,.07);
}

.ecw-clinic-header.ecw-scrolled .ecw-header-main-inner{
    min-height:68px;
}

/* LOGO */

.ecw-header-logo,
.ecw-drawer-logo{
    display:flex;
    align-items:center;
    text-decoration:none;
}

.ecw-header-logo{
    justify-content:flex-start;
}

.ecw-header-logo img{
    display:block;
    width:auto;
    max-width:100px;
    max-height:62px;
    object-fit:contain;
    transition:max-height .25s ease,transform .2s ease;
}

.ecw-clinic-header.ecw-scrolled .ecw-header-logo img{
    max-height:52px;
}

.ecw-header-logo:hover img{
    transform:translateY(-1px);
}

/* DESKTOP NAV */

.ecw-desktop-menu{
    min-width:0;
}

.ecw-desktop-menu .ecw-menu{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:1px;
    margin:0;
    padding:0;
    list-style:none;
}

.ecw-desktop-menu .ecw-menu li{
    position:relative;
    margin:0;
}

.ecw-desktop-menu .ecw-menu a{
    position:relative;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    min-height:44px;
    padding:9px 10px;
    border-radius:10px;
    color:var(--ecw-dark);
    font-family:inherit;
    font-size:13.5px;
    font-weight:400;
    line-height:1.8;
    white-space:nowrap;
    text-decoration:none;
    transition:
        color .18s ease,
        background .18s ease;
}

.ecw-desktop-menu .ecw-menu>li>a:hover,
.ecw-desktop-menu .ecw-menu>li.current-menu-item>a,
.ecw-desktop-menu .ecw-menu>li.current-menu-ancestor>a{
    color:var(--ecw-orange);
    background:rgba(253,87,52,.055);
}

.ecw-desktop-menu .ecw-menu>li>a::before{
    content:"";
    position:absolute;
    right:50%;
    bottom:2px;
    width:0;
    height:2px;
    border-radius:20px;
    background:var(--ecw-orange);
    transform:translateX(50%);
    transition:width .2s ease;
}

.ecw-desktop-menu .ecw-menu>li>a:hover::before,
.ecw-desktop-menu .ecw-menu>li.current-menu-item>a::before,
.ecw-desktop-menu .ecw-menu>li.current-menu-ancestor>a::before{
    width:16px;
}

.ecw-desktop-menu .menu-item-has-children>a::after{
    content:"";
    width:6px;
    height:6px;
    border-left:1.4px solid currentColor;
    border-bottom:1.4px solid currentColor;
    transform:rotate(-45deg);
    margin-right:1px;
}

/* DROPDOWNS */

.ecw-desktop-menu .sub-menu{
    position:absolute;
    z-index:1200;
    top:calc(100% + 8px);
    right:0;
    width:max-content;
    min-width:245px;
    max-width:330px;
    margin:0;
    padding:8px;
    list-style:none;
    background:rgba(255,255,255,.985);
    border:1px solid rgba(53,55,50,.09);
    border-radius:14px;
    box-shadow:0 20px 50px rgba(35,38,34,.12);
    opacity:0;
    visibility:hidden;
    transform:translateY(7px);
    transition:
        opacity .18s ease,
        visibility .18s ease,
        transform .18s ease;
}

.ecw-desktop-menu .sub-menu .sub-menu{
    top:-8px;
    right:calc(100% + 7px);
}

.ecw-desktop-menu li:hover>.sub-menu,
.ecw-desktop-menu li:focus-within>.sub-menu{
    opacity:1;
    visibility:visible;
    transform:translateY(0);
}

.ecw-desktop-menu .sub-menu li{
    width:100%;
}

.ecw-desktop-menu .sub-menu a{
    justify-content:flex-start;
    width:100%;
    min-height:40px;
    padding:8px 11px;
    border-radius:9px;
    white-space:normal;
    text-align:right;
    font-size:13px;
    font-weight:400;
}

.ecw-desktop-menu .sub-menu a:hover{
    background:#F7F6F2;
    color:var(--ecw-orange);
}

/* ACTIONS */

.ecw-header-actions{
    display:flex;
    align-items:center;
    gap:10px;
}

.ecw-header-cta{
    position:relative;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:46px;
    padding:9px 17px;
    border-radius:12px;
    background:var(--ecw-orange);
    color:#fff;
    font-family:inherit;
    font-size:13px;
    font-weight:500;
    line-height:1.7;
    white-space:nowrap;
    text-decoration:none;
    box-shadow:0 8px 20px rgba(253,87,52,.17);
    transition:transform .18s ease,box-shadow .18s ease;
}

.ecw-header-cta:hover{
    color:#fff;
    transform:translateY(-1px);
    box-shadow:0 11px 24px rgba(253,87,52,.23);
}

.ecw-mobile-toggle{
    display:none;
    width:44px;
    height:44px;
    padding:0;
    align-items:center;
    justify-content:center;
    flex-direction:column;
    gap:5px;
    border:1px solid rgba(53,55,50,.12);
    border-radius:11px;
    background:#fff;
    cursor:pointer;
}

.ecw-mobile-toggle span{
    width:19px;
    height:1.5px;
    border-radius:10px;
    background:var(--ecw-dark);
}

/* MOBILE DRAWER */

.ecw-mobile-overlay,
.ecw-mobile-drawer{
    display:none;
}

@media(max-width:1100px){

    .ecw-header-main-inner{
        min-height:72px;
        grid-template-columns:1fr auto;
        gap:16px;
    }

    .ecw-clinic-header.ecw-scrolled .ecw-header-main-inner{
        min-height:64px;
    }

    .ecw-header-logo img{
        max-width:92px;
        max-height:55px;
    }

    .ecw-desktop-menu{
        display:none;
    }

    .ecw-mobile-toggle{
        display:flex;
    }

    .ecw-mobile-overlay{
        display:block;
        position:fixed;
        z-index:1998;
        inset:0;
        background:rgba(25,27,24,.44);
        backdrop-filter:blur(3px);
        -webkit-backdrop-filter:blur(3px);
        opacity:0;
        visibility:hidden;
        transition:opacity .22s ease,visibility .22s ease;
    }

    .ecw-mobile-drawer{
        display:flex;
        position:fixed;
        z-index:1999;
        top:0;
        right:0;
        bottom:0;
        width:min(390px,88vw);
        flex-direction:column;
        background:#fff;
        box-shadow:-24px 0 60px rgba(20,22,19,.16);
        transform:translateX(105%);
        visibility:hidden;
        transition:transform .28s cubic-bezier(.2,.8,.2,1),visibility .28s ease;
    }

    .ecw-clinic-header.menu-open .ecw-mobile-overlay{
        opacity:1;
        visibility:visible;
    }

    .ecw-clinic-header.menu-open .ecw-mobile-drawer{
        transform:translateX(0);
        visibility:visible;
    }

    body.ecw-menu-lock{
        overflow:hidden;
    }

    .ecw-drawer-head{
        min-height:76px;
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:20px;
        padding:12px 18px;
        border-bottom:1px solid var(--ecw-line);
    }

    .ecw-drawer-logo img{
        display:block;
        max-width:88px;
        max-height:52px;
        object-fit:contain;
    }

    .ecw-drawer-close{
        width:40px;
        height:40px;
        padding:0;
        border:1px solid var(--ecw-line);
        border-radius:11px;
        background:#F8F7F3;
        color:var(--ecw-dark);
        font-family:Arial,sans-serif;
        font-size:25px;
        font-weight:400;
        line-height:1;
        cursor:pointer;
    }

    .ecw-drawer-body{
        flex:1;
        min-height:0;
        overflow-y:auto;
        padding:10px 16px 20px;
    }

    .ecw-mobile-navigation .ecw-menu{
        display:block;
        margin:0;
        padding:0;
        list-style:none;
    }

    .ecw-mobile-navigation .ecw-menu li{
        position:relative;
        margin:0;
        border-bottom:1px solid #EFEEE9;
    }

    .ecw-mobile-navigation .ecw-menu li:last-child{
        border-bottom:0;
    }

    .ecw-mobile-navigation .ecw-menu a{
        display:flex;
        align-items:center;
        width:100%;
        min-height:48px;
        padding:9px 8px 9px 48px;
        color:var(--ecw-dark);
        font-family:inherit;
        font-size:14px;
        font-weight:400;
        line-height:1.8;
        text-decoration:none;
    }

    .ecw-mobile-navigation .current-menu-item>a,
    .ecw-mobile-navigation .current-menu-ancestor>a{
        color:var(--ecw-orange);
    }

    .ecw-mobile-navigation .sub-menu{
        display:none;
        margin:0 10px 9px 0;
        padding:4px 10px 6px;
        list-style:none;
        background:#F8F7F3;
        border-radius:10px;
    }

    .ecw-mobile-navigation .ecw-submenu-open>.sub-menu{
        display:block;
    }

    .ecw-mobile-navigation .sub-menu li{
        border-color:#E9E7DF;
    }

    .ecw-mobile-navigation .sub-menu a{
        min-height:42px;
        font-size:13px;
    }

    .ecw-submenu-toggle{
        position:absolute;
        z-index:2;
        top:6px;
        left:3px;
        width:36px;
        height:36px;
        display:flex;
        align-items:center;
        justify-content:center;
        padding:0;
        border:0;
        border-radius:9px;
        background:#F5F4EF;
        color:#777970;
        cursor:pointer;
    }

    .ecw-submenu-toggle::before{
        content:"";
        width:7px;
        height:7px;
        border-left:1.5px solid currentColor;
        border-bottom:1.5px solid currentColor;
        transform:rotate(-45deg);
        transition:transform .18s ease;
    }

    .ecw-submenu-open>.ecw-submenu-toggle::before{
        transform:rotate(135deg);
    }

    .ecw-drawer-footer{
        padding:14px 18px max(18px,env(safe-area-inset-bottom));
        border-top:1px solid var(--ecw-line);
        background:#FBFAF7;
    }

    .ecw-drawer-cta{
        display:flex;
        align-items:center;
        justify-content:center;
        min-height:48px;
        padding:10px 16px;
        border-radius:11px;
        background:var(--ecw-orange);
        color:#fff;
        font-size:14px;
        font-weight:500;
        text-decoration:none;
    }

    .ecw-drawer-cta:hover{
        color:#fff;
    }

    .ecw-drawer-phone{
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:15px;
        margin-top:9px;
        padding:7px 3px 0;
        color:var(--ecw-muted);
        font-size:12px;
        font-weight:400;
        text-decoration:none;
    }
}

@media(max-width:767px){

    .admin-bar .ecw-clinic-header.is-sticky{
        top:46px;
    }

    .ecw-header-container{
        width:calc(100% - 28px);
    }

    .ecw-header-topbar{
        display:none;
    }

    .ecw-header-main-inner{
        min-height:66px;
    }

    .ecw-clinic-header.ecw-scrolled .ecw-header-main-inner{
        min-height:60px;
    }

    .ecw-header-logo img{
        max-width:82px;
        max-height:49px;
    }

    .ecw-header-cta{
        display:none;
    }

    .ecw-mobile-drawer{
        width:min(360px,91vw);
    }
}

.ecw-clinic-header a:focus-visible,
.ecw-clinic-header button:focus-visible{
    outline:2px solid var(--ecw-orange);
    outline-offset:3px;
}

@media(prefers-reduced-motion:reduce){
    .ecw-clinic-header *,
    .ecw-clinic-header *::before,
    .ecw-clinic-header *::after{
        scroll-behavior:auto !important;
        transition-duration:.01ms !important;
        animation-duration:.01ms !important;
        animation-iteration-count:1 !important;
    }
}
