/* ============================================
   恒升坊官酱园 · 新闻动态站样式
   主题：日月恒升（与主站 style.css 同一设计系统）
   色彩：醋黑、陶褐、宣纸白、木匾金、印章红
   说明：本站独立部署，基础样式变量与组件与主站保持一致
   ============================================ */

/* CSS Variables（与主站一致） */
:root {
    --ink-black: #1a1a1a;
    --deep-brown: #2c1810;
    --pottery-brown: #8B5A2B;
    --clay-brown: #A0785A;
    --rice-paper: #F5F0E8;
    --paper-cream: #F8F4ED;
    --plaque-gold: #C9A96E;
    --seal-red: #B22222;
    --seal-dark: #8B1A1A;
    --text-primary: #2c1810;
    --text-secondary: #5a4a3a;
    --text-light: #F5F0E8;
    --text-muted: #8a7a6a;
    --border-gold: rgba(201, 169, 110, 0.3);
    --shadow-soft: 0 4px 20px rgba(44, 24, 16, 0.1);
    --shadow-medium: 0 8px 40px rgba(44, 24, 16, 0.15);
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --font-serif: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
    --font-sans: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 17px;
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background: var(--rice-paper);
    line-height: 1.8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* ============================================
   Navigation（与主站一致）
   ============================================ */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--rice-paper);
    border-bottom: 1px solid var(--border-gold);
    transition: var(--transition);
    padding: 0.6rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.nav-logo-img {
    height: 44px;
    width: auto;
    transition: var(--transition);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-family: var(--font-serif);
    font-size: 1rem;
    color: var(--text-primary);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--seal-red);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ============================================
   页面横幅（内页小型 Hero）
   ============================================ */
.page-banner {
    position: relative;
    height: 42vh;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 70px;
}

.page-banner-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.5);
}

.page-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(26, 26, 26, 0.3) 0%,
        rgba(44, 24, 16, 0.25) 50%,
        rgba(26, 26, 26, 0.55) 100%
    );
}

.page-banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--text-light);
    padding: 2rem;
}

.page-banner-title {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 5.5vw, 3.6rem);
    font-weight: 800;
    letter-spacing: 0.15em;
    margin-bottom: 0.8rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.page-banner-subtitle {
    font-size: 1.15rem;
    letter-spacing: 0.2em;
    color: rgba(245, 240, 232, 0.85);
}

/* ============================================
   Section 通用（与主站一致）
   ============================================ */
.section {
    padding: 6rem 2rem;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-serif);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    color: var(--seal-red);
    margin-bottom: 1rem;
    position: relative;
}

.section-tag::before,
.section-tag::after {
    content: '◆';
    font-size: 0.5rem;
    margin: 0 0.8rem;
    vertical-align: middle;
    opacity: 0.5;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4.5vw, 3.1rem);
    font-weight: 800;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.section-subtitle {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ============================================
   新闻列表
   ============================================ */
.news-section {
    padding-top: 3rem;
}

/* 搜索框 */
.news-search {
    max-width: 480px;
    margin: 0 auto 1.5rem;
}

.news-search-input {
    width: 100%;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    color: var(--text-primary);
    background: #fff;
    border: 1px solid var(--border-gold);
    border-radius: 2px;
    padding: 0.7rem 1.2rem;
    outline: none;
    transition: var(--transition);
}

.news-search-input::placeholder {
    color: var(--text-muted);
}

.news-search-input:focus {
    border-color: var(--seal-red);
    box-shadow: var(--shadow-soft);
}

/* 分类筛选 */
.news-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.news-filter-btn {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    padding: 0.6rem 1.8rem;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-gold);
    border-radius: 2px;
    cursor: pointer;
    transition: var(--transition);
}

.news-filter-btn:hover {
    color: var(--seal-red);
    border-color: var(--seal-red);
}

.news-filter-btn.active {
    background: var(--seal-red);
    color: var(--text-light);
    border-color: var(--seal-red);
}

/* 新闻卡片网格 */
.news-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.news-card {
    background: var(--paper-cream);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-gold);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-medium);
}

.news-card-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #3a2018 0%, #2c1810 100%);
}

.news-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.news-card:hover .news-card-cover img {
    transform: scale(1.05);
}

.news-card-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--seal-red);
    color: var(--text-light);
    padding: 0.3rem 0.9rem;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    border-radius: 2px;
}

.news-card-top-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--plaque-gold);
    color: var(--deep-brown);
    padding: 0.3rem 0.9rem;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    border-radius: 2px;
}

