/* ═══════════════════════════════════════════════════════════════════════════
   Topics — 专题页面样式 (v2 redesign)
   Prefix: tp-
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Hero (Index) ──────────────────────────────────────────────────────── */
.tp-hero {
    position: relative;
    padding: 72px 0 80px;
    overflow: hidden;
    background: linear-gradient(180deg, #fef5f5 0%, #fef9f0 40%, #fff 100%);
}
.tp-hero-bg { position: absolute; inset: 0; pointer-events: none; }
.tp-hero-circle {
    position: absolute;
    border-radius: 50%;
}
.tp-hero-inner {
    display: flex;
    align-items: center;
    gap: 64px;
}
.tp-hero-text {
    flex: 1;
    max-width: 520px;
}
.tp-hero-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 900;
    color: var(--pk-text);
    line-height: 1.15;
    margin: 0 0 16px;
}
.tp-hero-title em {
    font-style: normal;
    background: linear-gradient(135deg, #e74c3c, #f57c00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.tp-hero-desc {
    font-size: 17px;
    color: var(--pk-text-soft);
    line-height: 1.6;
    margin: 0 0 28px;
}
.tp-hero-stats {
    display: flex;
    gap: 36px;
}
.tp-hero-stat strong {
    display: block;
    font-size: 30px;
    font-weight: 900;
    color: var(--pk-coral);
    line-height: 1;
}
.tp-hero-stat span {
    font-size: 13px;
    font-weight: 600;
    color: var(--pk-text-soft);
    margin-top: 4px;
    display: block;
}

/* Hero visual — floating cards */
.tp-hero-visual {
    position: relative;
    width: 320px;
    height: 280px;
    flex-shrink: 0;
}
.tp-hero-card {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    animation: tpFloat 4s ease-in-out infinite;
    padding: 20px;
}
.tp-hero-card-icon { font-size: 32px; }
.tp-hero-card-label { font-size: 13px; font-weight: 800; color: var(--pk-text); }
.tp-hero-card--1 { top: 10px; left: 20px; width: 140px; height: 120px; animation-delay: 0s; }
.tp-hero-card--2 { top: 50px; right: 10px; width: 130px; height: 110px; animation-delay: 0.8s; }
.tp-hero-card--3 { bottom: 20px; left: 40px; width: 120px; height: 100px; animation-delay: 1.6s; }
.tp-hero-card--4 { bottom: 40px; right: 30px; width: 110px; height: 90px; animation-delay: 2.4s; }
@keyframes tpFloat {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@media (max-width: 768px) {
    .tp-hero-inner { flex-direction: column; gap: 48px; text-align: center; }
    .tp-hero-text { max-width: 100%; }
    .tp-hero-stats { justify-content: center; }
    .tp-hero-visual { width: 260px; height: 240px; }
}

/* ── Subject Tabs ──────────────────────────────────────────────────────── */
.tp-tabs-section {
    padding: 0 0 16px;
    margin-top: -16px;
    position: relative;
    z-index: 2;
}
.tp-tabs-scroll {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}
.tp-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: var(--pk-radius-pill);
    font-size: 14px;
    font-weight: 700;
    color: var(--pk-text-soft);
    background: #fff;
    border: 2px solid #f0f0f0;
    text-decoration: none;
    transition: all 0.25s;
    white-space: nowrap;
}
.tp-tab:hover {
    border-color: var(--tc, var(--pk-coral));
    color: var(--tc, var(--pk-coral));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.tp-tab.active {
    background: var(--tc, var(--pk-coral));
    border-color: var(--tc, var(--pk-coral));
    color: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.tp-tab-icon { font-size: 16px; line-height: 1; }
.tp-tab-name { font-weight: 700; }
.tp-tab-count {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 99px;
    background: rgba(0,0,0,0.06);
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}
.tp-tab.active .tp-tab-count {
    background: rgba(255,255,255,0.25);
}

/* ── Featured Cards ─────────────────────────────────────────────────────── */
.tp-featured-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.tp-fcard {
    display: flex;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #f0f0f0;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
}
.tp-fcard:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.1);
    border-color: var(--tc, var(--pk-coral));
}
.tp-fcard-visual {
    position: relative;
    width: 240px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--tb, #fdf2f8), #fff);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.tp-fcard-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.tp-fcard-placeholder {
    font-size: 56px;
    opacity: 0.5;
}
.tp-fcard-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 4px 12px;
    border-radius: 99px;
    background: var(--pk-coral);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(255,107,107,0.3);
}
.tp-fcard-body {
    flex: 1;
    padding: 28px 28px 24px;
    display: flex;
    flex-direction: column;
}
.tp-fcard-tag {
    font-size: 12px;
    font-weight: 700;
    color: var(--tc, var(--pk-coral));
    margin-bottom: 10px;
}
.tp-fcard-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--pk-text);
    line-height: 1.3;
    margin: 0 0 8px;
}
.tp-fcard-desc {
    font-size: 14px;
    color: var(--pk-text-soft);
    line-height: 1.6;
    margin: 0 0 auto;
}
.tp-fcard-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #f5f5f5;
}
.tp-fcard-count {
    font-size: 13px;
    font-weight: 700;
    color: var(--pk-text-soft);
}
.tp-fcard-arrow {
    font-size: 13px;
    font-weight: 800;
    color: var(--tc, var(--pk-coral));
}
@media (max-width: 768px) {
    .tp-featured-grid { grid-template-columns: 1fr; }
    .tp-fcard { flex-direction: column; }
    .tp-fcard-visual { width: 100%; height: 180px; }
}

