/* =====================================================================
   CogentNext — USA Landing Page  |  mobile.css  (tablet / mobile)
   ---------------------------------------------------------------------
   Responsive overrides only. Loads AFTER style.css. All rules scoped
   under .lp-usa / .lp-usa-body. Isolated to the /microsoft-dynamics-365-consulting-usa/
   landing page.
   ===================================================================== */

/* ------------------------------------------------------------------ *
 * >= 1200px : nothing (base styles apply)
 * ------------------------------------------------------------------ */

/* ------------------------------------------------------------------ *
 * <= 1199px : ease the widest layouts
 * ------------------------------------------------------------------ */
@media (max-width: 1199px) {
  .lp-usa .lp-heading { font-size: 31px; }
  .lp-usa .lp-hero__title { font-size: 38px; }
  .lp-usa .lp-process__flow { gap: 48px 28px; }
  .lp-usa .lp-nav__list { gap: 24px; }
}

/* ------------------------------------------------------------------ *
 * <= 1105px : below the 1106px Figma design width — sections that use
 * fixed Figma coordinates drop them and stack fluidly
 * ------------------------------------------------------------------ */
@media (max-width: 1105px) {
  /* Hero keeps the DESKTOP overlay layout on mobile: the banner image
     fills the hero and the copy sits on top of the banner's light left
     zone (background pinned left so that zone stays behind the text). */
  .lp-usa .lp-hero { overflow: hidden; }
  .lp-usa .lp-hero__grid {
    display: block;
    min-height: 360px;
    padding-top: 84px;
    padding-bottom: 36px;
    text-align: left;
  }
  .lp-usa .lp-hero__media {
    position: absolute;
    inset: 0;
    order: 0;
    width: auto;
    max-width: none;
    height: auto;
    min-height: 0;
    aspect-ratio: auto;
    margin: 0;
    transform: none;
    background-position: left center;
    background-size: cover;
  }
  .lp-usa .lp-hero__copy { max-width: none; padding-top: 0; }
  .lp-usa .lp-hero__text { margin-left: 0; margin-right: 0; }

  /* --- Intro : single column, image above the copy --- */
  .lp-usa .lp-intro__grid {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 0 24px;
    align-items: start;
  }
  .lp-usa .lp-intro__media { padding-left: 0; }
  .lp-usa .lp-intro__media img {
    width: 100%;
    max-width: 460px;
    height: auto;
    min-height: 0;
    aspect-ratio: 351 / 234.03;
    margin: 0;
  }
}

/* ------------------------------------------------------------------ *
 * <= 991px : tablet — collapse nav, 2-up grids
 * ------------------------------------------------------------------ */
@media (max-width: 991px) {
  .lp-usa section { padding: 64px 0; }
  .lp-usa .lp-container { padding: 0 20px; }

  /* --- Header : mobile nav --- */
  .lp-usa .lp-header__toggle { display: block; }
  .lp-usa .lp-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #2b2b2b;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    max-height: 0;
    overflow: hidden;
    transition: max-height .28s ease;
  }
  .lp-usa .lp-header--open .lp-nav { max-height: 80vh; overflow-y: auto; }
  .lp-usa .lp-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 20px;
  }
  .lp-usa .lp-nav__item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .lp-usa .lp-nav__link {
    width: 100%;
    justify-content: space-between;
    padding: 15px 0;
    font-size: 16px;
  }
  .lp-usa .lp-nav__item--cta { border-bottom: 0; padding-top: 16px; }
  .lp-usa .lp-nav__item--cta .lp-btn { width: 100%; justify-content: center; font-size: 15px; padding: 14px 18px; }

  /* Services sub-menu : accordion on mobile */
  .lp-usa .lp-nav__sub {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    background: transparent;
    padding: 0 0 10px 6px;
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .lp-usa .lp-nav__item--has-sub.is-open .lp-nav__sub { max-height: 520px; }
  .lp-usa .lp-nav__item--has-sub.is-open .lp-nav__subtoggle i { transform: rotate(180deg); }

  /* hamburger -> X */
  .lp-usa .lp-header--open .lp-header__toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .lp-usa .lp-header--open .lp-header__toggle span:nth-child(2) { opacity: 0; }
  .lp-usa .lp-header--open .lp-header__toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  /* --- Hero : desktop-style overlay, tightened vertical rhythm --- */
  .lp-usa .lp-hero__grid { min-height: 330px; padding-top: 76px; padding-bottom: 32px; }
  .lp-usa .lp-hero__media { min-height: 0; margin-bottom: 0; }
  .lp-usa .lp-hero__copy { padding-top: 0; }

  /* --- Intro : single column, image centered above the copy
       (base coords already reset in the max-width:1105 block) --- */
  .lp-usa .lp-intro__media img { max-width: 420px; margin: 0 auto 28px; }

  /* --- Services : 2-up --- */
  .lp-usa .lp-services__grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }

  /* --- Process : 2-up, drop connector arrows + the desktop snake placement --- */
  .lp-usa .lp-process__flow { grid-template-columns: repeat(2, 1fr); gap: 40px 24px; }
  .lp-usa .lp-step:nth-child(5),
  .lp-usa .lp-step:nth-child(6),
  .lp-usa .lp-step:nth-child(7) { grid-column: auto; grid-row: auto; }
  .lp-usa .lp-step::after,
  .lp-usa .lp-step--turn::before { display: none; }

  /* --- Why : 2-up, strip the desktop 6-col offset/divider choreography --- */
  .lp-usa .lp-why__grid { grid-template-columns: repeat(2, 1fr); gap: 34px; max-width: 640px; }
  .lp-usa .lp-why__item,
  .lp-usa .lp-why__item:nth-child(1),
  .lp-usa .lp-why__item:nth-child(2),
  .lp-usa .lp-why__item:nth-child(3),
  .lp-usa .lp-why__item:nth-child(4),
  .lp-usa .lp-why__item:nth-child(5) {
    grid-column: auto;
    justify-self: stretch;
    max-width: none;
    border-right: 0;
    padding: 0;
  }

  /* --- Industries --- */
  .lp-usa .lp-industries__grid { grid-template-columns: 1fr; gap: 32px; }
  .lp-usa .lp-industries__media { height: auto; }
  .lp-usa .lp-industries__media img { height: auto; }   /* natural aspect when stacked */

  /* --- Markets --- */
  .lp-usa .lp-markets__grid { grid-template-columns: 1fr; gap: 24px; }
  .lp-usa .lp-panel { padding: 36px 30px; }
}

