/* 自定义颜色变量 */
:root {
    --primary: #c41230;
    --secondary: #1a365d;
    --accent: #e53e3e;
    --navbg: #2d3748;
    --lightgray: #f7fafc;
    --textgray: #718096;
    --linkblue: #3182ce;
}

/* 全局样式 */
body {
    font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
}

/* 新闻卡片悬停效果 */
.news-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* 导航链接悬停 */
.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 侧边栏分区顶部边框 */
.sidebar-section {
    border-top: 3px solid #c41230;
}

/* 新闻列表项悬停标题变色 */
.news-item:hover .news-title {
    color: #c41230;
    transition: color 0.2s ease;
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 2px;
}

/* 面包屑导航 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #718096;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: #718096;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: #c41230;
}

.breadcrumb .current {
    color: #2d3748;
    font-weight: 500;
}

/* 列表页新闻条目 */
.list-news-item {
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.list-news-item:hover {
    background-color: #fafafa;
}

.list-news-item:last-child {
    border-bottom: none;
}

/* 过渡动画通用 */
.transition-all {
    transition: all 0.3s ease;
}

/* ========================================
   轮播图样式
   ======================================== */
.carousel {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    min-width: 100%;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    display: block;
}

/* 轮播图链接样式 */
.carousel-slide > a {
    display: block;
}

.carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px 24px 24px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    color: #ffffff;
}

.carousel-overlay h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    /* 单行截断 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.carousel-overlay h2 a,
.carousel-overlay p a {
    color: #ffffff;
    text-decoration: none;
}

.carousel-overlay h2 a:hover,
.carousel-overlay p a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.carousel-overlay p {
    font-size: 13px;
    opacity: 0.85;
    line-height: 1.5;
    /* 多行截断 - 兼容性写法 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-wrap: break-word;
    word-break: break-word;
}

/* 轮播箭头 */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.25);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.carousel-arrow:hover {
    background: rgba(255, 255, 255, 0.5);
}

.carousel-arrow.prev {
    left: 12px;
}

.carousel-arrow.next {
    right: 12px;
}

/* 轮播指示器 */
.carousel-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-dot.active {
    background: #ffffff;
    width: 24px;
    border-radius: 4px;
}

/* ========================================
   新闻卡片 - 图文混排（上图下文 card-hero）
   ======================================== */
