/* ========================================
   诺君安官网 - 中文站样式（视觉还原版）
   基于原站 www.bjnja.com 视觉设计
   主色调: #494d7a (深紫蓝)
   链接色: #e67e22 (橙色)
   按钮色: #F85359 (红色)
   ======================================== */

/* ========== 1. CSS变量 ========== */
:root {
    --primary-color: #494d7a;
    --primary-dark: #3a3e6b;
    --primary-light: #5a5e8b;
    --link-color: #e67e22;
    --btn-primary: #F85359;
    --btn-primary-hover: #d9444a;
    --btn-secondary: #e06564;
    --body-text: #505050;
    --heading-text: #303030;
    --muted-text: #9fa0a0;
    --muted-light: #a3a0a0;
    --border-color: #d3d4d4;
    --footer-bg: #4b555e;
    --footer-text: #fff;
    --sidebar-bg: #f8f9fa;
    --success-accent: #83ccc9;
    --success-bg: #ebf6f6;
    --light-box-bg: #F2F9F9;
    --white: #fff;
}

/* ========== 2. 基础排版 ========== */
html, body {
    color: var(--body-text);
    line-height: 1.75rem;
    font-size: 16px;
    background: #fff;
    font-family: "Helvetica Neue", Helvetica, Arial, "Hiragino Sans GB", "Hiragino Sans GB W3", "WenQuanYi Micro Hei", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 400;
    color: var(--heading-text);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.75rem; }

a {
    color: var(--link-color);
    outline: none;
}
a:hover {
    color: var(--link-color);
    text-decoration: none;
}
a:active, a:focus, a img {
    outline: none;
}

/* ========== 3. 导航栏（固定顶部） ========== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background-color: #fff;
    border-bottom: none;
    padding: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

header .container {
    position: relative;  /* 为 .info 绝对定位提供参照 */
}

/* 股票代码+语言切换（原站右上角定位） */
header .info {
    position: absolute;
    right: 15px;
    top: 1.5rem;
    z-index: 100;
}
header .gpnum {
    color: var(--primary-color);
    font-size: 14px;
    margin: 0;
    font-weight: 500;
    text-align: right;
}

header .navbar {
    padding: 0;
    margin: 0;
}

header .nav-link {
    color: #000;
    font-size: 1.2rem;
    font-weight: 300;
    padding: 0 1.25rem !important;
    height: 75px;
    line-height: 75px;
    display: flex;
    align-items: center;
}

header .nav-link:hover,
header .nav-link:focus {
    color: var(--primary-color);
}

header .dropdown-menu {
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    margin-top: 0;
}

header .dropdown-item {
    padding: 0.5rem 1.25rem;
    font-size: 1rem;
    font-weight: 300;
    color: #000;
    line-height: 2.5rem;
    height: auto;
    white-space: nowrap;
}

header .dropdown-item:hover {
    background: var(--primary-color);
    color: #fff;
}

/* 语言切换按钮（EN_CN风格色块） */
.EN_CN {
    min-width: 25px;
    height: 25px;
    display: block;
    line-height: 25px;
    text-align: center;
    float: left;
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    padding: 0 5px;
}
.EN_CN.en {
    background-color: var(--primary-color);
}
.EN_CN.cn {
    background-color: #b7161c;
}
a.EN_CN {
    color: #fff;
}
a.EN_CN:hover {
    color: #fff;
    text-decoration: none;
}

/* 桌面端hover展开下拉菜单 */
@media (hover: hover) and (min-width: 992px) {
    header .navbar-nav .dropdown:hover > .dropdown-menu {
        display: block;
    }
    .dropdown-submenu:hover > .dropdown-menu {
        display: block;
    }
}

/* 导航占位（固定导航导致内容被遮挡） */
body {
    padding-top: 90px;
}

/* ========== 4. 轮播图 ========== */
.carousel-item img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

