/* ── Blog Category Page ────────────────────────────────── */

.bs-bc {
    max-width: 100%;
}

/* ── Native ad bar (Sevio block 12) — replaces the old category quick-links bar ── */

.bs-bc-adbar {
    margin: -20px -20px 16px;
    padding: 2px 12px;
    background: #f7f7f7;
    border-bottom: 1px solid #eaeaea;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    box-sizing: border-box;
    /* Reserve the Sevio native-ad height so a client-side fill can't push the
       page down (CLS). Zone 887a54b8 renders ~80px mobile / ~57px desktop
       (matches .bs-dt-native-ad). Fixed height + overflow:hidden locks the slot
       so a fill that exceeds it is clipped instead of growing the bar — same
       approach as the #bs-leaderboard-zone reserve. */
    height: 85px;          /* 80px native + 4px padding + 1px border */
    overflow: hidden;
}
@media (min-width: 769px) {
    .bs-bc-adbar { height: 62px; }   /* 57px native + 4px padding + 1px border */
}
.bs-bc-adbar .sevioads,
.bs-bc-adbar > * {
    max-width: 100%;
}
html.bs-dark .bs-bc-adbar {
    background: #181830;
    border-bottom-color: #2a2a44;
}

/* ── Category Quick Links Bar (legacy, no longer rendered) ─────── */

.bs-bc-catbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: -20px -20px 16px;
    padding: 0 12px;
    background: #f7f7f7;
    border-bottom: 1px solid #eaeaea;
    border-radius: 10px 10px 0 0;
}

.bs-bc-catbar__item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 9px 10px;
    font-size: 13px;
    font-weight: 400;
    color: #555;
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
}

.bs-bc-catbar__item:hover {
    color: #1DB0E1;
    border-bottom-color: #1DB0E1;
}

.bs-bc-catbar__item--active {
    color: #111;
    border-bottom-color: #111;
    font-weight: 500;
}

.bs-bc-catbar__item--active:hover {
    color: #111;
    border-bottom-color: #111;
}

.bs-bc-catbar__icon {
    display: inline-flex;
    align-items: center;
    color: inherit;
}

.bs-bc-catbar__icon svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    color: inherit;
}

.bs-bc-catbar__icon svg path,
.bs-bc-catbar__icon svg line,
.bs-bc-catbar__icon svg polyline,
.bs-bc-catbar__icon svg rect,
.bs-bc-catbar__icon svg circle {
    stroke: inherit;
}

html.bs-dark .bs-bc-catbar {
    background: #1a1a1a;
    border-bottom-color: #2a2a2a;
}

html.bs-dark .bs-bc-catbar__item {
    color: #aaa;
}

html.bs-dark .bs-bc-catbar__item:hover {
    color: #1DB0E1;
    border-bottom-color: #1DB0E1;
}

html.bs-dark .bs-bc-catbar__item--active {
    color: #eee;
    border-bottom-color: #eee;
}

html.bs-dark .bs-bc-catbar__item--active:hover {
    color: #eee;
    border-bottom-color: #eee;
}

/* Hero */
.bs-bc-hero {
    margin-bottom: 12px;
}

.bs-bc-title {
    font-size: 28px;
    font-weight: 700;
    color: #000;
    margin: 0 0 8px;
    line-height: 1.25;
}

.bs-bc-subtitle {
    font-size: 15px;
    color: #555;
    margin: 0;
    max-width: 720px;
    line-height: 1.55;
}

/* Category link in meta row */
.bs-bc-catlink {
    color: #206389;
    text-decoration: none;
    transition: color 0.15s ease;
}

.bs-bc-catlink:hover {
    color: #1DB0E1;
}


/* ── Highlights (3 featured posts) ────────────────────── */

.bs-bc-highlights {
    display: flex;
    gap: 16px;
    margin-bottom: 0;
}

.bs-bc-hl--main {
    flex: 3;
    min-width: 0;
}

