/* ============================================================
   Smilora — static first screen + scroll sticky bar
   ============================================================ */

/* --- Original header stays in document flow --- */
.smilora-header-static-wrap {
    position: relative;
    z-index: 5;
}

.smilora-header-static .header-contact {
    margin-left: 0;
}

@media (min-width: 992px) {
    .smilora-header-static nav.navbar {
        display: grid !important;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        column-gap: 28px;
        width: 100%;
    }

    .smilora-header-static .navbar-brand {
        grid-column: 1;
        margin: 0;
        padding: 0;
        flex-shrink: 0;
    }

    .smilora-header-static .navbar-toggler {
        display: none !important;
    }

    .smilora-header-static .navbar-collapse {
        display: flex !important;
        grid-column: 2;
        justify-content: center !important;
        flex: none;
        width: 100%;
        min-width: 0;
    }

    .smilora-header-static .navbar-nav {
        margin-left: 0 !important;
        margin-right: 0 !important;
        justify-content: center;
        align-items: center;
        gap: 28px;
        width: 100%;
    }

    .smilora-header-static .header-contact {
        grid-column: 3;
        margin-left: 0 !important;
        flex-shrink: 0;
    }
}

.smilora-header-static .header-contact ul li a span.number,
.smilora-sticky-desktop-nav .header-contact ul li a span.number {
    font-size: 19px;
    line-height: 1.15;
    white-space: nowrap;
}

.smilora-header-static span.call-us-today,
.smilora-sticky-desktop-nav span.call-us-today {
    font-size: 12px;
    line-height: 1.25;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* Phone icon — white on blue circle, clickable link */
.header-contact a.smilora-phone-icon-link {
    text-decoration: none;
    display: inline-flex;
    flex-shrink: 0;
    border-radius: 100%;
}

.header-contact a.smilora-phone-icon-link .header-phone img {
    filter: brightness(0) invert(1);
}

.header-contact a.smilora-phone-icon-link:hover .header-phone,
.header-contact a.smilora-phone-icon-link:focus-visible .header-phone {
    background-color: var(--black--family--color2);
}

.header-contact a.smilora-phone-icon-link .header-phone {
    transition: background-color 0.25s ease;
}

/* --- Fixed sticky bar (hidden until scroll) --- */
.smilora-sticky-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    z-index: 300;
    pointer-events: none;
    transform: translateY(-101%);
    transition: transform 0.32s ease-in-out, box-shadow 0.32s ease;
    box-shadow: none;
}

body.smilora-nav-visible .smilora-sticky-nav {
    pointer-events: auto;
    transform: translateY(0);
    box-shadow: 0 10px 40px rgba(58, 68, 152, 0.14);
}

.smilora-sticky-nav .home-mnav-strip,
.smilora-sticky-nav .smilora-sticky-desktop {
    width: 100%;
    background: var(--secondary--color);
    border-bottom: 1px solid rgba(58, 68, 152, 0.42);
    box-sizing: border-box;
}

/* Mobile sticky strip — full width like marketing */
.smilora-sticky-nav .home-mnav-top-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 25px clamp(16px, 5vw, 45px);
    min-height: 72px;
    margin: 0 auto;
}

.smilora-sticky-nav .home-mnav-logo {
    display: block;
    min-width: 0;
    max-width: min(65vw, 260px);
}

.smilora-sticky-nav .home-mnav-logo img {
    max-height: 65px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    object-position: left center;
    display: block;
}

.smilora-sticky-nav .home-mnav-tools {
    display: inline-flex;
    align-items: center;
    column-gap: 10px;
}

.smilora-sticky-nav .home-mnav-tool {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(58, 68, 152, 0.58);
    background: transparent;
    color: var(--primary--color);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.smilora-sticky-nav .home-mnav-tool:hover,
.smilora-sticky-nav .home-mnav-tool:focus-visible {
    border-color: rgba(58, 68, 152, 0.92);
    background: rgba(58, 68, 152, 0.08);
    outline: none;
}

.smilora-sticky-nav .home-mnav-tool.home-mnav-burger {
    flex-direction: column;
    gap: 5px;
    padding: 0;
    cursor: pointer;
}

.smilora-sticky-nav .home-mnav-burger-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--primary--color);
    border-radius: 1px;
}

