/* 房产资讯站点公共样式 */
:root {
    --primary: #1a5fb4;
    --primary-dark: #0d4a8f;
    --accent: #c9a227;
    --text: #333;
    --text-light: #666;
    --bg-light: #f5f7fa;
    --border: #e8ecf0;
    --shadow: 0 2px 12px rgba(0,0,0,.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: var(--site-scroll-offset, 88px);
}
body {
    font-family: "Microsoft YaHei", "PingFang SC", -apple-system, sans-serif;
    color: var(--text);
    line-height: 1.7;
    background: #fff;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* 顶部栏 */
.site-topbar {
    background: #2c3e50;
    color: #ccc;
    font-size: 13px;
    padding: 8px 0;
}
.site-topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.site-topbar .brand { color: #fff; font-weight: bold; }

/* 头部导航 */
.site-header {
    background: #fff;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    gap: 16px;
}
.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
}
.site-logo-mark {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(26, 95, 180, .25);
}
.site-logo-mark .zico {
    width: 26px;
    height: 26px;
    background-color: #fff;
}
.site-logo h1 {
    font-size: 22px;
    color: var(--primary);
    font-weight: 700;
}
.site-logo small {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    font-weight: normal;
}
.site-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.site-nav a {
    padding: 8px 16px;
    border-radius: 4px;
    color: var(--text);
    font-size: 15px;
}
.site-nav a:hover,
.site-nav a.active {
    background: var(--primary);
    color: #fff;
}

/* 移动端菜单按钮 */
.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--primary);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(26, 95, 180, .3);
}
.nav-toggle-bar {
    display: block;
    width: 18px;
    height: 2.5px;
    background: #fff;
    margin: 4px auto;
    border-radius: 2px;
    transition: transform .3s, opacity .3s;
}
.nav-toggle.active .nav-toggle-bar:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle.active .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}
.nav-toggle.active .nav-toggle-bar:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 200;
}
.nav-overlay.show { display: block; }
body.nav-open { overflow: hidden; }
body.nav-open .site-header { z-index: 210; }

/* 首页 Hero */
.hero-banner {
    background: linear-gradient(135deg, #1a5fb4 0%, #0d4a8f 60%, #2c3e50 100%);
    color: #fff;
    padding: 70px 0 80px;
    text-align: center;
}
.hero-banner h2 {
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 2px;
}
.hero-banner p {
    font-size: 18px;
    opacity: .92;
    max-width: 640px;
    margin: 0 auto 30px;
}
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.hero-stats .stat-item strong {
    display: block;
    font-size: 32px;
    color: var(--accent);
}
.hero-stats .stat-item span { font-size: 14px; opacity: .85; }
.hero-actions { margin-top: 28px; }
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-size: 15px;
    transition: all .3s;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
    margin-right: 12px;
}
.btn-primary:hover { background: #b8921f; color: #fff; }
.btn-outline {
    border: 2px solid rgba(255,255,255,.7);
    color: #fff;
}
.btn-outline:hover { background: rgba(255,255,255,.15); color: #fff; }

/* 区块 */
.section { padding: 60px 0; }
.section-gray { background: var(--bg-light); }
#about,
#buildings {
    scroll-margin-top: var(--site-scroll-offset, 88px);
}
.section-title {
    text-align: center;
    margin-bottom: 40px;
}
.section-title h3 {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 8px;
}
.section-title p { color: var(--text-light); font-size: 14px; }

/* 服务特色 */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.feature-card {
    background: #fff;
    padding: 30px 24px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
}
.feature-card .icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: rgba(26, 95, 180, .08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}
.feature-card .icon .zico {
    width: 28px;
    height: 28px;
}
.feature-card h4 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 18px;
}
.feature-card p { color: var(--text-light); font-size: 14px; }

/* 公司简介 */
.company-profile-content {
    width: 100%;
    margin: 0 auto;
    background: #fff;
    padding: 40px 56px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    color: var(--text-light);
    font-size: 16px;
    line-height: 2;
}
.company-profile-content p {
    margin-bottom: 16px;
    text-align: justify;
}
.company-profile-content p:last-child { margin-bottom: 0; }

/* 房源卡片 */
.building-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
    gap: 24px;
}
.building-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .3s, box-shadow .3s;
    color: inherit;
    display: block;
}
.building-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    color: inherit;
}
.building-card .card-thumb {
    height: 200px;
    background: var(--bg-light) center/cover no-repeat;
    position: relative;
}
.building-card .card-thumb .city-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 3px;
}
.building-card .card-thumb .ptype-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 3px;
}

