/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&family=Noto+Sans+SC:wght@400;700&display=swap');

/* --- CSS Variables (品牌DNA) --- */
:root {
    --font-family-headings: 'Montserrat', 'Noto Sans SC', sans-serif;
    --font-family-body: 'Noto Sans SC', 'Montserrat', sans-serif;
    --color-primary-dark: #0A2B4C;
    --color-accent-gold: #B4884C;
    --color-text: #333333;
    --color-text-light: #555555;
    --color-background: #f8f9fa;
    --color-white: #ffffff;
    --shadow-light: 0 4px 15px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 25px rgba(0,0,0,0.12);
}

/* --- 全局样式 --- */
body {
    font-family: var(--font-family-body);
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-background);
    margin: 0;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
a {
    color: var(--color-primary-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    color: var(--color-accent-gold);
}

/* --- 统一的页头 --- */
.site-header {
    background-color: var(--color-white);
    box-shadow: var(--shadow-light);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.main-nav {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 60px;
}
.logo img {
    height: 50px;
    display: block;
}
.nav-links {
    list-style: none;
    display: flex;
    gap: 35px;
    margin: 0;
    padding: 0;
}
.nav-links a {
    font-family: var(--font-family-headings);
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-primary-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}
.nav-links a:hover {
    color: var(--color-accent-gold);
}

/* --- 首页 Hero Section --- */
.hero-section {
    color: var(--color-white);
    text-align: center;
    padding: 120px 20px;
    position: relative;
    background-size: cover;
    background-position: center 75%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(10, 43, 76, 0.6);
    z-index: 1;
}
.hero-section .container {
    position: relative;
    z-index: 2;
}
.hero-section h1 {
    font-size: 3.5rem;
    font-family: var(--font-family-headings);
    font-weight: 700;
    margin-bottom: 10px;
}
.hero-section .subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* --- 文章网格布局 --- */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    padding: 60px 0;
}

/* --- 文章卡片样式 --- */
.article-card {
    background-color: var(--color-white);
    border-radius: 8px;
    box-shadow: var(--shadow-light);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}
.card-link { text-decoration: none; }
.card-image-wrapper { height: 200px; overflow: hidden; }
.card-image-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.card-content { padding: 25px; flex-grow: 1; }
.card-title {
    font-family: var(--font-family-headings);
    font-size: 1.4rem;
    margin: 0 0 15px 0;
    line-height: 1.3;
    color: var(--color-primary-dark);
    transition: color 0.3s ease;
}
.article-card:hover .card-title { color: var(--color-accent-gold); text-decoration: underline; }
.card-summary { font-size: 0.95rem; color: var(--color-text-light); }
.card-footer {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f0f0f0;
}
.card-date { font-size: 0.85rem; color: #999; }
.read-more { font-weight: 700; font-size: 0.9rem; color: var(--color-accent-gold); text-decoration: none; }
.read-more:hover { text-decoration: underline; }

/* --- 文章详情页样式 --- */
.article-container, .review-container { 
    max-width: 900px; 
    margin: 40px auto; 
    padding: 0 20px; 
}
.full-review, .full-article { 
    background-color: var(--color-white); 
    border-radius: 8px; 
    box-shadow: var(--shadow-light); 
    padding: 40px; 
}
.review-header h1, .article-header h1 {
    font-family: var(--font-family-headings);
    font-size: 2.8rem;
    color: var(--color-primary-dark);
    line-height: 1.2;
    margin-bottom: 15px;
}
.publish-info { font-size: 0.9rem; color: #777; margin-bottom: 30px; }
.article-main-image { width: 100%; height: auto; border-radius: 8px; margin-bottom: 40px; }
.article-content, .review-content { font-size: 1.1rem; line-height: 1.8; color: var(--color-text); }
.article-content h2, .review-content h2 {
    font-family: var(--font-family-headings);
    font-size: 2rem;
    color: var(--color-primary-dark);
    margin-top: 50px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--color-accent-gold);
    padding-bottom: 10px;
}
.article-content h3, .review-content h3 {
    font-family: var(--font-family-headings);
    font-size: 1.5rem;
    color: var(--color-primary-dark);
    margin-top: 40px;
    margin-bottom: 15px;
}
.article-content p, .review-content p { margin-bottom: 1.5em; }
.article-content ul, .review-content ul, .article-content ol, .review-content ol { padding-left: 25px; margin-bottom: 1.5em; }
.article-content ul, .review-content ul { list-style-type: none; padding-left: 0; }
.article-content li, .review-content li { padding-left: 25px; position: relative; margin-bottom: 12px; }
.article-content li::before, .review-content li::before {
    content: '\2022';
    position: absolute; left: 0; top: 0;
    color: var(--color-accent-gold);
    font-size: 1.2em;
    line-height: inherit;
}
.article-content a, .review-content a { color: var(--color-accent-gold); text-decoration: underline; }

/* --- 评测页特殊模块 --- */
.expert-summary-box {
    background-color: #eef3f7;
    border-left: 5px solid var(--color-accent-gold);
    padding: 20px;
    margin: 30px 0;
    border-radius: 0 8px 8px 0;
}
.expert-summary-box h3 {
    margin-top: 0;
    font-family: var(--font-family-headings);
    color: var(--color-primary-dark);
}

.fast-facts-section { margin-top: 50px; }
.fast-facts-section h2 { margin-bottom: 25px; font-size: 2rem; border-bottom: 2px solid var(--color-accent-gold); padding-bottom: 10px;}
.facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.fact-item {
    background: var(--color-white);
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
}
.fact-key {
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-bottom: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.fact-value { color: var(--color-text-light); }

/* --- FAQ区域美化 --- */
.faq-section { margin-top: 60px; padding-top: 40px; border-top: 1px solid #eee; }
.faq-item { margin-top: 25px; padding-top: 25px; border-top: 1px dashed #ddd; }
.faq-item:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }
.faq-item h3 { font-size: 1.3rem; margin-bottom: 10px; }

/* --- 作者简介 --- */
.author-bio-section { margin-top: 60px; padding-top: 40px; border-top: 1px solid #eee; }
.author-bio-section h3 { font-size: 1.5rem; margin-top: 0; }

/* --- 楼盘评测页 - 图片画廊样式 (Flexbox 优化版) --- */
.review-gallery {
    display: flex;
    flex-direction: column; 
    align-items: center; 
    width: 100%;
    margin-top: 2rem;
    margin-bottom: 2rem;
    gap: 1rem;
}
.gallery-main-image {
    width: 100%;
    max-width: 900px; 
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    line-height: 0;
}
.gallery-main-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}
.gallery-main-image:hover img {
    transform: scale(1.05);
}
.gallery-thumbnails {
    display: flex;
    flex-direction: row; 
    justify-content: center; 
    flex-wrap: wrap; 
    gap: 10px;
    width: 100%;
    max-width: 900px;
}
.thumbnail-item {
    flex-shrink: 0;
    width: 120px; 
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.thumbnail-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
}
.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
}

/* --- 统一的页脚 --- */
.site-footer { background-color: var(--color-primary-dark); color: rgba(255,255,255,0.7); padding: 50px 0; text-align: center; }
.footer-content p { margin: 5px 0; }


/* --- 【【【这是新添加的返回顶部按钮样式】】】 --- */
#back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: var(--color-primary-dark);
    color: var(--color-white);
    border-radius: 50%;
    text-decoration: none;
    box-shadow: var(--shadow-hover);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background-color 0.3s;
    z-index: 1000;
}
#back-to-top svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2.5; /* 让线条粗一点，更显眼 */
}
#back-to-top:hover {
    background-color: var(--color-accent-gold);
}
#back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


