/* ═════════ SECTION 4 · ONE TEAM HUB (emblem connected to every service) ═════════ */
.section4 {
  position: relative;
  padding: 120px 0 100px;
}

.s4-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  margin-bottom: 48px;
}

/* the hub keeps the same proportions as the SVG (1000 × 560) */
.s4-hub {
  position: relative;
  aspect-ratio: 1000 / 560;
  max-width: 1100px;
  margin: 0 auto;
}

.s4-hub::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(20, 99, 243, 0.22), transparent);
  pointer-events: none;
}

.s4-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.s4-base {
  fill: none;
  stroke: rgba(157, 187, 255, 0.18);
  stroke-width: 1.2;
}

.s4-pulse {
  fill: none;
  stroke: #7EA8FF;
  stroke-width: 2;
  stroke-linecap: round;
  filter: drop-shadow(0 0 4px #5B95FF);
}

.s4-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 24%;
  display: grid;
  place-items: center;
  z-index: 2;
  border-color: rgba(91, 149, 255, 0.45);
  box-shadow: var(--highlight), 0 0 0 8px rgba(20, 99, 243, 0.06), 0 0 60px rgba(20, 99, 243, 0.45);
}

.s4-core img {
  width: 56%;
  filter: drop-shadow(0 0 10px rgba(20, 99, 243, 0.8));
}

.s4-core::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px solid rgba(91, 149, 255, 0.6);
  animation: s4-ring 2.6s var(--ease) infinite;
}

@keyframes s4-ring {
  from { transform: scale(1); opacity: 0.9; }
  to { transform: scale(1.7); opacity: 0; }
}

/* nodes are placed with the same coordinates as the SVG */
.s4-node {
  position: absolute;
  left: calc(var(--x) / 10 * 1%);
  top: calc(var(--y) / 5.6 * 1%);
  transform: translate(-50%, -26px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  z-index: 2;
}

/* top row: label above the icon */
.s4-node.is-top {
  flex-direction: column-reverse;
  transform: translate(-50%, calc(-100% + 26px));
}

.s4-ico {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--blue-soft);
  transition: transform 0.4s var(--ease), border-color 0.3s, box-shadow 0.3s, color 0.3s;
}

.s4-ico svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.s4-name {
  font-size: 0.8rem;
  color: var(--text-dim);
  white-space: nowrap;
  transition: color 0.3s;
}

.s4-node:hover .s4-ico,
.s4-node.is-ping .s4-ico {
  color: #fff;
  border-color: rgba(91, 149, 255, 0.65);
  box-shadow: var(--highlight), 0 0 26px rgba(20, 99, 243, 0.55);
}

.s4-node:hover .s4-ico {
  transform: translateY(-3px);
}

.s4-node:hover .s4-name,
.s4-node.is-ping .s4-name {
  color: var(--text);
}

/* small screens: simple grid around the emblem */
@media (max-width: 760px) {
  .s4-hub {
    aspect-ratio: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px 8px;
  }

  .s4-hub::before,
  .s4-lines { display: none; }

  .s4-core {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    grid-column: 1 / -1;
    justify-self: center;
    width: 76px;
    margin-bottom: 8px;
  }

  .s4-node,
  .s4-node.is-top {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    flex-direction: column;
  }

  .s4-name {
    white-space: normal;
    text-align: center;
    font-size: 0.74rem;
  }
}
