/* 首页样式 - youbian-home.css */
/* 新华字典风格 — 清晰、参考、检索 */

/* ========== 首页 Hero 搜索区 ========== */
.home-hero {
  text-align: center;
  padding: 60px 20px 50px;
  position: relative;
}

.home-hero .hero-title {
  font-size: 42px;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: 4px;
  margin-bottom: 12px;
  line-height: 1.2;
}

.home-hero .hero-title .gold-char {
  color: var(--gold);
}

.home-hero .hero-sub {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 32px;
  letter-spacing: 1px;
}

/* 大搜索框 */
.hero-search-wrap {
  max-width: 640px;
  margin: 0 auto 40px;
  position: relative;
}

.hero-search-wrap .hero-search {
  width: 100%;
  height: 56px;
  padding: 0 24px 0 52px;
  font-size: 16px;
  color: var(--text-primary);
  background: var(--bg-card-solid);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  outline: none;
  transition: var(--transition);
  font-family: var(--font-main);
  box-shadow: var(--shadow-sm);
}

.hero-search-wrap .hero-search::placeholder {
  color: var(--text-muted);
  font-size: 15px;
}

.hero-search-wrap .hero-search:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-glow), var(--shadow);
}

.hero-search-wrap .search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.3s;
}

.hero-search-wrap .hero-search:focus + .search-icon {
  color: var(--gold);
}

/* 搜索提示 */
.hero-search-hint {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.hero-search-hint span {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-glass);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

/* ========== 快速统计条 ========== */
.hero-stats-bar {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.hero-stats-bar .hs-item {
  text-align: center;
}

.hero-stats-bar .hs-num {
  font-size: 32px;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
  font-family: var(--font-kai);
}

.hero-stats-bar .hs-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  letter-spacing: 1px;
}

/* ========== 省份索引标题 ========== */
.home-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.home-section-title .hst-icon {
  font-size: 22px;
}

.home-section-title h2 {
  font-size: 20px;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: 1px;
  flex: 1;
}

.home-section-title .hst-count {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-glass);
  padding: 3px 10px;
  border-radius: 10px;
}

/* ========== 省份网格（带图标） ========== */
.home-province-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

.home-province-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: var(--transition);
  backdrop-filter: blur(12px);
}

.home-province-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-gold);
}

