/* ==========================================================================
   关投强 - 媒体资源页样式
   ========================================================================== */

/* 筛选器 */
.filter-bar {
    background: #fff;
    padding: 24px 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-top: -60px;
    position: relative; z-index: 2;
    margin-bottom: 48px;
}
.filter-row { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px dashed var(--c-line); }
.filter-row:last-child { border-bottom: 0; }
.filter-row .label { font-size: 14px; color: var(--c-text-sub); white-space: nowrap; min-width: 60px; font-weight: 500; }
.filter-row .options { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.filter-row .options a {
    padding: 4px 14px; border-radius: 14px; font-size: 13px; color: var(--c-text-sub);
    transition: all .2s; cursor: pointer;
}
.filter-row .options a:hover, .filter-row .options a.active {
    background: var(--c-primary-light); color: var(--c-primary); font-weight: 500;
}
.filter-actions { margin-top: 12px; display: flex; gap: 12px; align-items: center; }
.filter-input {
    flex: 1; height: 40px; padding: 0 14px 0 36px; border: 1px solid var(--c-line); border-radius: 20px;
    background: #fff url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3e%3ccircle cx='11' cy='11' r='8'/%3e%3cpath d='m21 21-4.35-4.35'/%3e%3c/svg%3e") no-repeat 12px center;
    background-size: 16px;
}
.filter-input:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(0,82,217,.1); }

/* 资源统计 */
.resource-stats {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
    margin-bottom: 48px;
}
.r-stat {
    background: #fff; border-radius: var(--radius-lg); padding: 28px;
    border: 1px solid var(--c-line); text-align: center;
    transition: all .3s;
}
.r-stat:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.r-stat .icon {
    height: 44px; display: flex; align-items: center; justify-content: center;
    margin-bottom: 8px; color: var(--c-primary);
}
.r-stat .icon svg { width: 34px; height: 34px; }
.r-stat .num { font-size: 36px; font-weight: 800; color: var(--c-primary); letter-spacing: -1px; }
.r-stat .num .small { font-size: 18px; color: var(--c-text-sub); }
.r-stat .label { font-size: 14px; color: var(--c-text-sub); margin-top: 8px; }

/* 资源列表 */
.resource-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--c-line); margin-bottom: 32px; }
.resource-tabs button {
    padding: 14px 24px; font-size: 15px; color: var(--c-text-sub); font-weight: 500;
    background: none; cursor: pointer; position: relative; transition: color .2s;
}
.resource-tabs button.active { color: var(--c-primary); }
.resource-tabs button.active::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px;
    background: var(--c-primary); border-radius: 2px;
}
.resource-tabs button .count {
    margin-left: 6px; font-size: 12px; padding: 2px 8px; border-radius: 8px;
    background: var(--c-bg-soft); color: var(--c-text-sub);
}
.resource-tabs button.active .count { background: var(--c-primary-light); color: var(--c-primary); }

