/* 基础样式 */
body {
    font-family: "Microsoft YaHei", "SimHei", sans-serif;
}

/* 新闻条目悬停效果 */
.news-item:hover {
    color: #c41e3a;
}

/* 导航链接悬停效果 */
.nav-link:hover {
    background-color: rgba(255,255,255,0.1);
}

/* 区块标题样式 */
.section-title {
    border-left: 4px solid #0066b3;
    padding-left: 10px;
}

/* 卡片悬停效果 */
.card-hover:hover {
    transform: translateY(-2px);
}

/* 滚动容器隐藏滚动条 */
.scroll-container::-webkit-scrollbar {
    display: none;
}

/* 新闻链接悬停效果样式 */

/* 图片链接悬停效果 */
.news-img-link {
    display: block;
    overflow: hidden;
    border-radius: 0.5rem;
    transition: box-shadow 0.3s ease;
}

.news-img-link:hover {
    box-shadow: 0 4px 12px rgba(0, 102, 179, 0.3);
}

.news-img-link img {
    transition: transform 0.3s ease;
}

.news-img-link:hover img {
    transform: scale(1.03);
}

/* 标题链接悬停效果 */
.news-title-link {
    display: block;
    transition: color 0.3s ease;
}

.news-title-link:hover {
    color: #c41e3a;
}

/* 视频卡片链接悬停效果 - 移除阴影，保留上下浮动 */
.video-card-link {
    display: block;
    transition: transform 0.3s ease;
}

.video-card-link:hover {
    transform: translateY(-4px);
}

.video-card-link:hover .video-title {
    color: #c41e3a;
}

/* 图片新闻链接悬停效果 - 与视频专区相同，移除阴影，保留上下浮动 */
.img-news-link {
    display: block;
    transition: transform 0.3s ease;
}

.img-news-link:hover {
    transform: translateY(-4px);
}

.img-news-link:hover .img-news-title {
    color: #c41e3a;
}

/* 专题卡片链接悬停效果 */
.topic-card-link {
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.topic-card-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.topic-card-link:hover .topic-title {
    color: #c41e3a;
}

/* 小图网格链接悬停效果 */
.grid-img-link {
    display: block;
    overflow: hidden;
    border-radius: 0.25rem;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.grid-img-link:hover {
    box-shadow: 0 2px 8px rgba(0, 102, 179, 0.25);
    transform: scale(1.02);
}

.grid-img-link img {
    transition: transform 0.3s ease;
}

.grid-img-link:hover img {
    transform: scale(1.05);
}

/* ==================== 轮播图样式 ==================== */

/* 轮播图容器 - 固定宽高比防止高度塌陷 */
.carousel-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    /* 移动端使用16:9比例 */
    padding-bottom: 56.25%;
}

@media (min-width: 1024px) {
    .carousel-container {
        /* 桌面端(lg及以上)使用固定高度，与右侧新闻列表对齐 */
        padding-bottom: 0;
        height: 392px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .carousel-container {
        /* 平板端使用固定高度 */
        padding-bottom: 0;
        height: 320px;
    }
}

/* 轮播项滑动区域 - 绝对定位填满容器 */
.carousel-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 轮播项 - 全部绝对定位叠加 */
.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    transition: opacity 500ms ease-out;
}

/* 当前显示的轮播项 */
.carousel-slide:first-of-type {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

/* 轮播项可见状态 - 通过JS添加active类控制 */
.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

/* 轮播项图片 - 填满容器 */
.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 轮播图链接悬停效果 */
.carousel-link {
    display: block;
    transition: opacity 0.3s ease;
}

.carousel-link:hover {
    opacity: 0.95;
}

.carousel-link:hover .carousel-title {
    color: #ffcccc;
}

/* 轮播导航按钮 */
.carousel-btn {
    cursor: pointer;
    border: none;
    outline: none;
}

.carousel-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* 轮播容器悬停时显示按钮 */
.carousel-container:hover .carousel-btn {
    opacity: 1 !important;
}

/* 指示器按钮样式 */
.carousel-indicator {
    cursor: pointer;
    border: none;
    outline: none;
    padding: 0;
    min-width: 0.75rem; /* w-3 */
}

.carousel-indicator:focus {
    outline: 2px solid #0066b3;
    outline-offset: 2px;
}

/* 指示器容器 */
.carousel-indicators {
    height: 0.5rem; /* 固定高度保持布局稳定 */
    align-items: center;
}

/* 响应式适配 */
@media (max-width: 767px) {
    .carousel-btn {
        width: 2rem !important;
        height: 2rem !important;
        font-size: 0.875rem;
    }
    
    /* 移动端轮播图高度调整 - 16:9比例由padding-bottom控制 */
    
    /* 移动端指示器更小 */
    .carousel-indicator {
        height: 0.25rem !important;
    }
}

/* 平板端适配 */
@media (min-width: 768px) and (max-width: 1023px) {
    .carousel-indicators {
        margin-top: 0.75rem;
    }
}

/* ==================== 轮播图样式结束 ==================== */

/* 要闻头条链接增强悬停效果 - 仅保留颜色变化 */
.headline-link {
    transition: color 0.3s ease;
}

.headline-link:hover {
    color: #c41e3a;
}

/* 滚动公告链接悬停效果 */
.marquee-link {
    transition: color 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.marquee-link:hover {
    color: #c41e3a;
}

/* 分页样式 - 仅使用元素选择器 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin-top: 2rem;
}

.pagination li a,
.pagination li span {
    display: block;
    padding: 0.5rem 1rem;
    border: 1px solid #e5e5e5;
    border-radius: 0.25rem;
    text-decoration: none;
    color: #666;
    transition: all 0.3s ease;
}

.pagination li a:hover {
    background-color: #0066b3;
    color: white;
    border-color: #0066b3;
}

.pagination li span {
    background-color: #0066b3;
    color: white;
    border-color: #0066b3;
}


