/* Full-width banner with overlay title styling */
body:not(.path-frontpage) .preface {
background: none!important;
}

.view-page-title-masthead .views-field-field-banner-image {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
}

.view-page-title-masthead .views-field-field-banner-image img {
  width: 100%;
  height: 300px; /* Fixed height as requested */
  object-fit: cover; /* This ensures the image covers the area without distortion */
  object-position: center center; /* Centers the focal point of the image */
  display: block;
  position: relative;
  z-index: -1;
}

.views-field-field-video-hero .field-content video > source {
    position: absolute; /* Make the video position absolute to fill the container */
    top: 0;
    left: 0;
    width: 100%; /* Ensure the video takes full width */
    height: 100%; /* Ensure the video takes full height */
    object-fit: cover; /* This ensures the video covers the container */
    z-index: -1; /* Place the video behind the content */
}

/* Position the title over the image */
.view-page-title-masthead .views-field-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
    z-index:100;
}

.view-page-title-masthead .views-field-title h2 {
  color: white;
  font-size: 3rem;
  margin: 0;
  padding: 0 20px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5); /* Optional: adds a subtle shadow to improve readability */
}

/* Make the entire view container position relative to properly position absolute elements */
.view-page-title-masthead {
  position: relative;
  margin: 0;
  padding: 0;
  width: 100%;
}

/* Remove any margin/padding from the view content */
.view-page-title-masthead .view-content {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 0;
}