/* ===========================
   Reset & Base
   =========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
    font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #1A1A2E;
    background: #FFFFFF;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    -webkit-overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }

ul, ol { list-style: none; }

address { font-style: normal; }

/* iOS Safe Area Support */
@supports (padding: max(0px)) {
    .page-container {
        padding-left: max(48px, env(safe-area-inset-left));
        padding-right: max(48px, env(safe-area-inset-right));
    }
}

/* ===========================
   Layout
   =========================== */
.page-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 48px;
    overflow: visible;
}

@media (max-width: 1200px) {
    .page-container { padding: 0 32px; }
}

@media (max-width: 768px) {
    .page-container { padding: 0 20px; }
}

/* ===========================
   Colors / Tokens
   =========================== */
:root {
    --primary: #04326d;
    --primary-light: #0a4a94;
    --accent: #1a5ea8;
    --bg: #FFFFFF;
    --bg-light: #F5F7FA;
    --text: #1A1A2E;
    --text-secondary: #4A5568;
    --text-muted: #718096;
    --border: #E2E8F0;
    --white: #FFFFFF;
    --transition: 300ms ease-in-out;
}

/* Safari fallback for clamp() */
@supports not (font-size: clamp(1px, 1vw, 1px)) {
    .section-title { font-size: 36px; }
    .section-subtitle { font-size: 16px; }
}

