/* 乐子人新闻网样式文件 */

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

/* 网站头部样式 */
.header {
    background-color: #fff;
    border-bottom: 2px solid #e0e0e0;
    padding: 20px 0;
    margin-bottom: 20px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header-logo h1 {
    font-size: 2.5em;
    font-weight: bold;
    color: #2c3e50;
}

.header-logo a {
    text-decoration: none;
    color: #2c3e50;
}

.header-info p {
    font-size: 1.1em;
    color: #7f8c8d;
}

/* 导航栏样式 */
.nav {
    background-color: #2c3e50;
    border-radius: 4px;
}

.nav ul {
    display: flex;
    list-style: none;
}

.nav li {
    margin-right: 1px;
}

.nav a {
    display: block;
    padding: 12px 24px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.nav a:hover, .nav a.active {
    background-color: #34495e;
}

/* 主要内容区样式 */
.main-content {
    background-color: #fff;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 新闻列表样式 */
.section-title {
    font-size: 1.8em;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.news-list {
    margin-bottom: 30px;
}

.news-item {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

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

.news-item:hover {
    background-color: #f9f9f9;
}

.news-title h3 {
    font-size: 1.4em;
    margin-bottom: 10px;
}

.news-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-title a:hover {
    color: #3498db;
}

.news-meta {
    display: flex;
    color: #7f8c8d;
    font-size: 0.9em;
}

.news-source {
    margin-right: 20px;
    font-weight: 500;
    color: #3498db;
}

/* 分页样式 */
.pagination {
    text-align: center;
    margin-top: 30px;
}

.pagination ul {
    display: inline-flex;
    list-style: none;
}

.pagination li {
    margin: 0 5px;
}

.page-link {
    display: block;
    padding: 8px 16px;
    background-color: #fff;
    border: 1px solid #ddd;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.page-link:hover, .page-link.active {
    background-color: #3498db;
    color: #fff;
    border-color: #3498db;
}

/* 禁用状态的分页按钮样式 */
.pagination .disabled .page-link {
    color: #bdc3c7;
    background-color: #ecf0f1;
    border-color: #bdc3c7;
    cursor: not-allowed;
}

.pagination .disabled .page-link:hover {
    background-color: #ecf0f1;
    border-color: #bdc3c7;
}

/* 新闻详情页样式 */
.news-detail-title {
    font-size: 2em;
    color: #2c3e50;
    margin-bottom: 20px;
    line-height: 1.4;
}

.news-detail-meta {
    display: flex;
    color: #7f8c8d;
    font-size: 0.9em;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.news-detail-content {
    font-size: 1.1em;
    line-height: 1.8;
    color: #555;
    margin-bottom: 40px;
}

.news-detail-content p {
    margin-bottom: 20px;
}

.news-detail-back {
    text-align: center;
    margin-top: 40px;
}

.back-button {
    display: inline-block;
    padding: 10px 30px;
    background-color: #3498db;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.back-button:hover {
    background-color: #2980b9;
}

/* 新闻详情页导航样式 */
.news-detail-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.nav-prev, .nav-home, .nav-next {
    flex: 1;
}

.nav-prev {
    text-align: left;
}

.nav-home {
    text-align: center;
}

.nav-next {
    text-align: right;
}

.nav-button {
    display: inline-block;
    padding: 15px 20px;
    background-color: #3498db;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: none;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    min-width: 120px;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
}

.nav-button:hover {
    background-color: #2980b9;
}

.nav-prev .nav-button {
    text-align: left;
}

.nav-next .nav-button {
    text-align: right;
}

.nav-label {
    display: block;
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.9);
    font-weight: normal;
    margin-bottom: 5px;
}

.nav-title {
    display: block;
    font-size: 0.9em;
    color: #fff;
    line-height: 1.3;
    font-weight: 500;
}

.nav-button.disabled {
    background-color: #bdc3c7;
    color: #fff;
    cursor: not-allowed;
}

.nav-button.disabled:hover {
    background-color: #bdc3c7;
}

.nav-home .nav-button {
    background-color: #2ecc71;
}

.nav-home .nav-button:hover {
    background-color: #27ae60;
}

/* 网站底部样式 */
.footer {
    background-color: #2c3e50;
    color: #fff;
    padding: 40px 0;
    margin-top: 40px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.footer-info h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.footer-info p {
    color: #bdc3c7;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 5px 10px;
    border-radius: 4px;
}

.footer-links a:hover {
    color: #fff;
    background-color: #34495e;
}

.footer-copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
    font-size: 0.9em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        text-align: center;
    }
    
    .header-logo h1 {
        font-size: 2em;
        margin-bottom: 10px;
    }
    
    .nav ul {
        flex-direction: column;
    }
    
    .nav li {
        margin-right: 0;
        margin-bottom: 1px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        margin-top: 20px;
    }
    
    .footer-links ul {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-links a {
        display: block;
        padding: 8px 16px;
    }
    
    .pagination ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* 新闻详情页响应式导航 */
    .news-detail-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-prev, .nav-home, .nav-next {
        width: 100%;
        text-align: center;
    }
    
    .nav-prev .nav-button,
    .nav-next .nav-button,
    .nav-home .nav-button {
        text-align: center;
        width: 100%;
    }
}