/* Wrapper controls positioning context for the overlay */
.hero-slide-wrap {
  position: relative;
}

/* Image: full width always */
.hero-slide-image {
  display: block;
}
.hero-slide-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== Desktop / above medium breakpoint ===== */
/* Overlay covers right 40% of image, inset 1rem from top/right/bottom,
   transparent background, rounded corners */
.hero-slide-overlay {
    position: absolute;
    top: 3rem;
    right: 3rem;
    bottom: 3rem;
    width: 40%;
    display: flex;
    align-items: center;
    background: rgba(188,170,159,0.60);
    border-radius: 4rem;
}

.hero-slide-overlay__inner {
  padding: 2rem;
  width: 100%;
}

.hero-slide-overlay__inner h1.text--white a {
    display: block;
    color: var(--white);
    font-size: 2.5rem;
    font-weight: 200;
    margin: 0 0 15px 0;
    padding: 5px 15px 10px;
    /* background: rgba(188,170,159,0.60); */
    border: 1px dotted var(--white);
    border-radius: 2rem;
    min-width: 100%;
    text-align: center;
}

/* ===== Between medium (968) and mid-large (1215) breakpoint ===== */
/* Scale down heading and text size to 75% in this narrow window */
@media (min-width: 969px) and (max-width: 1215px) {
	.hero-slide-overlay__inner h1.text--white a {
    font-size: 1.95rem; /* 75% of the 2.6rem set at full desktop size */
	}
	.hero-slide-overlay__inner h1.text--white {
	margin: 0 0 10px 0;
	}
	.hero-slide-overlay__inner h4 {
    font-size: 1.3rem /* scales relative to whatever size it would otherwise inherit */
  }
}

/* ===== Below medium breakpoint ===== */
/* Image on top, overlay overlaps bottom 10% of image, rest flows below.
   Solid background, rounded corners, 1rem space on left/right/bottom */
@media (max-width: 968px) {
	.hero-slide-overlay {
      position: relative;
      top: auto;
      right: auto;
      bottom: auto;
      width: auto;
      display: block;
      margin: -10% 2rem 1rem 2rem; /* top right bottom left */
      background: rgba(188,170,159,0.95); /*rgba(0, 0, 0, 0.85);*/ /*background: var(--esmhd-bg-sand);*/ /* solid colour - swap for your brand colour */
      border-radius: 1rem;
	}
	
	.hero-slide-overlay__inner {
		padding: 1.5rem 1.5rem;
	}
	
	.hero-slide-overlay a,
	.hero-slide-overlay a.button {
		position: relative;
		z-index: 20;
		margin-bottom: 35px;
	}
}

/* Webinar Sliders */

.mg-slider-item--title-right {
  position: relative;
  overflow: hidden;
}

.mg-slider-item__hero,
.mg-slider-item__hero img {
  display: block;
  width: 100%;
  height: auto;
}

/* Fills the right-hand side of the hero, bounded by the slide itself */
.mg-slider-item__overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 50%;                 /* how much of the hero the text area may use */
  box-sizing: border-box;
  padding: 2rem;              /* keeps content 2rem inside the edges */
  display: flex;
  flex-direction: row;
  align-items: center;        /* vertical centring */
  justify-content: flex-start;
  gap: 1.25rem;
  background: none;
}

.mg-slider-item__icon {
  flex: 0 0 auto;
}
.mg-slider-item__icon img {
  display: block;
  width: 4.5rem;
  height: auto;
}

.mg-slider-item__title h1 {
  flex: 1 1 auto;
  min-width: 0;               /* lets the text wrap instead of overflowing */
  overflow-wrap: anywhere;
  font-size: 2.2rem;
  line-height: 1.25;
  font-weight: 300;
  color: var(--white) !important;
}
.mg-slider-item__title > * {
  margin: 0;
}

@media (max-width: 967px) {
  .mg-slider-item--title-right {
    --overlap: 12%;              /* how far the panel rides up over the hero */
  }

  /* Small SVG hidden on mobile */
  .mg-slider-item__icon {
    display: none;
  }

  /* Panel drops back into normal flow, below the hero, pulled up over its bottom */
  .mg-slider-item__overlay {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    z-index: 2;
    width: auto;
    margin: calc(var(--overlap) * -.4) 1rem 0;  /* % of slide width, so it scales with the image */
    padding: 1rem;
    display: block;
    background: rgba(188, 170, 159, 0.75);
    border-radius: 1rem;
  }

  .mg-slider-item__title h1 {
    font-size: 1.9rem;
    font-weight: 400;
    line-height: 1.3;
    color: var(--white);              /* dark text for the light panel */
    text-shadow: none;
  }
}