/* 分类筛选标签 */
.cat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}
.cat-tab {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 20px;
    background: var(--bg-light);
    color: var(--text);
    font-size: 14px;
    transition: all .2s;
}
.cat-tab:hover,
.cat-tab.active {
    background: var(--primary);
    color: #fff;
}
.building-card .card-body { padding: 20px; }
.building-card h4 {
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 8px;
}
.building-card .meta {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 6px;
    word-break: break-word;
}
.building-card .phone {
    color: var(--accent);
    font-weight: bold;
    font-size: 16px;
    margin-top: 10px;
}
.empty-tip {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

/* 页脚 */
.site-footer {
    background: #2c3e50;
    color: #aaa;
    padding: 40px 0 20px;
}
.site-footer .footer-main {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}
.site-footer h4 { color: #fff; margin-bottom: 12px; font-size: 16px; }
.site-footer p, .site-footer li { font-size: 13px; line-height: 2; }
.site-footer ul { list-style: none; }
.site-footer a { color: #aaa; }
.site-footer a:hover { color: #fff; }
.site-footer .copyright {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 20px;
    text-align: center;
    font-size: 12px;
}

/* 404 / 提示页 */
.page-simple {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.page-simple .simple-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: var(--bg-light);
}
.simple-box {
    background: #fff;
    padding: 50px 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    max-width: 520px;
    width: 100%;
}
.simple-box .code {
    font-size: 72px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 16px;
}
.simple-box h2 { font-size: 22px; margin-bottom: 12px; color: var(--text); }
.simple-box p { color: var(--text-light); margin-bottom: 24px; }
.simple-box .btn { margin: 0 6px; }

/* ========== 响应式 ========== */
@media (max-width: 991px) {
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .site-header .header-inner {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        padding: 12px 20px;
        gap: 12px;
    }
    .site-logo { min-width: 0; flex: 1; }
    .site-logo h1 {
        font-size: 18px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .site-logo small {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .site-logo-mark { width: 40px; height: 40px; border-radius: 10px; }
    .site-logo-mark .zico { width: 22px; height: 22px; }
    .nav-toggle { display: flex; flex-direction: column; align-items: center; justify-content: center; }
    .site-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(280px, 85vw);
        height: 100vh;
        height: 100dvh;
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        padding: calc(70px + env(safe-area-inset-top)) 20px calc(30px + env(safe-area-inset-bottom));
        box-shadow: -4px 0 24px rgba(0, 0, 0, .15);
        transition: right .3s ease;
        z-index: 211;
        gap: 4px;
        overflow-y: auto;
    }
    .site-nav.open { right: 0; }
    .site-nav a {
        display: block;
        padding: 14px 16px;
        font-size: 16px;
        border-radius: 6px;
    }
}

@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .site-header .header-inner { padding-left: 18px; padding-right: 18px; }
    .site-topbar { font-size: 12px; padding: 6px 0; }
    .site-topbar .container { justify-content: center; }
    .hero-banner { padding: 44px 0 52px; }
    .hero-banner h2 { font-size: 26px; letter-spacing: 1px; }
    .hero-banner p { font-size: 15px; }
    .hero-stats { gap: 28px; }
    .hero-stats .stat-item strong { font-size: 28px; }
    .section { padding: 44px 0; }
    .section-title { margin-bottom: 28px; }
    .section-title h3 { font-size: 24px; }
    .feature-grid { grid-template-columns: 1fr; }
    .company-profile-content { padding: 24px 20px; font-size: 14px; }
    .building-grid { grid-template-columns: 1fr; }
    .building-card .card-thumb { height: 180px; }
    .site-footer { padding: 32px 0 16px; }
    .site-footer .footer-main { flex-direction: column; gap: 24px; }
    .page-simple .simple-body { padding: 40px 16px; }
    .simple-box { padding: 40px 28px; }
    .simple-box .code { font-size: 56px; }
}

@media (max-width: 480px) {
    .container { padding: 0 14px; }
    .site-topbar span:not(.brand) { display: none; }
    .site-topbar .container { justify-content: flex-start; }
    .hero-banner h2 { font-size: 22px; letter-spacing: 0; }
    .hero-stats { gap: 20px; }
    .hero-stats .stat-item strong { font-size: 24px; }
    .hero-actions .btn {
        display: block;
        width: 100%;
        margin: 0 0 10px;
        text-align: center;
    }
    .hero-actions .btn:last-child { margin-bottom: 0; }
    .feature-card { padding: 24px 18px; }
    .building-card .card-body { padding: 16px; }
    .simple-box { padding: 32px 20px; }
    .simple-box .btn {
        display: block;
        width: 100%;
        margin: 0 0 10px !important;
    }
    .simple-box .btn:last-child { margin-bottom: 0; }
}
