/* ===== 中学生学习报 门户全站共享样式 ===== */
@font-face {
    font-family: "Alimama FangYuan Ti";
    src: url("/static/AlimamaFangYuanTiVF-Thin/AlimamaFangYuanTiVF-Thin.woff2") format("woff2");
}

:root {
    --xxb-primary: #b81c22;      /* 报纸红 */
    --xxb-primary-dark: #8f1519;
    --xxb-text: #333;
    --xxb-text-light: #8a8a8a;
    --xxb-border: #e8e8e8;
    --xxb-bg-soft: #fafafa;
}

* {
    font-family: "Alimama FangYuan Ti", "Microsoft YaHei", "Microsoft JhengHei", sans-serif !important;
    box-sizing: border-box;
}

html {
    margin: 0;
    height: 100%;
}

body {
    width: 100%;
    height: 100%;
    color: var(--xxb-text);
    background-color: #fff;
}

a, a:link, a:hover, a:active, a:visited {
    text-decoration: none;
    cursor: pointer;
    color: var(--xxb-text);
}

li {
    list-style-type: none;
}

/* 内容区域 */
.content {
    min-height: calc(100% - 100px);
    padding-bottom: 30px;
}

.xxb_content {
    padding: 0 15px;
}

/* ===== 导航栏 ===== */
.navbar-light {
    background-color: #fff !important;
    border: none !important;
    box-shadow: 0 1px 12px rgba(0, 0, 0, .08);
    margin-bottom: 0;
}

.navbar-brand img {
    height: 46px;
}

.navbar-light .navbar-nav > li > a {
    font-size: 16px;
    color: var(--xxb-text);
    padding: 15px 18px;
    transition: color .2s ease;
}

.navbar-light .navbar-nav > li > a:hover,
.navbar-light .navbar-nav > li > a:focus {
    color: var(--xxb-primary);
    background-color: transparent;
}

.navbar-light .navbar-nav > .open > a,
.navbar-light .navbar-nav > .open > a:hover,
.navbar-light .navbar-nav > .open > a:focus {
    color: var(--xxb-primary);
    background-color: transparent;
}

.navbar-light .dropdown-menu {
    border: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
    border-radius: 4px;
    padding: 6px 0;
    min-width: 130px;
}

.navbar-light .dropdown-menu > li > a {
    padding: 8px 20px;
    font-size: 14px;
    transition: all .15s ease;
}

.navbar-light .dropdown-menu > li > a:hover {
    color: var(--xxb-primary);
    background-color: var(--xxb-bg-soft);
}

.navbar-header .navbar-toggle {
    border-color: var(--xxb-border);
}

.navbar-header .navbar-toggle .icon-bar {
    background-color: var(--xxb-text);
}

/* ===== 文章详情标题 ===== */
.page-header > h2 {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.4;
}

.page-header > p {
    color: var(--xxb-text-light);
    font-size: 13px;
    margin-bottom: 10px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--xxb-border);
}

/* ===== 面包屑 ===== */
.breadcrumb {
    background: transparent;
    padding: 15px 0 0;
    margin-bottom: 0;
    font-size: 13px;
}

.breadcrumb > li + li:before {
    color: #ccc;
    content: "/ ";
    padding: 0 5px;
}

.breadcrumb > .active > a {
    color: var(--xxb-primary);
}

/* ===== 栏目标题 ===== */
.page-header {
    margin-top: 0;
    margin-bottom: 35px;
    border-bottom: none;
    text-align: center;
    position: relative;
}

.page-header > h3,
.page-header > h1 {
    display: inline-block;
    position: relative;
    font-size: 26px;
    font-weight: 600;
    color: var(--xxb-text);
    margin: 0;
    padding: 0 18px;
    background-color: transparent;
    width: auto;
}

.page-header > h3::before,
.page-header > h3::after,
.page-header > h1::before,
.page-header > h1::after {
    content: "";
    display: inline-block;
    width: 46px;
    height: 2px;
    background: var(--xxb-primary);
    position: absolute;
    top: 50%;
}

.page-header > h3::before,
.page-header > h1::before {
    left: -56px;
}

.page-header > h3::after,
.page-header > h1::after {
    right: -56px;
}

.page-header > h1 {
    font-size: 28px;
    margin-bottom: -14px;
    background-color: #fff;
}

/* ===== 文字截断 ===== */
.text_trunc {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: calc(100% - 20px);
}

