/* 导航栏默认状态：深蓝背景，白色字体，固定定位在页面顶部 */
body { padding-top: 60px; }
#flashs { margin-top: 0; }
.t_bg { background-image: none; background-color: rgb(0,0,40); position: fixed; top: 0; left: 0; width: 100%; z-index: 9999; box-shadow: 0 2px 5px rgba(0,0,0,0.3); transition: background-color 0.3s ease, box-shadow 0.3s ease; -webkit-transition: background-color 0.3s ease, box-shadow 0.3s ease; }
.t_bg:hover { background-color: rgb(0,0,40); box-shadow: 0 2px 5px rgba(0,0,0,0.3); }
.h_nav { background: transparent; display: flex; align-items: center; }
.nav-logo { display: block; padding-left: 20px; margin-right: 60px; }
.nav-logo img { height: 40px; display: block; }
.nav-en { font-size: 14px; color: rgb(255,255,255); padding-right: 20px; }
.nav-en:hover { color: rgb(0,255,180); text-decoration: none; }
.nav-tel { font-size: 14px; color: #00ffb4; padding-right: 20px; text-decoration: none; display: inline-block; animation: pulse 1.5s infinite; -webkit-animation: pulse 1.5s infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@-webkit-keyframes pulse { 0%, 100% { -webkit-transform: scale(1); } 50% { -webkit-transform: scale(1.1); } }
.h_nav > ul { display: flex; align-items: center; height: 100%; margin: 0; padding: 0; flex: 1; justify-content: center; }
.h_nav > ul > .nobor01 { margin-left: auto; }
.h_nav > ul > li { float: none; background: none; position: relative; height: 100%; display: flex; align-items: center; }
/* 去掉导航项中间的灰色分隔线 */
.h_nav > ul > li::after { display: none; }
.h_nav > ul > .nobor01::after { display: none; }
.h_nav ul li a { color: rgb(255,255,255); position: relative; }
.h_nav > ul > li > a:hover, .h_nav > ul > .cur > a { background: transparent; color: rgb(0,255,180); text-decoration: none; }

/* hover/当前项 青绿色短横线 */
.h_nav > ul > li > a::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    -webkit-transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: rgb(0,255,180);
    transition: width 0.3s;
    -webkit-transition: width 0.3s;
}
.h_nav > ul > li > a:hover::after, .h_nav > ul > .cur > a::after {
    width: 30px;
}

/* PC端隐藏二级菜单 */
.h_nav li .erj { display: none !important; }

