/**
 * 房产站群系统 - 专业房产配色
 * 沉稳、可信赖的蓝色调（商务风）
 */

:root {
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 20px rgba(0,0,0,0.06);
    --shadow-hover: 0 12px 40px rgba(0,0,0,0.12);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --text: #1e293b;
    --text-muted: #64748b;
    --bg: #f8fafc;
    --bg-card: #fff;
    --border: #e2e8f0;
    /* 主色调 - 商务蓝 */
    --bs-primary: #2563eb;
    --bs-primary-rgb: 37, 99, 235;
    --bs-primary-hover: #1d4ed8;
    --bs-primary-dark: #1e40af;
}

* { box-sizing: border-box; }

body {
    font-family: 'Noto Sans SC', -apple-system, sans-serif;
    line-height: 1.7;
    padding-top: 70px;
    background: var(--bg) !important;
    color: var(--text);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Serif SC', serif;
}

/* ========== 导航（适配 Quartz）========== */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
    padding: 0.65rem 0;
    transition: all var(--transition);
}
.main-nav .navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    margin: 0 0.1rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.main-nav .navbar-toggler {
    border-radius: var(--radius-sm);
}

/* ========== 轮播 ========== */
.hero-banner {
    margin: -70px 0 0 0;
    position: relative;
    overflow: hidden;
}
.hero-banner .carousel-item {
    height: 560px;
    position: relative;
}
.hero-banner .carousel-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-color: var(--bs-primary);
}
.hero-banner .carousel-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%);
}
.hero-banner .carousel-caption {
    bottom: 25%;
    text-align: left;
    left: 10%;
    right: 10%;
}
.hero-banner .carousel-caption h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
    letter-spacing: 0.02em;
}
.hero-banner .carousel-indicators {
    bottom: 2rem;
}
.hero-banner .carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4) !important;
    border: none;
    opacity: 1;
    transition: all var(--transition);
}
.hero-banner .carousel-indicators button.active {
    background: var(--bs-primary) !important;
    width: 28px;
    border-radius: 5px;
}
.hero-banner .carousel-control-prev,
.hero-banner .carousel-control-next {
    width: 50px;
    opacity: 0.8;
}
.hero-banner .carousel-control-prev-icon,
.hero-banner .carousel-control-next-icon {
    background-color: rgba(255,255,255,0.3);
    border-radius: 50%;
    padding: 1rem;
}
.hero-banner .carousel-control-prev-icon:hover,
.hero-banner .carousel-control-next-icon:hover {
    background-color: rgba(255,255,255,0.5);
}

/* ========== 区块 ========== */
.section {
    padding: 5rem 0;
    background: transparent;
}
.section-header {
    margin-bottom: 3rem;
}
.section-header h2 {
    font-size: 1.75rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}
.section-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* ========== 楼盘卡片 ========== */
.property-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    border: 1px solid rgba(0,0,0,0.04);
    height: 100%;
}
.property-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}
.property-card .property-img {
    display: block;
    position: relative;
    height: 240px;
    overflow: hidden;
}
.property-card .img-wrap {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-color: #e8ecf0;
    transition: transform 0.5s ease;
}
.property-card:hover .img-wrap {
    transform: scale(1.06);
}
.property-card .price-tag {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: var(--bs-primary);
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
}
.property-card .property-info {
    padding: 1.5rem;
}
.property-card .property-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}
.property-card .property-info h3 a {
    color: var(--text);
}
.property-card .property-info h3 a:hover {
    color: var(--bs-primary);
}
.property-card .subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}
.property-card .area,
.property-card .address {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}
.property-card .area i,
.property-card .address i {
    margin-right: 0.4rem;
    color: var(--bs-primary);
    opacity: 0.9;
}

/* ========== 按钮（Quartz 已提供，此处微调）========== */
.btn-primary {
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
}

