/*
 * Shared angled overlay. Add .angled-overlay to a section (or use one of the selectors below).
 * The shape is the area left of a diagonal line, drawn with clip-path so it scales with the section.
 *
 *   --cut-top      where the diagonal meets the top edge, as % of the width  (higher = covers more)
 *   --cut-bottom   where the diagonal meets the bottom edge, as % of the width
 *                  (cut-top minus cut-bottom sets the slant: bigger difference = shallower angle)
 *   --overlay-color / --overlay-opacity
 */
:root {
  --overlay-color: var(--dark);
  --overlay-opacity: 0.9;
  --cut-top: 76%;
  --cut-bottom: 47%;
}

body .angled-overlay,
body .vc_row.wpb_row:not(.vc_inner):has(.key-numbers-block.has-bg-image) {
  position: relative;
  overflow: hidden;
}

body .angled-overlay::after,
body .vc_row.wpb_row:not(.vc_inner):has(.key-numbers-block.has-bg-image)::before {
  content: '';
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--overlay-color);
  opacity: var(--overlay-opacity);
  clip-path: polygon(0 0, var(--cut-top) 0, var(--cut-bottom) 100%, 0 100%);
  transform: none;
  pointer-events: none;
  z-index: 1;
}

/* Hero: content (z-index 10) and video (z-index 0) stay around the overlay */
body .video-hero.angled-overlay {
  --overlay-opacity: 0.5;
  --cut-top: 70%;
  --cut-bottom: 56%;
}

body .footer-cta.angled-overlay {
  --cut-top: 88%;
  --cut-bottom: 82%;
  --overlay-opacity: 0.5;
}

/* Page title image overlay */
body .title-bar-image.angled-overlay {
  --overlay-opacity: 0.85;
  --cut-top: 83%;
  --cut-bottom: 80%;
}

body .vc_row.wpb_row:not(.vc_inner):has(.key-numbers-block.has-bg-image) {
  --overlay-opacity: 0.5;
  --cut-top: 100%;
  --cut-bottom: 80%;
}

/* Rows' columns sit above the overlay */
body .vc_row.wpb_row:not(.vc_inner):has(.key-numbers-block.has-bg-image)>.wpb_column {
  position: relative;
  z-index: 2;
}