.sds-hero {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  max-width: 1920px;
  position: relative;
  z-index: 1;
  padding: 0 !important;
}

.sds-hero-background {
  height: 550px;
  margin-top: -550px;
  background-color: var(--sds-light-grey);
  z-index: 0; /* behind content */
  width: 100%;
  position: absolute;
  bottom: 0;
}

.sds-hero h1,
.sds-hero h2 {
  font-size: 3.25rem;
  font-weight: 800;
  margin: 0 auto;
  text-align: center;
  margin-bottom: 15px;
  color: var(--white);
  text-shadow: 2px 2px 2px rgba(28, 28, 28, .5);
  padding: 0 15px;
}

.sds-hero p {
  font-size: 24px;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  margin-bottom: 45px;
  color: var(--white);
  text-shadow: 2px 2px 2px rgba(28, 28, 28, .5);
  padding: 0 15px;
}

.sds-hero a.btn-primary {
  font-weight: 600 !important;
  display: block;
  margin: 45px auto 0 !important;
  width: fit-content;
  position: relative;
  z-index: 2;
  will-change: transform, opacity;
  transform: translateZ(0); /* isolate from background resampling */
  backface-visibility: hidden;
  mix-blend-mode: normal;
  contain: paint;
}

.sds-hero a.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #cc0000;
  z-index: -1;
}

.sds-hero .animation-container {
  transform: translateZ(0);
  backface-visibility: hidden;
  /*width: 100%;*/
  z-index: 1;
}

.sds-hero .media-wrapper {
  position: relative;
  width: 100%;
  margin: 0 auto;
  pointer-events: none; /* 👈 gör hela wrappern "klickgenomsläpplig" */
}


.sds-hero .media-controls {
  width: 32px;
  --button-movement: -40px;
  --button-position: 40px;
  position: absolute;
  inset-block-end: var(--button-position);
  inset-inline-end: var(--button-position);
  height: calc(100% - var(--button-position));
  display: flex;
  align-items: flex-end;
  z-index: 3;
  pointer-events: auto;
}

.sds-hero .media-controls > div > img {
  height: 32px !important;
  width: 32px !important;
  opacity: .35;
}

.sds-hero .media-controls > div.play-btn,
.sds-hero .media-controls > div.pause-btn {
  position: sticky;
  inset-block-end: 40px;
  margin-top: 40px;
  cursor: pointer;
}

.sds-hero .media-controls > div.play-btn {
  display: none;
}


.sds-hero .media-wrapper {
  width: 100%;        
  max-width: 1920px;  
  will-change: transform;
  /*overflow: hidden;*/
}

.sds-hero .animation-container img,
.sds-hero .animation-container video {
  display: block;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  /*max-height: 100vh;*/
  height: 100%;
  will-change: transform;
  width: 100%;
}

.sds-hero .container {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  max-height: 100vh;
  aspect-ratio: 16 / 9;
  will-change: transform;
  isolation: isolate; 
  z-index: 2; 
  max-width: 1920px;
  width: 100%;
  overflow: hidden;
}

@media (max-width: 991px) {
  .sds-hero h1,
  .sds-hero h2 {
    font-size: 2.5rem;
  }
  
  .sds-hero p.preamble {
    font-size: 18px;
    max-width: 550px;
  }
}

@media (max-width: 768px) {
  .sds-hero, .sds-hero .media-wrapper {
    max-height: 100vh;
  }
  
  /*.sds-hero .media-wrapper {
    width: calc(100vw - 30px);
  }*/
  
  .sds-hero .animation-container {
    width: 100%;
  }
  
  .sds-hero h1,
  .sds-hero h2 {
    font-size: 2rem;
  }
  
  .sds-hero p {
    font-size: 1.125rem;
  }
  
  .sds-hero .animation-container video,
  .sds-hero .animation-container img,
  .sds-hero .container {
    aspect-ratio: 9 / 16;
    max-height: calc(100vh - 95px);
    object-position: center;
  }
  
  
}

@media (max-width: 480px) {
  .sds-hero {
    padding-bottom: 0;
  }
  
  .sds-hero .container .col-12 {
    padding: 0 15px !important;
  }
  
  .sds-hero .media-controls {
        --button-position: 15px;
  }
}