/* 资源表格 */
.res-table {
    width: 100%; border-collapse: separate; border-spacing: 0;
    background: #fff; border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-sm); border: 1px solid var(--c-line);
}
.res-table thead { background: var(--c-bg-soft); }
.res-table th {
    padding: 16px 20px; text-align: left; font-size: 14px; font-weight: 600; color: var(--c-text-sub);
    border-bottom: 1px solid var(--c-line);
}
.res-table td {
    padding: 18px 20px; font-size: 14px; color: var(--c-text);
    border-bottom: 1px solid var(--c-line); vertical-align: middle;
}
.res-table tbody tr { transition: background .2s; }
.res-table tbody tr:hover { background: var(--c-bg-soft); }
/* 分页隐藏行：必须显式写 display:none —— 窄屏媒体查询里 tr 被设为 display:block */
.res-table tbody tr[hidden] { display: none; }
.res-table tbody tr:last-child td { border-bottom: 0; }
.res-table .name { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.res-table .logo {
    width: 32px; height: 32px; border-radius: 6px;
    background: var(--c-primary-light); color: var(--c-primary);
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
}
.res-table .tag {
    display: inline-block; padding: 2px 8px; border-radius: 4px;
    background: var(--c-bg-soft); color: var(--c-text-sub); font-size: 12px; margin-right: 4px;
}
.res-table .tag.hot { background: var(--c-accent-light); color: var(--c-accent); }
.res-table .tag.top { background: var(--c-primary-light); color: var(--c-primary); }
.res-table .price { color: var(--c-accent); font-weight: 700; font-size: 16px; }
.res-table .price small { font-size: 12px; font-weight: 400; color: var(--c-text-mute); margin-left: 2px; }
.res-table .original { font-size: 12px; color: var(--c-text-mute); text-decoration: line-through; }
/* 操作列：媒体详情 + 我要发稿（2026-10-12 新增）
   两个按钮一组；`flex: 0 0 auto` + `.btn` 自带的 white-space:nowrap
   保证窄到极限时按钮不被压变形，超出部分交给 `.table-scroll` 横向滚动。
   ≤480px 沿用下方 `.res-table .btn { width: 100% }` 自动竖排，无需额外规则。 */
.res-table .act-group { display: flex; flex-wrap: wrap; gap: 8px; }
.res-table .act-group .btn { flex: 0 0 auto; }
.rate-bar { display: inline-flex; align-items: center; gap: 8px; }
.rate-bar .bar { width: 60px; height: 6px; border-radius: 3px; background: var(--c-bg-soft); overflow: hidden; }
.rate-bar .bar div { height: 100%; background: linear-gradient(to right, var(--c-primary), var(--c-success)); border-radius: 3px; }

/* 价格优势对比
   ⚠ 2026-10-09 甲方要求删除媒体库页的「价格构成」模块，以下
   `.price-compare` / `.cmp-row` / `.illu` 样式**刻意保留**
   （本项目惯例：只删结构不删样式），勿当死代码清理。 */
.price-compare {
    background: linear-gradient(135deg, #fff5ed, #fff);
    border: 1px solid var(--c-accent);
    border-radius: var(--radius-xl);
    padding: 56px; margin: 80px 0;
    display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center;
}
.price-compare h2 { font-size: 32px; line-height: 1.3; margin-bottom: 16px; }
.price-compare .compare-table { font-size: 14px; }
.cmp-row { display: flex; justify-content: space-between; padding: 14px 0; border-bottom: 1px dashed var(--c-line); }
.cmp-row:last-child { border-bottom: 0; }
.cmp-row b { color: var(--c-text-sub); font-weight: 500; }
.cmp-row .good { color: var(--c-success); font-weight: 700; }
.cmp-row .bad { color: #C0C4CC; text-decoration: line-through; }
.price-compare .illu {
    text-align: center;
    font-size: 180px; line-height: 1; padding: 60px 0;
    background: linear-gradient(135deg, #0052D9, #F19500);
    border-radius: 24px; color: #fff;
}

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-md); margin-bottom: 12px; overflow: hidden; }
.faq-q {
    padding: 20px 24px; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
    font-size: 15px; font-weight: 600;
}
.faq-q::after { content: "+"; font-size: 22px; color: var(--c-primary); transition: transform .2s; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a {
    display: none; padding: 0 24px 20px; font-size: 14px; color: var(--c-text-sub); line-height: 1.8;
}
.faq-item.open .faq-a { display: block; }

/* 响应式 */
@media (max-width: 1024px) {
    .resource-stats { grid-template-columns: repeat(2, 1fr); }
    .price-compare { grid-template-columns: 1fr; padding: 32px; }
    .res-table { font-size: 13px; }
}
@media (max-width: 768px) {
    .filter-bar { padding: 16px; }
    .resource-stats { grid-template-columns: 1fr; }
    .res-table thead { display: none; }
    .res-table, .res-table tbody, .res-table tr, .res-table td { display: block; width: 100%; }
    .res-table tr { padding: 16px; border-bottom: 8px solid var(--c-bg-soft); }
    .res-table td { padding: 8px 0; border: 0; }
    /* 资源分类标签：窄屏允许换行，避免横向溢出 */
    .resource-tabs { flex-wrap: wrap; gap: 2px 4px; }
    .resource-tabs button { padding: 12px 16px; font-size: 14px; white-space: nowrap; }
}

@media (max-width: 480px) {
    .filter-bar { padding: 12px; }
    .filter-row .options { flex-wrap: wrap; gap: 8px; }
    .res-table tr { padding: 12px; }
    .res-table .btn { width: 100%; justify-content: center; }
    /* 搜索区：输入框占满一行，按钮换行，避免窄屏横向溢出 */
    .filter-actions { flex-wrap: wrap; }
    .filter-input { flex: 1 1 100%; }
    .filter-actions .btn { flex: 1 1 auto; }
    /* 分类标签在超小屏横向可滚动（不换行挤压）或换行 */
    .resource-tabs button { padding: 10px 12px; font-size: 13px; }
    .resource-tabs button .count { margin-left: 4px; padding: 1px 6px; font-size: 11px; }
}
