/**
 * Product Selection hub styles.
 *
 * 本文件只服务 `/product-select/` 导航入口页。颜色优先读取 `root.css`
 * 中已有的 `--v2-*` 与 `--thm-*` 变量，避免为单页重新定义割裂的视觉系统。
 */

.product-selection-hub {
    background:
        linear-gradient(180deg, rgba(247, 249, 252, 0.96), rgba(255, 255, 255, 1) 42%),
        var(--v2-bg-functional);
}

.selection-hub-intro {
    max-width: 860px;
    margin: 0 auto 38px;
    text-align: center;
}

.selection-hub-eyebrow,
.selection-tool-kicker {
    margin: 0 0 10px;
    color: var(--thm-base, #2f67d8);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.selection-hub-intro h2 {
    margin: 0 0 14px;
    color: var(--v2-text-heading);
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.08;
    letter-spacing: 0;
}

.selection-hub-intro p {
    margin: 0;
    color: var(--v2-text-secondary, #5f6b7a);
    font-size: 17px;
    line-height: 1.72;
}

.selection-tool-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.selection-tool-card {
    display: flex;
    min-height: 360px;
    flex-direction: column;
    justify-content: space-between;
    padding: 28px;
    border: 1px solid var(--v2-bg-divider);
    border-radius: var(--v2-radius-sm);
    background: var(--v2-bg-primary);
    box-shadow: var(--v2-shadow-card);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.selection-tool-card:hover,
.selection-tool-card:focus-within {
    transform: translateY(-4px);
    border-color: rgba(var(--v2-primary-500-rgb), 0.35);
    box-shadow: var(--v2-shadow-card-hover);
}

.selection-tool-icon {
    display: inline-flex;
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    border-radius: var(--v2-radius-sm);
    background: rgba(var(--v2-primary-500-rgb), 0.1);
    color: var(--v2-primary-500);
    font-size: 24px;
}

.selection-tool-copy h3 {
    margin: 0 0 14px;
    color: var(--v2-text-heading);
    font-size: 24px;
    line-height: 1.22;
    letter-spacing: 0;
}

.selection-tool-copy p:last-child {
    margin: 0;
    color: var(--v2-text-body);
    line-height: 1.68;
}

.selection-tool-copy a {
    color: var(--v2-text-link);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.selection-tool-link,
.selection-secondary-link {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 9px;
    margin-top: 28px;
    padding: 12px 16px;
    border-radius: var(--v2-radius-sm);
    background: var(--v2-primary-500);
    color: var(--v2-text-inverse);
    font-weight: 800;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.selection-tool-link:hover,
.selection-secondary-link:hover {
    transform: translateY(-1px);
    background: var(--v2-primary-600);
    color: var(--v2-text-inverse);
    text-decoration: none;
}

.selection-hub-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 30px;
    padding: 26px 28px;
    border: 1px solid var(--v2-bg-divider);
    border-radius: var(--v2-radius-sm);
    background: linear-gradient(135deg, rgba(var(--v2-primary-500-rgb), 0.09), var(--v2-bg-primary) 74%);
}

.selection-hub-note h3 {
    margin: 0 0 8px;
    color: var(--v2-text-heading);
    font-size: 22px;
}

.selection-hub-note p {
    max-width: 720px;
    margin: 0;
    color: var(--v2-text-body);
    line-height: 1.65;
}

.product-selection-hub .selection-hub-note h3 {
    font-size: 24px;
    line-height: 32px;
    font-weight: 500;
}

.product-selection-hub .selection-hub-note p:not(.selection-tool-kicker) {
    font-size: 16px;
    line-height: 24px;
}

.product-selection-hub .selection-secondary-link {
    border-radius: 22px;
    font-size: 16px;
    line-height: 24px;
    font-weight: 600;
}

.selection-hub-list {
    display: grid;
    gap: var(--v2-spacing-md);
    margin-top: 30px;
}

/**
 * `/pre-sales/` 咨询入口页会复用导航页的基础卡片，但它展示的是说明信息，
 * 不需要工具导航卡那种高卡片和底部 CTA 对齐，因此在页面级 class 下单独压缩。
 */
.pre-sales-entry-page {
    background: var(--v2-bg-functional);
}

.pre-sales-entry-page .selection-hub-intro h2,
.pre-sales-entry-page .selection-hub-note h3 {
    color: var(--v2-text-heading);
}

.pre-sales-entry-page .selection-hub-intro h2 {
    max-width: 720px;
    margin-right: auto;
    margin-left: auto;
    font-size: 32px;
    line-height: 40px;
    font-weight: 500;
}

.pre-sales-entry-page .selection-hub-intro p,
.pre-sales-entry-page .selection-hub-note p {
    color: var(--v2-text-body);
    font-size: 16px;
    line-height: 24px;
}

.pre-sales-entry-page .selection-hub-note h3 {
    font-size: 24px;
    line-height: 32px;
    font-weight: 500;
}

.pre-sales-entry-page .selection-secondary-link {
    border-radius: var(--v2-radius-button-pill, 22px);
    font-size: 16px;
    line-height: 24px;
    font-weight: 600;
}

.pre-sales-entry-page + .atf-Subscribe-area .atf-subscribe-panel,
.pre-sales-entry-page + .atf-Subscribe-area .atf-subscribe-form,
.pre-sales-entry-page + .atf-Subscribe-area .atf-subscribe-input,
.pre-sales-entry-page + .atf-Subscribe-area .atf-subscribe-btn {
    border-radius: 8px;
}

.product-selection-hub + .atf-Subscribe-area .atf-subscribe-copy h3 {
    font-size: 24px;
    line-height: 32px;
    font-weight: 500;
}

.pre-sales-consultation ~ .atf-Subscribe-area .atf-subscribe-copy h3 {
    font-size: 24px;
    line-height: 32px;
    font-weight: 500;
}

.pre-sales-consultation ~ .atf-Subscribe-area .atf-subscribe-panel,
.pre-sales-consultation ~ .atf-Subscribe-area .atf-subscribe-form,
.pre-sales-consultation ~ .atf-Subscribe-area .atf-subscribe-input,
.pre-sales-consultation ~ .atf-Subscribe-area .atf-subscribe-btn {
    border-radius: 8px;
}

.product-selection-hub + .atf-Subscribe-area .atf-subscribe-panel,
.product-selection-hub + .atf-Subscribe-area .atf-subscribe-form,
.product-selection-hub + .atf-Subscribe-area .atf-subscribe-input,
.product-selection-hub + .atf-Subscribe-area .atf-subscribe-btn {
    border-radius: 8px;
}

@media (max-width: 991.98px) {
    .selection-tool-grid {
        grid-template-columns: 1fr;
    }

    .selection-tool-card {
        min-height: 0;
    }

    .selection-hub-note {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 575.98px) {
    .selection-hub-intro {
        text-align: left;
    }

    .pre-sales-entry-page .selection-hub-intro h2 {
        font-size: 24px;
        line-height: 32px;
    }

    .pre-sales-entry-page .selection-hub-note h3 {
        font-size: 20px;
        line-height: 28px;
    }

    .product-selection-hub .selection-hub-note h3,
    .pre-sales-consultation ~ .atf-Subscribe-area .atf-subscribe-copy h3,
    .product-selection-hub + .atf-Subscribe-area .atf-subscribe-copy h3 {
        font-size: 20px;
        line-height: 28px;
    }

    .selection-tool-card,
    .selection-hub-note {
        padding: 22px;
    }

    .selection-tool-link,
    .selection-secondary-link {
        width: 100%;
        justify-content: center;
    }

    .product-selection-hub .selection-secondary-link,
    .pre-sales-entry-page .selection-secondary-link {
        border-radius: 21px;
    }
}

/* Product Selection hub mobile layout */
@media (max-width: 767px) {
    .product-selection-hub.atf-section-padding {
        padding-top: 48px;
        padding-bottom: 48px;
    }

    .product-selection-hub > .container {
        max-width: 100%;
        padding-right: 16px;
        padding-left: 16px;
    }

    .product-selection-hub .selection-hub-intro {
        margin-bottom: 28px;
    }

    .product-selection-hub .selection-hub-intro h2 {
        font-size: 28px;
        line-height: 36px;
    }

    .product-selection-hub .selection-hub-intro p,
    .product-selection-hub .selection-tool-copy p:last-child,
    .product-selection-hub .selection-hub-note p:not(.selection-tool-kicker) {
        font-size: 14px;
        line-height: 22px;
    }

    .product-selection-hub .selection-tool-grid {
        gap: 16px;
    }

    .product-selection-hub .selection-tool-card,
    .product-selection-hub .selection-hub-note {
        padding: 20px;
    }

    .product-selection-hub .selection-tool-icon {
        margin-bottom: 16px;
    }

    .product-selection-hub .selection-tool-copy h3,
    .product-selection-hub .selection-hub-note h3 {
        font-size: 20px;
        line-height: 28px;
    }

    .product-selection-hub .selection-tool-link,
    .product-selection-hub .selection-secondary-link {
        min-height: 44px;
        margin-top: 20px;
    }

    .product-selection-hub .selection-hub-note {
        gap: 16px;
        margin-top: 20px;
    }
}
