/* ============================================================
   map.css — 探索区域、标签过滤、高德地图、Marker、InfoWindow
   ============================================================ */

/* ----- Explore Section ----- */
#explore {
  padding: 92px 0 80px;
  background: linear-gradient(180deg, #edf5ff 0%, #f8f5ff 60%, white 100%);
}

/* ----- Filter Tags ----- */
.filter-wrap {
  display: flex; justify-content: center;
  gap: 14px; margin-top: 38px; flex-wrap: wrap;
}

/* 默认：空心（边框 + 彩色文字，透明底） */
.tag {
  padding: 9px 18px;
  border-radius: 28px; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all 0.28s cubic-bezier(0.34,1.4,0.64,1);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: transparent;
  user-select: none; position: relative;
  min-width: 178px;   /* 统一最小宽度，消除因英文长短不一导致的大小差异 */
}
.tag:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.14); }

/* 选中：实心（填充彩色背景） */
.tag.active {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.22);
}
.tag.active .tag-icon {
  background: rgba(255,255,255,0.30);
}

/* 各色标签 — 空心用 border+color，实心用 background */
.tag-pink   { border: 2.5px solid #ff6b9d; color: #ff6b9d; }
.tag-pink.active   { background: #ff6b9d; color: white; border-color: #ff6b9d; }

.tag-teal   { border: 2.5px solid #00c2a8; color: #00a896; }
.tag-teal.active   { background: #00c2a8; color: white; border-color: #00c2a8; }

.tag-green  { border: 2.5px solid #4caf50; color: #388e3c; }
.tag-green.active  { background: #4caf50; color: white; border-color: #4caf50; }

.tag-orange { border: 2.5px solid #ff7043; color: #e64a19; }
.tag-orange.active { background: #ff7043; color: white; border-color: #ff7043; }

.tag-yellow { border: 2.5px solid #f5c800; color: #8a6e00; }
.tag-yellow.active { background: #ffd600; color: #333;  border-color: #ffd600; }

/* 中英文文字块 */
.tag-text {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
}
.tag-cn {
  font-size: 14px; font-weight: 700; line-height: 1.2;
}
.tag-en {
  font-size: 10px; font-weight: 500; line-height: 1.2;
  opacity: 0.78; letter-spacing: 0.3px;
}

/* 箭头图标（圆圈） */
.tag-icon {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(0,0,0,0.07);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 900; line-height: 1;
  transition: background 0.28s;
  flex-shrink: 0;
}

/* ----- Map Container ----- */
.map-container {
  margin-top: 34px; border-radius: 20px; overflow: hidden;
  position: relative; height: 680px;
  box-shadow: 0 16px 56px rgba(26,111,244,0.13);
}
@media (max-width: 900px) {
  .map-container { height: 480px; }
}
@media (max-width: 600px) {
  .map-container { height: 340px; }
}
#amapContainer { width: 100%; height: 100%; }

/* ----- Custom Pin Marker ----- */
.amap-pin-wrap {
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer; position: relative;
}
.amap-pin-bounce {
  animation: pinFloat 2.4s ease-in-out infinite;
  filter: drop-shadow(0 5px 6px rgba(0,0,0,0.28));
  transition: transform 0.2s, filter 0.2s;
  will-change: transform;
}
.amap-pin-wrap:hover .amap-pin-bounce {
  animation-play-state: paused;
  transform: scale(1.15) translateY(-3px);
  filter: drop-shadow(0 8px 14px rgba(0,0,0,0.4));
}
.amap-pin-svg { width: 32px; height: 44px; display: block; }
.amap-pin-shadow {
  width: 14px; height: 5px;
  background: rgba(0,0,0,0.18);
  border-radius: 50%;
  margin-top: -2px;
  animation: shadowScale 2.4s ease-in-out infinite;
}
@keyframes pinFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-7px); }
}
@keyframes shadowScale {
  0%, 100% { transform: scaleX(1);   opacity: 0.3; }
  50%       { transform: scaleX(0.6); opacity: 0.12; }
}
.amap-pin-label {
  margin-top: 5px; white-space: nowrap;
  font-size: 11px; font-weight: 700; letter-spacing: 0.3px;
  color: white; background: rgba(0,0,0,0.56);
  padding: 2px 8px; border-radius: 5px;
  pointer-events: none;
}

/* ----- AMap InfoWindow override ----- */
.amap-info-content {
  padding: 0 !important; border: none !important;
  border-radius: 16px !important;
  overflow: visible !important;
  box-shadow: none !important;
  background: transparent !important;
}
.amap-info-sharp { display: none !important; }
.amap-info-close { display: none !important; }
.amap-info-outer { box-shadow: none !important; }

/* ----- InfoWindow Card ----- */
.amap-iw-card {
  width: 248px; background: white;
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 12px 48px rgba(0,0,0,0.18);
  animation: iwPop 0.38s cubic-bezier(0.34,1.56,0.64,1) forwards;
  position: relative;
}
@keyframes iwPop {
  from { opacity: 0; transform: scale(0.75) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.amap-iw-img { width: 100%; height: 114px; object-fit: cover; display: block; }
.amap-iw-body { padding: 10px 13px 13px; }
.amap-iw-name-row { display: flex; align-items: center; gap: 7px; }
.amap-iw-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.amap-iw-name { font-size: 14px; font-weight: 800; color: var(--text-dark); }
.amap-iw-station { font-size: 11px; color: var(--text-gray); margin-top: 2px; }
.amap-iw-desc { font-size: 12px; color: var(--text-mid); margin-top: 7px; line-height: 1.65; }
.amap-iw-close-btn {
  position: absolute; top: 8px; right: 8px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,0,0,0.32); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; cursor: pointer; line-height: 1;
  transition: background 0.2s; border: none; font-family: inherit;
  z-index: 3;
}
.amap-iw-close-btn:hover { background: rgba(0,0,0,0.55); }

/* ----- Map error placeholder ----- */
.map-error {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px; background: #edf5ff;
}
.map-error p { font-size: 14px; color: #666; text-align: center; padding: 0 32px; }
.map-error a { color: var(--blue); text-decoration: none; font-weight: 600; }
.map-error a:hover { text-decoration: underline; }
