/**
 * 新闻/活动公告模块 — 自定义样式
 */

/* ========== 新闻卡片 ========== */
/* 卡片行Flex等高 */
.news-row {
    display: flex;
    flex-wrap: wrap;
}
.news-row .col-md-6 {
    display: flex;
}
.news-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    display: flex;
    flex-direction: column;
}
.news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* 标签行 */
.card-top {
    margin-bottom: 10px;
    line-height: 1.6;
}
.card-top .badge,
.card-top .pin-badge {
    margin-right: 4px;
    vertical-align: middle;
}

/* 标题 */
.card-title {
    margin: 0 0 6px 0;
    font-size: 17px;
    line-height: 1.4;
}
.card-title a {
    color: #333;
    text-decoration: none;
}
.card-title a:hover {
    color: #6366f1;
}

/* 时间 */
.card-time {
    color: #999;
    font-size: 13px;
    margin: 0 0 14px 0;
}

/* 内容区（自动撑开） */
.card-body {
    flex: 1;
    min-height: 0;
}
.card-body .news-thumbnail {
    max-height: 140px;
    width: 100%;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
}
.card-summary {
    color: #666;
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
}

/* 按钮固定底部 */
.card-btn {
    margin-top: 14px;
    align-self: flex-start;
}

.news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* ========== 分类标签 ========== */
.category-badge-news {
    background-color: #5bc0de;
    color: #fff;
}

.category-badge-event {
    background-color: #f0ad4e;
    color: #fff;
}

.category-badge-announce {
    background-color: #e74c3c;
    color: #fff;
}

/* ========== 缩略图 ========== */
.news-thumbnail {
    max-height: 120px;
    width: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* ========== 详情页大图 ========== */
.news-detail-image {
    max-width: 100%;
    max-height: 500px;
    border-radius: 6px;
}

/* ========== 正文区域 ========== */
.news-content {
    font-size: 15px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 40px;
}

/* ========== 分页 ========== */
.pagination-wrap {
    text-align: center;
    margin-top: 20px;
}

/* ========== 分类导航 ========== */
.category-nav .btn {
    margin: 0 5px;
}

/* ========== 管理后台表格 ========== */
.admin-table {
    width: 100%;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.admin-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.admin-table th,
.admin-table td {
    vertical-align: middle !important;
}

/* 已删除行 */
.deleted-row {
    background-color: #f5f5f5 !important;
    color: #999;
}

.deleted-row a,
.deleted-row .btn {
    opacity: 0.8;
}

/* ========== 管理表单 ========== */
.admin-form {
    max-width: 700px;
    margin: 0 auto;
}

.admin-form textarea {
    width: 100%;
    min-height: 300px;
}

/* ========== 图片预览 ========== */
.image-preview {
    max-width: 200px;
    border-radius: 4px;
    margin: 10px 0;
}

/* ========== 管理后台辅助 ========== */
.admin-alert {
    margin-bottom: 20px;
}

.admin-header {
    border-bottom: 2px solid #337ab7;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.btn-action {
    margin-right: 6px;
}

/* ========== 活动报名区域 ========== */
.registration-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.registration-section h4,
.registration-section h5 {
    color: #333;
}

/* ========== 置顶标识 ========== */
.pin-badge {
    display: inline-block;
    margin-bottom: 8px;
    margin-left: 4px;
    background: #e67e22;
    color: #fff;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

/* ========== 正文内容美化 ========== */
.news-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 8px 0;
}
.news-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}
.news-content table th,
.news-content table td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
}
.news-content table th {
    background: #f5f7fa;
    font-weight: 600;
}
.news-content h1, .news-content h2, .news-content h3 {
    margin: 18px 0 10px;
    color: #222;
}
.news-content h4, .news-content h5, .news-content h6 {
    margin: 14px 0 8px;
    color: #333;
}
.news-content blockquote {
    border-left: 4px solid #6366f1;
    padding: 8px 16px;
    margin: 12px 0;
    background: #f8f9ff;
    color: #555;
}
.news-content pre {
    background: #f6f8fa;
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
}
.news-content code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
}
.news-content a {
    color: #6366f1;
}
.news-content hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 20px 0;
}
