/* styles.css */

/* 全局样式和重置 */
:root {
    --primary-color: #0056b3; /* 蓝色，作为主要品牌色 */
    --accent-color: #28a745; /* 绿色，作为CTA亮点色 */
    --neutral-bg: #f8f9fa; /* 浅灰色，作为背景色 */
    --dark-text: #343a40; /* 深灰色，用于正文 */
    --light-text: #ffffff; /* 白色，用于深色背景上的文字 */
    --card-bg: #ffffff;
    --border-color: #e9ecef;
    --font-family-primary: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-family-heading: 'Georgia', serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-primary);
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--neutral-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

button {
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
}

/* 聊天机器人样式 */
.chatbot {
    position: fixed;
    bottom: 10px;
    right: 10px;
    z-index: 1001;
}

.chatbot button {
    background-color: var(--accent-color);
    color: #ffffff;
    border: none;
    padding: 12px 20px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s ease;
}

.chatbot-modal {
    display: none;
    position: fixed;
    bottom: 25px;
    right: 5px;
    width: 360px;
    background: #ffffff; 
    color: #000000; 
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    padding: 10px;
    z-index: 1002;
    max-height: 50vh; 
    overflow-y: auto; 
    position: relative; 
    padding-bottom: 30px; 
}

.chatbot-modal.active ~ .chatbot button {
    opacity: 0;
    pointer-events: none;
}

.chatbot-messages {
    padding-bottom: 10px; /* 防止消息内容与底部输入框重叠 */
}
 
.chatbot-input {
    position: absolute; /* 设为绝对定位 */
    bottom: 0; /* 固定在底部 */
    left: 0;
    right: 0;
    background-color: #ffffff; /* 确保背景色与chatbot-modal一致 */
    padding: 8px 10px;
    height: 50px;  /* 添加固定高度限制 */
    display: flex;
    border-top: 1px solid #e9ecef; /* 添加顶部边框以分隔输入区域 */
}
 
.chatbot-input input {
    flex-grow: 1;
    height: 32px;  /* 添加输入框高度限制 */
    margin-right: 10px;
}
 
.chatbot-input button {
    white-space: nowrap; /* 防止按钮文字换行 */
}
 
.chatbot-modal .close {
    position: absolute; /* 设为绝对定位 */
    top: 10px; /* 固定在顶部 */
    right: 10px; /* 固定在右侧 */
    cursor: pointer;
    z-index: 1; /* 确保按钮在对话框内容之上 */
}

.chat-box {
    max-width: 360px;
    margin: 0 auto;
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 5px;
}
.chat-history {
    height: 200px;
    overflow-y: auto;
    border: 1px solid #eee;
    padding: 10px;
    margin-bottom: 10px;
}
.chat-input {
    width: 65%;
    padding: 8px;
}


/* 头部导航 */
.site-header {
    background-color: var(--light-text);
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

#brightVideo {
    filter: brightness(1.0); /* 增加50%亮度 */
}

.site-header .container {
    display: flex;
    align-items: center;
}

.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px; /* Logo大小 */
}

.text-logo {
    margin-left: 10px;
    font-family: var(--font-family-primary);
    font-size: 1.5em;
    font-weight: bold;
    color: var(--primary-color);
}

.main-nav {
    flex-grow: 1;
    margin-left: 20px;
}

.main-nav .nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav .nav-list li {
    margin-left: 30px;
}

.main-nav .nav-list a {
    font-weight: bold;
    color: var(--dark-text);
    padding: 5px 0;
    position: relative;
}

.main-nav .nav-list a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.main-nav .nav-list a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none; /* 默认隐藏，在移动端显示 */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    z-index: 1001;
    padding: 0;
}

.icon-bar {
    width: 100%;
    height: 3px;
    background-color: var(--dark-text);
    transition: all 0.3s ease;
}

.menu-toggle.active .icon-bar:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
}

.menu-toggle.active .icon-bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .icon-bar:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
}

/* 新增收回菜单按钮 */
.close-menu {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 24px;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1002;
    color: var(--dark-text);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--light-text);
    text-align: center;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -1;
    transform: translate(-50%, -50%);
    background-size: cover;
    filter: brightness(0.5);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.hero-content h1 {
    font-family: var(--font-family-heading);
    font-size: 3.5em;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.2em;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--light-text);
    padding: 15px 30px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    background-color: #1e7e34; /* darken(var(--accent-color), 10%) 的近似值 */
    transform: translateY(-2px);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.9em;
    animation: bounce 2s infinite;
}

