/* isp-ecosystem.css — homepage Provider Speed Tests hub (WiFi network showcase) */

.section-block--isp-ecosystem {
  overflow: hidden;
}

.section-block--isp-ecosystem .isp-hub-wrap.wrap {
  width: min(100% - 1rem, 1320px);
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

.isp-ecosystem {
  position: relative;
}

.isp-ecosystem__stage {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: auto auto auto;
  gap: clamp(0.85rem, 2vw, 1.35rem);
  align-items: stretch;
  min-height: clamp(520px, 68vw, 720px);
  padding: clamp(0.5rem, 2vw, 1rem) 0;
}

/* Connection mesh behind cards */
.isp-ecosystem__mesh {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}

.isp-ecosystem__lines line {
  stroke-dasharray: 6 10;
  animation: ispEcoLineFlow 4s linear infinite;
}

@keyframes ispEcoLineFlow {
  to {
    stroke-dashoffset: -32;
  }
}

.isp-ecosystem__pulse {
  transform-origin: 500px 350px;
  animation: ispEcoPulse 3.2s ease-out infinite;
}

.isp-ecosystem__pulse--b {
  animation-delay: 1.1s;
}

@keyframes ispEcoPulse {
  0% {
    transform: scale(0.72);
    opacity: 0.65;
  }
  70% {
    transform: scale(1.15);
    opacity: 0;
  }
  100% {
    transform: scale(1.15);
    opacity: 0;
  }
}

/* Central hero */
.isp-ecosystem__core {
  grid-column: 3;
  grid-row: 2;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: clamp(200px, 28vw, 280px);
  animation: ispEcoFloat 5s ease-in-out infinite;
}

@keyframes ispEcoFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.isp-ecosystem__device {
  width: min(100%, 220px);
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.35));
}

.isp-ecosystem__device-bezel {
  padding: 0.45rem;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(167, 243, 208, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 0 0 1px rgba(1, 65, 28, 0.25) inset,
    0 12px 36px rgba(1, 65, 28, 0.35),
    0 0 32px rgba(110, 231, 183, 0.2);
}

.isp-ecosystem__screen {
  border-radius: 10px;
  padding: 0.75rem 0.85rem 0.9rem;
  background: linear-gradient(165deg, #022c14 0%, #01411c 55%, #0a3d22 100%);
  border: 1px solid rgba(110, 231, 183, 0.25);
}

.isp-ecosystem__screen-bar {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}

.isp-ecosystem__screen-bar span {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: rgba(167, 243, 208, 0.55);
}

.isp-ecosystem__screen-bar span:first-child {
  background: #6ee7b7;
  box-shadow: 0 0 8px #6ee7b7;
}

.isp-ecosystem__meter-val {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ecfdf5;
  text-align: center;
}

.isp-ecosystem__meter-track {
  display: block;
  height: 6px;
  margin: 0.5rem 0 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.isp-ecosystem__meter-fill {
  display: block;
  height: 100%;
  width: 68%;
  border-radius: inherit;
  background: linear-gradient(90deg, #059669, #6ee7b7);
  box-shadow: 0 0 12px rgba(110, 231, 183, 0.65);
  animation: ispEcoMeter 2.8s ease-in-out infinite alternate;
}

@keyframes ispEcoMeter {
  from {
    width: 42%;
  }
  to {
    width: 88%;
  }
}

.isp-ecosystem__meter-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
  color: rgba(167, 243, 208, 0.85);
}

.isp-ecosystem__wifi-hub {
  width: 3.25rem;
  height: 3.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(110, 231, 183, 0.35), rgba(1, 65, 28, 0.85));
  border: 2px solid rgba(167, 243, 208, 0.55);
  color: #ecfdf5;
  box-shadow:
    0 0 24px rgba(110, 231, 183, 0.45),
    0 0 48px rgba(110, 231, 183, 0.15);
  animation: ispEcoWifiGlow 2.4s ease-in-out infinite alternate;
}

@keyframes ispEcoWifiGlow {
  from {
    box-shadow:
      0 0 18px rgba(110, 231, 183, 0.35),
      0 0 36px rgba(110, 231, 183, 0.12);
  }
  to {
    box-shadow:
      0 0 28px rgba(167, 243, 208, 0.65),
      0 0 56px rgba(110, 231, 183, 0.28);
  }
}

.isp-ecosystem__wifi-icon {
  width: 1.85rem;
  height: 1.85rem;
}

/* Orbit cards container — children are grid items */
.isp-ecosystem__orbit {
  display: contents;
}

.isp-ecosystem__loading {
  grid-column: 1 / -1;
  grid-row: 2;
  z-index: 1;
  text-align: center;
  padding: 2rem;
}

/* Provider cards — glass SaaS style */
.isp-ecosystem-card {
  position: relative;
  z-index: 1;
  grid-column: var(--orbit-col, auto);
  grid-row: var(--orbit-row, auto);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.05rem 1.05rem;
  min-height: 7.5rem;
  text-decoration: none;
  color: #ecfdf5;
  border-radius: 14px;
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0.06) 45%,
    rgba(1, 65, 28, 0.35) 100%
  );
  border: 1px solid rgba(167, 243, 208, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  transition:
    transform 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease;
  animation: ispEcoCardIn 0.55s ease backwards;
  animation-delay: calc(var(--orbit-i, 0) * 45ms);
}

@keyframes ispEcoCardIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
}

