/* =====================================================================
 * common.css — 公共工具类（标题元素 + 跨模块可复用工具类）
 * =====================================================================
 *
 * 【本文件的定位 — 仅放"工具类"，不做页面级 reset】
 *   1. 全站统一定义的元素样式（h1 / h2 / h3）
 *   2. 可跨模块复用的工具类（背景色、对齐、布局容器等）
 *
 * 注意：html / body 等页面级 reset（包括 overflow-x 兜底）
 * 不在本文件范围内，由 header.css（页面第一个 css）负责。
 *
 * =====================================================================
 *
 * 【维护规则 — 请务必遵守】
 *
 *  1) 标题元素 h1 / h2 / h3
 *     - 已经在本文件统一定义完毕。
 *     - 任何其他 css 文件（home.css / footer.css / header.css
 *       以及将来新增的模块 css）都【不要】再写 h1 / h2 / h3 选择器，
 *       也【不要】给标题写自定义类（如 .title-xx、.my-h1 等）。
 *     - 页面里需要不同对齐时，统一使用工具类：
 *           .text-center    —— 居中（内部用 !important 覆盖默认居左）
 *       而不是再写一遍 h1/h2/h3 { text-align: center; }。
 *
 *  2) 页面模块（section / banner / about …）
 *     - 凡是公共类能表达的效果，都必须【优先复用】本文件的工具类，
 *       不要在模块 css 里重新声明。
 *         .section-container —— 全宽 section，上下内边距 60px
 *         .section-content   —— 内容容器，最大 1400px 居中
 *         .bgf9f9f9          —— 浅灰背景
 *         .bgaccent          —— 主题强调色背景（var(--accent)）
 *         .bgprimary         —— 主题主色背景（var(--primary)）
 *         .text-center       —— 文本居中
 *     - 模块 css（home.css / footer.css 等）只写
 *       【本模块独有】的样式：模块自身布局、专属组件、内部组件。
 *     - header.css / footer.css 这类【通用框架模块】的 css 应该
 *       【完全自包含】：自身的 :root 变量、reset、组件样式、兜底规则
 *       都写在各自文件里，【不要】从 common.css 借用工具类。
 *
 *  3) 新增公共类的位置
 *     - 如果一个样式需要在多个模块复用，请把它加到本文件，
 *       并在注释里说明用途，不要散落到各模块里。
 *
 * ===================================================================== */


/* ---------- 基础元素：标题 ---------- */
h1 {
    font-size: 48px;
    font-weight: 600;
    line-height: 1.2;
    text-align: left;
    margin: 0;
}

h2 {
    font-size: 32px;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    margin: 0;
}

h3 {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
}

.card-title{
    font-size: 18px;
    font-weight: 500;
    line-height: 1.4;
}

.color-fff{
    color: #fff !important;
}
/* ---------- 工具类：对齐 ---------- */
/* 给任意元素（包括 h1/h2/h3）追加居中对齐，
   !important 用于覆盖 h1/h2 在 common.css 里定义的 text-align: left。 */
.text-center {
    text-align: center !important;
}


/* ---------- 工具类：背景色 ---------- */
.bgf9f9f9 {
    background-color: #f9f9f9;
}

.bgf8f8f8{
    background-color: #f8f8f8;

}

.bgf7f7f7{
    background-color: #f7f7f7;

}

.bgaccent {
    background-color: var(--accent);
}

.bgprimary {
    background-color: var(--primary);
}

.bg2b2f49{
    background-color: rgba(66, 74, 210, 0.1);
}


/* ---------- 工具类：模块布局容器 ----------
   任何全宽 section 都套用 .section-container；
   内部内容统一放进 .section-content，即可自动限宽 1400px 居中。 */
.section-container {
    width: 100%;
    padding: 60px 0;
}

.section-content {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    box-sizing: border-box;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.cta-btn--white {
    background-color: #fff;
    color: var(--accent);
}

.cta-btn--white:hover {
    background-color: var(--accent);
    color: #fff !important;

}

.cta-btn--outline {
    background-color: transparent;
    color: #fff;
    border: 1px solid #fff;
}

.cta-btn--outline:hover {
    background-color: var(--accent);
    color: #fff !important;
}

/* ===== 7. 右下角 WhatsApp 浮动按钮 ===== */
.whatsapp-float {
    position: fixed;
    right: 40px;
    bottom: 115px;
    z-index: 999;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    font-size: 30px;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.45);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    -webkit-tap-highlight-color: transparent;
    animation: waPulse 2.2s infinite;
}

.whatsapp-float i {
    display: block;
}

/* 悬停效果 */
.whatsapp-float:hover {
    background: #20bd5a;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.55);
    animation-play-state: paused;
}

/* 点击效果 */
.whatsapp-float:active {
    transform: scale(0.95);
}

/* 呼吸光圈动画 */
@keyframes waPulse {
    0% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.45),
        0 0 0 0 rgba(37, 211, 102, 0.5);
    }
    70% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.45),
        0 0 0 14px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.45),
        0 0 0 0 rgba(37, 211, 102, 0);
    }
}


/* ==================== Back to Top Button (回到顶部按钮) ==================== */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent);
}

.back-to-top:active {
    transform: translateY(-1px);
}

/* ---------- 响应式设计 ---------- */

/* Tablet */
@media (max-width: 1024px) {
    h1 {
        font-size: 40px;
    }

    h2 {
        font-size: 28px;
    }

    h3 {
        font-size: 17px;
    }

    .card-title{
        font-size: 17px;
    }

    .section-container {
        padding: 50px 0;
    }

    .section-content {
        padding: 0 20px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    h1 {
        font-size: 32px;
        line-height: 1.3;
    }

    h2 {
        font-size: 24px;
        line-height: 1.3;
    }

    h3 {
        font-size: 16px;
        line-height: 1.4;
    }

    .card-title{
        font-size: 16px;
        line-height: 1.4;
    }

    .section-container {
        padding: 40px 0;
    }

    .section-content {
        padding: 0 16px;
    }


    /* CTA Section */
    .cta-content h2 {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .cta-content p {
        font-size: 15px;
        margin-bottom: 24px;
    }

    .cta-buttons {
        gap: 15px;
    }

    .cta-btn {
        padding: 10px 24px;
        font-size: 15px;
    }

    .section-subtitle {
        font-size: 15px;
        margin-top: 10px;
        margin-bottom: 35px;
    }

    .whatsapp-float {
        right: 16px;
        bottom: 16px;
        width: 50px;
        height: 50px;
        font-size: 26px;
    }

    .back-to-top {
        bottom: 80px !important;
        right: 20px !important;
        width: 45px !important;
        height: 45px !important;
        font-size: 18px !important;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    h1 {
        font-size: 28px;
        line-height: 1.3;
    }

    h2 {
        font-size: 20px;
        line-height: 1.3;
    }

    h3 {
        font-size: 15px;
        line-height: 1.4;
    }

    .card-title{
        font-size: 15px;
        line-height: 1.4;
    }

    .section-container {
        padding: 30px 0;
    }

    .section-content {
        padding: 0 15px;
    }

    /* CTA Section */
    .cta-content {
        padding: 15px 0;
    }

    .cta-content h2 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .cta-content p {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .cta-btn {
        width: 100%;
        padding: 11px 20px;
        font-size: 14px;
        text-align: center;
    }
}



