/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:hover {
    color: #1e88e5;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header - 固定在顶部但不跟随滚动 */
.site-header {
    background-color: #fff;
    border-bottom: 1px solid #e8e8e8;
    position: relative; /* 不使用sticky或fixed，确保不跟随滚动 */
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e88e5;
}

.site-logo span {
    color: #333;
}

/* Main Navigation */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    gap: 2rem;
}

.nav-list li a {
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    color: #555;
}

.nav-list li a:hover,
.nav-list li a.active {
    color: #1e88e5;
}

.nav-list li a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #1e88e5;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background-color: #333;
    transition: all 0.3s ease;
}

/* Main Content Area */
.main-content {
    padding: 20px 0;
    min-height: calc(100vh - 200px);
}

.content-wrapper {
    display: flex;
    gap: 30px;
}

.content-main {
    flex: 1;
    min-width: 0;
}

.content-sidebar {
    width: 300px;
    flex-shrink: 0;
}

/* Carousel */
.carousel {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.carousel-container {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease;
}

.carousel-item {
    min-width: 100%;
    height: 100%;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-item:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.carousel-item:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.carousel-item-content {
    text-align: center;
    color: #fff;
    padding: 20px;
}

.carousel-item-content h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.carousel-item-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background-color: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: #333;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.carousel-btn.prev {
    left: 15px;
}

.carousel-btn.next {
    right: 15px;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.carousel-indicator.active {
    background-color: #fff;
    width: 24px;
    border-radius: 5px;
}

/* Section Title */
.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #1e88e5;
    color: #333;
}

.section-title a {
    float: right;
    font-size: 0.9rem;
    font-weight: normal;
    color: #888;
}

/* News List */
.news-list {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.news-item {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.news-item-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.5;
}

.news-item-title a {
    color: #333;
}

.news-item-title a:hover {
    color: #1e88e5;
}

.news-item-meta {
    font-size: 0.85rem;
    color: #999;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.news-item-summary {
        word-break: break-all;
    overflow-wrap: break-word;
    max-width: 100%;
    font-size: 0.95rem;
    color: #666;
    margin-top: 8px;
    line-height: 1.7;
}

.news-item-category {
    color: #1e88e5;
    background-color: #e3f2fd;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* Pagination */
.pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #666;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: #1e88e5;
    border-color: #1e88e5;
    color: #fff;
}

.pagination .current {
    background-color: #1e88e5;
    border-color: #1e88e5;
    color: #fff;
}

.pagination .disabled {
    color: #ccc;
    cursor: not-allowed;
}

/* Sidebar Widgets */
.sidebar-widget {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.hot-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.hot-list li:last-child {
    border-bottom: none;
}

.hot-list li a {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
}

.hot-number {
    width: 20px;
    height: 20px;
    background-color: #ddd;
    color: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 2px;
}

.hot-list li:nth-child(1) .hot-number {
    background-color: #f5576c;
}

.hot-list li:nth-child(2) .hot-number {
    background-color: #ff9a3c;
}

.hot-list li:nth-child(3) .hot-number {
    background-color: #ffc107;
}

.hot-list li a:hover {
    color: #1e88e5;
}

/* Category List */
.category-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list li a {
    font-size: 0.95rem;
    color: #555;
}

.category-list li .count {
    font-size: 0.8rem;
    color: #999;
    background-color: #f5f5f5;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Article Page */
.article-container {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.article-header {
    margin-bottom: 30px;
    text-align: center;
}

.article-title {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.4;
    color: #222;
    margin-bottom: 20px;
}

.article-meta {
    font-size: 0.9rem;
    color: #999;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.article-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #444;
}

.article-content p {
     word-break: break-all;
  overflow-wrap: break-word;
  max-width: 100%;
    margin-bottom: 1.2em;
    text-indent: 2em;
}

.article-content h2,
.article-content h3 {
    margin: 1.5em 0 0.8em;
    font-weight: 600;
    color: #222;
}

.article-content h2 {
    font-size: 1.4rem;
}

.article-content h3 {
    font-size: 1.2rem;
}

/* Article Navigation */
.article-nav {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.article-nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.article-nav-prev,
.article-nav-next {
    flex: 1;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.article-nav-prev:hover,
.article-nav-next:hover {
    background-color: #f0f7ff;
}

.article-nav-label {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 5px;
}

.article-nav-title {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.5;
}

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

/* Breadcrumb */
.breadcrumb {
    padding: 15px 0;
    font-size: 0.9rem;
    color: #888;
}

.breadcrumb a {
    color: #666;
}

.breadcrumb a:hover {
    color: #1e88e5;
}

.breadcrumb span {
    margin: 0 8px;
}

/* Footer */
.site-footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-column h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #fff;
}

.footer-column ul li {
    margin-bottom: 8px;
}

.footer-column ul li a {
    color: #bdc3c7;
    font-size: 0.9rem;
}

.footer-column ul li a:hover {
    color: #3498db;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    font-size: 0.85rem;
    color: #95a5a6;
}

/* Page Header for List Pages */
.page-header {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

/* Responsive Design - Mobile Optimization */
@media screen and (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 12px;
    }

    .header-inner {
        height: 56px;
    }

    .site-logo {
        font-size: 1.3rem;
    }

    /* Mobile Navigation */
    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        background-color: #fff;
        border-bottom: 1px solid #e8e8e8;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

    .main-nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
        padding: 10px 0;
    }

    .nav-list li {
        width: 100%;
    }

    .nav-list li a {
        display: block;
        padding: 12px 20px;
        border-bottom: 1px solid #f5f5f5;
    }

    .nav-list li a.active::after {
        display: none;
    }

    /* Mobile Layout */
    .content-wrapper {
        flex-direction: column;
        gap: 20px;
    }

    .content-sidebar {
        width: 100%;
    }

    /* Mobile Carousel */
    .carousel-container {
        height: 220px;
    }

    .carousel-item-content h2 {
        font-size: 1.4rem;
    }

    .carousel-item-content p {
        font-size: 0.95rem;
    }

    .carousel-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    /* Mobile Article */
    .article-container {
        padding: 20px 15px;
    }

    .article-title {
        font-size: 1.4rem;
    }

    .article-content {
        font-size: 1rem;
    }

    .article-content p {
        text-indent: 2em;
    }

    .article-nav-links {
        flex-direction: column;
    }

    .article-nav-next {
        text-align: left;
    }

    /* Mobile Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }

    /* Mobile News List */
    .news-list {
        padding: 15px;
    }

    .news-item {
        padding: 12px 0;
    }

    .news-item-title {
        font-size: 1rem;
    }

    .news-item-meta {
        gap: 10px;
    }

    .pagination a,
    .pagination span {
        padding: 6px 12px;
    }
}

@media screen and (max-width: 480px) {
    .carousel-container {
        height: 180px;
    }

    .carousel-item-content h2 {
        font-size: 1.2rem;
        margin-bottom: 5px;
    }

    .carousel-item-content p {
        font-size: 0.85rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .article-meta {
        gap: 10px;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .content-sidebar,
    .article-nav,
    .carousel {
        display: none;
    }

    .article-container {
        box-shadow: none;
        padding: 0;
    }
}
