/* ==========================================================================
   拾光·专题合集  v1.0.0
   ========================================================================== */

.sgsr-page,
.sgsr-inpost {
    --sgsr-brand: #f97316;
    --sgsr-brand-deep: #ea580c;
    --sgsr-ink: #0f172a;
    --sgsr-muted: #64748b;
    --sgsr-line: #e9eef5;
    --sgsr-bg-soft: #f6f9fc;
}

/* 专题页不显示主题自带的归档头图 */
.sgsr-page .term-bar {
    display: none !important;
}

.sgsr-wrap {
    padding-top: 26px;
    padding-bottom: 56px;
}

/* ---------- 合集页 Hero ---------- */

.sgsr-hero {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    padding: 26px 30px;
    margin-bottom: 26px;
    background: linear-gradient(118deg, #0f172a 0%, #1e293b 52%, #111c33 100%);
    color: #fff;
}

.sgsr-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(circle at 82% 130%, #000, transparent 72%);
    mask-image: radial-gradient(circle at 82% 130%, #000, transparent 72%);
}

.sgsr-hero-glow {
    position: absolute;
    right: -70px;
    bottom: -170px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--sgsr-brand), transparent 66%);
    opacity: .55;
    filter: blur(8px);
}

.sgsr-hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 18px;
}

.sgsr-hero-icon {
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 21px;
    color: #fff;
    background: linear-gradient(140deg, #fb923c, #ea580c);
    box-shadow: 0 10px 24px rgba(234, 88, 12, .38);
}

.sgsr-hero-title {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: .6px;
    color: #fff;
    line-height: 1.25;
}

.sgsr-hero-sub {
    margin: 6px 0 0;
    font-size: 13.5px;
    color: rgba(255, 255, 255, .62);
}

.sgsr-hero-sub b {
    color: #fdba74;
    font-weight: 700;
}

.sgsr-hero-watermark {
    position: absolute;
    right: 26px;
    bottom: -18px;
    font-size: 104px;
    color: rgba(255, 255, 255, .05);
    z-index: 1;
    pointer-events: none;
}

/* ---------- 排序栏 ---------- */

.sgsr-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.sgsr-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sgsr-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    line-height: 1.4;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid transparent;
    transition: all .2s ease;
}

.sgsr-tab i {
    font-size: 11px;
    opacity: .85;
}

.sgsr-tab:hover {
    color: var(--sgsr-brand-deep);
    background: #fff7ed;
    text-decoration: none;
}

.sgsr-tab.is-active {
    color: #fff;
    background: #0f172a;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .2);
}

.sgsr-tab.is-active:hover {
    color: #fff;
    background: #0f172a;
}

.sgsr-toolbar-note {
    font-size: 12.5px;
    color: #94a3b8;
}

/* ---------- 专题卡片 ---------- */

.sgsr-tone-amber   { --t1: #f97316; --t2: #fbbf24; }
.sgsr-tone-sky     { --t1: #0ea5e9; --t2: #38bdf8; }
.sgsr-tone-violet  { --t1: #7c3aed; --t2: #a78bfa; }
.sgsr-tone-rose    { --t1: #e11d48; --t2: #fb7185; }
.sgsr-tone-emerald { --t1: #059669; --t2: #34d399; }
.sgsr-tone-cyan    { --t1: #0891b2; --t2: #22d3ee; }

.sgsr-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid var(--sgsr-line);
    border-radius: 14px;
    overflow: hidden;
    transition: transform .28s cubic-bezier(.22, .61, .36, 1),
                box-shadow .28s ease,
                border-color .28s ease;
}

.sgsr-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, .11);
    border-color: var(--t1);
    text-decoration: none;
}

.sgsr-card-media {
    position: relative;
    aspect-ratio: 3 / 2;
    background: #f1f5f9;
    overflow: hidden;
}

.sgsr-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .55s ease;
}

.sgsr-card:hover .sgsr-card-media img {
    transform: scale(1.055);
}

.sgsr-card-ph {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 40px;
    font-weight: 800;
    letter-spacing: .06em;
    color: #fff;
    background: linear-gradient(140deg, var(--t1), var(--t2));
}

.sgsr-card-count {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 2;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    color: #fff;
    background: rgba(15, 23, 42, .55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.sgsr-card-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    padding: 12px 14px 14px;
}

.sgsr-card-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--sgsr-ink);
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .2s;
}

.sgsr-card:hover .sgsr-card-title {
    color: var(--t1);
}

.sgsr-card-sub {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.6;
    color: #7c8899;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sgsr-card-sub.is-empty {
    color: #a8b3c2;
}

/* ---------- 专题详情头 ---------- */

.sgsr-detail-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 26px;
    padding: 22px;
    margin-bottom: 28px;
    border: 1px solid var(--sgsr-line);
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #ffffff 52%, #fbfcfe 100%);
    box-shadow: 0 10px 30px rgba(15, 23, 42, .05);
}

