/* Nexsol mobile/responsive repair layer
   IMPORTANT: all rules are mobile/tablet only. Desktop styles (981px+) are untouched. */

@media (max-width: 980px) {
  html, body, .site {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  body { min-width: 0; }
  .site { margin: 0; box-shadow: none; }

  *, *::before, *::after { min-width: 0; }

  img, picture, video, iframe, canvas, svg {
    max-width: 100%;
  }

  img, video { height: auto; }

  .nx-wrap {
    width: min(calc(100% - 36px), 1280px) !important;
    margin-inline: auto !important;
  }

  /* Mobile navigation */
  .nx-nav {
    position: relative;
    z-index: 1000;
  }
  .nx-nav-inner {
    position: relative;
    height: 68px;
    gap: 14px;
  }
  .nx-brand,
  .nx-brand-image {
    min-width: 0;
    flex: 0 1 180px;
  }
  .nx-brand-image img {
    display: block;
    width: min(165px, 45vw);
    max-height: 48px;
    object-fit: contain;
    object-position: left center;
  }
  .menu-toggle {
    flex: 0 0 auto;
    margin-left: auto;
    min-height: 42px;
    padding: 9px 13px;
    border-radius: 4px;
    line-height: 1;
  }
  .nx-nav.open .navlinks {
    top: 68px;
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(100dvh - 68px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px 20px 20px;
    gap: 0;
    border-top: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 18px 40px rgba(0,0,0,.3);
  }
  .nx-nav.open .navlinks > a,
  .nx-nav.open .nav-drop > button {
    min-height: 48px;
    padding: 14px 4px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    font-size: 15px;
  }
  .nx-nav.open .nav-drop { width: 100%; }
  .nx-nav.open .nav-drop:hover .drop-menu { display: none; }
  .nx-nav.open .nav-drop.open .drop-menu {
    display: block !important;
    position: static;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 6px 0 8px 12px;
    border: 0;
    background: rgba(255,255,255,.035);
  }
  .nx-nav.open .drop-menu a {
    padding: 12px 8px;
    font-size: 13px;
    line-height: 1.35;
  }

  /* Prevent common responsive overflow */
  .nx-actions,
  .btn-row,
  .nx-scroll-actions,
  .nx-footer-bottom-links {
    flex-wrap: wrap;
  }
  .nx-btn,
  .btn,
  button,
  input,
  select,
  textarea {
    max-width: 100%;
  }
  h1, h2, h3, h4, p, a, span, strong, small, li {
    overflow-wrap: anywhere;
  }

  /* Shared inner-page hero treatment */
  .page-hero,
  .solution-theme-page .nx-inner-hero,
  .about-rebuild .about-hero {
    min-height: 0 !important;
    background-position: center !important;
  }
  .page-hero .hero-inner,
  .solution-theme-page .nx-inner-hero-grid,
  .about-rebuild .about-hero-grid,
  .nx-page-hero-grid {
    grid-template-columns: 1fr !important;
    min-height: 0 !important;
  }
  .page-hero .hero-copy,
  .solution-theme-page .nx-inner-hero-copy,
  .about-rebuild .about-hero-copy,
  .nx-page-hero-copy {
    width: 100%;
    max-width: 720px;
  }

  /* Generic grids/flex layouts used across the site */
  .nx-about-grid,
  .nx-solution-layout,
  .nx-challenges-grid,
  .nx-why-grid,
  .nx-industry-grid,
  .nx-trusted-grid,
  .nx-cta-inner,
  .nx-page-intro,
  .nx-page-split,
  .nx-page-split.reverse,
  .inner-professional.page-template-modern .split,
  .inner-professional.page-template-modern .contact-layout,
  .inner-professional.page-template-legacy .nx-inner-about-grid,
  .inner-professional.page-template-legacy .nx-inner-split,
  .about-rebuild .about-intro-layout,
  .about-rebuild .about-experience-layout,
  .about-rebuild .about-values-layout,
  .about-rebuild .final-cta-grid,
  main.page-contact .contact-layout {
    grid-template-columns: 1fr !important;
  }

  /* Do not allow decorative/fixed panels to force horizontal scroll */
  .nx-globe,
  .nx-about-photo,
  .nx-inner-about-photo,
  .nx-inner-image-panel,
  .split-media,
  .about-intro-media,
  .about-hero-media {
    max-width: 100%;
    overflow: hidden;
  }

  /* Tables remain usable instead of breaking the whole viewport */
  table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Consultation modal */
  .nx-consultation-modal {
    padding: 12px;
  }
  .nx-consultation-modal__dialog {
    width: min(100%, 760px) !important;
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .nx-consultation-modal__row {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  .nx-wrap {
    width: min(calc(100% - 30px), 1280px) !important;
  }

  /* Comfortable mobile type scale */
  .page-hero h1,
  .solution-theme-page .nx-inner-hero h1,
  .about-rebuild .about-hero h1,
  .nx-page-hero h1,
  .inner-professional h1 {
    font-size: clamp(36px, 10.5vw, 52px) !important;
    line-height: 1.02 !important;
    letter-spacing: -.035em !important;
  }
  main.inner-professional h2,
  main.about-rebuild h2,
  .nx-about h2,
  .nx-challenges h2,
  .nx-why h2,
  .nx-industries h2,
  .nx-process h2,
  .nx-trusted h2,
  .nx-cta h2 {
    font-size: clamp(30px, 8vw, 40px) !important;
    line-height: 1.08 !important;
  }

  /* Section spacing */
  main.inner-professional .section,
  main.inner-professional .nx-inner-about,
  main.inner-professional .nx-inner-capabilities,
  main.inner-professional .nx-inner-challenges,
  main.inner-professional .nx-inner-why,
  main.inner-professional .nx-inner-process,
  main.inner-professional .nx-inner-industries,
  main.inner-professional .nx-inner-platform-strip,
  main.about-rebuild .about-section {
    padding-top: 58px !important;
    padding-bottom: 58px !important;
  }

  /* Cards/grids stack cleanly on phones */
  .nx-partner-grid,
  .nx-solution-cards,
  .nx-challenge-list,
  .nx-why-list,
  .nx-industry-cards,
  .nx-process-steps,
  .nx-page-strip-grid,
  .nx-page-card-grid,
  .nx-page-stats,
  .nx-page-process,
  .nx-check-grid,
  main.page-template-modern .solution-grid,
  main.page-template-modern .process-row,
  main.page-template-legacy .nx-inner-partner-grid,
  main.page-template-legacy .nx-about-points,
  main.page-template-legacy .nx-solution-cards,
  main.about-rebuild .about-difference-grid,
  main.about-rebuild .about-value-panels,
  main.about-rebuild .about-process-grid,
  main.about-rebuild .awards-grid,
  main.industries-rebuild .industries-card-grid,
  .biz-challenges-grid,
  .our-solutions-cards {
    grid-template-columns: 1fr !important;
  }

  .nx-partner-grid .partner,
  .nx-inner-partner-grid .partner {
    border-right: 0 !important;
  }

  /* Buttons: full width where there are multiple CTAs, comfortable touch target */
  .nx-actions,
  .btn-row,
  .nx-scroll-actions {
    width: 100%;
    gap: 10px !important;
  }
  .nx-actions .nx-btn,
  .btn-row .nx-btn,
  .nx-scroll-actions .nx-btn,
  .nx-contact-consultation__submit {
    width: 100%;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
  }

  /* Homepage standard sections */
  .nx-hero-grid {
    grid-template-columns: 1fr !important;
    min-height: 0;
  }
  .nx-hero-copy {
    padding: 46px 0 30px;
  }
  .nx-hero h1 {
    font-size: clamp(37px, 10.5vw, 48px) !important;
    line-height: 1.02;
    letter-spacing: -.04em;
  }
  .nx-hero-visual {
    min-height: 300px;
  }
  .nx-about-copy,
  .nx-why-copy {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .nx-about-photo,
  .nx-globe {
    min-height: 280px;
  }

  /* Scroll hero remains animated, but fits a phone viewport */
  .nx-scroll-hero {
    min-height: 860px;
  }
  .nx-scroll-hero-sticky {
    min-height: 600px;
  }
  .nx-scroll-hero-intro,
  .nx-scroll-hero-details {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .nx-scroll-copy,
  .nx-scroll-proof {
    width: 100% !important;
    max-width: 100%;
  }
  .nx-scroll-copy h1 {
    font-size: clamp(42px, 13vw, 60px) !important;
  }
  .nx-scroll-copy h2 {
    font-size: clamp(25px, 7.5vw, 34px) !important;
  }
  .nx-scroll-copy p {
    font-size: 15px;
    line-height: 1.55;
  }

  /* Modern inner pages */
  main.page-template-modern > .notice-wrap,
  main.page-template-modern > .content-section,
  main.page-template-modern > .process,
  main.page-template-modern > .contact-layout,
  main.page-template-modern > .legal-content {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
  }
  main.page-template-modern > .content-section:nth-of-type(even),
  main.page-template-modern > .process:nth-of-type(even) {
    border-radius: 0;
  }
  main.page-template-modern .notice-wrap .notice {
    grid-template-columns: 1fr !important;
    padding: 30px 22px !important;
    border-radius: 18px;
  }
  main.page-template-modern .notice-wrap .notice p {
    grid-column: 1 !important;
  }
  main.page-template-modern .solution-card {
    grid-column: 1 / -1 !important;
    min-height: 0 !important;
    padding: 26px 22px !important;
  }
  main.page-template-modern .cta-card {
    margin-left: 18px !important;
    margin-right: 18px !important;
    grid-template-columns: 1fr !important;
    border-radius: 18px;
  }
  main.page-template-modern .cta-copy {
    padding: 34px 24px !important;
  }

  /* Legacy solution pages */
  main.page-template-legacy .nx-inner-partner-grid,
  main.page-template-legacy .nx-solution-layout,
  main.page-template-legacy .nx-challenges-grid,
  main.page-template-legacy .nx-why-grid,
  main.page-template-legacy .nx-process-grid {
    grid-template-columns: 1fr !important;
  }
  main.page-template-legacy .nx-challenges-grid > div:first-child {
    position: static !important;
  }
  main.page-template-legacy .nx-inner-image-panel,
  main.page-template-legacy .nx-inner-image-panel img {
    min-height: 300px !important;
  }
  main.page-template-legacy .nx-why-copy {
    padding: 34px 0 !important;
  }

  /* Business Central / Customer Engagement specific layouts */
  main.page-d365-business-central .bc-capability-grid,
  main.page-d365-business-central .bc-m365-grid,
  main.page-d365-business-central .bc-problems-grid,
  main.page-d365-business-central .bc-audience-grid,
  main.page-d365-business-central .bc-section-head-row,
  main.page-d365-business-central .bc-stepup-layout,
  main.page-d365-business-central .bc-audience-top {
    grid-template-columns: 1fr !important;
  }

  /* Industries and insights special editorial cards */
  main.page-industries .content-section:first-of-type .solution-card,
  main.page-insights .content-section .solution-card {
    grid-column: 1 / -1 !important;
    min-height: 0 !important;
  }
  main.page-industries .content-section:nth-of-type(2) .solution-card {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* Legal documents */
  main.page-legal .legal-content,
  main.page-legal .legal-content article {
    grid-template-columns: 1fr !important;
  }
  main.page-legal .legal-index {
    position: static !important;
  }

  /* About page */
  main.about-rebuild .about-hero-copy,
  main.about-rebuild .about-intro-copy,
  main.about-rebuild .about-experience-title,
  main.about-rebuild .about-experience-copy,
  main.about-rebuild .about-values-intro {
    max-width: 100%;
  }
  main.about-rebuild .about-intro-media,
  main.about-rebuild .about-hero-media {
    min-height: 300px !important;
  }

  /* Acumatica diagram/timeline */
  .ac-fit-intro,
  .ac-sector-head,
  .ac-connected-grid,
  .ac-nexsol-top,
  .ac-industry-row,
  .ac-license-compare {
    grid-template-columns: 1fr !important;
  }
  .ac-sector-grid,
  .ac-pillars {
    grid-template-columns: 1fr !important;
  }
  .ac-orbit {
    height: auto !important;
    grid-template-columns: 1fr !important;
  }
  .ac-core,
  .ac-node {
    position: static !important;
    transform: none !important;
    width: auto !important;
    max-width: 100%;
  }
  .ac-timeline {
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
  }
  .ac-timeline > div {
    width: auto !important;
    min-width: 72px;
    flex: 1 1 82px;
  }
  .ac-timeline i { display: none !important; }

  /* Solutions network visual: retain concept without forcing overflow */
  .solutions-overview-v14 .sol-network {
    min-height: 560px !important;
    max-width: 100%;
    overflow: hidden;
  }
  .solutions-overview-v14 .sol-line { display: none !important; }
  .solutions-overview-v14 .sol-node {
    width: min(118px, 34vw) !important;
    min-height: 68px;
    padding: 10px !important;
  }

  /* Footer */
  .site > .nx-footer {
    padding-top: 38px !important;
  }
  .site > .nx-footer > .nx-footer-grid,
  .site > .nx-footer > .nx-footer-bottom {
    width: min(calc(100% - 32px), 1500px) !important;
  }
  .site > .nx-footer > .nx-footer-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  .site > .nx-footer .nx-footer-brand,
  .site > .nx-footer .nx-footer-grid > div {
    grid-column: auto !important;
    align-items: center !important;
    text-align: center !important;
  }
  .site > .nx-footer .nx-footer-partners img {
    object-position: center !important;
  }
  .site > .nx-footer .nx-footer-bottom-links {
    flex-direction: column;
    align-items: center;
    gap: 8px !important;
  }
}

@media (max-width: 480px) {
  .nx-wrap { width: calc(100% - 24px) !important; }
  .nx-brand-image { flex-basis: 150px; }
  .nx-brand-image img { width: min(145px, 44vw); }
  .menu-toggle { padding-inline: 11px; }

  .page-hero h1,
  .solution-theme-page .nx-inner-hero h1,
  .about-rebuild .about-hero h1,
  .nx-page-hero h1,
  .inner-professional h1 {
    font-size: clamp(33px, 10vw, 44px) !important;
  }

  .nx-page-split-copy,
  .inner-professional.page-template-modern .split-copy,
  .inner-professional.page-template-modern .content-section,
  .inner-professional.page-template-modern .process,
  .inner-professional.page-template-modern .faq,
  .inner-professional.page-template-modern .notice-wrap,
  .inner-professional.page-template-modern .contact-layout,
  .inner-professional.page-template-modern .legal-content {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .solutions-overview-v14 .sol-network {
    min-height: 610px !important;
  }
  .solutions-overview-v14 .sol-network-core {
    width: 116px !important;
    height: 116px !important;
    font-size: 15px !important;
  }
  .solutions-overview-v14 .sol-node {
    width: 104px !important;
    font-size: 11px !important;
  }
}

/* Header CTA: compact mobile sizing only. Desktop remains untouched. */
@media (max-width: 980px) {
  .nx-nav-cta {
    width: auto !important;
    max-width: 156px !important;
    min-height: 42px !important;
    padding: 9px 14px !important;
    margin-left: 6px !important;
    font-size: 12px !important;
    line-height: 1.15 !important;
    text-align: center !important;
    border-radius: 6px !important;
  }
}

@media (max-width: 520px) {
  .nx-nav-cta {
    max-width: 132px !important;
    min-height: 40px !important;
    padding: 8px 11px !important;
    font-size: 11px !important;
    line-height: 1.12 !important;
  }
}

/* Mobile hero title alignment: center NEXSOL only. Desktop remains untouched. */
@media (max-width: 980px) {
  .nx-scroll-hero-details .nx-scroll-copy > h1 {
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
  }
}

/* Solutions page: keep the Connected Business image container fitted to the image on mobile only. */
@media (max-width: 980px) {
  main.page-solutions .solutions-overview-v14 .sol-network.sol-network--image {
    min-height: 0 !important;
    height: auto !important;
    aspect-ratio: 1586 / 992;
    overflow: hidden !important;
  }

  main.page-solutions .solutions-overview-v14 .sol-network.sol-network--image img {
    position: static !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    object-fit: cover !important;
    object-position: center !important;
  }
}

/* Footer mobile repair v5: applies to every page whether the footer sits inside or outside .site. */
@media (max-width: 980px) {
  .nx-footer {
    width: 100% !important;
    max-width: 100% !important;
    padding: 36px 0 22px !important;
    overflow: hidden !important;
  }

  .nx-footer > .nx-footer-grid,
  .nx-footer > .nx-footer-bottom,
  .nx-footer .nx-footer-grid,
  .nx-footer .nx-footer-bottom {
    width: min(calc(100% - 36px), 1500px) !important;
    max-width: calc(100% - 36px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .nx-footer > .nx-footer-grid,
  .nx-footer .nx-footer-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 26px !important;
    align-items: start !important;
  }

  .nx-footer .nx-footer-grid > div,
  .nx-footer .nx-footer-grid > div:not(:first-child),
  .nx-footer .nx-footer-brand,
  .nx-footer .nx-footer-contact,
  .nx-footer .nx-footer-partners {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    grid-column: 1 / -1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: center !important;
  }

  .nx-footer .footer-logo {
    width: auto !important;
    max-width: 190px !important;
    margin: 0 auto !important;
    justify-content: center !important;
  }

  .nx-footer .footer-logo img {
    width: 100% !important;
    max-width: 190px !important;
    height: auto !important;
    object-fit: contain !important;
    object-position: center !important;
  }

  .nx-footer strong,
  .nx-footer a,
  .nx-footer p,
  .nx-footer .nx-footer-bottom-copy,
  .nx-footer .nx-footer-bottom-copy a {
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: none !important;
  }

  .nx-footer a,
  .nx-footer p {
    font-size: 14px !important;
    line-height: 1.5 !important;
  }

  .nx-footer .nx-footer-brand p {
    width: 100% !important;
    max-width: 420px !important;
    margin: 10px auto 0 !important;
  }

  .nx-footer .nx-footer-partners img {
    width: 150px !important;
    max-width: min(150px, 70vw) !important;
    height: auto !important;
    margin-inline: auto !important;
    object-position: center !important;
  }

  .nx-footer > .nx-footer-bottom,
  .nx-footer .nx-footer-bottom {
    margin-top: 26px !important;
    padding-top: 18px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    text-align: center !important;
  }

  .nx-footer .nx-footer-bottom-links {
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px 22px !important;
  }

  .nx-footer .nx-footer-bottom-links a {
    width: auto !important;
    white-space: nowrap !important;
    font-size: 14px !important;
  }

  .nx-footer .nx-footer-bottom-copy,
  .nx-footer .nx-footer-bottom-copy a {
    font-size: 12px !important;
    line-height: 1.5 !important;
    text-align: center !important;
  }
}

@media (max-width: 520px) {
  .nx-footer > .nx-footer-grid,
  .nx-footer > .nx-footer-bottom,
  .nx-footer .nx-footer-grid,
  .nx-footer .nx-footer-bottom {
    width: calc(100% - 28px) !important;
    max-width: calc(100% - 28px) !important;
  }

  .nx-footer .nx-footer-bottom-links {
    flex-direction: column !important;
    gap: 8px !important;
  }
}

/* D365 Finance & Operations mobile refinements v6. Desktop remains untouched. */
@media (max-width: 760px) {
  /* 1) Operational complexity section: center copy, CTA and proof points. */
  main.page-d365-finance-operations .nx-inner-about .nx-about-copy {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-align: center !important;
  }

  main.page-d365-finance-operations .nx-inner-about .nx-about-copy .nx-kicker {
    justify-content: center !important;
    text-align: center !important;
  }

  main.page-d365-finance-operations .nx-inner-about .nx-about-copy h2,
  main.page-d365-finance-operations .nx-inner-about .nx-about-copy p {
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
  }

  main.page-d365-finance-operations .nx-inner-about .nx-about-copy > .nx-btn {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  main.page-d365-finance-operations .nx-inner-about .nx-about-points {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 22px !important;
    justify-items: center !important;
  }

  main.page-d365-finance-operations .nx-inner-about .nx-about-points > div {
    width: 100% !important;
    max-width: 360px !important;
    padding: 0 !important;
    text-align: center !important;
    justify-items: center !important;
  }

  main.page-d365-finance-operations .nx-inner-about .nx-about-points b,
  main.page-d365-finance-operations .nx-inner-about .nx-about-points small {
    text-align: center !important;
  }

  /* 2) Business outcomes: place the two dark groups underneath each other. */
  main.page-d365-finance-operations .nx-inner-challenges .nx-challenge-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    width: 100% !important;
  }

  main.page-d365-finance-operations .nx-inner-challenges .nx-challenge-col {
    width: 100% !important;
    flex: 0 0 auto !important;
  }

  /* 3) Final CTA: remove the empty mobile visual row and use balanced bottom padding. */
  main.page-d365-finance-operations.layout-b section.nx-cta {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  main.page-d365-finance-operations .nx-cta .nx-cta-inner {
    min-height: 0 !important;
    padding: 54px 0 58px !important;
    display: block !important;
  }

  main.page-d365-finance-operations .nx-cta .nx-cta-inner > div:first-child {
    padding: 0 !important;
    width: 100% !important;
  }

  main.page-d365-finance-operations .nx-cta .nx-mountain {
    display: none !important;
    min-height: 0 !important;
    height: 0 !important;
  }
}

/* ==========================================================
   v7 — Acumatica ERP final CTA mobile spacing only
   Desktop remains untouched.
   ========================================================== */
@media (max-width: 980px) {
  main.page-acumatica-erp.layout-b section.acu-cta {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  main.page-acumatica-erp.layout-b .acu-cta .nx-cta-inner {
    min-height: 0 !important;
    padding-top: 48px !important;
    padding-bottom: 52px !important;
    display: block !important;
  }

  main.page-acumatica-erp.layout-b .acu-cta .nx-cta-inner > div:first-child {
    padding: 0 !important;
    width: 100% !important;
  }

  /* The decorative mountain cell becomes a second empty row on mobile.
     Remove that row so the CTA ends shortly after the button. */
  main.page-acumatica-erp.layout-b .acu-cta .nx-mountain {
    display: none !important;
    min-height: 0 !important;
    height: 0 !important;
  }
}

/* ==========================================================
   v8 — D365 Customer Engagement final CTA mobile spacing only
   Desktop remains untouched.
   ========================================================== */
@media (max-width: 980px) {
  main.page-d365-customer-engagement.inner-professional.page-template-legacy section.nx-cta {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  main.page-d365-customer-engagement.inner-professional.page-template-legacy .nx-cta .nx-cta-inner {
    min-height: 0 !important;
    padding-top: 46px !important;
    padding-bottom: 46px !important;
    display: block !important;
  }

  main.page-d365-customer-engagement.inner-professional.page-template-legacy .nx-cta .nx-cta-inner > div:first-child {
    width: 100% !important;
    padding: 0 !important;
  }

  /* Remove the decorative second grid row on phones so the CTA
     finishes shortly after the consultation button. */
  main.page-d365-customer-engagement.inner-professional.page-template-legacy .nx-cta .nx-mountain {
    display: none !important;
    min-height: 0 !important;
    height: 0 !important;
  }
}

/* ==========================================================
   v9 — Business Intelligence final CTA mobile spacing only
   Desktop remains untouched.
   ========================================================== */
@media (max-width: 980px) {
  main.page-business-intelligence.layout-b section.acu-cta {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  main.page-business-intelligence.layout-b .acu-cta .nx-cta-inner {
    min-height: 0 !important;
    padding-top: 46px !important;
    padding-bottom: 44px !important;
    display: block !important;
  }

  main.page-business-intelligence.layout-b .acu-cta .nx-cta-inner > div:first-child {
    width: 100% !important;
    padding: 0 !important;
  }

  /* Remove the decorative second grid row on phones so the CTA
     finishes shortly after the BI consultation button. */
  main.page-business-intelligence.layout-b .acu-cta .nx-mountain {
    display: none !important;
    min-height: 0 !important;
    height: 0 !important;
  }
}

/* v10: Industries intro image - contain artwork inside its holder on mobile only */
@media (max-width: 980px) {
  main.industries-rebuild .industries-intro .about-intro-media,
  main.industries-rebuild .industries-intro .about-intro-visual {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-width: 100% !important;
  }

  main.industries-rebuild .industries-intro .about-intro-visual {
    position: relative !important;
    overflow: hidden !important;
  }

  main.industries-rebuild .industries-intro .about-intro-visual img {
    display: block !important;
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
  }
}

/* ==========================================================
   v11 — About Us experience proof blocks: keep labels inside
   the coral cards on mobile/tablet only. Desktop untouched.
   ========================================================== */
@media (max-width: 980px) {
  main.page-about .about-experience-proof,
  .about-experience-proof {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
    width: 100% !important;
  }

  main.page-about .about-experience-proof span,
  .about-experience-proof span {
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 16px 10px !important;
    font-size: 15px !important;
    line-height: 1.2 !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

@media (max-width: 420px) {
  main.page-about .about-experience-proof span,
  .about-experience-proof span {
    font-size: 14px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}

/* ==========================================================
   v12 — About Us industries timeline mobile spacing/alignment
   Mobile/tablet only. Desktop remains untouched.
   ========================================================== */
@media (max-width: 980px) {
  /* Remove the oversized gap above "Who We Work With". */
  main.page-about .nx-industries-timeline,
  main.about-rebuild .nx-industries-timeline {
    padding-top: 28px !important;
  }

  main.page-about .nx-industries-timeline .nx-industry-grid,
  main.about-rebuild .nx-industries-timeline .nx-industry-grid {
    padding-top: 0 !important;
  }

  /* Centre the copy below every industry image on mobile. */
  main.page-about .nx-industries-timeline .nx-industry-stage,
  main.about-rebuild .nx-industries-timeline .nx-industry-stage {
    text-align: center !important;
  }

  main.page-about .nx-industries-timeline .nx-industry-number,
  main.page-about .nx-industries-timeline .nx-industry-stage h3,
  main.page-about .nx-industries-timeline .nx-industry-stage p,
  main.about-rebuild .nx-industries-timeline .nx-industry-number,
  main.about-rebuild .nx-industries-timeline .nx-industry-stage h3,
  main.about-rebuild .nx-industries-timeline .nx-industry-stage p {
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
  }

  main.page-about .nx-industries-timeline .nx-industry-stage h3,
  main.about-rebuild .nx-industries-timeline .nx-industry-stage h3 {
    min-height: 0 !important;
  }
}

@media (max-width: 620px) {
  main.page-about .nx-industries-timeline,
  main.about-rebuild .nx-industries-timeline {
    padding-top: 22px !important;
  }
}
