/* ==========================================================================
   BRW 深蓝渐变响应式模板  ——  基于 Bootstrap 5 的补充样式
   配色：深蓝 + 紫色渐变 + 琥珀色强调，参考 beirongwang.com
   ========================================================================== */

:root {
    --brw-primary: #0d6efd;
    --brw-primary-dark: #0a58ca;
    --brw-accent: #ffb020;
    --brw-dark: #1e3c72;
    --brw-dark-2: #2a5298;
    --brw-footer-start: #1c1f3f;
    --brw-footer-end: #3d0b40;
    --brw-body: #f0f4f8;
    --brw-text: #212529;
    --brw-muted: #6c757d;
    --brw-line: #e2e8f0;
    --brw-radius: 12px;
    --brw-shadow: 0 2px 14px rgba(16, 24, 40, .06);
    --brw-shadow-lg: 0 10px 30px rgba(16, 24, 40, .12);
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
        "Noto Sans", "Liberation Sans", Arial, "Microsoft YaHei", sans-serif;
    background: var(--brw-body);
    color: var(--brw-text);
    font-size: 15px;
    line-height: 1.75;
}

a { color: var(--brw-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--brw-primary-dark); }
img { max-width: 100%; }

.brw-container { max-width: 1180px; }

/* ---------- 通用工具 ---------- */
.brw-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.brw-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.brw-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.brw-btn-hero {
    display: inline-block;
    background: #fff;
    color: var(--brw-dark);
    font-weight: 700;
    padding: .65rem 1.8rem;
    border-radius: 30px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .15);
    transition: transform .2s, box-shadow .2s;
}
.brw-btn-hero:hover {
    color: var(--brw-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}

/* ---------- 顶部导航（白色吸顶） ---------- */
.brw-header {
    background: #fff;
    box-shadow: 0 1px 8px rgba(0, 0, 0, .075);
    transition: box-shadow .25s ease;
}
.brw-header.scrolled { box-shadow: 0 4px 20px rgba(0, 0, 0, .12); }
.brw-header .navbar-brand {
    color: var(--brw-text);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: .5px;
}
.brw-header .nav-link {
    color: var(--brw-text);
    font-size: 15px;
    padding: .5rem .9rem !important;
    border-radius: 8px;
    font-weight: 500;
    transition: color .2s, background .2s;
}
.brw-header .nav-link:hover,
.brw-header .nav-link.active {
    color: var(--brw-primary);
    background: rgba(13, 110, 253, .06);
}
.brw-header .dropdown-menu {
    background: #fff;
    border: 1px solid var(--brw-line);
    border-radius: 10px;
    box-shadow: var(--brw-shadow-lg);
}
.brw-header .dropdown-item { color: var(--brw-text); font-size: 14px; }
.brw-header .dropdown-item:hover { background: rgba(13, 110, 253, .06); color: var(--brw-primary); }

.brw-search .form-control {
    background: var(--brw-body);
    border: 1px solid var(--brw-line);
    color: var(--brw-text);
    height: 38px;
    width: 170px;
    border-radius: 8px 0 0 8px;
}
.brw-search .form-control::placeholder { color: #adb5bd; }
.brw-search .form-control:focus {
    background: #fff;
    box-shadow: none;
    border-color: var(--brw-primary);
}
.brw-search .btn {
    border: 0;
    background: var(--brw-primary);
    color: #fff;
    height: 38px;
    border-radius: 0 8px 8px 0;
}

/* ---------- Hero 首屏 ---------- */
.brw-hero {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #3b6cb8 100%);
    color: #fff;
    padding: 70px 0 120px;
    position: relative;
    overflow: hidden;
}
.brw-hero::after {
    content: "";
    position: absolute;
    right: -100px;
    top: -100px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 176, 32, .18), transparent 70%);
}
.brw-hero h1 { font-size: 2.2rem; font-weight: 700; line-height: 1.35; }
.brw-hero .brw-hero-sub {
    color: var(--brw-accent);
    letter-spacing: 1.5px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
}
.brw-hero p.lead { color: rgba(255, 255, 255, .82); font-size: 1rem; }
.brw-hero-img img { border-radius: 16px; box-shadow: var(--brw-shadow-lg); }
.brw-hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    line-height: 0;
}
.brw-hero-wave svg { width: 100%; height: 60px; }
@media (max-width: 767.98px) {
    .brw-hero { padding: 40px 0 80px; text-align: center; }
    .brw-hero h1 { font-size: 1.5rem; }
}