.sgsr-detail-glow {
    position: absolute;
    right: -90px;
    top: -110px;
    width: 330px;
    height: 330px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--t1), transparent 68%);
    opacity: .075;
    filter: blur(10px);
    pointer-events: none;
}

.sgsr-detail-cover {
    position: relative;
    aspect-ratio: 3 / 2;
    border-radius: 12px;
    overflow: hidden;
    background: #f1f5f9;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .1);
}

.sgsr-detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sgsr-detail-ph {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 54px;
    font-weight: 800;
    letter-spacing: .06em;
    color: #fff;
    background: linear-gradient(140deg, var(--t1), var(--t2));
}

.sgsr-detail-info {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 4px 6px 4px 0;
}

.sgsr-crumb {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    font-size: 12.5px;
    color: #8b97a8;
}

.sgsr-crumb a {
    color: #64748b;
    transition: color .2s;
}

.sgsr-crumb a:hover {
    color: var(--t1);
    text-decoration: none;
}

.sgsr-crumb a i {
    margin-right: 4px;
    color: var(--t1);
}

.sgsr-crumb-sep {
    opacity: .5;
}

.sgsr-detail-title {
    margin: 0 0 10px;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: .3px;
    color: var(--sgsr-ink);
    word-break: break-word;
}

.sgsr-detail-desc {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.85;
    color: #5b6878;
    max-width: 64ch;
}

.sgsr-detail-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #778394;
}

.sgsr-detail-meta i {
    margin-right: 5px;
    color: var(--t1);
}

.sgsr-detail-meta b {
    font-size: 15px;
    color: var(--sgsr-ink);
}

.sgsr-detail-more {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding: 6px 13px;
    border: 1px solid #e4eaf2;
    border-radius: 999px;
    font-size: 13px;
    color: #64748b;
    transition: all .2s ease;
}

.sgsr-detail-more:hover {
    color: #fff;
    background: var(--t1);
    border-color: var(--t1);
    text-decoration: none;
}

.sgsr-detail-more i {
    font-size: 11px;
}

/* ---------- 专区标题行 ---------- */

.sgsr-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eef2f7;
}

.sgsr-section-head h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--sgsr-ink);
}

.sgsr-section-head h2 i {
    font-size: 14px;
    color: var(--sgsr-brand);
}

.sgsr-section-head span {
    font-size: 12.5px;
    color: #94a3b8;
}

/* 让主题卡片在专题页里更有呼吸感 */
.sgsr-posts {
    margin-bottom: 4px;
}

/* ---------- 分页 ---------- */

.sgsr-pager {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.sgsr-pager ul.page-numbers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sgsr-pager .page-numbers {
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--sgsr-line);
    border-radius: 10px;
    background: #fff;
    font-size: 13.5px;
    font-weight: 600;
    color: #475569;
    transition: all .2s ease;
}

.sgsr-pager .page-numbers:hover {
    border-color: var(--sgsr-brand);
    color: var(--sgsr-brand);
    text-decoration: none;
}

.sgsr-pager .page-numbers.current {
    color: #fff;
    background: var(--sgsr-brand);
    border-color: var(--sgsr-brand);
    box-shadow: 0 6px 16px rgba(249, 115, 22, .28);
}

.sgsr-pager .page-numbers.dots {
    border-color: transparent;
    background: transparent;
    color: #b6c0cd;
}

/* ---------- 空状态 ---------- */

.sgsr-empty {
    padding: 58px 20px;
    text-align: center;
    border: 1px dashed #e2e8f0;
    border-radius: 16px;
    background: #fbfdff;
}

