/* SPEEDNET FINAL RESPONSIVE SAFETY LAYER — loaded last
   Purpose: eliminate iOS/Safari horizontal rubber-band/tilt without
   changing the desktop composition or breaking normal vertical scroll. */
* { box-sizing: border-box; }
html, body { max-width: 100%; }

@media (max-width: 767px) {
  html {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    overscroll-behavior-x: none !important;
    -webkit-text-size-adjust: 100%;
  }

  body {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: hidden !important;
    overscroll-behavior-x: none !important;
    position: relative !important;
    touch-action: pan-y pinch-zoom !important;
  }

  /* A transformed/positioned child must never become a page-wide layer. */
  body > *, main > *, header, footer, section,
  .hero, .section, .workflow-section, .services,
  .speednet-infra-visual, .optical-coverage-stage,
  .contact-form-section, .speednet-footer {
    max-width: 100% !important;
    min-width: 0 !important;
  }

  /* Clip decorative artwork at the section boundary. */
  .hero, .section, .workflow-section, .services,
  .speednet-infra-visual, .optical-coverage-stage,
  .contact-form-section, .speednet-footer {
    overflow-x: hidden !important;
  }

  /* Never let a fixed utility create horizontal visual overflow. */
  .float, .sn-top, .sn-progress, .sn-press-overlay {
    max-width: 100vw !important;
  }

  /* Stable mobile header/menu hit area. */
  .header { width: 100% !important; max-width: 100% !important; }
  .menu-btn {
    position: relative !important;
    z-index: 2147483003 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
  }
}


/* =========================================================
   SPEEDNET — FINAL MOBILE NODE POSITION POLISH
   Requested mobile-only composition:
   - Wireless Connectivity + Managed Wi-Fi move lower into
     the optical-fiber wave zone.
   - Sarath POP + Jasidih POP move lower into the optical
     wave zone.
   - Desktop/tablet positioning is untouched.
   ========================================================= */
@media (max-width: 767px) {
  /* Connected Services / Infrastructure */
  .speednet-infra-visual .node-b,
  .speednet-infra-visual .node-e {
    top: 355px !important;
  }

  /* Keep the center/core below the moved middle nodes */
  .speednet-infra-visual .infra-core {
    top: 390px !important;
  }

  /* Lower service row remains below the core */
  .speednet-infra-visual .node-c,
  .speednet-infra-visual .node-f {
    top: 555px !important;
  }

  /* Live Coverage / Optical Network */
  .optical-coverage-stage .n-sarath {
    top: 485px !important;
    bottom: auto !important;
  }

  .optical-coverage-stage .n-jasidih {
    top: 485px !important;
    bottom: auto !important;
  }

  /* Keep Devipur below the moved POP row */
  .optical-coverage-stage .n-devipur {
    top: 555px !important;
    bottom: auto !important;
  }
}

@media (max-width: 390px) {
  .speednet-infra-visual .node-b,
  .speednet-infra-visual .node-e {
    top: 345px !important;
  }

  .speednet-infra-visual .infra-core {
    top: 380px !important;
  }

  .speednet-infra-visual .node-c,
  .speednet-infra-visual .node-f {
    top: 545px !important;
  }

  .optical-coverage-stage .n-sarath,
  .optical-coverage-stage .n-jasidih {
    top: 465px !important;
  }

  .optical-coverage-stage .n-devipur {
    top: 550px !important;
  }
}

/* =========================================================
   SPEEDNET — MOBILE OPTICAL ALIGNMENT V3
   Based on latest iPhone screenshots.
   Coverage: upper POPs sit on the upper optical-wave routes;
   lower POPs sit on the lower routes; Devipur sits on center fiber.
   Services: middle cards stay inside the wave field without
   covering the central infrastructure core.
   Desktop untouched.
   ========================================================= */
@media (max-width: 767px) {
  /* -------- Network Coverage -------- */
  .optical-coverage-stage .n-madhupur,
  .optical-coverage-stage .n-rohini {
    top: 155px !important;
    bottom: auto !important;
  }
  .optical-coverage-stage .n-sarath,
  .optical-coverage-stage .n-jasidih {
    top: 540px !important;
    bottom: auto !important;
  }
  .optical-coverage-stage .n-devipur {
    top: 640px !important;
    bottom: auto !important;
  }
  .optical-coverage-stage .infrastructure-core {
    top: 390px !important;
  }

  /* -------- Connected Services / Infrastructure -------- */
  .speednet-infra-visual .infra-node.node-b,
  .speednet-infra-visual .infra-node.node-e {
    top: 245px !important;
    bottom: auto !important;
    width: calc(50% - 75px) !important;
    min-width: 0 !important;
  }
  .speednet-infra-visual .infra-node.node-b { left: 12px !important; right: auto !important; }
  .speednet-infra-visual .infra-node.node-e { right: 12px !important; left: auto !important; }

  /* Central core gets its own clear lane; cards no longer cover it. */
  .speednet-infra-visual .infra-core {
    top: 300px !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 25 !important;
  }

  /* Keep lower cards below the core. */
  .speednet-infra-visual .infra-node.node-c,
  .speednet-infra-visual .infra-node.node-f {
    top: 470px !important;
    bottom: auto !important;
  }
}

@media (max-width: 390px) {
  .optical-coverage-stage .n-madhupur,
  .optical-coverage-stage .n-rohini { top: 150px !important; }
  .optical-coverage-stage .n-sarath,
  .optical-coverage-stage .n-jasidih { top: 535px !important; }
  .optical-coverage-stage .n-devipur { top: 635px !important; }
  .optical-coverage-stage .infrastructure-core { top: 388px !important; }

  .speednet-infra-visual .infra-node.node-b,
  .speednet-infra-visual .infra-node.node-e {
    top: 240px !important;
    width: calc(50% - 72px) !important;
  }
  .speednet-infra-visual .infra-core { top: 298px !important; }
  .speednet-infra-visual .infra-node.node-c,
  .speednet-infra-visual .infra-node.node-f { top: 468px !important; }
}
