/* 水利日报 - 通用样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #f5f7fa;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部导航 */
.header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    color: white;
    padding: 24px 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
    flex-wrap: wrap;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s;
    white-space: nowrap;
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.nav-menu a.active {
    background: rgba(255, 255, 255, 0.25);
}

/* 主要内容区域 */
.main-content {
    padding: 36px 0;
}

.page-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 40px 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    max-width: 100%;
}

.page-title {
    font-size: 32px;
    color: #1e3a5f;
    margin-bottom: 12px;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.page-subtitle {
    color: #6b7280;
    font-size: 15px;
    font-weight: 400;
    overflow-wrap: anywhere;
}

/* 新闻网格布局 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
    margin-bottom: 50px;
    max-width: 100%;
}

@media (max-width: 768px) {
    .header {
        padding: 18px 0;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-menu {
        width: 100%;
        justify-content: flex-start;
        gap: 10px;
    }

    .nav-menu a {
        padding: 7px 12px;
        font-size: 14px;
    }

    .main-content {
        padding: 36px 20px;
    }

    .page-header {
        padding: 34px 20px;
        margin-bottom: 42px;
    }

    .page-title {
        max-width: 310px;
        margin-left: auto;
        margin-right: auto;
        font-size: 22px;
        line-height: 1.35;
        white-space: normal;
        word-break: break-all;
    }

    .page-subtitle {
        max-width: 310px;
        margin-left: auto;
        margin-right: auto;
        font-size: 14px;
    }

    .news-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .news-card {
        padding: 24px;
    }

    .news-card h3 {
        min-height: auto;
        word-break: break-all;
    }
}

/* 分类区块 */
.category-section {
    margin-bottom: 40px;
    --category-accent: #2c5282;
    --impact-accent: #10b981;
    min-width: 0;
    max-width: 100%;
}

.category-section:last-child {
    margin-bottom: 0;
}

.category-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
}

.category-title::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--category-accent);
}