/* --- 响应式导航 --- */
.mobile-nav-toggle { 
    display: none; /* 在桌面端默认隐藏汉堡按钮 */
}

/* 可访问性辅助类 */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;
}

@media (max-width: 768px) {
    /* --- 移动端样式开始 --- */
    
    .main-nav {
        justify-content: space-between;
    }

    /* 2. 汉堡按钮样式 */
    .mobile-nav-toggle {
        display: block; /* 在移动端显示 */
        position: relative;
        z-index: 9999;
        background: transparent;
        border: 0;
        width: 30px; /* 固定宽度 */
        height: 30px; /* 固定高度 */
        cursor: pointer;
        padding: 0;
    }
    .mobile-nav-toggle::before,
    .mobile-nav-toggle::after,
    .mobile-nav-toggle .hamburger-icon-bar {
        content: '';
        position: absolute;
        width: 100%;
        height: 3px;
        background: var(--color-primary-dark);
        border-radius: 999px;
        transition: transform 0.3s ease, opacity 0.1s ease;
        left: 0;
    }
    .mobile-nav-toggle::before { top: 5px; }
    .mobile-nav-toggle .hamburger-icon-bar { top: 50%; transform: translateY(-50%); }
    .mobile-nav-toggle::after { bottom: 5px; }

    /* 汉堡按钮激活 (X形) */
    .mobile-nav-toggle[aria-expanded="true"]::before { top: 50%; transform: translateY(-50%) rotate(45deg); }
    .mobile-nav-toggle[aria-expanded="true"] .hamburger-icon-bar { opacity: 0; }
    .mobile-nav-toggle[aria-expanded="true"]::after { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

    /* 3. 弹出菜单样式 */
    .nav-links {
        position: fixed;
        /* 从顶部到屏幕底部，从右侧30%处到最右侧 */
        inset: 0 0 0 30%; 
        flex-direction: column; /* 垂直排列 */
        padding: min(20vh, 10rem) 2rem;
        margin: 0;
        gap: 2rem;
        background-color: hsla(0, 0%, 100%, 0.1);
        backdrop-filter: blur(1.5rem);
        transform: translateX(100%);
        transition: transform 0.35s ease-out;
    }
    .nav-links[data-visible="true"] {
        transform: translateX(0%);
    }
    .nav-links li {
        text-align: center;
    }
    
    /* 4. CTA按钮样式 */
    .nav-cta-wrapper {
        margin-top: 2rem;
    }
    .nav-cta {
        display: inline-block;
        background-color: var(--color-accent-gold);
        color: var(--color-white) !important; /* 强制覆盖a标签颜色 */
        padding: 0.75em 2em;
        border-radius: 999px;
        font-weight: 700;
        transition: background-color 0.3s;
    }
    .nav-cta:hover {
        background-color: var(--color-primary-dark);
        color: var(--color-white) !important;
    }
    
    /* 5. 调整其他元素的移动端样式 */
    .full-review, .full-article { padding: 20px; }
    .review-gallery { margin-top: 1rem; margin-bottom: 1rem; }
    .gallery-thumbnails {
        flex-wrap: nowrap; 
        overflow-x: auto; 
        justify-content: flex-start;
        padding-bottom: 10px;
    }
}

/* --- 404 Error Page Styles --- */
.error-page-container {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px;
    min-height: 60vh;
}
.error-code {
    font-size: 8rem;
    font-weight: 700;
    color: var(--color-accent-gold);
    line-height: 1;
    margin: 0;
}
.error-title {
    font-family: var(--font-family-headings);
    font-size: 2.5rem;
    color: var(--color-primary-dark);
    margin-top: 10px;
}
.error-message {
    font-size: 1.1rem;
    color: var(--color-text-light);
    max-width: 500px;
    margin: 20px auto 40px;
}
.button-primary {
    display: inline-block;
    background-color: var(--color-primary-dark);
    color: var(--color-white);
    padding: 12px 30px;
    border-radius: 999px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color 0.3s ease;
}
.button-primary:hover {
    background-color: var(--color-accent-gold);
    color: var(--color-white);
}