/* IE11 fallback for CSS Variables */
@supports not (--css: variables) {
    .section-title { color: #1A1A2E; }
    .section-subtitle { color: #718096; }
    .btn-primary { background: #04326d; color: #fff; }
    .btn-outline { color: #04326d; border-color: #04326d; }
    .header.scrolled { background: #ffffff; }
    .footer { background: #0A1E36; }
}

/* Flexbox gap fallback for Safari < 14.1 */
@supports not (gap: 1px) {
    .nav-list > * + * { margin-left: 12px; }
    .header-actions > * + * { margin-left: 12px; }
    .mega-sub-items > * + * { margin-left: 16px; }
    .mega-product-items > * + * { margin-left: 24px; }
    .carousel-track > * + * { margin-left: 20px; }
    .products-carousel-nav > * + * { margin-left: 16px; }
    .carousel-dots > * + * { margin-left: 8px; }
    .footer-bottom-right > * + * { margin-left: 24px; }
    .intro-stats > * + * { margin-left: 32px; }
    .news-grid > * + * { margin-top: 28px; }
    .footer-main > * + * { margin-left: 48px; }
}

/* CSS Grid fallback for IE11 */
@supports not (display: grid) {
    .intro-layout { display: flex; flex-wrap: wrap; }
    .intro-left { flex: 0 0 40%; }
    .intro-right { flex: 0 0 60%; }
    .news-grid { display: flex; flex-wrap: wrap; }
    .news-card { flex: 0 0 calc(33.333% - 19px); }
    .footer-main { display: flex; flex-wrap: wrap; }
    .footer-brand-col { flex: 0 0 37.5%; }
    .footer-nav-col { flex: 0 0 20.833%; }
}

/* object-fit fallback for IE11 */
@supports not (object-fit: cover) {
    .product-card-right img,
    .carousel-img img,
    .news-img img,
    .hero-bg img,
    .page-banner-bg img,
    .parallax-bg img {
        width: 100%;
        height: 100%;
        object-position: center;
    }
}

/* aspect-ratio fallback for older browsers */
@supports not (aspect-ratio: 1) {
    .product-detail-image img {
        height: 0;
        padding-top: 75%; /* 4:3 aspect ratio */
    }
}

/* scroll-behavior fallback for Safari */
@supports not (scroll-behavior: smooth) {
    html { scroll-behavior: auto; }
}

/* Add -webkit- prefixes for critical properties */
.carousel-link:hover {
    -webkit-transform: translateY(-4px);
    transform: translateY(-4px);
}

.news-card:hover,
.news-card:active {
    -webkit-transform: translateY(-6px);
    transform: translateY(-6px);
    -webkit-box-shadow: 0 12px 40px rgba(4, 50, 109, 0.2);
    box-shadow: 0 12px 40px rgba(4, 50, 109, 0.2);
}

.back-to-top:hover {
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
}

.carousel-link:hover .carousel-img img {
    -webkit-transform: scale(1.05);
    transform: scale(1.05);
}

.news-card:hover .news-img img {
    -webkit-transform: scale(1.05);
    transform: scale(1.05);
}

/* Ensure consistent transform origins */
.carousel-link,
.news-card,
.back-to-top {
    -webkit-transform-origin: center center;
    transform-origin: center center;
}

/* Fix for Safari flexbox min-height issue */
@supports (-webkit-touch-callout: none) {
    .hero, .hero-inner {
        min-height: -webkit-fill-available;
    }
}

/* Fix for Firefox scrollbar width */
@-moz-document url-prefix() {
    .category-sidebar::-webkit-scrollbar {
        display: none;
    }
    .category-sidebar {
        scrollbar-width: none;
    }
}

/* Ensure consistent box-sizing */
*, *::before, *::after {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

/* Fix for Edge/Chrome rendering differences */
@supports (-ms-ime-align: auto) {
    .btn {
        -webkit-appearance: none;
        appearance: none;
    }
}

/* Fix for Safari rendering differences */
@supports (-webkit-hyphens: none) {
    .btn {
        -webkit-appearance: none;
        appearance: none;
        border-radius: 4px;
    }
}

/* Fix for Chrome/Safari font rendering differences */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* IE11 fallback for CSS Variables */
@supports not (--css: variables) {
    .section-title { color: #1A1A2E; }
    .section-subtitle { color: #718096; }
    .btn-primary { background: #04326d; color: #fff; }
    .btn-outline { color: #04326d; border-color: #04326d; }
}

/* ===========================
   Typography
   =========================== */
.section-title {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 400;
    line-height: 1.2;
    color: var(--text);
}

.section-subtitle {
    font-size: clamp(16px, 2vw, 18px);
    color: var(--text-muted);
    margin-top: 12px;
    max-width: 680px;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-header .section-subtitle {
    margin-left: auto;
    margin-right: auto;
}

.section-tag {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
    letter-spacing: 0.05em;
    padding: 6px 16px;
    background: rgba(4, 50, 109, 0.06);
    border-radius: 20px;
    margin-bottom: 16px;
}

.text-center { text-align: center; }

/* ===========================
   Buttons
   =========================== */
.btn {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    padding: 10px 48px;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    -webkit-transition: all var(--transition);
    transition: all var(--transition);
    white-space: nowrap;
    -webkit-appearance: none;
    appearance: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.btn-primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-white {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.4);
}
.btn-white:hover {
    background: var(--white);
    color: var(--primary);
    border-color: var(--white);
}

.btn-block { width: 100%; display: flex; }

.section-cta { margin-top: 48px; }

/* ===========================
   Header
   =========================== */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1003;
    height: 80px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    background: transparent;
    overflow: visible;
    -webkit-transition: background var(--transition), box-shadow var(--transition);
    transition: background var(--transition), box-shadow var(--transition);
}

/* Fix for iOS Safari z-index bug */
@media (-webkit-transform-3d) {
    .header {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

.header.scrolled {
    background: #ffffff;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    z-index: 1005;
}

.header.scrolled .nav-link {
    color: var(--text);
}

.header.scrolled .nav-link:hover,
.header.scrolled .nav-link.active {
    background: transparent;
    color: var(--primary);
    font-weight: 600;
}

.header.scrolled .btn-white {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.header.scrolled .btn-white:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    color: var(--white);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    position: relative;
    z-index: 2;
}

.nav {
    margin-left: auto;
}

.nav-list {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 12px;
    position: static;
}

@supports not (gap: 12px) {
    .nav-list > * + * {
        margin-left: 12px;
    }
}

.nav-link {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    padding: 8px 20px;
    font-size: 16px;
    color: var(--white);
    border-radius: 4px;
    -webkit-transition: color var(--transition), background var(--transition);
    transition: color var(--transition), background var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 12px;
}

.header-actions .nav-link-contact {
    display: inline-flex;
    padding: 8px 20px;
    font-size: 16px;
    color: var(--white);
    border-radius: 4px;
    transition: color var(--transition), background var(--transition);
    text-decoration: none;
}

.header-actions .nav-link-contact:hover {
    color: var(--white);
    font-weight: 600;
}

.header.scrolled .header-actions .nav-link-contact {
    color: var(--text);
}

.header.scrolled .header-actions .nav-link-contact:hover {
    color: var(--primary);
}

.logo {
    display: flex;
    align-items: center;
    height: 40px;
}

.logo-img {
    height: 100%;
    width: auto;
    filter: brightness(0) invert(1);
    transition: filter var(--transition);
}

.header.scrolled .logo-img {
    filter: none;
}

.nav {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    overflow: visible;
    position: relative;
    z-index: 1;
}

.nav-list {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 12px;
    position: static;
}

.nav-link {
    display: inline-flex;
    padding: 8px 20px;
    font-size: 16px;
    color: var(--white);
    border-radius: 4px;
    transition: color var(--transition), background var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
    font-weight: 600;
}

/* Dropdown */
.mega-trigger { position: relative; }

.mega-menu {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    -webkit-transform: translateY(12px);
    transform: translateY(12px);
    width: 100%;
    background: var(--white);
    border-radius: 0;
    -webkit-box-shadow: 0 12px 48px rgba(0,0,0,0.15);
    box-shadow: 0 12px 48px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    -webkit-transition: all var(--transition);
    transition: all var(--transition);
    z-index: 1001;
    pointer-events: none;
}

/* Bridge the gap between nav link and dropdown to prevent hover loss */
.mega-menu::before {
    content: '';
    position: absolute;
    top: -30px;
    left: 0;
    right: 0;
    height: 30px;
    background: transparent;
}

.mega-menu .mega-container {
    max-width: 1100px;
    display: flex;
    gap: 0;
    padding: 32px 48px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    justify-content: center;
}

.mega-trigger:hover .mega-menu,
.mega-trigger.open .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.mega-overlay {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    pointer-events: none;
}

body.mega-open .mega-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mega-container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 0;
    padding: 32px 48px;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
}

/* ===========================
   Mega Menu - About Dropdown
   =========================== */
.mega-about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    max-width: 800px;
    margin: 0 auto;
    padding: 8px 0;
}

.mega-about-item {
    display: block;
    padding: 32px 28px;
    background: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all var(--transition);
    text-decoration: none;
}

.mega-about-item:hover {
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(4, 50, 109, 0.08);
    transform: translateY(-2px);
}

.mega-about-item h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.4;
}

.mega-about-item p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Mobile Dropdown */
.mobile-dropdown {
    position: relative;
}

.mobile-dropdown-toggle {
    display: block;
    padding: 16px 20px;
    font-size: 16px;
    color: var(--text);
    cursor: pointer;
    position: relative;
    padding-right: 40px;
}

.mobile-dropdown-toggle::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-50%) rotate(45deg);
    transition: transform 0.2s;
}

.mobile-dropdown-toggle.open::after {
    transform: translateY(-50%) rotate(-135deg);
}

.mobile-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0, 0, 0, 0.03);
}

.mobile-dropdown-menu.open {
    max-height: 200px;
}

.mobile-dropdown-menu .mobile-nav-link {
    padding-left: 40px;
    font-size: 14px;
}

/* ===========================
   Mega Menu - Product Tabs Layout
   =========================== */
.mega-products-container {
    display: flex;
    gap: 0;
    padding: 0;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 420px;
}

/* Left: Category Tabs */
.mega-product-tabs {
    width: 180px;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    padding: 16px 0;
}

.mega-tab-btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-left: 3px solid transparent;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    white-space: nowrap;
}

.mega-tab-btn:hover {
    color: var(--primary);
    background: rgba(4, 50, 109, 0.04);
}

.mega-tab-btn.active {
    color: var(--primary);
    font-weight: 600;
    background: #fff;
    border-left-color: var(--primary);
}

/* Right: Content Area */
.mega-product-content {
    flex: 1;
    padding: 24px 32px;
    overflow-y: auto;
    max-height: 500px;
}

.mega-tab-panel {
    display: none;
}

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

.mega-sub-group {
    margin-bottom: 16px;
}

.mega-sub-group:last-child {
    margin-bottom: 0;
}

.mega-sub-title {
    font-size: 14px;
    font-weight: 600;
    color: #c53030;
    margin-bottom: 8px;
    padding-left: 10px;
    border-left: 3px solid #c53030;
}

.mega-sub-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    padding-left: 14px;
}

.mega-sub-item {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 4px 0;
    transition: color 0.2s;
    white-space: nowrap;
}

.mega-sub-item:hover {
    color: var(--primary);
}

/* ===========================
   Product Center Layout
   =========================== */
.product-category-section {
    padding: 60px 0;
}
.product-category-layout {
    display: flex;
    gap: 0;
    align-items: flex-start;
    position: relative;
}
.category-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: relative;
}
.category-content {
    flex: 1;
    min-width: 0;
    padding-left: 40px;
}
.product-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}
.product-list-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}
.product-list-count {
    font-size: 14px;
    color: var(--text-muted);
}

/* 一级分类 */
.cat-level-1 {
    position: relative;
}
.cat-level-1-header {
    display: flex;
    align-items: center;
}
.cat-level-1-link {
    display: block;
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}
.cat-level-1-link:hover,
.cat-level-1-link.active {
    background: var(--primary);
    color: var(--white);
}

/* 二级分类面板 - 从右侧展开 */
.cat-level-2-list {
    position: absolute;
    left: 100%;
    top: 0;
    width: 260px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.25s ease;
    z-index: 100;
}
.cat-level-1:hover .cat-level-2-list,
.cat-level-2-list.open {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.view-all-link {
    display: block;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    border-radius: 6px;
    margin-bottom: 8px;
}
.view-all-link:hover {
    background: rgba(4, 50, 109, 0.06);
}

/* 二级分类项 */
.cat-level-2-item {
    margin-bottom: 4px;
}
.cat-level-2-header {
    display: flex;
    align-items: center;
}
.cat-level-2-link {
    display: block;
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    color: #e60012;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}
.cat-level-2-link:hover {
    background: rgba(220, 38, 38, 0.08);
}

/* 三级分类列表 */
.cat-level-3-list {
    padding-left: 12px;
    margin-top: 4px;
}
.cat-level-3-item a {
    display: block;
    padding: 6px 12px;
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}
.cat-level-3-item a:hover {
    color: var(--primary);
    background: rgba(4, 50, 109, 0.06);
}
.category-content {
    width: 100%;
}
.product-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}
.product-list-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}
.product-list-count {
    font-size: 14px;
    color: var(--text-muted);
}
.product-grid-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
@media (max-width: 1024px) {
    .product-grid-list {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 640px) {
    .product-grid-list {
        grid-template-columns: 1fr;
    }
}
.product-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
.product-card-img {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #e8ecf2 0%, #d8dce5 100%);
}
.product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.product-card:hover .product-card-img img {
    transform: scale(1.05);
}
.product-card-body {
    padding: 20px;
}
.product-card-category {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    color: var(--primary);
    background: rgba(4, 50, 109, 0.08);
    padding: 3px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}
.product-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 8px;
    line-height: 1.4;
}
.product-card-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    transition: gap 0.2s ease;
}
.product-card-link:hover {
    gap: 10px;
}