/* 轮播图侧边栏标题块（还原原站bannerbox） */
.banner-overlay {
    position: absolute;
    top: 3rem;
    min-width: 21.5rem;
    z-index: 10;
}
.banner-overlay h1 {
    color: #fff;
    background-color: var(--primary-color);
    margin: 0;
    font-size: 1.5rem;
    height: 2.4rem;
    line-height: 2.4rem;
    padding-left: 4rem;
}

/* ========== 5. 区块标题 ========== */
.section-title {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 400;
    padding-bottom: 0;
    border-bottom: none;
    display: block;
    margin-bottom: 2rem;
}

/* ========== 6. 侧边栏 ========== */
.sidebar {
    background: var(--sidebar-bg);
    padding: 20px;
    border-radius: 0;
    border: none;
}

.sidebar-title {
    color: var(--primary-color);
    font-size: 1.125rem;
    font-weight: 400;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.sidebar .nav-link {
    color: var(--body-text);
    padding: 8px 15px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    font-weight: 300;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: var(--primary-color);
    background: #e8f0fe;
}

/* ========== 7. 解决方案卡片 ========== */
.solution-card {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}
.solution-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}
.solution-card .card-title {
    color: var(--primary-color);
    font-weight: 400;
}

/* ========== 8. 软件产品卡片 ========== */
.software-card {
    border: 1px solid #eee;
    transition: transform 0.3s;
}
.software-card:hover {
    transform: translateY(-3px);
}
.software-card .card-title {
    color: var(--primary-color);
    font-weight: 400;
}

/* ========== 9. 硬件产品卡片 ========== */
.hardware-card {
    border: 1px solid #eee;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}
.hardware-card .card-title {
    color: var(--primary-color);
    font-weight: 400;
}

/* ========== 10. 案例卡片 ========== */
.case-card {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.case-card .card-title {
    color: var(--primary-color);
    font-weight: 400;
}

/* ========== 11. 首页解决方案infobox风格（还原原站） ========== */
.infobox {
    border: 0.01rem solid #ccc;
    text-align: center;
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: transform 0.3s;
}
.infobox:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.infobox h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    font-weight: 400;
    margin: 1rem 0;
}
.infobox p {
    color: var(--muted-light);
    font-size: 0.9375rem;
    font-weight: 300;
}

/* ========== 12. 按钮样式 ========== */
.btn-primary {
    background-color: var(--btn-primary);
    border-color: var(--btn-primary);
    border-radius: 3rem;
    font-weight: 300;
}
.btn-primary:hover {
    background-color: var(--btn-primary-hover);
    border-color: var(--btn-primary-hover);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 300;
}
.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* 原站风格的"详情"按钮 */
.btn-detail {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.5rem 2rem;
    font-weight: 300;
    text-decoration: none;
    transition: background-color 0.3s;
}
.btn-detail:hover {
    background-color: var(--primary-dark);
    color: #fff;
}

/* ========== 13. 内容区域 ========== */
.content-area,
.page-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--body-text);
    font-weight: 300;
}

.content-area img,
.page-content img {
    max-width: 100%;
    height: auto;
}

.content-area h1,
.content-area h2,
.content-area h3,
.page-content h1,
.page-content h2,
.page-content h3 {
    color: var(--primary-color);
}

/* ===== 解决方案详情页 - 原站zdy内容样式 ===== */
.content-area .zdytext {
    margin-bottom: 40px;
    padding: 20px 0;
    border-bottom: 1px solid #e8e8e8;
}
.content-area .zdytext:last-child {
    border-bottom: none;
}
.content-area .zdytitle {
    font-size: 22px;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 20px;
    padding-left: 15px;
    border-left: 4px solid var(--primary-color);
}
.content-area .zdytext ul {
    padding-left: 20px;
}
.content-area .zdytext ul li {
    line-height: 1.9;
    margin-bottom: 10px;
    font-size: 15px;
}
.content-area .zdytext p {
    font-size: 15px;
    line-height: 1.9;
}

