/* ─────────────────────────────────────────────────────────
   Breadcrumbs — Adastra-pattern sticky bar
   Light variant (default) + Dark variant (on dark-hero pages)
   On scroll-past-hero, dark variant reverts to light via .is-sticky
───────────────────────────────────────────────────────── */

.breadcrumb-bar {
    position: relative;
    padding: 12px 24px;
    border-bottom: 1px solid #e8e8ec;
    background: #ffffff;
    transition: background 0.3s ease, color 0.3s ease;
}

/* When body has class indicating sticky support (set by JS on scroll) */
body.bc-sticky-active .breadcrumb-bar {
    position: sticky;
    top: 0;
    z-index: 90;
}

.breadcrumb-bar__inner {
    /* 16.05.2026 — align breadcrumbs to the same content max-width as the rest
       of the page (1200px container) so they don't visually break out of
       layout. Was 1440px → bar text appeared offset to the left edge on PC. */
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
@media (max-width: 768px) {
    .breadcrumb-bar__inner {
        padding: 0 16px;
    }
}

.breadcrumb-bar__badge {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: 4px;
    line-height: 1.5;
    white-space: nowrap;
    flex-shrink: 0;
}

.breadcrumb-bar__badge--new {
    background: rgba(232, 120, 32, 0.12);
    color: #D98538;
    border: 1px solid rgba(232, 120, 32, 0.3);
}

.breadcrumb-bar__badge--sec {
    background: rgba(20, 52, 91, 0.06);
    color: #14345b;
    border: 1px solid rgba(20, 52, 91, 0.18);
}

.breadcrumb-bar--dark:not(.is-sticky) .breadcrumb-bar__badge--new {
    background: rgba(232, 120, 32, 0.18);
    color: #f5a623;
    border-color: rgba(245, 166, 35, 0.4);
}

.breadcrumb-bar--dark:not(.is-sticky) .breadcrumb-bar__badge--sec {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.18);
}

.breadcrumb-bar .breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    line-height: 1.6;
    letter-spacing: 0.01em;
}

.breadcrumb-bar .breadcrumbs li {
    color: #14345b;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}

.breadcrumb-bar .breadcrumbs li:not(:last-child) {
    color: rgba(20, 52, 91, 0.55);
}

.breadcrumb-bar .breadcrumbs li:not(:last-child)::after {
    content: "→";
    margin-left: 8px;
    font-size: 11px;
    color: rgba(232, 120, 32, 0.55);
}

.breadcrumb-bar .breadcrumbs a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

.breadcrumb-bar .breadcrumbs a:hover {
    color: #E8953A;
}

.breadcrumb-bar .breadcrumbs span[aria-current="page"] {
    color: #14345b;
    font-weight: 500;
}

.breadcrumb-bar.is-hidden {
    transform: translateY(-100%);
}

/* ─── DARK variant ─── applied on pages with dark hero ─── */

.breadcrumb-bar--dark:not(.is-sticky) {
    background: #0F1E35;
    border-bottom-color: rgba(232, 120, 32, 0.15);
}

.breadcrumb-bar--dark:not(.is-sticky) .breadcrumbs li {
    color: rgba(255, 255, 255, 0.75);
}

.breadcrumb-bar--dark:not(.is-sticky) .breadcrumbs li:not(:last-child) {
    color: rgba(255, 255, 255, 0.45);
}

.breadcrumb-bar--dark:not(.is-sticky) .breadcrumbs li:not(:last-child)::after {
    color: rgba(232, 120, 32, 0.5);
}

.breadcrumb-bar--dark:not(.is-sticky) .breadcrumbs a:hover {
    color: #f5a623;
}

.breadcrumb-bar--dark:not(.is-sticky) .breadcrumbs span[aria-current="page"] {
    color: #fff;
}

/* ─── Sticky state (scrolled past hero) ─── always light ─── */

.breadcrumb-bar.is-sticky {
    background: #FFFBF5;
    border-bottom-color: #e8e8ec;
}

.breadcrumb-bar.is-sticky .breadcrumbs li {
    color: #14345b;
}

.breadcrumb-bar.is-sticky .breadcrumbs li:not(:last-child) {
    color: rgba(20, 52, 91, 0.55);
}

@media (max-width: 768px) {
    .breadcrumb-bar {
        padding: 8px 16px;
    }
    .breadcrumb-bar__inner {
        gap: 12px;
    }
    .breadcrumb-bar .breadcrumbs {
        font-size: 12px;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 4px 8px;
    }
    .breadcrumb-bar .breadcrumbs::-webkit-scrollbar {
        display: none;
    }
    .breadcrumb-bar .breadcrumbs li {
        white-space: nowrap;
        flex-shrink: 0;
    }
    .breadcrumb-bar .breadcrumbs li:not(:last-child)::after {
        margin-left: 4px;
        font-size: 10px;
    }
    /* Smaller badge on mobile */
    .breadcrumb-bar__badge {
        font-size: 9px;
        padding: 3px 7px;
    }
    /* Long page titles — truncate with ellipsis (last item only, current page) */
    .breadcrumb-bar .breadcrumbs li:last-child {
        flex-shrink: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: calc(100vw - 140px);
    }
    .breadcrumb-bar .breadcrumbs li:last-child span {
        display: inline-block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        vertical-align: bottom;
    }
}

@media (max-width: 480px) {
    .breadcrumb-bar {
        padding: 6px 12px;
    }
    .breadcrumb-bar .breadcrumbs {
        font-size: 11px;
    }
}