.card-hero {
    overflow: hidden;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-hero:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.card-hero .card-hero-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.card-hero .card-hero-body {
    padding: 14px 16px;
}

.card-hero .card-hero-body h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 6px;
    line-height: 1.5;
    /* 单行截断 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.card-hero:hover .card-hero-body h3 {
    color: #c41230;
}

.card-hero .card-hero-body p {
    font-size: 13px;
    color: #718096;
    line-height: 1.6;
    /* 多行截断 - 兼容性写法 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-wrap: break-word;
    word-break: break-word;
}

/* 卡片链接样式 */
.card-hero-body h3 a,
.card-hero-body p a,
.card-text-body h3 a,
.card-text-body p a,
.card-body h3 a,
.card-body p a {
    color: inherit;
    text-decoration: none;
}

.card-hero-body h3 a:hover,
.card-text-body h3 a:hover,
.card-body h3 a:hover {
    color: #c41230;
}

.card-hero-body p a:hover,
.card-text-body p a:hover,
.card-body p a:hover {
    color: inherit;
}

/* 卡片图片链接样式 */
.card-hero > a,
.card-img-left > a,
.card-img-right > a {
    display: block;
    flex-shrink: 0;
    overflow: hidden;
}

/* ========================================
   新闻卡片 - 纯文字（card-text）
   ======================================== */
.card-text {
    display: flex;
    align-items: stretch;
    background: #ffffff;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid #c41230;
}

.card-text:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.card-text-body {
    padding: 16px;
    flex: 1;
}

.card-text-body h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 8px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.card-text:hover .card-text-body h3 {
    color: #c41230;
}

.card-text-body p {
    font-size: 13px;
    color: #718096;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}

.card-text-meta {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #a0aec0;
    gap: 12px;
}

/* ========================================
   新闻卡片 - 左图右文（card-img-left）
   ======================================== */
.card-img-left {
    display: flex;
    align-items: stretch;
    background: #ffffff;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-img-left:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.card-img-left .card-thumb {
    width: 240px;
	height: 160px;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.card-img-left .card-body {
    padding: 14px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-img-left .card-body h3 {
    font-size: 15px;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
    transition: color 0.2s ease;
}

.card-img-left:hover .card-body h3 {
    color: #c41230;
}

.card-img-left .card-body p {
    font-size: 13px;
    color: #718096;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   新闻卡片 - 左文右图（card-img-right）
   ======================================== */
.card-img-right {
    display: flex;
    align-items: stretch;
    background: #ffffff;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-img-right:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.card-img-right .card-body {
    padding: 14px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-img-right .card-body h3 {
    font-size: 15px;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
    transition: color 0.2s ease;
}

.card-img-right:hover .card-body h3 {
    color: #c41230;
}

.card-img-right .card-body p {
    font-size: 13px;
    color: #718096;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-img-right .card-thumb {
    width: 240px;
	height: 160px;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

/* ========================================
   新闻卡片 - 双图并列下方文字（card-dual-img）
   ======================================== */
.card-dual-img {
    background: #ffffff;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-dual-img:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.card-dual-img .card-dual-imgs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
}

.card-dual-img .card-dual-imgs img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
}

.card-dual-img .card-dual-body {
    padding: 14px 16px;
}

.card-dual-img .card-dual-body h3 {
    font-size: 15px;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.5;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.card-dual-img:hover .card-dual-body h3 {
    color: #c41230;
}

.card-dual-img .card-dual-body p {
    font-size: 13px;
    color: #718096;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   响应式：移动端卡片统一降级
   ======================================== */
@media (max-width: 767px) {
    .carousel-slide img {
        height: 200px;
    }

    .carousel-overlay {
        padding: 40px 16px 16px;
    }

    .carousel-overlay h2 {
        font-size: 15px;
    }

    .card-img-left,
    .card-img-right {
        flex-direction: column;
    }

    .card-img-left .card-thumb,
    .card-img-right .card-thumb {
        width: 100%;
        height: 160px;
    }

    .card-dual-img .card-dual-imgs img {
        height: 100px;
    }

    .card-hero .card-hero-img {
        height: 160px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .carousel-slide img {
        height: 280px;
    }
}

/* ========================================
   侧边栏卡片组件
   ======================================== */

/* 统计卡片 */
.stat-card {
    background: linear-gradient(135deg, #c41230 0%, #9b0d26 100%);
    border-radius: 0.5rem;
    padding: 16px;
    color: #ffffff;
}

.stat-card .stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stat-card .stat-item {
    text-align: center;
    padding: 8px 0;
}

.stat-card .stat-value {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 12px;
    opacity: 0.85;
    margin-top: 4px;
}

.stat-card .stat-item:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

/* 通知卡片 */
.notify-card {
    background: #fff8e6;
    border: 1px solid #f6e05e;
    border-radius: 0.5rem;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.notify-card .notify-icon {
    width: 32px;
    height: 32px;
    background: #ecc94b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #744210;
}

.notify-card .notify-content {
    flex: 1;
}

.notify-card .notify-title {
    font-size: 14px;
    font-weight: 600;
    color: #744210;
    margin-bottom: 4px;
}

.notify-card .notify-text {
    font-size: 13px;
    color: #975a16;
    line-height: 1.5;
}

.notify-card .notify-time {
    font-size: 11px;
    color: #b7791f;
    margin-top: 6px;
}

/* 资源卡片 */
.resource-card {
    background: #ffffff;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.resource-card .resource-header {
    padding: 12px 16px;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    align-items: center;
    gap: 8px;
}

.resource-card .resource-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
}

.resource-card .resource-list {
    padding: 8px 0;
}

.resource-card .resource-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.resource-card .resource-item:hover {
    background-color: #f7fafc;
}

.resource-card .resource-item img {
    width: 48px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.resource-card .resource-item .resource-info {
    flex: 1;
    min-width: 0;
}

.resource-card .resource-item .resource-name {
    font-size: 14px;
    color: #2d3748;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.resource-card .resource-item .resource-desc {
    font-size: 11px;
    color: #a0aec0;
    margin-top: 2px;
}

/* 按钮卡片 */
.quick-actions-card {
    background: #ffffff;
    border-radius: 0.5rem;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.quick-actions-card .actions-title {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 12px;
}

.quick-actions-card .actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.quick-actions-card .action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    border-radius: 8px;
    background: #f7fafc;
    border: 1px solid #edf2f7;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-actions-card .action-btn:hover {
    background: #edf2f7;
    border-color: #c41230;
}

.quick-actions-card .action-btn:hover .action-icon {
    color: #c41230;
}

.quick-actions-card .action-btn .action-icon {
    font-size: 20px;
    color: #4a5568;
    margin-bottom: 6px;
    transition: color 0.2s ease;
}

.quick-actions-card .action-btn .action-label {
    font-size: 14px;
    color: #4a5568;
    text-align: center;
}

/* 天气卡片 */
.weather-card {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    border-radius: 0.5rem;
    padding: 16px;
    color: #ffffff;
}

.weather-card .weather-main {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.weather-card .weather-icon {
    font-size: 36px;
}

.weather-card .weather-temp {
    font-size: 32px;
    font-weight: 700;
}

.weather-card .weather-desc {
    font-size: 14px;
    opacity: 0.9;
}

.weather-card .weather-details {
    display: flex;
    gap: 16px;
    font-size: 12px;
    opacity: 0.85;
}

/* 订阅卡片 */
.subscribe-card {
    background: #ffffff;
    border-radius: 0.5rem;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.subscribe-card .subscribe-title {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.subscribe-card .subscribe-desc {
    font-size: 12px;
    color: #718096;
    margin-bottom: 12px;
    line-height: 1.5;
}

.subscribe-card .subscribe-form {
    display: flex;
    gap: 8px;
}

.subscribe-card .subscribe-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s ease;
}

.subscribe-card .subscribe-input:focus {
    border-color: #c41230;
}

.subscribe-card .subscribe-btn {
    padding: 8px 16px;
    background: #c41230;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.subscribe-card .subscribe-btn:hover {
    background: #a00f28;
}

/* ========================================
   可点击新闻链接样式
   ======================================== */

/* 移除链接默认下划线 */
.news-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.news-link:hover {
    text-decoration: none;
}

/* 保持原有颜色不变 */
.news-link:hover .news-title {
    color: #c41230;
}

/* 推荐阅读图片和标题链接 */
.recommend-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.recommend-link:hover {
    text-decoration: none;
}

/* 右侧文本区域：flex 列方向，标题在上，时间在下，高度撑满与图片一致 */
.recommend-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 推荐标题：最多两行，超出截断省略 */
.recommend-title {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.5;
    transition: color 0.2s ease;
}

.recommend-link:hover .recommend-title {
    color: #c41230;
}

/* 推荐时间：固定在底部，小字灰色；flex/items-center 由 Tailwind 类控制 */
.recommend-time {
    font-size: 12px;
    color: #a0aec0;
}

/* ========================================
   分页控件样式（基于元素选择器）
   ======================================== */

/* 分页容器 */
ul.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

/* 分页列表项 */
ul.pagination > li {
    display: inline-flex;
}

/* 分页链接和当前页通用样式 */
ul.pagination > li > a,
ul.pagination > li > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 14px;
    color: #4a5568;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

/* 分页链接悬停效果 */
ul.pagination > li > a:hover {
    border-color: #c41230;
    color: #c41230;
    background-color: #fff5f5;
}

/* 当前页样式 */
ul.pagination > li > span {
    background-color: #c41230;
    border-color: #c41230;
    color: #ffffff;
    font-weight: 600;
}

/* ========================================
   文章内容区域图片样式
   ======================================== */

/* 针对文章内容区域内的所有img标签，使其居中显示 */
.prose img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    height: auto;
}