/* LJSAFE 主样式文件 - 统一CSS */

/* 移动端汉堡菜单按钮 */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: #333;
  cursor: pointer;
  padding: 10px;
  margin-left: 15px;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex !important;
    visibility: visible !important;
  }
}

/* 移动端导航覆盖层 */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

.mobile-nav-overlay.active {
  display: block;
}

/* 移动端导航菜单 */
.mobile-nav {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100vh;
  background: #fff;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 1000;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

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

.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  background: #ffffff !important;
}

.mobile-logo {
  height: 40px;
  width: auto;
}

.mobile-nav-menu {
  list-style: none;
  margin: 0;
  padding: 20px 0 60px 0;
  background: #ffffff !important;
  height: calc(100vh - 70px);
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

.mobile-nav-menu li {
  margin: 0;
  border-bottom: 1px solid #e8e8e8;
}

.mobile-nav-menu li:last-child {
  border-bottom: none;
}

.mobile-nav-link {
  display: block;
  padding: 15px 20px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 16px;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  background: #ffffff !important;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: #0066cc;
  background: rgba(0, 102, 204, 0.05) !important;
  border-left-color: #0066cc;
}

/* 移动端子菜单样式 */
.mobile-nav-item.has-children > .mobile-nav-link::after {
  content: "▼";
  float: right;
  font-size: 12px;
  transition: transform 0.3s ease;
  color: #999;
}

.mobile-nav-item.has-children.expanded > .mobile-nav-link::after {
  transform: rotate(180deg);
}

.mobile-sub-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #f8f9fa !important;
  display: none;
}

.mobile-nav-item.expanded .mobile-sub-menu {
  display: block;
}

.mobile-sub-link {
  display: block;
  padding: 12px 20px 12px 40px;
  text-decoration: none;
  color: #666;
  font-size: 14px;
  transition: all 0.3s ease;
  background: #f8f9fa !important;
}

.mobile-sub-link:hover {
  color: #0066cc;
  background: rgba(0, 102, 204, 0.05) !important;
}

/* 固定导航容器 */
.fixed-header-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(15px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid rgba(0, 102, 204, 0.1);
}

/* 一级导航样式 */
.primary-header {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-bottom: 1px solid rgba(0, 102, 204, 0.1);
  position: relative;
}

.primary-header .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.header-content .logo-section {
  flex: 0 0 auto;
}

.logo-section .logo-img {
  height: 45px;
  width: auto;
  transition: all 0.3s ease;
}

.logo-section:hover .logo-img {
  transform: scale(1.05);
}

.primary-nav .nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 30px;
}

.primary-nav .nav-link {
  text-decoration: none;
  color: #333;
  font-size: 16px;
  font-weight: 600;
  padding: 15px 20px;
  transition: all 0.3s ease;
  position: relative;
  border-radius: 8px;
  letter-spacing: 0.5px;
}

.primary-nav .nav-link:hover {
  color: #0066cc;
  background: rgba(0, 102, 204, 0.05);
  transform: translateY(-2px);
}

.primary-nav .nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
  box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

/* 语言切换器样式 */
.language-switcher {
  margin-left: 15px;
  white-space: nowrap;
}

.language-switcher .lang-btn {
  background: none;
  border: none;
  color: #333;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  margin: 0 2px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.language-switcher .lang-btn:hover {
  background: rgba(0, 102, 204, 0.1);
  color: #0066cc;
}

.language-switcher .lang-btn.active {
  background: #0066cc;
  color: #fff;
}

.header-right-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .primary-nav {
    display: none;
  }
  
  .language-switcher {
    margin-left: 10px;
  }
  
  .language-switcher .lang-btn {
    padding: 6px 10px;
    font-size: 13px;
  }
  
  .header-content {
    padding: 0 15px;
  }
  
  .logo-section .logo-img {
    height: 40px;
  }
  
  /* 移动端调整页面顶部间距 */
  body {
    padding-top: 70px; /* 移动端只需要一级导航的高度，二级导航已隐藏 */
  }
}

/* 移除全局body padding，避免影响首页 */

/* 二级导航组件样式 - 使用BEM命名规范避免冲突 */
.secondary-nav-component {
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
}

.secondary-nav-header {
    background: #0066cc;
    padding: 15px 0;
    width: 100%;
    position: relative;
    z-index: 1002; /* 确保在所有内容之上，包括轮播图内容 */
}

.secondary-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.secondary-nav-categories {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

.secondary-nav-category {
    flex: 1;
    text-align: center;
}

.secondary-nav-category-title {
    color: white;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    padding: 8px 0;
    pointer-events: none;
    cursor: default;
}

.secondary-nav-links {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.secondary-nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 14px;
    padding: 5px 10px;
    transition: all 0.3s ease;
    display: block;
}

.secondary-nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.secondary-nav-link.active {
    color: #ffd700;
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 移动端隐藏二级导航 */
    .secondary-nav-component .secondary-nav-header {
        display: none;
    }
    
    .secondary-nav-categories {
        flex-direction: column;
        gap: 0;
        padding: 15px;
    }
    
    .secondary-nav-category {
        margin-bottom: 15px;
        padding: 10px;
        background: rgba(255, 255, 255, 0.1);
    }
    
    .secondary-nav-category-title {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .secondary-nav-link {
        font-size: 13px;
        padding: 8px 12px;
    }
}