/* ---------- 通用区块 ---------- */
.brw-section { padding: 50px 0; }
.brw-section-title { text-align: center; margin-bottom: 36px; }
.brw-section-title h2 {
    font-size: 1.6rem;
    font-weight: 700;
    display: inline-block;
    padding-bottom: 12px;
    position: relative;
}
.brw-section-title h2::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 52px;
    height: 3px;
    border-radius: 3px;
    background: var(--brw-accent);
}
.brw-section-title p { color: var(--brw-muted); margin: 6px 0 0; }
.brw-section-title.light h2 { color: #fff; }
.brw-section-title.light h2::after { background: var(--brw-accent); }
.brw-section-title.light p { color: rgba(255, 255, 255, .65); }

/* ---------- 关于我们 ---------- */
.brw-about {
    background: linear-gradient(135deg, #1b1f3b, #0a0d22);
    color: #fff;
}
.brw-about-card {
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 20px;
    padding: 28px 24px;
    height: 100%;
    transition: transform .25s, background .25s;
}
.brw-about-card:hover { transform: translateY(-3px); background: rgba(255, 255, 255, .07); }
.brw-about-card p { color: rgba(255, 255, 255, .78); font-size: 15px; line-height: 1.8; }
.brw-about-img { border-radius: 14px; width: 100%; }

/* ---------- 核心功能 ---------- */
.brw-features {
    background: linear-gradient(180deg, #b1afff 0%, #bbe9ff 100%);
}
.brw-feature-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
    transition: transform .25s, box-shadow .25s;
    height: 100%;
}
.brw-feature-card:hover { transform: translateY(-6px); box-shadow: 0 12px 32px rgba(0, 0, 0, .1); }
.brw-feature-icon {
    width: 64px;
    height: 64px;
    line-height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brw-dark), var(--brw-dark-2));
    color: #fff;
    font-size: 26px;
    margin: 0 auto 18px;
}
.brw-feature-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.brw-feature-card p { color: var(--brw-muted); font-size: 14px; margin: 0; line-height: 1.7; }

/* ---------- 新闻卡片区 ---------- */
.brw-news {
    background: #e8f9ff;
}

/* ---------- 卡片 / 列表 ---------- */
.brw-box {
    background: #fff;
    border: 1px solid var(--brw-line);
    border-radius: var(--brw-radius);
    box-shadow: var(--brw-shadow);
    margin-bottom: 22px;
    overflow: hidden;
}
.brw-box-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 18px;
    border-bottom: 1px solid var(--brw-line);
}
.brw-box-head h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    padding-left: 11px;
    border-left: 4px solid var(--brw-primary);
    line-height: 1.2;
}
.brw-box-head .more { font-size: 13px; color: var(--brw-muted); }
.brw-box-head .more:hover { color: var(--brw-primary); }
.brw-box-body { padding: 18px; }