.arrow-down {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid var(--light-text);
    margin-top: 5px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* 解决方案 Section */
.solutions-section, .insights-section {
    padding: 60px 0;
    text-align: center;
}

.solutions-section h2, .insights-section h2 {
    font-family: var(--font-family-heading);
    font-size: 2.5em;
    margin-bottom: 40px;
    color: var(--primary-color);
}

.solution-grid, .insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.solution-card, .insight-item {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.solution-card:hover, .insight-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.solution-card img, .insight-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* 新增样式：图标组 */
.icon-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
}

/* 新增样式：小图标 */
.icon-group img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.solution-card h3, .insight-item h3 {
    font-family: var(--font-family-heading);
    font-size: 1.8em;
    padding: 20px 20px 10px;
    color: var(--primary-color);
}

.solution-card p, .insight-item p {
    padding: 0 20px 15px;
    font-size: 0.95em;
}

.solution-card .learn-more, .insight-item .read-more {
    display: block;
    padding: 15px 20px;
    background-color: var(--primary-color);
    color: var(--light-text);
    text-align: center;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.solution-card .learn-more:hover, .insight-item .read-more:hover {
    background-color: #003d80; /* darken(var(--primary-color), 10%) 的近似值 */
}

.insight-item time {
    display: block;
    font-size: 0.85em;
    color: #6c757d;
    padding: 0 20px 10px;
}

/* 联系我们 Section */
.contact-section {
    background: linear-gradient(135deg, var(--primary-color), #003366);
    color: var(--light-text);
    padding: 80px 0;
}

.contact-section h2 {
    font-family: var(--font-family-heading);
    font-size: 3.0em;
    margin-bottom: 20px;
    text-align: center;
}

.contact-section p {
    font-size: 1.1em;
    margin-bottom: 40px;
    text-align: center;
}

.contact-content {
    display: flex;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-text {
    flex: 1;
    text-align: left;
    padding: 20px;
}

.contact-form {
    flex: 1;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.submit-button {
    background-color: var(--accent-color);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
}

.submit-button:hover {
    background-color: #0056b3;
}

.textarea-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.counter {
    position: absolute;
    right: 10px;
    bottom: 10px;
    font-size: 12px;
    color: #999;
    background: rgba(255,255,255,0.9);
    padding: 2px 5px;
    border-radius: 3px;
    transition: color 0.3s;
}

.counter.active {
    color: #4CAF50;
    font-weight: bold;
}

@media (max-width: 768px) {
    .contact-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .contact-text,
    .contact-form {
        width: 100%;
    }
}


/* 页脚 */
.site-footer {
    background-color: var(--dark-text);
    color: rgba(255, 255, 255, 0.7);
    padding: 40px 0;
    text-align: center;
    font-size: 0.9em;
}

.site-footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    margin: 0 15px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--light-text);
}

.social-media a {
    margin: 0 10px;
    display: inline-block;
}

.social-media img {
    height: 200px;
    width: 200px;
    transition: transform 0.3s ease;
}

.social-media img:hover {
    transform: scale(1.1);
}

/* 移动端响应式设计 */
@media (max-width: 576px) {
    .header-bar {
        flex-wrap: wrap;
    }

    .chatbot-modal { bottom: 25px; }
    .chatbot { bottom: 5px; }
    
    .text-logo {
        font-size: 1.2em; /* 减小字体大小以适应移动端 */
    }

    .main-nav {
        display: none;
        position: fixed;
        top: 70px; /* Adjusted to appear below the header */
        right: 0;
        width: 250px; /* Smaller width for a compact block */
        background-color: var(--card-bg); /* Solid white background */
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        padding: 20px;
        border-radius: 0 0 0 10px; /* Rounded bottom-left corner */
        opacity: 0;
        transform: translateY(-100%); /* Start above the viewport */
        transition: opacity 0.3s ease, transform 0.3s ease;
        z-index: 1000;
    }

    .main-nav .nav-list {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-nav .nav-list li {
        margin: 15px 0;
        width: 100%;
    }

    .main-nav .nav-list a {
        display: block;
        padding: 10px;
        width: 100%;
    }

    .main-nav.active {
        display: block;
        opacity: 1;
        transform: translateY(0); /* Slide down into view */
    }

    .menu-toggle {
        display: flex;
    }

    .close-menu {
        display: block; /* Ensure close button is visible in mobile view */
    }
}

    .social-media img {
        width: 120px;
        height: 120px;
    }
    
    .hero-content h1 {
        font-size: 2.5em; /* 调整为你需要的字号 */
    }
    
    .solutions-section h2, .insights-section h2 {
    font-family: var(--font-family-heading);
    font-size: 2.0em;
    margin-bottom: 40px;
    color: var(--primary-color);
    }
    
    .contact-section h2 {
    font-family: var(--font-family-heading);
    font-size: 3.0em;
    margin-bottom: 20px;
    }
    .solution-card h3, .insight-item h3 {
    font-family: var(--font-family-heading);
    font-size: 1.5em;
    padding: 20px 20px 10px;
    color: var(--primary-color);
    }

/* 针对中国市场的一些特定调整（概念性） */
@media (max-width: 768px) {
    .solution-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

.wechat-qr {
    margin-top: 20px;
}

.wechat-qr img {
    display: block;
    margin: 0 auto;
}