/* =========================================
   1. 全局变量与基础设置
   ========================================= */
:root {
    --primary-blue: #00448a;   /* 统一使用宝石蓝 */
    --accent-yellow: #ff9900;  /* 活力橘黄 */
    --text-dark: #111111;      /* 加深主标题颜色，更显高级 */
    --bg-gray: #f7f8fa;        /* 高级灰背景 */
}

body {
    font-family: "Microsoft YaHei", -apple-system, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    padding-top: 0;
    background-color: #ffffff; /* 整体纯白底色 */
}

a { text-decoration: none; }
.text-justify { text-align: justify; text-justify: inter-ideograph; }

/* =========================================
   2. 导航栏 (Navbar)
   ========================================= */
.navbar {
    top: 0 !important; 
    margin-top: 0 !important;
    min-height: 80px; /* 【核心修复】：将死高度改为最小高度，允许手机端菜单撑开容器 */
    background-color: transparent !important; 
    transition: all 0.4s ease;
    box-shadow: none;
    z-index: 1030;
}

.navbar.scrolled {
    background-color: var(--primary-blue) !important; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.15) !important;
}

.navbar-brand { font-size: 1.2rem; }

.navbar .nav-link {
    font-size: 16px;
    margin: 0 12px; 
    color: #ffffff !important; 
    font-weight: 500;
    transition: color 0.3s;
}
.navbar .nav-link:hover, 
.navbar .nav-link.active { 
    color: var(--accent-yellow) !important; 
}

/* =========================================
   3. 全屏轮播图 & 顶部横幅
   ========================================= */
.carousel-item {
    height: 100vh;
    background-color: var(--primary-blue);
    position: relative;
}
.carousel-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 20, 50, 0.4); 
    z-index: 1;
}

.text-gradient-blue {
    background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.scroll-down-indicator {
    position: absolute;
    bottom: 30px;
    left: 5%;
    z-index: 10;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    text-align: center;
    transition: color 0.3s;
}
.scroll-down-indicator:hover { color: #fff; }
.scroll-down-indicator i {
    font-size: 1.8rem;
    display: inline-block;
    animation: bounce-vertical 2s infinite;
}
@keyframes bounce-vertical {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.category-hero {
    background-color: var(--primary-blue);
    padding: 140px 0 60px;
    color: white;
    text-align: center;
    margin-top: 0;
}

/* =========================================
   4. 核心产品类别 (过渡区卡片)
   ========================================= */
.core-card {
    background: #fff;
    border-radius: 12px;
    padding: 40px 35px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid #eaeaea; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
    height: 100%;
    position: relative;
    overflow: hidden;
}
.core-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    transform: translateY(-8px);
    border-color: transparent;
}
.core-icon {
    width: 50px;
    height: 50px;
    background-color: #f0f4fc;
    color: var(--primary-blue);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 25px;
    transition: all 0.3s;
}
.core-card:hover .core-icon {
    background-color: var(--primary-blue);
    color: #fff;
}
.core-card-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 15px;
}
.core-card-desc {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 15px;
}
.view-details {
    color: var(--accent-yellow);
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    opacity: 1;
    transition: opacity 0.2s ease;
    font-size: 0.95rem;
}
.core-card:hover .view-details {
    opacity: 0;
    position: absolute;
    visibility: hidden;
}
.expand-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.5s ease-in-out;
}
.core-card:hover .expand-content {
    max-height: 500px;
    opacity: 1;
    margin-top: 20px;
}
.expand-content h6 {
    font-weight: bold;
    color: #111;
    margin-bottom: 15px;
    font-size: 1.05rem;
}
.expand-content ul li {
    margin-bottom: 10px;
    color: #555;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    line-height: 1.6;
}
.expand-content ul li i {
    color: var(--primary-blue);
    margin-right: 8px;
    margin-top: 3px;
    font-size: 0.9rem;
}
.view-all-btn {
    color: var(--primary-blue);
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
    font-size: 0.95rem;
    transition: color 0.2s;
}
.view-all-btn:hover { color: var(--accent-yellow); }

/* =========================================
   5. 产品详细列表展示 (侧边栏 & 产品卡片)
   ========================================= */
.section-padding { padding: 80px 0; }
.sidebar-sticky { position: sticky; top: 100px; z-index: 1020; }

.vertical-tabs .nav-link,
.custom-v-nav .nav-link {
    text-align: left;
    padding: 10px 20px;
    margin-bottom: 8px;
    color: #555 !important;
    border: 1px solid #eee !important;
    border-radius: 6px !important;
    background-color: #f8f9fa !important;
    font-weight: bold;
    font-size: 0.95rem;
    line-height: 1.4;
    white-space: normal;
    min-height: 54px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}
