/* ===================================
   导航栏样式 - Figma 精确还原
   设计节点: 968-159
   =================================== */

/* 导航栏容器 */
.figma-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background-color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Logo 区域 */
.figma-nav-logo {
  position: absolute;
  left: 89px;
  top: 0;
  height: 120px;
  width: 196px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 10;
}

.figma-nav-logo a {
  display: flex;
  align-items: center;
  height: 100%;
}

.figma-nav-logo img {
  max-height: 73px;
  width: auto;
  object-fit: contain;
}

/* 导航菜单容器 */
.figma-nav-menu-container {
  position: absolute;
  right: 75px;
  width: 893px;
  height: 61px;
  top: 59px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 19px;
}

/* 导航项 */
.figma-nav-menu-item {
  height: 100%;
  display: flex;
  align-items: center;
  position: relative; /* 确保 submenu 相对于此定位 */
}

.figma-nav-menu-item > a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 10px;
  font-family: 'Open Sans Condensed', sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 100px;
  color: #00437A;
  text-decoration: none;
  letter-spacing: 0;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.figma-nav-menu-item > a.active,
.figma-nav-menu-item.active > a {
  color: #E7581A;
}

/* 下拉菜单 */
.figma-nav-dropdown {
  position: relative;
}

.figma-nav-submenu {
  position: absolute;
  top: 61px;
  left: 0; /* 修改为 0，使下拉菜单左侧与按钮左侧对齐 */
  transform: none; /* 移除居中的 transform */
  width: 340px; /* 根据最新 Figma 稿 889:94 宽度调整为 340px */
  height: auto;
  background-color: #FFFFFF;
  border: 1px solid #D1D1D1;
  border-top: none; /* 移除顶部边框 */
  display: none;
  padding: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  z-index: 100;
}

.figma-nav-dropdown.active .figma-nav-submenu {
  display: block;
}

/* 三角形指示器 (Beak) */
.figma-nav-submenu-beak {
  position: absolute;
  top: -12px;
  left: 20px; /* 调整三角形位置，使其靠近按钮左侧 */
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 12px solid #FFFFFF;
  display: none;
}

.figma-nav-dropdown.active .figma-nav-submenu-beak {
  display: block;
}