/* Hide sidebar when empty */
.category-sidebar[style*="display: none"] + .category-content {
    grid-column: 1 / -1;
}

/* Old product grid styles (keep for backward compat) */
.mega-product-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

.mega-product-row {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.mega-product-row:first-child {
    padding-top: 0;
}

.mega-product-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.mega-product-cat {
    flex: 0 0 100px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    padding-right: 24px;
    line-height: 1.6;
}

.mega-product-items {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
}

.mega-product-item {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition);
    white-space: nowrap;
}

.mega-product-item:hover {
    color: var(--primary);
}

.mega-cols {
    flex: 0 0 auto;
    display: flex;
    gap: 100px;
    min-width: 0;
    justify-content: center;
}

.mega-col {
    flex: 0 0 auto;
    min-width: 160px;
    max-width: 200px;
}

.mega-col-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.mega-link {
    display: block;
    padding: 10px 0;
    font-size: 15px;
    color: var(--text-secondary);
    transition: color var(--transition), padding-left var(--transition);
}

.mega-link:hover {
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 1px;
    transition: all var(--transition);
}

/* ===========================
   Mobile Menu
   =========================== */
.mobile-menu {
    position: fixed;
    top: 80px; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, #04326d 0%, #0A1E36 100%);
    z-index: 1004;
    padding: 32px 20px;
    transform: translateX(100%);
    transition: transform var(--transition);
    pointer-events: none;
}

.mobile-menu.open {
    transform: translateX(0);
    pointer-events: auto;
}

.mobile-nav-list { display: flex; flex-direction: column; gap: 8px; }

