.home-slider {
  --dda-banner-nav-bottom: calc(240px + var(--dda-sticky-footer-height, 0px));
  position: relative;
  max-width: 100%;
  overflow: hidden;
  display: block;
}

.home-slider::before {
  content: '';
  width: 100%;
  height: 80%;
  position: absolute;
  bottom: 0;
  background: rgb(0, 0, 0);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
  z-index: 1;
}

.home-slider img,
.home-slider video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.slider-item {
  display: none;
  width: 100%;
  transition: opacity 0.5s ease-in-out;
}

.slider-item.active {
  display: block;
}

.slider-item img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.home-slider slide,
.home-slider .dda-slide {
  position: relative;
  width: 100vw;
  height: 100vh;
}

.home-slider .slide-wrap {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
}

/* Built-in scrim behind the slide text. The ::before gradient only darkens the bottom and fades
   to nothing mid-slide, so white text over a bright photo fell to 2-3:1. At 0.55+ black the
   background under white text stays at or below sRGB 115 even on a pure white photo (4.5:1+).
   The dark side follows the text start edge; RTL mirrors it. */
.home-slider .slide-wrap {
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.55) 70%, rgba(0, 0, 0, 0.2) 100%);
}

[dir='rtl'] .home-slider .slide-wrap,
.home-slider[dir='rtl'] .slide-wrap {
  background-image: linear-gradient(to left, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.55) 70%, rgba(0, 0, 0, 0.2) 100%);
}

.home-slider .dda-slider-container {
  width: 100vw;
  height: 100vh;
  position: relative;
}

.home-slider .dda-slides {
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  height: 100vh;
  display: flex;
  transition: all 0.7s ease-in-out;
}

.slide-content {
  width: 90vw;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.slide-content h2 {
  font-size: var(--dda-fs-display-sm);
  color: #fff;
  font-weight: var(--dda-fw-700);
}
.slide-content p {
  font-size: var(--dda-fs-headline-sm);
  color: #fff;
  font-weight: var(--dda-fw-300);
}
.slider-nav {
  width: 100%;
  text-align: center;
  position: absolute;
  /* The quick-link cards over the banner rise by the sticky footer height, so the controls do too.
     240px keeps the controls 16px above the cards, which sit at 69px (.quick-links-wrap in
     dda.css), as on small screens. --dda-banner-nav-bottom is also the slide text's lower limit. */
  bottom: var(--dda-banner-nav-bottom);
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  height: 30px;
  z-index: 3;
}
.slider-nav .prev,
.slider-nav .next,
.slider-nav .pause {
  height: 28px;
  width: 28px;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: rgba(0, 0, 0, 0);
  border-radius: 50%;
  font-size: 25px;
  transition: all 0.2s linear;
}
/* chevron_left/chevron_right do not mirror by themselves. In RTL the row reverses, so previous is
   on the right and must point right, as in 3.x. */
[dir='rtl'] .slider-nav .prev i,
[dir='rtl'] .slider-nav .next i,
.home-slider[dir='rtl'] .slider-nav .prev i,
.home-slider[dir='rtl'] .slider-nav .next i {
  transform: scaleX(-1);
}

.slider-nav .prev:hover,
.slider-nav .next:hover,
.slider-nav .pause:hover {
  background: rgba(0, 0, 0, 0.45);
}

/* The icon is a Material Icons ligature. Until that font loads — or if the
   consumer never loads it — the literal text renders and would overflow the
   28px button and cover the slide dots, making them unclickable. Clip it. */
.slider-nav .prev,
.slider-nav .next,
.slider-nav .pause {
  overflow: hidden;
  flex: 0 0 auto;
}

.slider-nav .prev i,
.slider-nav .next i,
.slider-nav .pause i {
  font-size: 25px;
  line-height: 1;
  width: 25px;
  height: 25px;
  overflow: hidden;
}

.slider-nav .dda-mouse-scroll {
  display: flex;
  align-items: center;
  margin-inline-start: 8px;
}

.slider-nav ul {
  display: flex;
  align-items: center;
  /* The 24px targets are 25px apart, like the 10px dots with 15px between them. The negative margin
     keeps the first and last dots 15px from the arrows; global.css resets every <ul> margin with !important. */
  gap: 1px;
  list-style: none;
  margin: 0 -7px !important;
  padding: 0;
}

.slider-nav li {
  display: flex;
}
.slider-nav .dots {
  display: flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  -webkit-appearance: none;
  /* WCAG 2.5.8: the button is the 24px target, and the dot is drawn inside it. */
  width: 24px;
  height: 24px;
  background: none;
  margin: 0;
  padding: 0;
  border: 0px;
  /* No border-radius: it would cut the corners off the 24px target. */
  cursor: pointer;
}

/* WCAG 1.4.11: a white ring keeps 3:1 over the slide's scrim, and the state is not colour alone. */
.slider-nav .dots::before {
  content: '';
  box-sizing: border-box;
  width: 10px;
  height: 10px;
  border: 1.5px solid #ffffff;
  border-radius: 50%;
  transition: background-color 0.2s linear;
}

.slider-nav .dots.active::before {
  background: #ffffff;
}

@media (forced-colors: active) {
  .slider-nav .dots.active::before {
    background: ButtonText;
  }
}

/* Controls sit over photography, where the UA default focus ring is often
   invisible. Pair a white ring with a dark outer ring so it reads on any slide. */
.slider-nav .prev:focus-visible,
.slider-nav .next:focus-visible,
.slider-nav .pause:focus-visible,
.slider-nav .dots:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(0, 0, 0, 0.65);
}


