/* ============================================================
   源集 gaoshare 站点自定义样式（首页升级 / 色块化 / 响应式）
   依赖：Bootstrap 3 + 原 common.css
   ============================================================ */

/* ---------- 通用容器间距 ---------- */
#content-container { padding-top: 8px; }
.home-section { margin-bottom: 14px; }

/* ---------- 板块标题（色块化） ---------- */
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px 8px;
    border-bottom: 2px solid #eef1f5;
    margin-bottom: 12px;
}
.section-head .s-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 600;
    color: #2b2f36;
    margin: 0;
    flex-shrink: 0;
}
.section-head .s-title .s-bar {
    width: 5px;
    height: 22px;
    border-radius: 3px;
    display: inline-block;
}
.section-head .s-more {
    font-size: 14px;
    color: #8a919f;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 4px 12px;
    text-align: right;
}
.section-head .s-more a { color: #8a919f; white-space: nowrap; }
.section-head .s-more a:hover { color: #2f6fed; text-decoration: none; }

/* 最近更新头部：模块入口较多，窄屏允许换行 */
@media (max-width: 767px) {
    .index-update .section-head { flex-wrap: wrap; }
    .index-update .section-head .s-more { margin-top: 6px; justify-content: flex-start; }
}

/* 色块主题色（按学段） */
.c-green .s-bar, .bg-green { background: #34a853; }
.c-orange .s-bar, .bg-orange { background: #f08a24; }
.c-blue .s-bar, .bg-blue { background: #2f6fed; }
.c-purple .s-bar, .bg-purple { background: #7c5cbf; }
.c-red .s-bar, .bg-red { background: #e5484d; }
.c-teal .s-bar, .bg-teal { background: #0e9f9a; }

/* ---------- Banner 轮播 ---------- */
.home-banner { margin-bottom: 14px; border-radius: 12px; overflow: hidden; }
.home-banner .carousel-focus { position: relative; }
.home-banner .carousel-img {
    height: 240px;
    background-size: cover;
    background-position: center;
    background-color: #eef1f5;
}
.home-banner .carousel-caption {
    background: linear-gradient(to top, rgba(0,0,0,.62), rgba(0,0,0,0));
    left: 0; right: 0; bottom: 0;
    padding: 34px 24px 16px;
    text-align: left;
    border-radius: 0;
}
.home-banner .carousel-caption h3 {
    font-size: 18px; color: #fff; font-weight: 600; margin: 0;
    text-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.home-banner .carousel-indicators li {
    width: 22px; height: 4px; border-radius: 2px; border: 0;
    background: rgba(255,255,255,.55); margin: 0 3px;
}
.home-banner .carousel-indicators li.active { background: #fff; }
.home-banner .carousel-control {
    width: 42px; font-size: 22px; background-image: none !important;
    opacity: 0; transition: opacity .2s;
}
.home-banner:hover .carousel-control { opacity: .9; }

/* ---------- 数据条（总份数 / 学段 / 今日新增） ---------- */
.home-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 18px;
    background: #fff;
    border-radius: 12px;
    padding: 12px 18px;
    margin-bottom: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.home-stats .hs-item {
    display: flex; align-items: baseline; gap: 6px;
    white-space: nowrap;
}
.home-stats .hs-item strong {
    font-size: 22px; font-weight: 700; color: #2f6fed;
    font-variant-numeric: tabular-nums;
}
.home-stats .hs-item span { font-size: 14px; color: #6b7480; }
.home-stats .hs-line {
    width: 1px; height: 20px; background: #eef1f5;
    display: inline-block;
}
.home-stats .hs-tip {
    margin-left: auto; font-size: 13px; color: #9aa2ad;
}

/* ---------- 学段入口色块 ---------- */
.stage-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -6px 18px;
}
.stage-grid .stage-item {
    flex: 1 1 33.3333%;
    max-width: 33.3333%;
    padding: 6px;
    box-sizing: border-box;
}
.stage-grid .stage-card {
    display: block;
    height: 100%;
    border-radius: 12px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
    transition: transform .18s, box-shadow .18s;
}
.stage-grid .stage-card:hover {
    color: #fff; text-decoration: none;
    transform: translateY(-4px);
    box-shadow: 0 10px 22px rgba(0,0,0,.16);
}
.stage-grid .stage-card .s-main {
    display: block;
    padding: 16px 12px 10px;
    color: #fff;
}
.stage-grid .stage-card .s-main:hover { color: #fff; text-decoration: none; }
.stage-grid .stage-card .s-icon {
    width: 34px; height: 34px; line-height: 34px;
    border-radius: 10px; margin: 0 auto 8px;
    background: rgba(255,255,255,.22);
    font-size: 17px;
}
.stage-grid .stage-card .s-name {
    font-size: 17px; font-weight: 600; letter-spacing: 1px;
}
.stage-grid .stage-card .s-desc {
    font-size: 13px; opacity: .92; margin-top: 2px;
}
.stage-grid .stage-card .s-count {
    display: inline-block; margin-top: 6px; padding: 2px 11px;
    font-size: 13px; border-radius: 20px;
    background: rgba(255,255,255,.22);
}
/* 学段卡内嵌快链（试卷真题 / 升学真题 / 全部资料） */
.stage-grid .stage-card .s-links {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 6px; padding: 0 10px 12px;
}
.stage-grid .stage-card .s-links a {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: 14px;
    font-size: 13px; color: #fff;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.28);
    transition: background .16s;
}
.stage-grid .stage-card .s-links a:hover {
    background: rgba(255,255,255,.34); color: #fff; text-decoration: none;
}
.stage-grid .stage-card .s-links a em {
    font-style: normal; font-size: 12px; opacity: .8;
}
.bg-green { background: linear-gradient(135deg, #4caf50, #2e8b57); }
.bg-orange { background: linear-gradient(135deg, #ffb74d, #ef6c00); }
.bg-blue { background: linear-gradient(135deg, #64a5ff, #1e5fdb); }
.bg-purple { background: linear-gradient(135deg, #a98bff, #6a4bbf); }
.bg-red { background: linear-gradient(135deg, #ff7a70, #d93030); }
.bg-teal { background: linear-gradient(135deg, #2ec9c4, #0a8c86); }

/* ---------- 试卷资源 Tab ---------- */
.exam-tabs { background: #fff; border-radius: 12px; padding: 14px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.exam-tabs .exam-tab-nav {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-bottom: 12px;
}
.exam-tabs .exam-tab-nav a {
    display: inline-block; padding: 8px 20px;
    border-radius: 20px; font-size: 15px; color: #555c66;
    background: #f2f4f7; transition: all .18s;
}
.exam-tabs .exam-tab-nav a:hover { text-decoration: none; color: #2f6fed; }
.exam-tabs .exam-tab-nav a.active { color: #fff; background: #2f6fed; }
.exam-tabs .exam-tab-nav a em {
    font-style: normal; font-size: 12px; margin-left: 5px;
    opacity: .75;
}
.exam-tab-panel { display: none; }
.exam-tab-panel.active { display: block; }

/* ---------- 升学真题专区（小升初 / 中考 / 高考 三栏） ---------- */
.exam-zone .ez-grid { display: flex; flex-wrap: wrap; margin: 0 -6px; }
.exam-zone .ez-col { flex: 1 1 33.3333%; max-width: 33.3333%; padding: 6px; box-sizing: border-box; }
.exam-zone .ez-box {
    background: #fff; border-radius: 12px; overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.06); height: 100%;
}
.exam-zone .ez-head {
    display: flex; align-items: center; gap: 8px;
    padding: 11px 14px; color: #fff;
}
.exam-zone .ez-head .ez-name { font-size: 16px; font-weight: 600; }
.exam-zone .ez-head .ez-count {
    font-size: 12px; padding: 1px 9px; border-radius: 12px;
    background: rgba(255,255,255,.22);
}
.exam-zone .ez-head .ez-more {
    margin-left: auto; font-size: 13px; color: #fff; opacity: .95;
}
.exam-zone .ez-head .ez-more:hover { color: #fff; text-decoration: none; }
.exam-zone .ez-subs {
    padding: 9px 13px; display: flex; flex-wrap: wrap; gap: 6px;
    border-bottom: 1px solid #f2f4f7;
}
.exam-zone .ez-subs a {
    font-size: 13px; color: #666d77; padding: 3px 10px;
    background: #f4f6f8; border-radius: 14px;
}
.exam-zone .ez-subs a em {
    font-style: normal; font-size: 12px; color: #a0a7b1; margin-left: 3px;
}
.exam-zone .ez-subs a:hover { color: #2f6fed; text-decoration: none; }
.exam-zone .ez-list { padding: 6px 13px 10px; margin: 0; }
.exam-zone .ez-list li {
    list-style: none; padding: 7px 0; font-size: 14px;
    border-bottom: 1px dashed #f0f2f5;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.exam-zone .ez-list li:last-child { border-bottom: 0; }
.exam-zone .ez-list a { color: #444a53; }
.exam-zone .ez-list a:hover { color: #2f6fed; text-decoration: none; }

/* ---------- 通用资源卡片 ---------- */
.res-card-grid { display: flex; flex-wrap: wrap; margin: 0 -6px; }
.res-card {
    flex: 1 1 25%;
    max-width: 25%;
    padding: 6px; box-sizing: border-box;
}
.res-card .rc-inner {
    background: #fff; border: 1px solid #f0f2f5;
    border-radius: 10px; overflow: hidden;
    transition: transform .16s, box-shadow .16s;
    height: 100%;
}
.res-card .rc-inner:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0,0,0,.09);
}
.res-card .rc-img {
    position: relative;
    padding-top: 60%;
    background: #f2f4f7;
    display: block;
}
.res-card .rc-img img {
    position: absolute; left: 0; top: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.res-card .rc-badge {
    position: absolute; left: 0; top: 0; z-index: 2;
    padding: 3px 9px; font-size: 13px; color: #fff;
    border-radius: 0 0 8px 0;
}
.res-card .rc-title {
    padding: 9px 12px 4px;
    font-size: 15px; color: #2b2f36; line-height: 1.45;
    height: 56px; overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.res-card .rc-title a { color: #2b2f36; }
.res-card .rc-title a:hover { color: #2f6fed; text-decoration: none; }
.res-card .rc-meta {
    padding: 0 12px 12px; font-size: 13px; color: #a0a7b1;
    display: flex; justify-content: space-between;
}

/* ---------- 教辅资源模块 ---------- */
.jiaofu-grid { display: flex; flex-wrap: wrap; margin: 0 -6px; }
.jiaofu-col { flex: 1 1 33.333%; max-width: 33.333%; padding: 6px; box-sizing: border-box; }
.jiaofu-box {
    background: #fff; border-radius: 12px; overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.jiaofu-box .jf-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; color: #fff;
}
.jiaofu-box .jf-head .jf-name { font-size: 17px; font-weight: 600; }
.jiaofu-box .jf-head .jf-name em {
    font-style: normal; font-size: 12px; margin-left: 6px;
    padding: 1px 8px; border-radius: 12px;
    background: rgba(255,255,255,.22);
}
.jiaofu-box .jf-head a { color: #fff; font-size: 13px; opacity: .95; }
.jiaofu-box .jf-head a:hover { color: #fff; text-decoration: none; }
.jiaofu-box .jf-subs {
    padding: 9px 13px; display: flex; flex-wrap: wrap; gap: 6px;
    border-bottom: 1px solid #f2f4f7;
}
.jiaofu-box .jf-subs a {
    font-size: 13px; color: #666d77; padding: 4px 11px;
    background: #f4f6f8; border-radius: 14px;
}
.jiaofu-box .jf-subs a:hover { color: #2f6fed; text-decoration: none; }
.jiaofu-box .jf-list { padding: 6px 13px 10px; }
.jiaofu-box .jf-list li {
    list-style: none; padding: 7px 0; font-size: 14px;
    border-bottom: 1px dashed #f0f2f5;
}
.jiaofu-box .jf-list li:last-child { border-bottom: 0; }
.jiaofu-box .jf-list a { color: #444a53; }
.jiaofu-box .jf-list a:hover { color: #2f6fed; text-decoration: none; }

/* ---------- 推荐资讯 / 推荐下载 侧栏 ---------- */
.hot-article .media-number { position: relative; padding: 6px 0; }
.hot-article .media-number .num.tag {
    display: inline-block; min-width: 20px; height: 20px; line-height: 20px;
    text-align: center; font-size: 12px; font-style: normal;
    background: #eef1f5; color: #8a919f; border-radius: 4px;
}
.hot-article .media-number:first-child .num.tag { background: #e5484d; color: #fff; }
.hot-article .media-number:nth-child(2) .num.tag { background: #f08a24; color: #fff; }
.hot-article .media-number:nth-child(3) .num.tag { background: #2f6fed; color: #fff; }

/* ---------- 最近更新（头部与教辅资源统一 + 放大字体） ---------- */
.index-update .update-panel {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    padding: 0 20px;
    overflow: hidden;
}
.index-update .article-list .article-item { padding: 18px 0; }
.index-update .article-list .article-title { font-size: 21px; line-height: 1.5; }
.index-update .article-list .article-title a { color: #2b2f36; }
.index-update .article-list .article-title a:hover { color: #2f6fed; }
.index-update .article-list .article-intro {
    font-size: 15px; line-height: 24px; height: 48px; color: #6b7480;
}
.index-update .article-list .media .media-left a { width: 200px; }
.index-update .article-list .media-body .article-tag { font-size: 14px; color: #9aa2ad; }
.index-update .article-list .media-body .article-tag span a { color: #9aa2ad; }
.index-update .article-list .media-body .article-tag span a:hover { color: #2f6fed; }

/* 全站最近更新：模块筛选 Tab（默认「全部」= 全站） */
.index-update .update-tabs {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-bottom: 12px;
}
.index-update .update-tabs .tab-item {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 16px; border-radius: 18px;
    font-size: 14px; color: #555c66; background: #f2f4f7;
    transition: all .18s;
}
.index-update .update-tabs .tab-item:hover { color: #7c5cbf; text-decoration: none; }
.index-update .update-tabs .tab-item.active { color: #fff; background: #7c5cbf; }
.index-update .update-tabs .tab-item em {
    font-style: normal; font-size: 12px; color: #9aa2ad;
}
.index-update .update-tabs .tab-item.active em { color: rgba(255,255,255,.85); }

/* Tab 切换走区域内 AJAX：加载中给轻提示，避免误以为点了没反应 */
.index-update.is-loading .update-panel { opacity: .55; transition: opacity .15s; }
.index-update.is-loading .update-tabs { pointer-events: none; }
.index-update.is-loading .update-tabs .tab-item.active::after {
    content: ''; width: 12px; height: 12px; margin-left: 4px;
    border: 2px solid rgba(255,255,255,.45); border-top-color: #fff;
    border-radius: 50%; animation: upd-spin .7s linear infinite;
}
@keyframes upd-spin { to { transform: rotate(360deg); } }

/* 最近更新分页栏（区域内 AJAX 切换） */
.index-update-pager {
    display: flex; justify-content: center; align-items: center;
    gap: 6px; padding: 16px 0 18px;
}
.index-update-pager a {
    display: inline-block; min-width: 34px; height: 34px; line-height: 34px;
    text-align: center; padding: 0 8px; border-radius: 6px;
    font-size: 14px; color: #555c66; background: #f2f4f7;
    cursor: pointer; user-select: none;
}
.index-update-pager a:hover { color: #2f6fed; text-decoration: none; }
.index-update-pager a.pg-num.active { color: #fff; background: #2f6fed; }
.index-update-pager a.pg-btn { padding: 0 14px; }
.index-update-pager span.pg-btn.disabled,
.index-update-pager span.pg-dots {
    display: inline-block; min-width: 34px; height: 34px; line-height: 34px;
    text-align: center; color: #c0c6cf; font-size: 14px;
}

/* ---------- 响应式（移动端） ---------- */
@media (max-width: 991px) {
    .home-banner .carousel-img { height: 180px; }
    .home-stats { padding: 10px 14px; gap: 8px 14px; }
    .home-stats .hs-item strong { font-size: 19px; }
    .stage-grid .stage-item { flex: 1 1 33.3333%; max-width: 33.3333%; }
    .stage-grid .stage-card .s-main { padding: 12px 8px 6px; }
    .stage-grid .stage-card .s-icon { width: 30px; height: 30px; line-height: 30px; font-size: 15px; }
    .stage-grid .stage-card .s-name { font-size: 15px; }
    .stage-grid .stage-card .s-desc { font-size: 12px; }
    .stage-grid .stage-card .s-links { gap: 4px; padding: 0 6px 10px; }
    .stage-grid .stage-card .s-links a { font-size: 12px; padding: 3px 8px; }
    .exam-zone .ez-col { flex: 1 1 100%; max-width: 100%; }
    .res-card { flex: 1 1 50%; max-width: 50%; }
    .jiaofu-col { flex: 1 1 100%; max-width: 100%; }
}
@media (max-width: 480px) {
    .home-stats .hs-tip { display: none; }
    .stage-grid .stage-item { flex: 1 1 100%; max-width: 100%; }
    .exam-tabs .exam-tab-nav a { padding: 6px 14px; font-size: 13px; }
    .section-head .s-title { font-size: 16px; }
    .index-update .update-tabs .tab-item { padding: 5px 12px; font-size: 13px; }
}