.bs-bc-hl-side {
    flex: 1.5;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.bs-bc-hl--side {
    flex: 1;
}

.bs-bc-hl__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.bs-bc-hl__link:hover .bs-bc-hl__title {
    color: #1DB0E1;
}

.bs-bc-hl__img {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.bs-bc-hl__img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bs-bc-hl--main .bs-bc-hl__img {
    aspect-ratio: 16/9;
}

.bs-bc-hl--side .bs-bc-hl__img img {
    position: static;
    height: auto;
    object-fit: initial;
}

.bs-bc-hl__body {
    padding: 4px 0 0;
}

.bs-bc-hl__title {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    margin: 2px 0 4px;
    line-height: 1.35;
    transition: color 0.15s ease;
}

.bs-bc-hl--side .bs-bc-hl__title {
    font-size: 15px;
    margin: 2px 0 2px;
}

.bs-bc-hl__intro {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin: 0;
    max-height: 4.8em;
    overflow: hidden;
    position: relative;
}

.bs-bc-hl__intro::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2em;
    background: linear-gradient(transparent, white);
    pointer-events: none;
}

html.bs-dark .bs-bc-hl__intro {
    color: #aaa;
}

html.bs-dark .bs-bc-hl__intro::before {
    background: linear-gradient(transparent, #121212);
}

.bs-bc-hl__excerpt {
    font-size: 14px;
    color: #555;
    margin: 0 0 2px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bs-bc-hl__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 0;
    font-size: 13px;
    line-height: 1.4;
    color: #888;
    margin-top: 4px;
}

.bs-bc-hl__meta > span + span::before,
.bs-bc-hl__meta > span + a::before,
.bs-bc-hl__meta > a + span::before,
.bs-bc-hl__meta > a + a::before {
    content: "\00b7";
    margin: 0 6px;
    color: #aaa;
}

/* ── Native Ad Banner ─────────────────────────────────── */

.bs-bc-ad-banner {
    padding: 8px 0 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 0;
    font-size: 14px;
    line-height: 1.5;
}

.bs-bc-ad-banner a {
    color: #206389;
    font-weight: 600;
}

.bs-bc-ad-banner:empty {
    display: none;
}

/* ── Post List ────────────────────────────────────────── */

.bs-bc-posts {
    display: flex;
    flex-direction: column;
}

.bs-bc-post {
    border-bottom: 1px solid #eee;
}

.bs-bc-post:last-child {
    border-bottom: none;
}

.bs-bc-post__link {
    display: flex;
    gap: 16px;
    padding: 8px 0 0;
    text-decoration: none;
    color: inherit;
}

.bs-bc-post__link:hover .bs-bc-post__title {
    color: #1DB0E1;
}

.bs-bc-post__img {
    width: 200px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.bs-bc-post__img img {
    width: 100%;
    height: 134px;
    object-fit: cover;
    display: block;
}

.bs-bc-post__placeholder {
    width: 100%;
    height: 134px;
    background: #f0f0f0;
    border-radius: 8px;
}

.bs-bc-post__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


.bs-bc-post__title {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    margin: 0 0 2px;
    line-height: 1.35;
    transition: color 0.15s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bs-bc-post__excerpt {
    font-size: 13px;
    color: #555;
    margin: 0 0 2px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bs-bc-post__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 0;
    padding: 4px 0 8px;
    margin-left: 216px;
    font-size: 13px;
    line-height: 1.4;
    color: #888;
}

.bs-bc-post__meta > :nth-child(n+2)::before {
    content: "\00b7";
    margin: 0 6px;
    color: #aaa;
}


/* ── Pagination ───────────────────────────────────────── */

.bs-bc-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 24px 0 8px;
}

.bs-bc-pagination a,
.bs-bc-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.bs-bc-pagination a.page-numbers {
    color: #333;
    background: #f5f5f5;
}

.bs-bc-pagination a.page-numbers:hover {
    background: #e0e0e0;
    color: #000;
}

.bs-bc-pagination span.page-numbers.current {
    background: #1DB0E1;
    color: #fff;
}

.bs-bc-pagination span.page-numbers.dots {
    background: none;
    color: #888;
}

.bs-bc-pagination a.prev,
.bs-bc-pagination a.next {
    font-weight: 600;
}

/* ── Category Description Widget ──────────────────────── */

.bs-catdesc {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

.bs-catdesc p {
    margin: 0 0 12px;
}

.bs-catdesc p:last-child {
    margin-bottom: 0;
}

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

@media (max-width: 768px) {
    .bs-bc-title {
        font-size: 24px;
    }

    .bs-bc-highlights {
        flex-direction: column;
    }

    .bs-bc-hl--main .bs-bc-hl__img {
        aspect-ratio: 16/9;
    }

    .bs-bc-hl-side {
        flex-direction: column;
    }

    .bs-bc-hl--side .bs-bc-hl__img img {
        position: static;
        height: auto;
    }

    .bs-bc-hl--side .bs-bc-hl__title {
        font-size: 14px;
    }

    .bs-bc-post__link {
        flex-direction: column;
        gap: 10px;
    }

    .bs-bc-post__meta {
        margin-left: 0;
    }

    .bs-bc-post__img {
        width: 100%;
    }

    .bs-bc-post__img img {
        height: 180px;
    }

    .bs-bc-post__placeholder {
        height: 180px;
    }
}

/* ── In-page Blog Search ──────────────────────────────── */

.bs-bc-search {
    margin: 12px 0 4px;
}

.bs-bc-search__field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 380px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid #dcdce4;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.bs-bc-search__field:focus-within {
    border-color: #1DB0E1;
    box-shadow: 0 0 0 3px rgba(29, 176, 225, 0.15);
}

.bs-bc-search__icon {
    flex-shrink: 0;
    color: #8a8a9a;
}

/* Scoped past .bs-bc-search to beat the former parent theme reset.css
   input[type=search] rule (border/padding/width/transition:all). */
.bs-bc-search .bs-bc-search__input {
    flex: 1;
    min-width: 0;
    width: auto;
    margin: 0;
    border: none;
    border-radius: 0;
    outline: none;
    box-shadow: none;
    background: transparent;
    padding: 12px 0;
    font-size: 16px;
    line-height: 1.4;
    color: #1a1a2e;
    font-family: inherit;
    transition: none;
    -webkit-appearance: none;
    appearance: none;
}

.bs-bc-search .bs-bc-search__input:focus {
    border: none;
    box-shadow: none;
    outline: none;
}

.bs-bc-search .bs-bc-search__input::placeholder {
    color: #9a9aa8;
}

.bs-bc-search__input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.bs-bc-search__clear {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #f0f0f4;
    color: #6a6a80;
    cursor: pointer;
    line-height: 0;
}

.bs-bc-search__clear:hover {
    background: #e4e4ec;
    color: #1a1a2e;
}

.bs-bc-search__clear[hidden] {
    display: none;
}

/* Indeterminate progress bar under the field while a query is in flight */
.bs-bc-search.is-loading .bs-bc-search__field {
    overflow: hidden;
}

.bs-bc-search.is-loading .bs-bc-search__field::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 40%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #1DB0E1, transparent);
    animation: bs-bc-search-bar 0.9s linear infinite;
}

@keyframes bs-bc-search-bar {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

.bs-bc-search.is-loading + .bs-bc-results {
    opacity: 0.55;
}

.bs-bc-search-header {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    padding: 12px 0 6px;
}

.bs-bc-search-header[hidden] {
    display: none;
}

.bs-bc-search-empty {
    padding: 28px 4px;
    font-size: 15px;
    color: #777;
    text-align: center;
}

@media (max-width: 768px) {
    .bs-bc-search__field {
        max-width: none;
    }

    .bs-bc-search .bs-bc-search__input {
        padding: 13px 0;
    }
}
