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

body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* 头部样式 */
header {
    background-image: url('/images/banner-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 45px 0;
    position: relative;
}

/* 添加半透明白色蒙版以增强可读性 */
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.75);
    z-index: 1;
}

header .container {
    position: relative;
    z-index: 2;
}

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

.logo-section {
    display: flex;
    align-items: center;
}

/* 单一LOGO图片样式 */
.logo-full {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-full img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

/* 旧版分离式LOGO样式（保留兼容） */
.logo {
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.school-name h1 {
    font-size: 32px;
    color: #333;
    margin-bottom: 8px;
}

.school-name p {
    font-size: 16px;
    color: #666;
    letter-spacing: 2px;
}

.search-box {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 25px;
    padding: 10px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.search-box input {
    border: none;
    outline: none;
    padding: 8px;
    width: 300px;
    font-size: 16px;
}

.search-box button {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 20px;
}

/* 主导航栏 */
.main-nav {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.4);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-list {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

/* 一级导航项 */
.nav-list .nLi {
    position: relative;
}

.nav-list .nLi h3 {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

.nav-list .nLi h3 a,
.nav-list li a {
    display: block;
    padding: 20px 30px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

.nav-list .nLi h3 a:hover,
.nav-list li a:hover,
.nav-list li a.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-list .nLi h3 a::after,
.nav-list li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: #fff;
    transition: width 0.3s;
}

.nav-list .nLi h3 a:hover::after,
.nav-list li a:hover::after,
.nav-list li a.active::after {
    width: 80%;
}

/* 二级子菜单 */
.nav-list .nLi .sub {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 4px 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-list .nLi:hover .sub {
    display: block !important;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-list .nLi .sub li {
    border-bottom: 1px solid #f0f0f0;
}

.nav-list .nLi .sub li:last-child {
    border-bottom: none;
}

.nav-list .nLi .sub li a {
    padding: 12px 20px;
    color: #333;
    font-size: 14px;
    font-weight: normal;
    white-space: nowrap;
}

.nav-list .nLi .sub li a:hover {
    background-color: #3498db;
    color: #fff;
}

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

/* clearfix */
.clearfix::after {
    content: '';
    display: table;
    clear: both;
}

/* 自动隐藏横幅 */
.auto-hide-banner {
    width: 100%;
    overflow: hidden;
    transition: max-height 0.5s ease-out, opacity 0.5s ease-out;
    max-height: 1000px;
    opacity: 1;
}

.auto-hide-banner.hidden {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
}

.auto-hide-banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* 主要内容区域 */
.main-content {
    padding: 20px 0;
    background: #f8f9fa;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 30px;
}

/* 轮播图区域 */
.slider-section {
    position: relative;
}

.slider {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.slide {
    position: relative;
    display: none;
}

.slide.active {
    display: block;
}

.slide a {
    display: block;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(52, 152, 219, 0.9);
    color: white;
    padding: 15px 20px;
    font-size: 16px;
    transition: background 0.3s;
}

.slide a:hover .slide-caption {
    background: rgba(52, 152, 219, 1);
}

.slider-dots {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: white;
    width: 30px;
    border-radius: 5px;
}

/* 校园新闻区域 */
.news-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    height: 400px;
    display: flex;
    flex-direction: column;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 3px solid #3498db;
}

.section-header h2 {
    font-size: 22px;
    color: #2c3e50;
}

.more-link {
    color: #3498db;
    font-size: 14px;
    transition: color 0.3s;
}

.more-link:hover {
    color: #2980b9;
}

.news-featured {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.news-featured h3 {
    font-size: 17px;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.4;
}

.news-featured p {
    color: #666;
    font-size: 13px;
    line-height: 1.7;
    text-align: justify;
}

.detail-link {
    color: #3498db;
    margin-left: 5px;
}

.news-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px dashed #e0e0e0;
    transition: background 0.3s;
}

.news-list li:hover {
    background: #f8f9fa;
    padding-left: 10px;
}

.news-list li a {
    flex: 1;
    color: #555;
    font-size: 13.5px;
    transition: color 0.3s;
    line-height: 1.5;
}

.news-list li a::before {
    content: '●';
    color: #3498db;
    margin-right: 8px;
    font-size: 12px;
}

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

.news-list li .date {
    color: #999;
    font-size: 13px;
    white-space: nowrap;
    margin-left: 15px;
}

/* 三栏信息区域 */
.info-section {
    background: #f0f0f0;
    padding: 20px 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.info-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.info-card:hover {
    transform: translateY(-5px);
}

.card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.card-image a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.card-image a:hover img {
    transform: scale(1.05);
}

.card-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(52, 152, 219, 0.9);
    color: white;
    padding: 12px 15px;
    font-size: 14px;
    transition: background 0.3s;
}

.card-image a:hover .card-title {
    background: rgba(52, 152, 219, 1);
}

.card-content {
    padding: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.card-content h3 {
    font-size: 20px;
    color: #2c3e50;
    margin: 0;
}

.card-more {
    color: #3498db;
    font-size: 14px;
    transition: color 0.3s;
    white-space: nowrap;
}

.card-more:hover {
    color: #2980b9;
}

.info-list li {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px dashed #e0e0e0;
}

.info-list li a {
    flex: 1;
    color: #555;
    font-size: 13px;
    line-height: 1.5;
    transition: color 0.3s;
}

.info-list li a:hover {
    color: #3498db;
}

.info-list li .date {
    color: #999;
    font-size: 12px;
    white-space: nowrap;
    margin-left: 10px;
}

/* 友情链接 */
.links-section {
    background: white;
    padding: 30px 0;
}

.links-header {
    margin-bottom: 20px;
}

.links-title {
    font-size: 24px;
    color: #3498db;
    font-weight: bold;
    font-style: italic;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

.link-button {
    padding: 12px 20px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
    font-size: 14px;
    color: #666;
    transition: all 0.3s;
}

.link-button:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* 页脚 */
footer {
    background: #5a5a5a;
    color: #ccc;
    padding: 30px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left p {
    font-size: 13px;
    line-height: 1.8;
    margin-bottom: 5px;
}

.footer-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.qr-code,
.badge {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-code img,
.badge img {
    max-width: 100%;
    max-height: 100%;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .links-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* 列表页布局优化 - 平板端 */
    .list-layout {
        grid-template-columns: 1fr;
    }

    .category-sidebar {
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    /* ==== 通用移动端响应式规则 ==== */
    
    /* 防止任何元素超出屏幕宽度 */
    html {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }

    body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
        margin: 0;
        padding: 0;
    }

    * {
        max-width: 100%;
    }

    /* 容器padding优化 */
    .container {
        padding: 0 3vw;
        max-width: 100%;
        width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    /* 确保所有图片自适应 */
    img {
        max-width: 100%;
        height: auto;
    }

    /* 表格滚动显示 */
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* 视频、iframe等嵌入元素自适应 */
    iframe,
    video,
    embed,
    object {
        max-width: 100%;
    }

    /* ==== 头部样式 ==== */
    
    header {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
        padding: 4vw 0;
    }

    .header-content {
        flex-direction: column;
        gap: 3vw;
        width: 100%;
        max-width: 100%;
    }

    /* 导航栏优化 - 确保可以滚动 */
    .main-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }

    .nav-list {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE 10+ */
        padding: 0;
        margin: 0;
        width: auto;
        min-width: 100%;
    }

    .nav-list::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }

    .nav-list li,
    .nav-list .nLi {
        flex-shrink: 0;
    }

    .nav-list li a,
    .nav-list .nLi h3 a {
        padding: 3.5vw 3vw;
        font-size: clamp(12px, 3.2vw, 14px);
        white-space: nowrap;
    }

    /* 移动端二级菜单优化 */
    .nav-list .nLi .sub {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 180px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        border-radius: 0;
        background: #f8f9fa;
        margin-top: 0;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        z-index: 1001;
    }

    .nav-list .nLi .sub.show {
        display: block !important;
    }

    .nav-list .nLi:hover .sub {
        /* 移动端禁用hover,使用JavaScript控制 */
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

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

    .nav-list .nLi .sub li a {
        padding: 2.5vw 3vw;
        font-size: clamp(11px, 3vw, 13px);
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    /* 移动端一级菜单带子菜单的标识 */
    .nav-list .nLi.has-submenu h3 a::before {
        content: '▼';
        font-size: clamp(9px, 2.5vw, 11px);
        margin-right: 1.5vw;
        display: inline-block;
        transition: transform 0.3s;
    }

    .nav-list .nLi.has-submenu.active h3 a::before {
        transform: rotate(180deg);
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .links-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 页脚优化 */
    footer {
        padding: 4vw 0;
        overflow-x: hidden;
    }

    .footer-content {
        flex-direction: column;
        gap: 4vw;
        max-width: 100%;
        width: 100%;
    }

    .footer-left,
    .footer-right {
        width: 100%;
        max-width: 100%;
    }

    .footer-left p {
        font-size: clamp(10px, 2.8vw, 12px);
        line-height: 1.6;
        word-break: break-all;
        overflow-wrap: break-word;
    }

    .footer-right {
        justify-content: center;
        flex-wrap: wrap;
        gap: 3vw;
    }

    .qr-code,
    .badge {
        width: clamp(50px, 15vw, 70px);
        height: clamp(50px, 15vw, 70px);
    }

    /* 优化轮播图和新闻区域在手机端的布局 */
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .slide img {
        height: 250px;
    }

    .news-section {
        height: auto;
    }

    /* 优化搜索框 */
    .search-box {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 2vw 3vw;
    }

    .search-box input {
        width: 100%;
        max-width: calc(100% - 60px);
        font-size: clamp(13px, 3.5vw, 15px);
        padding: 2vw;
    }

    .search-box button {
        padding: 2vw 3vw;
        font-size: clamp(14px, 3.5vw, 16px);
    }

    /* 优化LOGO */
    .logo-full {
        height: clamp(50px, 15vw, 70px);
    }

    /* ===== 列表页手机端优化 ===== */
    
    /* 面包屑导航优化 */
    .breadcrumb {
        padding: 2.5vw 0;
        font-size: clamp(11px, 3vw, 13px);
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        margin: 0;
    }

    .breadcrumb .container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding: 0 3vw !important;
        max-width: 100%;
        margin: 0 auto;
        box-sizing: border-box;
    }

    .breadcrumb .container::-webkit-scrollbar {
        display: none;
    }

    .breadcrumb a,
    .breadcrumb span {
        font-size: clamp(11px, 3vw, 13px);
    }

    /* 列表内容区优化 */
    .list-content {
        padding: 3vw 0;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .list-content .container {
        max-width: 100%;
        padding: 0 3vw !important;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
        margin: 0 auto;
    }

    /* 手机端隐藏左侧栏目导航 */
    .category-sidebar {
        display: none;
    }

    /* 列表布局优化为单栏 */
    .list-layout {
        display: block;
        width: 100%;
        grid-template-columns: 1fr;
    }

    /* 右侧内容区优化 */
    .list-main {
        width: 100%;
        max-width: 100%;
        padding: 3vw 3vw !important;
        margin: 0 !important;
        border-radius: 5px;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 2vw;
        padding-bottom: 3vw;
        margin-bottom: 3vw;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .list-header h2 {
        font-size: clamp(16px, 4.5vw, 20px);
        margin: 0 !important;
        padding: 0 !important;
        word-break: break-all;
        width: 100%;
        line-height: 1.4;
        box-sizing: border-box;
    }

    .breadcrumb-inline {
        font-size: clamp(10px, 2.8vw, 12px);
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        box-sizing: border-box;
        padding: 0 !important;
        margin: 0 !important;
    }

    .breadcrumb-inline::-webkit-scrollbar {
        display: none;
    }

    .breadcrumb-inline a,
    .breadcrumb-inline span {
        font-size: clamp(10px, 2.8vw, 12px);
    }

    /* 新闻列表项优化 */
    .simple-news-list {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }
    
    .simple-news-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 3vw 0 !important;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
        margin: 0 !important;
    }

    .simple-news-item .news-title {
        font-size: clamp(13px, 3.5vw, 15px);
        line-height: 1.6;
        margin-bottom: 1.5vw;
        word-break: break-all;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .simple-news-item .news-title::before {
        margin-right: 1.5vw;
        font-size: clamp(8px, 2.5vw, 10px);
    }

    .simple-news-item .news-date {
        font-size: clamp(10px, 3vw, 12px);
        margin-left: 4vw;
        color: #aaa;
        white-space: nowrap;
    }

    /* 分页优化 */
    .pagination {
        flex-wrap: wrap;
        gap: 2vw;
        margin-top: 4vw;
        justify-content: center;
        width: 100%;
        max-width: 100%;
        padding: 0;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .page-btn,
    .page-num {
        padding: 2vw 2.5vw;
        font-size: clamp(11px, 3vw, 13px);
        min-width: auto;
        text-align: center;
        box-sizing: border-box;
        flex-shrink: 0;
        border: 1px solid #ddd;
        margin: 0;
    }

    .page-info {
        width: 100%;
        text-align: center;
        margin-top: 3vw !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        font-size: clamp(10px, 2.8vw, 12px) !important;
        padding: 0 !important;
        box-sizing: border-box;
        word-break: break-all;
        line-height: 1.5;
    }

    /* 隐藏部分页码，保持简洁 */
    .pagination .page-num:nth-child(n+8):nth-last-child(n+4) {
        display: none;
    }
}

/* ==================== 超小屏幕优化（320px-375px）==================== */
@media (max-width: 375px) {
    /* 进一步缩小间距 */
    .container {
        padding: 0 2.5vw !important;
        margin: 0 auto;
        box-sizing: border-box;
    }

    .list-content .container {
        padding: 0 2.5vw !important;
        box-sizing: border-box;
    }

    .list-main {
        padding: 2.5vw 2.5vw !important;
        margin: 0 !important;
        box-sizing: border-box;
    }

    /* 分页按钮更紧凑 */
    .page-btn,
    .page-num {
        padding: 1.5vw 2vw;
        min-width: auto;
        font-size: clamp(10px, 2.8vw, 12px);
        margin: 0;
        box-sizing: border-box;
    }

    .pagination {
        gap: 1.5vw;
        padding: 0 !important;
        margin-top: 4vw;
        box-sizing: border-box;
    }

    /* 新闻列表项更紧凑 */
    .simple-news-item {
        padding: 2.5vw 0 !important;
        margin: 0 !important;
        box-sizing: border-box;
    }

    .simple-news-item .news-date {
        margin-left: 3vw;
        margin-right: 0;
        padding: 0;
    }

    /* 页脚文字更小 */
    .footer-left p {
        font-size: clamp(9px, 2.5vw, 11px);
    }

    /* 只显示前3个和最后1个页码 */
    .pagination .page-num:nth-child(n+6):nth-last-child(n+3) {
        display: none;
    }

    .breadcrumb .container,
    .breadcrumb-inline {
        padding: 0 2.5vw !important;
    }

    .list-header {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0 !important;
    }
}

/* ==================== 列表页样式 ==================== */

/* 面包屑导航 */
.breadcrumb {
    background: #f8f9fa;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.breadcrumb a {
    color: #3498db;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: #2980b9;
}

.breadcrumb span {
    color: #666;
}

/* 列表内容区 */
.list-content {
    padding: 40px 0;
    background: #f5f5f5;
    min-height: 600px;
}

/* 列表布局 */
.list-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
}

/* 左侧栏目导航 */
.category-sidebar {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
}

.sidebar-title {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    padding: 25px 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.sidebar-title h2 {
    color: white;
    font-size: 22px;
    margin: 0;
    font-weight: 600;
    letter-spacing: 1px;
    text-align: center;
}

.category-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-menu li {
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

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

.category-menu li a {
    display: block;
    padding: 16px 20px;
    color: white;
    font-size: 15px;
    transition: all 0.3s;
    background: transparent;
    position: relative;
    text-align: center;
}

.category-menu li a::before {
    content: '▶';
    position: absolute;
    left: 20px;
    opacity: 0;
    transition: all 0.3s;
    font-size: 12px;
}

.category-menu li:hover a,
.category-menu li.active a {
    background: rgba(255, 255, 255, 0.2);
}

.category-menu li:hover a::before,
.category-menu li.active a::before {
    opacity: 0;
}

/* 右侧内容区域 */
.list-main {
    background: white;
    border-radius: 5px;
    padding: 30px;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.list-header h2 {
    font-size: 24px;
    color: #2c3e50;
    margin: 0;
}

.breadcrumb-inline {
    font-size: 14px;
    color: #999;
}

.breadcrumb-inline a {
    color: #3498db;
    transition: color 0.3s;
}

.breadcrumb-inline a:hover {
    color: #2980b9;
}

/* 简洁新闻列表 */
.simple-news-list {
    margin-bottom: 30px;
}

.simple-news-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px dashed #e0e0e0;
    transition: all 0.3s;
}

.simple-news-item:hover {
    background: #f8f9fa;
    padding-left: 10px;
}

.simple-news-item .news-title {
    flex: 1;
    color: #333;
    font-size: 15px;
    line-height: 1.6;
    transition: color 0.3s;
}

.simple-news-item .news-title::before {
    content: '●';
    color: #3498db;
    margin-right: 10px;
    font-size: 8px;
}

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

.simple-news-item .news-date {
    color: #999;
    font-size: 13px;
    white-space: nowrap;
    margin-left: 20px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.page-btn,
.page-num {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    color: #666;
    background: white;
    transition: all 0.3s;
    cursor: pointer;
}

.page-btn:hover,
.page-num:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.page-num.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-btn.disabled:hover {
    background: white;
    color: #666;
    border-color: #ddd;
}

/* ==================== 详情页样式 ==================== */

.detail-content {
    padding: 40px 0;
    background: #f8f9fa;
    min-height: 800px;
}

.detail-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

/* 文章主体 */
.article-main {
    background: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.article-header {
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.article-header h1 {
    font-size: 28px;
    color: #2c3e50;
    line-height: 1.5;
    margin-bottom: 20px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    font-size: 14px;
    color: #999;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.meta-item i {
    font-style: normal;
}

/* 文章内容 */
.article-content {
    font-size: 16px;
    line-height: 2;
    color: #333;
    overflow-x: hidden; /* 防止内容溢出 */
}

.article-content .lead-text {
    font-size: 17px;
    color: #555;
    background: #f8f9fa;
    padding: 20px;
    border-left: 4px solid #3498db;
    margin-bottom: 25px;
    line-height: 1.8;
}

.article-content h2 {
    font-size: 22px;
    color: #2c3e50;
    margin: 30px 0 15px;
    padding-left: 15px;
    border-left: 4px solid #3498db;
}

.article-content p {
    margin-bottom: 15px;
    text-align: justify;
}

/* 文章内容中的图片自适应 */
.article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 15px auto;
}

.article-image {
    margin: 30px 0;
    text-align: center;
}

.article-image img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.image-caption {
    color: #999;
    font-size: 14px;
    margin-top: 10px;
    font-style: italic;
}

.article-content blockquote {
    background: #f8f9fa;
    border-left: 5px solid #3498db;
    padding: 20px 30px;
    margin: 25px 0;
    font-style: italic;
}

.article-content blockquote p {
    color: #555;
    font-size: 16px;
    margin-bottom: 10px;
}

.article-content blockquote cite {
    color: #999;
    font-size: 14px;
    font-style: normal;
}

/* 文章标签 */
.article-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.tag {
    display: inline-block;
    background: #e3f2fd;
    color: #3498db;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 13px;
    margin-right: 10px;
    margin-bottom: 10px;
}

/* 文章底部 */
.article-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.article-share {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.article-share span {
    color: #666;
    font-weight: 500;
}

.share-btn {
    padding: 8px 20px;
    background: #f8f9fa;
    border-radius: 5px;
    color: #666;
    font-size: 14px;
    transition: all 0.3s;
}

.share-btn:hover {
    background: #3498db;
    color: white;
}

.article-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.prev-article,
.next-article {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 5px;
    color: #666;
    font-size: 14px;
    transition: all 0.3s;
}

.prev-article:hover,
.next-article:hover {
    background: #3498db;
    color: white;
    transform: translateX(5px);
}

/* 侧边栏 */
.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-widget {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

/* 栏目导航特殊背景 */
.sidebar-widget:has(.category-nav) {
    background: linear-gradient(135deg, #e3f2fd 0%, #f5f9ff 100%);
    border: 1px solid #bbdefb;
}

.sidebar-widget h3 {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #3498db;
}

.related-news li,
.hot-news li,
.category-nav li {
    margin-bottom: 12px;
}

.related-news a,
.category-nav a {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    transition: color 0.3s;
    display: block;
    padding: 8px 0;
    border-bottom: 1px dashed #e0e0e0;
}

.related-news a:hover,
.category-nav a:hover {
    color: #3498db;
    padding-left: 10px;
}

.hot-news li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed #e0e0e0;
}

.hot-rank {
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #999;
    border-radius: 3px;
    font-size: 13px;
    font-weight: bold;
}

.hot-rank.rank-1 {
    background: #ff4757;
    color: white;
}

.hot-rank.rank-2 {
    background: #ff6b81;
    color: white;
}

.hot-rank.rank-3 {
    background: #ffa502;
    color: white;
}

.hot-news a {
    flex: 1;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    transition: color 0.3s;
}

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

/* 响应式 - 详情页 */
@media (max-width: 1024px) {
    .detail-wrapper {
        grid-template-columns: 1fr;
    }

    /* 正文在上，侧边栏在下 */
    .article-main {
        order: 1;
    }

    .article-sidebar {
        order: 2;
    }
}

/* 手机端详情页优化 */
@media (max-width: 768px) {
    .detail-content {
        padding: 20px 0;
    }

    .detail-wrapper {
        grid-template-columns: 1fr;
    }

    /* 正文在上，侧边栏在下 */
    .article-main {
        order: 1;
        padding: 20px 15px;
        overflow-x: hidden;
        max-width: 100%;
    }

    .article-sidebar {
        order: 2;
    }

    /* 隐藏栏目导航 */
    .sidebar-widget:has(.category-nav) {
        display: none;
    }

    /* 文章标题优化 */
    .article-header h1 {
        font-size: 22px;
        line-height: 1.4;
    }

    .article-header .subtitle {
        font-size: 16px;
        display: block;
        margin-top: 10px;
    }

    /* 元信息优化 */
    .article-meta {
        flex-wrap: wrap;
        gap: 10px;
        font-size: 13px;
    }

    .meta-item {
        font-size: 12px;
    }

    /* 文章内容优化 */
    .article-content {
        font-size: 15px;
        overflow-x: hidden;
        word-wrap: break-word;
        word-break: break-word;
    }

    /* 确保所有图片自适应 */
    .article-content img {
        max-width: 100% !important;
        height: auto !important;
        width: auto !important;
        display: block;
        margin: 15px auto;
    }

    /* 表格自适应 */
    .article-content table {
        width: 100% !important;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* 视频和iframe自适应 */
    .article-content iframe,
    .article-content video,
    .article-content embed,
    .article-content object {
        max-width: 100% !important;
        height: auto !important;
    }

    /* 预格式化文本自适应 */
    .article-content pre {
        overflow-x: auto;
        white-space: pre-wrap;
        word-wrap: break-word;
    }

    /* 强制长单词和URL换行 */
    .article-content p,
    .article-content div,
    .article-content span {
        word-wrap: break-word;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .article-content h2 {
        font-size: 18px;
        padding-left: 10px;
    }

    /* 侧边栏组件优化 */
    .sidebar-widget {
        padding: 15px;
        margin-bottom: 15px;
    }

    .sidebar-widget h3 {
        font-size: 16px;
    }

    /* 上下篇导航优化 */
    .prev-article,
    .next-article {
        padding: 10px;
        font-size: 13px;
    }
}
