/**
 * 前台主题样式
 * 依赖：Bootstrap 5（栅格与基础组件）
 * 约定：中文注释，无 emoji，UTF-8
 */

:root {
    --brand: #1e6fff;
    --brand-dark: #0d5be0;
    --text: #333;
    --muted: #888;
    --line: #eee;
}

body {
    color: var(--text);
    background: #fff;
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover {
    color: var(--brand-dark);
}

/* ============ 顶部导航 ============ */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
}

.site-header .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
}

.site-header .logo img {
    height: 42px;
    display: block;
}

.site-header .logo-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--brand);
}

/* 移动端菜单按钮 */
.site-header .nav-toggle {
    display: none;
    border: none;
    background: none;
    font-size: 22px;
    color: var(--text);
}

.site-header .navbar {
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-header .nav-link {
    display: block;
    padding: 8px 16px;
    color: var(--text);
    border-radius: 4px;
    transition: all .2s;
}

.site-header .nav-link:hover,
.site-header .nav-link.active {
    color: #fff;
    background: var(--brand);
}

/* 下拉子菜单 */
.site-header .nav-dropdown {
    position: relative;
}

.site-header .nav-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 160px;
    padding: 6px 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
    z-index: 100;
}

.site-header .nav-dropdown:hover .dropdown-menu {
    display: block;
}

.site-header .nav-dropdown .dropdown-menu a {
    display: block;
    padding: 8px 16px;
    color: var(--text);
}

.site-header .nav-dropdown .dropdown-menu a:hover {
    color: var(--brand);
    background: #f7f9fc;
}

/* 搜索框 */
.site-header .search-box {
    display: flex;
    gap: 6px;
}

.site-header .search-box input {
    width: 180px;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 6px 10px;
    outline: none;
}

.site-header .search-box input:focus {
    border-color: var(--brand);
}

/* 语言切换 */
.site-header .lang-switch {
    display: flex;
    align-items: center;
    gap: 6px;
}

.site-header .lang-switch a {
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--text);
    font-size: 13px;
    transition: all .2s;
}

.site-header .lang-switch a:hover,
.site-header .lang-switch a.active {
    color: #fff;
    background: var(--brand);
    border-color: var(--brand);
}

/* ============ 焦点图 ============ */
.banner .carousel-item img {
    width: 100%;
    max-height: 460px;
    object-fit: cover;
}

/* ============ 通用区块 ============ */
.section {
    padding: 40px 0;
}

.section-title {
    font-size: 22px;
    margin-bottom: 24px;
    padding-left: 12px;
    border-left: 4px solid var(--brand);
}

.section-title a.more {
    float: right;
    font-size: 14px;
    font-weight: normal;
    color: var(--muted);
}

/* 首页栏目聚合卡片 */
.index-card {
    display: block;
    margin-bottom: 20px;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow .2s;
}

.index-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
}

.index-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    background: #f5f7fa;
}

.index-card .card-body {
    padding: 10px 12px;
}

.index-card h3 {
    font-size: 15px;
    margin: 0 0 6px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.index-card .date {
    font-size: 12px;
    color: var(--muted);
}

/* ============ 面包屑 ============ */
.breadcrumb-bar {
    background: #f7f9fc;
    padding: 12px 0;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

.breadcrumb-bar a,
.breadcrumb-bar span {
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb-bar .current {
    color: var(--text);
}

/* ============ 列表页 ============ */
.list-item {
    padding: 16px 0;
    border-bottom: 1px dashed var(--line);
}

.list-item .thumb {
    width: 140px;
    height: 90px;
    object-fit: cover;
    border-radius: 4px;
}

.list-item h3 {
    font-size: 17px;
    margin: 0 0 8px;
}

.list-item h3 a {
    color: var(--text);
}

.list-item h3 a:hover {
    color: var(--brand);
}

.list-item .desc {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list-item .date {
    font-size: 13px;
    color: #bbb;
}

/* ============ 详情页 ============ */
.content-detail h1 {
    font-size: 26px;
    text-align: center;
    margin-bottom: 12px;
}

.content-detail .meta {
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 20px;
}

.content-detail .body {
    font-size: 16px;
    line-height: 1.9;
}

.content-detail .body img {
    max-width: 100%;
    height: auto;
}

/* 上下篇 */
.prev-next {
    margin-top: 30px;
    padding: 16px 0;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

/* ============ 表单页 ============ */
.contact-form {
    max-width: 640px;
    margin: 0 auto;
}

.contact-form .form-group {
    margin-bottom: 16px;
}

.contact-form label {
    font-weight: 500;
    margin-bottom: 6px;
}

.contact-form .required {
    color: #e74c3c;
    margin-left: 2px;
}

.contact-form .captcha-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.contact-form .captcha-row img {
    height: 38px;
    border: 1px solid var(--line);
    cursor: pointer;
}

/* 表单结果页 */
.form-result {
    text-align: center;
    padding: 80px 0;
}

.form-result .icon {
    font-size: 48px;
    color: var(--brand);
    margin-bottom: 16px;
}

/* ============ 分页 ============ */
.pagination {
    margin: 24px 0;
    justify-content: center;
}

/* ============ 底部 ============ */
.site-footer {
    background: #20232a;
    color: #bbb;
    padding: 30px 0;
    margin-top: 40px;
    font-size: 14px;
    line-height: 1.8;
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    color: #bbb;
}

/* ============ 响应式 ============ */
@media (max-width: 768px) {
    .site-header .header-inner {
        flex-wrap: wrap;
        padding: 10px 0;
    }

    .site-header .nav-toggle {
        display: block;
    }

    .site-header .navbar {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        margin-top: 10px;
    }

    .site-header .navbar.open {
        display: flex;
    }

    .site-header .nav-dropdown .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 16px;
    }

    .site-header .search-box {
        width: 100%;
        margin-top: 10px;
    }

    .site-header .search-box input {
        flex: 1;
        width: auto;
    }

    .list-item .thumb {
        width: 100px;
        height: 70px;
    }
}

/* 会员登录态导航（header 右侧，与 lang-switch 同风格） */
.site-header .member-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
    font-size: 13px;
}

.site-header .member-nav a {
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--text);
    transition: all .2s;
}

.site-header .member-nav a:hover {
    color: #fff;
    background: var(--brand);
}