/* ===== 新闻列表 ===== */
.xxb_news-list,
.xxb_news-list ul {
    padding: 0;
}

.xxb_news-list > li {
    line-height: 28px;
    font-size: 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px dashed var(--xxb-border);
    transition: background-color .15s ease;
    padding: 4px 8px;
}

.xxb_news-list > li:hover {
    background-color: var(--xxb-bg-soft);
}

.xxb_news-list > li:before {
    content: "●";
    color: var(--xxb-primary);
    font-size: 10px;
    margin-right: 8px;
    flex-shrink: 0;
}

.xxb_news-list > li > a {
    display: inline-block;
    flex: 1;
    min-width: 0;
    transition: color .15s ease;
}

.xxb_news-list > li > a:hover {
    color: var(--xxb-primary);
}

.xxb_news-list > li > span {
    float: right;
    color: var(--xxb-text-light);
    white-space: nowrap;
    font-size: 13px;
    margin-left: 12px;
}

/* ===== 缩略图卡片 ===== */
.thumbnail {
    border: none;
    border-radius: 8px;
    overflow: hidden;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
    transition: transform .25s ease, box-shadow .25s ease;
    background: #fff;
}

.thumbnail:hover,
.thumbnail:focus {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
}

.thumbnail img {
    width: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.thumbnail:hover img {
    transform: scale(1.03);
}

.thumbnail .caption {
    padding: 12px 10px;
}

.thumbnail .caption p {
    margin-bottom: 0;
}

/* ===== 首页功能图标 ===== */
.home-icon-link {
    display: block;
    text-align: center;
    padding: 18px 10px;
    border-radius: 10px;
    transition: background-color .2s ease, transform .2s ease;
}

.home-icon-link:hover {
    background-color: var(--xxb-bg-soft);
    transform: translateY(-3px);
}

.home-icon-link p {
    font-size: 16px;
    margin: 8px 0 0;
    color: var(--xxb-text);
    transition: color .2s ease;
}

.home-icon-link:hover p {
    color: var(--xxb-primary);
}

.xxb_icon {
    background: url(/static/portal/img/icon.png);
    width: 95px;
    height: 95px;
    display: block;
    margin: 0 auto 5px;
    transition: transform .2s ease;
}

.home-icon-link:hover .xxb_icon {
    transform: scale(1.06);
}

.xxb_tu1 { background-position: -8px -44px; }
.xxb_tu1:hover { background-position: -8px -148px; }
.xxb_tu2 { background-position: -8px -44px; }
.xxb_tu2:hover { background-position: -8px -148px; }
.xxb_tu3 { background-position: -232px -44px; }
.xxb_tu3:hover { background-position: -232px -148px; }
.xxb_tu4 { background-position: -340px -44px; }
.xxb_tu4:hover { background-position: -340px -148px; }

/* ===== 首页横幅 ===== */
.home-banner {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
    margin-bottom: 10px;
}

.home-banner img {
    width: 100%;
    display: block;
}

/* ===== 分页 ===== */
.pagination > li > a {
    color: var(--xxb-text);
    border-radius: 4px !important;
    margin: 0 3px;
    border: 1px solid var(--xxb-border);
    transition: all .15s ease;
}

.pagination > li > a:hover {
    color: var(--xxb-primary);
    border-color: var(--xxb-primary);
    background-color: #fff;
}

.pagination > .active > a,
.pagination > .active > a:hover,
.pagination > .active > a:focus {
    background-color: var(--xxb-primary);
    border-color: var(--xxb-primary);
    color: #fff;
}

/* ===== 页脚 ===== */
.xxb_footer {
    background-color: #3c3c3c;
    margin-top: 60px;
    margin-bottom: 0;
    border: 0;
    border-radius: 0;
    font-size: 13px;
    color: #b5b5b5;
    line-height: 26px;
}

.xxb_footer a, .xxb_footer a:link, .xxb_footer a:hover, .xxb_footer a:active, .xxb_footer a:visited {
    color: #d6d6d6;
    text-decoration: none;
    cursor: pointer;
    transition: color .15s ease;
}

.xxb_footer a:hover {
    color: #fff;
}

.xxb_footer .xxb_xian1 {
    width: 100%;
    height: 1px;
    background: #262626;
    margin-top: 10px;
}

.xxb_footer .xxb_xian2 {
    width: 100%;
    height: 1px;
    background: #565656;
    margin-bottom: 10px;
}
