/* qa-f-rwd-narrow — phone / tablet-portrait fixes (<= 991px) */
@media screen and (max-width: 991px) {
  html, body { overflow-x: clip; }

  /* What You Get: keep the big sentence inside the content column */
  .what_you_get_section .container { max-width: 100%; }
  .what_you_get-text,
  .what_you_get-text-mobile {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
    font-size: clamp(2rem, 4.6vw, 3.4rem);
    line-height: 1.22;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }
  .what_you_get-text [data-connect],
  .what_you_get-text-mobile [data-connect] {
    display: inline-block;
    width: 2.3em;
    height: 0.9em;
    overflow: hidden;
    vertical-align: middle;
    white-space: nowrap;
  }

  /* Section labels / sub-copy */
  .label { font-size: max(11px, 0.9em); }
  .max-width-389 p, .max-width-389 { font-size: max(14px, 1em); }

  /* Pricing */
  .service-top-content p,
  .service-list-item p,
  .service-bottom-content p { font-size: 14px; line-height: 1.45; }
  .price-line-usd, .price-line-usd .price-mo { font-size: 12px; }
  .price-line-inr .price-mo { font-size: 12px; }

  /* Testimonials */
  .swiper-card p,
  .swiper-card .text-weight-medium { font-size: 14px; }
  .swiper-card .client-text-small,
  .swiper-card .client-text-link { font-size: 12px; }

  /* FAQ + footer */
  .faq-heading { font-size: max(14px, 1em); }
  .faq-answer, .faq-answer a { font-size: 14px; line-height: 1.5; }
  .site-footer-mini-copy,
  .site-footer-mini-links a { font-size: 13px; }

  /* CTA: content must stay visible once revealed */
  .cta_heading { max-width: 100%; overflow-wrap: break-word; }
  .cta-text { font-size: 14px; }
  .cta-chat, .cta-button { max-width: 100%; box-sizing: border-box; }
}

/* ================================================================
   MOBILE HERO rebalance (<=767px): fills 100svh, building bleeds up
   behind the features, dark menu button while at the hero.
   ================================================================ */