/* Desktop: centre the slide text in the space between the fixed header (about 160px) and the
   controls, not in the full banner height. On a laptop screen (768px tall and less) the centred
   text otherwise ran into the controls. */
/* Above 1600px the quick-link cards are taller (dda.css makes them compact only up to 1600px), so
   the controls sit higher to stay 16px above them. */
@media screen and (min-width:1601px) {
  .home-slider {
    --dda-banner-nav-bottom: calc(282px + var(--dda-sticky-footer-height, 0px));
  }
}

@media screen and (min-width:993px) {
  .home-slider .slide-wrap {
    box-sizing: border-box;
    padding-top: 160px;
    /* The controls' offset, their 30px height and 24px of space. */
    padding-bottom: calc(var(--dda-banner-nav-bottom) + 30px + 24px);
  }
}

@media screen and (max-width:992px) {
  .slider-nav {
    bottom: 100px;
  }
  .slider-nav .dda-mouse-scroll:not(.dda-mouse-scroll-mobile) {
    display: none;
  }
}
/* On taller small screens the quick-link cards sit on the banner (dda.css), so the controls sit
   16px above them. The two custom properties are the cards' gap above the bar and their height. */
@media screen and (max-width:992px) and (min-height:601px) {
  .slider-nav {
    bottom: calc(var(--dda-sticky-footer-height, 0px) + var(--dda-quick-links-gap-sm, 12px) + var(--dda-quick-links-card-height-sm, 112px) + 16px);
  }
}
@media screen and (max-width:992px) {
  /* Below 992px the text runs the full width, so the scrim must too. */
  .home-slider .slide-wrap,
  [dir='rtl'] .home-slider .slide-wrap,
  .home-slider[dir='rtl'] .slide-wrap {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6));
  }
}
/* Short screens: a laptop zoomed past about 115% (WCAG 1.4.10 asks for 400%, which turns a
   1280x800 window into 320x200 CSS pixels), or a phone on its side. A full-height banner with the
   controls and the quick-link cards at fixed offsets from its bottom cannot fit the slide text, so
   the controls covered it. Here the banner grows with its text, at least the screen's height, and
   the controls sit in the space kept for them under the text. The cards follow the banner, below
   it (dda.css). */
@media screen and (max-height: 700px) {
  .home-slider .dda-slider-container,
  .home-slider .dda-slides,
  .home-slider slide,
  .home-slider .dda-slide,
  .home-slider .slide-wrap {
    height: auto;
  }
  /* In flow, so the banner is as tall as its tallest slide. inset-inline-start still moves it. */
  .home-slider .dda-slides {
    position: relative;
  }
  .home-slider .slide-wrap {
    box-sizing: border-box;
    min-height: 100vh;
    /* Clear of the fixed header (see scroll-padding-top in dda-header.css), and room below the
       text for the controls: their 30px height and 16px either side, above the sticky footer bar. */
    padding-top: 170px;
    padding-bottom: calc(30px + 32px + var(--dda-sticky-footer-height, 0px));
  }
  .slider-nav {
    bottom: calc(16px + var(--dda-sticky-footer-height, 0px));
  }
}
@media screen and (max-height: 700px) and (max-width: 767px) {
  .home-slider .slide-wrap {
    padding-top: 100px;
  }
}
