/* ROOT HERO */
.sba-hero-grid {
  margin: 0;
  padding: 0;
}

/* GRID LAYOUT */
.sba-hero-grid__inner {
  display: grid;
  grid-template-columns: minmax(0, 42fr) minmax(0, 58fr);
  align-items: stretch;
  gap: clamp(1.5rem, 3vw, 3rem);
}

/* =========================
   CONTENT SIDE
========================= */

.sba-hero-grid__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 5vw, 5rem);
  background: transparent;
  position: relative;
  z-index: 2;
}

.sba-hero-grid__title {
  margin: 0 0 2rem;
  text-wrap: balance;
}

/* BUTTONS (minimal, let your system override if needed) */
.sba-hero-grid__actions {
  margin: 0;
}

.sba-hero-grid__actions .wp-block-button {
  margin: 0;
}

.sba-hero-grid__actions .wp-block-button__link {
  text-decoration: none;
}

/* =========================
   IMAGE SIDE
========================= */

.sba-hero-grid__image {
  position: relative;
  margin: 0;
  block-size: 100%;
}

.sba-hero-grid__image img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  mask-image: linear-gradient(to right, transparent 0%, black 5%);
}

/* 🔥 GRADIENT OVERLAY (correct approach) */
.sba-hero-grid__image::after {
  content: "";
  position: absolute;
  inset: 0;

  background:
  linear-gradient(92deg, var(--theme-surface) 0% 0%, 
  color-mix(in srgb, var(--theme-surface) 2%, transparent) 70%, transparent 100%);
  opacity: 0.9;
  pointer-events: none;
  };

/* =========================
   MOBILE
========================= */

@media (max-width: 781px) {
  .sba-hero-grid__inner {
    grid-template-columns: 1fr;
    min-block-size: auto;
  }

  /* image goes on top */
  .sba-hero-grid__image {
    order: -1;
  }

  .sba-hero-grid__image img {
    block-size: 14rem;
  }

  .sba-hero-grid__content {
    padding: 1.5rem;

    /* solid background on mobile for readability */
    background: var(--primary);
  }

  .sba-hero-grid__title {
    max-inline-size: none;
    font-size: clamp(2rem, 8vw, 3rem);
  }
}

/* <= 645px */
@media (max-width: 645px) {
  .sba-hero-grid__inner {
    display: flex;
    flex-direction: column-reverse;
  }
  .sba-hero-grid__image {
    block-size: unset;
    position: unset;
  }
  .sba-hero-grid__image img {
    block-size: unset;
  }
  .sba-hero-grid__image::after {
    background: none
  };
}


/* image on the left */

.sba-hero-grid--image-left .sba-hero-grid__image {
  order: 1;
}

.sba-hero-grid--image-left .sba-hero-grid__content {
  order: 2;
}

.sba-hero-grid--image-left .sba-hero-grid__image::after {
  background: linear-gradient(
    268deg,
    var(--theme-surface) 0%,
    color-mix(in srgb, var(--theme-surface) 2%, transparent) 70%,
    transparent 100%
  );
}

.sba-hero-grid--image-left .sba-hero-grid__inner {
  grid-template-columns: minmax(0, 58fr) minmax(0, 42fr);
}