/* 滚动后固定：保持深蓝背景 */
.t_bg.fixed {
    background-color: rgb(0,0,40);
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* 产品中心左侧菜单交互 */
.zx_con dl { cursor: pointer; }
.zx_con dl dt {
    transition: background-color 0.3s ease;
}
.zx_con dl:hover dt,
.zx_con dl.cur dt {
    background-color: rgb(209,255,242);
}
.zx_con dl:hover dt a,
.zx_con dl.cur dt a {
    color: rgb(0,0,40);
}

/* ========== Mobile Adaptation ========== */
@media (max-width: 768px) {
  body { padding-top: 50px; }
  .header { width: 100%; }
  .t_bg { height: 50px !important; background-color: rgb(0,0,40) !important; box-shadow: 0 2px 5px rgba(0,0,0,0.3) !important; }
  .h_nav { position: relative; justify-content: space-between; padding: 0 10px; height: 50px; }
  .nav-logo { padding-left: 0; margin-right: 0; }
  .nav-logo img { height: 34px; }
  .nav-tel { display: none; }
  .mob-nav-toggle { display: flex; flex-direction: column; justify-content: center; width: 36px; height: 36px; border: none; background: transparent; padding: 0; gap: 5px; z-index: 10001; }
  .mob-nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; transition: all 0.3s; margin: 0 auto; }
  .mob-nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .mob-nav-toggle.active span:nth-child(2) { opacity: 0; }
  .mob-nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
  .h_nav > ul { position: fixed; top: 50px; left: 0; width: 100%; height: auto; max-height: calc(100vh - 50px); background: rgb(0,0,40); flex-direction: column; justify-content: flex-start; padding: 10px 0; overflow-y: auto; display: none; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
  .h_nav > ul.open { display: flex; }
  .h_nav > ul > li { height: auto; width: 100%; display: block; border-bottom: 1px solid #fff; }
  .h_nav > ul > li::after { display: none; }
  .h_nav > ul > li { position: relative; }
  .h_nav > ul > li > a { display: block; padding: 12px 20px; font-size: 15px; color: #fff; line-height: 1.3; }
  .h_nav > ul > li > a:active, .h_nav > ul > li.cur > a { color: rgb(0,255,180); }
  .h_nav > ul > li > a::after { display: none; }
  /* 隐藏二级菜单箭头 */
  .h_nav > ul > li.has-submenu > .submenu-toggle { display: none !important; }
  /* 移动端隐藏二级菜单 */
  .h_nav li .erj { display: none !important; }
  .h_nav > ul > .nobor01 { margin-left: 0; }

  /* Banner - 移动端适配：高度固定，宽度截取，显示中间部分 */
  #flashs { 
    margin-top: 0 !important; 
    position: relative !important;
    height: 160px !important;
    overflow: hidden;
    width: 100%;
  }
  #flashs .bgitem { 
    position: absolute !important;
    top: 0;
    left: 100%;
    width: 100% !important;
    height: 160px !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    transition: left 0.5s ease;
    -webkit-transition: left 0.5s ease;
  }
  #flashs .bgitem:first-child {
    left: 0;
  }
  /* 移动端隐藏轮播指示器，使用左右滑动翻页 */
  #flashs .btn { display: none !important; }

  /* Search - 搜索框在上，热门在下，都居中 */
  .s_bg { 
    height: auto; 
    padding: 5px 10px;
  }
  .h_ser { 
    width: 100%; 
    padding: 0; 
    box-sizing: border-box; 
    display: flex; 
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  .h_ser > p { display: none; }
  .h_ser .s_inp { 
    float: none; 
    display: flex; 
    width: 100%; 
    max-width: 350px;
    justify-content: center;
    order: 1;
  }
  .h_ser .s_inp .inp01 { 
    flex: 1; 
    width: 100%;
    height: 30px;
    line-height: 32px;
    padding: 0 10px;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 0;
    background: #fff;
  }
  .h_ser .s_inp input[type="image"] {
    height: 32px;
    width: auto;
    display: block;
    vertical-align: middle;
  }
  .h_ser::before { 
    content: '热门搜索：lem传感器 / 宏发继电器 / 高压熔断器 / 晶圆电阻 / lem电子'; 
    font-size: 11px; 
    color: rgb(0,0,40); 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    display: block;
    text-align: center;
    order: 2;
  }

  /* Modules common */
  .content { width: 100%; padding: 0 10px; box-sizing: border-box; }
  .zx_bt, .yc_top, .cl_top, .hz_top { padding: 30px 0 15px !important; font-size: 22px; color: rgb(0,0,40) !important; }
  .zx_bt small, .yc_top small, .cl_top small, .hz_top small { font-size: 12px; margin-top: 4px; color: rgb(0,0,40) !important; }
  .yc_top img { display: none; }

  /* Product Center - 移动端新样式 */
  .zx_bg { height: auto; padding-bottom: 20px; }
  .zx_bg .content { display: flex; flex-direction: column; }
  
  /* 移动端产品模块显示控制 */
  .mob-product-section { display: block; }
  .zx, .rx { display: none !important; }
  
  /* 一级分类标题条 */
  .mob-cat-title {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 12px 15px;
    background: transparent;
    color: rgb(0,0,40);
    font-size: 15px;
    font-weight: bold;
    text-align: left;
    box-sizing: border-box;
    margin-top: 10px;
  }
  
  /* 二级分类按钮 - 一行三个 */
  .mob-subcat-btns {
    display: flex;
    flex-wrap: wrap;
    padding: 10px 0;
  }
  .mob-subcat-btn {
    width: calc(33.333% - 6px);
    margin-right: 9px;
    margin-bottom: 8px;
    padding: 8px 4px;
    background: #fff;
    border: 1px solid rgb(0,0,40);
    border-radius: 4px;
    text-align: center;
    font-size: 12px;
    color: rgb(0,0,40);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
  }
  .mob-subcat-btn:nth-child(3n) {
    margin-right: 0;
  }
  .mob-subcat-btn.active,
  .mob-subcat-btn:hover {
    background: rgb(209,255,242);
    color: rgb(0,0,40);
    border-color: rgb(0,0,40);
  }
  
  /* 产品列表 - 一行三个 */
  .mob-prod-list {
    display: none;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
  }
  .mob-prod-list.active {
    display: flex;
  }
  .mob-prod-item {
    flex: 0 0 calc(33.333% - 7px);
    text-align: center;
  }
  .mob-prod-item img {
    width: 100%;
    height: auto;
    max-height: 80px;
    object-fit: contain;
  }
  .mob-prod-item span {
    display: block;
    font-size: 11px;
    color: rgb(0,0,40);
    margin-top: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  /* 查看更多按钮 */
  .mob-view-more {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    background: transparent;
    border: 1px solid rgb(0,0,40);
    text-align: center;
    font-size: 14px;
    color: rgb(0,0,40);
    display: block;
    text-decoration: none;
    box-sizing: border-box;
  }
  
  /* 隐藏原有产品模块 */
  .rx { display: none; }
  
  /* 隐藏咨询模块 */
  .pic01 { display: none !important; }
  
  /* 隐藏优势模块 */
  .cl_bg { display: none !important; }

  /* Solutions - swipe */
  .yc_bg { height: auto; padding-bottom: 20px; }
  .yc_top ul { padding: 10px 0 0; display: flex; justify-content: center; gap: 8px; margin: 0 auto; width: 100%; }
  .yc_top ul li { float: none; padding: 0; }
  .yc_top ul li a { width: auto; padding: 6px 12px; height: auto; line-height: 1.2; font-size: 12px; }
  .yc_qh { display: none; height: auto; }
  .yc_qh.active { display: block; }
  .yc_con img, .hf_con img, .sc_con img, .rd_con img { width: 100%; height: auto; max-height: 220px; object-fit: cover; }
  
  /* 移动端解决方案分类按钮样式 - 一行三个 */
  .yc_top ul { padding: 10px 0; display: flex; flex-wrap: wrap; justify-content: space-between; }
  .yc_top ul li { width: calc(33.333% - 8px); margin-bottom: 8px; }
  .yc_top ul li:nth-child(3n+1) { margin-left: 0; }
  .yc_top ul li:nth-child(3n) { margin-right: 0; }
  .yc_top ul li a { display: block; width: 100%; padding: 8px 2px; font-size: 11px; text-align: center; border: 1px solid rgb(0,0,40); border-radius: 4px; color: rgb(0,0,40); background: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
  .yc_top ul li.cur a { background: rgb(209,255,242); color: rgb(0,0,40); }
  .yc_top ul li { cursor: pointer; }

  /* About us */
  .zj_bg { padding: 20px 0; }
  .about-wrap { display: flex; flex-direction: column; }
  /* 标题放最上面居中 */
  .about-header { 
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 10px;
    order: 1;
  }
  .about-title { 
    font-size: 20px; 
    text-align: center;
    width: 100%;
    order: -1;
  }
  .about-title small { font-size: 12px; display: block; margin-top: 5px; }
  /* logo靠左，在标题下一行 */
  .about-logo { 
    height: 40px; 
    display: block;
    margin: 10px 0;
  }
  .about-right { 
    width: 100%; 
    padding: 0; 
    float: none; 
    order: 2; 
  }
  .about-desc { 
    font-size: 13px; 
    line-height: 1.8; 
    margin-bottom: 15px; 
  }
  .about-btn { 
    padding: 8px 24px; 
    font-size: 13px; 
  }
  .about-left { width: 100%; float: none; order: 3; margin-top: 15px; }
  .about-left img { width: 100%; height: auto; }

  /* Advantages - 6 rows */
  .cl_bg { height: auto; padding-bottom: 30px; }
  .cl_con { height: auto; position: static; width: 100%; display: flex; flex-direction: column; gap: 12px; }
  .cl_item { position: static; flex-direction: row !important; justify-content: flex-start; background: rgba(255,255,255,0.1); border-radius: 6px; padding: 12px; }
  .cl_item a { width: 50px; height: 50px; font-size: 12px; line-height: 1.2; }
  .cl_item span { font-size: 14px; text-align: left !important; padding: 0 0 0 12px !important; white-space: normal; text-decoration: none; font-style: normal; }
  .cl_left, .cl_right { right: auto; left: auto; top: auto; }

  /* Partners - 一行两个，竖排 */
  .hz_bg { width: 100%; margin-bottom: 20px; padding-top: 10px; }
  .hz_con { width: 100% !important; padding: 0 10px; box-sizing: border-box; display: block !important; }
  .hz_con ul { display: flex !important; flex-wrap: wrap !important; justify-content: space-between !important; width: 100% !important; position: static !important; margin: 0 !important; padding: 0 !important; }
  .hz_con ul li { width: calc(50% - 5px) !important; margin: 0 0 10px !important; background: #f5f5f5 !important; float: none !important; display: block !important; margin-left: 0 !important; }
  .hz_con ul li img { width: 100% !important; height: auto !important; padding: 10px !important; box-sizing: border-box !important; }
  .hz_con ul li span { display: none !important; }

  /* Tech Center - 图片左，文字右，只显示前三个 */
  .dt_bg { height: auto; padding: 20px 0 30px; }
  .dt_bg .content { display: flex; flex-direction: column; }
  .dt, .wd { width: 100%; float: none; border: none; margin: 0; padding: 0; height: auto; overflow: hidden; }
  .dt_top, .wd_top { 
    height: auto; 
    margin-bottom: 10px; 
    padding-bottom: 10px;
    display: block;
  }
  .dt_con { 
    padding-top: 20px; 
    margin-top: 0;
    border-top: 1px solid #e0e0e0;
    clear: both;
  }
  .wd_con {
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
  }
  .dt_con dl, .dt_con > dl { 
    height: auto !important; 
    margin-bottom: 15px; 
    border-bottom: 1px solid #e0e0e0; 
    display: flex !important; 
    flex-direction: row !important;
    align-items: flex-start !important;
    width: 100% !important;
  }
  .dt_con dl.nobor { 
    height: auto !important; 
    display: flex !important; 
    flex-direction: row !important;
    align-items: flex-start !important;
    width: 100% !important;
    border: none !important;
  }
  .dt_con dl dt { 
    float: none !important; 
    width: 100px !important; 
    flex-shrink: 0;
    margin-right: 12px;
    text-align: left !important;
    line-height: normal !important;
    font-size: normal !important;
  }
  .dt_con dl dt img { 
    width: 100px; 
    height: 75px; 
    object-fit: cover;
  }
  .dt_con dl dd { 
    flex: 1;
    padding: 0 !important; 
    float: none; 
    margin: 0;
  }
  .dt_con dl dd span { height: auto; }
  .dt_con dl dd span a em { font-size: 14px; }
  .dt_con dl dd p { font-size: 13px; line-height: 1.6; margin: 5px 0 0; }
  /* 只显示前三个内容 */
  .dt_con dl:nth-child(n+4) { display: none; }
  .wd_con img { width: 100%; height: auto; margin-bottom: 15px; }
  .wd_con p { height: auto; border-bottom: 1px solid #e0e0e0; margin-bottom: 10px; padding-bottom: 10px; }
  .wd_con p:last-child { border: none; }

  /* Footer - 移动端新样式 - 使用高优先级选择器覆盖resetcommon.css */
  .f_bg { 
    padding: 20px 0 !important; 
    height: auto !important;
    background: url(../images/f_bg.jpg) no-repeat center center #333 !important;
    background-size: cover !important;
  }
  .footer { width: 100% !important; padding: 0 15px !important; box-sizing: border-box !important; }
  .f_main { 
    width: 100% !important; 
    margin: 0 !important; 
    padding: 0 !important; 
    overflow: visible !important;
    display: block !important;
  }
  /* 只隐藏网站导航和友情链接，其他内容正常显示 */
  .f_main .f_col { 
    display: block !important; 
    float: none !important;
    padding: 0 !important;
  }
  .f_main .f_col2, .f_main .f_col3 { display: none !important; }
  
  /* 第一行：logo水平居中，信息左对齐 */
  .f_main .f_col1 { 
    width: 100% !important; 
    margin-bottom: 15px !important;
  }
  .f_main .f_col1 .f_logo { 
    margin-bottom: 10px !important; 
    text-align: center !important;
  }
  .f_main .f_col1 .f_logo img { 
    height: 40px !important; 
  }
  .f_main .f_col1 .f_info {
    display: block !important;
    text-align: left !important;
    padding: 0 20px !important;
  }
  .f_main .f_col1 .f_info p { 
    font-size: 13px !important; 
    line-height: 1.8 !important; 
    margin: 2px 0 !important;
    color: #fff !important;
  }
  
  /* 分隔线样式 */
  .f_mob_line {
    height: 1px !important;
    background: #48494c !important;
    margin: 15px 0 !important;
    width: 100% !important;
    display: block !important;
    clear: both !important;
  }
  .footer .f_line { 
    display: none !important;
  }
  
  /* 第二行：左边二维码，右边热线和申请入口 */
  .f_main .f_col4 { 
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    margin: 15px 0 !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
    text-align: left !important;
  }
  .f_main .f_col4 .f_qr { 
    margin: 0 !important;
  }
  .f_main .f_col4 .f_qr img { 
    width: 100px !important; 
    height: auto !important;
    display: block !important;
  }
  .f_main .f_col4 .f_right {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }
  .f_main .f_col4 .f_hotline { 
    margin: 0 0 8px 0 !important;
    font-size: 14px !important;
  }
  .f_main .f_col4 .f_hotline a { 
    color: #fff !important; 
  }
  .f_main .f_col4 .f_apply { 
    font-size: 13px !important;
  }
  .f_main .f_col4 .f_apply a { 
    color: rgb(0,255,180) !important;
    text-decoration: underline !important;
  }
  .f_main .f_col4 .f_apply a:hover,
  .f_main .f_col4 .f_apply a:active { 
    color: rgb(0,255,180) !important;
  }
  
  /* 版权信息 - 分两行，水平居中 */
  .footer .f_copyright { 
    width: 100% !important;
    font-size: 12px !important; 
    text-align: center !important; 
    padding: 15px 0 0 0 !important;
    margin: 0 !important;
    color: #fff !important;
    display: block !important;
  }
  .footer .f_copyright p { 
    margin: 0 !important;
    line-height: 1.8 !important;
    color: #fff !important;
  }
  .footer .f_copyright a { 
    color: #fff !important; 
    display: block !important;
    margin-top: 5px !important;
  }
  .footer .f_copyright a:hover,
  .footer .f_copyright a:active { 
    color: rgb(0,255,180) !important; 
  }
  
  /* 隐藏旧的mob-footer-menu */
  .mob-footer-menu { display: none !important; }
  
  /* 移动端底部固定Tab栏 */
  .mob-bottom-tab {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgb(0,0,40);
    display: flex;
    flex-direction: row;
    z-index: 10000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
  }
  .mob-bottom-tab .tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    font-size: 12px;
  }
  .mob-bottom-tab .tab-item:active {
    background: rgba(255,255,255,0.1);
    color: rgb(0,255,180);
  }
  .mob-bottom-tab .tab-item:active .tab-icon {
    color: rgb(0,255,180);
  }
  .mob-bottom-tab .tab-icon {
    font-size: 20px;
    margin-bottom: 3px;
    line-height: 1;
    color: #fff;
  }
  .mob-bottom-tab .tab-text {
    line-height: 1;
  }
  /* 最后一个tab（电话）的图标强制白色 */
  .mob-bottom-tab .tab-item:last-child .tab-icon {
    color: #fff;
  }
  /* 为底部Tab栏留出空间 */
  .f_bg {
    padding-bottom: 80px !important;
  }
  
  /* 移动端右下角在线客服按钮 - 在底部Tab栏上方 */
  .online-service-btn {
    position: fixed;
    right: 15px;
    bottom: 75px;
    width: 50px;
    height: 50px;
    background: rgb(0,255,180);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 10001;
    transition: all 0.3s ease;
  }
  .online-service-btn:active {
    transform: scale(0.95);
  }
  .online-service-btn .service-icon {
    font-size: 24px;
    color: rgb(0,0,40);
  }
}
@media (min-width: 769px) {
  .mob-nav-toggle { display: none; }
  .mob-footer-menu { display: none; }
  .mob-product-section { display: none !important; }
  .mob-bottom-tab { display: none !important; }
  /* PC端footer样式 - 去掉黑色间隙 */
  .f_bg { padding-bottom: 0 !important; }
  
  /* PC端右下角在线客服按钮 */
  .online-service-btn {
    position: fixed;
    right: 30px;
    bottom: 100px;
    width: 60px;
    height: 60px;
    background: rgb(0,255,180);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 9999;
    transition: all 0.3s ease;
  }
  .online-service-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
  }
  .online-service-btn .service-icon {
    font-size: 28px;
    color: rgb(0,0,40);
  }
}
