/* ===========================================================
   河北峰峰第一中学 门户前台样式（响应式）
   主题：深蓝 + 暖金点缀
=========================================================== */
:root {
    --primary: #0b5cad;
    --primary-dark: #084a8c;
    --accent: #c8312b;
    --gold: #e8b04b;
    --text: #2b2f36;
    --muted: #6b7280;
    --line: #e8ebf0;
    --bg: #f5f7fa;
    --container: 1200px;
    --radius: 10px;
    --shadow: 0 6px 22px rgba(11, 91, 173, .10);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    font-size: 15px;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 16px; }

/* ---------- 顶部条 ---------- */
.hd-topbar {
    background: var(--primary-dark);
    color: #cfe0f5;
    font-size: 13px;
}
.hd-topbar .container { display: flex; justify-content: space-between; padding-top: 6px; padding-bottom: 6px; }

/* ---------- 头部 ---------- */
.site-header { background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.05); position: sticky; top: 0; z-index: 50; }
.hd-main { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo .badge {
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 18px; box-shadow: var(--shadow);
}
.logo .name { font-size: 20px; font-weight: 800; color: var(--primary-dark); line-height: 1.2; }
.logo .slogan { font-size: 12px; color: var(--muted); }

/* ---------- 导航 ---------- */
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
    padding: 10px 16px; color: var(--text); font-size: 16px; border-radius: 6px; position: relative;
    transition: .2s;
}
.nav a:hover, .nav a.active { color: var(--primary); background: rgba(11,91,173,.07); }
.nav a.active::after {
    content: ""; position: absolute; left: 16px; right: 16px; bottom: 4px; height: 3px;
    background: var(--accent); border-radius: 3px;
}
.nav-toggle { display: none; background: none; border: 0; font-size: 26px; color: var(--primary); cursor: pointer; }

