/* 顶部导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  /* background-color: #fbf2c2; */
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 5%;
  transition: all 0.3s ease;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo {
  height: 40px;
  width: 40px;
  background-color: gold;
  border-radius: 50%;
  margin-right: 10px;
}

.company-name {
  font-size: 24px;
  font-weight: bold;
  color: #333;
}

.nav-links {
  width: 40%;
  display: flex;
  list-style: none;
}

.nav-links li {
  flex: 1;
  position: relative;
  text-align: center;
  padding-bottom: 8px;
  cursor: pointer;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s;
}
.active {
  border-bottom: 2px solid #f09c00;
}
.active a {
  color: #f09c00;
}

.nav-links li:hover>a, .nav-links a:hover{
  color: #f09c00;
}

.dropdown-content {
  display: none;
  position: absolute;
  min-width: 120px;
  z-index: 1;
  left: 0;
  top: 100%;
  padding-top: 6px;
  padding-bottom: 6px;
  background-color: #fff;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
}
.dropdown-content::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 7px solid #fff;
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
}

.dropdown-content a {
  color: #333;
  padding-top: 6px;
  padding-bottom: 6px;
  display: block;
  font-weight: normal;
}

.dropdown-content a:hover {
  background-color: #f9f9f9;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  width: 25px;
  height: 3px;
  background-color: #333;
  margin: 3px 0;
  transition: 0.3s;
}

/* 响应式 */
@media screen and (max-width: 992px) {
  .nav-links {
    width: 50%;
  }
}
/* 移动端导航栏样式 */
@media screen and (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
  .navbar .nav-links {
    position: fixed;
    top: 0;
    right: -50%;
    width: 50%;
    height: 100vh;
    background-color: #fff;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 60px;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1000;
  }

  .navbar .nav-links.mobile {
    right: 0;
  }

  .navbar .nav-links li {
    flex: none;
    width: 100%;
    border-bottom: 1px solid #eee;
  }

  .navbar .nav-links li a {
    display: block;
    padding: 15px 20px;
  }

  .navbar .dropdown-content {
    position: static;
    display: none;
    box-shadow: none;
    background-color: #f8f8f8;
    padding-left: 20px;
  }

  .navbar .dropdown.active .dropdown-content {
    display: block;
  }
}