.mobile-nav-link {
    display: block;
    padding: 16px 0;
    font-size: 18px;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.mobile-menu-cta { margin-top: auto; padding: 16px; }

@media (min-width: 1025px) {
    .mobile-menu { display: none; }
}

@media (max-width: 1024px) {
    .mega-menu { display: none !important; }
}

/* Mobile-specific fixes */
@media (max-width: 768px) {
    /* Fix iOS Safari 100vh issue */
    .hero, .hero-inner {
        min-height: -webkit-fill-available;
    }
    
    /* Improve touch targets */
    .nav-link, .mobile-nav-link {
        min-height: 44px;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
    }
    
    /* Fix for Safari flexbox gap */
    .nav-list,
    .header-actions,
    .mega-sub-items,
    .mega-product-items {
        gap: 8px;
    }
    
    @supports not (gap: 8px) {
        .nav-list > * + *,
        .header-actions > * + *,
        .mega-sub-items > * + *,
        .mega-product-items > * + * {
            margin-left: 8px;
        }
    }
    
    /* Prevent horizontal scroll on mobile */
    body {
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Fix for iOS input zoom */
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* Hamburger mobile styles */
@media (max-width: 1024px) {
    .hamburger {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
    }
    
    .nav {
        display: none;
    }
    
    .header-actions .nav-link-contact {
        display: none;
    }
}

/* ===========================
   Hero
   =========================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    background: linear-gradient(135deg, #0a4a94 0%, #04326d 40%, #1a5ea8 100%);
}

.hero-bg img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.hero-bg img[src=""], .hero-bg img:not([src]) {
    display: none;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(4, 50, 109, 0.85) 0%, rgba(10, 74, 148, 0.6) 50%, rgba(4, 50, 109, 0.8) 100%);
}

/* Hero Carousel */
.hero-carousel {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    background: linear-gradient(135deg, #0a4a94 0%, #04326d 40%, #1a5ea8 100%);
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    opacity: 0;
    -webkit-transition: opacity 1s ease-in-out;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.hero-carousel-dots {
    position: absolute;
    bottom: 100px;
    left: 50%;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 12px;
    z-index: 2;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.hero-dot:hover,
.hero-dot.active {
    background: rgba(255, 255, 255, 0.9);
    -webkit-transform: scale(1.2);
    transform: scale(1.2);
}

.hero-inner {
    position: relative;
    z-index: 1;
    height: 100vh;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    text-align: center;
}

.hero-content {
    color: var(--white);
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 60px;
    font-weight: 300;
    line-height: 1.5;
    letter-spacing: 0.04em;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 25px;
    line-height: 1.5;
    opacity: 0.85;
    margin-bottom: 48px;
}

.hero-arrow {
    position: absolute;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.5);
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* ===========================
   Products Center
   =========================== */
.products-center {
    padding: 100px 0;
    background: #F8F9FB;
}

.products-showcase {
    max-width: 1600px;
    margin: 0 auto;
}

.products-showcase-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.products-carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card-slide {
    min-width: 100%;
    display: flex;
    height: 500px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    overflow: hidden;
    box-sizing: border-box;
}

.product-card-left {
    flex: 1;
    padding: 48px 40px;
    background: linear-gradient(135deg, #04326d 0%, #0a4a8f 100%);
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-card-left .card-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    margin-bottom: 16px;
}

.product-card-left h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
    line-height: 1.3;
}

.product-card-left p {
    font-size: 15px;
    color: rgba(255,255,255,0.85);
    line-height: 1.7;
    margin-bottom: 24px;
}

.product-card-left .card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
    text-decoration: none;
    transition: gap 0.2s;
}

.product-card-left .card-link:hover {
    gap: 12px;
}

.product-card-right {
    flex: 1;
    position: relative;
    height: 100%;
    background: #f0f4f8;
}

.product-card-right img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
}

/* Carousel Controls */
.products-carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
}

.carousel-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.carousel-btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.carousel-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.carousel-dots {
    display: flex;
    gap: 8px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.carousel-dot.active {
    background: var(--primary);
    width: 24px;
    border-radius: 5px;
}

@media (max-width: 768px) {
    .product-card-slide {
        flex-direction: column;
    }
    .product-card-left {
        padding: 32px 24px;
    }
    .product-card-left h3 {
        font-size: 22px;
    }
    .product-card-right {
        min-height: 240px;
    }
}

/* ===========================
   Solutions Carousel
   =========================== */
.solutions-carousel {
    padding: 100px 0;
    background: var(--white);
}

.carousel-wrapper {
    position: relative;
    overflow: hidden;
}

.carousel-row {
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 500ms ease;
    will-change: transform;
}

.carousel-item {
    flex: 0 0 500px;
}

@media (max-width: 1200px) {
    .carousel-item { flex: 0 0 400px; }
}

@media (max-width: 768px) {
    .carousel-item { flex: 0 0 300px; }
    .carousel-track { gap: 14px; }
}

.carousel-link {
    display: block;
    position: relative;
    height: 320px;
    border-radius: 8px;
    overflow: hidden;
    -webkit-transition: -webkit-transform var(--transition);
    transition: -webkit-transform var(--transition);
    transition: transform var(--transition);
    transition: transform var(--transition), -webkit-transform var(--transition);
}

.carousel-link:hover { -webkit-transform: translateY(-4px); transform: translateY(-4px); }

.carousel-img {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, #1a5ea8 0%, #04326d 100%);
}

.carousel-img img {
    width: 100%; height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
    -webkit-transition: -webkit-transform 500ms ease;
    transition: -webkit-transform 500ms ease;
    transition: transform 500ms ease;
    transition: transform 500ms ease, -webkit-transform 500ms ease;
}

.carousel-img img[src=""], .carousel-img img:not([src]) {
    display: none;
}

.carousel-link:hover .carousel-img img {
    transform: scale(1.05);
}

.carousel-content {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: end;
    -ms-flex-pack: end;
    justify-content: flex-end;
    padding: 28px;
    background: linear-gradient(to top, rgba(4, 50, 109, 0.85) 0%, rgba(4, 50, 109, 0.2) 50%, transparent 100%);
    color: var(--white);
}

.carousel-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--white);
}

.carousel-desc {
    font-size: 14px;
    opacity: 0.85;
}

/* ===========================
   Company Intro
   =========================== */
.company-intro {
    padding: 100px 0;
    background: var(--bg);
}

.intro-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 80px;
    align-items: start;
}

.intro-left {
    position: relative;
}

.intro-title {
    font-size: clamp(36px, 4vw, 52px);
    font-weight: 300;
    line-height: 1.15;
    letter-spacing: 0.03em;
    color: var(--text);
    margin-bottom: 16px;
}

.intro-title-sub {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1.6;
}

.intro-text {
    font-size: 17px;
    line-height: 2;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.intro-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 40px;
    padding: 32px;
    background: var(--bg-light);
    border-radius: 8px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: clamp(36px, 4vw, 52px);
    font-weight: 700;
    color: var(--primary);
    line-height: 1.1;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
}

@media (max-width: 1024px) {
    .intro-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .intro-left { position: static; }
    .intro-stats { grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 20px; }
}

@media (max-width: 600px) {
    .intro-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}

/* ===========================
   Building Parallax
   =========================== */
.building-parallax {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: -200px; left: -200px; right: -200px; bottom: -200px;
    z-index: 0;
    will-change: transform;
    background: linear-gradient(135deg, #0a4a94 0%, #04326d 100%);
}

.parallax-bg img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.parallax-bg img[src=""], .parallax-bg img:not([src]) {
    display: none;
}

.building-parallax::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(4, 50, 109, 0.85) 0%, rgba(10, 74, 148, 0.6) 50%, rgba(4, 50, 109, 0.75) 100%);
    z-index: 1;
}

.parallax-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    max-width: 900px;
    padding: 0 40px;
}