/* ---------- 轮播 ---------- */
.banner-full { width: 100%; }
.banner-boxed { max-width: var(--container); margin: 18px auto; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.banner-full .layui-carousel { width: 100% !important; }
.banner-full .layui-carousel > * { width: 100% !important; }
.banner-boxed .layui-carousel { width: 100% !important; }
.banner-slide {
    width: 100%; height: 100%; position: relative; color: #fff;
    display: flex; align-items: center; justify-content: center; text-align: center;
}
.banner-slide .cap {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 20px 22px;
    background: linear-gradient(to top, rgba(0,0,0,.55), transparent);
}
.banner-slide .cap h2 { margin: 0; font-size: 30px; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.banner-slide .cap p { margin: 6px 0 0; opacity: .92; }

/* ---------- 区块 ---------- */
.section { padding: 34px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.section-head h2 {
    font-size: 22px; margin: 0; color: var(--primary-dark); position: relative; padding-left: 14px;
}
.section-head h2::before {
    content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 5px;
    background: var(--accent); border-radius: 4px;
}
.section-head .more { font-size: 13px; color: var(--muted); }

/* 首页两栏布局 */
.home-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 22px; }

/* 卡片 */
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-pad { padding: 18px; }

/* 简介 */
.intro p { margin: 0 0 12px; color: #444; }
.intro .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.intro .stat { text-align: center; background: var(--bg); border-radius: 8px; padding: 14px 8px; }
.intro .stat b { display: block; font-size: 22px; color: var(--primary); }
.intro .stat span { font-size: 12px; color: var(--muted); }

/* 文章列表 */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { display: flex; align-items: center; gap: 10px; padding: 11px 4px; border-bottom: 1px dashed var(--line); }
.news-list li:last-child { border-bottom: 0; }
.news-list .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.news-list .t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-list .t a { color: var(--text); }
.news-list .t a:hover { color: var(--primary); }
.news-list .date { color: var(--muted); font-size: 13px; flex: none; }
.tag-top { background: var(--accent); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 4px; margin-right: 4px; }
.tag-rec { background: var(--gold); color: #5a3d00; font-size: 11px; padding: 1px 6px; border-radius: 4px; margin-right: 4px; }

/* 图片新闻 */
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.photo-card { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #fff; transition: .2s; }
.photo-card:hover { transform: translateY(-4px); }
.photo-card img { height: 150px; width: 100%; object-fit: cover; }
.photo-card .cap { padding: 10px; font-size: 14px; }

/* 友情链接 */
.links { display: flex; flex-wrap: wrap; gap: 10px; }
.links a { padding: 7px 14px; background: #fff; border: 1px solid var(--line); border-radius: 20px; font-size: 13px; color: var(--muted); }
.links a:hover { border-color: var(--primary); color: var(--primary); }

/* 栏目页 */
.crumb { font-size: 13px; color: var(--muted); margin: 16px 0; }
.crumb a { color: var(--muted); }
.list-main { display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: start; }
.article-item { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.article-item img { width: 160px; height: 110px; object-fit: cover; border-radius: 8px; flex: none; }
.article-item h3 { margin: 0 0 6px; font-size: 17px; }
.article-item .meta { font-size: 12px; color: var(--muted); }
.article-item .sum { color: #555; font-size: 14px; margin: 6px 0 0; }
.pager { text-align: center; margin: 24px 0; }
.pager a { display: inline-block; padding: 7px 14px; margin: 0 3px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); }
.pager a.active, .pager a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 文章详情 */
.article-detail { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; }
.article-detail h1 { font-size: 26px; margin: 0 0 12px; color: var(--primary-dark); }
.article-detail .meta { color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 18px; }
.article-detail .content { font-size: 16px; line-height: 1.9; color: #333; }
.article-detail .content img { max-width: 100%; border-radius: 8px; margin: 12px 0; }
.article-detail .content h3 { color: var(--primary-dark); margin-top: 24px; }
.article-detail .geo-tip {
    margin-top: 26px; padding: 14px 16px; background: #f0f7ff; border-left: 4px solid var(--primary);
    border-radius: 6px; font-size: 13px; color: #4a6a8a;
}
.article-detail .geo-tip b { color: var(--primary-dark); }

.side-box { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; }
.side-box .hd { padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 700; color: var(--primary-dark); }
.side-box .bd { padding: 12px 16px; }
.side-box .bd a { display: block; padding: 7px 0; color: var(--text); border-bottom: 1px dashed var(--line); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-box .bd a:last-child { border-bottom: 0; }

/* 搜索 */
.search-bar { display: flex; gap: 8px; max-width: 520px; margin: 0 auto 24px; }
.search-bar input { flex: 1; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; }
.search-bar button { padding: 0 22px; border: 0; background: var(--primary); color: #fff; border-radius: 8px; cursor: pointer; }

/* ---------- 页脚 ---------- */
.site-footer { background: #0c2238; color: #b9c7d6; margin-top: 30px; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 30px; padding: 34px 16px; }
.site-footer .col { flex: 1; min-width: 200px; }
.site-footer h4 { color: #fff; margin: 0 0 12px; font-size: 16px; }
.site-footer p { margin: 6px 0; font-size: 13px; }
.site-footer a { color: #b9c7d6; }
.site-footer .copy { text-align: center; padding: 14px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; color: #8aa0b8; }

/* ---------- 响应式 ---------- */
@media (max-width: 992px) {
    .home-grid { grid-template-columns: 1fr; }
    .list-main { grid-template-columns: 1fr; }
    .photo-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column;
           background: #fff; box-shadow: 0 8px 18px rgba(0,0,0,.12); padding: 6px 0; }
    .nav.show { display: flex; }
    .nav a { padding: 12px 20px; border-radius: 0; }
    .nav a.active::after { display: none; }
    .nav-toggle { display: block; }
    .logo .name { font-size: 17px; }
    .banner-slide .cap h2 { font-size: 20px; }
    .article-item { flex-direction: column; }
    .article-item img { width: 100%; height: 180px; }
    .intro .stats { grid-template-columns: repeat(3, 1fr); }
    .photo-grid { grid-template-columns: 1fr 1fr; }
}
