html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

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

@media (max-width: 768px) {
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
  }

  /* Universal footer fix for Figma-export layout */
  footer[style*="height:805px"] {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    left: 0 !important;
    right: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow: visible !important;
  }

  footer[style*="height:805px"] > [id="contacts"] {
    position: relative !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    padding-top: 20px;
  }

  footer[style*="height:805px"] [data-name="Rectangle 2"] {
    height: 100% !important;
    min-height: 980px !important;
    border-radius: 24px 24px 0 0 !important;
  }

  footer[style*="height:805px"] [data-name="Group 18"] {
    position: relative !important;
    left: 0 !important;
    top: auto !important;
    transform: none !important;
    width: 100% !important;
    height: auto !important;
    padding: 0 16px 20px !important;
    box-sizing: border-box !important;
  }

  footer[style*="height:805px"] [data-name="Group 17"] {
    position: relative !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: auto !important;
  }

  footer[style*="height:805px"] [data-name="Rectangle 3"] {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    min-height: 320px !important;
    height: 100% !important;
  }

  footer[style*="height:805px"] [data-name="Frame 439"] {
    position: relative !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    padding: 20px 16px 24px !important;
    gap: 14px !important;
    box-sizing: border-box !important;
  }

  footer[style*="height:805px"] [data-name="Frame 439"] .fig-text {
    width: 100% !important;
  }

  footer[style*="height:805px"] [data-name="Group 16"] {
    position: relative !important;
    left: 0 !important;
    top: auto !important;
    width: 100% !important;
    height: 518px !important;
    margin-top: 16px !important;
  }

  footer[style*="height:805px"] [data-name="Group 16"] > [data-name="Rectangle 65"] {
    width: 100% !important;
    height: 100% !important;
  }

  footer[style*="height:805px"] [data-name="Group 16"] > .fig-text,
  footer[style*="height:805px"] [data-name="Group 16"] > button,
  footer[style*="height:805px"] [data-name="Group 16"] > div[style*="left:32px;top:110px"],
  footer[style*="height:805px"] [data-name="Group 16"] > div[style*="left:32px;top:170px"],
  footer[style*="height:805px"] [data-name="Group 16"] > div[style*="left:32px;top:230px"] {
    left: 16px !important;
    width: calc(100% - 32px) !important;
  }

  footer[style*="height:805px"] .p14-footer-bottom {
    position: relative !important;
    left: 0 !important;
    top: auto !important;
    bottom: 0 !important;
    transform: none !important;
    width: 100% !important;
    padding: 0 16px 24px !important;
    grid-template-columns: 1fr !important;
    row-gap: 18px !important;
    box-sizing: border-box !important;
  }

  footer[style*="height:805px"] .p14-footer-nav {
    grid-template-columns: 1fr !important;
    row-gap: 8px !important;
  }

  /* Card image cleanup: no side fields/stripes on mobile */
  .catalog-card__media {
    width: 100% !important;
    background: #fff !important;
  }

  .catalog-card__media img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
  }

  .about-cases-scroll-container {
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    cursor: grab;
  }

  .about-cases-scroll-container.is-dragging {
    cursor: grabbing;
  }
}
