/* ==========================================================
   陕西美旭达建筑工程有限公司 - 前台全局样式
   主题色 #986432（取自原站）
   ========================================================== */
:root {
    --c-primary: #986432;
    --c-primary-dark: #7d5128;
    --c-text: #333333;
    --c-text-light: #777777;
    --c-border: #e5e5e5;
    --c-bg-gray: #f7f7f7;
    --c-white: #ffffff;
    --header-h: 80px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* 始终保留纵向滚动条，避免长短页面切换时内容整体左右偏移 */
html { overflow-y: scroll; }

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    color: var(--c-text);
    font-size: 15px;
    line-height: 1.8;
    background: var(--c-white);
    min-height: 100vh;
    display: flex; flex-direction: column;
}

a { color: inherit; text-decoration: none; }
ul, li { list-style: none; }
img { max-width: 100%; display: block; border: 0; }

/* 内容不足一屏时页脚贴底，消除底部空白 */
.site-main { flex: 1 0 auto; }

.wrap { width: 1400px; max-width: 92%; margin: 0 auto; }
.wrap.narrow { width: 720px; }
.center { text-align: center; }

/* ===== 顶部导航 ===== */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: var(--c-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}
.header-inner {
    display: flex; align-items: center;
    height: var(--header-h);
    gap: 30px;
}
.logo img { height: 56px; width: auto; }
.main-nav { display: flex; gap: 2px; margin-left: auto; flex-shrink: 0; }
.main-nav a {
    display: block; padding: 8px 14px;
    font-size: 16px; color: var(--c-text);
    white-space: nowrap;
    border-radius: 3px; transition: all .25s;
}
.main-nav a:hover,
.main-nav a.active { color: var(--c-white); background: var(--c-primary); }
.header-phone { color: var(--c-primary); font-size: 15px; white-space: nowrap; }
.header-phone .num { font-weight: 700; font-size: 18px; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--c-text); margin: 5px 0; }

/* ===== Banner 轮播 ===== */
.banner { position: relative; height: 800px; overflow: hidden; }
.banner-slide {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: 0; transition: opacity .8s ease;
}
.banner-slide.active { opacity: 1; }
.banner-dots {
    position: absolute; left: 0; right: 0; bottom: 18px;
    display: flex; justify-content: center; gap: 10px; z-index: 5;
}
.banner-dots i {
    width: 12px; height: 12px; border-radius: 50%;
    background: rgba(255, 255, 255, .5); cursor: pointer; transition: background .25s;
}
.banner-dots i.on { background: var(--c-primary); }

/* ===== 通用区块 ===== */
.section { padding: 70px 0; }
.section:nth-of-type(even) { background: var(--c-bg-gray); }

.sec-head { text-align: center; margin-bottom: 44px; }
.sec-title {
    font-size: 32px; color: var(--c-text);
    letter-spacing: 2px; position: relative; display: inline-block; padding-bottom: 14px;
}
.sec-title::after {
    content: ""; position: absolute; left: 50%; bottom: 0;
    transform: translateX(-50%);
    width: 48px; height: 3px; background: var(--c-primary);
}
.sec-sub { color: var(--c-text-light); font-size: 14px; margin-top: 6px; letter-spacing: 1px; }

.btn-more {
    display: inline-block; padding: 8px 34px;
    border: 1px solid var(--c-primary); color: var(--c-primary);
    border-radius: 3px; font-size: 14px; letter-spacing: 2px; transition: all .25s;
}
.btn-more:hover { background: var(--c-primary); color: var(--c-white); }

/* ===== 关于我们（左图右文） ===== */
.about-body {
    display: flex; gap: 40px; align-items: stretch;
    max-width: 1400px; margin: 0 auto;
}
.about-pic {
    flex: 0 0 40%; overflow: hidden;
    border-radius: 4px; box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
}
.about-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-text { flex: 1; }
.about-text p { margin-bottom: 16px; text-align: justify; text-indent: 2em; }
.about-text .btn-more { margin-top: 8px; }

