/**
 * 子页面通用样式（合并版）
 * 包含：page基础、导航栏、Mega Menu、页脚、响应式
 * 适用于所有非首页的子页面
 */

/* ==================== 基础变量 ==================== */
:root {
    --tech-blue: #0063be;
    --dark-gray: #333333;
    --medium-gray: #666666;
    --light-gray: #F5F5F5;
    --white: #FFFFFF;
    --border-color: #e0e0e0;
}

/* ==================== 全局重置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==================== Body 基础 ==================== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: var(--dark-gray);
    line-height: 1.6;
}

/* ==================== Page Banner ==================== */
.page-banner {
    position: relative;
    width: 100%;
    height: 300px;
    background: url('pg_bg.jpg') center center / cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 70px;
}

.banner-content {
    position: relative;
    z-index: 2;
    text-align: left;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    animation: fadeIn 1s ease-out;
}

.banner-title {
    font-size: 3rem;
    font-weight: bold;
    color: white;
    margin-bottom: 0.5rem;
    letter-spacing: 4px;
}

.banner-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.3em;
    font-weight: 300;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== 面包屑导航 ==================== */
.breadcrumb-bar {
    background: var(--white);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0.9rem 0;
}

.breadcrumb-bar .section-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--medium-gray);
}

.breadcrumb-bar a {
    color: var(--medium-gray);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-bar a:hover {
    color: var(--tech-blue);
}

.breadcrumb-bar span {
    color: #ccc;
}

/* ==================== 内容区域 ==================== */
.section {
    padding: 5rem 0;
    width: 100%;
}

.section-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

/* ==================== 页签按钮 ==================== */
.tab-btn {
    padding: 1rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* ==================== 导航栏 - 子页面白色背景 ==================== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    height: 68px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

nav.hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

nav.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 100%;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo a:hover {
    opacity: 0.8;
}

.logo-img {      
    margin-top: 0px;
    width: 380px;
    object-fit: contain;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333333;
    letter-spacing: 1px;
    display: none;
}

.nav-links {
    display: flex;
    gap: 0;
    list-style: none;
    height: 100%;
}

.nav-links > li {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-links > li > a {
    color: #333333;
    text-decoration: none;
    font-size: 1rem;
    font-weight: normal;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links > li > a:hover {
    color: var(--tech-blue);
}

.nav-links > li > a.active {
    color: var(--tech-blue);
}

.nav-links > li > a.active::after {
    width: 80%;
    background: var(--tech-blue);
}

.nav-links > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--tech-blue);
    transition: width 0.3s ease;
}

.nav-links > li:hover > a::after {
    width: 80%;
}

/* 下拉菜单 */
.nav-links > li .dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    min-width: 220px;
    background: var(--white);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1.5rem 0;
    z-index: 1001;
    border-top: 3px solid var(--tech-blue);
}

.nav-links > li:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.8rem 2rem;
    color: var(--tech-blue);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

.dropdown-item:hover {
    background: rgba(0, 125, 255, 0.05);
    color: var(--tech-blue);
}

.dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: var(--tech-blue);
    transition: width 0.3s ease;
}

.dropdown-item:hover::before {
    width: 3px;
}

/* 导航栏右侧工具区 */
.nav-tools {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: 100%;
}

.nav-search {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
    position: relative;
}

.nav-search:hover {
    background: rgba(0, 125, 255, 0.1);
}

.nav-search i {
    font-size: 1.2rem;
    color: #333333;
    transition: color 0.3s ease;
}

.nav-search:hover i {
    color: var(--tech-blue);
}

/* 搜索框展开效果 */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 68px;
    background: var(--white);
    z-index: 1002;
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    padding: 0 5%;
}

.search-overlay.active {
    transform: translateY(0);
    opacity: 1;
}

.search-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    height: 50px;
    border: 2px solid rgba(0, 125, 255, 0.3);
    border-radius: 25px;
    padding: 0 2rem 0 3rem;
    font-size: 1rem;
    color: var(--dark-gray);
    background: rgba(0, 125, 255, 0.05);
    transition: all 0.3s ease;
    outline: none;
}

