/* --- 1. 全局重置 --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: #333333;
    background-color: #f9f9f9;
    scroll-behavior: smooth;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- 2. 导航栏 --- */
.navbar {
    background: #ffffff;
    height: 70px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 22px;
    font-weight: bold;
    color: #d32f2f;
    text-decoration: none;
}

.logo span {
    color: #333333;
    font-size: 18px;
    margin-left: 5px;
}

nav ul {
    display: flex;
    list-style: none;
    align-items: center;
}

nav ul li a {
    text-decoration: none;
    color: #444444;
    padding: 0 15px;
    font-size: 15px;
    transition: 0.3s;
}

nav ul li a:hover {
    color: #d32f2f;
}

.nav-btn {
    background-color: #d32f2f !important;
    color: #ffffff !important;
    padding: 8px 20px !important;
    border-radius: 20px;
    margin-left: 10px;
}

/* --- 3. Hero主视觉区 --- */
.hero {
    height: 75vh;
    background: url('https://unsplash.com') center/cover no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 0 20px;
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* --- 4. 按钮样式 (加入呼吸动画) --- */
.btn {
    padding: 12px 35px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin: 5px 10px;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: #d32f2f;
    color: #ffffff;
}

/* 白色咨询按钮：添加缓慢呼吸效果 */
.btn-secondary {
    background-color: #ffffff;
    color: #333333;
    animation: btn-breathing 3s infinite ease-in-out;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation-play-state: paused; /* 鼠标悬停时停止呼吸 */
}

/* --- 5. 优势功能板块 --- */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 60px 0;
}

.feature-item {
    background-color: #ffffff;
    padding: 40px 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.feature-item i {
    font-size: 40px;
    color: #d32f2f;
    margin-bottom: 20px;
}

.feature-item h3 {
    margin-bottom: 15px;
    color: #333;
}

/* --- 6. SEO文案 & 关于我们板块 --- */
.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 32px;
    color: #333;
    position: relative;
    padding-bottom: 10px;
}

.section-header h2::after {
    content: '';
    width: 60px;
    height: 3px;
    background: #d32f2f;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.about-section {
    padding: 80px 0;
    background-color: #ffffff;
}

.content-text {
    max-width: 900px;
    margin: 0 auto;
    color: #666;
    font-size: 17px;
    line-height: 1.8;
    text-align: center;
}

/* --- 7. 动态资讯板块 --- */
.news-section {
    padding: 80px 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.news-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.news-card h4 {
    color: #d32f2f;
    margin-bottom: 15px;
    font-size: 18px;
}

.news-card p {
    color: #888;
    font-size: 14px;
    line-height: 1.6;
}

/* --- 8. 注册表单区域 --- */
.register-section {
    padding: 80px 0;
    background-color: #f4f4f4;
}

.register-container {
    max-width: 450px;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 35px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.reg-form input {
    width: 100%;
    padding: 13px;
    margin-bottom: 18px;
    border: 1px solid #dddddd;
    border-radius: 4px;
    font-size: 15px;
    outline: none;
}

.reg-form input:focus {
    border-color: #d32f2f;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background-color: #d32f2f;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: bold;
}

.btn-submit:hover {
    background-color: #b71c1c;
}

/* --- 9. 页脚 --- */
footer {
    background-color: #1a1a1a;
    color: #999;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #333;
}

.footer-grid h4 {
    color: #ffffff;
    margin-bottom: 20px;
}

.footer-links a {
    color: #999;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    transition: 0.3s;
}

.footer-links a:hover {
    color: #ffffff;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    font-size: 13px;
}

/* --- 10. 悬浮客服 (加入强烈呼吸动画) --- */
.float-kefu {
    position: fixed;
    right: 20px;
    bottom: 40px;
    z-index: 999;
}

.kefu-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #d32f2f;
    color: #ffffff;
    text-decoration: none;
    border-radius: 50%;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.4);
    transition: 0.3s;
    /* 核心动画：2秒一个呼吸周期 */
    animation: kefu-breathing 2s infinite ease-in-out;
}

.kefu-item:hover {
    background-color: #b71c1c;
    transform: scale(1.1);
    animation-play-state: paused; /* 鼠标移动上去停止跳动，方便点击 */
}

.kefu-item i {
    font-size: 24px;
}

.kefu-item span {
    position: absolute;
    right: 70px;
    background: #333;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    display: none;
}

.kefu-item:hover span {
    display: block;
}

/* --- 11. 动画定义 --- */

/* 客服图标呼吸效果：光晕扩散 + 缩放 */
@keyframes kefu-breathing {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(211, 47, 47, 0.4);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 4px 25px rgba(211, 47, 47, 0.8);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(211, 47, 47, 0.4);
    }
}

/* 按钮呼吸效果：轻微缩放 */
@keyframes btn-breathing {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* --- 12. 移动端调整 --- */
@media screen and (max-width: 768px) {
    .navbar nav {
        display: none;
    }
    .hero h1 {
        font-size: 28px;
    }
    .hero p {
        font-size: 15px;
    }
    .btn {
        width: 100%;
        margin: 10px 0;
    }
    .container {
        width: 95%;
    }
    .float-kefu {
        right: 15px;
        bottom: 30px;
    }
}