.parallax-title {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 300;
    line-height: 1.2;
    letter-spacing: 0.04em;
    margin-bottom: 20px;
}

.parallax-subtitle {
    font-size: clamp(16px, 2vw, 20px);
    opacity: 0.85;
}

@media (max-width: 768px) {
    .building-parallax { height: 400px; }
    .parallax-title { font-size: 28px; margin-bottom: 12px; }
    .parallax-subtitle { font-size: 15px; }
}

/* ===========================
   News Section
   =========================== */
.news-section {
    padding: 140px 0;
    background: var(--bg-light);
    transition: background var(--transition);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.news-card {
    border-radius: 8px;
    overflow: hidden;
    background: var(--white);
    transition: all var(--transition);
    cursor: pointer;
}

.news-card:hover,
.news-card:active {
    background: var(--primary);
    color: var(--white);
    -webkit-transform: translateY(-6px);
    transform: translateY(-6px);
    -webkit-box-shadow: 0 12px 40px rgba(4, 50, 109, 0.2);
    box-shadow: 0 12px 40px rgba(4, 50, 109, 0.2);
}

.news-link {
    display: block;
    transition: color var(--transition);
}

.news-img {
    height: 320px;
    overflow: hidden;
    background: linear-gradient(135deg, #e8ecf2 0%, #d8dce5 100%);
}

.news-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 500ms ease;
}

.news-img img[src=""], .news-img img:not([src]) {
    display: none;
}

.news-card:hover .news-img img {
    transform: scale(1.05);
}

.news-content {
    padding: 32px;
}

.news-date {
    display: inline-block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
    transition: color var(--transition);
}

.news-card:hover .news-date {
    color: rgba(255,255,255,0.7);
}

.news-title {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 10px;
    transition: color var(--transition);
}

.news-card:hover .news-title {
    color: var(--white);
}

.news-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
    transition: color var(--transition);
}

.news-card:hover .news-excerpt {
    color: rgba(255,255,255,0.75);
}

@media (max-width: 1024px) {
    .news-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .news-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
}

/* ===========================
   Footer
   =========================== */
.footer {
    padding: 64px 0 0;
    background: linear-gradient(180deg, #0A1E36 0%, #061424 100%);
    color: rgba(255,255,255,0.6);
}

.footer-main {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
}

.footer-brand-col {
    padding-right: 24px;
}

.footer-logo-text {
    /* 隐藏原有文字 */
    color: transparent !important;
    font-size: 0 !important;
    text-indent: -9999px;
    overflow: hidden;
    
    /* 引入 Logo 图片 - 路径已修正（../ 代表返回上一级目录找到图片） */
    width: 260px;
    height: 72px;
    display: block;
    background: url('../images/47496dd6-f229-4ae5-97d3-1affa6585998.png') no-repeat left center;
    background-size: contain;
    
    /* 核心：反白色处理 */
    filter: brightness(0) invert(1);
    -webkit-filter: brightness(0) invert(1);
    margin-bottom: 16px;
}

.footer-desc {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255,255,255,0.45);
    margin-bottom: 24px;
    max-width: 320px;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: rgba(255,255,255,0.55);
}

.footer-contact-item svg {
    flex-shrink: 0;
    opacity: 0.5;
}

.footer-nav-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 20px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.footer-nav-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-nav-list a {
    font-size: 14px;
    color: rgba(255,255,255,0.45);
    transition: color 300ms ease, padding-left 300ms ease;
    display: inline-block;
}

.footer-nav-list a:hover {
    color: var(--white);
    padding-left: 4px;
}

.footer-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin-bottom: 24px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 24px 0;
    font-size: 13px;
    color: rgba(255,255,255,0.25);
}

.footer-bottom-right {
    display: flex;
    gap: 24px;
}

@media (max-width: 1024px) {
    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 36px;
    }
    .footer-brand-col {
        grid-column: 1 / -1;
        padding-right: 0;
    }
}

@media (max-width: 640px) {
    .footer {
        padding: 48px 0 0;
    }
    .footer-main {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .footer-bottom-right {
        flex-direction: column;
        gap: 4px;
    }
}

/* ===========================
   Page Banner (统一内页 Banner)
   =========================== */
.page-banner {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 0;
}

.page-banner-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    background: linear-gradient(135deg, #0a4a94 0%, #04326d 40%, #1a5ea8 100%);
}

.page-banner-bg img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.page-banner-bg img[src=""], .page-banner-bg img:not([src]) {
    display: none;
}

.page-banner-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(4, 50, 109, 0.9) 0%, rgba(10, 74, 148, 0.7) 50%, rgba(4, 50, 109, 0.85) 100%);
}

.page-banner-inner {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
    padding-top: 80px;
}

.page-banner-title {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 300;
    line-height: 1.3;
    letter-spacing: 0.04em;
    margin-bottom: 16px;
}

.page-banner-subtitle {
    font-size: clamp(16px, 2vw, 20px);
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto;
}

.page-banner-breadcrumb {
    margin-top: 24px;
    font-size: 14px;
    opacity: 0.6;
}

.page-banner-breadcrumb a:hover {
    opacity: 1;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .page-banner { min-height: 350px; align-items: flex-start; }
    .page-banner-inner { padding-top: 175px; }
}

/* ===========================
   Back to Top
   =========================== */
.back-to-top {
    position: fixed;
    bottom: 32px; right: 32px;
    width: 44px; height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(4, 50, 109, 0.3);
    z-index: 900;
    transition: all var(--transition);
}

.back-to-top:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.back-to-top:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.back-to-top[hidden] { display: none; }

/* ===========================
   Animations
   =========================== */
[data-animate] {
    opacity: 1;
    transition: opacity 500ms ease, transform 500ms ease;
}

[data-animate].animate-in {
    opacity: 1;
    transform: none !important;
}

[data-animate="fade-up"]    { transform: translateY(30px); }
[data-animate="slide-left"] { transform: translateX(-40px); }
[data-animate="slide-right"]{ transform: translateX(40px); }

@media (prefers-reduced-motion: reduce) {
    .hero-arrow { animation: none; }
    [data-animate] {
        opacity: 1;
        transform: none !important;
        transition: none;
    }
}

/* ===========================
   Image Fallback Backgrounds
   =========================== */