.search-input:focus {
    border-color: var(--tech-blue);
    background: var(--white);
    box-shadow: 0 0 20px rgba(0, 125, 255, 0.2);
}

.search-input::placeholder {
    color: var(--medium-gray);
}

.search-icon {
    position: absolute;
    left: 1rem;
    font-size: 1.2rem;
    color: var(--tech-blue);
}

.search-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
}

.search-close:hover {
    background: rgba(0, 125, 255, 0.1);
    transform: rotate(90deg);
}

.search-close i {
    font-size: 1.5rem;
    color: var(--dark-gray);
    transition: color 0.3s ease;
}

.search-close:hover i {
    color: var(--tech-blue);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    margin-top: 0.5rem;
    padding: 1rem 0;
    display: none;
    z-index: 1003;
}

.search-suggestions.active {
    display: block;
}

.search-suggestion-item {
    padding: 0.8rem 2rem;
    color: var(--dark-gray);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-suggestion-item:hover {
    background: rgba(0, 125, 255, 0.05);
    color: var(--tech-blue);
}

.search-suggestion-item i {
    font-size: 0.9rem;
    color: var(--medium-gray);
}

/* ==================== 移动端菜单 ==================== */
.mobile-menu-toggle {
    display: none;
    width: 24px;
    height: 24px;
    cursor: pointer;
    position: relative;
    right: -17px;
    z-index: 1002;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--dark-gray);
    border-radius: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
}

.mobile-menu-toggle span:nth-child(1) { top: 6px; }
.mobile-menu-toggle span:nth-child(2) { top: 12px; }
.mobile-menu-toggle span:nth-child(3) { top: 18px; }

.mobile-menu-toggle.active span:nth-child(1) {
    top: 12px;
    transform: rotate(45deg);
    background: var(--tech-blue);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.mobile-menu-toggle.active span:nth-child(3) {
    top: 12px;
    transform: rotate(-45deg);
    background: var(--tech-blue);
}

/* 移动端菜单面板 */
.mobile-nav-panel {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    z-index: 999;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-panel.active {
    transform: translateX(0);
}

.mobile-nav-content {
    padding: 2rem 5%;
}

.mobile-nav-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.mobile-nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
    color: var(--dark-gray);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.mobile-nav-link:hover {
    color: var(--tech-blue);
}

.mobile-nav-link.active {
    color: var(--tech-blue);
}

.mobile-nav-link i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.mobile-nav-item.active .mobile-nav-link i {
    transform: rotate(180deg);
}

.mobile-subnav {
    display: none;
    padding: 0 1rem 1rem;
    background: rgba(0, 125, 255, 0.02);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.mobile-nav-item.active .mobile-subnav {
    display: block;
}

.mobile-subnav-item {
    display: block;
    padding: 0.8rem 0;
    color: var(--medium-gray);
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-subnav-item:hover {
    color: var(--tech-blue);
    padding-left: 0.5rem;
}

/* ==================== Mega Menu 全屏下拉菜单 ==================== */
.mega-menu-overlay {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 8px 30px rgba(0, 99, 190, 0.15), 0 2px 8px rgba(0, 99, 190, 0.08);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
}

.mega-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu-container {
    max-width: 1400px;
    width: 100%;
    padding: 3rem 0px;
    display: none;
}

.mega-menu-container.active {
    display: flex;
}

/* 通用 Mega Menu 网格布局 */
.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    width: 100%;
}

.mega-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    background: white;
    box-shadow: 0 4px 16px rgba(0, 99, 190, 0.08);
}

.mega-menu-item:hover {
    background: rgba(0, 99, 190, 0.05);
    border-color: rgba(0, 99, 190, 1);
    transform: translateY(-4px);
}

.mega-menu-item .menu-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--tech-blue, #0063be), #4a9eff);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.mega-menu-item:hover .menu-icon {
    transform: scale(1.1);
}

.mega-menu-item .menu-icon i {
    font-size: 28px;
    color: white;
}

.mega-menu-item .menu-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-gray, #333333);
    margin-bottom: 0.5rem;
}