/* 原站产品详情页 pbox 风格 */
.content-box {
    border: 0.5rem solid #80a3aa;
    text-align: center;
    margin: 3rem 0;
    padding: 2rem;
    background-color: var(--light-box-bg);
}
.content-box h1 {
    font-size: 2rem;
    padding: 2rem 0;
    color: var(--primary-color);
    font-weight: 300;
}

/* 面包屑 */
.breadcrumb {
    background: none;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    border-bottom: 0.01rem solid var(--border-color);
    margin-bottom: 1.5rem;
}
.breadcrumb a {
    color: #231815;
    font-weight: 300;
}
.breadcrumb .breadcrumb-item.active {
    color: #231815;
}

/* ========== 14. 新闻列表 ========== */
.list-group-item {
    border: none;
    border-bottom: 0.13rem solid #e1e1e1;
    padding: 1.5rem 1rem;
    background: none;
}
.list-group-item:hover {
    background: #f9f9f9;
}
.list-group-item h5,
.list-group-item h6 {
    color: var(--primary-color);
    font-weight: 400;
}
.list-group-item .text-muted {
    color: var(--muted-text) !important;
}

/* ========== 15. 成功案例区块 ========== */
.nav-tabs .nav-link {
    color: var(--body-text);
    font-weight: 300;
    border: none;
    padding: 0.75rem 1.5rem;
}
.nav-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    font-weight: 400;
}

/* 案例详情页风格 */
.success-box {
    background-color: var(--success-bg);
    border-left: 0.3rem solid var(--success-accent);
    padding: 2rem 3.8rem;
    margin-bottom: 2rem;
}
.success-box h1,
.success-box h2 {
    color: var(--primary-color);
    font-size: 1.12rem;
    font-weight: 400;
}
.success-box p {
    color: var(--muted-text);
    font-size: 1rem;
    line-height: 1.4rem;
}

/* ========== 16. 页脚 ========== */
.footer {
    margin-top: 0;
    padding: 2.2rem 0 1rem;
    background-color: var(--footer-bg);
    color: var(--footer-text);
}

.footer .container > .row:first-child > [class*="col-"] {
    width: 20%;
    padding: 0 0.43rem;
    flex: 0 0 20%;
    max-width: 20%;
}

.footer h5 {
    border-bottom: 0.01rem solid #fff;
    font-size: 0.9375rem;
    padding-bottom: 0.8rem;
    color: #fff;
    font-weight: 300;
}

.footer a {
    font-size: 0.625rem;
    color: #fff;
    font-weight: 300;
    text-decoration: none;
}

.footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer .copyright {
    text-align: right;
    color: #fff;
    font-weight: 300;
    font-size: 0.625rem;
    border-top: none;
    padding-top: 0;
}

.footer .copyright p {
    margin-bottom: 0;
}

/* 原站页脚版权区 */
.webinfo {
    text-align: right;
    color: #fff;
    font-weight: 300;
    font-size: 0.625rem;
    margin-top: 1rem;
}

.webinfo p {
    margin-bottom: 0;
}

/* 社交图标区 */
.sjico {
    margin-top: 1rem;
    text-align: center;
}
.sjico a {
    color: #B4B9BD !important;
    font-size: 2rem;
    margin-right: 1rem;
}

/* ========== 17. 二级子菜单 ========== */
.dropdown-submenu {
    position: relative;
}
.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: 0;
}

/* ========== 18. 图片100%宽 ========== */
.img100 img {
    max-width: 100%;
}

/* ========== 19. 合作联系页面 ========== */
.contact-section h1 {
    font-size: 2.8rem;
    padding: 4rem 0;
    color: #000;
    font-weight: 300;
}

/* ========== 响应式适配 ========== */

/* 平板端 (768px-991px) */
@media (max-width: 991px) {
    body {
        padding-top: 70px;
    }

    header .nav-link {
        font-size: 1rem;
        padding: 0 0.75rem !important;
        height: 60px;
        line-height: 60px;
    }

    header .gpnum {
        font-size: 12px;
    }

    .footer .container > .row:first-child > [class*="col-"] {
        width: 33.33%;
        flex: 0 0 33.33%;
        max-width: 33.33%;
    }

    .sidebar {
        margin-bottom: 20px;
    }
}

