/*
 * DollarBuySellBD.com - safe front-end performance helpers
 * Add this stylesheet AFTER existing site styles.
 * It does not change the site's colors or layout intentionally.
 */

/* Avoid expensive animated effects on users who prefer reduced motion. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Images should not overflow their containers. */
img,
video,
iframe {
  max-width: 100%;
}

/* Reserve image space when dimensions are available in HTML to reduce layout shifts. */
img[width][height] {
  height: auto;
}

/* Keep off-screen content rendering cheaper; browser support varies. */
.db-lazy-section {
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}

/* Optional helper for non-critical images only. Do not apply to the logo or hero/LCP image. */
img.db-lazy-image {
  loading: lazy;
}

/* Improve touch interactions without forcing a new design. */
button,
input,
select,
textarea,
a {
  touch-action: manipulation;
}