.mega-menu-item .menu-desc {
    font-size: 0.85rem;
    color: var(--medium-gray, #666666);
    line-height: 1.5;
}

/* 产品与方案的特殊布局 */
.product-mega-layout {
    display: flex;
    width: 100%;
    gap: 0;
    min-height: 350px;
}

.product-mega-tabs {
    width: 220px;
    flex-shrink: 0;
    background: var(--light-gray, #F5F5F5);
    border-radius: 8px 0 0 8px;
    overflow: hidden;
    padding: 0.5rem 0;
}

.product-mega-tab {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--dark-gray, #333333);
    font-size: 1rem;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.product-mega-tab i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.product-mega-tab:hover {
    background: rgba(0, 99, 190, 0.05);
}

.product-mega-tab.active {
    background: white;
    color: var(--tech-blue, #0063be);
    font-weight: 600;
    border-left-color: var(--tech-blue, #0063be);
}

.product-mega-panel {
    flex: 1;
    padding: 1.5rem 2rem;
    background: white;
    border-radius: 0 8px 8px 0;
    display: none;
}

.product-mega-panel.active {
    display: block;
}

.product-list-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.product-list-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 1px solid rgba(0, 99, 190, 0.15);
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 99, 190, 0.12);
    min-height: 120px;
}

.product-list-item:hover {
    background: rgba(0, 99, 190, 0.05);
    border-color: var(--tech-blue, #0063be);
    box-shadow: 0 8px 24px rgba(0, 99, 190, 0.2);
    transform: translateY(-2px);
}

.product-list-item .product-list-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: rgba(0, 99, 190, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.product-list-item .product-list-icon i {
    font-size: 20px;
    color: var(--tech-blue, #0063be);
}

.product-list-item .product-list-img {
    width: 144px;
    height: 144px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--light-gray, #F5F5F5);
}

.product-list-item .product-list-info h4 {
    font-size: 0.95rem;
    color: var(--dark-gray, #333333);
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.product-list-item .product-list-info p {
    font-size: 0.8rem;
    color: var(--medium-gray, #666666);
    line-height: 1.4;
}

.product-list-view-more {
    margin-top: 1.5rem;
    text-align: right;
}

.product-list-view-more a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--tech-blue, #0063be);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: gap 0.3s ease;
}

.product-list-view-more a:hover {
    gap: 0.8rem;
}

.product-list-view-more a i {
    font-size: 0.75rem;
}

/* ==================== 页脚 ==================== */
footer {
    background: var(--dark-gray);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 2rem 0;
}

.footer-content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

/* ==================== 移动端响应式 ==================== */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 5%;
    }
    .nav-links {
        display: none;
    }
    .mobile-menu-toggle {
        display: block;
    }
    .mobile-nav-panel {
        display: block;
    }
    .logo-img {      
        margin-top: 0px;
        width: 265px;  
        object-fit: contain;
    }

    .mega-menu-overlay {
        display: none !important;
    }

    .page-banner {
        height: 200px;
        margin-top: 60px;
    }

    .banner-title {
        font-size: 2rem;
        letter-spacing: 2px;
    }

    .banner-subtitle {
        font-size: 0.85rem;
    }

    .section {
        padding: 3rem 0;
    }

    .section-content {
        padding: 0 5%;
    }

    .detail-meta {
        display: none !important;
    }

    .breadcrumb-bar .section-content {
        font-size: 0.8rem;
        padding: 0 5%;
    }

    .banner-content {
        padding: 0 5%;
    }

    .tab-btn {
        padding: 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 1024px) {
    .mega-menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .product-list-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .page-banner {
        height: 160px;
        margin-top: 56px;
    }

    .banner-title {
        font-size: 1.6rem;
    }
}
