/* ============================================================
 * 前台补充样式（基于本地 Bootstrap 5.3）
 * 只保留品牌视觉、轮播覆盖层、滚动信息、联系卡片等
 * Bootstrap 无法直接表达的部分。
 * ============================================================ */

:root {
    /* 品牌色（与 admin.css 统一） */
    --brand: #1a73e8;
    --brand-dark: #1256c9;
    --brand-soft: #eaf2ff;
    --brand-gradient: linear-gradient(135deg, #2f8bff 0%, #1256c9 100%);

    /* 中性色 */
    --ink: #152641;
    --text: #212529;
    --sub: #64748b;
    --line: #e6eefc;
    --bg-page: #f4f8ff;

    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(26, 115, 232, 0.06);
    --shadow: 0 8px 30px rgba(26, 115, 232, 0.08);
    --shadow-lg: 0 16px 48px rgba(26, 115, 232, 0.14);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(1100px 460px at 8% -8%, #e7f0ff 0%, rgba(231, 240, 255, 0) 70%),
        radial-gradient(900px 440px at 100% 8%, #eef5ff 0%, rgba(238, 245, 255, 0) 65%),
        var(--bg-page);
}

a { text-decoration: none; }

/* ======================= 导航栏 ======================= */
.site-navbar {
    backdrop-filter: saturate(180%) blur(12px);
    background: rgba(255, 255, 255, 0.92);
}

.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    font-weight: 700;
    color: #fff;
    background: var(--brand-gradient);
    box-shadow: 0 8px 18px rgba(26, 115, 232, 0.28);
    overflow: hidden;
    flex-shrink: 0;
}

.brand-logo img { width: 100%; height: 100%; object-fit: cover; }

.brand-name { font-size: 20px; font-weight: 700; color: #0d47a1; line-height: 1.2; }
.brand-domain { font-size: 12px; color: #7b8ca6; letter-spacing: .4px; }

.site-navbar .nav-link {
    color: #33507a;
    border-radius: .6rem;
    padding: .5rem .85rem;
    font-weight: 500;
}

.site-navbar .nav-link:hover,
.site-navbar .nav-link:focus {
    color: var(--brand);
    background: var(--brand-soft);
}

.site-navbar .nav-login {
    color: #fff;
    border-radius: 999px;
    padding: .5rem 1.2rem;
    background: var(--brand-gradient);
    box-shadow: 0 6px 16px rgba(26, 115, 232, 0.25);
    transition: transform 0.15s, box-shadow 0.15s;
}

.site-navbar .nav-login:hover {
    color: var(--brand);
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(26, 115, 232, 0.35);
}

/* ======================= 轮播 ======================= */
.hero {
    height: 360px;
    border-radius: 18px;
    overflow: hidden;
    background: #dbeafe;
    box-shadow: var(--shadow);
}

.hero-fallback {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    background: var(--brand-gradient);
}

.hero-slide {
    display: block;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    color: #fff;
}

.hero-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(8, 49, 116, 0.86) 0%, rgba(15, 82, 180, 0.55) 42%, rgba(15, 82, 180, 0.05) 78%);
}

.hero-copy {
    position: absolute;
    left: 42px;
    top: 50%;
    transform: translateY(-50%);
    max-width: 56%;
    z-index: 2;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    margin-bottom: 14px;
    font-size: 12px;
    letter-spacing: 1px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-title {
    font-size: 32px;
    line-height: 1.32;
    font-weight: 700;
    letter-spacing: .5px;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
}

.hero-sub {
    margin-top: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.7;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 10px 22px;
    border-radius: 999px;
    background: #fff;
    color: var(--brand-dark);
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
    transition: transform .2s ease, box-shadow .2s ease;
}

.hero-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22); }

.carousel-indicators [data-bs-target] {
    width: 22px;
    height: 5px;
    border-radius: 999px;
    border: 0;
    background-color: rgba(255, 255, 255, 0.42);
    opacity: 1;
    transition: width .25s ease, background-color .25s ease;
}

.carousel-indicators .active {
    width: 36px;
    background-color: #fff;
}

/* ======================= 区块标题 ======================= */
.section { scroll-margin-top: 96px; }
.contact-card { scroll-margin-top: 96px; }

.section-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--brand);
    background: var(--brand-soft);
    border: 1px solid #d9e7ff;
    flex-shrink: 0;
}