/* Desktop sticky — padding 7px як на маркетингу */
.smilora-sticky-desktop {
    padding: 0;
}

.smilora-sticky-desktop .main-container {
    width: 100%;
    max-width: 1660px;
    margin: 0 auto;
    padding-left: 2.5%;
    padding-right: 1.5%;
    box-sizing: border-box;
}

.smilora-sticky-desktop-nav {
    padding: 25px 0 !important;
    width: 100%;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 32px;
}

.smilora-sticky-desktop-nav .navbar-brand {
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    grid-column: 1;
}

.smilora-sticky-desktop-nav .navbar-brand img {
    max-height: 52px;
    width: auto;
    max-width: min(240px, 28vw);
    object-fit: contain;
}

.smilora-sticky-desktop-nav .navbar-collapse {
    display: flex !important;
    flex: none;
    justify-content: center !important;
    grid-column: 2;
    min-width: 0;
    width: 100%;
}

.smilora-sticky-desktop-nav .navbar-nav {
    gap: 36px;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Усі пункти чорні (перебиваємо Bootstrap .navbar-light сірий) */
.smilora-sticky-desktop-nav.navbar-light .navbar-nav .nav-item .nav-link,
.smilora-sticky-desktop-nav .navbar-nav .nav-link,
.smilora-sticky-desktop-nav .navbar-nav .nav-link.dropdown-toggle {
    color: var(--black--color) !important;
    font-weight: 500;
    padding: 1px 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    width: auto !important;
    opacity: 1 !important;
}

.smilora-sticky-desktop-nav .navbar-nav .nav-link.active,
.smilora-sticky-desktop-nav .navbar-nav .nav-link.dropdown-toggle.active {
    color: var(--black--color) !important;
    background: transparent !important;
    padding: 1px 0 !important;
}

.smilora-sticky-desktop-nav .navbar-nav .nav-link:hover,
.smilora-sticky-desktop-nav .navbar-nav .nav-link:focus,
.smilora-sticky-desktop-nav .navbar-nav .nav-link.dropdown-toggle:hover {
    color: var(--primary--color) !important;
    background: transparent !important;
}

.smilora-sticky-desktop-nav .header-contact {
    margin-left: 0 !important;
    flex-shrink: 0;
    grid-column: 3;
}

.smilora-sticky-desktop-nav .header-contact ul {
    gap: 0 28px;
    column-gap: 28px;
}

.smilora-sticky-desktop-nav .header-contact ul li:first-child {
    margin-right: 0 !important;
}

.smilora-sticky-desktop-nav .header-contact .contact-btn {
    min-width: 148px;
    background-color: var(--primary--color);
    color: var(--secondary--color);
    transition: background-color 0.25s ease;
}

.smilora-sticky-desktop-nav .header-contact .contact-btn:hover {
    background-color: var(--black--family--color2);
    color: var(--secondary--color);
}

.smilora-sticky-desktop-nav a.smilora-phone-icon-link {
    text-decoration: none;
    display: inline-flex;
    flex-shrink: 0;
    border-radius: 100%;
}

.smilora-sticky-desktop-nav a.smilora-phone-icon-link:hover .header-phone,
.smilora-sticky-desktop-nav a.smilora-phone-icon-link:focus-visible .header-phone {
    background-color: var(--black--family--color2);
}

.smilora-sticky-desktop-nav .header-phone {
    width: 48px;
    height: 48px;
    background-color: var(--primary--color);
    margin-right: 10px;
    transition: background-color 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.smilora-sticky-desktop-nav .header-phone img {
    display: none !important;
}

.smilora-sticky-desktop-nav .header-phone .fa-phone {
    color: var(--secondary--color);
    font-size: 17px;
    line-height: 1;
}

.smilora-sticky-desktop-nav .header-contact ul li a.cell-no:hover span.number {
    color: var(--primary--color);
}

.smilora-sticky-desktop-nav .navbar-toggler {
    display: none !important;
}

/* --- Mobile drawer (unchanged) --- */
@media (min-width: 992px) {
    body.home-mobile-nav-custom .home-mnav-backdrop,
    body.home-mobile-nav-custom .home-mnav-drawer {
        display: none !important;
    }
}

body.home-mobile-nav-custom .home-mnav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 310;
    background: rgba(15, 2, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
    pointer-events: none;
}

body.home-mobile-nav-custom .home-mnav-backdrop.is-on {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.home-mobile-nav-custom .home-mnav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(66.67vw, 420px);
    min-width: 260px;
    max-width: calc(100vw - 24px);
    height: 100%;
    height: 100dvh;
    z-index: 320;
    background: var(--secondary--color);
    box-shadow: -12px 0 42px rgba(58, 68, 152, 0.18);
    transform: translate3d(101%, 0, 0);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.36s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.36s;
    overflow-y: auto;
}

body.home-mobile-nav-custom.home-mnav-open .home-mnav-drawer {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
}

body.home-mobile-nav-custom.home-mnav-open {
    overflow: hidden;
}

body.home-mobile-nav-custom .home-mnav-drawer-inner {
    position: relative;
    padding: 56px 20px 28px;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

body.home-mobile-nav-custom .home-mnav-drawer-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: var(--black--color);
    font-size: 22px;
    cursor: pointer;
}

body.home-mobile-nav-custom .home-mnav-drawer-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

body.home-mobile-nav-custom .home-mnav-drawer-nav li a {
    display: block;
    padding: 16px 0;
    font-weight: 600;
    font-size: 17px;
    color: var(--black--color);
    text-decoration: none;
    border-bottom: 1px solid var(--border--color);
}

body.home-mobile-nav-custom .home-mnav-drawer-nav li a:hover {
    color: var(--primary--color);
}

body.home-mobile-nav-custom .home-mnav-drawer-nav li.is-sub a {
    padding-left: 14px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text--color);
}

body.home-mobile-nav-custom .home-mnav-drawer-soc {
    display: flex;
    gap: 12px;
    margin-top: auto;
    padding-top: 28px;
    justify-content: center;
}

body.home-mobile-nav-custom .home-mnav-soc {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(58, 68, 152, 0.45);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--primary--color);
    text-decoration: none;
}

