/* ============================================================
   topic.css — 子课题页面通用样式
   与 style.css + encrypted-traffic.css 全局变量兼容
   ============================================================ */

/* ===== TOPIC HERO ===== */
.topic-hero {
    position: relative;
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #f0f5ff 0%, #ffffff 100%);
    padding-top: 72px;
    text-align: center;
}
.topic-hero-content {
    max-width: 800px;
    padding: 48px 24px;
}
.topic-hero .breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-light);
    flex-wrap: wrap;
}
.topic-hero .breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}
.topic-hero .breadcrumb a:hover { text-decoration: underline; }
.topic-hero .breadcrumb svg {
    width: 14px; height: 14px;
    color: var(--text-light);
    flex-shrink: 0;
}
.topic-hero h1 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 900;
    line-height: 1.15;
    color: var(--text);
    margin-bottom: 16px;
    letter-spacing: -1px;
}
.topic-hero > .topic-hero-content > p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ===== CONTENT GRID ===== */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    align-items: start;
}
.content-main p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 16px;
}
.content-main p strong {
    color: var(--text);
    font-weight: 700;
}
.content-side {
    position: sticky;
    top: 96px;
}
.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}
.info-card h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text);
}
.info-card ul {
    list-style: none;
    padding: 0;
}
.info-card li {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 10px;
    padding-left: 16px;
    position: relative;
}
.info-card li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px; height: 6px;
    background: var(--primary);
    border-radius: 50%;
}
.info-card li strong {
    color: var(--text);
    font-weight: 600;
}

/* ===== DATA HIGHLIGHT ===== */
.data-highlight {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 24px 0;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-light) 0%, rgba(26,110,255,0.03) 100%);
    border-radius: var(--radius);
    border: 1px dashed rgba(26,110,255,0.2);
}
.dh-item {
    text-align: center;
}
.dh-num {
    font-size: 28px;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.dh-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
    font-weight: 500;
}
.source-note {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 8px;
    font-style: italic;
}

/* ===== FRAMEWORK GRID ===== */
.framework-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.framework-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: var(--transition);
}
.framework-card:hover {
    border-color: rgba(26, 110, 255, 0.2);
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}
.fw-icon {
    width: 40px; height: 40px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 900;
    margin-bottom: 14px;
}
.framework-card h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
}
.framework-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== METHOD TABS ===== */
.method-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    justify-content: center;
}
.method-tab {
    padding: 10px 24px;
    border-radius: 100px;
    border: 1.5px solid var(--border);
    background: white;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}
.method-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.method-tab.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(26, 110, 255, 0.3);
}
.method-panel {
    display: none;
    animation: fadeIn 0.4s ease;
}
.method-panel.active { display: block; }
.method-content h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 14px;
}
.method-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 14px;
}
.paper-ref {
    background: var(--bg-warm);
    border-left: 3px solid var(--primary);
    padding: 14px 18px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-top: 16px;
}

/* ===== RESOURCE GRID ===== */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.resource-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: var(--transition);
}
.resource-card:hover {
    border-color: rgba(26, 110, 255, 0.2);
    box-shadow: var(--shadow-hover);
}
.resource-card h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--primary);
}
.resource-card ul {
    list-style: none;
    padding: 0;
}
.resource-card li {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 8px;
    padding-left: 14px;
    position: relative;
}
.resource-card li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}
.resource-card li strong {
    color: var(--text);
    font-weight: 600;
}

/* ===== REF LIST ===== */
.ref-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ref-item {
    display: flex;
    gap: 14px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    transition: var(--transition);
}
.ref-item:hover {
    border-color: rgba(26, 110, 255, 0.2);
    box-shadow: var(--shadow);
}
.ref-num {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 2px 8px;
    border-radius: 6px;
    flex-shrink: 0;
    height: fit-content;
}
.ref-item p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* ===== MOBILE ===== */
@media (max-width: 1024px) {
    .content-grid { grid-template-columns: 1fr; }
    .content-side { position: static; }
    .framework-grid { grid-template-columns: repeat(2, 1fr); }
    .data-highlight { grid-template-columns: repeat(2, 1fr); }
    .resource-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .topic-hero { min-height: 300px; padding-top: 96px; }
    .topic-hero h1 { font-size: clamp(24px, 6vw, 32px); }
    .framework-grid { grid-template-columns: 1fr; }
    .data-highlight { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 16px; }
    .dh-num { font-size: 22px; }
    .resource-grid { grid-template-columns: 1fr; }
    .method-tabs { gap: 6px; }
    .method-tab { padding: 8px 16px; font-size: 13px; }
}