/* ========== 服务优势 ========== */
.advantage-section {
    background: linear-gradient(180deg, #eef1ec 0%, var(--bg) 100%);
}
.advantage-item {
    padding: 2.5rem 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all var(--transition);
    height: 100%;
    border: 1px solid rgba(0,0,0,0.03);
}
.advantage-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}
.advantage-item i {
    font-size: 2.5rem;
    color: var(--bs-primary);
    margin-bottom: 1rem;
    display: block;
}
.advantage-item h4 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
}
.advantage-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* ========== 页面标题 ========== */
.page-header {
    background: linear-gradient(135deg, var(--bs-primary-dark) 0%, var(--bs-primary) 50%, #1e3a8a 100%);
    color: #fff;
    padding: 4rem 0;
    text-align: center;
}
.page-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.page-header p {
    opacity: 0.92;
    font-size: 1rem;
}
.page-header .breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1rem;
}
.page-header .breadcrumb-item a {
    color: rgba(255,255,255,0.92);
}
.page-header .breadcrumb-item a:hover {
    color: #fff;
}
.page-header .breadcrumb-item.active {
    color: rgba(255,255,255,0.8);
}

/* ========== 详情页 ========== */
.property-detail-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.04);
}
.property-detail-card h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--bs-primary);
    color: var(--text);
}
.property-desc, .page-content {
    line-height: 1.9;
    color: var(--text-muted);
}
.page-content p { margin-bottom: 1rem; }
.sticky-sidebar { position: sticky; top: 100px; }
.house-type-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: all var(--transition);
}
.house-type-card:hover {
    border-color: var(--bs-primary);
    box-shadow: var(--shadow);
}
.house-type-img {
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: #e8ecf0;
}

/* ========== 表单控件（确保边框可见）========== */
.form-control,
.form-select {
    background: #fff !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
}
.form-control::placeholder {
    color: #9ca3af;
}
.form-control:focus,
.form-select:focus {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.2);
}

/* ========== 联系表单 ========== */
.contact-form-wrap {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.contact-form-wrap .form-control,
.contact-form-wrap .form-select {
    border-radius: var(--radius-sm);
}

/* ========== 页脚 ========== */
.site-footer {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e293b 100%);
    color: rgba(255,255,255,0.88);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}
.site-footer a {
    color: rgba(255,255,255,0.88);
}
.site-footer a:hover {
    color: #93c5fd;
}
.site-footer .row {
    align-items: center;
}

/* ========== 分页 ========== */
.pagination .page-link {
    border-radius: var(--radius-sm) !important;
}

/* ========== 首页新闻区块 ========== */
.news-section {
    background: linear-gradient(180deg, var(--bg) 0%, #eef1ec 100%);
}
.news-sidebar .news-recommend-list li {
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.news-sidebar .news-recommend-list li:last-child { border-bottom: none; }
.news-sidebar .news-recommend-list a {
    color: var(--text);
    text-decoration: none;
    display: block;
    transition: color var(--transition);
}
.news-sidebar .news-recommend-list a:hover {
    color: var(--bs-primary);
}
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}
.news-card .news-card-img {
    display: block;
    height: 180px;
    overflow: hidden;
}
.news-card .news-card-img .img-wrap {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-color: #e8ecf0;
    transition: transform 0.5s ease;
}
.news-card:hover .news-card-img .img-wrap {
    transform: scale(1.05);
}
.news-card .card-title a {
    color: var(--text);
}
.news-card .card-title a:hover {
    color: var(--bs-primary);
}
.news-category-tabs {
    border-bottom: 2px solid var(--border);
}
.news-category-tabs .nav-link {
    color: var(--text-muted);
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    padding: 0.75rem 1.25rem;
}
.news-category-tabs .nav-link:hover { color: var(--bs-primary); }
.news-category-tabs .nav-link.active {
    color: var(--bs-primary);
    font-weight: 500;
    border-bottom-color: var(--bs-primary);
    background: transparent;
}

/* ========== 新闻列表页（纵向列表样式）========== */
.news-list-section {
    background: #fff;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}
.news-list-tabs {
    display: flex;
    justify-content: center;
    gap: 2rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0;
    margin-bottom: 2rem;
}
.news-list-tabs .nav-link {
    color: var(--text);
    border: none;
    padding: 0.75rem 0;
    font-size: 1rem;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    transition: color 0.2s;
}
.news-list-tabs .nav-link:hover { color: var(--bs-primary); }
.news-list-tabs .nav-link.active {
    color: var(--bs-primary);
    font-weight: 600;
    border-bottom-color: var(--bs-primary);
}
.news-list { list-style: none; padding: 0; margin: 0; }
.news-list-item {
    padding: 2rem 0;
    border-bottom: 1px solid #e5e7eb;
}
.news-list-item:first-child { padding-top: 0; }
.news-list-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}
.news-list-title a {
    color: var(--text);
}
.news-list-title a:hover {
    color: var(--bs-primary);
}
.news-list-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}
.news-list-meta {
    color: #9ca3af;
    font-size: 0.875rem;
    display: flex;
    gap: 1.5rem;
}
.news-list-meta i { margin-right: 0.25rem; }
.news-list-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
}
.news-page-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.news-page-btn:hover:not(.disabled):not(.active) {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}
.news-page-btn.active {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}
.news-page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ========== 新闻详情页（双栏布局）========== */
.news-detail-section {
    background: #fff;
}
.news-detail-main {
    padding-right: 2rem;
}
.news-detail-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}
.news-detail-meta {
    color: #999;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    display: flex;
    gap: 1.5rem;
}
.news-detail-meta i { margin-right: 0.25rem; }
.news-detail-lead {
    color: #333;
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}
.news-detail-cover {
    margin-bottom: 1.5rem;
}
.news-detail-cover img {
    width: 100%;
    display: block;
}
.news-detail-content {
    line-height: 1.9;
    color: #333;
}