body.home-mobile-nav-custom .home-mnav-drawer-cta {
    margin-top: 20px;
    display: block;
    text-align: center;
    padding: 14px 16px;
    border-radius: 100px;
    background: var(--primary--color);
    color: var(--secondary--color);
    font-weight: 600;
    text-decoration: none;
}

body.home-mobile-nav-custom .home-mnav-drawer-cta:hover {
    background: var(--black--family--color2);
    color: var(--secondary--color);
}

@media (max-width: 991.98px) {
    .smilora-sticky-desktop {
        display: none !important;
    }
}

/* --- Static header on mobile: centered logo, no built-in burger --- */
@media (max-width: 991.98px) {
    body.home-mobile-nav-custom:not(.smilora-nav-sticky) .smilora-header-static .navbar-toggler {
        display: none !important;
    }

    body.home-mobile-nav-custom:not(.smilora-nav-sticky) .smilora-header-static .navbar-collapse {
        display: none !important;
    }

    body.home-mobile-nav-custom:not(.smilora-nav-sticky) .smilora-header-static .header-contact {
        display: none !important;
    }

    body.home-mobile-nav-custom:not(.smilora-nav-sticky) .smilora-header-static nav.navbar {
        justify-content: center;
    }

    body.home-mobile-nav-custom:not(.smilora-nav-sticky) .smilora-header-static .navbar-brand {
        margin-left: auto;
        margin-right: auto;
    }
}

/* Anchor offset under sticky navigation */
body.home-mobile-nav-custom.page-index #home-services,
body.home-mobile-nav-custom.page-index #doctors-team,
body.home-mobile-nav-custom.page-index #results,
body.home-mobile-nav-custom.page-index #promotions,
body.home-mobile-nav-custom.page-index #map-contact,
body.home-mobile-nav-custom #site-footer {
    scroll-margin-top: 88px;
}

@media (min-width: 992px) {
    body.home-mobile-nav-custom.page-index #home-services,
    body.home-mobile-nav-custom.page-index #doctors-team,
    body.home-mobile-nav-custom.page-index #results,
    body.home-mobile-nav-custom.page-index #promotions,
    body.home-mobile-nav-custom.page-index #map-contact,
    body.home-mobile-nav-custom #site-footer {
        scroll-margin-top: 102px;
    }
}