.vertical-tabs .nav-link:hover,
.custom-v-nav .nav-link:hover {
    background-color: #e9ecef !important;
    color: var(--primary-blue) !important;
    transform: translateX(5px);
}
.vertical-tabs .nav-link.active,
.custom-v-nav .nav-link.active {
    background-color: var(--primary-blue) !important;
    color: #fff !important;
    border-color: var(--primary-blue) !important;
    box-shadow: 0 4px 10px rgba(0, 68, 138, 0.2);
}

.sidebar-contact-box {
    background-color: #f4f6f9;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
    border: 1px solid #eaeaea;
}
.sidebar-contact-box h6 {
    font-weight: bold;
    color: var(--primary-blue);
    font-size: 0.95rem;
}
.sidebar-contact-box p {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}
.sidebar-contact-box .btn {
    background-color: var(--accent-yellow);
    color: #fff;
    width: 100%;
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 4px;
}
.sidebar-contact-box .btn:hover { background-color: #e68a00; }

.tab-pane { animation: fadeIn 0.5s ease-out; }

.ref-product-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 20px 20px 15px 20px;
}
.ref-product-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    transform: translateY(-5px);
    border-color: #e2e8f0;
}
.ref-img-wrap {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}
.ref-img-wrap img {
    max-width: 90%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}
.ref-product-card:hover .ref-img-wrap img { transform: scale(1.05); }
.ref-card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.ref-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}
.ref-title {
    font-size: 1.05rem;
    font-weight: bold;
    color: #111;
    margin: 0;
    line-height: 1.4;
}
.ref-badge {
    background: #eef2fb;
    color: var(--primary-blue);
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
    white-space: nowrap;
    margin-left: 10px;
}
.ref-desc {
    font-size: 0.85rem;
    color: #777;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ref-card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed #eee;
    padding-top: 12px;
}
.ref-link {
    color: #555;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.3s;
}
.ref-product-card:hover .ref-link { color: var(--primary-blue); }
.ref-icon-btn {
    color: #ccc;
    font-size: 1.1rem;
    transition: color 0.3s;
}
.ref-product-card:hover .ref-icon-btn { color: #ff4d4f; }

.view-more-btn {
    display: inline-block;
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
    background: transparent;
    padding: 8px 30px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s;
}
.view-more-btn:hover {
    background: var(--primary-blue);
    color: #fff;
}

/* =========================================
   6. 子网页专属表格样式
   ========================================= */
.table-primary th {
    background-color: var(--primary-blue) !important;
    color: white !important;
    border-color: #003366 !important;
    text-align: center;
}
.table td { vertical-align: middle; }
.product-detail-img { max-height: 250px; object-fit: contain; }

/* =========================================
   7. 页脚
   ========================================= */
footer { background-color: #111; font-size: 0.9rem; }
footer h5 { border-left: 3px solid var(--accent-yellow); padding-left: 10px; font-weight: 600; }
footer a { color: rgba(255,255,255,0.6); transition: color 0.2s; }
footer a:hover { color: var(--accent-yellow); }

/* =========================================
   8. 移动端终极适配
   ========================================= */
@media (max-width: 991px) {
    /* 给导航栏底部留出间距 */
    .navbar { 
        background-color: var(--primary-blue) !important; 
        padding-bottom: 10px; 
    }
    
    /* 【核心修复】手机端下拉菜单：变为清晰的白色悬浮卡片 */
    .navbar-collapse {
        background-color: #ffffff;
        border-radius: 8px;
        margin-top: 10px;
        padding: 10px 0;
        box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    }

    /* 【核心修复】手机端菜单项：右对齐、深色文字、增加点击感 */
    .navbar-collapse .nav-link {
        color: #333333 !important;
        text-align: right !important; /* 强制右对齐 */
        padding: 12px 25px !important;
        border-bottom: 1px solid #f4f6f9;
        font-weight: bold;
    }

    /* 去掉最后一项的下划线 */
    .navbar-collapse .nav-link:last-child {
        border-bottom: none;
    }

    /* 悬停与选中时的底色 */
    .navbar-collapse .nav-link:hover, 
    .navbar-collapse .nav-link.active {
        color: var(--primary-blue) !important;
        background-color: #f7f8fa;
    }
}

@media (max-width: 767px) {
    .carousel-item { height: 70vh; }
    .display-3 { font-size: 2.2rem; }

    .sidebar-sticky {
        top: 80px !important; 
        background-color: #fff; 
        padding: 10px 0 5px 0;
        margin-bottom: 20px !important;
        border-bottom: 1px solid #eaeaea;
        z-index: 1020;
    }
    
    .vertical-tabs.flex-column,
    .custom-v-nav.flex-column {
        flex-direction: row !important;
        flex-wrap: nowrap;
        overflow-x: auto; 
        overflow-y: hidden;
    }
    .vertical-tabs .nav-link,
    .custom-v-nav .nav-link {
        white-space: nowrap; 
        margin-bottom: 5px;
        margin-right: 10px; 
        padding: 8px 18px;
        text-align: center;
        
        min-height: auto; 
        display: block; 
    }
}