/* ============================================================
   山东庆通市政工程有限公司 官网样式
   风格：稳重国企风（深蓝主色 + 红色点缀）
   ============================================================ */

:root {
    --primary:       #0b3d6b;   /* 深蓝主色 */
    --primary-dark:  #082c4f;
    --primary-light: #14518c;
    --accent:        #c1272d;   /* 红色点缀 */
    --bg:            #f4f6f9;
    --card:          #ffffff;
    --text:          #2b2b2b;
    --muted:         #8a94a6;
    --border:        #e3e8ef;
    --maxw:          1200px;
}

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

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Source Han Sans CN", "Hiragino Sans GB", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    font-size: 15px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- 顶部信息条 ---------- */
.topbar {
    background: var(--primary-dark);
    color: #cdd8e6;
    font-size: 13px;
}
.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 36px;
}
.topbar-contact span { margin-left: 18px; }

/* ---------- 头部 / Logo / 导航 ---------- */
.header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 50;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 78px;
}
.logo { display: flex; flex-direction: column; line-height: 1.1; }
.logo-cn {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 2px;
}
.logo-en { font-size: 11px; color: var(--muted); letter-spacing: 1px; }

.nav ul { display: flex; }
.nav li { position: relative; }
.nav li a {
    display: block;
    padding: 0 20px;
    height: 78px;
    line-height: 78px;
    font-size: 16px;
    color: #333;
    transition: color .2s;
}
.nav li a:hover { color: var(--accent); }
.nav li.active a { color: var(--accent); }
.nav li.active::after {
    content: "";
    position: absolute;
    left: 20px; right: 20px; bottom: 0;
    height: 3px;
    background: var(--accent);
}

/* 移动端汉堡 */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px; height: 20px;
    background: none; border: none; cursor: pointer;
}
.nav-toggle span { display: block; height: 3px; background: var(--primary); border-radius: 2px; }

/* ---------- Banner ---------- */
.banner {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
    color: #fff;
    padding: 90px 0;
    position: relative;
    overflow: hidden;
}
.banner::after {
    content: "";
    position: absolute;
    right: -80px; top: -80px;
    width: 320px; height: 320px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}
