/* ============================================================
   军队文职页 · 参考资料 美化样式
   强调色：橙色 #F97316 → #EA580C（与页面一致）
   适配亮/暗/森林/纯黑/沙 五套主题（全部走 CSS 变量）
   动画仅用 transform / opacity，性能友好
   ============================================================ */

body[data-page="jw"] .materials-section {
    margin: 8px 0 34px;
}

/* ---------- 区块标题 ---------- */
body[data-page="jw"] .materials-head {
    margin-bottom: 22px;
}

body[data-page="jw"] .materials-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

body[data-page="jw"] .materials-title h2 {
    position: relative;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    padding-bottom: 8px;
}

/* 橙色渐变下划线点缀 */
body[data-page="jw"] .materials-title h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 52px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, #F97316, #EA580C);
}

body[data-page="jw"] .materials-title svg {
    color: #F97316;
    flex-shrink: 0;
}

body[data-page="jw"] .materials-sub {
    margin-top: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* ---------- 资料卡片网格 ---------- */
body[data-page="jw"] .materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
    gap: 18px;
}

body[data-page="jw"] .material-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px 22px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl, 18px);
    box-shadow: var(--shadow-sm, 0 6px 18px -12px rgba(15, 23, 42, 0.18));
    overflow: hidden;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    animation: mc-rise 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
    animation-delay: calc(var(--i, 0) * 80ms);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.35s ease, border-color 0.35s ease;
}

@keyframes mc-rise {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 顶部橙色高亮细线 */
body[data-page="jw"] .material-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #F97316, #EA580C);
    transition: left 0.4s ease;
}

body[data-page="jw"] .material-card:hover::before {
    left: 0;
}

body[data-page="jw"] .material-card:hover {
    transform: translateY(-6px);
    border-color: rgba(249, 115, 22, 0.35);
    box-shadow: 0 18px 38px -14px rgba(249, 115, 22, 0.28),
                0 8px 18px -10px rgba(15, 23, 42, 0.12);
}

/* ---------- 顶部：徽章 + 标签 ---------- */
body[data-page="jw"] .mc-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

body[data-page="jw"] .mc-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #F97316, #EA580C);
    box-shadow: 0 8px 18px -8px rgba(249, 115, 22, 0.55);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body[data-page="jw"] .material-card:hover .mc-badge {
    transform: scale(1.08) rotate(-4deg);
}

body[data-page="jw"] .mc-tag {
    font-size: 12px;
    font-weight: 600;
    color: #EA580C;
    padding: 4px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, #F97316 12%, transparent);
    border: 1px solid color-mix(in srgb, #F97316 28%, transparent);
}

/* ---------- 文本 ---------- */
body[data-page="jw"] .mc-name {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-primary);
}

body[data-page="jw"] .mc-desc {
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-secondary);
    flex: 1;
}

body[data-page="jw"] .mc-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted, #94A3B8);
}

body[data-page="jw"] .mc-meta svg { color: #F97316; }

body[data-page="jw"] .mc-dot { opacity: 0.5; }

/* ---------- 操作按钮 ---------- */
body[data-page="jw"] .mc-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

body[data-page="jw"] .mc-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.25s ease,
                background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

body[data-page="jw"] .mc-btn:active { transform: scale(0.97); }

/* 在线阅读：橙色实心 */
body[data-page="jw"] .mc-read {
    color: #fff;
    background: linear-gradient(135deg, #F97316, #EA580C);
    box-shadow: 0 8px 18px -10px rgba(249, 115, 22, 0.6);
}

body[data-page="jw"] .mc-read:hover {
    box-shadow: 0 12px 24px -8px rgba(249, 115, 22, 0.7);
    transform: translateY(-2px);
}

/* 下载：描边 */
body[data-page="jw"] .mc-dl {
    color: #EA580C;
    background: color-mix(in srgb, #F97316 8%, transparent);
    border: 1px solid color-mix(in srgb, #F97316 32%, transparent);
}

body[data-page="jw"] .mc-dl:hover {
    background: color-mix(in srgb, #F97316 16%, transparent);
    transform: translateY(-2px);
}

/* ---------- 减少动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
    body[data-page="jw"] .material-card {
        animation: none !important;
        will-change: auto;
    }
    body[data-page="jw"] .material-card:hover {
        transform: none;
    }
    body[data-page="jw"] .mc-badge { transition: none; }
}

/* ---------- 窄屏适配 ---------- */
@media (max-width: 600px) {
    body[data-page="jw"] .materials-grid {
        grid-template-columns: 1fr;
    }
    body[data-page="jw"] .materials-title h2 { font-size: 21px; }
}
