/**
 * NetPro mobile shell — fixes WebKit/Samsung RTL scroll bugs.
 * Layout: html/body = RTL + 100vw lock.
 */

/* --- Viewport lock (never use % of a wide parent) --- */
html.np-root {
  width: 100%;
  max-width: 100vw;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  direction: rtl;
  -webkit-text-size-adjust: 100%;
}

body.np-body {
  width: 100%;
  max-width: 100vw;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  direction: rtl;
  display: block;
  min-height: 100vh;
}

/* Hebrew content RTL */
.np-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  box-sizing: border-box;
  direction: rtl;
  text-align: right;
}

.np-shell * {
  box-sizing: border-box;
}

.np-shell .np-site,
.np-shell .np-home-flow,
.np-shell .np-header,
.np-shell > main,
.np-shell > section,
.np-shell > footer {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.np-home-flow {
  overflow-x: hidden;
}

.np-container,
.np-container-narrow {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 1.5rem);
}

@media (min-width: 1024px) {
  .np-container {
    max-width: min(1180px, calc(100vw - 2.5rem));
  }
}

/* Hero */
.np-hero-full {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  contain: layout style paint;
}

.np-hero-full__img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  object-fit: cover;
}

.np-home-flow img:not(.np-logo img):not(.np-logo-footer img),
.np-home-flow video:not(.np-hover-video__el) {
  max-width: 100%;
  height: auto;
}

.gh-content .kg-width-wide,
.gh-content .kg-width-full {
  width: 100% !important;
  max-width: 100% !important;
  margin-inline: 0 !important;
  transform: none !important;
}

/* ========== MOBILE ========== */
@media (max-width: 1023px) {
  html.np-root,
  body.np-body,
  .np-shell {
    width: 100vw !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .np-header-desk,
  [data-np-header-desk] {
    display: none !important;
  }

  .np-header-mob {
    display: block !important;
    width: 100vw !important;
    max-width: 100vw !important;
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    overflow: hidden !important;
    background: var(--np-glass, var(--np-bg2));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--np-line);
  }

  .np-header.np-header--home,
  .np-header.np-header--page {
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    overflow: hidden !important;
  }

  .np-home-spacer {
    display: none !important;
    height: 0 !important;
  }

  .np-body.np-has-fixed-header .np-hero-full {
    min-height: calc(100vh - var(--np-header-h, 3.5rem));
    min-height: calc(100dvh - var(--np-header-h, 3.5rem));
  }

  .np-body.np-has-fixed-header .np-hero-full__img {
    object-position: center bottom;
  }

  .np-header-mob__inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    padding: 0.6rem clamp(0.75rem, 3vw, 1rem);
    gap: 0.5rem;
  }

  .np-header-mob .np-logo {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 50%;
  }

  .np-header-mob .np-logo img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
  }

  .np-header-actions--mob {
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
  }

  .np-burger {
    display: inline-flex !important;
    min-width: 44px;
    min-height: 44px;
  }

  .np-mobile-solutions-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--np-line-strong);
    background: var(--np-elev);
    color: var(--np-text);
    font: inherit;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
  }

  .np-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 1195;
    background: rgba(3, 7, 18, 0.55);
  }

  .np-drawer {
    position: fixed !important;
    top: var(--np-header-h, 3.5rem) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    bottom: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 1200 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    background: var(--np-bg2) !important;
    border-top: 1px solid var(--np-line);
    transform: none !important;
  }

  .np-drawer[hidden] {
    display: none !important;
  }

  .np-drawer.np-drawer--open {
    display: block !important;
  }

  .np-drawer-inner {
    width: 100%;
    max-width: 100vw;
    padding: 1rem clamp(0.75rem, 4vw, 1.25rem) 2.5rem;
  }

  body.np-drawer-open {
    overflow: hidden !important;
  }

  .np-media-grid {
    grid-template-columns: 1fr !important;
  }

  .np-services-10-grid,
  .np-post-grid,
  .np-project-grid,
  .np-footer-grid,
  .np-support-band-inner {
    grid-template-columns: 1fr !important;
  }

  .np-services-10-grid > .np-svc-card:nth-child(9),
  .np-services-10-grid > .np-svc-card:nth-child(10) {
    grid-column: auto !important;
  }
}

/* ========== DESKTOP ========== */
@media (min-width: 1024px) {
  .np-header-mob {
    display: none !important;
  }

  .np-header-desk {
    display: block !important;
  }

  .np-drawer,
  .np-drawer-backdrop,
  .np-mobile-solutions-btn,
  .np-burger {
    display: none !important;
  }

  .np-header-inner--flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .np-nav-desktop {
    display: flex !important;
    flex: 1 1 auto;
    min-width: 0;
    overflow: visible !important;
    justify-content: center;
  }

  .np-mega[hidden] {
    display: none !important;
  }

  .np-mega:not([hidden]) {
    display: block !important;
  }
}

/* Drawer solutions */
.np-drawer-solutions {
  margin: 0.75rem 0 1rem;
  border: 1px solid var(--np-line);
  border-radius: var(--np-radius-sm);
  background: var(--np-elev);
}

.np-drawer-solutions__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0.65rem 1rem;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.np-drawer-solutions__summary::-webkit-details-marker {
  display: none;
}

.np-drawer-solutions__panel .np-mega-links a,
.np-drawer-primary .nav a {
  display: block;
  min-height: 44px;
  padding: 0.55rem 0;
}

.np-drawer-primary ul.nav {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
}

.np-header-mob {
  display: none;
}

.np-header-desk {
  display: block;
}

.np-mobile-solutions-btn {
  display: none;
}
