/* ========== Floating CTA - compact site contact rail ========== */
.floating-cta-wrapper {
    position: fixed;
    right: 18px;
    top: 46%;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    transform: translateY(-50%);
}

.floating-contact-card {
    display: grid;
    gap: 7px;
    width: auto;
    padding: 6px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(10, 25, 49, 0.12);
    box-shadow: 0 10px 28px rgba(10, 25, 49, 0.12);
    backdrop-filter: blur(12px);
    text-align: center;
}

.floating-contact-card__title {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.floating-contact-card__wechat,
.floating-contact-card__phone {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-top: 0;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 6px;
    background: #1890ff;
    color: #ffffff;
    text-decoration: none;
    text-align: center;
    box-shadow: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.floating-contact-card__wechat {
    background: #168957;
}

.floating-contact-card__wechat:hover,
.floating-contact-card__wechat:focus-visible {
    background: #0f7247;
    border-color: rgba(22, 137, 87, 0.34);
    color: #ffffff;
    transform: translateX(-2px);
}

.floating-contact-card__phone:hover,
.floating-contact-card__phone:focus-visible {
    background: #005aee;
    color: #ffffff;
    transform: translateX(-2px);
}

.floating-contact-card__wechat svg,
.floating-contact-card__phone svg {
    width: 20px;
    height: 20px;
    color: #ffffff;
    flex: 0 0 auto;
}

.floating-contact-card__wechat svg {
    width: 23px;
    height: 23px;
    color: #ffffff;
}

.floating-contact-card__wechat span,
.floating-contact-card__phone span {
    position: absolute;
    top: 50%;
    right: calc(100% + 10px);
    width: max-content;
    max-width: 160px;
    padding: 8px 10px;
    border: 1px solid rgba(10, 25, 49, 0.12);
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(10, 25, 49, 0.12);
    color: #0a1931;
    opacity: 0;
    pointer-events: none;
    text-align: left;
    transform: translate(4px, -50%);
    transition: opacity 0.2s ease, transform 0.2s ease;
    visibility: hidden;
}

.floating-contact-card__wechat:hover span,
.floating-contact-card__wechat:focus-visible span,
.floating-contact-card__phone:hover span,
.floating-contact-card__phone:focus-visible span {
    opacity: 1;
    transform: translate(0, -50%);
    visibility: visible;
}

.floating-contact-card__wechat em,
.floating-contact-card__wechat strong,
.floating-contact-card__phone em,
.floating-contact-card__phone strong {
    display: block;
    font-style: normal;
}

.floating-contact-card__wechat em,
.floating-contact-card__phone em {
    font-size: 11px;
    color: #606f7b;
    opacity: 1;
}

.floating-contact-card__wechat strong,
.floating-contact-card__phone strong {
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.2;
    letter-spacing: 0;
}

/* 在 1480px 容器右侧留白不足时收到底部紧凑入口，避免遮挡首屏 Hero 与中部流程卡片 */
@media (max-width: 1620px) and (min-width: 769px) {
    .floating-cta-wrapper {
        right: 16px;
        top: auto;
        bottom: 20px;
        transform: none;
    }

    .floating-contact-card {
        grid-template-columns: repeat(2, 44px);
    }

    .floating-contact-card__wechat,
    .floating-contact-card__phone {
        transform: none;
    }

    .floating-contact-card__wechat:hover,
    .floating-contact-card__wechat:focus-visible,
    .floating-contact-card__phone:hover,
    .floating-contact-card__phone:focus-visible {
        transform: translateY(-2px);
    }

    .floating-contact-card__wechat span,
    .floating-contact-card__phone span {
        top: auto;
        right: 0;
        bottom: calc(100% + 8px);
        transform: translateY(4px);
    }

    .floating-contact-card__wechat:hover span,
    .floating-contact-card__wechat:focus-visible span,
    .floating-contact-card__phone:hover span,
    .floating-contact-card__phone:focus-visible span {
        transform: translateY(0);
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .floating-cta-wrapper {
        display: none;
    }
}