.home-province-card .hpc-icon {
  width: 64px;
  height: 64px;
  min-width: 64px;
  border-radius: 18px;
  background: var(--gold-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 900;
  font-family: 'Noto Serif SC', 'PingFang SC', 'Microsoft YaHei', 'SimHei', sans-serif;
  color: #fff;
  flex-shrink: 0;
  box-shadow: var(--shadow-gold), inset 0 1px 0 rgba(255,255,255,0.25);
  text-shadow: 0 2px 4px rgba(0,0,0,0.25);
  letter-spacing: 2px;
}

.home-province-card .hpc-info {
  flex: 1;
  min-width: 0;
}

.home-province-card .hpc-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.home-province-card .hpc-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.home-province-card .hpc-meta span {
  display: flex;
  align-items: center;
  gap: 3px;
}

.home-province-card .hpc-arrow {
  font-size: 14px;
  color: var(--text-muted);
  opacity: 0.4;
  transition: var(--transition);
}

.home-province-card:hover .hpc-arrow {
  color: var(--gold);
  opacity: 1;
  transform: translateX(3px);
}

/* ========== 热门城市快捷区 ========== */
.hot-cities-section {
  margin-bottom: 48px;
}

.hot-cities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.hot-city-tag {
  display: block;
  text-align: center;
  padding: 12px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
}

.hot-city-tag:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-gold);
  color: var(--gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ========== 字母索引栏 ========== */
.alpha-index {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 32px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.alpha-index a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: var(--transition);
}

.alpha-index a:hover {
  background: var(--gold-gradient);
  color: #fff;
  transform: scale(1.1);
}

/* ========== Responsive ========== */
@media(max-width: 1100px) {
  .home-hero {
    padding: 40px 16px 36px;
  }
  .home-hero .hero-title {
    font-size: 32px;
  }
  .hero-stats-bar {
    gap: 32px;
  }
}

@media(max-width: 800px) {
  .home-hero .hero-title {
    font-size: 28px;
  }
  .hero-search-wrap .hero-search {
    height: 50px;
    font-size: 15px;
  }
  .hero-stats-bar .hs-num {
    font-size: 26px;
  }
  .home-province-grid {
    grid-template-columns: 1fr;
  }
  .hot-cities-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media(max-width: 480px) {
  .home-hero {
    padding: 28px 12px 24px;
  }
  .home-hero .hero-title {
    font-size: 24px;
    letter-spacing: 2px;
  }
  .hero-stats-bar {
    gap: 20px;
  }
  .hero-stats-bar .hs-num {
    font-size: 22px;
  }
  .hot-cities-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .alpha-index a {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
}

/* ========== 搜索结果下拉（高对比度设计） ========== */
.search-dropdown{
  position:absolute;
  top:calc(100% + 8px);left:0;
  width:100%;
  max-height:420px;
  overflow-y:auto;
  overflow-x:hidden;
  /* 实色白底，不透明 */
  background:#ffffff;
  border:2px solid #d4af37;
  border-radius:14px;
  /* 多层重阴影，制造"浮起"效果 */
  box-shadow:
    0 8px 32px rgba(0,0,0,0.18),
    0 2px 8px rgba(0,0,0,0.12),
    0 0 0 1px rgba(212,175,55,0.15);
  z-index:2147483647;
  animation:sdPopIn 0.22s cubic-bezier(0.34,1.56,0.64,1);
  /* 遮挡背后所有内容 */
  backdrop-filter:blur(12px);
}
@keyframes sdPopIn{
  from{opacity:0;transform:translateY(-12px) scale(0.96)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
/* 分组标签 */
.search-dropdown .sd-group-label{
  position:sticky;top:0;z-index:2;
  padding:10px 18px 6px;
  font-size:11px;font-weight:700;
  color:#d4af37;
  text-transform:uppercase;
  letter-spacing:2px;
  background:linear-gradient(180deg,#fffdf7 0%,#ffffff 100%);
  border-bottom:1px solid #f0e6d0;
}
/* 搜索结果项 */
.search-dropdown .sd-item{
  display:flex;align-items:center;gap:12px;
  padding:11px 18px;
  cursor:pointer;
  transition:all 0.15s ease;
  border-bottom:1px solid #f5f0e8;
  margin:0 8px;
  border-radius:10px;
}
.search-dropdown .sd-item:last-child{border-bottom:none;}
/* Hover 高亮 */
.search-dropdown .sd-item:hover,
.search-dropdown .sd-item.active{
  background:linear-gradient(135deg,#fffbf0 0%, #fff8e6 100%);
  transform:translateX(3px);
  box-shadow:0 2px 8px rgba(212,175,55,0.15);
}
/* 图标 */
.search-dropdown .sd-icon{
  font-size:20px;flex-shrink:0;
  width:32px;height:32px;
  display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,#fef9ef,#fff5dc);
  border-radius:8px;
  border:1px solid #ede3c5;
}
/* 名称文字 */
.search-dropdown .sd-name{
  font-size:15px;font-weight:700;
  color:#1a1a2e;flex:1;
  letter-spacing:0.5px;
}
/* 匹配高亮 */
.search-dropdown .sd-highlight{
  color:#b8860b;
  background:linear-gradient(135deg,#fff3cc,#ffe999);
  padding:1px 5px;border-radius:4px;
  font-weight:800;
}
/* 类型标签（省/市/区） */
.search-dropdown .sd-type{
  font-size:11px;font-weight:600;
  color:#8b6914;
  background:linear-gradient(135deg,#fef3c7,#fde68a);
  padding:3px 10px;border-radius:20px;
  border:1px solid #d4af3733;
}
/* 省份名称 */
.search-dropdown .sd-prov{
  font-size:12px;font-weight:500;
  color:#666;margin-left:auto;
  background:#f5f5f5;padding:2px 8px;border-radius:6px;
}
/* 空结果提示 */
.search-dropdown .sd-empty{
  padding:30px 20px;text-align:center;
  color:#999;font-size:14px;
}
