/* ======================================================
   阿美巴咨询 - 企业商务官网
   配色: 深蓝 #163E70 | 浅灰 #F5F7FA | 正文 #333
   字体: 思源黑体
   ====================================================== */

/* === CSS变量 === */
:root {
    --primary: #163E70;
    --primary-dark: #0F2D52;
    --primary-light: #1E5A9E;
    --primary-lightest: #E8F0FE;
    --bg: #F5F7FA;
    --bg-section: #FFFFFF;
    --text: #333;
    --text-light: #666;
    --text-lighter: #999;
    --border: #E0E4E8;
    --white: #FFFFFF;
    --shadow: 0 2px 12px rgba(22,62,112,0.08);
    --shadow-hover: 0 6px 24px rgba(22,62,112,0.15);
    --radius: 8px;
    --radius-lg: 12px;
    --max-width: 1200px;
    --nav-height: 68px;
}

/* === 全局重置与基础 === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Source Han Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    padding-top: var(--nav-height);
}

img { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-light); }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* === 顶部导航栏 === */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-height);
    background: var(--white);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.navbar .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2em;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.navbar .logo-icon {
    width: 36px; height: 36px;
    background: var(--primary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 900;
    font-size: 16px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-menu li a {
    display: block;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.95em;
    color: var(--text);
    transition: all 0.2s;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    color: var(--white);
    background: var(--primary);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
}

.hamburger span {
    display: block;
    width: 24px; height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: all 0.3s;
}

/* === 页面标题区 === */
.page-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    color: var(--white);
    padding: 60px 0 50px;
    text-align: center;
}

.page-header h1 {
    font-size: 2em;
    margin-bottom: 12px;
    border: none;
    color: var(--white);
}

.page-header p {
    font-size: 1.05em;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

/* === 首页 - Hero区 === */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 40%, var(--primary-light) 100%);
    color: var(--white);
    padding: 100px 0 90px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0; right: 0;
    height: 60px;
    background: var(--bg);
    clip-path: ellipse(70% 100% at 50% 100%);
}

.hero h1 {
    font-size: 2.4em;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: 1px;
    border: none;
    color: var(--white);
}

.hero .subtitle {
    font-size: 1.15em;
    opacity: 0.92;
    max-width: 750px;
    margin: 0 auto 30px;
    line-height: 1.8;
}

.hero .hero-btn {
    display: inline-block;
    padding: 14px 40px;
    background: var(--white);
    color: var(--primary);
    border-radius: 50px;
    font-weight: 700;
    font-size: 1em;
    transition: all 0.3s;
    border: 2px solid var(--white);
}

.hero .hero-btn:hover {
    background: transparent;
    color: var(--white);
}

/* === 通用区块 === */
.section-block {
    padding: 70px 0;
}

.section-block.bg-white { background: var(--bg-section); }
.section-block.bg-gray { background: var(--bg); }

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 1.8em;
    color: var(--primary);
    margin-bottom: 12px;
    border: none;
}

.section-title .divider {
    width: 50px;
    height: 3px;
    background: var(--primary);
    margin: 0 auto 16px;
    border-radius: 2px;
}

.section-title p {
    color: var(--text-light);
    font-size: 1.05em;
    max-width: 650px;
    margin: 0 auto;
}

/* === 首页 - 简介区 === */
.about-intro {
    text-align: center;
    max-width: 850px;
    margin: 0 auto;
    font-size: 1.05em;
    color: var(--text-light);
    line-height: 2;
}

.about-intro .about-btn {
    display: inline-block;
    margin-top: 24px;
    padding: 12px 32px;
    background: var(--primary);
    color: var(--white);
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.3s;
}

.about-intro .about-btn:hover { background: var(--primary-dark); color: var(--white); }