/* 卡片式文章 */
.brw-card {
    background: #fff;
    border: 1px solid var(--brw-line);
    border-radius: var(--brw-radius);
    overflow: hidden;
    height: 100%;
    transition: transform .25s, box-shadow .25s;
}
.brw-card:hover { transform: translateY(-4px); box-shadow: var(--brw-shadow-lg); }
.brw-card-thumb { display: block; position: relative; padding-top: 58%; overflow: hidden; background: #e9edf3; }
.brw-card-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}
.brw-card:hover .brw-card-thumb img { transform: scale(1.06); }
.brw-card-body { padding: 14px 16px 16px; }
.brw-card-body h4 { font-size: 1rem; font-weight: 600; line-height: 1.5; margin: 0 0 8px; }
.brw-card-body h4 a { color: var(--brw-text); }
.brw-card-body h4 a:hover { color: var(--brw-primary); }
.brw-card-body .desc { color: var(--brw-muted); font-size: 13px; margin: 0 0 10px; }
.brw-meta { font-size: 12px; color: #9aa1ac; display: flex; gap: 14px; align-items: center; }
.brw-meta i { margin-right: 4px; }

/* 横向图文列表 */
.brw-list-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px dashed var(--brw-line);
}
.brw-list-item:last-child { border-bottom: 0; }
.brw-list-thumb {
    flex: 0 0 200px;
    position: relative;
    padding-top: 118px;
    border-radius: 10px;
    overflow: hidden;
    background: #e9edf3;
}
.brw-list-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}
.brw-list-item:hover .brw-list-thumb img { transform: scale(1.06); }
.brw-list-content { flex: 1 1 auto; min-width: 0; }
.brw-list-content h4 { font-size: 1.08rem; font-weight: 600; margin: 0 0 8px; line-height: 1.5; }
.brw-list-content h4 a { color: var(--brw-text); }
.brw-list-content h4 a:hover { color: var(--brw-primary); }
.brw-list-content .desc { color: var(--brw-muted); font-size: 13.5px; margin: 0 0 10px; }
@media (max-width: 575.98px) {
    .brw-list-item { flex-direction: column; gap: 10px; }
    .brw-list-thumb { flex: none; padding-top: 56%; }
}

/* 侧栏纯文字榜单 */
.brw-rank { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.brw-rank li {
    counter-increment: rank;
    display: flex;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--brw-line);
    font-size: 14px;
}
.brw-rank li:last-child { border-bottom: 0; }
.brw-rank li::before {
    content: counter(rank);
    flex: 0 0 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 4px;
    background: #eef1f6;
    color: var(--brw-muted);
    font-size: 12px;
    font-weight: 600;
    margin-top: 3px;
}
.brw-rank li:nth-child(-n+3)::before { background: var(--brw-accent); color: #1c1204; }
.brw-rank li a { color: var(--brw-text); }
.brw-rank li a:hover { color: var(--brw-primary); }

/* 标签云 */
.brw-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.brw-tags a {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid var(--brw-line);
    border-radius: 999px;
    font-size: 13px;
    color: var(--brw-muted);
    background: #fafbfc;
}
.brw-tags a:hover { background: var(--brw-primary); border-color: var(--brw-primary); color: #fff; }

/* ---------- 用户口碑 ---------- */
.brw-testimonials {
    background: #fff;
}
.brw-testimonial-scroll {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    flex-wrap: nowrap;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}
.brw-testimonial-scroll::-webkit-scrollbar { height: 4px; }
.brw-testimonial-scroll::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
.brw-testimonial-card {
    flex: 0 0 300px;
    background: #fff;
    border: 1px solid var(--brw-line);
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
    transition: transform .25s;
}
.brw-testimonial-card:hover { transform: translateY(-3px); box-shadow: var(--brw-shadow); }
.brw-testimonial-stars { color: var(--brw-accent); font-size: 14px; margin-bottom: 12px; }
.brw-testimonial-text {
    color: var(--brw-text);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 16px;
    font-style: italic;
}
.brw-testimonial-author { display: flex; align-items: center; gap: 12px; }
.brw-testimonial-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brw-dark), var(--brw-dark-2));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex: 0 0 42px;
}
.brw-testimonial-author strong { display: block; font-size: 14px; }
.brw-testimonial-author span { display: block; font-size: 12px; color: var(--brw-muted); }