.sgsr-empty i {
    display: block;
    margin-bottom: 12px;
    font-size: 34px;
    color: #cbd5e1;
}

.sgsr-empty b {
    display: block;
    margin-bottom: 6px;
    font-size: 16px;
    color: #334155;
}

.sgsr-empty p {
    margin: 0;
    font-size: 13px;
    color: #94a3b8;
}

/* ---------- 文章页：所属专题 ---------- */

.sgsr-inpost {
    margin: 34px 0 10px;
    padding: 18px 18px 16px;
    border: 1px solid var(--sgsr-line);
    border-radius: 16px;
    background: linear-gradient(180deg, #fcfdff, #ffffff);
}

.sgsr-inpost-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--sgsr-ink);
}

.sgsr-inpost-label i {
    color: var(--sgsr-brand);
}

.sgsr-inpost-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sgsr-inpost-card {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 10px;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    background: #fff;
    transition: all .22s ease;
}

.sgsr-inpost-card:hover {
    transform: translateY(-1px);
    border-color: #fdba74;
    box-shadow: 0 8px 20px rgba(249, 115, 22, .1);
    text-decoration: none;
}

.sgsr-inpost-media {
    position: relative;
    flex: 0 0 104px;
    width: 104px;
    height: 70px;
    border-radius: 9px;
    overflow: hidden;
    background: #f1f5f9;
}

.sgsr-inpost-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sgsr-inpost-ph {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(140deg, #f97316, #fb923c);
}

.sgsr-inpost-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.sgsr-inpost-title {
    font-size: 14.5px;
    line-height: 1.4;
    color: var(--sgsr-ink);
}

.sgsr-inpost-desc {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.55;
    color: #8492a6;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sgsr-inpost-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
    font-size: 12px;
    color: var(--sgsr-brand);
}

.sgsr-inpost-meta i {
    font-size: 10px;
    transition: transform .2s;
}

.sgsr-inpost-card:hover .sgsr-inpost-meta i {
    transform: translateX(3px);
}

/* ---------- 响应式 ---------- */

@media (max-width: 991px) {
    .sgsr-detail-hero {
        grid-template-columns: 240px minmax(0, 1fr);
        gap: 20px;
    }

    .sgsr-detail-title {
        font-size: 25px;
    }
}

@media (max-width: 767px) {
    .sgsr-wrap {
        padding-top: 16px;
        padding-bottom: 40px;
    }

    .sgsr-hero {
        padding: 20px;
        border-radius: 14px;
        margin-bottom: 18px;
    }

    .sgsr-hero-icon {
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        font-size: 17px;
        border-radius: 13px;
    }

    .sgsr-hero-title {
        font-size: 21px;
    }

    .sgsr-hero-sub {
        font-size: 12.5px;
        line-height: 1.6;
    }

    .sgsr-hero-watermark {
        display: none;
    }

    .sgsr-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .sgsr-tabs::-webkit-scrollbar {
        display: none;
    }

    .sgsr-tab {
        flex: 0 0 auto;
        padding: 6px 12px;
        font-size: 12.5px;
    }

    .sgsr-detail-hero {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
        border-radius: 14px;
        margin-bottom: 20px;
    }

    .sgsr-detail-title {
        font-size: 22px;
        margin-bottom: 8px;
    }

    .sgsr-detail-desc {
        font-size: 13px;
        line-height: 1.7;
        margin-bottom: 12px;
    }

    .sgsr-detail-meta {
        gap: 12px;
        font-size: 12px;
    }

    .sgsr-card-body {
        padding: 10px 11px 12px;
    }

    .sgsr-card-title {
        font-size: 13.5px;
    }

    .sgsr-card-sub {
        font-size: 11.5px;
    }

    .sgsr-inpost {
        padding: 14px;
        margin-top: 26px;
    }

    .sgsr-inpost-media {
        flex: 0 0 82px;
        width: 82px;
        height: 56px;
    }

    .sgsr-inpost-title {
        font-size: 13.5px;
    }
}

@media (max-width: 420px) {
    .sgsr-card-count {
        font-size: 10.5px;
        padding: 2px 7px;
    }

    .sgsr-card-ph {
        font-size: 32px;
    }
}
