/* Header */
header {
  background-color: transparent;
  /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); */
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

header.scrolled {
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header .container {
  height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 50px;
}
header .logo img {
  width: 160px;
  height: 64px;
}

header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

header nav li {
  margin-left: 32px;
  position: relative; /* Ensure dropdown is positioned relative to this */
}

header nav a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  display: flex; /* Changed from block to flex to align arrow */
  align-items: center;
  gap: 4px;
  padding: 20px 0; /* Add padding to increase hover area */
}

.nav-arrow {
  transition: transform 0.3s ease;
  margin-top: 1px; /* Optical correction */
}

header nav li:hover .nav-arrow {
  transform: rotate(180deg);
}
header nav a.active {
  color: #1818f5;
}

header .actions {
  width: 88px;
  height: 32px;
  border-radius: 2px;
  opacity: 1;

  /* 自动布局 */
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 16px;
  background: #1818f5;
}
header .actions a {
  font-size: 14px;
  font-weight: 500;
  line-height: 24px;
  text-align: center;
  letter-spacing: 0em;

  font-variation-settings: "opsz" auto;
  color: #ffffff;
  padding: 0; /* Reset padding for button link */
}

header .actions:hover {
  background: #007bff;
}

/* Dropdown Menu Styles */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 80%;
  transform: translateX(-30%);
  background-color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 24px;
  width: 600px;
  z-index: 1001;
  border: 1px solid #eee;
  margin-top: -10px; /* Pull up slightly to connect with hover area if needed, but 'top: 100%' should work with padding */
}

header nav li:hover .dropdown-menu {
  display: block;
}

.dropdown-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.dropdown-item {
  display: flex;
  align-items: flex-start;
  padding: 16px;
  border-radius: 8px;
  transition: background-color 0.3s ease;
  text-decoration: none;
}

.dropdown-item:hover {
  background-color: #f7f9ff;
}

.dropdown-item .icon-box {
  width: 32px;
  height: 32px;
  margin-right: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropdown-item .icon-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dropdown-item .text-box {
  flex: 1;
}

.dropdown-item .text-box h4 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.dropdown-item:hover .text-box h4 {
  color: #1818f5;
}

.dropdown-item .text-box p {
  margin: 0;
  font-size: 12px;
  color: #999;
  line-height: 1.5;
}

/* Add a transparent bridge to prevent menu from disappearing when moving mouse from link to menu */
.dropdown-menu::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 0;
  width: 100%;
  height: 20px;
  background: transparent;
}