.isp-ecosystem-card:hover,
.isp-ecosystem-card:focus-visible {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(167, 243, 208, 0.75);
  color: #ffffff;
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.32),
    0 0 28px rgba(110, 231, 183, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.15) inset;
  outline: none;
}

.isp-ecosystem-card:focus-visible {
  outline: 2px solid #a7f3d0;
  outline-offset: 3px;
}

.isp-ecosystem-card__head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.isp-ecosystem-card__icon {
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #022c14;
  background: linear-gradient(135deg, #a7f3d0, #6ee7b7);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.isp-ecosystem-card[data-isp="ptcl"] .isp-ecosystem-card__icon {
  background: linear-gradient(135deg, #fef08a, #facc15);
}
.isp-ecosystem-card[data-isp="jazz"] .isp-ecosystem-card__icon,
.isp-ecosystem-card[data-isp="zong"] .isp-ecosystem-card__icon {
  background: linear-gradient(135deg, #fda4af, #f43f5e);
  color: #fff;
}
.isp-ecosystem-card[data-isp="stormfiber"] .isp-ecosystem-card__icon {
  background: linear-gradient(135deg, #93c5fd, #3b82f6);
  color: #fff;
}
.isp-ecosystem-card[data-isp="nayatel"] .isp-ecosystem-card__icon {
  background: linear-gradient(135deg, #c4b5fd, #7c3aed);
  color: #fff;
}
.isp-ecosystem-card[data-isp="dreamnet"] .isp-ecosystem-card__icon {
  background: linear-gradient(135deg, #fdba74, #ea580c);
  color: #fff;
}

.isp-ecosystem-card h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: inherit;
  text-shadow: 0 1px 2px rgba(1, 65, 28, 0.35);
}

.isp-ecosystem-card__desc {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: rgba(236, 253, 245, 0.88);
  flex: 1 1 auto;
}

.isp-ecosystem-card__cta {
  margin-top: auto;
  padding-top: 0.65rem;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #a7f3d0;
  border-top: 1px solid rgba(167, 243, 208, 0.25);
  transition: color 0.2s ease, letter-spacing 0.2s ease;
}

.isp-ecosystem-card:hover .isp-ecosystem-card__cta,
.isp-ecosystem-card:focus-visible .isp-ecosystem-card__cta {
  color: #ecfdf5;
  letter-spacing: 0.06em;
}

.isp-ecosystem-card__cta::after {
  content: " →";
}

/* Extra providers beyond 12 orbit slots */
.isp-ecosystem-card--overflow {
  grid-column: 2 / 5;
  grid-row: 4;
}

/* Tablet: 2-column with core on top */
@media (max-width: 1023px) {
  .isp-ecosystem__stage {
    display: flex;
    flex-direction: column;
    min-height: 0;
    gap: 1.15rem;
  }

  .isp-ecosystem__mesh {
    display: none;
  }

  .isp-ecosystem__core {
    order: -1;
    min-height: auto;
    margin-bottom: 0.5rem;
  }

  .isp-ecosystem__orbit {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .isp-ecosystem-card {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .isp-ecosystem__loading {
    grid-column: 1 / -1;
  }
}

/* Mobile: single column stack */
@media (max-width: 559px) {
  .isp-ecosystem__orbit {
    grid-template-columns: 1fr;
  }

  .isp-ecosystem-card {
    min-height: 0;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .isp-ecosystem__core,
  .isp-ecosystem__pulse,
  .isp-ecosystem__lines line,
  .isp-ecosystem__meter-fill,
  .isp-ecosystem__wifi-hub,
  .isp-ecosystem-card {
    animation: none !important;
  }

  .isp-ecosystem-card:hover,
  .isp-ecosystem-card:focus-visible {
    transform: translateY(-2px);
  }
}
