@import url("site-full-menu.css?v=20260720");

/* מרווחי שכבת כרום עליונה — מותג שמאל, Back + אחים ימין */
:root {
    --site-chrome-top: max(12px, env(safe-area-inset-top, 0px));
    --site-brand-row-h: 46px;
    --site-back-gap: 8px;
}

/**
 * כפתור INDEX — תמונת מפת הניווט + טקסט INDEX באנגלית
 * רק מסכים רחבים (לא נייד).
 */
@media (min-width: 901px) {
    a.site-home {
        position: fixed;
        bottom: 18px;
        right: 18px;
        z-index: 50000;
        width: 62px;
        height: 62px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        border: 3px solid rgba(255, 255, 255, 0.35);
        box-sizing: border-box;
        overflow: hidden;
        font-size: 0 !important;
        line-height: 0 !important;
        letter-spacing: 0 !important;
        color: transparent !important;
        text-indent: 0;
        background-color: #1a1a1a;
        background-image: linear-gradient(
                rgba(0, 0, 0, 0.42),
                rgba(0, 0, 0, 0.52)
            ),
            url("images/ui/index-nav-hub.png");
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        border-color: rgba(255, 255, 255, 0.5) !important;
        box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.45), 0 4px 16px rgba(0, 0, 0, 0.4);
        transition: filter 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    }

    a.site-home:hover {
        filter: brightness(1.12);
        border-color: rgba(255, 255, 255, 0.72) !important;
        background-color: #2a2a2a;
        background-image: linear-gradient(
                rgba(0, 0, 0, 0.35),
                rgba(0, 0, 0, 0.45)
            ),
            url("images/ui/index-nav-hub.png") !important;
        background-size: cover;
        background-position: center;
    }

    /* טקסט באנגלית מעל התמונה */
    a.site-home::after {
        content: "INDEX";
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 11px !important;
        font-weight: 800;
        line-height: 1 !important;
        letter-spacing: 0.06em !important;
        color: #fff !important;
        text-indent: 0;
        text-transform: uppercase;
        text-shadow: 0 0 10px rgba(0, 0, 0, 0.95), 0 1px 3px #000;
        pointer-events: none;
    }

    body.page-press header.press-page-header a.site-home {
        background-image: linear-gradient(
                rgba(0, 0, 0, 0.42),
                rgba(0, 0, 0, 0.52)
            ),
            url("images/ui/index-nav-hub.png");
    }
}

/* תפריט מלא — ביטול כל כפתורי Back (כולל «Back to Exhibitions») */
a.back-link.site-back,
a.site-back.back-link {
    display: none !important;
}

.page-back-wrap:empty,
.page-back-wrap {
    display: none !important;
}

/* כפתור «← Back to…» — עיצוב אחיד (גלולה כהה כמו MENU) */
.mobile-smart-back-bar a.mobile-smart-back-hub {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    max-width: min(100%, 280px);
    padding: 8px 13px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.52);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #f0f0f0;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.mobile-smart-back-bar a.mobile-smart-back-hub:hover,
.mobile-smart-back-bar a.mobile-smart-back-hub:focus-visible {
    background: rgba(28, 28, 28, 0.88);
    border-color: rgba(255, 255, 255, 0.48);
    color: #fff;
    outline: none;
}
.mobile-smart-back-bar a.article-lang-en {
    pointer-events: auto;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(200, 220, 255, 0.95);
    text-decoration: none;
    border: 1px solid rgba(158, 184, 224, 0.4);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    white-space: nowrap;
    transition: border-color 0.2s ease, color 0.2s ease;
}
.mobile-smart-back-bar a.article-lang-en:hover,
.mobile-smart-back-bar a.article-lang-en:focus-visible {
    color: #fff;
    border-color: rgba(200, 220, 255, 0.75);
    outline: none;
}