.mega-featured-img,
.mega-product-featured .mega-featured-img {
    background: linear-gradient(135deg, #e8ecf2 0%, #d8dce5 100%);
}

img[src=""], img:not([src]) {
    display: none;
}

/* Mega Menu Product Grouping - 3 Levels */
.mega-product-group {
    grid-column: 1 / -1;
    margin-top: 20px;
}
.mega-product-group:first-child {
    margin-top: 0;
}
.mega-product-group-title {
    font-size: 15px;
    font-weight: 700;
    color: #04326d;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e5ec;
    letter-spacing: 0.5px;
}

/* Hide mega menu right card */
.mega-product-featured {
    display: none !important;
}

/* ===========================
   Mobile Responsive (max-width: 768px)
   =========================== */
@media (max-width: 768px) {
    /* 1. 导航菜单 - 手机端优化 */
    .header {
        height: 64px;
    }
    .mega-menu {
        top: 64px;
    }
    .mobile-menu {
        top: 64px;
        padding: 24px 16px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .mobile-nav-link {
        padding: 14px 0;
        font-size: 16px;
    }
    .logo {
        height: 32px;
    }
    .hamburger {
        padding: 6px;
    }
    .hamburger span {
        width: 22px;
        height: 2px;
    }

    /* 2. 产品分类侧边栏 - 顶部横向滚动 */
    .product-sidebar,
    .category-sidebar,
    .sidebar {
        position: static;
        width: 100%;
        margin-bottom: 24px;
    }
    .category-list,
    .sidebar-menu,
    .product-category-list {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        gap: 8px;
        padding: 12px 0;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .category-list::-webkit-scrollbar,
    .sidebar-menu::-webkit-scrollbar,
    .product-category-list::-webkit-scrollbar {
        display: none;
    }
    .category-list li,
    .sidebar-menu li,
    .product-category-list li,
    .category-item,
    .sidebar-item,
    .product-category-item {
        flex: 0 0 auto;
        scroll-snap-align: start;
        white-space: nowrap;
    }
    .category-list a,
    .sidebar-menu a,
    .product-category-list a,
    .category-item a,
    .sidebar-item a,
    .product-category-item a {
        display: block;
        padding: 8px 16px;
        font-size: 14px;
        border-radius: 20px;
        background: var(--bg-light);
        border: 1px solid var(--border);
        transition: all var(--transition);
    }
    .category-list a.active,
    .sidebar-menu a.active,
    .product-category-list a.active,
    .category-item a.active,
    .sidebar-item a.active,
    .product-category-item a.active {
        background: var(--primary);
        color: var(--white);
        border-color: var(--primary);
    }

    /* 产品筛选折叠菜单备选方案 */
    .filter-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 12px 16px;
        font-size: 15px;
        font-weight: 500;
        background: var(--bg-light);
        border: 1px solid var(--border);
        border-radius: 4px;
        cursor: pointer;
    }
    .filter-toggle::after {
        content: '';
        width: 8px;
        height: 8px;
        border-right: 2px solid var(--text);
        border-bottom: 2px solid var(--text);
        transform: rotate(45deg);
        transition: transform var(--transition);
    }
    .filter-toggle.active::after {
        transform: rotate(-135deg);
    }
    .filter-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition);
    }
    .filter-content.open {
        max-height: 1000px;
    }

    /* 3. 产品列表网格 - 单列显示 */
    .product-grid,
    .products-grid,
    .product-list-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    .product-card,
    .product-item {
        flex-direction: column;
    }
    .product-card-image,
    .product-item-image {
        width: 100%;
        height: 220px;
    }
    .product-card-info,
    .product-item-info {
        padding: 20px;
    }
    .product-card-title,
    .product-item-title {
        font-size: 16px;
    }
    .product-card-desc,
    .product-item-desc {
        font-size: 14px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    /* 4. 产品详情页 - 垂直排列 */
    .product-detail,
    .product-detail-container {
        flex-direction: column !important;
    }
    .product-detail-image,
    .product-gallery {
        width: 100%;
        margin-bottom: 24px;
    }
    .product-detail-image img,
    .product-gallery img {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 3;
        object-fit: cover;
    }
    .product-detail-info,
    .product-info {
        width: 100%;
        padding: 0;
    }
    .product-detail-title,
    .product-title {
        font-size: 24px;
        margin-bottom: 16px;
    }
    .product-detail-meta,
    .product-meta {
        flex-direction: column;
        gap: 12px;
    }
    .product-detail-actions,
    .product-actions {
        flex-direction: column;
        gap: 12px;
    }
    .product-detail-actions .btn,
    .product-actions .btn {
        width: 100%;
    }
    .product-detail-tabs,
    .product-tabs {
        flex-direction: column;
        gap: 0;
    }
    .product-detail-tabs .tab-btn,
    .product-tabs .tab-btn {
        width: 100%;
        text-align: left;
        padding: 14px 16px;
        border-bottom: 1px solid var(--border);
    }
    .product-detail-content,
    .product-content {
        padding: 20px 0;
    }
    .product-specs-table,
    .specs-table {
        display: block;
        overflow-x: auto;
    }

    /* 5. 解决方案页面 - 卡片单列 */
    .solutions-grid,
    .solution-grid,
    .solutions-list {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    .solution-card,
    .solutions-card {
        flex-direction: column;
    }
    .solution-card-image,
    .solutions-card-image,
    .solution-image {
        width: 100%;
        height: 200px;
    }
    .solution-card-content,
    .solutions-card-content,
    .solution-content {
        padding: 24px;
    }
    .solution-card-title,
    .solutions-card-title,
    .solution-title {
        font-size: 18px;
    }
    .solution-card-desc,
    .solutions-card-desc,
    .solution-desc {
        font-size: 14px;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
    .solution-card-link,
    .solutions-card-link,
    .solution-link {
        width: 100%;
        justify-content: center;
    }

    /* 轮播项移动端优化 */
    .carousel-item {
        flex: 0 0 calc(100vw - 40px);
    }
    .carousel-link {
        height: 260px;
    }
    .carousel-content {
        padding: 20px;
    }
    .carousel-title {
        font-size: 18px;
    }
    .carousel-desc {
        font-size: 13px;
    }

    /* 6. 服务与支持页面 - 卡片单列 */
    .services-grid,
    .service-grid,
    .support-grid,
    .support-list {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    .service-card,
    .services-card,
    .support-card {
        flex-direction: column;
    }
    .service-card-icon,
    .services-card-icon,
    .service-icon {
        width: 56px;
        height: 56px;
        margin-bottom: 16px;
    }
    .service-card-icon svg,
    .services-card-icon svg,
    .service-icon svg {
        width: 28px;
        height: 28px;
    }
    .service-card-content,
    .services-card-content,
    .support-card-content {
        padding: 20px;
    }
    .service-card-title,
    .services-card-title,
    .support-card-title {
        font-size: 18px;
        margin-bottom: 10px;
    }
    .service-card-desc,
    .services-card-desc,
    .support-card-desc {
        font-size: 14px;
    }
    .service-card-link,
    .services-card-link,
    .support-card-link {
        width: 100%;
        justify-content: center;
    }

    /* FAQ 手风琴移动端优化 */
    .faq-list,
    .faq-group {
        gap: 12px;
    }
    .faq-item,
    .faq-question {
        padding: 16px;
    }
    .faq-question {
        font-size: 15px;
        line-height: 1.5;
    }
    .faq-answer {
        padding: 0 16px 16px;
        font-size: 14px;
    }

    /* 7. 页脚 - 已在原有媒体查询中处理，补充优化 */
    .footer-main {
        gap: 28px;
    }
    .footer-logo-text {
        width: 150px;
        height: 42px;
    }
    .footer-desc {
        font-size: 13px;
        max-width: 100%;
    }
    .footer-contact-item {
        font-size: 13px;
    }
    .footer-nav-title {
        font-size: 13px;
        margin-bottom: 14px;
    }
    .footer-nav-list a {
        font-size: 13px;
    }
    .footer-bottom {
        padding: 20px 0;
        font-size: 12px;
    }

    /* 8. 其他通用样式优化 */
    
    /* 页面标题区 */
    .page-banner {
        min-height: 350px;
        align-items: center;
    }
    .page-container.page-banner-inner {
        padding: 0 20px;
    }
    .page-banner-title {
        font-size: 28px;
        line-height: 1.35;
        word-break: keep-all;
    }
    .page-banner-subtitle {
        font-size: 15px;
        line-height: 1.6;
        word-break: keep-all;
    }
    .page-banner-breadcrumb {
        font-size: 13px;
    }

    /* 区块间距 */
    .products-center,
    .solutions-carousel,
    .company-intro,
    .news-section {
        padding: 60px 0;
    }
    .section-header {
        margin-bottom: 36px;
    }

    /* Hero 区域 */
    .hero {
        min-height: 100vh;
        min-height: -webkit-fill-available;
        align-items: center;
    }
    .hero-inner {
        height: auto;
        min-height: 100vh;
        min-height: -webkit-fill-available;
        padding: 100px 20px;
        align-items: center;
    }
    .hero-content {
        max-width: 100%;
    }
    .hero-title {
        font-size: 32px;
        line-height: 1.4;
        word-break: keep-all;
    }
    .hero-subtitle {
        font-size: 16px;
        margin-bottom: 32px;
        word-break: keep-all;
    }
    .hero-arrow {
        bottom: 32px;
    }
    .btn {
        padding: 10px 32px;
        font-size: 14px;
    }

    /* 关于我们统计 */
    .intro-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        padding: 16px;
    }
    .stat-number {
        font-size: 28px;
    }
    .stat-label {
        font-size: 12px;
    }
    .intro-title {
        font-size: 28px;
    }
    .intro-text {
        font-size: 15px;
        line-height: 1.8;
    }

    /* 视差区域 */
    .building-parallax {
        height: 300px;
    }
    .parallax-content {
        padding: 0 20px;
    }
    .parallax-title {
        font-size: 24px;
    }
    .parallax-subtitle {
        font-size: 14px;
    }

    /* 新闻网格 */
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .news-img {
        height: 200px;
    }
    .news-content {
        padding: 20px;
    }
    .news-title {
        font-size: 16px;
    }
    .news-excerpt {
        font-size: 13px;
    }

    /* 产品展示轮播 */
    .product-card-slide {
        height: auto;
    }
    .product-card-left {
        padding: 24px 20px;
    }
    .product-card-left h3 {
        font-size: 20px;
    }
    .product-card-left p {
        font-size: 14px;
    }
    .product-card-right {
        min-height: 200px;
    }
    .carousel-btn {
        width: 38px;
        height: 38px;
    }

    /* 回到顶部按钮 */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }

    /* 表格响应式 */
    table,
    .table-responsive {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* 表单元素 */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    input[type="search"],
    textarea,
    select {
        font-size: 16px !important;
        padding: 12px;
    }

    /* 模态框/弹窗 */
    .modal,
    .dialog {
        width: calc(100% - 32px);
        max-width: 100%;
        margin: 16px;
    }
    .modal-content,
    .dialog-content {
        padding: 20px;
    }

    /* 标签/徽章 */
    .tag,
    .badge,
    .label {
        font-size: 12px;
        padding: 4px 10px;
    }

    /* 分页 */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    .pagination-item,
    .pagination-link {
        padding: 8px 12px;
        font-size: 14px;
    }

    /* 面包屑 */
    .breadcrumb {
        font-size: 13px;
        flex-wrap: wrap;
    }
    .breadcrumb-item {
        padding: 0 6px;
    }

    /* 搜索框 */
    .search-box,
    .search-form {
        flex-direction: column;
    }
    .search-input {
        width: 100%;
    }
    .search-btn {
        width: 100%;
    }

    /* 联系表单 */
    .contact-form,
    .form-group {
        gap: 16px;
    }
    .form-row {
        flex-direction: column;
        gap: 16px;
    }

    /* 合作伙伴/客户 Logo 网格 */
    .partners-grid,
    .clients-grid,
    .logos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .partner-item,
    .client-item,
    .logo-item {
        padding: 16px;
    }

    /* 团队成员 */
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .team-card {
        padding: 16px;
    }
    .team-avatar {
        width: 80px;
        height: 80px;
    }
    .team-name {
        font-size: 15px;
    }
    .team-role {
        font-size: 13px;
    }

    /* 时间线 */
    .timeline {
        padding-left: 24px;
    }
    .timeline-item {
        padding-left: 20px;
    }
    .timeline-date {
        font-size: 13px;
    }
    .timeline-content {
        font-size: 14px;
    }

    /* 认证/资质 */
    .certificates-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    /* 下载资源 */
    .downloads-list {
        flex-direction: column;
    }
    .download-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .download-btn {
        width: 100%;
        justify-content: center;
    }

    /* 地图容器 */
    .map-container {
        height: 260px;
    }

    /* 视频容器 */
    .video-container {
        position: relative;
        padding-bottom: 56.25%;
        height: 0;
        overflow: hidden;
    }
    .video-container iframe,
    .video-container video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

/* ===========================
   Mobile Responsive (max-width: 768px)
   =========================== */
@media (max-width: 768px) {
    /* 基础容器 */
    .page-container {
        padding: 0 20px;
    }
    
    /* 导航栏 */
    .header {
        height: 60px;
        background: transparent;
    }
    .header-container {
        padding: 0 20px;
    }
    .header.scrolled {
        background: #ffffff;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    .header.scrolled .nav-link {
        color: var(--text);
    }
    .header.scrolled .hamburger span {
        background: var(--primary);
    }
    .hamburger span {
        background: var(--white);
        transition: background 0.3s ease;
    }
    .logo-text {
        font-size: 16px;
    }
    .hamburger {
        width: 32px;
        height: 32px;
    }
    
    /* Hero 区域 */
    .hero {
        min-height: 80vh;
        padding: 60px 0;
        align-items: center;
    }
    .hero-inner {
        min-height: calc(80vh - 120px);
        align-items: center;
    }
    .hero-title {
        font-size: 28px;
        line-height: 1.3;
        margin-bottom: 16px;
        word-break: keep-all;
    }
    .hero-subtitle {
        font-size: 16px;
        line-height: 1.6;
        margin-bottom: 24px;
        word-break: keep-all;
    }
    .hero-cta {
        flex-direction: column;
        gap: 12px;
    }
    .hero-cta .btn {
        width: 100%;
        text-align: center;
    }
    
    /* 通用 Section */
    .section-title {
        font-size: 24px;
        margin-bottom: 12px;
    }
    .section-subtitle {
        font-size: 15px;
        margin-bottom: 32px;
    }
    
    /* 产品卡片 */
    .product-card {
        margin-bottom: 16px;
    }
    .product-card-img {
        height: 200px;
    }
    .product-card-body {
        padding: 16px;
    }
    .product-card-category {
        display: inline-block;
        font-size: 12px;
        font-weight: 500;
        color: var(--primary);
        background: rgba(4, 50, 109, 0.08);
        padding: 3px 10px;
        border-radius: 4px;
        margin-bottom: 10px;
    }
    .product-card-title {
        font-size: 16px;
        margin-bottom: 8px;
    }
    .product-card-desc {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    /* 解决方案卡片 */
    .solution-card {
        margin-bottom: 16px;
    }
    .solution-card-img {
        height: 180px;
    }
    .solution-card-body {
        padding: 16px;
    }
    .solution-card-title {
        font-size: 16px;
    }
    
    /* 服务卡片 */
    .services-card {
        margin-bottom: 16px;
    }
    .services-card-content {
        padding: 20px;
    }
    
    /* 新闻卡片 */
    .news-img {
        height: 200px;
    }
    .news-content {
        padding: 20px;
    }
    .news-title {
        font-size: 16px;
    }
    
    /* 页脚 */
    .footer {
        padding: 24px 0 0;
    }
    .footer-main {
        grid-template-columns: 1fr;
        gap: 20px;
        padding-bottom: 20px;
    }
    .footer-brand-col {
        padding-right: 0;
    }
    .footer-logo-text {
        width: 120px;
        height: 35px;
        margin-bottom: 10px;
    }
    .footer-desc {
        max-width: 100%;
        font-size: 12px;
        line-height: 1.5;
        margin-bottom: 12px;
    }
    .footer-contact {
        gap: 6px;
    }
    .footer-contact-item {
        font-size: 12px;
        gap: 6px;
    }
    .footer-contact-item svg {
        width: 14px;
        height: 14px;
    }
    .footer-nav-col {
        display: flex;
        flex-wrap: wrap;
        gap: 16px;
        align-items: flex-start;
    }
    .footer-nav-title {
        font-size: 12px;
        margin-bottom: 6px;
        min-width: 100%;
    }
    .footer-nav-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px 16px;
    }
    .footer-nav-list a {
        font-size: 12px;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        padding: 16px 0;
    }
    .footer-bottom p {
        font-size: 11px;
        line-height: 1.4;
    }
    
    /* 回到顶部按钮 */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
    
    /* 分页 */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    .pagination-btn {
        min-width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    /* 面包屑 */
    .page-banner-breadcrumb {
        font-size: 13px;
        flex-wrap: wrap;
    }
    
    /* 表格横向滚动 */
    .product-specs-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    /* 表单元素防止 iOS 缩放 */
    input, select, textarea {
        font-size: 16px !important;
    }
    
    /* 合作伙伴、团队、证书网格 */
    .partners-grid,
    .clients-grid,
    .team-grid,
    .certificates-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    /* 视频容器 16:9 */
    .video-container {
        position: relative;
        padding-bottom: 56.25%;
        height: 0;
    }
    .video-container iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

/* 小屏幕额外优化 (max-width: 480px) */
@media (max-width: 480px) {
    .page-container {
        padding: 0 16px;
    }
    .hero-title {
        font-size: 24px;
    }
    .hero-subtitle {
        font-size: 14px;
    }
    .section-title {
        font-size: 22px;
    }
    .section-subtitle {
        font-size: 14px;
    }
    .page-banner-title {
        font-size: 22px;
    }
    .page-banner-subtitle {
        font-size: 14px;
    }
    .product-card-img {
        height: 180px;
    }
    .news-img {
        height: 160px;
    }
    .solution-card-img {
        height: 160px;
    }
    .footer {
        padding: 32px 0 0;
    }
    .footer-logo-text {
        width: 120px;
        height: 35px;
    }
    .back-to-top {
        bottom: 16px;
        right: 16px;
        width: 36px;
        height: 36px;
    }
    .partners-grid,
    .clients-grid,
    .team-grid,
    .certificates-grid {
        grid-template-columns: 1fr;
    }
}