/* === 首页 - 核心业务卡片（三列预览）=== */
.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.service-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.service-card .card-icon {
    width: 56px; height: 56px;
    background: var(--primary-lightest);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.service-card .card-icon svg {
    width: 28px; height: 28px;
    stroke: var(--primary);
    fill: none;
    stroke-width: 1.8;
}

.service-card h3 {
    font-size: 1.1em;
    margin-bottom: 10px;
    color: var(--primary);
}

.service-card .card-desc {
    color: var(--text-light);
    font-size: 0.93em;
    line-height: 1.7;
    flex: 1;
    margin-bottom: 16px;
}

.service-card .card-detail {
    font-size: 0.9em;
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 12px;
}

.service-card .card-detail .highlight {
    color: var(--primary);
    font-weight: 600;
}

.service-card .card-btn {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s;
    align-self: flex-start;
}

.service-card .card-btn:hover {
    background: var(--primary);
    color: var(--white);
}

/* === 核心业务总览页 - 大卡片 === */
.service-grid-full {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
}

.service-card-full {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: start;
}

.service-card-full:hover { box-shadow: var(--shadow-hover); }

.service-card-full .card-icon {
    width: 64px; height: 64px;
    background: var(--primary-lightest);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.service-card-full .card-icon svg {
    width: 32px; height: 32px;
    stroke: var(--primary);
    fill: none;
    stroke-width: 1.8;
}

.service-card-full .card-body h3 {
    font-size: 1.2em;
    color: var(--primary);
    margin-bottom: 8px;
}

.service-card-full .card-body p {
    color: var(--text-light);
    font-size: 0.95em;
    line-height: 1.8;
}

.service-card-full .card-body .highlight {
    color: var(--primary);
    font-weight: 600;
}

.service-card-full .card-action {
    flex-shrink: 0;
    align-self: center;
}

.service-card-full .card-btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--primary);
    color: var(--white);
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.3s;
}

.service-card-full .card-btn:hover { background: var(--primary-dark); color: var(--white); }

/* === 首页 - 特色/服务理念 === */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.feature-item {
    text-align: center;
    padding: 24px 16px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.feature-item .num {
    font-size: 2em;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}

.feature-item h4 {
    font-size: 1em;
    margin-bottom: 6px;
}

.feature-item p {
    font-size: 0.88em;
    color: var(--text-light);
}

/* === 通用页面内容 === */
.page-content {
    background: var(--white);
}

.page-content .content-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 50px 24px;
}

.page-content h2 {
    font-size: 1.4em;
    margin: 36px 0 16px;
    color: var(--primary);
}

.page-content h3 {
    font-size: 1.15em;
    margin: 24px 0 10px;
    color: var(--text);
}

.page-content p {
    margin: 12px 0;
    color: var(--text-light);
    line-height: 1.9;
}

.page-content ul {
    margin: 10px 0 10px 20px;
}

.page-content ul li {
    margin: 6px 0;
    color: var(--text-light);
    line-height: 1.7;
}

/* === FAQ区 === */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
}

.faq-question {
    padding: 16px 20px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.faq-question:hover { background: var(--primary-lightest); }

.faq-question::after {
    content: '+';
    font-size: 1.3em;
    color: var(--primary);
    transition: transform 0.3s;
}

.faq-item.active .faq-question::after {
    content: '-';
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 20px 16px;
    color: var(--text-light);
    line-height: 1.8;
    display: none;
}

.faq-item.active .faq-answer { display: block; }

/* === 案例 === */
.case-list { max-width: 800px; margin: 0 auto; }

.case-item {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
    transition: box-shadow 0.3s;
}

.case-item:hover { box-shadow: var(--shadow); }

.case-item h3 {
    color: var(--primary);
    margin-bottom: 12px;
    font-size: 1.1em;
}

.case-item p {
    color: var(--text-light);
    font-size: 0.95em;
    margin: 6px 0;
}

/* === 联系方式 === */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.contact-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    transition: box-shadow 0.3s;
}

.contact-card:hover { box-shadow: var(--shadow); }

.contact-card h3 {
    font-size: 1.1em;
    color: var(--primary);
    margin-bottom: 14px;
}

.contact-card p, .contact-card li {
    color: var(--text-light);
    font-size: 0.95em;
    line-height: 1.8;
}

.contact-card ul { list-style: none; margin: 0; }
.contact-card ul li { padding: 4px 0; }

/* === 底部页脚 === */
.footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.85);
    padding: 50px 0 30px;
}

