/* ===== 服务详情页面样式 ===== */

/* 核心优势网格 */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.advantage-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 32px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.advantage-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.advantage-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.advantage-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.advantage-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.advantage-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 功能网格 */
.functions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.function-card {
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.function-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.function-icon {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.function-icon img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* 案例网格 */
.cases-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 40px;
}

.case-card {
    position: relative;
    width: 100%;
    min-height: 120px;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.case-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.case-icon {
    width: 100%;
    height: 100%;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.case-icon img {
    width: 100%;
    height: auto;
    min-height: 120px;
    object-fit: contain;
}

.case-card h3 {
    display: none;
}

.case-card p {
    display: none;
}

/* 筛选服务卡片 */
.screening-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-light);
    scroll-margin-top: 100px; /* 为 hash 定位预留空间 */
}

.screening-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.screening-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.screening-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.screening-card-desc {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.btn-detail {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--brand-color);
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-detail:hover {
    background: var(--brand-dark);
    transform: translateX(4px);
}

/* 触达方式卡片 */
.reach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

/* 厂商消息资源 - 垂直单列布局 */
.reach-vertical-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 40px;
}

/* 第一行：两列平分布局 */
.reach-row-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.reach-vertical-grid .reach-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.reach-vertical-grid .reach-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.reach-vertical-grid .reach-card h3 {
    margin-top: 16px;
    margin-bottom: 8px;
}

/* 文字在图标上方 */
.reach-title-above {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-align: center;
}

.reach-desc-above {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: center;
    max-width: 600px;
    white-space: nowrap;
}

.reach-card {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    text-align: center;
    transition: none;
}

.reach-card:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

.reach-icon {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reach-icon img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* AI产品卡片 */
.product-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--brand-color);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.product-icon {
    font-size: 32px;
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.product-desc {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.product-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--brand-color);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.product-link:hover {
    color: var(--brand-dark);
    gap: 10px;
}

/* 标签网格 - 独立样式（在section级别） */
.tags-flow {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
    padding: 24px;
    background: var(--bg-gray);
    border-radius: 12px;
}

/* screening-card 内部的标签流 */
.screening-card .tags-flow {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-light);
    border-radius: 8px;
}

.tag-item {
    padding: 10px 20px;
    background: var(--bg-white);
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.tag-item:hover {
    background: var(--brand-color);
    color: white;
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Hash 定位目标高亮动画 */
.screening-card:target {
    animation: highlight-pulse 1.5s ease-in-out;
    border-color: var(--brand-color);
}

@keyframes highlight-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(114, 112, 83, 0);
        border-color: var(--brand-color);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(114, 112, 83, 0.3);
        border-color: var(--brand-light);
    }
    100% {
        box-shadow: 0 0 0 20px rgba(114, 112, 83, 0);
        border-color: var(--border-color);
    }
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* Hash 定位目标高亮动画 - 功能卡片 */
.function-card:target {
    animation: highlight-pulse 1.5s ease-in-out;
    border-color: var(--brand-color);
}

/* Hash 定位目标高亮动画 - 触达卡片 */
.reach-card:target {
    animation: highlight-pulse 1.5s ease-in-out;
    border-color: var(--brand-color);
}

/* Hash 定位目标高亮动画 - 产品展示卡片 */
.product-showcase-card:target {
    animation: highlight-pulse 1.5s ease-in-out;
    border-color: var(--brand-color);
}

/* Hash 定位目标滚动偏移 */
.function-card:target,
.reach-card:target,
.product-showcase-card:target {
    scroll-margin-top: 100px;
}

/* 响应式 */
@media (max-width: 768px) {
    .advantages-grid,
    .functions-grid,
    .cases-grid,
    .reach-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .reach-row-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .advantage-card,
    .function-card,
    .case-card,
    .reach-card {
        padding: 20px;
    }

    .tags-flow {
        gap: 8px;
    }

    .tag-item {
        padding: 8px 16px;
        font-size: 13px;
    }
}
