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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #4b5563;
    background-color: #ffffff;
    line-height: 1.6;
}

/* 头部样式 */
.header {
    height: 90px;
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #0a1929;
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 64px;
}

.nav-item {
    font-size: 18px;
    color: #4b5563;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.nav-item:hover {
    color: #3b82f6;
}

.nav-item.active {
    color: #3b82f6;
}

.nav-item.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -9px;
    width: 100%;
    height: 1px;
    border-top: 5px solid #3b82f6;
    border-radius: 2px;
    transform-origin: 0 0;
    transform: scaleY(0.5);
}


/* 主要内容样式 */
.main-content {
    margin-top: 90px;
    min-height: calc(100vh - 210px);
}

/* 联系信息通用样式 */
.contact-section {
    margin-top: 80px;
    text-align: center;
    padding: 0 20px;
}

.contact-section h2 {
    font-size: 32px;
    color: #0a1929;
    margin-bottom: 20px;
    font-weight: 700;
}

.contact-section p {
    font-size: 18px;
    color: #4b5563;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.contact-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
}

.contact-info p {
    font-size: 16px;
    color: #0a1929;
    margin: 0;
}

.contact-info span {
    font-weight: 600;
    margin-right: 8px;
}

/* 底部样式 */
.footer {
    background-color: #f3f4f6;
    padding: 40px 0;
    margin-top: 60px;
    width: 100%;
}

.footer-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.copyright-info {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
    display: block;
}

.icp-info {
    display: block;
    text-align: center;
    font-size: 14px;
    color: #6b7280;
    margin: 0 auto;
    width: 100%;
}

.icp-info span,
.icp-info a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0 8px;
    color: #6b7280;
    text-decoration: none;
    vertical-align: middle;
}

.icp-info a:hover {
    color: #3b82f6;
}

.gongan-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin: 0;
}






/* 加载状态和错误提示样式 */
.loading {
    text-align: center;
    padding: 20px;
    color: #6b7280;
    font-size: 14px;
}

.error {
    text-align: center;
    padding: 20px;
    color: #ef4444;
    font-size: 14px;
}

/* 进度条样式 */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background-color: #3b82f6;
    z-index: 9999;
    transition: width 0.2s ease;
}

/* 提示消息样式 */
.toast-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    font-size: 16px;
    z-index: 3000;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s, transform 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    max-width: 300px;
    word-wrap: break-word;
}

/* 返回顶部按钮样式 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #3b82f6;
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, background-color 0.2s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.back-to-top:hover {
    background-color: #2563eb;
}

.back-to-top:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4);
}

/* FAQ 动画样式 */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer.active {
    max-height: 1000px; /* 足够大的值来容纳内容 */
}

/* 响应式设计增强 */
@media (max-width: 768px) {
    .header {
        height: 80px;
    }

    .main-content {
        margin-top: 80px;
    }

    .header-container {
        padding: 0 15px;
    }

    .logo {
        font-size: 20px;
    }

    .nav {
        display: none;
    }


    .contact-section {
        padding: 0 15px;
        margin-top: 60px; /* 减少移动端的上边距 */
    }

    .contact-section h2 {
        font-size: 24px;
        line-height: 1.3;
    }

    .contact-section p {
        font-size: 16px;
        line-height: 1.6;
    }

    .contact-info {
        flex-direction: column;
        gap: 20px;
    }

    .icp-info {
        display: block;
        text-align: center;
    }

    .icp-info span,
    .icp-info a {
        display: block;
        margin: 8px 0;
        justify-content: center;
    }

    /* 移动端优化：触摸反馈 */
    .nav-item,
    button {
        -webkit-tap-highlight-color: transparent;
    }

    /* 移动端表单优化 */
    input,
    textarea,
    button {
        font-size: 16px;
    }

    /* 移动端返回顶部按钮位置调整 */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* 平板设备优化 */
@media (min-width: 769px) and (max-width: 1024px) {
    .nav {
        gap: 40px; /* 减小导航项间距 */
    }

    .nav-item {
        font-size: 16px; /* 减小字体大小 */
    }
}

/* 打印样式优化 */
@media print {
    .header,
    .footer,
    .back-to-top {
        display: none;
    }
    .main-content {
        margin-top: 0;
        min-height: auto;
    }
}