/* דסקטופ: שורת Back חכמה (site-full-menu.js) — פינה ימין עליונה, לא על INDEX */
@media (min-width: 1101px) {
    .mobile-smart-back-bar {
        position: fixed;
        top: max(14px, var(--site-chrome-top));
        right: max(18px, env(safe-area-inset-right, 0px));
        left: auto;
        z-index: 50001;
        margin: 0;
        padding: 0;
        max-width: min(46vw, 280px);
        box-sizing: border-box;
        text-align: right;
        pointer-events: none;
        display: flex;
        flex-direction: row-reverse;
        flex-wrap: wrap;
        justify-content: flex-end;
        align-items: flex-end;
        gap: 10px;
    }
    .mobile-smart-back-bar.has-theme-siblings {
        flex-direction: column;
        align-items: flex-end;
        gap: 8px;
        max-width: min(46vw, 320px);
    }
    .mobile-smart-back-bar__top {
        display: flex;
        flex-direction: row-reverse;
        flex-wrap: wrap;
        justify-content: flex-end;
        align-items: center;
        gap: 10px;
        pointer-events: none;
        max-width: 100%;
    }
    .mobile-smart-back-bar__top a {
        pointer-events: auto;
    }
    .theme-sibling-nav {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 5px;
        width: 100%;
        max-width: 100%;
        pointer-events: none;
    }
    .theme-sibling-link {
        pointer-events: auto;
        display: block;
        max-width: 100%;
        font-size: 12px;
        font-weight: 500;
        line-height: 1.35;
        letter-spacing: 0.03em;
        text-align: right;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    a.theme-sibling-link {
        color: rgba(210, 210, 210, 0.92);
        text-decoration: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.18);
        padding-bottom: 1px;
        transition: color 0.2s ease, border-color 0.2s ease;
    }
    a.theme-sibling-link:hover {
        color: #fff;
        border-bottom-color: rgba(255, 255, 255, 0.42);
    }
    .theme-sibling-link.is-current {
        color: #fff;
        font-weight: 700;
        border-bottom: none;
        padding-bottom: 0;
    }
    body.mobile-smart-back-on .content > a.back-link.site-back,
    body.mobile-smart-back-on .content > a.back-link.site-back:hover {
        display: none !important;
    }
    body.has-theme-nav-chrome.mobile-smart-back-on {
        padding-top: calc(env(safe-area-inset-top, 0px) + 4.25rem) !important;
    }
    body.has-theme-nav-chrome.mobile-smart-back-on .content > a.back-link {
        display: none !important;
    }
}

/* Press ↔ Curators — קישור ב-HTML (עובד גם כש-JS ישן במטמון); מוסתר אחרי שה-JS החדש הוסיף את השורה */
body.page-press .outer-voice-fallback-nav,
body.page-curatorial .outer-voice-fallback-nav {
    position: fixed;
    top: 52px;
    right: 18px;
    z-index: 50002;
    margin: 0;
    padding: 0;
    max-width: min(46vw, 280px);
    text-align: right;
    pointer-events: none;
}
body.page-press .outer-voice-fallback-nav__link,
body.page-curatorial .outer-voice-fallback-nav__link {
    pointer-events: auto;
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: rgba(210, 210, 210, 0.95);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
    padding-bottom: 1px;
    white-space: nowrap;
}
body.page-press .outer-voice-fallback-nav__link:hover,
body.page-curatorial .outer-voice-fallback-nav__link:hover {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.42);
}
body.page-press:has(.mobile-smart-back-bar.has-theme-siblings) .outer-voice-fallback-nav,
body.page-curatorial:has(.mobile-smart-back-bar.has-theme-siblings) .outer-voice-fallback-nav {
    display: none !important;
}
@media (max-width: 1100px) {
    body.page-press .outer-voice-fallback-nav,
    body.page-curatorial .outer-voice-fallback-nav {
        top: calc(var(--site-chrome-top) + var(--site-brand-row-h) + var(--site-back-gap) + 2.5rem);
        right: max(12px, env(safe-area-inset-right, 0px));
    }
}

