/* ======================================================
   CMS 公共样式 — common.css
   来源: PhpCode header_zdh.html 内联 CSS + style.css 提取
   包含: Header / Footer / 导航 / 布局容器 / 按钮 / 卡片基础 / 响应式
   ====================================================== */

/* ===== CSS 变量 ===== */
:root {
    --hp-primary: #2563eb;
    --hp-primary-dark: #1d4ed8;
    --hp-gold: #f59e0b;
    --hp-gold-light: #fbbf24;
    --hp-dark: #0f172a;
    --hp-text: #334155;
    --hp-text-light: #64748b;
    --hp-bg: #fff;
    --hp-card-bg: #ffffff;
    --hp-border: #e2e8f0;
    --hp-radius: 12px;
    --hp-shadow: 0 1px 3px rgba(0,0,0,.06);
    --hp-shadow-hover: 0 10px 25px rgba(0,0,0,.08);
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--hp-text);
    background: var(--hp-bg);
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1,h2,h3,h4,h5,h6 { margin: 0; font-weight: 600; }
p { margin: 0; }

/* ===== Layout Container ===== */
.w1200 {
    width: 1200px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===== 顶部小导航 ===== */
.top-bar {
    width: 100%;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
}
.top-bar .w1200 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 46px;
}
.top-bar .top-bar-left {
    font-size: 13px;
    color: #999;
}
.top-bar .top-bar-right {
    font-size: 13px;
    color: #999;
}
.top-bar .top-bar-right a {
    color: #666;
    text-decoration: none;
    transition: color .2s;
}
.top-bar .top-bar-right a:hover {
    color: var(--hp-primary);
}
.top-bar .top-bar-right .sep {
    margin: 0 8px;
    color: #ddd;
}
.top-bar .top-bar-right .search-link i {
    font-size: 13px;
    color: #ff5722;
    margin-right: 3px;
}

/* ===== Header / 主导航 ===== */
.header {
    width: 100%;
    z-index: 100;
    position: relative;
    height: 70px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    transition: all .3s ease-in;
    top: 0;
}
/* Header 行改用 flex 布局：logo 左、导航右，自适应不换行；
   flex 子项的 float 被忽略，浮动不再逃逸，也彻底规避 .hp-hero BFC 被挤压问题 */
.header .w1200 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}
.header .logo {
    margin-top: 0;
}
.header .logo .site-logo-link {
    display: flex;
    align-items: center;
    height: 58px;
    text-decoration: none;
}
.header .logo .site-logo-link img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
}
.header .logo .brand-text {
    margin-left: 10px;
    line-height: 1.3;
    text-align: center;
}
.header .logo .brand-name {
    display: block;
    font-size: 26px;
    font-weight: 700;
    color: #ffd700;
    letter-spacing: 2px;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.header .logo .brand-url {
    display: block;
    font-size: 11px;
    color: rgba(255,255,255,.55);
    letter-spacing: .5px;
}
.header .topright {
    position: relative;
    margin-top: 0;
    width: auto;
    max-width: none;
    height: 70px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 导航项：加粗、胶囊悬停、金色下划线指示条 */
.header .nav li a {
    color: rgba(255,255,255,.82);
    font-size: 16px;
    font-weight: 500;
    height: 44px;
    line-height: 44px;
    padding: 0 20px;
    margin: 3px;
    border-radius: 8px;
    letter-spacing: .5px;
    transition: color .25s, background-color .25s;
    display: block;
    text-align: center;
    position: relative;
}
.header .nav li a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 3px;
    width: 0;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    transform: translateX(-50%);
    transition: width .25s;
}
.header .nav li a:hover {
    color: #fff;
    background: rgba(255,255,255,.12);
}
.header .nav li a:hover::after { width: 56%; }

/* 当前栏目：高亮胶囊 + 加粗 + 下划线 */
.header .nav li.hover a,
.header .nav li.active a {
    color: #fff;
    font-weight: 700;
    background: rgba(255,255,255,.16);
}
.header .nav li.hover a::after,
.header .nav li.active a::after { width: 56%; }

/* 导航列表 */
.header .nav {
    padding-right: 0;
}
.header .nav .navlist {
    position: relative;
    display: flex;
    align-items: center;
}
.header .nav li {
    float: left;
    display: inline-block;
    list-style: none;
    font-size: 16px;
    text-align: center;
    position: relative;
    height: 50px;
    line-height: 50px;
}

/* 下拉子菜单 */
.header .nav ul .subnav {
    background: #fff;
    border-top: 2px solid var(--hp-primary);
    box-shadow: 0 13px 42px 11px rgba(0,0,0,.05);
    height: auto;
    left: 0;
    overflow: hidden;
    position: absolute;
    top: 100%;
    width: 100%;
    z-index: 199;
    opacity: 0;
    visibility: hidden;
    transition: all .6s ease 0s;
    transform: translate3d(0, 10px, 0);
}
.header .nav ul li:hover .subnav {
    opacity: 1;
    visibility: visible;
    transform: translate3d(0, 0, 0);
}
.header .nav ul .subnav a {
    color: #666;
    display: block;
    font-size: 13px;
    font-weight: 500;
    height: 40px;
    line-height: 40px;
    padding: 0;
    transition: all 0.2s ease-in-out 0s;
    border: 0 none;
    border-bottom: 1px solid #eee;
    border-radius: initial;
}
.header .nav ul .subnav a:hover {
    color: var(--hp-primary);
    background: #f9f9f9;
    text-indent: 3px;
}

/* 登录/用户中心按钮：金橙渐变 */
.header .user .log .layui-btn,
.header .user .log .btn-login {
    height: 40px;
    line-height: 40px;
    padding: 0 24px;
    margin-top: 5px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #0f172a;
    box-shadow: 0 4px 14px rgba(245,158,11,.35);
    transition: all .25s;
    border: none;
    cursor: pointer;
    display: inline-block;
}
.header .user .log .layui-btn:hover,
.header .user .log .btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245,158,11,.5);
    color: #0f172a;
}
.header .user {
    position: relative;
    z-index: 10;
}
.header .user ul {
    display: flex;
    align-items: center;
}
.header .user ul li {
    float: none;
}

