/* 新闻发布系统 - 前台样式 */
body {
    background-color: #f5f7fa;
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

a { text-decoration: none; }

/* 文章卡片 */
.article-card {
    transition: transform .2s, box-shadow .2s;
    background: #fff;
    border-radius: .75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.article-card .cover {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #e9ecef;
}
.article-card .card-body { padding: 1rem 1.25rem 1.25rem; }
.article-card h5 {
    font-size: 1.1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-card .summary {
    color: #6c757d;
    font-size: .9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

/* 置顶标签 */
.badge-top { background: #dc3545; }
.cat-badge { font-size: .75rem; }

/* 文章详情 */
.article-detail .cover-img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: .75rem;
    margin-bottom: 1.5rem;
}
.article-detail .content {
    font-size: 1.05rem;
    line-height: 1.9;
    color: #333;
}
.article-detail .content img {
    max-width: 100%;
    height: auto;
    border-radius: .5rem;
    margin: 1rem 0;
}
.article-detail .content h1,
.article-detail .content h2,
.article-detail .content h3 { margin: 1.2rem 0 .6rem; }
.article-detail .content p { margin: 0 0 1rem; }
.article-detail .content blockquote {
    border-left: 4px solid #0d6efd;
    padding: .5rem 1rem;
    color: #6c757d;
    background: #f8f9fa;
    margin: 1rem 0;
}
.article-detail .content table { width: 100%; margin: 1rem 0; }
.article-detail .content ul, .article-detail .content ol { padding-left: 1.5rem; }

/* 侧边栏 */
.sidebar-widget {
    background: #fff;
    border-radius: .75rem;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    margin-bottom: 1.25rem;
}
.sidebar-widget h6 {
    font-weight: 600;
    padding-bottom: .6rem;
    border-bottom: 2px solid #0d6efd;
    margin-bottom: 1rem;
}
.hot-list .hot-item {
    display: flex;
    padding: .5rem 0;
    border-bottom: 1px dashed #eee;
}
.hot-list .hot-item:last-child { border-bottom: none; }
.hot-list .rank {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    background: #dee2e6;
    color: #6c757d;
    border-radius: 50%;
    font-size: .75rem;
    margin-right: .6rem;
}
.hot-list .hot-item:nth-child(1) .rank { background: #dc3545; color: #fff; }
.hot-list .hot-item:nth-child(2) .rank { background: #fd7e14; color: #fff; }
.hot-list .hot-item:nth-child(3) .rank { background: #ffc107; color: #fff; }
.hot-list .hot-title {
    color: #333;
    font-size: .9rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hot-list .hot-title:hover { color: #0d6efd; }

/* 分页 */
.pagination .page-link { color: #0d6efd; }
.pagination .page-item.active .page-link { background: #0d6efd; border-color: #0d6efd; }

/* 响应式 */
@media (max-width: 768px) {
    .article-card .cover { height: 160px; }
    .article-detail .content { font-size: 1rem; }
}

/* 广告位 */
.ad-block {
    position: relative;
    margin: 1rem 0;
    text-align: center;
    overflow: hidden;
    border-radius: .75rem;
}
.ad-block .ad-image {
    width: 100%;
    height: auto;
    display: block;
}
.ad-label {
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(0,0,0,.5);
    color: #fff;
    font-size: .7rem;
    padding: 2px 8px;
    border-bottom-right-radius: .5rem;
    z-index: 2;
}
.ad-placeholder {
    border: 2px dashed #dee2e6;
    border-radius: .75rem;
    padding: 1.5rem;
    text-align: center;
    color: #adb5bd;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    font-size: .85rem;
}
.ad-placeholder i { font-size: 1.6rem; }

/* 横幅广告轮播 */
.banner-carousel .carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255,255,255,.6);
    border: none;
    margin: 0 4px;
}
.banner-carousel .carousel-indicators button.active {
    background-color: #ffc107;
    width: 28px;
    border-radius: 5px;
}
.banner-carousel .carousel-control-prev,
.banner-carousel .carousel-control-next {
    width: 8%;
    opacity: 0;
    transition: opacity .3s;
}
.banner-carousel:hover .carousel-control-prev,
.banner-carousel:hover .carousel-control-next {
    opacity: 1;
}