.section-title { font-size: 24px; letter-spacing: .5px; color: #0f2c55; line-height: 1.2; }
.section-sub { font-size: 12.5px; color: var(--sub); }
.section-count {
    font-size: 12px;
    color: var(--brand);
    background: #fff;
    border: 1px solid #dbe8ff;
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

/* ======================= 站点卡片 ======================= */
.post-card {
    border: 1px solid #eef1f5;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    border-color: #c7d8fb;
    box-shadow: var(--shadow-lg);
}

.post-card .ratio { background: #eaf2ff; }
.post-card .ratio img { transition: transform .5s ease; }
.post-card:hover .ratio img { transform: scale(1.04); }

.post-title { font-size: 15px; font-weight: 700; color: #1a1a1a; }
.post-tag { font-size: 11px; font-weight: 400; color: #64748b; background: #f1f5f9; }

.post-desc {
    font-size: 12.5px;
    color: var(--sub);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.post-foot {
    border-top: 1px solid #eef1f5;
    font-size: 11.5px;
    color: #94a3b8;
}

.post-foot .go { color: var(--brand); font-weight: 600; }

/* ======================= 右侧栏 ======================= */
.page-side {
    position: sticky;
    top: 92px;
}

.page-side .card {
    border-radius: 14px;
    border: 1px solid #eef1f5;
    box-shadow: var(--shadow-sm);
}

.side-title {
    font-size: 15px;
    font-weight: 600;
    color: #0f2c55;
    border-bottom: 1px dashed #e8f0fd;
}

.side-title .bar {
    width: 4px;
    height: 16px;
    border-radius: 2px;
    background: var(--brand-gradient);
}

.side-title .more { font-size: 11.5px; font-weight: 400; color: #9aabc4; }

/* 滚动信息 */
.news-viewport {
    height: 268px;
    overflow: hidden;
    position: relative;
}

.news-viewport::before,
.news-viewport::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 18px;
    z-index: 2;
    pointer-events: none;
}

.news-viewport::before { top: 0; background: linear-gradient(#fff, rgba(255, 255, 255, 0)); }
.news-viewport::after { bottom: 0; background: linear-gradient(rgba(255, 255, 255, 0), #fff); }

.news-track { animation: newsScroll 26s linear infinite; }
.news-card:hover .news-track { animation-play-state: paused; }

.news-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 0;
    font-size: 12.5px;
    color: #4b6b93;
    border-bottom: 1px dashed #f0f5fd;
}

.news-item .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #9ec5ff;
    flex-shrink: 0;
}

.news-item .news-name { font-weight: 600; color: #27466f; white-space: nowrap; }
.news-item .news-desc {
    flex: 1;
    min-width: 0;
    color: #93a6c0;
    font-size: 11.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-item:hover .news-name { color: var(--brand); }

@keyframes newsScroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

/* 联系我们 */
.contact-row {
    padding: 11px 0;
    border-bottom: 1px dashed #f0f5fd;
}

.contact-row:last-child { border-bottom: none; }

.contact-badge {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.contact-badge.wechat { background: linear-gradient(135deg, #4ade80, #16a34a); }
.contact-badge.qq { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.contact-badge.mp { background: linear-gradient(135deg, #fbbf24, #f97316); }
.contact-badge.douyin { background: linear-gradient(135deg, #334155, #0f172a); }
.contact-badge.mail { background: linear-gradient(135deg, #a78bfa, #7c3aed); }

.contact-label { font-size: 11.5px; color: #93a6c0; line-height: 1.3; }
.contact-value { font-size: 13px; font-weight: 600; color: #27466f; word-break: break-all; line-height: 1.45; }
.contact-value.is-empty { font-weight: 400; color: #b3c0d4; }
.contact-row[data-copy] { cursor: pointer; }
.contact-row[data-copy]:hover .contact-value { color: var(--brand); }

.contact-tip {
    padding: 10px 12px;
    border-radius: 10px;
    background: #f3f8ff;
    color: #7b8ca6;
    font-size: 11.5px;
    line-height: 1.6;
    text-align: center;
}

/* 联系二维码（与行内容左对齐） */
.contact-qr { margin-top: 10px; text-align: left; }

.contact-qr img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    background: #fff;
    padding: 6px;
    border: 1px solid #eef1f5;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease;
}

.contact-row:hover .contact-qr img {
    transform: scale(1.03);
    box-shadow: var(--shadow);
}

.qr-caption {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: #93a6c0;
}

/* ======================= 底部 ======================= */
.site-footer {
    background: rgba(255, 255, 255, 0.72);
    border-top: 1px solid var(--line);
}

.friend-links { font-size: 12.5px; color: #7b8ca6; }
.friend-links .label { color: #33507a; font-weight: 600; }
.friend-links a { color: #5b7aa6; }
.friend-links a:hover { color: var(--brand); }

.footer-meta { font-size: 12px; color: #93a6c0; }
.footer-meta a { color: #7b8ca6; }
.footer-meta a:hover { color: var(--brand); }
.footer-meta .sep { color: #d5e1f2; }
.footer-meta .stat { color: #7b8ca6; }
.footer-meta .stat strong { color: var(--brand); font-weight: 600; }

/* ======================= 回到顶部 ======================= */
.back-top {
    position: fixed;
    right: 22px;
    bottom: 26px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--brand-gradient);
    box-shadow: 0 8px 20px rgba(26, 115, 232, 0.35);
    cursor: pointer;
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s, box-shadow .2s ease;
}

.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(26, 115, 232, 0.45); }
.back-top svg { width: 18px; height: 18px; }

/* ======================= 响应式 ======================= */
@media (max-width: 991.98px) {
    .page-side { position: static; }
    .hero { height: 300px; }
    .hero-title { font-size: 27px; }
    .news-viewport { height: 220px; }

    /* 联系卡片：二维码保持正下方居中，仅随断点调尺寸 */
    .contact-qr img { width: 110px; height: 110px; }
}

@media (max-width: 575.98px) {
    .hero { height: 230px; border-radius: 14px; }
    .hero-copy { left: 20px; right: 20px; max-width: none; }
    .hero-title { font-size: 21px; }
    .hero-sub { font-size: 12px; margin-top: 8px; }
    .hero-kicker { margin-bottom: 10px; font-size: 11px; }
    .hero-btn { margin-top: 12px; padding: 8px 16px; font-size: 12.5px; }
    .brand-name { font-size: 17px; }
    .brand-logo { width: 38px; height: 38px; border-radius: 11px; font-size: 17px; }
    .section-title { font-size: 20px; }
    .section-icon { width: 34px; height: 34px; font-size: 16px; border-radius: 10px; }

    /* 手机端联系卡片收紧 */
    .contact-row { padding: 10px 0; }
    .contact-badge { width: 32px; height: 32px; font-size: 12px; border-radius: 9px; }
    .contact-label { font-size: 11px; }
    .contact-value { font-size: 12.5px; }
    .contact-qr { margin-top: 8px; }
    .contact-qr img { width: 96px; height: 96px; padding: 5px; border-radius: 10px; }
    .contact-tip { font-size: 12px; }

    /* 手机端回到顶部按钮收紧 */
    .back-top { right: 16px; bottom: 18px; width: 38px; height: 38px; }
    .back-top svg { width: 16px; height: 16px; }
}