/* ── Card Grid ──────────────────────────────────────────────────────────── */
.tp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 900px) {
    .tp-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .tp-grid { grid-template-columns: 1fr; }
}

/* ── Regular Card ──────────────────────────────────────────────────────── */
.tp-card {
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #f0f0f0;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    position: relative;
}
.tp-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(0,0,0,0.08);
    border-color: var(--tc, var(--pk-coral));
}
.tp-card-media {
    position: relative;
    height: 150px;
    overflow: hidden;
}
.tp-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.tp-card-gradient {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--tb, #fdf2f8) 0%, #fff 100%);
}
.tp-card-gradient-icon { font-size: 40px; opacity: 0.6; }
.tp-card-gradient-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--tc, var(--pk-coral));
    opacity: 0.7;
}
.tp-card-featured-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px; height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(4px);
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.tp-card-body {
    padding: 18px 20px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.tp-card-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--pk-text);
    line-height: 1.4;
    margin: 0 0 6px;
}
.tp-card-desc {
    font-size: 13px;
    color: var(--pk-text-soft);
    line-height: 1.5;
    margin: 0 0 auto;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tp-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}
.tp-card-items {
    font-size: 12px;
    font-weight: 700;
    color: var(--pk-text-light);
}
.tp-card-go {
    font-size: 12px;
    font-weight: 800;
    color: var(--tc, var(--pk-coral));
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.25s;
}
.tp-card:hover .tp-card-go { opacity: 1; transform: translateX(0); }
.tp-card-bar {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: var(--tc, var(--pk-coral));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}
.tp-card:hover .tp-card-bar { transform: scaleX(1); }

/* ── Empty State ────────────────────────────────────────────────────────── */
.tp-empty {
    text-align: center;
    padding: 72px 20px;
}
.tp-empty-visual {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}
.tp-empty-icon { font-size: 64px; position: relative; z-index: 1; }
.tp-empty-glow {
    position: absolute;
    top: 50%; left: 50%;
    width: 80px; height: 80px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(255,107,107,0.08);
    z-index: 0;
}
.tp-empty h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--pk-text);
    margin: 0 0 8px;
}
.tp-empty p {
    font-size: 14px;
    color: var(--pk-text-soft);
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Detail Page
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Detail Hero ────────────────────────────────────────────────────────── */
.tp-detail-hero {
    position: relative;
    padding: 44px 0 64px;
    overflow: hidden;
    background: linear-gradient(180deg, var(--tb, #fdf2f8) 0%, #fff 100%);
}
.tp-detail-hero-bg { position: absolute; inset: 0; pointer-events: none; }
.tp-detail-circle {
    position: absolute;
    border-radius: 50%;
    background: color-mix(in srgb, var(--tc, var(--pk-coral)) 5%, transparent);
}
.tp-detail-dot {
    position: absolute;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--tc, var(--pk-coral)) 15%, transparent);
}
.tp-detail-hero-body {
    display: flex;
    align-items: center;
    gap: 60px;
}
.tp-detail-hero-text {
    flex: 1;
    max-width: 580px;
}
.tp-detail-tags { display: flex; gap: 8px; margin-bottom: 14px; }
.tp-detail-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    background: color-mix(in srgb, var(--tc, var(--pk-coral)) 10%, transparent);
    color: var(--tc, var(--pk-coral));
}
.tp-detail-title {
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 900;
    color: var(--pk-text);
    line-height: 1.2;
    margin: 0 0 14px;
}
.tp-detail-desc {
    font-size: 16px;
    color: var(--pk-text-soft);
    line-height: 1.7;
    margin: 0 0 20px;
}
.tp-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 14px;
    color: var(--pk-text-soft);
}
.tp-detail-meta strong { color: var(--pk-text); }

