/**
 * 科研IT灵活用工介绍页样式
 *
 * 复用 aibox.css 的产品介绍页骨架，强调色换成用工模块的玫红色系。
 * 两处使用：
 *   - body.rwi-page  根目录 researchwork.php（独立落地页）
 *   - body.rwi-embed web/researchwork/howto.php（嵌在 main-content 里的站内页）
 * 使用前需先引入 aibox.css。
 */

/* ========== 主题色覆盖 ========== */
body.rwi-page .aibox-hero::before {
    background: radial-gradient(ellipse at center, rgba(236, 72, 153, 0.09) 0%, transparent 70%);
}

body.rwi-page .aibox-hero-badge,
.rwi-page .aibox-section-tag,
.rwi-embed .aibox-section-tag {
    background: rgba(236, 72, 153, 0.1);
    color: #db2777;
}

body.rwi-page .aibox-btn-primary,
body.rwi-embed .aibox-btn-primary {
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
}

body.rwi-page .aibox-btn-primary:hover,
body.rwi-embed .aibox-btn-primary:hover {
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4);
}

body.rwi-page .aibox-btn-outline:hover,
body.rwi-embed .aibox-btn-outline:hover {
    border-color: #ec4899;
    color: #db2777;
}

body.rwi-page .aibox-nav-menu a:hover,
body.rwi-page .aibox-nav-menu a.active {
    color: #db2777;
}

body.rwi-page .aibox-card:hover {
    border-color: rgba(236, 72, 153, 0.3);
}

.rwi-page .aibox-card-icon,
.rwi-embed .aibox-card-icon {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.14) 0%, rgba(190, 24, 93, 0.14) 100%);
}

.rwi-page .aibox-notice,
.rwi-embed .aibox-notice {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.06) 0%, rgba(190, 24, 93, 0.06) 100%);
    border-color: rgba(236, 72, 153, 0.18);
}

.rwi-page .aibox-notice strong,
.rwi-embed .aibox-notice strong {
    color: #db2777;
}

body.rwi-page .aibox-footer a {
    color: #db2777;
}

/* ========== 单列 Hero（无产品图） ========== */
.rwi-hero-single {
    position: relative;
    z-index: 1;
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
}

.rwi-hero-single .aibox-hero-lead {
    margin-left: auto;
    margin-right: auto;
}

.rwi-hero-single .aibox-tags {
    justify-content: center;
}

/* ========== 平台数据 ========== */
.rwi-stats-section {
    padding-top: 48px;
    padding-bottom: 48px;
}

.rwi-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.rwi-stat {
    text-align: center;
    padding: 22px 16px;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.07) 0%, rgba(139, 92, 246, 0.07) 100%);
    border: 1px solid rgba(236, 72, 153, 0.14);
    border-radius: 14px;
}

.rwi-stat strong {
    display: block;
    font-size: 1.875rem;
    font-weight: 700;
    color: #db2777;
    line-height: 1.15;
    margin-bottom: 6px;
}

.rwi-stat span {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.rwi-stats-note {
    margin: 20px 0 0;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ========== 对比表 ========== */
.rwi-table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.rwi-compare-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.rwi-compare-table th,
.rwi-compare-table td {
    padding: 14px 18px;
    text-align: left;
    vertical-align: top;
    font-size: 0.9375rem;
    line-height: 1.6;
    border-bottom: 1px solid var(--border-color);
}

.rwi-compare-table thead th {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    white-space: nowrap;
}

.rwi-compare-table tbody th {
    width: 108px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.rwi-compare-table tbody td {
    color: var(--text-secondary);
}

.rwi-compare-table tr:last-child th,
.rwi-compare-table tr:last-child td {
    border-bottom: none;
}

.rwi-compare-table .rwi-col-us {
    background: rgba(236, 72, 153, 0.05);
    color: var(--text-primary);
    font-weight: 600;
}

.rwi-compare-table thead .rwi-col-us {
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
    color: #fff;
}

/* ========== 服务内容 ========== */
.rwi-service-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.rwi-service {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px 22px;
    transition: all 0.25s ease;
}

.aibox-section.alt .rwi-service {
    background: var(--bg-primary);
}

.rwi-service:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(236, 72, 153, 0.1);
    border-color: rgba(236, 72, 153, 0.3);
}

.rwi-service h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(236, 72, 153, 0.25);
}

.rwi-service ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rwi-service li {
    position: relative;
    padding: 5px 0 5px 16px;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.rwi-service li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 13px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #ec4899;
}

/* ========== 用工流程 ========== */
.rwi-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.rwi-step {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px 22px;
}

.aibox-section.alt .rwi-step {
    background: var(--bg-primary);
}

.rwi-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 16px;
}

.rwi-step h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 10px;
}

.rwi-step p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
}

.rwi-step p strong {
    color: #db2777;
}

.rwi-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
}

/* ========== 用工案例 ========== */
.rwi-case-groups {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.rwi-case-group {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px 22px;
    transition: all 0.25s ease;
}

.aibox-section.alt .rwi-case-group {
    background: var(--bg-primary);
}

.rwi-case-group:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(236, 72, 153, 0.1);
    border-color: rgba(236, 72, 153, 0.3);
}

.rwi-case-group h3 {
    display: inline-block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #db2777;
    background: rgba(236, 72, 153, 0.1);
    border-radius: 999px;
    padding: 5px 14px;
    margin: 0 0 14px;
}

.rwi-case-group ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rwi-case-group li {
    position: relative;
    padding: 6px 0 6px 18px;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.rwi-case-group li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 14px;
    width: 6px;
    height: 6px;
    border-radius: 2px;
    background: rgba(236, 72, 153, 0.55);
}

.rwi-cases-note {
    margin: 28px 0 0;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ========== 站内页（嵌在 main-content 里）覆盖 ========== */
body.rwi-embed .aibox-section {
    padding: 40px 0;
}

body.rwi-embed .aibox-section:first-child {
    padding-top: 8px;
}

body.rwi-embed .aibox-section.alt {
    background: transparent;
}

body.rwi-embed .aibox-wrap {
    max-width: 100%;
    padding: 0;
}

body.rwi-embed .aibox-section-header {
    margin-bottom: 32px;
}

body.rwi-embed .aibox-section-title {
    font-size: 1.5rem;
}

body.rwi-embed .rwi-stats-section {
    padding-top: 8px;
    padding-bottom: 32px;
}

/* 站内页深浅底交替靠边框区分，避免与 page-body 背景冲突 */
body.rwi-embed .aibox-section + .aibox-section {
    border-top: 1px solid var(--border-color);
}

/* ========== 响应式 ========== */
@media (max-width: 1100px) {
    .rwi-service-grid,
    .rwi-steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .rwi-case-groups {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .rwi-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .rwi-service-grid,
    .rwi-steps,
    .rwi-case-groups {
        grid-template-columns: 1fr;
    }

    .rwi-stat strong {
        font-size: 1.5rem;
    }
}
