/**
 * Tourbi custom site header and footer.
 */

body.tourbi-custom-site-chrome {
    --tourbi-chrome-navy: #0c1a33;
    --tourbi-chrome-orange: #ff653d;
    --tourbi-chrome-lime: #c9f553;
    --tourbi-chrome-border: rgba(255, 255, 255, 0.15);
}

/*
 * Hide native Hello/Elementor header and footer only when Tourbi chrome is
 * active. Descendant selectors are intentional because Elementor/Hello may
 * wrap these locations differently depending on the selected page template.
 */
body.tourbi-custom-site-chrome #site-header,
body.tourbi-custom-site-chrome header.site-header,
body.tourbi-custom-site-chrome .elementor-location-header,
body.tourbi-custom-site-chrome #site-footer,
body.tourbi-custom-site-chrome footer.site-footer,
body.tourbi-custom-site-chrome .elementor-location-footer {
    display: none !important;
}

/* Never hide the replacement Tourbi chrome itself. */
body.tourbi-custom-site-chrome .tourbi-site-header,
body.tourbi-custom-site-chrome .tourbi-site-footer {
    display: block !important;
}

/* Keep Elementor landing-page content flush with the shared site shell. */
body.tourbi-custom-chrome-page .site-main,
body.tourbi-custom-chrome-page main#content,
body.tourbi-custom-chrome-page .page-content {
    margin-top: 0;
    margin-bottom: 0;
}

.tourbi-skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 100100;
    padding: 10px 14px;
    color: #fff !important;
    background: #111;
    border-radius: 6px;
    transform: translateY(-150%);
}

.tourbi-skip-link:focus {
    transform: translateY(0);
}

.tourbi-site-header {
    position: relative;
    z-index: 10000;
    color: #fff;
    background: var(--tourbi-chrome-navy);
    border-bottom: 1px solid var(--tourbi-chrome-border);
}

.tourbi-site-header.is-sticky {
    position: sticky;
    top: 0;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
}

.admin-bar .tourbi-site-header.is-sticky {
    top: 32px;
}

.tourbi-site-header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 34px;
    width: min(100% - 40px, 1300px);
    min-height: 78px;
    margin-inline: auto;
}

.tourbi-site-logo {
    display: inline-flex;
    align-items: center;
    min-width: 150px;
    color: var(--tourbi-chrome-orange) !important;
    text-decoration: none;
}

.tourbi-site-logo__image {
    display: block;
    width: auto;
    max-width: 180px;
    max-height: 52px;
    object-fit: contain;
}

.tourbi-site-logo__text {
    font-family: var(--tourbi-font-display, sans-serif);
    font-size: 32px;
    font-style: italic;
    font-weight: 900;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.tourbi-site-navigation {
    display: flex;
    align-items: center;
    gap: 30px;
}

.tourbi-site-navigation ul {
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tourbi-site-navigation li {
    margin: 0;
}

.tourbi-site-navigation ul a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    color: #fff !important;
    font-size: 13px;
    font-weight: 850;
    letter-spacing: 0.025em;
    text-decoration: none;
    text-transform: uppercase;
}

.tourbi-site-navigation ul a::after {
    position: absolute;
    right: 0;
    bottom: 2px;
    left: 0;
    height: 3px;
    background: var(--tourbi-chrome-orange);
    content: "";
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 180ms ease;
}

.tourbi-site-navigation ul a:hover::after,
.tourbi-site-navigation ul a.is-active::after {
    transform: scaleX(1);
}

.tourbi-site-header__rent {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 47px;
    padding: 11px 20px;
    color: #111 !important;
    background: var(--tourbi-chrome-orange);
    border-radius: 7px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-decoration: none;
    white-space: nowrap;
}

.tourbi-site-header__rent:hover {
    color: #111 !important;
    background: var(--tourbi-chrome-lime);
}

.tourbi-site-nav-toggle {
    display: none;
    width: 46px;
    height: 46px;
    padding: 11px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 7px;
    cursor: pointer;
}

.tourbi-site-nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    background: #fff;
    transition:
        transform 180ms ease,
        opacity 180ms ease;
}

