/* ==========================================================================
   Site header: top bar (contact, language, social) + main bar (logo, menu,
   Book appointment). Below 1100px the menu becomes a side drawer.
   Uses the colour and font tokens from :root in Shared/_SiteLayout.cshtml.
   Class names start with "sh-" so the theme's older rules never reach them.
   ========================================================================== */

.sh {
    --sh-top-h: 44px;
    --sh-bar-h: 84px;
    --sh-ink: #0f1c2e;
    --sh-gutter: 24px;
    position: sticky;
    top: calc(-1 * var(--sh-top-h)); /* the top bar scrolls away, the main bar stays */
    z-index: 1200;
    font-family: var(--body-font);
}

.sh *, .sh *::before, .sh *::after { box-sizing: border-box; }
.sh a, .sh a:hover, .sh a:focus { text-decoration: none; }
.sh span { font-size: inherit; }
.sh ul { list-style: none; margin: 0; padding: 0; }
.sh img { max-width: none; min-width: 0; margin: 0; border-radius: 0; } /* the theme stretches every img on phones */
.sh :focus-visible { outline: 2px solid var(--secondary); outline-offset: 2px; }

.sh-wrap {
    width: 100%;
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--sh-gutter);
}

/* Skip link: visible only when it gets keyboard focus */
.sh-skip {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 2000;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    background: var(--gray-900);
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    transition: top var(--transition-fast);
}
.sh-skip:focus { top: 12px; color: var(--white); }

/* ---- Top bar --------------------------------------------------------------- */
.sh-top {
    height: var(--sh-top-h);
    background: var(--sh-ink);
    color: rgba(255, 255, 255, 0.78);
    font-size: 13.5px;
}

.sh-top-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.sh-contact {
    display: flex;
    align-items: center;
    min-width: 0;
}

.sh .sh-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13.5px;
    line-height: 1;
    white-space: nowrap;
    transition: color var(--transition-fast);
}
.sh .sh-contact-item:hover { color: var(--white); }
.sh-contact-item i { color: var(--secondary-light); font-size: 12.5px; }
.sh-contact-item span { overflow: hidden; text-overflow: ellipsis; }
.sh-contact-item + .sh-contact-item {
    margin-left: 18px;
    padding-left: 18px;
    border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.sh-top-end {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

/* Language switcher */
.sh-lang { position: relative; }

.sh-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 30px;
    padding: 0 11px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--white);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}
.sh-lang-btn:hover,
.sh-lang.is-open .sh-lang-btn { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.35); }
.sh-lang-btn .fa-globe { font-size: 13px; color: var(--secondary-light); }
.sh-lang-btn .sh-caret { font-size: 9px; opacity: 0.75; transition: transform var(--transition-fast); }
.sh-lang.is-open .sh-caret { transform: rotate(180deg); }

.sh-lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 10;
    min-width: 210px;
    padding: 6px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: 0 18px 40px -12px rgba(15, 28, 46, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity var(--transition-fast), transform var(--transition-fast), visibility 0s linear 0.2s;
}
.sh-lang.is-open .sh-lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity var(--transition-fast), transform var(--transition-fast), visibility 0s;
}

.sh .sh-lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--radius-md);
    color: var(--gray-800);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.sh .sh-lang-option:hover { background: var(--gray-50); color: var(--gray-900); }
.sh .sh-lang-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 22px;
    border-radius: var(--radius-sm);
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.sh-lang-name { flex: 1; }
.sh-lang-option .fa-check { font-size: 12px; color: var(--primary); visibility: hidden; }
.sh .sh-lang-option.is-active { background: var(--primary-transparent); color: var(--primary); }
.sh .sh-lang-option.is-active .sh-lang-code { background: var(--primary); color: var(--white); }
.sh-lang-option.is-active .fa-check { visibility: visible; }

/* Social links */
.sh-social { display: flex; align-items: center; gap: 6px; }

.sh .sh-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.sh .sh-social-link:hover { background: var(--primary); color: var(--white); }

/* ---- Main bar -------------------------------------------------------------- */
.sh-bar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-100);
    transition: box-shadow var(--transition-default), border-color var(--transition-default);
}
.sh.is-scrolled .sh-bar {
    border-bottom-color: transparent;
    box-shadow: 0 10px 30px -18px rgba(15, 28, 46, 0.45);
}

.sh-bar-inner {
    height: var(--sh-bar-h);
    display: flex;
    align-items: center;
    gap: 28px;
}

.sh .sh-brand { display: block; flex-shrink: 0; line-height: 0; }
.sh .sh-brand img { display: block; width: auto; height: 54px; }

.sh-menu {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    min-width: 0;
}

.sh-nav-list { display: flex; align-items: center; gap: 2px; }

.sh .sh-link {
    position: relative;
    display: block;
    padding: 10px 11px;
    color: var(--gray-700);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    border-radius: var(--radius-md);
    transition: color var(--transition-fast), background var(--transition-fast);
}
.sh .sh-link::after {
    content: '';
    position: absolute;
    left: 11px;
    right: 11px;
    bottom: 3px;
    height: 2px;
    border-radius: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform var(--transition-default);
}
.sh .sh-link:hover { color: var(--primary); }
.sh .sh-link:hover::after,
.sh .sh-link.is-active::after { transform: scaleX(1); }
.sh .sh-link.is-active { color: var(--primary); font-weight: 600; }
.sh-link .fa-chevron-right { display: none; }

.sh .sh-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    height: 46px;
    padding: 0 20px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    background: var(--primary);
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 8px 20px -8px rgba(216, 0, 46, 0.55);
    transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}
