/* Shared header motion. Keep layout, hit areas, and the logo stationary. */
.dentexa-site .main-header,
.dentexa-site .dr-dana-mega-menu {
    --nav-ease: cubic-bezier(.22, 1, .36, 1);
    --nav-fast: 220ms;
    --nav-reveal: 340ms;
    --nav-direction: 1;
}

[dir="rtl"] .dentexa-site .main-header {
    --nav-direction: -1;
}

/* Keep one interactive navigation tree at the top and after scrolling. */
.dentexa-site .main-header[data-sticky-managed="react"].fixed-header > .header {
    position: fixed;
    top: 0;
    inset-inline: 0;
    width: 100%;
}

.dentexa-site .dr-dana-mobile-language {
    display: none;
}

@media (max-width: 1199px) {
    .dentexa-site .main-header .header-left .nav-outer {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-inline: 0;
    }

    .dentexa-site .dr-dana-mobile-language {
        display: block;
        flex: 0 0 auto;
    }

    .dentexa-site .template-language-switcher--compact {
        margin-inline: 0;
    }

    .dentexa-site .template-language-switcher--compact summary {
        width: 84px;
        height: 44px;
        padding: 0 10px;
        grid-template-columns: 18px minmax(0, 1fr) 12px;
        gap: 6px;
        border-radius: 12px;
        background: #fff;
        color: #124c4f;
        font-size: 12px;
        direction: ltr;
    }

    .dentexa-site .template-language-switcher--compact .template-language-switcher__menu {
        border-radius: 14px;
        background: #fff !important;
        box-shadow: 0 12px 32px rgba(18, 76, 79, .16);
    }

    .dentexa-site .template-language-switcher--compact .template-language-switcher__menu a {
        border-radius: 8px;
    }

    .dentexa-site .main-header .mobile-nav-toggler {
        margin: 0;
        padding: 0;
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        border-radius: 12px;
        background: #124c4f;
    }

    .dentexa-site .main-header .mobile-nav-toggler .inner {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        width: 100%;
        height: 100%;
        padding: 0;
        border-radius: inherit;
        background: transparent;
    }

    .dentexa-site .main-header .mobile-nav-toggler .icon-bar {
        width: 22px;
        height: 2px;
        margin: 0;
        border-radius: 2px;
    }

    .dentexa-site .template-language-switcher--compact summary:focus-visible,
    .dentexa-site .main-header .mobile-nav-toggler:focus-visible {
        outline: 2px solid #935b5f;
        outline-offset: 3px;
    }
}

@media (min-width: 1200px) {
    .dentexa-site .main-header .navigation {
        display: flex;
        flex-wrap: nowrap;
    }

    [dir="rtl"] .dentexa-site .main-header .navigation > li {
        margin-right: 0;
        margin-left: 24px;
    }

    [dir="rtl"] .dentexa-site .main-header .navigation > li:last-child {
        margin-left: 0;
    }
}

@media (min-width: 1200px) and (max-width: 1499px) {
    [dir="rtl"] .dentexa-site .main-header .navigation > li {
        margin-left: 13px;
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .dentexa-site .main-header .header .outer-box {
        grid-template-columns: 150px minmax(0, 1fr) auto;
        column-gap: 16px;
    }

    .dentexa-site .main-header .header-right_buttom .btn-one {
        width: 44px;
        min-width: 44px;
        padding: 0;
        justify-content: center;
    }

    .dentexa-site .main-header .header-right_buttom .btn-one .txt {
        display: none;
    }
}

.dentexa-site .main-header .navigation > li > a {
    transition: color var(--nav-fast) ease;
}

.dentexa-site .main-header .navigation > li > a::before {
    transition: transform 380ms var(--nav-ease), opacity var(--nav-fast) ease;
    transform-origin: center;
}

.dentexa-site .main-header .navigation > li:is(:hover, :focus-within, .current, [data-dropdown-open="true"]) > a::before {
    transform-origin: center;
}

.dentexa-site .main-header .navigation > li[data-dropdown-open="true"] > a::before {
    transform: scaleX(1);
    background: #935B5F;
}

@media (min-width: 1200px) {
    /* One panel transition replaces the template's delayed, per-row animation. */
    .dentexa-site .main-header .navigation > li.dropdown > ul.dr-dana-nav-submenu {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(10px);
        border-radius: 8px;
        border: 1px solid rgba(18, 76, 79, .14);
        background: #fff !important;
        box-shadow: 0 20px 48px rgba(0, 0, 0, .12), 0 3px 10px rgba(18, 76, 79, .05);
        transition: opacity 200ms ease, transform var(--nav-reveal) var(--nav-ease), visibility 0s 200ms;
    }

    .dentexa-site .main-header .navigation > li.dropdown[data-dropdown-open="true"] > ul.dr-dana-nav-submenu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
        transition-delay: 0s;
    }

    .dentexa-site .main-header .navigation > li > ul.dr-dana-nav-submenu::before,
    .dentexa-site .main-header .navigation > li > ul.dr-dana-nav-submenu::after {
        content: none;
    }

    .dentexa-site .main-header .navigation > li.dropdown > ul.dr-dana-nav-submenu > li {
        opacity: 1;
        visibility: inherit;
        transform: none;
        transition: none !important;
    }

    .dentexa-site .main-header .navigation > li > ul.dr-dana-nav-submenu > li > a {
        border-radius: 5px;
        transition: color var(--nav-fast) ease, background-color var(--nav-fast) ease !important;
    }

    .dentexa-site .main-header .dr-dana-nav-submenu > li > a > span,
    .dentexa-site .main-header .dr-dana-nav-submenu__icon {
        transition: transform var(--nav-reveal) var(--nav-ease), color var(--nav-fast) ease;
    }

    .dentexa-site .main-header .dr-dana-nav-submenu > li > a:is(:hover, :focus-visible) > span {
        transform: translateX(calc(3px * var(--nav-direction)));
    }

    .dentexa-site .main-header .dr-dana-nav-submenu > li > a:is(:hover, :focus-visible) > .dr-dana-nav-submenu__icon {
        transform: translateY(-2px);
        color: #124C4F;
    }

    .dentexa-site .main-header .dr-dana-nav-submenu__chevron {
        transition: transform var(--nav-reveal) var(--nav-ease), color var(--nav-fast) ease;
    }
}