.footer .footer-grid {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer h4 {
    color: var(--white);
    font-size: 1em;
    margin-bottom: 16px;
    font-weight: 700;
}

.footer p, .footer li {
    font-size: 0.9em;
    line-height: 2;
    opacity: 0.8;
}

.footer a {
    color: rgba(255,255,255,0.8);
    transition: opacity 0.2s;
}

.footer a:hover { opacity: 1; color: var(--white); }

.footer ul { list-style: none; margin: 0; }
.footer ul li::before {
    content: '› ';
    color: var(--primary-light);
    font-weight: 700;
}

.footer .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.85em;
    opacity: 0.7;
}

.footer .footer-brand {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
}

.footer .contact-placeholder {
    opacity: 0.5;
    font-size: 0.85em;
    font-style: italic;
}

/* === 按钮居中 === */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }

/* === 响应式 - 平板 === */
@media (max-width: 1024px) {
    .service-grid { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .service-card-full { grid-template-columns: 1fr; }
    .service-card-full .card-action { text-align: right; }
    .footer .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* === 响应式 - 手机 === */
@media (max-width: 768px) {
    .hamburger { display: flex; }

    .nav-menu {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0; right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }

    .nav-menu.active { display: flex; }

    .nav-menu li a {
        padding: 12px 16px;
        border-radius: 6px;
    }

    .hero { padding: 60px 0 50px; }
    .hero h1 { font-size: 1.6em; }
    .hero .subtitle { font-size: 1em; }

    .section-block { padding: 50px 0; }
    .section-title h2 { font-size: 1.4em; }
    .page-header h1 { font-size: 1.5em; }
    .page-header { padding: 40px 0 35px; }

    .service-grid { grid-template-columns: 1fr; }
    .service-grid-full { grid-template-columns: 1fr; }
    .service-card-full { padding: 24px 20px; }
    .service-card-full .card-body p { font-size: 0.9em; }

    .features-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .feature-item { padding: 16px 12px; }

    .contact-grid { grid-template-columns: 1fr; }
    .footer .footer-grid { grid-template-columns: 1fr; gap: 24px; }

    .container { padding: 0 16px; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.3em; }
    .features-grid { grid-template-columns: 1fr; }
    .navbar .logo { font-size: 1em; }
}

/* === 弹窗组件 === */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
.popup-overlay.active { display: flex; }
.popup-box {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 480px;
    width: 90%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}
.popup-close {
    position: absolute;
    top: 12px; right: 16px;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--text-lighter);
    background: none;
    border: none;
}
.popup-close:hover { color: var(--text); }
.popup-box h3 {
    font-size: 1.15em;
    color: var(--primary);
    margin-bottom: 20px;
}
.popup-box .form-group {
    margin-bottom: 14px;
}
.popup-box .form-group label {
    display: block;
    font-size: 0.9em;
    color: var(--text);
    margin-bottom: 4px;
    font-weight: 600;
}
.popup-box .form-group input,
.popup-box .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.95em;
    font-family: inherit;
    transition: border-color 0.2s;
}
.popup-box .form-group input:focus,
.popup-box .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}
.popup-box .form-group textarea {
    height: 80px;
    resize: vertical;
}
.popup-box .submit-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
}
.popup-box .submit-btn:hover { background: var(--primary-dark); }
.popup-box .submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.popup-box .form-msg {
    margin-top: 10px;
    font-size: 0.9em;
    text-align: center;
}

/* 浮动咨询按钮 */
.float-consult {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 0.8em;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(22,62,112,0.3);
    z-index: 9998;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.float-consult:hover { transform: scale(1.1); }

/* 表单提交成功提示 */
.popup-box .success-msg {
    text-align: center;
    padding: 30px 0;
}
.popup-box .success-msg .icon {
    font-size: 3em;
    margin-bottom: 12px;
}
.popup-box .success-msg p {
    color: var(--text-light);
    font-size: 0.95em;
}

@media (max-width: 768px) {
    .popup-box { padding: 24px; }
    .float-consult { bottom: 20px; right: 20px; width: 48px; height: 48px; font-size: 0.7em; }
}