/* 子菜单内容容器 */
.figma-nav-submenu-content {
  padding: 23px 15px; /* 根据最新 Figma 稿 px-[15px] py-[23px] 调整 */
  height: auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.figma-nav-submenu-content a {
  display: flex;
  align-items: center; /* 改为居中对齐，保证横线居中 */
  gap: 10px; /* 横线与文字的间距 */
  height: auto;
  padding: 0;
  font-family: 'Open Sans Condensed', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #00437A;
  text-decoration: none;
  text-transform: uppercase;
  transition: all 0.3s ease;
  line-height: 1.4; /* 调整行高适合多行显示 */
  white-space: normal; /* 允许自动换行 */
  word-break: break-all; /* 强制单词内换行防止撑开 */
}

.figma-nav-submenu-content a:hover {
  color: #E7581A;
  transform: translateX(5px);
}

/* 装饰线居中微调 */
.figma-nav-submenu-dash {
  width: 20px;
  height: 1px;
  background-color: #00437A;
  display: inline-block;
  flex-shrink: 0;
  margin-top: 1px; /* 视觉微调居中 */
}

.figma-nav-submenu-content a:hover .figma-nav-submenu-dash {
  background-color: #E7581A;
}

/* 之前的老样式覆盖 */
.figma-nav-submenu a {
  padding: 0;
  background-color: transparent;
  width: auto;
}

.figma-nav-submenu a:hover {
  background-color: transparent;
}

/* 右侧工具栏 */
.figma-nav-tools {
  position: absolute;
  right: 0;
  top: 0;
  height: 120px;
  width: 75px;
  display: flex;
  flex-direction: column;
  border: 1px solid #A6A6A6;
  z-index: 10;
}

/* 语言切换 */
.figma-nav-lang {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 40px;
  color: #E7581A;
  position: relative;
  cursor: pointer;
  border-bottom: 1px solid #A6A6A6;
  user-select: none;
  gap: 8px;
}

.figma-lang-label {
  position: absolute;
  left: 31px;
  top: 10px;
  transform: translateX(-50%);
}

.figma-lang-caret {
  position: absolute;
  left: 51px;
  top: 9px;
  transform: translateX(-50%);
}

.figma-nav-lang.active .figma-lang-dropdown {
  display: flex;
}

.figma-lang-dropdown {
  position: absolute;
  top: 60px;
  left: -1px;
  right: -1px;
  background-color: #FFFFFF;
  border: 1px solid #A6A6A6;
  border-top: none;
  display: none;
  flex-direction: column;
  min-width: 100%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  z-index: 200;
  max-height: 240px;
  overflow-y: auto;
}

.figma-lang-dropdown a {
  padding: 10px 5px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #E7581A;
  text-decoration: none;
  text-align: center;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.figma-lang-dropdown a:hover {
  color: #E7581A;
  background-color: #F5F5F5;
}

/* 搜索图标 */
.figma-nav-search {
  height: 61px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 23px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s ease;
  border-top: 1px solid #A6A6A6;
}

.figma-nav-search:hover {
  opacity: 1;
}

.figma-nav-search svg {
  width: 30px;
  height: 30px;
  display: block;
}

/* 移动端菜单按钮 */
.figma-mobile-toggle {
  display: none;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 20;
  width: 40px;
  height: 30px;
  padding: 0;
  box-sizing: border-box;
}

.figma-mobile-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #00437A;
  margin: 0;
  transition: all 0.3s ease;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.figma-mobile-toggle span:nth-child(1) {
  transform: translate(-50%, -50%) translateY(-8px);
}

.figma-mobile-toggle span:nth-child(2) {
  transform: translate(-50%, -50%);
}

.figma-mobile-toggle span:nth-child(3) {
  transform: translate(-50%, -50%) translateY(8px);
}

/* ===================================
  响应式设计 - 平板 (<= 834px)
   =================================== */
@media (max-width: 1280px) {
  .figma-nav {
    height: 80px;
    justify-content: space-between;
  }

  .figma-nav-logo {
    height: 80px;
    position: relative;
    left: auto;
    top: auto;
    width: 191px;
    padding: 0 40px;
  }

  .figma-nav-logo img {
    max-height: 50px;
  }

  .figma-nav-menu-container {
    display: none;
    position: absolute;
    flex-direction: column;
    top: 80px;
    right: 0;
    width: 385px; 
    height: auto;
    max-height: calc(100vh - 80px);
    background-color: #F2F2F2; 
    border-left: 1px solid #D1D1D1;
    border-bottom: 1px solid #D1D1D1;
    gap: 0;
    padding: 0;
    overflow-y: auto;
    z-index: 1000;
  }

  .figma-nav-menu-container.active {
    display: flex !important;
  }

  .figma-nav-menu-item {
    width: 100% !important;
    border-bottom: 1px solid #D1D1D1;
    display: block !important;
    height: auto !important;
  }

  .figma-nav-menu-item > a {
    height: 55px !important;
    padding: 0 20px !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #00437A !important;
    background-color: transparent !important;
    border: none !important;
    line-height: normal !important;
    text-transform: none !important;
    box-sizing: border-box !important;
  }

  .figma-nav-dropdown > a::after {
    content: '' !important;
    width: 14px !important;
    height: 14px !important;
    background: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.5 5.25L7 8.75L10.5 5.25' stroke='%23000000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center !important;
    transition: transform 0.3s ease !important;
    display: block !important;
    position: static !important;
  }

  .figma-nav-dropdown.active > a::after {
    transform: rotate(180deg) !important;
  }

  .figma-nav-dropdown.active > a {
    color: #E7581A !important;
  }

  .figma-nav-submenu {
    position: static !important;
    border: none !important;
    box-shadow: none !important;
    background-color: #E6E6E6 !important; 
    padding: 0 !important;
    display: none;
    height: auto !important;
    width: 100% !important;
    transform: none !important;
  }

  .figma-nav-dropdown.active .figma-nav-submenu {
    display: block !important;
  }

  .figma-nav-submenu-content {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    grid-auto-flow: row !important;
    height: auto !important;
  }

  .figma-nav-submenu-content a,
  .figma-nav-submenu-content a:nth-child(n) {
    display: flex !important;
    width: 100% !important;
    height: auto !important;
    min-height: 48px !important;
    padding: 10px 20px 10px 45px !important;
    grid-column: auto !important;
    grid-row: auto !important;
    border: none !important;
    border-bottom: 1px solid #D1D1D1 !important;
    background-color: transparent !important;
    position: relative !important;
    justify-content: space-between !important;
    text-transform: none !important;
    box-sizing: border-box !important;
    color: #00437A !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    text-align: left !important;
  }

  .figma-nav-submenu-dash {
    display: block !important;
    position: absolute !important;
    left: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 15px !important;
    height: 1px !important;
    background-color: #A6A6A6 !important;
  }

  .figma-nav-submenu-content a::after {
    content: '' !important;
    width: 12px !important;
    height: 12px !important;
    background: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.5 4.5L6 7L8.5 4.5' stroke='%23333333' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center !important;
    display: block !important;
    position: static !important;
    transform: none !important;
  }

  .figma-nav-tools {
    width: 228px;
    flex-direction: row;
    height: 80px;
    border: 1px solid #A6A6A6;
    position: relative;
    right: auto;
    top: auto;
  }

  .figma-nav-lang {
    height: 80px;
    flex: 0 0 76px;
    border-right: 1px solid #A6A6A6;
    border-bottom: none;
    gap: 7px;
    padding: 9px 21px;
  }

  .figma-lang-label,
  .figma-lang-caret {
    position: static;
    transform: none;
  }

  .figma-lang-dropdown {
    top: 80px;
  }

  .figma-nav-search {
    height: 80px;
    flex: 0 0 76px;
    border: none;
    border-left: 1px solid #A6A6A6;
    padding: 0 23px;
  }

  .figma-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: absolute;
    right: 0;
    top: 0;
    transform: none;
    width: 76px;
    height: 80px;
    border-left: 1px solid #A6A6A6;
    background: transparent;
  }

  .figma-mobile-toggle span {
    width: 46px;
    height: 3px;
    background-color: #E7581A;
  }

  .figma-mobile-toggle.active span:nth-child(1) {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .figma-mobile-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .figma-mobile-toggle.active span:nth-child(3) {
    transform: translate(-50%, -50%) rotate(-45deg);
  }
}


@media (max-width: 768px) {
  .figma-nav {
    height: 80px;
    min-width: 385px;
  }

  .figma-nav-logo {
    height: 80px;
    left: 14px;
    width: 140px;
  }

  .figma-nav-logo img {
    max-height: 41px;
  }

  .figma-nav-menu-container {
    top: 80px;
  }

  .figma-nav-menu-item > a {
    font-size: 16px;
    padding: 10px 15px;
  }

  .figma-nav-tools {
    width: 216px;
    height: 80px;
  }

  .figma-nav-lang {
    font-size: 14px;
    height: 80px;
    flex: 0 0 70px;
  }

  .figma-nav-search svg {
    width: 30px;
    height: 30px;
  }

  .figma-nav-lang {
    flex: 0 0 70px;
  }

  .figma-nav-search {
    flex: 0 0 70px;
    height: 80px;
  }

  .figma-mobile-toggle {
    right: 0;
    width: 76px;
    height: 80px;
  }

  .figma-mobile-toggle span {
    width: 46px;
    height: 3px;
  }
}

/* ===================================

/* 主内容顶部补偿（固定导航栏） */
body.jing-home,
body.jing-lawyer-page,
body.jing-article-page {
  padding-top: 120px;
}

@media (max-width: 1280px) {
  .figma-nav {
    height: 80px;
    justify-content: space-between;
  }

  .figma-nav-logo {
    height: 80px;
    position: relative;
    left: auto;
    top: auto;
    width: 191px;
    padding: 0 40px;
  }

  .figma-nav-logo img {
    max-height: 50px;
  }

  .figma-nav-menu-container {
    display: none;
    position: absolute;
    flex-direction: column;
    top: 80px;
    right: 0;
    width: 385px; 
    height: auto;
    max-height: calc(100vh - 80px);
    background-color: #F2F2F2; 
    border-left: 1px solid #D1D1D1;
    border-bottom: 1px solid #D1D1D1;
    gap: 0;
    padding: 0;
    overflow-y: auto;
    z-index: 1000;
  }

  .figma-nav-menu-container.active {
    display: flex !important;
  }

  .figma-nav-menu-item {
    width: 100% !important;
    border-bottom: 1px solid #D1D1D1;
    display: block !important;
    height: auto !important;
  }

  .figma-nav-menu-item > a {
    height: 55px !important;
    padding: 0 20px !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #00437A !important;
    background-color: transparent !important;
    border: none !important;
    line-height: normal !important;
    text-transform: none !important;
    box-sizing: border-box !important;
  }

  .figma-nav-dropdown > a::after {
    content: '' !important;
    width: 14px !important;
    height: 14px !important;
    background: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.5 5.25L7 8.75L10.5 5.25' stroke='%23000000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center !important;
    transition: transform 0.3s ease !important;
    display: block !important;
    position: static !important;
  }

  .figma-nav-dropdown.active > a::after {
    transform: rotate(180deg) !important;
  }

  .figma-nav-dropdown.active > a {
    color: #E7581A !important;
  }

  .figma-nav-submenu {
    position: static !important;
    border: none !important;
    box-shadow: none !important;
    background-color: #E6E6E6 !important; 
    padding: 0 !important;
    display: none;
    height: auto !important;
    width: 100% !important;
    transform: none !important;
  }

  .figma-nav-dropdown.active .figma-nav-submenu {
    display: block !important;
  }

  .figma-nav-submenu-content {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    grid-auto-flow: row !important;
    height: auto !important;
  }

  .figma-nav-submenu-content a,
  .figma-nav-submenu-content a:nth-child(n) {
    display: flex !important;
    width: 100% !important;
    height: auto !important;
    min-height: 48px !important;
    padding: 10px 20px 10px 45px !important;
    grid-column: auto !important;
    grid-row: auto !important;
    border: none !important;
    border-bottom: 1px solid #D1D1D1 !important;
    background-color: transparent !important;
    position: relative !important;
    justify-content: space-between !important;
    text-transform: none !important;
    box-sizing: border-box !important;
    color: #00437A !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    text-align: left !important;
  }

  .figma-nav-submenu-dash {
    display: block !important;
    position: absolute !important;
    left: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 15px !important;
    height: 1px !important;
    background-color: #A6A6A6 !important;
  }

  .figma-nav-submenu-content a::after {
    content: '' !important;
    width: 12px !important;
    height: 12px !important;
    background: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.5 4.5L6 7L8.5 4.5' stroke='%23333333' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center !important;
    display: block !important;
    position: static !important;
    transform: none !important;
  }

  .figma-nav-tools {
    width: 228px;
    flex-direction: row;
    height: 80px;
    border: 1px solid #A6A6A6;
    position: relative;
    right: auto;
    top: auto;
  }

  .figma-nav-lang {
    height: 80px;
    flex: 0 0 76px;
    border-right: 1px solid #A6A6A6;
    border-bottom: none;
    gap: 7px;
    padding: 9px 21px;
  }

  .figma-lang-label,
  .figma-lang-caret {
    position: static;
    transform: none;
  }

  .figma-lang-dropdown {
    top: 80px;
  }

  .figma-nav-search {
    height: 80px;
    flex: 0 0 76px;
    border: none;
    border-left: 1px solid #A6A6A6;
    padding: 0 23px;
  }

  .figma-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: absolute;
    right: 0;
    top: 0;
    transform: none;
    width: 76px;
    height: 80px;
    border-left: 1px solid #A6A6A6;
    background: transparent;
  }

  .figma-mobile-toggle span {
    width: 46px;
    height: 3px;
    background-color: #E7581A;
  }

  .figma-mobile-toggle.active span:nth-child(1) {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .figma-mobile-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .figma-mobile-toggle.active span:nth-child(3) {
    transform: translate(-50%, -50%) rotate(-45deg);
  }
}


@media (max-width: 768px) {
  body.jing-home,
  body.jing-lawyer-page,
  body.jing-article-page,
  body.lists-article {
    padding-top: 80px;
  }
}