/* ===== Footer ===== */
.footer {
    width: 100%;
    background: #273037;
    color: #fff;
    padding-bottom: 0;
}
.copy {
    background: #333;
    border-top: 1px solid #353535;
    line-height: 60px;
    color: #999;
    font-size: 12px;
    margin-bottom: 0;
}
.copy p {
    margin: 0;
}
.copy a {
    color: #999;
    transition: color .2s;
}
.copy a:hover {
    color: #fff;
}

/* ===== 通用按钮 ===== */
.btn {
    display: inline-block;
    height: 38px;
    line-height: 38px;
    padding: 0 18px;
    background-color: var(--hp-primary);
    color: #fff;
    white-space: nowrap;
    text-align: center;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all .25s;
}
.btn:hover {
    opacity: .85;
    color: #fff;
}
.btn-gold {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #0f172a;
    font-weight: 600;
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--hp-border);
    color: var(--hp-text);
}
.btn-outline:hover {
    border-color: var(--hp-primary);
    color: var(--hp-primary);
    background: transparent;
}

/* ===== 通用卡片 ===== */
.card {
    background: var(--hp-card-bg);
    border-radius: var(--hp-radius);
    box-shadow: var(--hp-shadow);
    transition: all .3s ease;
    overflow: hidden;
}
.card:hover {
    box-shadow: var(--hp-shadow-hover);
    transform: translateY(-4px);
}

/* ===== 通用工具类 ===== */
.clearfix::after,
.clearfix::before {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: " ";
    clear: both;
}
.el {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.tc { text-align: center; }
.fl { float: left; }
.fr { float: right; }
.transition { transition: all 0.5s ease; }

/* ===== Section 公共 ===== */
.section {
    padding: 60px 0;
}
.section-title {
    text-align: center;
    margin-bottom: 40px;
}
.section-title h2 {
    font-size: 30px;
    color: #1e293b;
    margin-bottom: 8px;
}
.section-title p {
    font-size: 16px;
    color: var(--hp-text-light);
}

/* ===== 移动端导航折叠（汉堡菜单） ===== */
.mobile-nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    cursor: pointer;
    color: #fff;
    font-size: 22px;
    border-radius: 8px;
    transition: background .2s;
}
.mobile-nav-toggle:hover {
    background: rgba(255,255,255,.12);
}

/* ===== 响应式断点 ===== */

/* 平板横屏 ≤ 1024px */
@media (max-width: 1024px) {
    .w1200 {
        width: 100%;
        padding: 0 20px;
    }
    .header .topright {
        width: calc(100% - 180px);
    }
}

/* 平板竖屏 ≤ 992px */
@media (max-width: 992px) {
    .header {
        height: 60px;
    }
    .header .logo {
        margin-top: 4px;
    }
    .header .logo .site-logo-link img {
        width: 40px;
        height: 40px;
    }
    .header .logo .brand-name {
        font-size: 18px;
    }
    .header .nav li a {
        font-size: 14px;
        padding: 0 14px;
    }
}

/* 手机 ≤ 768px — 切换为汉堡菜单 */
@media (max-width: 768px) {
    .header {
        height: 56px;
    }
    .header .w1200 {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 12px;
    }
    .header .logo {
        margin-top: 0;
    }
    .header .logo .site-logo-link {
        height: 48px;
    }
    .header .logo .site-logo-link img {
        width: 36px;
        height: 36px;
    }
    .header .logo .brand-name {
        font-size: 16px;
    }
    .header .logo .brand-url {
        display: none;
    }
    .header .topright {
        display: none;
        position: fixed;
        top: 56px;
        left: 0;
        width: 100%;
        max-width: 100%;
        height: auto;
        line-height: 1;
        background: #1e293b;
        padding: 10px 0;
        box-shadow: 0 4px 20px rgba(0,0,0,.3);
        z-index: 999;
        margin-top: 0;
    }
    .header .topright.open {
        display: block;
    }
    .header .nav {
        width: 100%;
        padding-right: 0;
    }
    .header .nav .navlist {
        display: flex;
        flex-direction: column;
    }
    .header .nav li {
        float: none;
        height: auto;
        line-height: 1;
    }
    .header .nav li a {
        height: 44px;
        line-height: 44px;
        padding: 0 20px;
        margin: 2px 10px;
        text-align: left;
        border-radius: 8px;
    }
    .header .user {
        width: 100%;
        padding: 10px 20px;
        border-top: 1px solid rgba(255,255,255,.1);
        margin-top: 6px;
    }
    .header .user ul li {
        float: none;
    }
    .header .user .log .layui-btn,
    .header .user .log .btn-login {
        width: 100%;
        text-align: center;
        display: block;
        margin-top: 0;
    }
    .mobile-nav-toggle {
        display: block;
    }
    .section {
        padding: 30px 0;
    }
    .section-title h2 {
        font-size: 22px;
    }
    .section-title p {
        font-size: 14px;
    }
}

/* 小手机 ≤ 576px */
@media (max-width: 576px) {
    .w1200 {
        padding: 0 10px;
    }
    .header .logo .brand-name {
        font-size: 15px;
    }
    .copy {
        line-height: 1.8;
        padding: 15px 0;
        text-align: center;
    }
}
