/**
* dynamic_graph.css
* 资讯中心样式
* 作者：莫哥
* 日期：2026/06/01
* 版本：1.0.0
*
* 统一字体大小规范
*/

.news-container {
    max-width: 86%;
    margin: 0 auto;
    padding: 20px 15px;
    padding-top: 90px !important;
}

.news-header {
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.news-header h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.news-header .sub {
    font-size: 14px;
    color: #64748b;
    background: #e9edf4;
    padding: 4px 16px;
    border-radius: 20px;
}

/* 模块卡片 */
.module-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    padding: 24px;
    margin-bottom: 40px;
    transition: box-shadow 0.2s;
}

.module-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.module-title {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.module-title .badge {
    font-size: 12px;
    font-weight: 500;
    background: #dbeafe;
    color: #2563eb;
    padding: 2px 12px;
    border-radius: 12px;
}

.module-body {
    display: flex;
    gap: 24px;
    min-height: 380px;
}

.module-body .left,
.module-body .right {
    flex: 1;
    min-width: 0;
}

/* ========== 图文模块特殊样式：左侧文字 35%，右侧图片 65% ========== */
.module-image .module-body .left {
    flex: 0 0 35%;
    max-width: 35%;
}

.module-image .module-body .right {
    flex: 0 0 65%;
    max-width: 65%;
}

/* ========== 视频模块保持 1:1 ========== */
.module-video .module-body .left,
.module-video .module-body .right {
    flex: 1;
    max-width: 50%;
}

/* 视频模块 */
.video-wrapper {
    position: relative;
    background: #0a0f1a;
    border-radius: 14px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.video-wrapper video {
    width: 100%;
    height: auto;
    max-height: 420px;
    background: #0a0f1a;
    display: block;
    object-fit: contain;
    border-radius: 14px 14px 0 0;
    cursor: pointer;
}

.video-info-bar {
    padding: 12px 16px;
    background: #0f172a;
    color: #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    border-radius: 0 0 14px 14px;
}

.video-info-bar .title {
    font-weight: 500;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.video-info-bar .counter {
    font-size: 13px;
    color: #94a3b8;
    background: #1e293b;
    padding: 2px 14px;
    border-radius: 20px;
    white-space: nowrap;
}

/* 富文本区 - 内容全部显示，无高度限制 */
.rich-area {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 4px 0;
}

.rich-area .rich-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    line-height: 1.3;
}

.rich-area .rich-desc {
    font-size: 15px;
    color: #475569;
    margin-bottom: 12px;
    line-height: 1.6;
}

.rich-area .rich-body {
    font-size: 15px;
    color: #1e293b;
    line-height: 1.8;
    max-height: none;
    overflow-y: visible;
    padding-right: 4px;
    flex: 1 0 auto;
}

.rich-area .rich-body h4 {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin: 12px 0 6px;
}

.rich-area .rich-body p {
    margin-bottom: 10px;
}

.rich-area .rich-body ul {
    padding-left: 20px;
    margin-bottom: 10px;
}
.rich-area .rich-body ul li {
    margin-bottom: 4px;
}

.rich-area .rich-body .tag {
    display: inline-block;
    background: #eef2f6;
    color: #334155;
    font-size: 13px;
    padding: 1px 12px;
    border-radius: 12px;
    margin-right: 6px;
    margin-bottom: 4px;
}

/* ========== 图片轮播模块 - 增强视觉效果 ========== */
.image-carousel-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #f1f4f9;
    height: 100%;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.image-carousel-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    box-shadow: inset 0 2px 20px rgba(0, 0, 0, 0.05);
    pointer-events: none;
    z-index: 2;
}

.image-carousel-slides {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: 100%;
    flex: 1;
}

.image-carousel-slide {
    flex: 0 0 100%;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f4f9;
    position: relative;
}

.image-carousel-slide img {
    width: 100%;
    height: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.image-carousel-slide:hover img {
    transform: scale(1.02);
}

/* 图片序号角标 */
.image-carousel-slide .slide-index {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    backdrop-filter: blur(4px);
    z-index: 3;
}

/* 指示器样式 - 更精致 */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 14px 0 10px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    margin-top: -4px;
    position: relative;
    z-index: 3;
    border-radius: 0 0 16px 16px;
}

.carousel-indicators .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
    outline: none;
}

.carousel-indicators .dot:hover {
    background: #94a3b8;
    transform: scale(1.15);
}

.carousel-indicators .dot.active {
    background: #2563eb;
    width: 28px;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

/* 图文控制条（切换图文记录） */
.image-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.image-controls .btn-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.image-controls button {
    background: #f1f4f9;
    border: none;
    border-radius: 10px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
}

.image-controls button:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.image-controls button:active {
    transform: scale(0.96);
}

.image-controls button.primary {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.image-controls button.primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.image-controls .counter {
    font-size: 14px;
    color: #64748b;
    background: #f1f4f9;
    padding: 4px 16px;
    border-radius: 20px;
    font-weight: 500;
}

.image-controls .auto-toggle {
    background: #e9edf4;
    border: none;
    border-radius: 20px;
    padding: 6px 18px;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.image-controls .auto-toggle:hover {
    background: #dce1e8;
}

.image-controls .auto-toggle.active {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.image-controls .auto-toggle.active:hover {
    background: #1d4ed8;
}

/* 空状态 */
.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 200px;
    color: #94a3b8;
    font-size: 15px;
    flex-direction: column;
    gap: 6px;
}

/* ========== 响应式 ========== */
@media (max-width: 992px) {
    .module-body {
        flex-direction: column;
    }
    .module-body .left,
    .module-body .right {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .module-image .module-body .left {
        order: 2;
        margin-bottom: 0;
        margin-top: 16px;
    }
    .module-image .module-body .right {
        order: 1;
    }
    .module-video .module-body .left,
    .module-video .module-body .right {
        max-width: 100% !important;
    }
    .video-wrapper video {
        max-height: 300px;
    }
    .image-carousel-slide img {
        max-height: 320px;
    }
    .image-carousel-wrapper {
        min-height: 250px;
    }
    .image-carousel-slide {
        min-height: 250px;
    }
    .rich-area .rich-body {
        max-height: none;
        overflow-y: visible;
    }
}

@media (max-width: 480px) {
    .news-container {
        padding: 10px 5px;
    }
    .module-card {
        padding: 16px;
    }
    .news-header h1 {
        font-size: 22px;
    }
    .video-info-bar .title {
        max-width: 60%;
        font-size: 13px;
    }
    .image-controls button {
        padding: 6px 12px;
        font-size: 13px;
    }
    .rich-area .rich-title {
        font-size: 17px;
    }
    .image-carousel-wrapper {
        min-height: 200px;
    }
    .image-carousel-slide {
        min-height: 200px;
    }
    .image-carousel-slide img {
        max-height: 240px;
    }
}

/* 动画 */
.fade-in {
    animation: fadeIn 0.35s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 图片切换淡入 */
.image-fade-in {
    animation: imageFadeIn 0.5s ease forwards;
}

@keyframes imageFadeIn {
    from {
        opacity: 0.5;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 隐藏模块（全局关闭时） */
.module-disabled {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
}