/* ── Headline block ───────────────────────────────────────────────────────── */

.hl-block {
    padding-bottom: 40px;
    overflow: hidden;
    background-color: #0d0020;
    background-image: url('../../assets/images/headline-bg.svg');
    background-repeat: no-repeat;
    background-size: cover;;
    background-position: center top;
}

/* ── Breadcrumb ───────────────────────────────────────────────────────────── */

.hl-breadcrumb {
    padding-top: 16px;
    padding-bottom: 8px;
}

.hl-bc-text {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 300;
    line-height: 16px;
    color: rgba(255, 255, 255, 0.75);
}

.hl-bc-text a,
.hl-bc-text span {
    font-size: 12px;
    font-weight: 300;
    line-height: 16px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}

.hl-bc-text a:hover {
    color: var(--wp--preset--color--white);
    text-decoration: underline;
}

/* Home crumb */
.hl-bc-home {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}

.hl-bc-home:hover {
    color: var(--wp--preset--color--white);
}

.hl-bc-home-icon {
    flex-shrink: 0;
    vertical-align: middle;
}

/* Desktop: show label text, hide icon */
@media (min-width: 768px) {
    .hl-bc-home-icon {
        display: none;
    }
}

/* Separator: white-space:pre preserves the leading space before "/" in flex context */
/* .hl-bc-sep { white-space: pre; } */

/* Current (last) crumb is brighter */
.hl-bc-dyn .hl-bc-item--dyn:last-child {
    color: var(--wp--preset--color--white);
    font-weight: 400;
}

.hl-bc-text:not(:has(.hl-bc-dyn .hl-bc-item--dyn)) .hl-bc-item--page {
    color: var(--wp--preset--color--white);
    font-weight: 400;
}

/* Yoast/RankMath output override (legacy) */
.hl-breadcrumb .breadcrumb_last,
.hl-breadcrumb .rank-math-breadcrumb span:last-child {
    color: var(--wp--preset--color--white);
}

/* Ellipsis button: hidden by default, JS adds .is-collapsed to show it */
.hl-bc-ellipsis {
    display: none;
    background: none;
    border: none;
    padding: 0;
    font-size: 12px;
    font-weight: 300;
    line-height: 16px;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    font-family: inherit;
}

.hl-bc-ellipsis:hover {
    color: var(--wp--preset--color--white);
}

/* ── Mobile breadcrumb ────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .hl-breadcrumb .container {
        overflow-x: auto;
        scrollbar-width: none;
    }

    .hl-breadcrumb .container::-webkit-scrollbar {
        display: none;
    }

    .hl-bc-text {
        flex-wrap: nowrap;
        white-space: nowrap;
        width: 100%;
    }

    /* Show icon only for home crumb — visually hide label text */
    .hl-bc-home-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    /* ── Collapsed state (JS detects overflow → adds .is-collapsed) ── */
    .hl-bc-text.is-collapsed .hl-bc-item--mid {
        display: none;
    }

    .hl-bc-text.is-collapsed .hl-bc-item--page {
        display: none;
    }

    .hl-bc-text.is-collapsed .hl-bc-dyn .hl-bc-item--dyn:not(:last-child) {
        display: none;
    }

    .hl-bc-text.is-collapsed .hl-bc-ellipsis {
        display: inline;
    }
}

/* ── Inner wrapper (flex row when sidebar present) ────────────────────────── */

.hl-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 48px;
    padding-top: 24px;
    padding-bottom: 8px;
}

/* ── Content ──────────────────────────────────────────────────────────────── */

.hl-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 640px;
    flex: 1 1 auto;
    min-width: 0;
}

/* ── Category sidebar (right column) ─────────────────────────────────────── */

.hl-cat-sidebar {
    flex-shrink: 0;
    width: 443px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 8px;
}

/* Explicit override: [hidden] must win over display: flex */
.hl-cat-sidebar[hidden] {
    display: none;
}

.hl-cat-label-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--wp--preset--color--white);
}

.hl-cat-label {
    margin: 0;
    font-size: 12px;
    font-weight: 400;
    line-height: 1;
    color: var(--wp--preset--color--white);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hl-cat-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hl-cat-tile {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--wp--preset--color--neutral-300);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: var(--wp--preset--color--white);
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}

.hl-cat-tile:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    color: var(--wp--preset--color--white);
}

.hl-cat-tile--active {
    background: rgba(255, 255, 255, 0.25);
    border-color: var(--wp--preset--color--white);
}

.hl-cat-tile-x {
    flex-shrink: 0;
    opacity: 0.8;
}

/* ── Label row (icon + headline) ─────────────────────────────────────────── */

.hl-label-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hl-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    color: var(--wp--preset--color--white);
    opacity: 0.9;
}

.hl-icon svg {
    width: 20px;
    height: 20px;
}

.hl-label {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: var(--wp--preset--color--white);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ── Title ────────────────────────────────────────────────────────────────── */

.hl-title {
    margin: 0;
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
    color: var(--wp--preset--color--white);
}

/* ── Description ──────────────────────────────────────────────────────────── */

.hl-desc {
    margin: 0;
    font-size: 16px;
    font-weight: 300;
    line-height: 24px;
    color: rgba(255, 255, 255, 0.9);
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.hl-buttons {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.hl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 32px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s, background 0.2s;
    white-space: nowrap;
}

/* Primary: żółty */
.hl-btn--primary {
    background: var(--wp--preset--color--yellow);
    border: 1px solid var(--wp--preset--color--dark);
    color: var(--wp--preset--color--dark);
}

.hl-btn--primary:hover {
    background: #f0d800;
    color: var(--wp--preset--color--dark);
}

/* Secondary: biały obramowanie */
.hl-btn--secondary {
    background: transparent;
    border: 1px solid var(--wp--preset--color--white);
    color: var(--wp--preset--color--white);
}

.hl-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--wp--preset--color--white);
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 1199px) {
    .hl-cat-sidebar {
        width: 360px;
    }
}

@media (max-width: 991px) {
    .hl-title {
        font-size: 32px;
    }

    .hl-inner {
        flex-direction: column;
        gap: 32px;
    }

    .hl-content {
        max-width: 100%;
    }

    .hl-cat-sidebar {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .hl-title {
        font-size: 28px;
    }

    .hl-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .hl-btn {
        justify-content: center;
        text-align: center;
    }
}