@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap');

/* 公共基础样式（reset、头部/导航通用规则）保持原有视觉不变 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Noto Sans SC", "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Heiti SC", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 基础头部样式 */
header {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: #fff;
    border-bottom: none; /* 移除下边框 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Logo样式 */
.logo {
    font-size: 24px;
    font-weight: bold;
    color: #000;
    text-decoration: none;
    z-index: 1001;
    padding: 10px;
    min-height: 44px;
    display: flex;
    align-items: center;
}

/* 汉堡菜单样式 - PC端隐藏 */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
    position: relative;
}

.hamburger-line {
    display: none;
    width: 24px;
    height: 2px;
    background: #333;
    margin: 3px 0;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* 导航菜单样式 */
.nav {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 0;
    transition: all 0.3s ease;
}

.nav-link {
    text-decoration: none;
    color: #000;
    font-size: 16px;
    padding: 23px 36px; /* 保持与PC端一致 */
    border-radius: 0px;
    transition: all 0.2s ease;
    height: 68px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    box-sizing: border-box;
}

.nav-link:hover {
    background-color: #000;
    color: #fff;
}

/* 下拉菜单容器 */
.nav-item-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    height: 68px;
}

/* 下拉菜单 */
.dropdown-menu {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; /* 头部高度 */
    left: 0;
    min-width: 100%;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1100;
    padding: 0;
    
    /* 动画效果 */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

/* 支持 hover 或 active 类来显示菜单 */
.nav-item-dropdown:hover .dropdown-menu,
.nav-item-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-item-dropdown:hover .nav-link,
.nav-item-dropdown.active .nav-link {
    background-color: #000;
    color: #fff;
}

/* 下拉选项 */
.dropdown-item {
    display: block;
    padding: 20px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    text-align: center;
    white-space: nowrap;
    transition: all 0.2s;
    background-color: #fff;
    border-bottom: none;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: #000;
    color: #fff;
}

/* PC端响应式设计 (≥1024px) */
@media (min-width: 1024px) {
    header {
        padding: 0 20px;
        justify-content: space-between;
    }
    
    .logo {
        flex: 0 0 auto;
        order: 1;
    }
    
    .nav {
        flex: 1;
        display: flex !important;
        justify-content: center;
        gap: 0;
        order: 2;
    }
    
    .nav-link {
        font-size: 16px;
        padding: 23px 24px;
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* 确保汉堡菜单在PC端隐藏 */
    .hamburger {
        display: none !important;
        visibility: hidden !important;
    }
    
    .hamburger-line {
        display: none !important;
    }
    
    .language-selector {
        flex: 0 0 auto;
        order: 3;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* 内容与固定头部间距 */
main {
    padding-top: 68px;
}
/* 首页特殊：移除 main 顶部内边距，完全贴合导航 */
body.home main {
    padding-top: 0;
}
/* 导航栏底部无边距 */
header, .nav {
    margin-bottom: 0 !important;
}

/* 页面缩放检测 - 通过JavaScript控制 */
.scaled-view .hamburger {
    display: flex !important;
    visibility: visible !important;
    order: 1;
}

.scaled-view .hamburger-line {
    display: block !important;
}

.scaled-view .nav {
    display: none !important;
    position: fixed;
    top: 68px;
    left: 0;
    width: 100%;
    background: #fff;
    flex-direction: column;
    padding: 20px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 999;
}

.scaled-view .nav.active {
    display: flex !important;
}

.scaled-view .nav-link {
    width: 100%;
    text-align: center;
    padding: 15px 20px;
    border-bottom: none; /* 移除下边框 */
}

.scaled-view .logo {
    order: 2;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.scaled-view .language-selector {
    order: 3;
}

/* 平板端响应式设计 (768px - 1023px) */
@media (max-width: 1023px) {
    header {
        padding: 0 15px;
    }
    
    .nav {
        gap: 10px;
    }
    
    .nav-link {
        font-size: 15px;
        padding: 20px 24px;
    }
}



/* 超大屏幕优化 (≥1440px) */
@media (min-width: 1440px) {
    header {
        padding: 0 40px;
    }
    
    .nav-link {
        padding: 23px 40px;
        font-size: 17px;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .nav-link:hover {
        background-color: transparent;
        color: #000;
    }
    
    .nav-link:active {
        background-color: #000;
        color: #fff;
    }
}

/* 平滑过渡效果 */
header, .nav, .nav-link, .hamburger, .language-selector {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}



/* 平板端过渡优化 */
@media (min-width: 768px) and (max-width: 1023px) {
    .nav-link {
        transition: all 0.2s ease;
    }
}

/* 防止过渡期间的闪烁 */
.nav {
    will-change: transform, opacity;
}

.hamburger-line {
    will-change: transform;
}

/* 公司简介（totop-intro） */
.totop-intro {
    background: #FFFFFF;
    color: #000000;
    padding: 80px 0;
}

.intro-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.intro-text {
    flex: 1 1 80%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    margin-left: -8px;
}

.intro-text p {
    font-size: 18px;
    line-height: 1.9;
    color: #000000;
    margin: 0;
    text-indent: 2em;
}

.intro-media {
    flex: 0 0 40%;
    display: flex;
    justify-content: flex-start; /* 与下方 .container 左对齐 */
    align-items: center;
}

.intro-img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* 平板端（≤1023px）：保持左右布局但增大间距 */
@media (max-width: 1023px) {
    .intro-container { gap: 14px; }
    .intro-text p { font-size: 17px; }
    .intro-media { flex-basis: 40%; }
    .intro-text { flex-basis: 60%; }
}

/* 移动端（≤767px）：保持左右布局但缩小字号与间距 */
@media (max-width: 767px) {
    .totop-intro { padding: 48px 0; }
    .intro-container { flex-direction: row; gap: 12px; }
    .intro-text { flex: 1 1 60%; }
    .intro-media { flex: 0 0 40%; }
    .intro-text p { font-size: 16px; line-height: 1.8; text-indent: 1em; }
    .intro-text { margin-left: -6px; }
}

/* 小屏（≤480px）：改为上下布局，图片居中 */
@media (max-width: 480px) {
    .intro-container { flex-direction: column; gap: 16px; }
    .intro-media { width: 100%; max-width: 70%; }
    .intro-text p { text-indent: 0; }
}
