/* ── APG Globe ─────────────────────────────────────────────── */
.apg-globe-wrapper {
  position: relative;
  width: 100%;
  height: min(76vh, 700px);
  border-radius: 32px;
  overflow: hidden;
  cursor: default;
  background: #F5F1E8;
  user-select: none;
  -webkit-user-select: none;
}
.apg-globe-wrapper canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* City labels — 3D projected (desktop only) */
.apg-globe-label {
  position: absolute;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.80);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.72);
  box-shadow: 0 6px 24px rgba(17,17,17,0.10);
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: #111111;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(10px, -50%);
  transition: opacity 0.25s ease;
}
.apg-globe-label__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #C85F3D;
  flex-shrink: 0;
}
.apg-globe-label--asia .apg-globe-label__dot {
  background: #8A9099;
}
.apg-globe-label--asia {
  background: rgba(245,241,232,0.72);
  color: #4F5663;
}

/* Desktop globe in foundation section */
.foundation-system-right .apg-globe-wrapper {
  height: 620px;
  border-radius: 28px;
}
@media (min-width: 1280px) {
  .foundation-system-right .apg-globe-wrapper {
    height: 580px;
  }
}

/* ── Mobile static label grid ──────────────────────────────── */
.apg-globe-mobile-labels {
  display: none;
}

/* ── Responsive breakpoints ─────────────────────────────────── */
@media (max-width: 767px) {
  /* Globe canvas */
  .foundation-system-right .apg-globe-wrapper {
    width: min(100%, 400px);
    height: 340px;
    margin: 0 auto;
    border-radius: 20px;
  }

  /* Static city label grid shown on mobile */
  .apg-globe-mobile-labels {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    padding: 16px 0 56px;
    width: 100%;
  }

  /* Override label positioning for static (non-absolute) use */
  .apg-globe-mobile-labels .apg-globe-label {
    position: static;
    display: inline-flex;
    transform: none;
    font-size: 11px;
    padding: 5px 10px;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* Scattered vertical offsets for organic look */
  .apg-globe-mobile-labels .apg-globe-label:nth-child(1)  { transform: translateY(6px); }
  .apg-globe-mobile-labels .apg-globe-label:nth-child(2)  { transform: translateY(-4px); }
  .apg-globe-mobile-labels .apg-globe-label:nth-child(3)  { transform: translateY(10px); }
  .apg-globe-mobile-labels .apg-globe-label:nth-child(4)  { transform: translateY(2px); }
  .apg-globe-mobile-labels .apg-globe-label:nth-child(5)  { transform: translateY(-8px); }
  .apg-globe-mobile-labels .apg-globe-label:nth-child(6)  { transform: translateY(5px); }
  .apg-globe-mobile-labels .apg-globe-label:nth-child(7)  { transform: translateY(-3px); }
  .apg-globe-mobile-labels .apg-globe-label:nth-child(8)  { transform: translateY(8px); }
  .apg-globe-mobile-labels .apg-globe-label:nth-child(9)  { transform: translateY(-6px); }
  .apg-globe-mobile-labels .apg-globe-label:nth-child(10) { transform: translateY(4px); }
  .apg-globe-mobile-labels .apg-globe-label:nth-child(11) { transform: translateY(-10px); }
  .apg-globe-mobile-labels .apg-globe-label:nth-child(12) { transform: translateY(7px); }
  .apg-globe-mobile-labels .apg-globe-label:nth-child(13) { transform: translateY(-2px); }
  .apg-globe-mobile-labels .apg-globe-label:nth-child(14) { transform: translateY(9px); }
  .apg-globe-mobile-labels .apg-globe-label:nth-child(15) { transform: translateY(-5px); }
  .apg-globe-mobile-labels .apg-globe-label:nth-child(16) { transform: translateY(3px); }
}

@media (max-width: 480px) {
  .foundation-system-right .apg-globe-wrapper {
    height: 300px;
    border-radius: 16px;
  }
  .apg-globe-mobile-labels .apg-globe-label {
    font-size: 10px;
    padding: 4px 9px;
  }
}