.sh .sh-cta:hover,
.sh .sh-cta:focus { background: var(--primary-dark); color: var(--white); transform: translateY(-1px); box-shadow: 0 12px 24px -10px rgba(216, 0, 46, 0.6); }
.sh-cta i { font-size: 14px; }

/* Parts that only the drawer shows */
.sh-drawer-head,
.sh-drawer-extra,
.sh-toggle,
.sh-backdrop { display: none; }

/* ---- Laptops: a little tighter ---------------------------------------------- */
@media (max-width: 1279.98px) {
    .sh-bar-inner { gap: 18px; }
    .sh .sh-link { padding: 10px 8px; font-size: 14.5px; }
    .sh .sh-link::after { left: 8px; right: 8px; }
    .sh .sh-cta { padding: 0 16px; font-size: 14.5px; }
    .sh .sh-brand img { height: 50px; }
}

/* ---- Tablets and phones: the menu becomes a drawer --------------------------- */
@media (max-width: 1099.98px) {
    .sh { --sh-bar-h: 72px; }
    .sh .sh-brand img { height: 46px; }

    .sh .sh-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        height: 44px;
        min-width: 44px;
        margin-left: auto;
        padding: 0 14px;
        border: 1px solid var(--gray-200);
        border-radius: var(--radius-lg);
        background: var(--white);
        color: var(--gray-800);
        font-family: inherit;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        transition: background var(--transition-fast), border-color var(--transition-fast);
    }
    .sh .sh-toggle:hover { background: var(--gray-50); border-color: var(--gray-300); }
    .sh-toggle i { font-size: 17px; }

    .sh-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1;
        background: rgba(15, 28, 46, 0.55);
        opacity: 0;
        visibility: hidden;
        transition: opacity var(--transition-default), visibility 0s linear 0.3s;
    }
    .sh.menu-open .sh-backdrop { opacity: 1; visibility: visible; transition: opacity var(--transition-default), visibility 0s; }

    .sh-menu {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 2;
        width: min(380px, 88vw);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        padding: 0 20px 28px;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: var(--white);
        box-shadow: -20px 0 50px -20px rgba(15, 28, 46, 0.4);
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s linear 0.32s;
    }
    .sh.menu-open .sh-menu { transform: translateX(0); visibility: visible; transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s; }

    .sh-drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 72px;
        margin: 0 -20px 12px;
        padding: 0 20px;
        border-bottom: 1px solid var(--gray-100);
    }
    .sh .sh-drawer-head img { height: 42px; width: auto; }

    .sh-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        border: 0;
        border-radius: var(--radius-full);
        background: var(--gray-100);
        color: var(--gray-700);
        font-size: 17px;
        cursor: pointer;
        transition: background var(--transition-fast), color var(--transition-fast);
    }
    .sh-close:hover { background: var(--gray-200); color: var(--gray-900); }

    .sh-nav-list { flex-direction: column; align-items: stretch; gap: 2px; }

    .sh .sh-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 14px;
        font-size: 16px;
        border-radius: var(--radius-md);
    }
    .sh .sh-link::after { display: none; }
    .sh .sh-link:hover { background: var(--gray-50); color: var(--gray-900); }
    .sh .sh-link.is-active { background: var(--primary-transparent); color: var(--primary); }
    .sh-link .fa-chevron-right { display: inline-block; font-size: 11px; color: var(--gray-400); }
    .sh-link.is-active .fa-chevron-right { color: var(--primary); }

    .sh .sh-cta { width: 100%; height: 52px; margin-top: 18px; font-size: 16px; }

    .sh-drawer-extra { display: block; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--gray-100); }

    .sh .sh-drawer-title {
        display: block;
        margin-bottom: 12px;
        color: var(--gray-500);
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .sh .sh-drawer-contact {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 8px 0;
        color: var(--gray-800);
        font-size: 15px;
        font-weight: 500;
        word-break: break-word;
    }
    .sh .sh-drawer-contact:hover { color: var(--primary); }
    .sh-drawer-contact i {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 38px;
        height: 38px;
        border-radius: var(--radius-md);
        background: var(--primary-transparent);
        color: var(--primary);
        font-size: 14px;
    }

    .sh-drawer-social { display: flex; gap: 10px; margin-top: 18px; }
    .sh .sh-drawer-social .sh-social-link {
        width: 42px;
        height: 42px;
        border-radius: var(--radius-md);
        background: var(--gray-100);
        color: var(--gray-700);
        font-size: 16px;
    }
    .sh .sh-drawer-social .sh-social-link:hover { background: var(--primary); color: var(--white); }
}

/* ---- Phones ----------------------------------------------------------------- */
@media (max-width: 767.98px) {
    .sh { --sh-top-h: 40px; --sh-bar-h: 64px; --sh-gutter: 16px; }
    .sh .sh-brand img { height: 40px; }
    .sh-top-end .sh-social { display: none; } /* they are in the drawer */
    .sh .sh-contact-item { font-size: 13px; }
}

@media (max-width: 575.98px) {
    .sh-toggle-label { display: none; }
    .sh .sh-toggle { padding: 0; width: 44px; }
    .sh-contact-mail span { display: none; } /* the envelope icon stays; the full address is in the drawer */
    .sh .sh-contact-mail { padding: 6px 2px; }
}

/* While the drawer is open the page behind it does not scroll */
html.sh-lock, html.sh-lock body { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
    .sh *, .sh *::before, .sh *::after { transition-duration: 0.01ms !important; }
}
