/*
 * Fixed home-page advertising positions.
 * Banners always keep their intrinsic aspect ratio: no crop, no stretch,
 * no rotation/carousel. This is especially important for artwork that
 * contains text close to the left/right edges.
 */
.idsc-home-ad-slot {
  margin-top: 2rem;
}

.idsc-home-ad-slot__frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(214, 222, 245, 0.92);
  border-radius: 28px;
  background: transparent;
  box-shadow: 0 18px 50px rgba(35, 57, 157, 0.12);
  line-height: 0;
}

.idsc-home-ad-slot__link {
  display: block;
  width: 100%;
  line-height: 0;
}

/*
 * Do NOT force an aspect-ratio here. The previous fixed ratios combined
 * with object-fit: cover cropped the artwork on both desktop and mobile.
 */
.idsc-home-ad-slot__media {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto !important;
  max-height: none;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center center;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.idsc-home-ad-slot img.idsc-home-ad-slot__media {
  height: auto !important;
}

.idsc-home-ad-slot video.idsc-home-ad-slot__media {
  height: auto !important;
}

/* Keep the three placements visually separated from neighbouring sections. */
.idsc-home-ad-slot--2,
.idsc-home-ad-slot--3 {
  margin-top: 2.5rem;
}

@media (max-width: 767px) {
  .idsc-home-ad-slot {
    margin-top: 1.25rem;
  }

  .idsc-home-ad-slot--2,
  .idsc-home-ad-slot--3 {
    margin-top: 1.5rem;
  }

  .idsc-home-ad-slot__frame {
    border-radius: 20px;
  }

  /* Explicit mobile reset: preserve every pixel of wide banner artwork. */
  .idsc-home-ad-slot__media {
    width: 100%;
    height: auto !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .idsc-home-ad-slot *,
  .idsc-home-ad-slot *::before,
  .idsc-home-ad-slot *::after {
    animation: none !important;
    transition: none !important;
  }
}