/* נייד/טאבלט: Back + אחים בפינה ימין — מתחת לשורת ORA+MENU (בלי חפיפה) */
@media (max-width: 1100px) {
    .mobile-smart-back-bar {
        position: fixed;
        top: calc(var(--site-chrome-top) + var(--site-brand-row-h) + var(--site-back-gap));
        right: max(12px, env(safe-area-inset-right, 0px));
        left: auto;
        z-index: 10045;
        margin: 0;
        padding: 0;
        max-width: min(calc(100vw - 24px), 300px);
        box-sizing: border-box;
        pointer-events: none;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 6px;
    }
    .mobile-smart-back-bar__top {
        display: flex;
        flex-direction: row-reverse;
        flex-wrap: wrap;
        justify-content: flex-end;
        align-items: center;
        gap: 8px;
        max-width: 100%;
        pointer-events: none;
    }
    .mobile-smart-back-bar__top > * {
        pointer-events: auto;
    }
    .mobile-smart-back-bar.has-theme-siblings {
        max-width: min(calc(100vw - 24px), 320px);
    }
    .theme-sibling-nav {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
        width: 100%;
        max-height: min(38vh, 220px);
        overflow-y: auto;
        overflow-x: hidden;
        pointer-events: none;
        padding: 2px 0 4px;
        -webkit-overflow-scrolling: touch;
    }
    .theme-sibling-nav a.theme-sibling-link {
        pointer-events: auto;
    }
    body.mobile-smart-back-on:not(.page-mobile-home):not(.page-mobile-menu) {
        padding-top: calc(
            var(--site-chrome-top) + var(--site-brand-row-h) + var(--site-back-gap) + 2.75rem
        ) !important;
    }
    body.mobile-smart-back-on:has(.mobile-smart-back-bar.has-theme-siblings):not(.page-mobile-home):not(
            .page-mobile-menu
        ) {
        padding-top: calc(
            var(--site-chrome-top) + var(--site-brand-row-h) + var(--site-back-gap) + 6.5rem
        ) !important;
    }
    body.page-curatorial.mobile-smart-back-on .mobile-smart-back-bar,
    body.page-press.mobile-smart-back-on .mobile-smart-back-bar,
    body.has-theme-nav-chrome.mobile-smart-back-on .mobile-smart-back-bar {
        top: calc(var(--site-chrome-top) + var(--site-brand-row-h) + var(--site-back-gap));
        right: max(12px, env(safe-area-inset-right, 0px));
        left: auto;
        max-width: min(calc(100vw - 24px), 320px);
        flex-direction: column;
        align-items: flex-end;
        gap: 8px;
    }
    body.page-curatorial.mobile-smart-back-on .mobile-smart-back-bar.has-theme-siblings,
    body.page-press.mobile-smart-back-on .mobile-smart-back-bar.has-theme-siblings {
        flex-direction: column;
        align-items: flex-end;
        gap: 8px;
    }
    body.page-curatorial.mobile-smart-back-on .theme-sibling-nav,
    body.page-press.mobile-smart-back-on .theme-sibling-nav {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
        width: 100%;
    }
    body.page-curatorial.mobile-smart-back-on a.theme-sibling-link,
    body.page-press.mobile-smart-back-on a.theme-sibling-link {
        font-size: 11px;
        color: rgba(210, 210, 210, 0.95);
        text-decoration: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.22);
        padding-bottom: 1px;
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    body.page-curatorial.mobile-smart-back-on .mobile-smart-back-bar__top,
    body.page-press.mobile-smart-back-on .mobile-smart-back-bar__top,
    body.has-theme-nav-chrome.mobile-smart-back-on .mobile-smart-back-bar__top {
        flex-direction: row-reverse;
        flex-wrap: wrap;
        justify-content: flex-end;
        align-items: center;
        gap: 8px;
        max-width: 100%;
    }
    body.has-theme-nav-chrome.mobile-smart-back-on a.theme-sibling-link {
        font-size: 11px;
        color: rgba(210, 210, 210, 0.95);
        text-decoration: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.22);
        padding-bottom: 1px;
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    body.has-theme-nav-chrome.mobile-smart-back-on .theme-sibling-link.is-current {
        color: #fff;
        font-weight: 700;
        border-bottom: none;
    }
    body.has-theme-nav-chrome.mobile-smart-back-on .content > a.back-link {
        display: none !important;
    }
}

/**
 * טקסטים במודאל / ?embed=1 — בלי INDEX ו-MENU צפים (חוסכים מקום).
 * המותג (.site-brand-stack) נשאר גלוי בתוך ה־iframe כדי שלא ייעלם ORA.
 */
html.gate-embed-shell a.site-home {
    display: none !important;
}

html.gate-embed-shell .site-full-menu-trigger {
    display: none !important;
}

html.gate-embed-shell #siteFullMenuBackdrop,
html.gate-embed-shell #siteFullMenuPanel {
    display: none !important;
}

html.gate-embed-shell body.site-full-menu-open {
    overflow: auto !important;
}

/* נייד: INDEX מוחלף ב־MENU בשורת המותג — כפתור הצף מוסתר */
@media (max-width: 1100px) {
    a.site-home {
        display: none !important;
    }
}

html.gate-embed-shell a.mobile-top-menu-btn {
    display: none !important;
}
