/* 3alTrack v2909 - Premium category header + mobile article spacing */

/* Premium category header in light mode only. News cards remain untouched. */
html[data-theme="light"] body.category-page .category-page-section > .section-title,
html[data-visual-theme="light"] body.category-page .category-page-section > .section-title {
    min-height: 178px !important;
    margin: 0 0 28px !important;
    padding: 32px 38px 30px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: flex-start !important;
    gap: 5px !important;
    text-align: right !important;
    position: relative !important;
    overflow: hidden !important;
    border: 1px solid rgba(15, 23, 42, .09) !important;
    border-top: 0 !important;
    border-radius: 0 0 30px 30px !important;
    background:
        radial-gradient(circle at 88% 16%, rgba(220, 38, 38, .10), transparent 30%),
        radial-gradient(circle at 8% 92%, rgba(37, 99, 235, .10), transparent 32%),
        linear-gradient(135deg, rgba(255,255,255,.99), rgba(245,248,253,.98)) !important;
    box-shadow: 0 22px 55px rgba(15, 23, 42, .09) !important;
}

html[data-theme="light"] body.category-page .category-page-section > .section-title::before,
html[data-visual-theme="light"] body.category-page .category-page-section > .section-title::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 5px !important;
    background: linear-gradient(180deg, #dc2626 0%, #ef4444 42%, #2563eb 100%) !important;
    pointer-events: none !important;
}

html[data-theme="light"] body.category-page .category-page-section > .section-title::after,
html[data-visual-theme="light"] body.category-page .category-page-section > .section-title::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(115deg, transparent 0 62%, rgba(255,255,255,.58) 100%) !important;
    pointer-events: none !important;
}

html[data-theme="light"] body.category-page .category-page-section > .section-title > *,
html[data-visual-theme="light"] body.category-page .category-page-section > .section-title > * {
    position: relative !important;
    z-index: 2 !important;
}

html[data-theme="light"] body.category-page #categoryPageLabel,
html[data-visual-theme="light"] body.category-page #categoryPageLabel {
    display: inline-flex !important;
    width: max-content !important;
    margin: 0 0 8px !important;
    padding: 7px 11px !important;
    border-radius: 999px !important;
    color: #b91c1c !important;
    background: #fff1f2 !important;
    border: 1px solid #ffe4e6 !important;
    font-size: 11px !important;
    line-height: 1 !important;
    font-weight: 950 !important;
    letter-spacing: 1.35px !important;
    box-shadow: none !important;
}

html[data-theme="light"] body.category-page #categoryPageTitle,
html[data-visual-theme="light"] body.category-page #categoryPageTitle {
    margin: 0 !important;
    color: #0b1220 !important;
    font-size: clamp(38px, 4vw, 58px) !important;
    line-height: 1.12 !important;
    font-weight: 950 !important;
    letter-spacing: -.035em !important;
    text-shadow: none !important;
}

html[data-theme="light"] body.category-page #categoryPageDesc,
html[data-visual-theme="light"] body.category-page #categoryPageDesc {
    display: block !important;
    margin: 8px 0 0 !important;
    max-width: 760px !important;
    color: #475569 !important;
    font-size: 16px !important;
    line-height: 1.8 !important;
    font-weight: 750 !important;
    letter-spacing: 0 !important;
}

/* Mobile: start article content immediately below the fixed 78px nav in both themes. */
@media (max-width: 760px) {
    body.article-pro-page main,
    html[data-theme="light"] body.article-pro-page main,
    html[data-visual-theme="light"] body.article-pro-page main {
        padding-top: 78px !important;
    }

    body.article-pro-page .article-pro-shell,
    body.article-pro-page .article-shell-v187 {
        margin-top: 0 !important;
    }

    body.article-pro-page .article-inline-tools,
    body.article-pro-page .article-inline-tools-v251 {
        margin-top: 0 !important;
        margin-bottom: 4px !important;
    }

    /* Light category header: compact and readable on phones, with no empty hero gap. */
    html[data-theme="light"] body.category-page .category-page-section > .section-title,
    html[data-visual-theme="light"] body.category-page .category-page-section > .section-title {
        width: calc(100% + 28px) !important;
        min-height: 0 !important;
        height: auto !important;
        margin: 0 -14px 18px !important;
        padding: 24px 22px 22px !important;
        border-radius: 0 0 24px 24px !important;
        justify-content: center !important;
        align-items: flex-start !important;
    }

    html[data-theme="light"] body.category-page #categoryPageTitle,
    html[data-visual-theme="light"] body.category-page #categoryPageTitle {
        font-size: clamp(30px, 9vw, 40px) !important;
        line-height: 1.16 !important;
    }

    html[data-theme="light"] body.category-page #categoryPageDesc,
    html[data-visual-theme="light"] body.category-page #categoryPageDesc {
        margin-top: 7px !important;
        font-size: 14px !important;
        line-height: 1.75 !important;
    }
}