.dentexa-site .main-header .header-right :is(.serach-button-style1, .side-content-button),
.dentexa-site .main-header .template-language-switcher summary,
.dentexa-site .main-header .mobile-nav-toggler {
    transition: background-color var(--nav-fast) ease, border-color var(--nav-fast) ease,
        box-shadow var(--nav-reveal) var(--nav-ease), transform var(--nav-reveal) var(--nav-ease);
}

.dentexa-site .main-header .header-right_buttom .btn-one {
    isolation: isolate;
    background: #000 !important;
    border-color: rgba(18, 76, 79, .45) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
    transition: background-color var(--nav-reveal) ease, border-color var(--nav-fast) ease,
        box-shadow var(--nav-reveal) var(--nav-ease), transform var(--nav-reveal) var(--nav-ease);
}

.dentexa-site .main-header .header-right_buttom .btn-one::before,
.dentexa-site .main-header .header-right_buttom .btn-one::after {
    content: none;
}

.dentexa-site .main-header :is(.header-booking-icon, .search-toggler > svg, .dr-dana-directory-button > svg),
.dentexa-site .main-header .template-language-switcher__chevron {
    transition: transform var(--nav-reveal) var(--nav-ease);
}

.dentexa-site .main-header .template-language-switcher[open] .template-language-switcher__menu {
    transform-origin: top;
    animation: nav-language-reveal 240ms var(--nav-ease) both;
}

.dentexa-site .main-header .template-language-switcher__menu a {
    transition: background-color var(--nav-fast) ease, color var(--nav-fast) ease;
}

.dentexa-site .main-header a[href^="tel:"] {
    direction: ltr;
    unicode-bidi: isolate;
}

.dentexa-site .main-header .template-language-switcher__menu a:focus-visible {
    background: rgba(147, 91, 95, .1);
}

@keyframes nav-language-reveal {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Entrance staggering must never delay hover or keyboard feedback. */
.dentexa-site .dr-dana-mega-menu.is-open .dr-dana-mega-menu__grid a {
    transition-delay: 0s, 0s, calc(60ms + var(--menu-item-index) * 12ms), calc(60ms + var(--menu-item-index) * 12ms);
}

.dentexa-site .dr-dana-mega-menu__grid a > svg,
.dentexa-site .dr-dana-mega-menu__grid a > span {
    transition: transform 380ms var(--nav-ease);
}

.dentexa-site .dr-dana-mega-menu__close {
    transition: background-color var(--nav-fast) ease, border-color var(--nav-fast) ease,
        transform var(--nav-reveal) var(--nav-ease);
}

@media (hover: hover) and (pointer: fine) {
    .dentexa-site .main-header .header-right :is(.serach-button-style1, .side-content-button):hover,
    .dentexa-site .main-header .template-language-switcher summary:hover {
        background: rgba(255, 255, 255, .8);
        box-shadow: 0 5px 14px rgba(18, 76, 79, .1);
        transform: translateY(-2px);
    }

    .dentexa-site .main-header .header-right_buttom .btn-one:hover {
        background: #124C4F !important;
        border-color: #124C4F !important;
        box-shadow: 0 9px 22px rgba(18, 76, 79, .22);
        transform: translateY(-2px);
    }

    .dentexa-site .main-header .header-right_buttom .btn-one:hover .header-booking-icon,
    .dentexa-site .main-header .search-toggler:hover > svg {
        transform: translateY(-1px) rotate(-6deg);
    }

    .dentexa-site .main-header .dr-dana-directory-button:hover > svg {
        transform: scaleX(.86);
    }

    .dentexa-site .dr-dana-mega-menu__grid a:hover > svg {
        transform: translateY(-4px);
    }

    .dentexa-site .dr-dana-mega-menu__grid a:hover > span {
        transform: translateY(-2px);
    }
}

.dentexa-site .main-header :is(a, button, summary):focus-visible,
.dentexa-site .dr-dana-mega-menu :is(a, button):focus-visible {
    outline: 2px solid #935B5F;
    outline-offset: 4px;
}

.dentexa-site .main-header .dr-dana-nav-submenu > li > a:focus-visible,
.dentexa-site .main-header .template-language-switcher__menu a:focus-visible,
.dentexa-site .dr-dana-mega-menu__grid a:focus-visible {
    outline-offset: -3px;
}

.dentexa-site .main-header .header-right_buttom .btn-one:active,
.dentexa-site .main-header .template-language-switcher summary:active,
.dentexa-site .main-header .header-right :is(.serach-button-style1, .side-content-button):active {
    transform: translateY(0);
    box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
    .dentexa-site .main-header *,
    .dentexa-site .main-header *::before,
    .dentexa-site .main-header *::after,
    .dentexa-site .dr-dana-mega-menu *,
    .dentexa-site .dr-dana-mega-menu {
        animation: none !important;
        transition: none !important;
    }
}