/* 手机端 (<768px) */
@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }

    header {
        padding: 5px 0;
    }

    .carousel-item img {
        max-height: 250px;
    }

    .section-title {
        font-size: 1.7rem;
    }

    .sidebar {
        margin-bottom: 15px;
        padding: 15px;
    }

    .sidebar-title {
        font-size: 1rem;
        cursor: pointer;
        position: relative;
    }

    .sidebar-title::after {
        content: '\f078';
        font-family: FontAwesome;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        font-size: 12px;
        transition: transform 0.3s;
    }

    .sidebar-title.collapsed::after {
        transform: translateY(-50%) rotate(-90deg);
    }

    .sidebar .sidebar-nav {
        max-height: 500px;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .sidebar .sidebar-nav.collapsed {
        max-height: 0;
    }

    .sidebar .nav-link {
        padding: 10px 15px;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .footer h5 {
        font-size: 14px;
        margin-top: 10px;
    }

    .footer a {
        font-size: 14px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .footer .container > .row:first-child > [class*="col-"] {
        width: 50%;
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 10px;
    }

    .footer .copyright {
        text-align: center;
        font-size: 12px;
    }

    .content-area,
    .page-content {
        font-size: 15px;
        line-height: 1.8;
    }

    .content-area img,
    .page-content img {
        max-width: 100%;
        height: auto;
    }

    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .nav-tabs .nav-item {
        flex: 0 0 auto;
    }

    .nav-tabs .nav-link {
        padding: 10px 16px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .card .btn {
        min-height: 36px;
        min-width: 60px;
        padding: 6px 14px;
    }

    .list-group-item {
        padding: 12px;
        min-height: 44px;
    }

    .list-group-item h5,
    .list-group-item h6 {
        font-size: 15px;
    }

    .breadcrumb {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .hardware-card .row > .col-4 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .hardware-card .row > .col-8 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    h2.mb-4 {
        font-size: 1.5rem;
    }

    .section-solutions,
    .section-software,
    .section-hardware,
    .section-cases {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    /* 案例卡片移动端2列 */
    .section-cases .col-lg-3,
    .section-cases .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* Offcanvas侧滑菜单 */
    .offcanvas {
        width: 280px !important;
    }

    .offcanvas .nav-link {
        padding: 12px 16px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        color: #333;
        font-size: 15px;
        border-bottom: 1px solid #f0f0f0;
    }

    .offcanvas .nav-link:hover,
    .offcanvas .nav-link:focus {
        color: var(--primary-color);
        background: #f8f9fa;
    }

    .offcanvas .nav.flex-column .nav.flex-column .nav-link {
        padding-left: 28px;
        font-size: 14px;
    }

    .offcanvas .nav.flex-column .nav.flex-column .nav.flex-column .nav-link {
        padding-left: 40px;
        font-size: 13px;
    }

    .offcanvas-header {
        background: var(--primary-color);
        color: #fff;
    }

    .offcanvas-title {
        color: #fff;
    }

    .offcanvas .btn-close {
        filter: brightness(0) invert(1);
    }
}

/* 小屏手机 (<576px) */
@media (max-width: 576px) {
    .carousel-item img {
        max-height: 180px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    header .container {
        padding: 5px 10px;
    }

    .gpnum {
        font-size: 11px !important;
    }

    .section-solutions [class*="col-lg"] {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }

    .section-software [class*="col-lg"] {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }

    .section-hardware [class*="col-lg"] {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }

    .section-cases .col-lg-3,
    .section-cases .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .product-list-page [class*="col-"] {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }

    .cases-list [class*="col-"] {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }

    .list-group-item img {
        width: 60px !important;
        height: 45px !important;
    }

    .offcanvas {
        width: 260px !important;
    }

    .footer .container > .row:first-child > [class*="col-"] {
        width: 50%;
        flex: 0 0 50%;
        max-width: 50%;
    }
}
