﻿/* ============================================
   Hero Banner - 视频背景 + 居中搜索
   ============================================ */
.hero {
  position: relative;
  padding: calc(var(--header-height) + 60px) 32px 160px;
  min-height: 680px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  z-index: 5;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.05) 60%,
    rgba(255, 255, 255, 0.5) 88%,
    #fff 100%
  );
  z-index: -1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 720px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  z-index: 10;
}

/* ============================================
   搜索框
   ============================================ */
.search-box {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 780px;
  height: 56px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 5px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.12);
  position: relative;
  z-index: 100;
  overflow: visible;
  position: relative;
  padding: 0 7px 0 0;
  z-index: 50;
}

/* 分类触发器：无边框，嵌入搜索栏 */
.search-cate {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px 0 18px;
  height: 100%;
  cursor: pointer;
  position: relative;
  user-select: none;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 500;
  color: #0b0b0bc7;
}

.search-cate__label {
  pointer-events: none;
}

.search-cate__arrow {
  opacity: 0.45;
  transition: transform 0.2s ease;
  pointer-events: none;
}

.search-cate:hover .search-cate__arrow,
.search-cate.is-open .search-cate__arrow {
  transform: rotate(180deg);
}

/* 悬停桥接区 */
.search-cate::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 12px;
}

/* 下拉菜单 */
.search-cate__menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 6px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
  padding: 8px;
  z-index: 9999;
  list-style: none;
  min-width: 160px;
  max-height: 360px;
  overflow-y: auto;
  scrollbar-width: thin;
}

/* V型尖角 */
.search-cate__menu::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 24px;
  width: 10px;
  height: 10px;
  background: #fff;
  transform: rotate(45deg);
  box-shadow: -1px -1px 3px rgba(0, 0, 0, 0.06);
}

/* 由JS控制display，不再用CSS hover */

.search-cate__menu li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 14px;
  color: #4b5563;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
  border-radius: 6px;
}

.search-cate__menu li:hover {
  color: #1d2129;
  background: #f5f7fa;
}

.search-cate__menu li.is-active {
  color: var(--primary);
  font-weight: 600;
  background: #eff6ff;
}

.search-cate__menu li + li {
  border-top: none;
}

/* 竖线分隔 */
.search-divider {
  width: 1px;
  height: 20px;
  background: #d1d5db;
  flex-shrink: 0;
}

/* 输入框 */
.search-box > .search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  color: #0b0b0bc7;
  background: transparent;
  font-family: inherit;
  padding: 0 12px;
  height: 100%;
}

.search-box > .search-input::placeholder {
  color: #0b0b0bc7;
}

/* 以图搜图 */
.search-box > .search-btn-cam {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: #0b0b0bc7;
  background: transparent;
  border-radius: 6px;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.search-box > .search-btn-cam:hover {
  color: #0b0b0b;
}

/* 红色搜索按钮：独立圆角方块 */
.search-box > .search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 42px;
  color: #fff;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  border-radius: 8px;
  flex-shrink: 0;
  margin-left: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-box > .search-btn:hover {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
}

.search-box > .search-btn:active {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
}

/* ============================================
   热搜关键词
   ============================================ */
.hero-hotwords {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.hotwords-label {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.hotword-tag {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.2s ease;
  text-decoration: none;
}

.hotword-tag:hover {
  color: #fff;
  text-decoration: underline;
}

/* ============================================
   底部双层弧度遮罩
   ============================================ */
.hero-curves {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px; /* 稍微往下偏移一点，防止浏览器亚像素渲染出现一像素细缝 */
  height: 260px;
  width: 100%;
  overflow: hidden;
  z-index: 2;
  pointer-events: none;
}

.hero-curve-svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* 搜索分类下拉打开时提升hero层级 */
.hero:has(.search-cate__menu) {
  z-index: 5;
}

.hero:has(.search-cate.is-open) {
  z-index: 20;
}