@media screen and (max-width: 767px) {
  /* Skip link was peeking as a yellow bar at the top edge. */
  .wx-skip-link:not(:focus) { top: -120px; }

  .hero-sticky {
    min-height: 100svh !important;
    height: 100svh !important;
    padding-top: clamp(96px, 15svh, 130px) !important;
    padding-bottom: 28px !important;
    justify-content: flex-start !important;
  }
  .hero-sticky::before {
    background-image:
      linear-gradient(180deg, rgba(11,11,13,.65) 0, rgba(11,11,13,0) 110px),
      linear-gradient(180deg, #0b0b0d 0%, #0b0b0d 40%, rgba(11,11,13,.75) 54%, rgba(11,11,13,.25) 70%, rgba(11,11,13,0) 85%),
      url("../img/hero/hero-dark-960.webp");
    background-size: 100% 100%, 100% 100%, auto 64%;
    background-position: center top, center top, right bottom;
  }
  .hero-heading {
    font-size: var(--wx-hfs) !important;
    line-height: 1.02 !important;
    letter-spacing: -0.02em;
  }
  .hero-right-text { font-size: 16px !important; line-height: 1.5 !important; }
  .hero-buttons-wrap { margin-top: 22px !important; }
  .hero-card-3 {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 18px 20px !important;
    margin-top: 26px !important;
  }
  .hero-card-3-item { gap: 10px !important; }
  .hero-card-3-item p { font-size: 14px !important; }
  .hero-card-3-icon { width: 22px !important; height: 22px !important; }

  /* Menu button: dark glass on the hero, cream again after scroll. */
  html.at-hero .mobile-menu {
    background-color: rgba(255,255,255,.1) !important;
    border: 1px solid rgba(255,255,255,.18) !important;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }
  html.at-hero .mobile-menu *,
  html.at-hero .mobile-menu svg { color: #fff !important; fill: #fff !important; stroke: none !important; }
}

/* Owner: no "About Us" button in the hero (all widths). On desktop the
   visible hero CTAs are the sidebar's FLIP'd .nav-button / .nav-button-secondary;
   on mobile they are the hero's own .hero-cta-button / .hero-button. */
.nav-button-secondary,
.hero-button { display: none !important; }

/* Phone header = three floating chips of one height (owner reference: the
   NESH template's phone header), not a full-width cream bar: wordmark chip
   left, "Let's Build" + menu right, 20px side gutters, 8px between chips.
   The wordmark chip carries the cream fill the bar used to, so the logo
   stays readable over dark sections; over the dark hero it goes clear. */
@media screen and (max-width: 767px) {
  .navigation {
    background: transparent !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  .nav-top-layout { padding-top: 16px !important; }
  .nav-top-item { align-items: center !important; height: 40px !important; }
  .nav-logo {
    height: 40px !important;
    min-width: 0 !important;
    width: auto !important;
    padding: 0 12px !important;
    background-color: rgba(235, 234, 218, 0.94) !important;
    border-radius: 8px !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: background-color .25s ease;
  }
  /* Over the hero the wordmark chip is dark glass (like the menu button),
     so the logo never sits bare on the hero text while scrolling back up. */
  html.at-hero .nav-logo { background-color: rgba(255,255,255,.1) !important; border: 1px solid rgba(255,255,255,.18); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
  .nav-logo-item {
    width: 114px !important;
    min-width: 114px !important;
    height: 22px !important;
    margin: 0 !important;
    left: 0 !important;
    transform: none !important;
  }
  .mobile-menu-wrap { gap: 8px !important; align-items: center !important; height: 40px !important; }
  .nav-button-mobile {
    height: 40px !important;
    min-height: 0 !important;
    padding: 0 16px !important;
    font-size: 14px !important;
    line-height: 1 !important;
    border-radius: 8px !important;
    align-items: center !important;
    margin: 0 !important;
  }
  .mobile-menu {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    margin: 0 !important;
    border-radius: 8px !important;
    display: flex !important;
    flex-direction: column;
    align-items: center !important;
    justify-content: center !important;
  }
  .nav-menu-wrap { padding-top: 66px !important; }

  /* About: the section's 134px top padding left a screen-height blank
     under the hero on phones; match the other sections' rhythm. */
  .about-section { padding-top: 56px !important; }
  /* ...and the hero ended ~50-90px below its one-screen sticky layer
     (min-height + bottom padding), adding a blank cream band on top. */
  .hero { min-height: 0 !important; height: auto !important; padding-bottom: 0 !important; }
}
/* Narrow phones (<360): tighten so all three chips still fit a 320 screen. */
@media screen and (max-width: 359px) {
  .nav-logo { padding: 0 10px !important; }
  .nav-logo-item { width: 98px !important; min-width: 98px !important; height: 19px !important; }
  .nav-button-mobile { padding: 0 12px !important; font-size: 13px !important; }
  .mobile-menu-wrap { gap: 6px !important; }
}

/* Work cards (phone + tablet): the template sizes the arrow + its swap copy
   below 992px but leaves their clipping box (.work-card-arrow-icon) at
   1.25vw = ~4px, so the yellow button showed a speck instead of an arrow. */
@media screen and (max-width: 991px) {
  .work-card-arrow-icon {
    width: clamp(.85rem, 4.27vw, 2.05rem) !important;
    height: clamp(.85rem, 4.27vw, 2.05rem) !important;
  }
}

@media screen and (max-width: 767px) {
  /* Work cards: deeper bottom scrim so screenshot text (e.g. "Shop Owner")
     doesn't show through the card description. */
  .work-card-content {
    background-image: linear-gradient(rgba(0,0,0,.3), rgba(0,0,0,.02) 38%, rgba(0,0,0,.78) 72%, rgba(0,0,0,.94) 100%) !important;
  }

  /* Open menu: links as an even two-column grid of equal pills instead of
     a ragged left-aligned column that left half the panel empty. */
  .nav-menu {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px !important;
    padding-right: 15px !important;
  }
  .nav-menu-item { width: auto !important; }

  /* Contact form: labels/legend/"(optional)" were 11.5px. */
  .wx-field-label, .wx-contact-section legend, .wx-opt { font-size: 12.5px !important; }

  /* Tap targets: "Read more" was 34px tall. */
  .about-card-button { min-height: 40px !important; }

  /* Footer links: separators dangled at line ends once the row wrapped, and
     the links were 20px tall. Drop the dots, space the links, 40px targets. */
  .site-footer-mini-links { gap: 0 20px !important; flex-wrap: wrap !important; }
  .site-footer-mini-links > span { display: none !important; }
  .site-footer-mini-links a { display: inline-flex !important; align-items: center; min-height: 40px; }
}

/* What You Get (phones): bring back the inline icon chips (owner reference:
   NESH shows them). They were hidden because MagneticPositions only
   positions them once on phones, at load, before TextReveal re-flows the
   sentence. index.html now re-runs the positioning once the section is in
   view (see #wx-capa-mobile). */
@media screen and (max-width: 767px) {
  .capa-cards-wrap { display: flex !important; }
  .what_you_get-text-mobile .span,
  .what_you_get-text-mobile [data-connect="i-mobile"] { display: inline-block !important; }
}

/* CTA: "Operations Today" was darkened for legibility but kept the
   template's 1px white text-stroke, which read as a smudged ghost copy. */
.cta_heading .cta-span-heading, .cta_heading .cta-span-heading .line { -webkit-text-stroke: 0 transparent !important; }

@media screen and (max-width: 767px) {
  /* Menu links were ~11.5px (NESH ~15px). */
  .nav-menu .hero-navigation-link { font-size: 14px !important; }
  /* Contact form service chips: chips in the same row share its height
     (label centred), so one- and two-line chips don't make a ragged grid. */
  .wx-chip, .wx-chip span { height: 100%; }
  .wx-chip span { display: flex !important; align-items: center; }
}
@media screen and (max-width: 359px) {
  .wx-chip span { font-size: 13px !important; padding: 9px 10px !important; gap: 8px; }
}

/* Tablet portrait (768-991): the side panel + stacked timeline layout. */
@media screen and (min-width: 768px) and (max-width: 991px) {
  /* What You Get kept the desktop 100vh min-height while its content is
     ~440px, leaving a ~350px blank band before Services. */
  .what_you_get_section { min-height: 0 !important; }

  /* Side panel: nav labels were 10.5px and stat labels 10px. */
  .nav-container .hero-navigation-link { font-size: 12px !important; }
}

/* Phone header: past the hero the logo chip becomes the yellow WEBX(R)
   chip (same as the desktop sidebar's, owner request / NESH's phone
   header); over the dark hero it stays the Webnixian wordmark. From 768px
   up the sidebar carries the WEBX chip itself. */
@media screen and (max-width: 767px) {
  html:not(.at-hero) .nav-logo { background-color: #ffff23 !important; padding: 0 20px 0 14px !important; }
  html:not(.at-hero) .nav-logo-item {
    background-image: none !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
  }
  html:not(.at-hero) .nav-logo .nesh-logo { position: relative !important; display: flex !important; align-items: center; }
  html:not(.at-hero) .nav-logo .nesh-logo-svg {
    display: block !important;
    width: 62px !important;
    height: auto !important;
    color: #000 !important;
  }
  html:not(.at-hero) .nav-logo .nesh-copyright-wrap {
    display: block !important;
    position: absolute !important;
    top: -2px !important;
    right: -9px !important;
    left: auto !important;
    width: 6px !important;
    height: 6px !important;
    opacity: 1 !important;
  }
  html:not(.at-hero) .nav-logo .nesh-copyright-icon { display: block !important; width: 6px !important; height: 6px !important; opacity: 1 !important; color: #000 !important; }
}

/* What You Get chips: the dropdown arrow beside each icon (NESH shows it)
   rendered yellow-on-yellow, leaving the chip's right half looking empty. */
.capa-card-arrow, .capa-card-arrow-wrap { color: #000 !important; }

/* Project modal close: 36px -> 44px tap target (all widths). */
.wx-project-modal-close { width: 44px !important; height: 44px !important; }

@media screen and (max-width: 767px) {
  /* CTA: the chat block reserves room below the button, so with the full
     section padding the gap to Testimonials was ~215px (others ~150px). */
  .cta_section { padding-bottom: 32px !important; }
}
