:root {
    --primary-color: #2c7be5; /* 亮蓝色 */
    --secondary-color: #1a5c9e; /* 深蓝色 */
    --accent-color: #6f42c1; /* 强调色 */
    --bg-light: #f8f9fa;
    --text-main: #333;
    --text-light: #666;
    --border-color: #e2e8f0;
    --white: #ffffff;
    --transition: all 0.3s ease;
    --nav-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ================= Navbar ================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.logo img {
    height: 50px;
    width: auto;
}

.nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
    height: 100%;
}

.nav-center a {
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 500;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
}

.nav-center a:hover, .nav-center a.active {
    color: var(--primary-color);
}

.nav-center a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1.5rem;
    right: 1.5rem;
    height: 3px;
    background-color: var(--primary-color);
}

.nav-right {
    display: flex;
    align-items: center;
}

.hotline {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: bold;
}

.hotline svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* 汉堡菜单 (默认隐藏) */
.hamburger {
    display: none;
    cursor: pointer;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 1001;
}

.hamburger span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--secondary-color);
    border-radius: 3px;
    transition: var(--transition);
    left: 0;
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 10px; }
.hamburger span:nth-child(3) { top: 20px; }

.hamburger.active span:nth-child(1) {
    top: 10px;
    transform: rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    top: 10px;
    transform: rotate(-45deg);
}


/* ================= Hero Slider ================= */
.hero-slider {
    margin-top: var(--nav-height);
    height: 600px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #e0f2ff 0%, #f0f4f8 100%);
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1s ease;
}

.slide.active {
    opacity: 1;
}

.slide-content {
    max-width: 1200px;
    width: 100%;
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.slide-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1.2;
}

.slide p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--text-light);
    max-width: 600px;
}

.slide-link {
    display: inline-block;
    padding: 12px 35px;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-weight: bold;
    font-size: 1.1rem;
}

.slide-link:hover {
    background: var(--secondary-color);
}

/* ================= Animations ================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0; /* 初始不可见 */
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }

/* 滚动触发动画类 */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 接触图标样式 */
.icon-box-svg {
    width: 24px;
    height: 24px;
    stroke: var(--primary-color);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: middle;
    margin-right: 10px;
}

/* ================= Features Bar ================= */
.features-bar {
    background: var(--white);
    padding: 2.5rem 5%;
    display: flex;
    justify-content: center;
    gap: 5rem;
    border-bottom: 1px solid #eee;
}

.feature-item-bar {
    display: flex;
    align-items: center;
    gap: 15px;
}

.feature-icon-bar {
    width: 48px;
    height: 48px;
    stroke: var(--primary-color);
    stroke-width: 1.5;
    fill: none;
}

.feature-text-bar h4 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 4px;
}

.feature-text-bar p {
    font-size: 0.9rem;
    color: #888;
}

/* ================= Section General ================= */
.section {
    padding: 6rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 15px auto 0;
}

/* ================= Grid & Cards ================= */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.card {
    background: var(--white);
    padding: 3rem 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    transition: var(--transition);
    border: 1px solid transparent;
    text-align: center;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: #e0e0e0;
}

.card-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    stroke: var(--primary-color);
    stroke-width: 1.5;
    fill: none;
    display: block;
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #333;
}

.card p {
    color: #666;
    line-height: 1.7;
}

/* ================= Certifications ================= */
.cert-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.cert-item {
    background: var(--white);
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 4px;
    width: 200px;
    transition: var(--transition);
}

.cert-item:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.cert-item img {
    width: 100%;
    height: 260px;
    object-fit: contain;
    margin-bottom: 10px;
}

.cert-name {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

/* ================= Footer ================= */
footer {
    background: #0b1120;
    color: #a0aec0;
    padding: 5rem 5% 1rem;
    margin-top: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto 4rem;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.footer-col p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid #2d3748;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: #718096;
}

/* ================= Floating Sidebar ================= */
.floating-sidebar {
    position: fixed;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-item {
    width: 70px;
    height: 70px;
    background: var(--primary-color);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.sidebar-item:first-child {
    border-top-left-radius: 4px;
}

.sidebar-item:last-child {
    border-bottom-left-radius: 4px;
}

.sidebar-item:hover {
    background: var(--secondary-color);
    width: 140px; /* 展开效果 */
    align-items: flex-start;
    padding-left: 20px;
}

.sidebar-item .icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.sidebar-item .icon svg {
    width: 100%;
    height: 100%;
    fill: white;
}

.sidebar-item .text {
    opacity: 0;
    white-space: nowrap;
    margin-left: 40px;
    font-size: 0.9rem;
    line-height: 1.2;
    transition: opacity 0.3s;
}

.sidebar-item:hover .text {
    opacity: 1;
}

/* ================= Chat Widget New ================= */
.chat-widget-new {
    position: fixed;
    right: 90px;
    bottom: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.chat-widget-new.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.chat-header {
    background: var(--primary-color);
    color: white;
    padding: 15px 20px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

.chat-header .title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-header .close-btn {
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
}

.chat-body {
    flex: 1;
    background: #f5f7fa;
    padding: 20px;
    overflow-y: auto;
}

.chat-msg {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: flex-start;
}

.chat-msg .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
}

.chat-msg .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-msg .content {
    background: white;
    padding: 10px 15px;
    border-radius: 0 10px 10px 10px;
    font-size: 0.95rem;
    color: #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    max-width: 80%;
}

.chat-msg.user {
    flex-direction: row-reverse;
}

.chat-msg.user .content {
    background: var(--primary-color);
    color: white;
    border-radius: 10px 0 10px 10px;
}

.chat-footer {
    padding: 15px;
    background: white;
    border-top: 1px solid #eee;
    border-radius: 0 0 10px 10px;
    display: flex;
    gap: 10px;
}

.chat-footer input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    transition: border-color 0.3s;
}

.chat-footer input:focus {
    border-color: var(--primary-color);
}

.chat-footer button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.chat-footer button:hover {
    background: var(--secondary-color);
}

/* ================= Responsive ================= */
@media (max-width: 768px) {
    .navbar {
        padding: 0 20px;
    }

    .hamburger {
        display: block; /* 显示汉堡菜单 */
    }

    .nav-center {
        display: none; /* 默认隐藏 */
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        height: auto;
        flex-direction: column;
        background: var(--white);
        box-shadow: 0 10px 20px rgba(0,0,0,0.05);
        padding: 20px 0;
    }

    .nav-center.active {
        display: flex; /* 激活时显示 */
    }

    .nav-center a {
        height: 50px;
        width: 100%;
        justify-content: center;
    }
    
    .nav-center a.active::after {
        left: 30%;
        right: 30%;
    }

    .nav-right {
        display: none; /* 移动端隐藏热线，节省空间 */
    }

    .features-bar { flex-direction: column; gap: 2rem; text-align: center; }
    .feature-item-bar { justify-content: center; }
    .slide-content { flex-direction: column; text-align: center; }
    .slide-title { font-size: 2.2rem; }
    .floating-sidebar { display: none; } /* 移动端隐藏悬浮栏 */
    .grid-3 { grid-template-columns: 1fr; }
    
    /* 聊天窗口移动端适配 */
    .chat-widget-new {
        width: 90%;
        right: 5%;
        left: 5%;
        bottom: 20px;
    }
}
