/* Megamenu 下拉弹窗 */
.megamenu-wrapper {
  position: absolute;
  z-index: 1000;
  display: none;
}

.megamenu-wrapper.is-active {
  display: block;
}

.megamenu-panel {
  background: #fff;
  color: #222;
  border-radius: 4px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  margin: 0 auto;
  min-width: 500px;
  max-width: 900px;
  padding: 20px 24px;
  animation: megamenu-slide-down 0.2s ease-out;
}

@keyframes megamenu-slide-down {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Type A: custom HTML */
.megamenu-html {
  line-height: 1.6;
}

/* Type A: zwgk panel (left-right split layout) */
.megamenu-html .zwgk-menu {
  display: flex;
  gap: 24px;
}

.megamenu-html .zwgk-left {
  flex: 0 0 240px;
  max-width: 280px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.megamenu-html .zwgk-item {
  width: 90%;
  margin: 0.2rem 0;
  border: 1px solid var(--theme-color);
  border-radius: 4px;
}

.megamenu-html .zwgk-item a {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  font-size: 1rem;
  color: #333;
  text-decoration: none;
  padding: 0.2rem 1rem;
}

.megamenu-html .zwgk-item:hover {
  background: var(--theme-color-lighten);
}

.megamenu-html .zwgk-item i {
  font-size: 2rem;
  color: var(--theme-color);
  margin: 0 1rem;
}

.megamenu-html .zwgk-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.megamenu-html .zwgk-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 15px;
  color: #333;
  background: #f5f5f5;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.megamenu-html .zwgk-btn:hover {
  background: #e8f8f6;
  color: #00b19d;
}

.megamenu-html .zwgk-btn .fa {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

/* Type A: guide menu (investment guide layout) */
.megamenu-html .guide-menu {
  display: flex;
  gap: 30px;
}

.megamenu-html .col-left {
  flex: 0 0 300px;
}

.megamenu-html .section-header {
  font-size: 16px;
  font-weight: bold;
  color: #222;
  padding-bottom: 8px;
  margin-bottom: 12px;
  border-bottom: 2px solid #e67e22;
}

.megamenu-html .guide-grid {
  display: flex;
  gap: 10px;
}

.megamenu-html .guide-item {
  flex: 1;
  text-align: center;
  cursor: pointer;
}

.megamenu-html .guide-item p {
  font-size: 12px;
  color: #555;
  margin-top: 6px;
  line-height: 1.4;
}

.megamenu-html .guide-img {
  width: 100%;
  height: 60px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1.3;
  overflow: hidden;
}

.megamenu-html .banner-large {
  margin-top: 12px;
  padding: 14px 16px;
  background: #e8f8f6;
  color: #00b19d;
  font-size: 15px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
}

.megamenu-html .col-right {
  flex: 1;
}

.megamenu-html .industry-group {
  margin-bottom: 10px;
}

.megamenu-html .group-title {
  font-size: 13px;
  font-weight: bold;
  color: #666;
  margin-bottom: 6px;
}

.megamenu-html .tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.megamenu-html .tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  color: #555;
  background: #f0f0f0;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.megamenu-html .tag:hover {
  background: #e67e22;
  color: #fff;
}

/* Type B: sub-channel tabs */
.megamenu-tabs {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
  margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.megamenu-tabs::-webkit-scrollbar {
  height: 4px;
}

.megamenu-tabs::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 2px;
}

.megamenu-tab {
  display: inline-block;
  padding: 0.5rem;
  font-size: 1rem;
  font-weight: bold;
  color: #222;
  cursor: pointer;
  border-radius: 2px;
  letter-spacing: 1px;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
  text-decoration: none;
}

.megamenu-tab:hover {
  color: var(--theme-color);
}

.megamenu-tab.active {
  color: var(--theme-color);
  border-bottom: 1px solid var(--theme-color);
}

/* Type B: content list */
.megamenu-content-item {
  display: none;
}

.megamenu-content-item.active {
  display: block;
}

.megamenu-news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.megamenu-news-list li {
  width: 100%;
  font-size: 1rem;
  line-height: 2.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.megamenu-news-list li a {
  overflow: hidden;
  width: 80%;
  display: block;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #222;
  text-decoration: none;
}

.megamenu-news-list li a:hover {
  color: #a7793d;
}

.megamenu-news-list .megamenu-news-image {
  width: 60px;
  height: 40px;
  object-fit: cover;
  border-radius: 2px;
  margin-right: 10px;
  flex-shrink: 0;
}

.megamenu-news-list .megamenu-news-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.megamenu-news-list .megamenu-date {
  font-size: 0.8rem;
  color: #999;
  flex-shrink: 0;
  margin-left: 12px;
}

/* Mobile: < 768px */
@media (max-width: 768px) {
  .megamenu-panel {
    max-width: 100%;
    border-radius: 0;
    padding: 16px;
  }

  .megamenu-tabs {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .megamenu-tab {
    padding: 8px 12px;
    font-size: 13px;
  }
}
