/* ==========================================================================
   Global Nexus — Global Network Section & 3D Globe Stylesheet
   ========================================================================== */

.gn-network-section {
  position: relative;
  width: 100%;
  background: radial-gradient(circle at 75% 45%,
      rgba(14, 65, 148, 0.28) 0%,
      rgba(7, 31, 71, 0.95) 55%,
      rgba(4, 13, 29, 0.98) 100%);
  color: #ffffff;
  padding: 0;
  margin: 0;
  min-height: 640px;
  display: flex;
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
  background-color: var(--color-navy);
}

/* Background Subtle Starfield / Grid Vignette */
.gn-network-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: radial-gradient(circle at 75% 50%, black 20%, transparent 80%);
  mask-image: radial-gradient(circle at 75% 50%, black 20%, transparent 80%);
  pointer-events: none;
  z-index: 1;
}

/* Main Content Container */
.gn-network-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container-max-width, 1260px);
  margin-left: auto;
  margin-right: auto;
  padding: clamp(60px, 8vh, 100px) clamp(20px, 4vw, 36px);
  box-sizing: border-box;
}

/* --- Left Column: Content --- */
.gn-network-content {
  max-width: 620px;
}

.gn-network-eyebrow {
  display: inline-block;
  font-family: var(--font-sans, 'Inter', sans-serif) !important;
  font-size: clamp(0.6875rem, 0.65rem + 0.2vw, 0.78125rem) !important;
  font-weight: 500 !important;
  letter-spacing: 1.3px !important;
  text-transform: uppercase !important;
  color: rgba(255, 255, 255, 0.65) !important;
  margin-bottom: clamp(8px, 1.2vw, 12px) !important;
  position: relative;
}

.gn-network-eyebrow::after {
  content: "";
  display: block;
  width: clamp(22px, 2vw, 28px);
  height: clamp(1.5px, 0.2vw, 2px);
  background-color: var(--color-red-deep, #8D0707);
  margin-top: 8px;
}

@media (max-width: 767px) {
  .gn-network-eyebrow {
    font-size: 0.6875rem !important;
    letter-spacing: 1.1px !important;
    margin-bottom: 6px !important;
  }
  .gn-network-eyebrow::after {
    width: 20px !important;
    height: 1.5px !important;
    margin-top: 8px !important;
  }
}

.gn-network-title {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  color: #ffffff;
  overflow-wrap: break-word;
  word-break: normal;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  margin-bottom: 0.4em;
}

.gn-network-title-sub {
  display: block;
  margin-top: 4px;
}

.gn-network-body {
  font-family: var(--font-sans, 'Inter', sans-serif);
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 28px;
}

.gn-network-body p {
  font-family: var(--font-sans, 'Inter', sans-serif) !important;
  font-size: clamp(0.92rem, 1.6vw, 1.05rem) !important;
  line-height: 1.6 !important;
  color: rgba(255, 255, 255, 0.82) !important;
  max-width: 580px;
  margin-bottom: 1.2em;
}

.gn-network-body p:last-child {
  margin-bottom: 0;
}

.gn-network-body a {
  font-size: inherit !important;
  color: #2ea3f2 !important;
  border-bottom: 1px dashed rgba(46, 163, 242, 0.6) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: color 0.2s ease, border-color 0.2s ease !important;
}

.gn-network-body a:hover {
  color: #FFFFFF !important;
  border-color: #FFFFFF !important;
}

.gn-network-body a svg {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  display: inline-block;
  vertical-align: middle;
}

/* Location Groups & Interactive Badges */
.gn-locations-group {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  display: none;
}

.gn-locations-label {
  font-family: var(--font-sans, 'Inter', sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.gn-locations-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.gn-location-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0px 14px;
  background: rgba(7, 31, 71, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 40px;
  font-family: var(--font-sans, 'Inter', sans-serif);
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  user-select: none;
}

.gn-location-item:hover {
  background: rgba(14, 65, 148, 0.55);
  border-color: rgba(96, 165, 250, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.gn-location-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.gn-location-dot.is-red {
  background-color: var(--color-red, #DC2626);
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.8);
}

.gn-location-dot.is-blue {
  background-color: #60A5FA;
  box-shadow: 0 0 8px rgba(96, 165, 250, 0.8);
}

/* --- Right Column: 3D Globe Canvas (Flush to Right Viewport Edge) --- */
.gn-network-globe-col {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 58vw;
  max-width: 1180px;
  height: 100%;
  z-index: 1;
  pointer-events: auto;
  overflow: visible;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* Fallback if nested inside gn-network-container in custom page builders */
.gn-network-container .gn-network-globe-col {
  position: absolute;
  top: 0;
  right: calc(-1 * (100vw - 100%) / 2);
  width: 58vw;
  max-width: 1180px;
  height: 100%;
}

.gn-globe-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.gn-globe-canvas-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 1) 12%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 1) 12%);
}

.gn-globe-canvas-wrapper:active {
  cursor: grabbing;
}

.gn-globe-canvas-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Interactive Floating Tooltip */
.gn-globe-tooltip {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  background: rgba(7, 31, 71, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  padding: 4px 20px 16px 20px;
  border-radius: 6px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.08s linear;
  z-index: 100;
  white-space: nowrap;
}

.gn-tooltip-badge {
  display: inline-block;
  font-family: var(--font-sans, 'Inter', sans-serif);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0px;
  margin-bottom: 12px;
}

.gn-tooltip-badge.is-hq {
  color: #F87171;
  border-bottom: 1px solid rgba(220, 38, 38, 0.4);
}

.gn-tooltip-badge.is-alliance {
  color: #93C5FD;
  border-bottom: 1px solid rgba(37, 99, 235, 0.4);
}

.gn-tooltip-name {
  font-family: var(--font-sans, 'Inter', sans-serif);
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  line-height: 150%;
}

.gn-tooltip-role {
  font-family: var(--font-sans, 'Inter', sans-serif);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 2px;
  line-height: 150%;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 980px) {
  .gn-network-section {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: clamp(48px, 6vw, 64px) 0 0 0;
    min-height: auto;
  }

  .gn-network-container {
    padding: 0 clamp(20px, 4vw, 36px);
    pointer-events: auto;
    margin-bottom: clamp(6px, 1.5vw, 12px);
  }

  .gn-network-content {
    max-width: 100%;
  }

  .gn-network-globe-col,
  .gn-network-container .gn-network-globe-col {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    max-width: 100%;
    height: clamp(440px, 50vh, 520px);
    margin: 0;
    pointer-events: none !important;
    user-select: none;
    overflow: hidden;
  }

  .gn-globe-container,
  .gn-globe-canvas-wrapper,
  .gn-globe-canvas-wrapper canvas {
    width: 100%;
    height: 100%;
    margin-right: 0;
    pointer-events: none !important;
    touch-action: pan-y !important;
  }
}

@media (max-width: 640px) {
  .gn-network-section {
    padding: clamp(36px, 5vw, 44px) 0 0 0;
  }

  .gn-network-globe-col,
  .gn-network-container .gn-network-globe-col {
    height: clamp(340px, 46vh, 400px);
  }

  .gn-location-item {
    font-size: 12px;
    padding: 6px 12px;
  }
}