/* ===== 产品中心 ===== */
.product-list {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 26px;
}
.product-item {
    background: var(--c-white); border: 1px solid var(--c-border);
    border-radius: 4px; overflow: hidden; transition: all .3s;
}
.product-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 24px rgba(152, 100, 50, .18);
    border-color: var(--c-primary);
}
.product-item .pic { height: 230px; overflow: hidden; }
.product-item .pic img {
    width: 100%; height: 100%; object-fit: cover; transition: transform .4s;
}
.product-item:hover .pic img { transform: scale(1.06); }
.product-item .name {
    font-size: 16px; color: var(--c-text);
    font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.product-item .info { padding: 14px 16px 18px; text-align: center; }
.product-item .name:hover { color: var(--c-primary); }

/* ===== 资讯中心 ===== */
.news-card {
    display: flex; gap: 26px;
    background: var(--c-white); border: 1px solid var(--c-border);
    border-radius: 4px; overflow: hidden; padding: 20px; transition: all .3s;
}
.news-card:hover {
    box-shadow: 0 10px 24px rgba(0, 0, 0, .1);
    border-color: var(--c-primary);
}
.news-card .pic { flex: 0 0 360px; height: 220px; overflow: hidden; border-radius: 3px; }
.news-card .pic img { width: 100%; height: 100%; object-fit: cover; }
.news-card .name { font-size: 20px; color: var(--c-text); font-weight: 500; }
.news-card:hover .name { color: var(--c-primary); }
.news-card .summary {
    margin-top: 12px; color: var(--c-text-light); font-size: 14px;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card .meta {
    margin-top: 14px; color: #aaa; font-size: 13px;
    display: flex; justify-content: space-between;
}
.section .center { margin-top: 30px; }

/* ===== 企业文化 ===== */
.culture-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.culture-item {
    text-align: center; padding: 36px 20px;
    background: var(--c-white); border-radius: 4px;
    border: 1px solid var(--c-border); transition: all .3s;
}
.culture-item:hover { border-color: var(--c-primary); box-shadow: 0 8px 20px rgba(152, 100, 50, .15); }
.culture-item .icon { width: 64px; height: 64px; object-fit: contain; margin: 0 auto 16px; }
.culture-item .name { font-size: 18px; color: var(--c-primary); margin-bottom: 8px; }
.culture-item .desc { color: var(--c-text-light); font-size: 14px; }

/* ===== 品牌实力 ===== */
.strength-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.strength-item {
    position: relative; padding: 30px 22px;
    background: var(--c-white); border-radius: 4px;
    border: 1px solid var(--c-border); transition: all .3s;
}
.strength-item:hover { border-color: var(--c-primary); box-shadow: 0 8px 20px rgba(152, 100, 50, .15); }
.strength-item .icon { width: 48px; height: 48px; object-fit: contain; margin-bottom: 14px; }
.strength-item .no {
    position: absolute; top: 20px; right: 20px;
    font-size: 34px; font-weight: 700; color: rgba(152, 100, 50, .22);
    font-style: italic;
}
.strength-item .desc { font-size: 14px; color: var(--c-text-light); }
.strength-item .desc strong { color: var(--c-primary); }

/* ===== 在线留言 ===== */
.msg-form { display: flex; flex-direction: column; gap: 14px; }
.msg-form .form-row { display: flex; gap: 14px; }
.msg-form .form-row input { flex: 1; }
.msg-form input,
.msg-form textarea {
    width: 100%; padding: 12px 14px;
    border: 1px solid var(--c-border); border-radius: 3px;
    font-size: 14px; font-family: inherit; outline: none; transition: border-color .25s;
}
.msg-form input:focus,
.msg-form textarea:focus { border-color: var(--c-primary); }
.btn-submit {
    align-self: center; margin-top: 6px;
    padding: 10px 60px; border: 0; border-radius: 3px;
    background: var(--c-primary); color: var(--c-white);
    font-size: 15px; letter-spacing: 4px; cursor: pointer; transition: background .25s;
}
.btn-submit:hover { background: var(--c-primary-dark); }

/* ===== 页脚 ===== */
.site-footer { background: #2b2b2b; color: #b7b7b7; }
.footer-top {
    display: flex; flex-wrap: wrap; gap: 36px 50px;
    padding: 50px 0 40px;
    align-items: flex-start;
}
.footer-nav { display: flex; flex-direction: row; flex-wrap: wrap; gap: 10px 28px; flex: 0 0 100%; }
.footer-nav a { color: #b7b7b7; font-size: 14px; transition: color .25s; }
.footer-nav a:hover { color: var(--c-white); }
.footer-contact { flex: 1; }
.footer-contact p { font-size: 14px; margin-bottom: 8px; }
.footer-contact span { color: #8a8a8a; }
.footer-qr { text-align: center; }
.footer-qr img { width: 110px; height: 110px; object-fit: contain; margin: 0 auto; background: #fff; padding: 6px; border-radius: 4px; }
.footer-qr p { font-size: 13px; margin-top: 8px; }

.footer-bottom { border-top: 1px solid #3d3d3d; padding: 18px 0; }
.footer-tags { display: flex; gap: 14px; margin-bottom: 8px; }
.footer-tags span {
    font-size: 13px; color: #d9b28c;
    border: 1px solid #5a4530; padding: 2px 14px; border-radius: 12px;
}
.copyright { font-size: 13px; color: #8a8a8a; text-align: center; }
.copyright .beian { color: #8a8a8a; transition: color .25s; }
.copyright .beian:hover { color: #d9b28c; }

/* ===== 移动端适配 ===== */
@media (max-width: 900px) {
    .header-phone { display: none; }
    .nav-toggle { display: block; margin-left: auto; }
    .main-nav {
        display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
        background: var(--c-white); flex-direction: column; padding: 10px 0;
        box-shadow: 0 8px 16px rgba(0, 0, 0, .08);
    }
    .main-nav.open { display: flex; }
    .main-nav a { padding: 12px 6%; }
    .banner { height: 240px; }
    .section { padding: 44px 0; }
    .sec-title { font-size: 24px; }
    .product-list { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .product-item .pic { height: 150px; }
    .news-card { flex-direction: column; }
    .news-card .pic { flex: none; height: 180px; }
    .culture-list { grid-template-columns: 1fr; }
    .about-body { flex-direction: column; gap: 22px; }
    .about-pic { flex: none; height: 200px; }
    .strength-list { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .footer-top { flex-direction: column; gap: 26px; }
    .footer-nav { flex-direction: row; flex-wrap: wrap; gap: 18px; }
    .crumb-bar .cb-inner { padding: 10px 0; font-size: 13px; }
}

/* ===== 内页横幅 ===== */
.page-banner {
    min-height: 400px;
    display: flex; align-items: center;
    padding: 46px 0;
    background: linear-gradient(rgba(43, 43, 43, .72), rgba(43, 43, 43, .72)),
        url('/uploads/site/images/56718341.jpg') center/cover no-repeat;
    color: #fff;
}
.pb-title { font-size: 28px; font-weight: 500; letter-spacing: 2px; }
.pb-crumb { margin-top: 6px; font-size: 13px; color: rgba(255, 255, 255, .75); }
.pb-crumb a { color: rgba(255, 255, 255, .75); }
.pb-crumb a:hover { color: #fff; }

/* ===== 面包屑（banner 下方） ===== */
.crumb-bar { background: var(--c-white); border-bottom: 1px solid var(--c-border); }
.cb-inner { display: block; padding: 14px 0; font-size: 14px; color: var(--c-text-light); }
.crumb-bar a { color: var(--c-text-light); transition: color .25s; }
.crumb-bar a:hover { color: var(--c-primary); }

/* ===== 富文本正文（后台编辑器输出） ===== */
.rich-body { font-size: 15px; line-height: 2; color: var(--c-text); overflow: hidden; }
.rich-body p { margin-bottom: 14px; }
.rich-body img { max-width: 100%; height: auto; }
.rich-body h1, .rich-body h2, .rich-body h3 { margin: 22px 0 12px; color: var(--c-text); }
.detail-content { margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--c-border); }

/* ===== 资讯列表页 ===== */
.list-group-title {
    font-size: 20px; color: var(--c-primary);
    padding-left: 12px; border-left: 4px solid var(--c-primary);
    margin-bottom: 24px;
}
.news-list .news-item { margin-bottom: 22px; }
.news-list .news-item > a {
    display: flex; gap: 22px; padding: 18px;
    background: #fff; border: 1px solid var(--c-border); border-radius: 4px;
    transition: all .3s;
}
.news-list .news-item > a:hover {
    border-color: var(--c-primary);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
}
.news-list .pic { flex: 0 0 220px; height: 140px; overflow: hidden; border-radius: 3px; }
.news-list .pic img { width: 100%; height: 100%; object-fit: cover; }
.news-list .name { font-size: 18px; font-weight: 500; }
.news-list .news-item a:hover .name { color: var(--c-primary); }
.news-list .summary {
    margin-top: 8px; color: var(--c-text-light); font-size: 14px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-list .meta {
    margin-top: 10px; color: #aaa; font-size: 13px;
    display: flex; justify-content: space-between;
}

/* ===== 案例列表 ===== */
.case-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.case-item { position: relative; border-radius: 4px; overflow: hidden; }
.case-item .pic { height: 320px; }
.case-item .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.case-item:hover .pic img { transform: scale(1.05); }
.case-item .mask {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 40px 22px 18px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .65));
}
.case-item .name { color: #fff; font-size: 20px; font-weight: 500; letter-spacing: 1px; }

/* ===== 联系我们 ===== */
.contact-box {
    display: flex; gap: 60px; align-items: flex-start;
    background: #fff; border: 1px solid var(--c-border); border-radius: 4px;
    padding: 40px;
}
.contact-info { flex: 1; }
.contact-info li { font-size: 16px; margin-bottom: 18px; }
.contact-info .lab { color: var(--c-primary); font-weight: 700; }
.contact-qr { text-align: center; }
.contact-qr img {
    width: 150px; height: 150px; object-fit: contain;
    background: #fff; border: 1px solid var(--c-border);
    padding: 8px; border-radius: 4px; margin: 0 auto;
}
.contact-qr p { margin-top: 10px; font-size: 14px; color: var(--c-text); }
.contact-qr .sub { color: var(--c-text-light); font-size: 13px; margin-top: 2px; }

/* ===== 详情页（图集/文章） ===== */
.detail-name {
    text-align: center; font-size: 26px; font-weight: 500;
    margin-bottom: 30px; color: var(--c-text);
}
.g-main {
    max-width: 760px; margin: 0 auto;
    border: 1px solid var(--c-border); border-radius: 4px; overflow: hidden;
    background: #fff;
}
.g-main img { width: 100%; display: block; }
.g-thumbs {
    display: flex; flex-wrap: wrap; gap: 10px;
    justify-content: center; margin-top: 16px;
}
.g-thumbs li {
    width: 88px; height: 66px; overflow: hidden;
    border: 2px solid transparent; border-radius: 3px; cursor: pointer;
    background: #fff;
}
.g-thumbs li img { width: 100%; height: 100%; object-fit: cover; }
.g-thumbs li.on, .g-thumbs li:hover { border-color: var(--c-primary); }

.article-meta {
    display: flex; justify-content: center; gap: 30px;
    color: #aaa; font-size: 13px; margin-bottom: 24px;
}
.article-body { font-size: 15px; text-indent: 2em; text-align: justify; }
.article-nav {
    margin-top: 40px; padding-top: 18px;
    border-top: 1px solid var(--c-border);
    color: var(--c-text-light); font-size: 14px;
}
.article-nav p { margin-bottom: 6px; }

@media (max-width: 900px) {
    .page-banner { padding: 30px 0; }
    .pb-title { font-size: 22px; }
    .case-list { grid-template-columns: 1fr; }
    .case-item .pic { height: 220px; }
    .news-list .news-item > a { flex-direction: column; }
    .news-list .pic { flex: none; height: 180px; }
    .contact-box { flex-direction: column; gap: 30px; padding: 26px; }
    .msg-form .form-row { flex-direction: column; }
}
