/* AutoBIT24 mobile layout repair — 2026-10-07.
   Append after existing FX rules. All changes are restricted to <=1024px. */
@media (max-width: 1024px) {
  /* Match the specificity of the desktop Result selector. */
  .section-foor .section-two-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .section-two-items > .section-two-item {
    min-width: 0;
  }
}

@media (max-width: 768px) {
  .section-foor .section-two-items {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .section-foor .section-two-item {
    padding: 20px 18px 20px 52px;
    min-height: 0;
    height: auto;
  }
  .section-foor .section-two-item::before {
    top: 21px;
    left: 18px;
  }
  .section-foor .section-two-item p {
    font-size: 16px;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
  .section-foor .section-two-item p br {
    display: none;
  }

  /* Custom landing headers omit data-da and hamburger spans. */
  .header .header__content {
    flex-wrap: nowrap;
    gap: 12px;
    position: relative;
  }
  .header .header__logo {
    flex: 0 0 auto;
  }
  .header .header__actions {
    margin-left: auto;
    min-width: 0;
    gap: 8px;
  }
  .header .header__actions > .open_popup-1,
  .header .header__actions > .open_popup-2 {
    display: none;
  }
  .header .header__phone-link {
    display: inline-flex !important;
    align-items: center;
    min-height: 44px;
    font-size: 12px;
    white-space: nowrap;
  }
  .header .header__actions .btn__toggle {
    display: flex;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    color: #fff;
    background: transparent;
    border: 0;
  }
  .header .btn__toggle:empty::before {
    content: '';
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    box-shadow: 0 -6px currentColor, 0 6px currentColor;
  }
  .header .header__menu.active {
    max-height: calc(100dvh - 76px - env(safe-area-inset-top, 0px));
    overscroll-behavior: contain;
  }

  /* Legacy callouts use desktop padding and inline minimum widths. */
  .section-two > div[style*="padding:40px 48px"] {
    padding: 24px 20px !important;
    gap: 20px !important;
  }
  .section-two > div[style*="padding:40px 48px"] > div {
    min-width: 0 !important;
    max-width: 100%;
  }
  .section-two > div[style*="padding:40px 48px"] .button {
    max-width: 100%;
    white-space: normal !important;
  }
  .ab24-global-cta-b24 {
    padding: 28px 16px !important;
  }
  .ab24-global-cta-b24 > div > div {
    min-width: 0 !important;
    max-width: 100%;
  }
  .ab24-global-cta-b24 a {
    max-width: 100%;
    text-align: center;
    white-space: normal;
  }
  .ab24-global-cta-b24 span {
    overflow-wrap: anywhere;
  }

  /* Keep full sentences readable; scrolling belongs to the table. */
  .blog-article-content table {
    width: 100%;
    white-space: normal;
    scrollbar-width: thin;
  }
  .blog-article-content table th,
  .blog-article-content table td {
    white-space: normal;
    min-width: 120px;
    overflow-wrap: anywhere;
  }
  .blog-article-content table::after {
    display: block;
    padding: 8px 0;
  }

  /* The panel and scroll-to-top control must include iPhone safe area. */
  body.ab24-has-sticky-cta {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
  body.ab24-has-sticky-cta #to_top_scrollup {
    bottom: calc(var(--ab24-cookie-h, 0px) + 84px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .ab24-sticky-cta__main {
    min-width: 0;
    height: auto;
    min-height: 50px;
    padding: 10px 12px;
    text-align: center;
    white-space: normal;
    line-height: 1.3;
  }
}