.news-card-body {
    padding: 1.6rem 1.8rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-card-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.news-card-title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 0.7rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card:hover .news-card-title {
    color: var(--seal-red);
}

.news-card-summary {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.2rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-link {
    font-family: var(--font-serif);
    color: var(--seal-red);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
}

.news-card-link:hover {
    color: var(--seal-dark);
    gap: 1rem;
}

/* 空状态 / 加载 */
.news-empty,
.news-loading,
.news-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    letter-spacing: 0.1em;
}

.news-error {
    color: var(--seal-red);
}

/* 分页 */
.news-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    margin-top: 3.5rem;
    flex-wrap: wrap;
}

.news-page-btn {
    min-width: 42px;
    height: 42px;
    padding: 0 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-size: 0.95rem;
    background: var(--paper-cream);
    color: var(--text-secondary);
    border: 1px solid var(--border-gold);
    border-radius: 2px;
    cursor: pointer;
    transition: var(--transition);
}

.news-page-btn:hover:not(:disabled) {
    color: var(--seal-red);
    border-color: var(--seal-red);
}

.news-page-btn.active {
    background: var(--seal-red);
    color: var(--text-light);
    border-color: var(--seal-red);
}

.news-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============================================
   新闻详情页
   ============================================ */
.article-section {
    padding: 9rem 2rem 6rem;
}

.article-wrap {
    max-width: 860px;
    margin: 0 auto;
}

.article-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-serif);
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    margin-bottom: 2.5rem;
}

.article-back:hover {
    color: var(--seal-red);
}

.article-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-gold);
}

.article-category {
    display: inline-block;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    color: var(--seal-red);
    border: 1px solid var(--seal-red);
    padding: 0.25rem 1rem;
    border-radius: 2px;
    margin-bottom: 1.2rem;
}

.article-title {
    font-family: var(--font-serif);
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.4;
    margin-bottom: 1.2rem;
}

.article-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
}

.article-meta span + span::before {
    content: '·';
    margin: 0 0.6rem;
}

.article-cover {
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border-gold);
    margin-bottom: 3rem;
}

.article-cover img {
    width: 100%;
}

/* 富文本正文排版 */
.article-content {
    background: var(--paper-cream);
    border: 1px solid var(--border-gold);
    border-radius: 4px;
    padding: 3rem;
    box-shadow: var(--shadow-soft);
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 2;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    font-family: var(--font-serif);
    color: var(--text-primary);
    margin: 2rem 0 1rem;
    line-height: 1.5;
}

.article-content h2 { font-size: 1.5rem; }
.article-content h3 { font-size: 1.25rem; }
.article-content h4 { font-size: 1.1rem; }

.article-content p {
    margin-bottom: 1.2rem;
    text-align: justify;
}

.article-content img {
    border-radius: 4px;
    margin: 1.5rem auto;
}

.article-content blockquote {
    border-left: 3px solid var(--plaque-gold);
    padding: 0.5rem 0 0.5rem 1.5rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-style: italic;
}

.article-content ul,
.article-content ol {
    padding-left: 1.8rem;
    margin-bottom: 1.2rem;
}

.article-content ul li,
.article-content ol li {
    margin-bottom: 0.5rem;
}

.article-content a {
    color: var(--seal-red);
    border-bottom: 1px solid var(--border-gold);
}

.article-content a:hover {
    border-bottom-color: var(--seal-red);
}

.article-content strong {
    color: var(--text-primary);
}

/* ============================================
   Footer（与主站一致）
   ============================================ */
.footer {
    background: var(--deep-brown);
    color: var(--text-light);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(201, 169, 110, 0.2);
}

.footer-brand {
    text-align: center;
}

.footer-logo {
    height: 120px;
    width: auto;
    margin: 0 auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.footer-col h4 {
    font-family: var(--font-serif);
    font-size: 1rem;
    color: var(--plaque-gold);
    margin-bottom: 1.2rem;
    letter-spacing: 0.1em;
}

.footer-col ul li {
    margin-bottom: 0.7rem;
}

.footer-col a {
    font-size: 0.9rem;
    color: rgba(245, 240, 232, 0.7);
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--plaque-gold);
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: rgba(245, 240, 232, 0.5);
    letter-spacing: 0.05em;
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 992px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 64px;
        left: 0;
        width: 100%;
        background: var(--rice-paper);
        flex-direction: column;
        padding: 1.5rem 2rem;
        gap: 1rem;
        border-bottom: 1px solid var(--border-gold);
        transform: translateY(-150%);
        transition: transform 0.4s ease;
        align-items: flex-start;
    }

    .nav-menu.open {
        transform: translateY(0);
    }

    .section {
        padding: 4rem 1.5rem;
    }

    .article-section {
        padding: 8rem 1.5rem 4rem;
    }

    .article-content {
        padding: 1.8rem 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 560px) {
    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-filters {
        gap: 0.6rem;
    }

    .news-filter-btn {
        padding: 0.5rem 1.2rem;
        font-size: 0.85rem;
    }
}