.tourbi-site-nav-backdrop[hidden] {
    display: none;
}

.tourbi-site-footer {
    position: relative;
    z-index: 10;
    color: #fff;
    background: #081427;
}

.tourbi-site-footer__main {
    display: grid;
    grid-template-columns: minmax(280px, 1.5fr) repeat(3, minmax(140px, 0.7fr));
    gap: clamp(34px, 6vw, 80px);
    width: min(100% - 40px, 1300px);
    margin-inline: auto;
    padding: 72px 0 58px;
}

.tourbi-site-footer__brand {
    display: grid;
    align-content: start;
    gap: 19px;
}

.tourbi-site-logo--footer {
    width: fit-content;
}

.tourbi-site-footer__brand p {
    max-width: 440px;
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
}

.tourbi-site-footer__email {
    color: var(--tourbi-chrome-orange) !important;
    font-weight: 750;
    text-decoration: none;
}

.tourbi-site-footer__column {
    display: grid;
    align-content: start;
    gap: 12px;
}

.tourbi-site-footer__column h2 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.tourbi-site-footer__column a {
    width: fit-content;
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 14px;
    text-decoration: none;
}

.tourbi-site-footer__column a:hover {
    color: var(--tourbi-chrome-orange) !important;
}

.tourbi-site-footer__bottom {
    display: flex;
    justify-content: space-between;
    gap: 25px;
    width: min(100% - 40px, 1300px);
    margin-inline: auto;
    padding: 21px 0 26px;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.tourbi-site-footer__bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
}

@media (max-width: 1040px) {
    .tourbi-site-header__inner {
        gap: 18px;
    }

    .tourbi-site-navigation {
        gap: 18px;
    }

    .tourbi-site-navigation ul {
        gap: 17px;
    }

    .tourbi-site-navigation ul a {
        font-size: 11px;
    }

    .tourbi-site-footer__main {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tourbi-site-footer__brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 820px) {
    .tourbi-site-header__inner {
        min-height: 70px;
    }

    .tourbi-site-nav-toggle {
        display: block;
    }

    .tourbi-site-navigation {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 10002;
        display: flex;
        align-items: stretch;
        width: min(88vw, 390px);
        padding: 100px 24px 30px;
        overflow-y: auto;
        flex-direction: column;
        background: var(--tourbi-chrome-navy);
        box-shadow: -18px 0 50px rgba(0, 0, 0, 0.28);
        transform: translateX(105%);
        transition: transform 220ms ease;
    }

    .tourbi-site-navigation.is-open {
        transform: translateX(0);
    }

    /* Keep every mobile navigation item above decorative/overlay layers. */
    .tourbi-site-navigation,
    .tourbi-site-navigation ul,
    .tourbi-site-navigation li,
    .tourbi-site-navigation a {
        pointer-events: auto !important;
    }

    .tourbi-site-navigation a {
        position: relative;
        z-index: 2;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(255, 101, 61, 0.28);
    }

    .tourbi-site-navigation ul {
        align-items: stretch;
        flex-direction: column;
        gap: 2px;
    }

    .tourbi-site-navigation ul a {
        min-height: 52px;
        padding: 8px 4px;
        font-size: 14px;
    }

    .tourbi-site-navigation ul a::after {
        transform-origin: left;
    }

    .tourbi-site-header__rent {
        margin-top: 16px;
    }

    .tourbi-site-nav-toggle.is-open {
        position: fixed;
        top: 16px;
        right: 18px;
        z-index: 10003;
    }

    .admin-bar .tourbi-site-nav-toggle.is-open {
        top: 48px;
    }

    .tourbi-site-nav-toggle.is-open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .tourbi-site-nav-toggle.is-open span:nth-child(2) {
        opacity: 0;
    }

    .tourbi-site-nav-toggle.is-open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /*
     * The backdrop is a sibling of the header. A child z-index cannot escape
     * the header's stacking context, so the backdrop must stay below the
     * whole header while the drawer is open. Otherwise it visually allows the
     * menu to show but intercepts every tap before it reaches the links.
     */
    body.tourbi-site-nav-open .tourbi-site-header {
        z-index: 10020;
    }

    .tourbi-site-nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 10010;
        display: block;
        pointer-events: auto;
        background: rgba(0, 0, 0, 0.55);
    }

    body.tourbi-site-nav-open {
        overflow: hidden;
    }
}

