/* ============================================
   万合跨境贸易服务系统 - 前台主样式表
   ============================================ */

/* === 基础重置 === */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    color: #333; background: #fff; line-height: 1.6;
}
a { color: #1a56db; text-decoration: none; transition: color 0.3s; }
a:hover { color: #0d3ba0; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* === 头部导航 === */
.header {
    background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky; top: 0; z-index: 1000;
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 70px; flex-wrap: nowrap;
}
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo img { height: 45px; width: auto; }
.logo-text {
    font-size: 1.4rem; font-weight: 700; color: #1a56db;
    letter-spacing: 1px;
}
.main-nav ul { display: flex; gap: 5px; flex-wrap: nowrap; }
.main-nav a {
    display: block; padding: 8px 12px; color: #444;
    font-size: 0.95rem; border-radius: 4px; transition: all 0.3s;
    white-space: nowrap;
}
.main-nav a:hover, .main-nav a.active {
    color: #1a56db; background: #f0f5ff;
}
.header-right .hotline {
    font-size: 0.9rem; color: #1a56db; font-weight: 500;
}
.mobile-menu-btn {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 5px;
}
.mobile-menu-btn span {
    display: block; width: 24px; height: 2px; background: #333;
    transition: all 0.3s;
}
.mobile-nav {
    display: none; background: #fff; border-top: 1px solid #eee;
    padding: 10px 0;
}
.mobile-nav ul { display: flex; flex-direction: column; }
.mobile-nav a {
    display: block; padding: 12px 20px; color: #444;
    border-bottom: 1px solid #f5f5f5;
}

/* === 轮播图 === */
.banner-section { position: relative; overflow: hidden; }
.banner-slider { position: relative; height: 450px; }
.banner-slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0; transition: opacity 0.8s ease;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1a56db 0%, #0d3ba0 100%);
}
.banner-slide.active { opacity: 1; }
.banner-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(26,86,219,0.85) 0%, rgba(13,59,160,0.85) 100%);
    z-index: 1;
}
.banner-content {
    text-align: center; color: #fff; padding: 0 20px;
    max-width: 800px; position: relative; z-index: 2;
}
.banner-content h2 { font-size: 2.5rem; margin-bottom: 15px; font-weight: 700; }
.banner-content p { font-size: 1.2rem; opacity: 0.9; margin-bottom: 25px; }
.banner-btn {
    display: inline-block; padding: 12px 35px; background: #fff;
    color: #1a56db; border-radius: 30px; font-weight: 600;
    transition: all 0.3s;
}
.banner-btn:hover { background: #f0f5ff; transform: translateY(-2px); color: #1a56db; }
.banner-dots {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 10px; z-index: 10;
}
.banner-dots span {
    width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.5);
    cursor: pointer; transition: all 0.3s;
}
.banner-dots span.active { background: #fff; transform: scale(1.2); }

/* === 区块通用 === */
.section { padding: 70px 0; }
.section-alt { background: #f8fafc; }
.section-title {
    text-align: center; margin-bottom: 50px;
}
.section-title h2 {
    font-size: 2rem; color: #222; margin-bottom: 10px; font-weight: 700;
}
.section-title p { color: #666; font-size: 1rem; }
.section-title::after {
    content: ''; display: block; width: 60px; height: 3px;
    background: #1a56db; margin: 15px auto 0; border-radius: 2px;
}

/* === 服务板块 === */
.services-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px;
}
.service-card {
    background: #fff; border-radius: 10px; padding: 35px 25px;
    text-align: center; box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    transition: all 0.3s; border: 1px solid #f0f0f0;
}
.service-card:hover {
    transform: translateY(-5px); box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}
.service-icon { font-size: 3rem; margin-bottom: 15px; }
.service-card h3 { font-size: 1.2rem; margin-bottom: 10px; color: #222; }
.service-card p { color: #666; font-size: 0.9rem; line-height: 1.7; }

/* === 优势板块 === */
.advantages-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px;
}
.advantage-item {
    text-align: center; padding: 30px 20px;
    background: #fff; border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.advantage-num {
    font-size: 2.5rem; font-weight: 700; color: #1a56db; margin-bottom: 5px;
}
.advantage-item h4 { font-size: 1rem; color: #222; margin-bottom: 5px; }
.advantage-item p { font-size: 0.85rem; color: #888; }

/* === 案例展示 === */
.cases-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px;
}
.case-card {
    border-radius: 10px; overflow: hidden; background: #fff;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06); transition: all 0.3s;
}
.case-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.case-img {
    height: 200px; background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.5rem; font-weight: 600;
}
.case-info { padding: 20px; }
.case-info h3 { font-size: 1.1rem; margin-bottom: 8px; color: #222; }
.case-info p { color: #666; font-size: 0.9rem; line-height: 1.6; }
.case-tag {
    display: inline-block; padding: 3px 10px; background: #f0f5ff;
    color: #1a56db; border-radius: 3px; font-size: 0.8rem; margin-top: 10px;
}

/* === 新闻列表 === */
.news-list { display: flex; flex-direction: column; gap: 20px; }
.news-item {
    display: flex; gap: 20px; padding: 20px; background: #fff;
    border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s;
}
.news-item:hover { box-shadow: 0 5px 20px rgba(0,0,0,0.1); }
.news-thumb {
    width: 200px; min-height: 130px; border-radius: 8px; flex-shrink: 0;
    background: linear-gradient(135deg, #1a56db, #4f8cff);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.2rem;
}
.news-body { flex: 1; }
.news-body h3 { font-size: 1.15rem; margin-bottom: 8px; }
.news-body h3 a { color: #222; }
.news-body h3 a:hover { color: #1a56db; }
.news-meta { color: #999; font-size: 0.85rem; margin-bottom: 8px; }
.news-body p { color: #666; font-size: 0.9rem; line-height: 1.6; }

/* === 分页 === */
.pagination {
    display: flex; justify-content: center; gap: 5px;
    margin-top: 40px; flex-wrap: wrap;
}
.pagination a, .pagination span {
    display: inline-block; padding: 8px 14px; border: 1px solid #ddd;
    border-radius: 4px; color: #555; font-size: 0.9rem; transition: all 0.3s;
}
.pagination a:hover { border-color: #1a56db; color: #1a56db; }
.pagination a.active {
    background: #1a56db; color: #fff; border-color: #1a56db;
}

/* === 表单样式 === */
.form-section { max-width: 700px; margin: 0 auto; }
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block; margin-bottom: 6px; font-weight: 500;
    color: #444; font-size: 0.95rem;
}
.form-group label .required { color: #e53e3e; }
.form-control {
    width: 100%; padding: 12px 15px; border: 1px solid #ddd;
    border-radius: 6px; font-size: 0.95rem; transition: border-color 0.3s;
    font-family: inherit;
}
.form-control:focus { outline: none; border-color: #1a56db; box-shadow: 0 0 0 3px rgba(26,86,219,0.1); }
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control { appearance: auto; }
.btn {
    display: inline-block; padding: 12px 30px; border: none;
    border-radius: 6px; font-size: 1rem; cursor: pointer;
    transition: all 0.3s; font-family: inherit;
}
.btn-primary { background: #1a56db; color: #fff; }
.btn-primary:hover { background: #0d3ba0; transform: translateY(-1px); }
.btn-secondary { background: #6c757d; color: #fff; }
.btn-secondary:hover { background: #5a6268; }
.btn-success { background: #28a745; color: #fff; }
.btn-success:hover { background: #218838; }
.btn-danger { background: #dc3545; color: #fff; }
.btn-danger:hover { background: #c82333; }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-block { display: block; width: 100%; }

/* === 联系我们 === */
.contact-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px;
}
.contact-info-list { display: flex; flex-direction: column; gap: 20px; }
.contact-info-item {
    display: flex; gap: 15px; padding: 20px;
    background: #f8fafc; border-radius: 8px;
}
.contact-info-icon { font-size: 1.5rem; flex-shrink: 0; }
.contact-info-text h4 { font-size: 1rem; color: #222; margin-bottom: 5px; }
.contact-info-text p { color: #666; font-size: 0.9rem; }
.map-container {
    border-radius: 10px; overflow: hidden; background: #e8ecf1;
    min-height: 300px; display: flex; align-items: center;
    justify-content: center; color: #888;
}

/* === 关于我们 === */
.about-tabs {
    display: flex; gap: 5px; margin-bottom: 30px;
    border-bottom: 2px solid #eee; flex-wrap: wrap;
}
.about-tab {
    padding: 12px 25px; cursor: pointer; color: #666;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    transition: all 0.3s; font-size: 0.95rem;
}
.about-tab:hover { color: #1a56db; }
.about-tab.active { color: #1a56db; border-bottom-color: #1a56db; font-weight: 600; }
.about-content { display: none; }
.about-content.active { display: block; }
.about-content-box {
    background: #f8fafc; padding: 35px; border-radius: 10px;
    line-height: 1.8; color: #444;
}
.about-content-box h3 {
    font-size: 1.3rem; color: #222; margin-bottom: 15px;
    padding-bottom: 10px; border-bottom: 1px solid #e2e8f0;
}

/* === 服务详情页 === */
.service-detail { background: #fff; padding: 40px; border-radius: 10px; box-shadow: 0 2px 15px rgba(0,0,0,0.06); }
.service-detail h2 { font-size: 1.8rem; color: #222; margin-bottom: 20px; }
.service-detail-content { line-height: 1.8; color: #444; }
.service-detail-content ul { padding-left: 20px; }
.service-detail-content li { margin-bottom: 8px; }
.service-list-page .service-item-card {
    display: flex; gap: 25px; padding: 25px; margin-bottom: 20px;
    background: #fff; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s;
}
.service-item-card:hover { box-shadow: 0 5px 20px rgba(0,0,0,0.1); }
.service-item-icon { font-size: 2.5rem; flex-shrink: 0; }
.service-item-body h3 { font-size: 1.2rem; margin-bottom: 8px; }
.service-item-body p { color: #666; font-size: 0.9rem; line-height: 1.7; }

/* === 新闻详情 === */
.news-detail { background: #fff; padding: 40px; border-radius: 10px; box-shadow: 0 2px 15px rgba(0,0,0,0.06); }
.news-detail h2 { font-size: 1.6rem; color: #222; margin-bottom: 10px; }
.news-detail-meta { color: #999; font-size: 0.85rem; margin-bottom: 25px; padding-bottom: 15px; border-bottom: 1px solid #eee; }
.news-detail-content { line-height: 1.8; color: #444; }

/* === AI问答悬浮窗 === */
.ai-chat-float { position: fixed; bottom: 30px; right: 30px; z-index: 9999; }
.ai-chat-btn {
    width: 56px; height: 56px; border-radius: 50%;
    background: linear-gradient(135deg, #1a56db, #4f8cff);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 4px 15px rgba(26,86,219,0.4);
    transition: all 0.3s;
}
.ai-chat-btn:hover { transform: scale(1.1); }
.ai-icon { font-size: 1.5rem; }
.ai-chat-panel {
    position: absolute; bottom: 70px; right: 0;
    width: 360px; background: #fff; border-radius: 12px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.15); overflow: hidden;
}
.ai-chat-header {
    background: linear-gradient(135deg, #1a56db, #4f8cff);
    color: #fff; padding: 15px 20px;
    display: flex; justify-content: space-between; align-items: center;
    font-weight: 600;
}
.ai-chat-close {
    background: none; border: none; color: #fff;
    font-size: 1.5rem; cursor: pointer; line-height: 1;
}
.ai-chat-body {
    height: 300px; overflow-y: auto; padding: 15px;
}
.ai-msg {
    background: #f0f5ff; padding: 12px 15px; border-radius: 10px;
    margin-bottom: 10px; font-size: 0.9rem; line-height: 1.6;
}
.ai-msg.user { background: #1a56db; color: #fff; text-align: right; }
.ai-quick-questions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ai-quick-questions a {
    padding: 5px 12px; background: #fff; border: 1px solid #1a56db;
    border-radius: 15px; font-size: 0.8rem; color: #1a56db;
}
.ai-quick-questions a:hover { background: #1a56db; color: #fff; }
.ai-chat-footer {
    display: flex; gap: 8px; padding: 12px 15px; border-top: 1px solid #eee;
}
.ai-chat-footer input {
    flex: 1; padding: 8px 12px; border: 1px solid #ddd;
    border-radius: 20px; font-size: 0.9rem; outline: none;
}
.ai-chat-footer input:focus { border-color: #1a56db; }
.ai-chat-footer button {
    padding: 8px 18px; background: #1a56db; color: #fff;
    border: none; border-radius: 20px; cursor: pointer; font-size: 0.9rem;
}

/* === 页面Banner === */
.page-banner {
    background: linear-gradient(135deg, #1a56db 0%, #0d3ba0 100%);
    padding: 50px 0; text-align: center; color: #fff;
}
.page-banner h1 { font-size: 2rem; margin-bottom: 10px; }
.page-banner p { opacity: 0.8; font-size: 1rem; }
.breadcrumb {
    display: flex; justify-content: center; gap: 8px;
    margin-top: 10px; font-size: 0.85rem; opacity: 0.7;
}
.breadcrumb a { color: #fff; }

/* === 成功案例网格 === */
.cases-filter {
    display: flex; justify-content: center; gap: 10px;
    margin-bottom: 30px; flex-wrap: wrap;
}
.cases-filter a {
    padding: 8px 20px; border: 1px solid #ddd; border-radius: 20px;
    color: #666; font-size: 0.9rem; transition: all 0.3s;
}
.cases-filter a:hover, .cases-filter a.active {
    background: #1a56db; color: #fff; border-color: #1a56db;
}

/* === 底部Footer === */
.footer { background: #2B5DE0; color: #fff; padding: 50px 0 0; }
.footer-top {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px;
    padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.2);
}
.footer-col h4 {
    color: #fff; font-size: 1.05rem; margin-bottom: 15px;
    padding-bottom: 10px; border-bottom: 2px solid #1a56db;
    display: inline-block;
}
.footer-desc { font-size: 0.9rem; line-height: 1.7; margin-bottom: 10px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a { color: rgba(255,255,255,0.85); font-size: 0.9rem; }
.footer-col ul a:hover { color: #fff; }
.footer-contact li { font-size: 0.9rem; margin-bottom: 8px; color: rgba(255,255,255,0.9); }
.footer-bottom {
    text-align: center; padding: 20px 0; font-size: 0.85rem; color: rgba(255,255,255,0.7);
}

/* === 消息提示 === */
.alert {
    padding: 12px 20px; border-radius: 6px; margin-bottom: 20px;
    font-size: 0.9rem;
}
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* === 响应式适配 === */
@media (max-width: 992px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .advantages-grid { grid-template-columns: repeat(2, 1fr); }
    .cases-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .main-nav, .header-right { display: none; }
    .mobile-menu-btn { display: flex; }
    .mobile-nav.show { display: block; }
    .banner-slider { height: 300px; }
    .banner-content h2 { font-size: 1.6rem; }
    .banner-content p { font-size: 0.95rem; }
    .section { padding: 40px 0; }
    .section-title h2 { font-size: 1.5rem; }
    .services-grid { grid-template-columns: 1fr; }
    .advantages-grid { grid-template-columns: repeat(2, 1fr); }
    .cases-grid { grid-template-columns: 1fr; }
    .news-item { flex-direction: column; }
    .news-thumb { width: 100%; min-height: 150px; }
    .footer-top { grid-template-columns: 1fr; }
    .ai-chat-panel { width: 300px; right: -10px; }
    .page-banner h1 { font-size: 1.5rem; }
    .service-list-page .service-item-card { flex-direction: column; }
}
@media (max-width: 480px) {
    .advantages-grid { grid-template-columns: 1fr; }
    .header-inner { height: 55px; }
    .logo-text { font-size: 1.1rem; }
    .logo img { height: 35px; }
}