/* ---------- 面包屑 ---------- */
.brw-crumb { padding: 14px 0; font-size: 13px; color: var(--brw-muted); }
.brw-crumb ul { margin: 0; padding: 0; flex-wrap: wrap; }
.brw-crumb li + li::before { content: "/"; margin: 0 8px; color: #c7ccd4; }
.brw-crumb a { color: var(--brw-muted); }
.brw-crumb a:hover { color: var(--brw-primary); }

/* ---------- 文章详情 ---------- */
.brw-article-title { font-size: 1.7rem; font-weight: 700; line-height: 1.45; margin: 0 0 14px; }
.brw-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 13px;
    color: var(--brw-muted);
    padding-bottom: 16px;
    border-bottom: 1px solid var(--brw-line);
    margin-bottom: 20px;
}
.brw-content { font-size: 16px; line-height: 1.95; color: #2b3441; word-wrap: break-word; }
.brw-content p { margin-bottom: 1.1rem; }
.brw-content img { height: auto !important; border-radius: 10px; margin: 10px 0; display: block; }
.brw-content h2, .brw-content h3, .brw-content h4 {
    font-weight: 700;
    margin: 1.6rem 0 .9rem;
    line-height: 1.4;
}
.brw-content h2 { font-size: 1.32rem; }
.brw-content h3 { font-size: 1.16rem; }
.brw-content blockquote {
    border-left: 4px solid var(--brw-accent);
    background: #fffaf0;
    padding: 12px 16px;
    color: #57534e;
    margin: 1.2rem 0;
    border-radius: 0 8px 8px 0;
}
.brw-content table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; }
.brw-content table td, .brw-content table th { border: 1px solid var(--brw-line); padding: 8px 10px; }

.brw-nextprev { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; }
.brw-nextprev div {
    background: #fafbfc;
    border: 1px solid var(--brw-line);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
}
.brw-nextprev p { color: var(--brw-muted); font-size: 12px; margin: 0 0 4px; }
@media (max-width: 575.98px) { .brw-nextprev { grid-template-columns: 1fr; } }

/* ---------- 分页 ---------- */
.page-control { display: flex; justify-content: center; margin-top: 24px; }
.page-control .pagination { flex-wrap: wrap; gap: 6px; margin: 0; }
.page-control .page-item { list-style: none; }
.page-control .page-link,
.page-control .page-item.active .page-link {
    border: 1px solid var(--brw-line);
    border-radius: 8px;
    color: var(--brw-text);
    padding: 6px 13px;
    font-size: 14px;
}
.page-control .page-link:hover { background: var(--brw-primary); border-color: var(--brw-primary); color: #fff; }
.page-control .page-item.active .page-link { background: var(--brw-primary); border-color: var(--brw-primary); color: #fff; }

/* ---------- 空状态 ---------- */
.brw-empty { text-align: center; padding: 46px 16px; color: #9aa1ac; }
.brw-empty i { font-size: 40px; display: block; margin-bottom: 12px; color: #d5dae2; }

/* ---------- 页脚（深紫渐变） ---------- */
.brw-footer {
    background: linear-gradient(to right, var(--brw-footer-start), var(--brw-footer-end));
    color: rgba(255, 255, 255, .72);
    padding: 44px 0 22px;
    margin-top: 50px;
}
.brw-footer-card {
    background: rgba(255, 255, 255, .08);
    border-radius: 14px;
    padding: 22px 20px;
    height: 100%;
}
.brw-footer h5 { color: #fff; font-size: 1rem; font-weight: 600; margin-bottom: 16px; }
.brw-footer a { color: rgba(255, 255, 255, .72); font-size: 14px; }
.brw-footer a:hover { color: var(--brw-accent); }
.brw-footer ul { list-style: none; padding: 0; margin: 0; }
.brw-footer ul li { margin-bottom: 8px; }
.brw-footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; }
.brw-copy {
    border-top: 1px solid rgba(255, 255, 255, .1);
    margin-top: 28px;
    padding-top: 18px;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, .45);
}

/* 返回顶部 */
.brw-totop {
    position: fixed;
    right: 18px;
    bottom: 24px;
    width: 44px;
    height: 44px;
    line-height: 44px;
    text-align: center;
    border-radius: 50%;
    background: var(--brw-primary);
    color: #fff;
    box-shadow: var(--brw-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s;
    z-index: 99;
}
.brw-totop.show { opacity: 1; visibility: visible; }
.brw-totop:hover { color: #fff; background: var(--brw-primary-dark); }
