/* ============================================
   仿脚本之家首页V3样式 - 严格对照jb51.net截图
   路径: 子主题/assets/css/home-jb51-v3.css
   ============================================ */

.jb51v3-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 10px 30px;
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    color: #333;
    font-size: 14px;
}

.jb51v3-more-sm {
    font-size: 12px;
    color: #999;
    text-decoration: none;
}
.jb51v3-more-sm:hover { color: #2b7bd6; }

/* ========== 1. 顶部三栏区 ========== */
.jb51v3-top-row {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}

/* 左：轮播+推荐工具 */
.jb51v3-top-left {
    width: 300px;
    flex-shrink: 0;
}
.jb51v3-slider {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #e8e8e8;
    margin-bottom: 10px;
}
.jb51v3-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .4s;
    text-decoration: none;
}
.jb51v3-slide.active { opacity: 1; }
.jb51v3-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.jb51v3-slide-ph {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2b7bd6, #1a4a8a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    padding: 20px;
    text-align: center;
}
.jb51v3-slide-title {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 8px 12px;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.jb51v3-slide-dots {
    position: absolute;
    bottom: 6px;
    right: 10px;
    display: flex;
    gap: 5px;
    z-index: 2;
}
.jb51v3-slide-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.5);
    cursor: pointer;
}
.jb51v3-slide-dots span.active {
    background: #fff;
}
.jb51v3-rec-tools {
    background: #f7f7f7;
    border: 1px solid #eee;
    padding: 10px 12px;
}
.jb51v3-rec-title {
    font-size: 14px;
    margin: 0 0 8px;
    font-weight: 700;
}
.jb51v3-rec-hot {
    color: #c00;
    margin-right: 4px;
}
.jb51v3-rec-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.jb51v3-rec-list li {
    padding: 4px 0;
    border-bottom: 1px dotted #ddd;
    font-size: 13px;
}
.jb51v3-rec-list li:last-child { border-bottom: none; }
.jb51v3-rec-list a {
    color: #555;
    text-decoration: none;
}
.jb51v3-rec-list a:hover { color: #2b7bd6; }

/* 中：Tab列表 */
.jb51v3-top-mid {
    flex: 1;
    min-width: 0;
    border: 1px solid #eee;
    background: #fff;
}
.jb51v3-mid-tabs {
    display: flex;
    border-bottom: 2px solid #2b7bd6;
    padding: 0 10px;
}
.jb51v3-mid-tab {
    padding: 8px 16px;
    font-size: 15px;
    font-weight: 700;
    color: #666;
    cursor: pointer;
}
.jb51v3-mid-tab.active {
    color: #2b7bd6;
}
.jb51v3-mid-list {
    padding: 6px 12px;
}
.jb51v3-mid-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px dotted #eee;
    font-size: 13px;
}
.jb51v3-mid-item:last-child { border-bottom: none; }
.jb51v3-mid-cat {
    flex-shrink: 0;
    font-size: 12px;
    color: #888;
    background: #f0f0f0;
    padding: 1px 5px;
    border-radius: 2px;
}
.jb51v3-mid-title {
    flex: 1;
    color: #444;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.jb51v3-mid-title:hover { color: #2b7bd6; }
.jb51v3-mid-date {
    flex-shrink: 0;
    font-size: 12px;
    color: #bbb;
}

/* 右：资讯+公告 */
.jb51v3-top-right {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.jb51v3-news {
    border: 1px solid #eee;
    background: #fff;
    flex: 1;
}
.jb51v3-news-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 2px solid #2b7bd6;
}
.jb51v3-news-head h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}
.jb51v3-news-list {
    list-style: none;
    margin: 0;
    padding: 8px 12px;
}
.jb51v3-news-item {
    display: flex;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px dotted #eee;
    align-items: flex-start;
}
.jb51v3-news-item:last-child { border-bottom: none; }
.jb51v3-news-thumb {
    flex-shrink: 0;
    width: 60px;
    height: 42px;
    overflow: hidden;
}
.jb51v3-news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.jb51v3-news-title {
    flex: 1;
    font-size: 13px;
    color: #444;
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.jb51v3-news-title:hover { color: #2b7bd6; }
.jb51v3-notice {
    border: 1px solid #eee;
    background: #fff;
    padding: 8px 12px;
}
.jb51v3-notice h4 {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 700;
}
.jb51v3-notice-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.jb51v3-notice-list li {
    font-size: 12px;
    color: #888;
    padding: 3px 0;
}

/* ========== 2/3. 三列文字列表 ========== */
.jb51v3-text-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}
.jb51v3-text-col {
    background: #fff;
    border: 1px solid #eee;
    padding: 0 14px 10px;
}
.jb51v3-text-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0 8px;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 6px;
}
.jb51v3-text-head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}
.jb51v3-text-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.jb51v3-text-item {
    padding: 6px 0;
    border-bottom: 1px dotted #eee;
    font-size: 13px;
}
.jb51v3-text-item:last-child { border-bottom: none; }
.jb51v3-text-title {
    color: #555;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}
.jb51v3-text-title::before {
    content: '▪';
    color: #bbb;
    margin-right: 5px;
}
.jb51v3-text-item.first .jb51v3-text-title {
    color: #c00;
    font-weight: 600;
}
.jb51v3-text-title:hover { color: #2b7bd6; }

/* ========== 广告位 ========== */
.jb51v3-ad {
    height: 60px;
    background: #f0f0f0;
    border: 1px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 14px;
    margin-bottom: 14px;
}

/* ========== 4. 大分类图文模块 ========== */
.jb51v3-big-section {
    margin-bottom: 18px;
}
.jb51v3-big-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.jb51v3-big-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}
.jb51v3-big-subtabs {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}
.jb51v3-big-subtab {
    font-size: 13px;
    color: #666;
    padding: 3px 10px;
    background: #f0f0f0;
    border-radius: 3px;
    text-decoration: none;
}
.jb51v3-big-subtab:hover,
.jb51v3-big-subtab.active {
    background: #2b7bd6;
    color: #fff;
}
.jb51v3-big-body {
    display: flex;
    gap: 16px;
}
.jb51v3-big-main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    min-width: 0;
}
.jb51v3-big-col-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 10px;
    padding-left: 8px;
    border-left: 3px solid #2b7bd6;
}
.jb51v3-big-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}
.jb51v3-big-thumb {
    position: relative;
    display: block;
    width: 100%;
    padding-top: 70%;
    overflow: hidden;
    background: #eee;
    text-decoration: none;
}
.jb51v3-big-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.jb51v3-ph {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2b7bd6, #1a4a8a);
    color: #fff;
    font-size: 24px;
    font-weight: 700;
}
.jb51v3-big-thumb-title {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 4px 6px;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 11px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.jb51v3-big-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.jb51v3-big-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px dotted #eee;
    font-size: 13px;
}
.jb51v3-big-item:last-child { border-bottom: none; }
.jb51v3-big-item-title {
    flex: 1;
    color: #555;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 8px;
}
.jb51v3-big-item-title::before {
    content: '▪';
    color: #bbb;
    margin-right: 5px;
}
.jb51v3-big-item-title:hover { color: #2b7bd6; }
.jb51v3-big-item-date {
    flex-shrink: 0;
    font-size: 12px;
    color: #bbb;
}

/* 大分类右侧推荐 */
.jb51v3-big-side {
    width: 260px;
    flex-shrink: 0;
    background: #fafafa;
    border: 1px solid #eee;
    padding: 10px 12px;
}
.jb51v3-side-title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    padding-bottom: 6px;
    border-bottom: 1px solid #ddd;
}
.jb51v3-side-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.jb51v3-side-item {
    padding: 5px 0;
    border-bottom: 1px dotted #eee;
    font-size: 13px;
}
.jb51v3-side-item:last-child { border-bottom: none; }
.jb51v3-side-title-item,
.jb51v3-side-title {
    /* placeholder */
}
.jb51v3-side-item a {
    color: #555;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}
.jb51v3-side-item a:hover { color: #2b7bd6; }

/* ========== 5. 底部四列排行 ========== */
.jb51v3-bottom-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 12px;
}
.jb51v3-bottom-col {
    background: #fff;
    border: 1px solid #eee;
    padding: 0 12px 10px;
}
.jb51v3-bottom-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0 8px;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 6px;
}
.jb51v3-bottom-head h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}
.jb51v3-rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: rank;
}
.jb51v3-rank-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px dotted #eee;
    font-size: 13px;
}
.jb51v3-rank-item:last-child { border-bottom: none; }
.jb51v3-rank-num {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #999;
    background: #e8e8e8;
    border-radius: 2px;
}
.jb51v3-rank-num.top {
    background: #f40;
    color: #fff;
}
.jb51v3-rank-title {
    flex: 1;
    color: #555;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.jb51v3-rank-title:hover { color: #2b7bd6; }

/* ========== 响应式 ========== */
@media (max-width: 960px) {
    .jb51v3-top-row { flex-direction: column; }
    .jb51v3-top-left, .jb51v3-top-right { width: 100%; }
    .jb51v3-text-row { grid-template-columns: 1fr 1fr; }
    .jb51v3-big-body { flex-direction: column; }
    .jb51v3-big-side { width: 100%; }
    .jb51v3-bottom-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .jb51v3-text-row { grid-template-columns: 1fr; }
    .jb51v3-big-main { grid-template-columns: 1fr; }
    .jb51v3-bottom-row { grid-template-columns: 1fr; }
    .jb51v3-big-thumbs { grid-template-columns: repeat(2, 1fr); }
}