/* ------------------------------------------------------------------ *
 * <= 767px : phone — single column everywhere
 * ------------------------------------------------------------------ */
@media (max-width: 767px) {
  .lp-usa section { padding: 52px 0; }
  .lp-usa .lp-heading { font-size: 26px; margin-bottom: 34px; }
  .lp-usa .lp-hero__title { font-size: 28px; }
  .lp-usa .lp-hero__text { font-size: 15px; }

  .lp-usa .lp-hero__grid { min-height: 300px; padding-top: 64px; }
  .lp-usa .lp-hero__media { min-height: 0; }

  .lp-usa .lp-services__grid { grid-template-columns: 1fr; }
  .lp-usa .lp-process__flow { grid-template-columns: 1fr; gap: 34px; }
  .lp-usa .lp-why__grid { grid-template-columns: 1fr; gap: 28px; }

  .lp-usa .lp-card { padding: 26px 24px; }
  .lp-usa .lp-callout { flex-direction: column; gap: 14px; padding: 22px 22px; }

  .lp-usa .lp-industry { grid-template-columns: 56px 1fr; gap: 14px; }
  .lp-usa .lp-industry__icon { width: 56px; height: 57px; }

  .lp-usa .lp-states { gap: 10px; }
  .lp-usa .lp-states__item { padding: 10px 16px; font-size: 13.5px; }

  .lp-usa .lp-pillars { gap: 4px; }
  .lp-usa .lp-pillars__item { width: 52px; }
  .lp-usa .lp-pillars__icon { width: 40px; height: 40px; }
  .lp-usa .lp-pillars__label { font-size: 12.5px; }
  .lp-usa .lp-pillars__plus { padding-top: 12px; }

  .lp-usa .lp-accordion__q { font-size: 15.5px; padding: 20px 22px; }
  .lp-usa .lp-accordion__a { padding: 0 22px 22px; }
}

/* ------------------------------------------------------------------ *
 * <= 479px : small phones
 * ------------------------------------------------------------------ */
@media (max-width: 479px) {
  .lp-usa .lp-container { padding: 0 16px; }
  .lp-usa .lp-hero__title { font-size: 23px; }
  .lp-usa .lp-hero__grid { min-height: 264px; padding-top: 56px; }
  .lp-usa .lp-hero__media { min-height: 0; }
  .lp-usa .lp-heading { font-size: 23px; }
  .lp-usa .lp-header__logo img { width: 140px; }
  .lp-usa .lp-step__badge { width: 96px; height: 96px; }
  .lp-usa .lp-pillars { flex-wrap: wrap; justify-content: center; }
  .lp-usa .lp-pillars__plus { display: none; }
}