.banner h1 { font-size: 40px; letter-spacing: 3px; margin-bottom: 16px; }
.banner p { font-size: 18px; opacity: .9; max-width: 640px; }
.banner .btn {
    display: inline-block;
    margin-top: 28px;
    padding: 12px 32px;
    background: var(--accent);
    color: #fff;
    border-radius: 4px;
    font-size: 16px;
    transition: background .2s;
}
.banner .btn:hover { background: #a51f24; }

/* ---------- 通用区块 ---------- */
.section { padding: 60px 0; }
.section-title {
    display: flex;
    align-items: center;
    margin-bottom: 36px;
}
.section-title .bar {
    width: 5px; height: 26px;
    background: var(--accent);
    margin-right: 12px;
    border-radius: 2px;
}
.section-title h2 { font-size: 26px; color: var(--primary); letter-spacing: 1px; }
.section-title .more { margin-left: auto; color: var(--muted); font-size: 14px; }
.section-title .more:hover { color: var(--accent); }

/* ---------- 卡片栅格 ---------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 28px 24px;
    transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(11,61,107,.12); }
.card .icon {
    width: 50px; height: 50px;
    background: rgba(11,61,107,.08);
    color: var(--primary);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: 700;
    margin-bottom: 16px;
}
.card h3 { font-size: 18px; color: var(--primary); margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 14px; }

/* ---------- 内页头图 ---------- */
.page-hero {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    padding: 56px 0;
}
.page-hero h1 { font-size: 32px; letter-spacing: 2px; }
.page-hero p { opacity: .85; margin-top: 8px; }

/* ---------- 内容排版 ---------- */
.content p { margin-bottom: 16px; color: #444; }
.content h3 { color: var(--primary); margin: 28px 0 12px; font-size: 20px; }
.content ul.list li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 10px;
    color: #444;
}
.content ul.list li::before {
    content: "";
    position: absolute; left: 4px; top: 11px;
    width: 8px; height: 8px;
    background: var(--accent);
    border-radius: 50%;
}

/* ---------- 工程案例 ---------- */
.case-card { overflow: hidden; padding: 0; }
.case-card .thumb {
    height: 180px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 18px; letter-spacing: 1px;
}
.case-card .body { padding: 18px 20px; }
.case-card .body h3 { font-size: 17px; color: var(--primary); margin-bottom: 8px; }
.case-card .body span { color: var(--muted); font-size: 13px; }

/* ---------- 资质荣誉 ---------- */
.honor-item {
    background: #fff; border: 1px solid var(--border);
    border-radius: 6px; padding: 22px; text-align: center;
}
.honor-item .medal {
    width: 56px; height: 56px; margin: 0 auto 12px;
    background: rgba(193,39,45,.1); color: var(--accent);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 26px; font-weight: 700;
}
.honor-item h4 { color: var(--primary); font-size: 16px; margin-bottom: 6px; }
.honor-item p { color: var(--muted); font-size: 13px; }

/* ---------- 新闻列表 ---------- */
.news-item {
    display: flex; gap: 18px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}
.news-item .date {
    flex: 0 0 72px;
    text-align: center;
    background: var(--primary);
    color: #fff;
    border-radius: 6px;
    padding: 10px 0;
}
.news-item .date .d { font-size: 24px; font-weight: 700; display: block; }
.news-item .date .y { font-size: 12px; opacity: .8; }
.news-item .info h3 { font-size: 17px; color: #333; margin-bottom: 6px; }
.news-item .info h3:hover { color: var(--accent); }
.news-item .info p { color: var(--muted); font-size: 14px; }

/* ---------- 联系方式 ---------- */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info p { margin-bottom: 14px; font-size: 16px; }
.contact-info .label { color: var(--primary); font-weight: 700; margin-right: 8px; }
/* 联系页地图导航 */
.map-card {
    margin-top: 6px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: linear-gradient(135deg, #f5f9fd, #eaf1f9);
    padding: 20px;
}
.map-card-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.map-pin { font-size: 26px; line-height: 1; }
.map-card-head h3 { margin: 0 0 4px; font-size: 17px; color: var(--primary-dark); }
.map-addr { margin: 0; font-size: 14px; color: #445; line-height: 1.6; }
.map-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.map-btn {
    flex: 1 1 130px; text-align: center; padding: 12px 10px;
    color: #fff; text-decoration: none; border-radius: 6px;
    font-size: 15px; font-weight: 600;
    transition: opacity .2s, transform .1s;
}
.map-btn:hover { opacity: .92; }
.map-btn:active { transform: translateY(1px); }
.map-btn.baidu   { background: #2e66d6; }
.map-btn.amap    { background: #1aad7e; }
.map-btn.tencent { background: #1bb1ed; }
.map-tip { margin-top: 14px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.map-fail-tip { display: none; margin: 12px 0 0; padding: 10px 14px; background: #fff4f4; border: 1px solid #ffd6d6; border-radius: 6px; color: #c0392b; font-size: 13px; line-height: 1.6; }

/* 联系页百度内嵌地图 */
.map-baidu { margin-top: 6px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
#bdmap-container { width: 100%; height: 380px; background: #eef3f8; }

/* ---------- 表单 ---------- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; color: var(--primary); font-weight: 600; }
.form-group input, .form-group textarea {
    width: 100%; padding: 11px 14px;
    border: 1px solid var(--border); border-radius: 5px;
    font-size: 15px; font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none; border-color: var(--primary-light);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.btn-submit {
    background: var(--accent); color: #fff; border: none;
    padding: 12px 36px; font-size: 16px; border-radius: 5px; cursor: pointer;
    transition: background .2s;
}
.btn-submit:hover { background: #a51f24; }
.alert { padding: 12px 16px; border-radius: 5px; margin-bottom: 18px; font-size: 14px; }
.alert-success { background: #e7f6ec; color: #1b7a3d; border: 1px solid #b6e2c4; }
.alert-error   { background: #fdeaea; color: #c1272d; border: 1px solid #f3c4c4; }

/* ---------- 页脚 ---------- */
.footer { background: var(--primary-dark); color: #c7d3e2; margin-top: 40px; }
.footer-inner {
    display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 40px;
    padding: 48px 20px 32px;
}
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.footer-nav li { margin-bottom: 8px; }
.footer-nav a:hover { color: #fff; }
.footer-col p { font-size: 14px; margin-bottom: 8px; color: #aebccf; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 16px 0; text-align: center;
    font-size: 13px; color: #8c9bb0;
}
.footer-bottom p { margin: 2px 0; }
.footer-credit { color: #aebccf; text-decoration: none; }
.footer-credit:hover { color: #fff; text-decoration: underline; }
/* 页脚关注我们 + 二维码 */
.qr-box {
    width: 116px; height: 116px; border: 1px solid rgba(255,255,255,.25);
    border-radius: 6px; overflow: hidden; background: #fff;
    display: flex; align-items: center; justify-content: center;
}
.qr-box img { width: 100%; height: 100%; object-fit: contain; display: block; }
.qr-placeholder {
    text-align: center; font-size: 12px; color: #9aa7ba; line-height: 1.6;
}
.qr-placeholder span { color: #c2ccd9; }
.qr-tip { margin-top: 10px; font-size: 12px; color: #aebccf; line-height: 1.5; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .contact-wrap { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav {
        display: none;
        position: absolute; left: 0; right: 0; top: 78px;
        background: #fff; box-shadow: 0 6px 16px rgba(0,0,0,.1);
    }
    .nav.open { display: block; }
    .nav ul { flex-direction: column; }
    .nav li a { height: 50px; line-height: 50px; padding: 0 20px; }
    .nav li.active::after { display: none; }
    .banner { padding: 60px 0; }
    .banner h1 { font-size: 28px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .topbar-inner { flex-direction: column; height: auto; padding: 6px 0; gap: 2px; }
    .topbar-contact span { margin: 0 9px; }
    #bdmap-container { height: 300px; }
}

/* ---------- 富文本正文（后台编辑器输出） ---------- */
.richtext img { max-width: 100%; height: auto; border-radius: 6px; margin: 14px 0; }
.richtext h2 { font-size: 22px; margin: 26px 0 12px; color: #0b3d6b; }
.richtext h3 { font-size: 18px; margin: 22px 0 10px; color: #0b3d6b; }
.richtext p { margin: 0 0 14px; }
.richtext ul, .richtext ol { margin: 0 0 14px 22px; }
.richtext li { margin: 6px 0; }
.richtext blockquote { border-left: 4px solid #0b3d6b; background: #f5f8fc; margin: 14px 0; padding: 12px 16px; color: #555; }
.richtext a { color: #0b3d6b; text-decoration: underline; }