.news-detail-sidebar {
    position: sticky;
    top: 90px;
}
.sidebar-block {
    padding: 1.25rem 0;
    border-bottom: 1px solid #eee;
}
.sidebar-block:first-child { padding-top: 0; }
.sidebar-block:last-child { border-bottom: none; }
.sidebar-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}
.sidebar-search {
    position: relative;
    display: flex;
}
.sidebar-search .form-control {
    padding-right: 2.5rem;
    border: 1px solid #ddd;
}
.sidebar-search .btn-search {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    background: none;
    border: none;
    color: #999;
    padding: 0 1rem;
}
.sidebar-search .btn-search:hover { color: var(--bs-primary); }
.sidebar-nav, .sidebar-recommend {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-nav li, .sidebar-recommend li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}
.sidebar-nav li:last-child, .sidebar-recommend li:last-child { border-bottom: none; }
.sidebar-nav a, .sidebar-recommend a {
    color: #333;
    text-decoration: none;
    font-size: 0.95rem;
}
.sidebar-nav a:hover, .sidebar-recommend a:hover { color: var(--bs-primary); }
.sidebar-nav a.active {
    color: var(--bs-primary);
    font-weight: 500;
}

@media (max-width: 768px) {
    .news-grid { grid-template-columns: 1fr; }
    .news-list-tabs { gap: 1rem; }
}

/* ========== 新闻/视频卡片 ========== */
.card {
    border-radius: var(--radius);
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.card-title { font-family: 'Noto Serif SC', serif; }

/* ========== 覆盖 Quartz 主题的背景渐变 ========== */
body,
body.bg-body,
main,
.container,
.section {
    background: transparent !important;
    background-image: none !important;
}
body {
    background: var(--bg) !important;
}
body::before,
body::after {
    display: none !important;
}

/* ========== 统一主色（按钮、链接、标签等）========== */
.btn-primary,
.bg-primary,
.badge.bg-primary,
.page-item.active .page-link,
.nav-link.active {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}
.btn-primary:hover,
.btn-outline-primary:hover {
    background-color: var(--bs-primary-hover) !important;
    border-color: var(--bs-primary-hover) !important;
}
.btn-outline-primary {
    border-color: var(--bs-primary) !important;
    color: var(--bs-primary) !important;
}
.property-card h3 a:hover {
    color: var(--bs-primary) !important;
}
.page-content a {
    color: var(--bs-primary) !important;
}
.text-primary { color: var(--bs-primary) !important; }

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .hero-banner .carousel-item { height: 400px; }
    .hero-banner .carousel-caption { text-align: center; left: 1rem; right: 1rem; }
    .section { padding: 3rem 0; }
    .property-card .property-img { height: 200px; }
}
