/* Custom Grid Banner
   - Responsive background image banner with dark overlay
   - Works for both .custom-banner (background-image) and fallback <img>
*/

.custom-banner {
  position: relative;
  width: 100%;
  min-height: 240px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* Optional: give it a little breathing room if banners appear between content blocks */
.custom-banner + * {
  margin-top: 1.5rem;
}

.custom-banner__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: clamp(1rem, 3vw, 2.25rem);
  /* Overlay for readability */
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.65) 0%,
    rgba(0, 0, 0, 0.45) 45%,
    rgba(0, 0, 0, 0.15) 100%
  );
}

.custom-banner__content {
  max-width: 900px;
  color: #fff;
}

/* Title */
.custom-banner__content h3 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.25rem, 2.2vw, 2rem);
  line-height: 1.2;
  letter-spacing: 0.2px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

/* Text */
.custom-banner__text {
  font-size: clamp(0.95rem, 1.15vw, 1.1rem);
  line-height: 1.55;
  max-width: 70ch;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

/* If BannerContent includes paragraphs, keep spacing tidy */
.custom-banner__text p {
  margin: 0.5rem 0 0;
}

.custom-banner__text p:first-child {
  margin-top: 0;
}

/* Links inside banner content */
.custom-banner__text a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.custom-banner__text a:hover,
.custom-banner__text a:focus {
  text-decoration-thickness: 2px;
}

/* Fallback image when only BannerPhoto exists */
.custom-banner__fallback {
  display: block;
  width: 100%;
  height: auto;
}

/* Optional: slightly taller on larger screens */
@media (min-width: 768px) {
  .custom-banner {
    min-height: 320px;
  }
}

/* Optional: reduce overlay strength on very small screens for a cleaner look */
@media (max-width: 480px) {
  .custom-banner__overlay {
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.55) 0%,
      rgba(0, 0, 0, 0.35) 60%,
      rgba(0, 0, 0, 0.1) 100%
    );
    align-items: flex-end;
  }
}
