/* 通用工具类 */
.line-clamp-1 { 
    display: -webkit-box; 
    -webkit-line-clamp: 1; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
}

/* 新闻列表最后一项无边框 */
.news-list-no-last-border li:last-child {
    border-bottom: none;
}

.line-clamp-2 { 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
}

.line-clamp-3 { 
    display: -webkit-box; 
    -webkit-line-clamp: 3; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
}

/* 宽高比 */
.aspect-video { aspect-ratio: 16/9; }
.aspect-square { aspect-ratio: 1/1; }
.aspect-4-3 { aspect-ratio: 4/3; }

/* 新闻卡片 */
.news-card { transition: all 0.3s ease; }
.news-card:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
}

/* 导航链接 */
.nav-link:hover { background-color: rgba(255,255,255,0.1); }

/* 区块标题 */
.section-title::before { 
    content: ''; 
    display: inline-block; 
    width: 4px; 
    height: 20px; 
    background: #3b4a99; 
    margin-right: 8px; 
    vertical-align: middle; 
}

/* 标签徽章 */
.tag-badge { background: linear-gradient(135deg, #ff6b35, #ff8a5c); }

/* 平滑滚动 */
.scroll-smooth { scroll-behavior: smooth; }

/* 轮播项 */
.carousel-item { transition: opacity 0.5s ease-in-out; }

/* 大图轮播组件样式 */
.hero-carousel {
    position: relative;
    aspect-ratio: 16/9;
    border-top-left-radius: 0.5rem;
    overflow: hidden;
}

.hero-carousel-item {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 0;
}

.hero-carousel-item.active {
    opacity: 1;
    z-index: 1;
}

.hero-carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 1.5rem;
}

.hero-carousel-title {
    color: white;
    font-weight: bold;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-carousel-title:hover {
    color: rgba(255,255,255,0.9);
}

/* 轮播控制按钮 */
.hero-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255,255,255,0.3);
    padding: 0.5rem;
    border-radius: 9999px;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
    z-index: 10;
}

.hero-carousel-btn:hover {
    background-color: rgba(255,255,255,0.5);
}

.hero-carousel-btn.prev {
    left: 1rem;
}

.hero-carousel-btn.next {
    right: 1rem;
}

/* 轮播指示器 */
.hero-carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.hero-carousel-indicator {
    height: 0.25rem;
    border-radius: 9999px;
    background-color: rgba(255,255,255,0.5);
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    padding: 0;
}

.hero-carousel-indicator.active {
    background-color: white;
    width: 2rem;
}

.hero-carousel-indicator:not(.active) {
    width: 0.5rem;
}

/* 分页按钮 */
.pagination-btn:hover:not(.active):not(:disabled) { background-color: #e5e7eb; }
.pagination-btn.active { background-color: #3b4a99; color: white; }

/* 新分页列表样式 - 使用元素选择器实现 */
.pagination-list {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination-list > li {
    display: inline-block;
}

.pagination-list > li > a,
.pagination-list > li > span {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    color: #666666;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-list > li > a:hover {
    background-color: #e5e7eb;
    color: #333333;
}

.pagination-list > li > span {
    background-color: #3b4a99;
    color: #ffffff;
    border-color: #3b4a99;
}

/* 文章样式 (show.html) */
.article-content p { 
    margin-bottom: 1.5rem; 
    line-height: 1.8; 
    text-indent: 2em; 
}

.article-content img { 
    margin: 1.5rem auto; 
    max-width: 100%; 
    border-radius: 8px; 
}

.article-content h2 { 
    font-size: 1.25rem; 
    font-weight: bold; 
    margin: 2rem 0 1rem; 
    color: #333; 
}

.article-content h3 { 
    font-size: 1.125rem; 
    font-weight: bold; 
    margin: 1.5rem 0 0.75rem; 
    color: #333; 
}

/* 分享按钮 */
.share-btn { transition: transform 0.2s ease; }
.share-btn:hover { transform: scale(1.1); }

/* 相关卡片 */
.related-card { transition: all 0.3s ease; }
.related-card:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
}