@media (max-width: 680px) {
    .tourbi-site-logo__image {
        max-width: 145px;
        max-height: 44px;
    }

    .tourbi-site-footer__main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 35px 24px;
        padding-top: 55px;
    }

    .tourbi-site-footer__brand {
        grid-column: 1 / -1;
    }

    .tourbi-site-footer__bottom {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 460px) {
    .tourbi-site-footer__main {
        grid-template-columns: 1fr;
    }

    .tourbi-site-footer__brand {
        grid-column: auto;
    }
}

@media (max-width: 782px) {
    .admin-bar .tourbi-site-header.is-sticky {
        top: 46px;
    }
}


/* Step 68G.1 — reference-style header alignment. */
.tourbi-site-header__inner {
    min-height: 82px;
}

.tourbi-site-logo {
    position: relative;
    z-index: 10005;
    flex: 0 0 auto;
    min-width: 168px;
    pointer-events: auto;
}

.tourbi-site-logo__image {
    width: auto;
    max-width: 176px;
    max-height: 54px;
}

.tourbi-site-navigation {
    margin-left: auto;
}

.tourbi-site-navigation ul {
    gap: clamp(18px, 2.1vw, 34px);
}

.tourbi-site-navigation ul a {
    font-size: 13px;
    letter-spacing: 0.035em;
}

.tourbi-site-header__rent {
    min-height: 50px;
    padding-inline: 23px;
    color: #111 !important;
    background: #ff653d;
}

@media (max-width: 820px) {
    .tourbi-site-logo {
        min-width: 140px;
    }

    .tourbi-site-logo__image {
        max-width: 150px;
        max-height: 46px;
    }
}


/* Step 68G.2 — optional custom header/footer on Elementor homepage. */
body.tourbi-elementor-homepage.tourbi-custom-site-chrome
.elementor-location-header,
body.tourbi-elementor-homepage.tourbi-custom-site-chrome
.elementor-location-footer {
    display: none !important;
}

body.tourbi-elementor-homepage.tourbi-custom-site-chrome
.tourbi-site-header,
body.tourbi-elementor-homepage.tourbi-custom-site-chrome
.tourbi-site-footer {
    display: block !important;
}


/* =========================================================
 * Step 68G.3 — one consistent header/footer on the homepage
 * ======================================================= */

/*
 * Elementor Theme Builder may be excluded from the entire site. In that case
 * Hello Elementor falls back to its native header/footer. The rules below
 * suppress that fallback whenever the Tourbi site chrome is active.
 */
body.home.tourbi-custom-site-chrome #site-header,
body.home.tourbi-custom-site-chrome header#site-header,
body.home.tourbi-custom-site-chrome .site-header:not(.tourbi-site-header),
body.home.tourbi-custom-site-chrome #site-footer,
body.home.tourbi-custom-site-chrome footer#site-footer,
body.home.tourbi-custom-site-chrome .site-footer:not(.tourbi-site-footer),
body.home.tourbi-custom-site-chrome .elementor-location-header,
body.home.tourbi-custom-site-chrome .elementor-location-footer,
body.tourbi-elementor-homepage.tourbi-custom-site-chrome #site-header,
body.tourbi-elementor-homepage.tourbi-custom-site-chrome #site-footer {
    display: none !important;
}

/* Keep the custom Tourbi chrome visible. */
body.home.tourbi-custom-site-chrome .tourbi-site-header,
body.home.tourbi-custom-site-chrome .tourbi-site-footer,
body.tourbi-elementor-homepage.tourbi-custom-site-chrome .tourbi-site-header,
body.tourbi-elementor-homepage.tourbi-custom-site-chrome .tourbi-site-footer {
    display: block !important;
}

/* Remove native Hello header spacing when its header is suppressed. */
body.home.tourbi-custom-site-chrome #page,
body.tourbi-elementor-homepage.tourbi-custom-site-chrome #page {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