/* 新闻卡片 */
.news-card {
    background: white;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 5px solid var(--category-accent);
    border-top: 4px solid var(--category-accent);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.news-card h3 {
    font-size: 18px;
    color: #1e3a5f;
    margin-bottom: 12px;
    font-weight: 700;
    line-height: 1.4;
    min-height: 50.4px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.news-meta {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.news-source {
    color: #2c5282;
    font-weight: 600;
}

.news-date {
    color: #9ca3af;
}

.news-content {
    font-size: 15px;
    color: #374151;
    margin-bottom: 20px;
    line-height: 1.6;
    letter-spacing: 0.5px;
    flex-grow: 1;
}

.news-content p {
    margin-bottom: 8px;
    line-height: 1.6;
}

.news-impact {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    padding: 18px 22px;
    border-radius: 10px;
    font-size: 14px;
    color: #065f46;
    border-left: 5px solid var(--impact-accent);
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}

.news-impact strong {
    color: #1e3a5f;
    font-weight: 600;
}

.news-link {
    display: inline-block;
    margin-top: auto;
    padding: 12px 28px;
    background: linear-gradient(135deg, #2c5282 0%, #1e3a5f 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
}

.news-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 82, 130, 0.3);
}

/* 分类标签（保留兼容性） */
.category-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.category-tag {
    padding: 8px 16px;
    background: linear-gradient(135deg, #e7f5ff 0%, #dbeafe 100%);
    color: #2c5282;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    transition: transform 0.2s;
}

.category-tag:hover {
    transform: translateY(-2px);
}

/* 历史记录页面 */
.archive-list {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.archive-header {
    padding: 30px 40px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
}

.archive-header h3 {
    font-size: 24px;
    color: #1e3a5f;
    margin-bottom: 8px;
    font-weight: 700;
}

.archive-header p {
    font-size: 14px;
    color: #6b7280;
}

.archive-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 40px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.3s;
}

.archive-item:hover {
    background: #f8fafc;
}

.archive-item:last-child {
    border-bottom: none;
}

.archive-info {
    flex: 1;
    padding-right: 20px;
}

.archive-title {
    font-size: 16px;
    color: #1e3a5f;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.archive-meta {
    font-size: 13px;
    color: #9ca3af;
}

.archive-link {
    color: #2c5282;
    text-decoration: none;
    padding: 10px 20px;
    background: linear-gradient(135deg, #2c5282 0%, #1e3a5f 100%);
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.archive-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 82, 130, 0.3);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 50px;
    padding-bottom: 20px;
}

.pagination button {
    padding: 10px 20px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
    transition: all 0.3s;
}

.pagination button:hover {
    background: linear-gradient(135deg, #2c5282 0%, #1e3a5f 100%);
    color: white;
    border-color: #1e3a5f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 82, 130, 0.2);
}

.pagination button.active {
    background: linear-gradient(135deg, #2c5282 0%, #1e3a5f 100%);
    color: white;
    border-color: #1e3a5f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 82, 130, 0.2);
}

/* 页脚 */
.footer {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    color: white;
    padding: 36px 0;
    margin-top: 60px;
}

.footer-content {
    text-align: center;
}

.footer-text {
    font-size: 14px;
    opacity: 0.85;
    line-height: 1.6;
}

.footer-text:last-child {
    margin-top: 12px;
    opacity: 0.7;
    font-size: 13px;
}

/* 分类样式 */
.category-section h4 {
    font-size: 20px;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
}

.category-section h4::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(135deg, #2c5282 0%, #1e3a5f 100%);
}

.category-综合要闻 {
    --category-accent: #2c5282;
    --impact-accent: #2c5282;
}

.category-防汛抗旱 {
    --category-accent: #dd6b20;
    --impact-accent: #dd6b20;
}

.category-水利工程 {
    --category-accent: #3182ce;
    --impact-accent: #3182ce;
}

.category-水资源管理 {
    --category-accent: #38a169;
    --impact-accent: #38a169;
}

.category-水生态环境 {
    --category-accent: #2f855a;
    --impact-accent: #2f855a;
}

.category-政策法规 {
    --category-accent: #805ad5;
    --impact-accent: #805ad5;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2c5282;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.3;
}

/* 月份筛选器 */
.month-filter {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.month-filter label {
    font-size: 15px;
    font-weight: 600;
    color: #1e3a5f;
    white-space: nowrap;
}

.date-filter-select {
    padding: 10px 16px;
    font-size: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    color: #1e3a5f;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    min-width: 180px;
}

.date-filter-select:hover {
    border-color: #2c5282;
}

.date-filter-select:focus {
    outline: none;
    border-color: #2c5282;
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
}

/* 日期列表 */
.date-list {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.date-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 40px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.3s, transform 0.2s;
    cursor: pointer;
}

.date-item:hover {
    background: #f8fafc;
    transform: translateX(4px);
}

.date-item:last-child {
    border-bottom: none;
}

.date-info {
    flex: 1;
    padding-right: 20px;
}

.date-title {
    font-size: 18px;
    color: #1e3a5f;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.4;
}

.date-meta {
    font-size: 14px;
    color: #9ca3af;
}

.date-link {
    color: #2c5282;
    text-decoration: none;
    padding: 10px 20px;
    background: linear-gradient(135deg, #2c5282 0%, #1e3a5f 100%);
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.date-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 82, 130, 0.3);
}

/* 日期详情页 */
.archive-detail {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.detail-header {
    padding: 40px 40px 30px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 2px solid #e2e8f0;
    position: relative;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border: 2px solid #e2e8f0;
    color: #2c5282;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.back-button:hover {
    background: linear-gradient(135deg, #2c5282 0%, #1e3a5f 100%);
    color: white;
    border-color: #1e3a5f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 82, 130, 0.2);
}

.detail-title {
    font-size: 28px;
    color: #1e3a5f;
    margin-bottom: 8px;
    font-weight: 700;
    line-height: 1.3;
}

.detail-subtitle {
    font-size: 15px;
    color: #6b7280;
    font-weight: 400;
}

/* ── 往期日报：年月树形结构 ──────────────────────────── */
.archive-tree {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    padding: 10px 0;
}

.tree-year {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 8px;
    margin-bottom: 4px;
}
.tree-year:last-child { border-bottom: none; }

.tree-year-label {
    font-size: 17px;
    font-weight: 700;
    color: #1e3a5f;
    padding: 14px 32px 8px;
    letter-spacing: 1px;
}

.tree-months { padding: 0 16px 8px 32px; }

.tree-month { margin-bottom: 4px; }

.tree-month-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}
.tree-month-label:hover { background: #f0f4f8; }

.tree-arrow {
    font-size: 13px;
    color: #2c5282;
    width: 14px;
    display: inline-block;
    transition: transform 0.2s;
}

.tree-month-name {
    font-size: 15px;
    font-weight: 600;
    color: #2c5282;
}

.tree-month-count {
    font-size: 13px;
    color: #9ca3af;
}

.tree-days {
    padding: 4px 0 4px 24px;
    border-left: 2px solid #e2e8f0;
    margin-left: 20px;
    margin-top: 2px;
}

.tree-day-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-radius: 8px;
    transition: background 0.2s, transform 0.15s;
    cursor: pointer;
}
.tree-day-item:hover {
    background: #f8fafc;
    transform: translateX(3px);
}

.day-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.day-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.day-meta {
    font-size: 12px;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 10px;
}
