/* Dual Promo Banners
 * The front image is taken out of flow and painted inside a frame that
 * stretches with the card, never the other way around. object-fit scales
 * any file — including a much larger upload — into that frame.
 */

.dpb,
.dpb *,
.dpb *::before,
.dpb *::after {
  box-sizing: border-box;
}

.dpb {
  --dpb-min-h: 300px;
  --dpb-front-w: 52%;
  --dpb-front-fit: contain;
  --dpb-front-position: center center;
  --dpb-gap: 22px;
  --dpb-radius: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--dpb-gap);
  width: 100%;
  font-family: inherit;
}

.dpb-card {
  container-type: inline-size;
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) minmax(0, var(--dpb-front-w));
  grid-template-rows: minmax(var(--dpb-min-h), auto);
  min-height: var(--dpb-min-h);
  overflow: hidden;
  border-radius: var(--dpb-radius);
  background-color: #eaf3fb;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  color: #141834;
  text-decoration: none;
  isolation: isolate;
}

.dpb-card:not(.dpb-card--has-media) {
  grid-template-columns: minmax(0, 1fr);
}

.dpb-card-1 {
  background-color: #e7f1fb;
  background-image:
    radial-gradient(90% 80% at 18% 42%, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0) 58%),
    linear-gradient(180deg, #eaf3fb 0%, #d4e7f8 100%);
}

.dpb-card-2 {
  background-color: #f3ead4;
  background-image: linear-gradient(105deg, #f6f1de 0%, #f3e7c4 42%, #f0d4c4 78%, #e8c0b6 100%);
}

a.dpb-card {
  color: inherit;
}

a.dpb-card:focus-visible {
  outline: 2px solid #231ea8;
  outline-offset: 3px;
}

.dpb-card__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  height: 100%;
  padding: clamp(20px, 6cqi, 36px) 14px clamp(20px, 6cqi, 34px) clamp(18px, 6.2cqi, 40px);
}

.dpb-badge {
  display: inline-block;
  max-width: 100%;
  margin: 0;
  padding: 0.42em 0.85em;
  border-radius: 999px;
  background-color: #2c5b98;
  color: #fff;
  font-size: clamp(12px, 1.85cqi, 14px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.dpb-title {
  margin: 0.7em 0 0;
  max-width: 100%;
  color: #141834;
  font-size: clamp(18px, 3.5cqi, 34px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.034em;
  overflow-wrap: break-word;
}

.dpb-badge :is(i, em),
.dpb-title :is(i, em),
.dpb-button :is(i, em) {
  font-style: italic;
  font-synthesis: style;
}

.dpb-badge :is(b, strong),
.dpb-title :is(b, strong),
.dpb-button :is(b, strong) {
  font-weight: 800;
}

.dpb-badge u,
.dpb-title u,
.dpb-button u {
  text-decoration: underline;
}

.dpb-button {
  display: inline-block;
  max-width: 100%;
  margin-top: 1.35em;
  padding: 0.82em 1.15em;
  border: 0;
  border-radius: 8px;
  background-color: #231ea8;
  color: #fff;
  font-size: clamp(14px, 2.05cqi, 16px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.dpb-card__body > .dpb-badge + .dpb-button,
.dpb-card__body > .dpb-title:first-child {
  margin-top: 0;
}

a.dpb-button,
a.dpb-button:visited {
  color: #fff;
}

.dpb-button:hover,
a.dpb-card:hover .dpb-button {
  background-color: #1a168f;
  color: #fff;
}

.dpb-button:focus-visible {
  outline: 2px solid #141834;
  outline-offset: 3px;
}

.dpb-card__media {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.dpb-card__frame {
  position: absolute;
  inset: 10px 12px 16px 4px;
  overflow: hidden;
}

/* Themes and Elementor set img { height: auto; max-width: 100% }, which
   lets a large file expand the layout. The frame is the box; the image
   always fills that box and object-fit does the scaling. */
.dpb-card__frame .dpb-front-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: var(--dpb-front-fit);
  object-position: var(--dpb-front-position);
}

@media (max-width: 900px) {
  .dpb {
    grid-template-columns: minmax(0, 1fr);
  }

  .dpb-card {
    --dpb-front-w: 42%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dpb-button {
    transition: none;
  }
}