/* Detail hero visual — stacked cards */
.tp-detail-hero-visual {
    position: relative;
    width: 280px;
    height: 240px;
    flex-shrink: 0;
}
.tp-detail-visual-card {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(0,0,0,0.06);
    padding: 18px;
}
.tp-detail-visual-icon { font-size: 28px; }
.tp-detail-visual-label { font-size: 12px; font-weight: 800; color: var(--tc); }
.tp-detail-visual-card--main {
    top: 10px; left: 20px; width: 150px; height: 130px;
    z-index: 3;
}
.tp-detail-visual-card--side {
    top: 60px; right: 0; width: 130px; height: 110px;
    z-index: 2;
    animation: tpFloat 5s ease-in-out 1s infinite;
}
.tp-detail-visual-card--small {
    bottom: 10px; left: 60px; width: 110px; height: 90px;
    z-index: 1;
    animation: tpFloat 5s ease-in-out 2s infinite;
}
@media (max-width: 768px) {
    .tp-detail-hero-body { flex-direction: column; gap: 32px; }
    .tp-detail-hero-text { max-width: 100%; }
    .tp-detail-hero-visual { width: 240px; height: 200px; }
}

/* ── Timeline Items ──────────────────────────────────────────────────────── */
.tp-timeline {
    display: flex;
    flex-direction: column;
    max-width: 780px;
    margin: 0 auto;
}
.tp-tl-item {
    display: flex;
    gap: 0;
    text-decoration: none;
    color: inherit;
    position: relative;
}
.tp-tl-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 48px;
    flex-shrink: 0;
}
.tp-tl-num {
    width: 40px; height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: color-mix(in srgb, var(--tc, var(--pk-coral)) 10%, transparent);
    color: var(--tc, var(--pk-coral));
    font-size: 15px;
    font-weight: 900;
    z-index: 1;
    transition: all 0.3s;
}
.tp-tl-item:hover .tp-tl-num {
    background: var(--tc, var(--pk-coral));
    color: #fff;
}
.tp-tl-line {
    width: 2px;
    flex: 1;
    background: color-mix(in srgb, var(--tc, var(--pk-coral)) 12%, transparent);
    margin: 0 auto;
    min-height: 16px;
}
.tp-tl-item:last-child .tp-tl-line { display: none; }
.tp-tl-card {
    flex: 1;
    margin-left: 18px;
    margin-bottom: 16px;
    padding: 20px 24px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #f0f0f0;
    transition: all 0.25s;
}
.tp-tl-item:hover .tp-tl-card {
    border-color: var(--tc, var(--pk-coral));
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transform: translateX(6px);
}
.tp-tl-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.tp-tl-card-type {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(0,0,0,0.04);
    color: var(--pk-text-soft);
    white-space: nowrap;
}
.tp-tl-card-caption {
    font-size: 12px;
    color: var(--tc, var(--pk-coral));
    font-weight: 600;
    font-style: italic;
}
.tp-tl-card-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--pk-text);
    margin: 0 0 6px;
    line-height: 1.4;
}
.tp-tl-card-summary {
    font-size: 13px;
    color: var(--pk-text-soft);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tp-tl-card-footer {
    margin-top: 12px;
}
.tp-tl-card-cta {
    font-size: 13px;
    font-weight: 800;
    color: var(--tc, var(--pk-coral));
    opacity: 0;
    transition: opacity 0.25s;
}
.tp-tl-item:hover .tp-tl-card-cta { opacity: 1; }

/* ── CTA ─────────────────────────────────────────────────────────────────── */
.tp-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 44px 52px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--cta-bg, #9B59B6), color-mix(in srgb, var(--cta-bg, #9B59B6) 75%, #000));
    color: #fff;
}
.tp-cta-text h2 {
    font-size: 24px;
    font-weight: 900;
    margin: 0 0 6px;
}
.tp-cta-text p {
    font-size: 15px;
    opacity: 0.85;
    margin: 0;
}
.tp-cta-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}
@media (max-width: 768px) {
    .tp-cta { flex-direction: column; text-align: center; padding: 36px 28px; }
    .tp-cta-actions { flex-direction: column; width: 100%; }
    .tp-cta-actions .pk-btn { width: 100%; justify-content: center; }
}
