/* 全局样式 */
:root {
    /* 浅色主题变量 */
    --primary-color: #1a5f7a;
    --secondary-color: #2c88a0;
    --text-color: #333;
    --light-bg: #f5f5f5;
    --spacing: 2rem;
    --card-bg: white;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

/* 深色主题变量 */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #2c88a0;
        --secondary-color: #3aa7c2;
        --text-color: #e0e0e0;
        --light-bg: #2a2a2a;
        --card-bg: #333;
        --shadow-color: rgba(0, 0, 0, 0.3);
    }
    
    body {
        background: #1a1a1a;
    }
    
    .feature-card,
    .news-item {
        background: var(--card-bg);
    }
    
    .news-summary {
        color: #bbb;
    }
    
    .news-date {
        color: #999;
    }
}

/* 平滑过渡效果 */
* {
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

/* 导航栏样式 */
.main-nav {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: opacity 0.3s ease;
}

/* 头部样式 */
.main-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 0 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.background-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25px 25px, rgba(255, 255, 255, 0.2) 2%, transparent 0%),
        radial-gradient(circle at 75px 75px, rgba(255, 255, 255, 0.2) 2%, transparent 0%);
    background-size: 100px 100px;
    pointer-events: none;
    opacity: 0.5;
}

.main-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
}

.slogan {
    font-size: 1.4rem;
    opacity: 0.95;
    font-weight: 300;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing);
}

/* 章节样式 */
section {
    margin: 4rem 0;
}

.section-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
}

/* 特性卡片网格 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* 服务流程样式 */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.process-step {
    text-align: center;
    padding: 2rem;
    background: var(--light-bg);
    border-radius: 10px;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-weight: bold;
}

/* 列表样式 */
.advantages-list, .services-list {
    list-style: none;
    padding: 0;
}

.advantages-list li, .services-list li {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 5px;
}

/* 联系方式样式 */
.contact-section {
    text-align: center;
}

.contact-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background: var(--secondary-color);
}

/* 页脚样式 */
.main-footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .contact-buttons {
        flex-direction: column;
    }
    
    .process-steps {
        grid-template-columns: 1fr;
    }
}

/* 法务热点样式 */
.legal-news {
    margin: 4rem 0;
}

.news-intro {
    text-align: center;
    margin-bottom: 2rem;
    color: #666;
}

.news-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.news-item {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.news-date {
    display: inline-block;
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 0.5rem;
}

.news-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.news-summary {
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.news-link {
    display: inline-block;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
}

.news-link:hover {
    text-decoration: underline;
}

.view-more-button {
    display: block;
    width: max-content;
    margin: 0 auto;
    padding: 0.8rem 2rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    text-align: center;
}

.view-more-button:hover {
    background: var(--secondary-color);
}

/* 响应式设计 - 添加法务热点的响应式样式 */
@media (max-width: 768px) {
    .news-container {
        grid-template-columns: 1fr;
    }
    
    .news-item {
        padding: 1rem;
    }
}

/* 滚动进度条 */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--secondary-color);
    z-index: 1002;
    transition: width 0.1s ease;
}

/* 滚动到顶部按钮 */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
}

/* 深色主题支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #2c88a0;
        --secondary-color: #3aa7c2;
        --text-color: #e0e0e0;
        --light-bg: #2a2a2a;
        --card-bg: #333;
        --shadow-color: rgba(0, 0, 0, 0.3);
    }
    
    body {
        background: #1a1a1a;
    }
    
    .feature-card,
    .news-item {
        background: var(--card-bg);
    }
    
    .news-summary {
        color: #bbb;
    }
    
    .news-date {
        color: #999;
    }
}

/* 响应式设计补充 */
@media (max-width: 768px) {
    .hamburger {
        display: block;
        z-index: 1001;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 80%;
        background: var(--primary-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.3s ease;
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }
}

/* 在线咨询窗口样式 */
.chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.chat-toggle {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.chat-toggle:hover {
    transform: scale(1.1);
    background: var(--secondary-color);
}

.chat-toggle i {
    font-size: 24px;
}

.chat-container {
    position: absolute;
    bottom: calc(100% + 1rem);
    right: 0;
    width: 300px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.chat-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.chat-messages {
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.message {
    margin-bottom: 1rem;
    padding: 0.8rem;
    border-radius: 8px;
}

.message.system {
    background: #f0f0f0;
}

.message.user {
    background: var(--primary-color);
    color: white;
    margin-left: 20%;
}

.chat-input {
    padding: 1rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 0.5rem;
}

.chat-input textarea {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: none;
    height: 40px;
}

.send-message {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

.send-message:hover {
    background: var(--secondary-color);
}

/* 响应式适配 */
@media (max-width: 768px) {
    .chat-container {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
    
    .chat-header {
        border-radius: 0;
    }
}