/* ── 全国基地 ── */
.bases { background: #fff; }
.bases-layout { display: flex; gap: 64px; align-items: center; }

/* ── 左侧标签列 ── */
.bases-left { flex: 0 0 330px; }

/* ── 城市标签散点 ── */
.bases-tags { position: relative; height: 280px; }
.base-tag {
    position: absolute;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transform: translate(-50%, -50%);
    border: 1px solid #e2e2e2;
    color: #999;
    background: #f4f4f4;
    letter-spacing: 0.2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all .22s ease;
    user-select: none;
    font-size: 13px;
    padding: 8px 18px;
}
.base-tag:hover {
    border-color: rgba(245,166,35,0.45);
    color: #c87010;
    background: #fff;
    transform: translate(-50%,-50%) scale(1.06);
    box-shadow: 0 3px 10px rgba(245,166,35,0.12);
}
/* 选中后变为最大，覆盖 sz-* 的尺寸 */
.base-tag.active {
    background: #f5a623;
    color: #fff;
    border-color: #f5a623;
    font-size: 16px !important;
    padding: 12px 32px !important;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 20px rgba(245,166,35,0.38), 0 2px 6px rgba(245,166,35,0.18);
    transform: translate(-50%,-50%) scale(1);
    z-index: 3;
}
/* 尺寸层级（未选中） */
.base-tag.sz-xl { font-size: 14px; padding: 9px 22px; }
.base-tag.sz-lg { font-size: 13px; padding: 8px 18px; }
.base-tag.sz-md { font-size: 12px; padding: 7px 15px; }
.base-tag.sz-sm { font-size: 12px; padding: 6px 13px; }
/* 紧密发散位置 */
.base-tag:nth-child(1) { left: 50%; top: 48%; }
.base-tag:nth-child(2) { left: 80%; top: 24%; }
.base-tag:nth-child(3) { left: 85%; top: 62%; }
.base-tag:nth-child(4) { left: 34%; top: 10%; }
.base-tag:nth-child(5) { left: 28%; top: 82%; }
.base-tag:nth-child(6) { left: 6%;  top: 64%; }
.base-tag:nth-child(7) { left: 8%;  top: 22%; }
.base-tag:nth-child(8) { left: 68%; top: 86%; }

/* ── 右侧地图区 ── */
.bases-right { flex: 1; min-width: 0; }
.bases-map-wrap {
    position: relative;
}

/* 地图舞台：相对定位容器，圆点绝对定位叠在图片上 */
.bases-map-stage {
    position: relative;
    display: inline-block;
    width: 100%;
}
.bases-map-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    user-select: none;
    pointer-events: none;
}

/* ── 城市点位标记 ── */
.base-city-dot {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2.5px solid #f5a623;
    background: rgba(255,255,255,0.25);
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 2;
    transition: transform .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* 内部实心小点（默认显示） */
.base-city-dot::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: #f5a623;
}
/* Pin SVG：默认隐藏 */
.base-city-dot .dot-pin {
    display: none;
    width: 28px;
    height: 28px;
    color: #f5a623;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}
/* 激活：换成 pin 图标 */
.base-city-dot.active {
    width: auto;
    height: auto;
    border: none;
    background: transparent;
    transform: translate(-50%, -85%);
}
.base-city-dot.active::after { display: none; }
.base-city-dot.active .dot-pin { display: block; }

/* 点击弹跳动画 */
@keyframes dotBounce {
    0%   { transform: translate(-50%, -85%) scale(1); }
    30%  { transform: translate(-50%, -85%) scale(1.4) translateY(-4px); }
    60%  { transform: translate(-50%, -85%) scale(0.9); }
    100% { transform: translate(-50%, -85%) scale(1); }
}
.base-city-dot.bounce { animation: dotBounce .45s ease forwards; }

/* hover 非激活态放大 */
.base-city-dot:not(.active):hover {
    transform: translate(-50%, -50%) scale(1.35);
    border-color: #e09010;
}
.base-city-dot:not(.active):hover::after { background: #e09010; }

/* ── 分院弹窗（跟随点位，JS 动态设置 left/top） ── */
.bases-popup {
    position: absolute;
    width: 180px;
    border-radius: 8px;
    background: #000;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(0,0,0,0.22), 0 2px 6px rgba(0,0,0,0.1);
    transform: translate(-50%, calc(-100% - 36px)) scale(0.9);
    transform-origin: 50% 100%;
    opacity: 0;
    transition: opacity .22s ease, transform .22s ease;
    pointer-events: none;
    z-index: 20;
}
.bases-popup.visible {
    opacity: 1;
    transform: translate(-50%, calc(-100% - 36px)) scale(1);
    pointer-events: auto;
}
/* 小三角箭头 */
.bases-popup::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px; height: 6px;
    background: rgba(0,0,0,0.55);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}
/* 图片铺满，城市名叠在图片底部 */
.bases-popup img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}
.bases-popup-footer {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 20px 10px 8px;
    background: linear-gradient(to top, rgba(0,0,0,0.62) 0%, transparent 100%);
}
.bases-popup-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #f5a623;
    flex-shrink: 0;
}
#basesPopupName {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* ── 响应式 ── */
@media (max-width: 900px) {
    .bases-layout { flex-direction: column; }
    .bases-left { flex: none; width: 100%; }
    .bases-tags { height: 280px; }
}

/* 平板竖屏 / 大屏手机横屏 */
@media (max-width: 768px) {
    .bases { padding-bottom: 60px; }
    .bases-tags { height: 240px; }
    .base-tag { font-size: 12px; padding: 6px 14px; }
    .base-tag.active { font-size: 14px !important; padding: 10px 24px !important; }
    .base-tag.sz-xl { font-size: 13px; padding: 7px 16px; }
    .bases-popup { width: 150px; }
    .bases-popup img { height: 100px; }
}

/* 手机竖屏（中等） */
@media (max-width: 600px) {
    .bases-tags { height: 220px; }
    .base-tag { font-size: 11px; padding: 5px 12px; }
    .base-tag.active { font-size: 13px !important; padding: 8px 20px !important; }
    .bases-popup { width: 130px; }
}

/* 主流手机 */
@media (max-width: 480px) {
    .bases { padding-bottom: 50px; }
    .bases-tags { height: 200px; }
    /* 弹窗锚点略微内偏，防止超出右侧屏幕边缘 */
    .bases-popup {
        width: 120px;
        transform: translate(-35%, calc(-100% - 36px)) scale(0.9);
    }
    .bases-popup.visible {
        transform: translate(-35%, calc(-100% - 36px)) scale(1);
    }
}

/* 小屏安卓 */
@media (max-width: 390px) {
    .bases-tags { height: 180px; }
    .base-tag { font-size: 10px; padding: 4px 10px; }
    .bases-popup img { height: 80px; }
}
