.carousel .carousel-slides-container {
  position: relative;
  overflow-x: hidden;
}
.carousel .carousel-slides {
  list-style: none;
  padding: 0;
  display: flex;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  overflow: scroll clip;
  width: 90%;
  margin: auto;
  scrollbar-width: none;
  overflow-x: hidden;
}
.carousel .carousel-slide-indicators {
  display: flex;
  flex-wrap: wrap;
  text-align: center;
  justify-content: center;
  gap: 6px 12px;
  background-color: var(--light-color);
  line-height: 0;
  list-style: none;
  margin: 0;
  padding: 1.6rem 0 0 0 !important;
  li {
    border: none;
    display: inline-block;
    margin: auto .5em;
  }
}
.carousel .carousel-slides::-webkit-scrollbar {
  display: none;
}
.carousel .carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  width: 100%;
  /* min-height: min(4rem, calc(100svh - var(--nav-height)));
   */
   min-height: min(50vw, calc(100dvh - var(--header-height)));
}
.carousel .carousel-slide:has(.carousel-slide-content[data-align="center"]) {
  align-items: center;
}
.carousel .carousel-slide:has(.carousel-slide-content[data-align="right"]) {
  align-items: flex-end;
}
.carousel .carousel-slide .carousel-slide-image {
  margin: 0 auto;
}
.carousel .carousel-slide .carousel-slide-image picture {
  /* position: absolute; */
  inset: 0;
}
.carousel .carousel-slide .carousel-slide-image picture > img {
  height: 100%;
  border-radius: 5px;
  width: auto;
  object-fit: contain;
}
.carousel .carousel-slide .carousel-slide-content {
  z-index: 1;
  padding: 1rem 1rem 0 1rem;
  /* margin: 1.5rem 3rem; */
  margin: 1.5rem auto;
  position: relative;
  width: var(--slide-content-width, auto);
}
.carousel-nav-off {
  &.carousel .carousel-slide-indicators, .carousel .carousel-slide-indicators {
    display: none;
  }
}
.carousel .carousel-slide-indicator button {
  width: 1rem;
  height: 1rem;
  padding: 0;
  border-radius: 1rem;
  background-color: rgba(0 0 0 / 0.25);
  cursor: pointer;
  border: none
}
.carousel .carousel-slide-indicator button:disabled, .carousel .carousel-slide-indicator button:hover, .carousel .carousel-slide-indicator button:focus-visible {
  background-color: rgba(0 0 0 / 0.8);
}
.carousel .carousel-slide-indicator span, .carousel .carousel-navigation-buttons span {
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  white-space: nowrap;
}
.carousel .carousel-navigation-buttons {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0.5rem;
  right: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1;
}
/* stylelint-disable-next-line no-descending-specificity */
.carousel .carousel-navigation-buttons button {
  border-radius: 8px;
  margin: 0;
  padding: 0;
  width: 2rem;
  height: 2rem;
  position: relative;
  border: none;
  background-color: transparent;
}
.carousel .carousel-navigation-buttons button:hover, .carousel .carousel-navigation-buttons button:focus-visible {
  background-color: transparent;
}
.carousel .carousel-navigation-buttons button:after {
  display: block;
  content: "";
  border: 2px var(--gray3) solid;
  border-bottom: 0;
  border-left: 0;
  height: 0.75rem;
  width: 0.75rem;
  position: absolute;
  top: 50%;
  left: calc(50%);
  transform: translate(-50%, -50%) rotate(-135deg);
}
.carousel .carousel-navigation-buttons button.slide-next:after {
  transform: translate(-50%, -50%) rotate(45deg);
  left: calc(50%);
}
@media (width >=600px) {
  .carousel .carousel-navigation-buttons {
    left: 1rem;
    right: 1rem;
  }
  .carousel .carousel-navigation-buttons button {
    /* width: 3rem;
    height: 3rem; */
    transform: scale(2);
    border: none;
    cursor: pointer;
  }
  .carousel .carousel-navigation-buttons button:after {
    width: 1rem;
    height: 1rem;
  }
  .carousel .carousel-slide .carousel-slide-content {
    --slide-content-width: 65%;
    /* margin: 2.5rem 5rem; */
    margin: 0 auto;
    text-align: center;
    font-size: var(--heading-font-size-s);
  }
  .carousel .carousel-slide .carousel-slide-content[data-align="justify"] {
    --slide-content-width: auto;
  }
}
/* If thte carousel multi colors  */
.carousel-link-colors {
  .carousel-slide:nth-child(1), .carousel-slide:nth-child(5), .carousel-slide:nth-child(9) {
    a {
      color: #3ebdac;
    }
    a:hover{
      color: #c1eaf8;
      border-color: rgba(255, 255, 255, 0.66);
    }
  }
  .carousel-slide:nth-child(2), .carousel-slide:nth-child(6), .carousel-slide:nth-child(10) {
    a {
      color: #f5ba55;
    }
    a:hover{
      color: #fbe1b5;
      border-color: rgba(255, 255, 255, 0.66);
    }
  }
  .carousel-slide:nth-child(3), .carousel-slide:nth-child(7), .carousel-slide:nth-child(11) {
    a {
      color: #c479ba;
    }
    a:hover{
      color: #e3c0de;
      border-color: rgba(255, 255, 255, 0.66);
    }
  }
  .carousel-slide:nth-child(4), .carousel-slide:nth-child(8), .carousel-slide:nth-child(12) {
    a {
      color: #66cbed;
    }
    a:hover{
      color: #c1eaf8;
      border-color: rgba(255, 255, 255, 0.66);
    }
  }
}

.carousel-full-width {
  .carousel-wrapper {
    max-width: 100% !important;
    padding-bottom: 2em;
    @media (width <=900px) {
      margin-top: 2em;
      .carousel-slide-content {
        margin: 0 auto;
        width: 70%;
      }
      .carousel .carousel-navigation-buttons button {
        border: none;
      }
    }
    @media (width <=600px) {
      padding: 0;
      margin: 0 auto;
      p{
        text-align: center;
      }
    }
  }
}
/* Gray 3 background color for company pages */
.carousel-with-header {
  .carousel-navigation-buttons {
    top: 1em;
  }
  @media (width <=900px) {
    .carousel-wrapper {
      margin-top: 1em;
      .carousel-navigation-buttons {
        top: 50%;
      }
      .carousel-slide-content {
        margin: 0 auto;
        width: 70%;
      }
    }
  }
}
.light-arrow .carousel-navigation-buttons button:after {
  display: block;
  content: "";
  border: 3px white solid;
  border-bottom: 0;
  border-left: 0;
  height: 0.75rem;
  width: 0.75rem;
  position: absolute;
  top: 50%;
  left: calc(50% + 3px);
  transform: translate(-50%, -50%) rotate(-135deg);
}
.carousel-light {
  a {
    /* text-decoration: none; */
    color: var(--link-hover-color);
  }
  a:hover {
    color: var(--blueLight);
  }
  .carousel .carousel-slide-indicator button {
    width: 1rem;
    height: 1rem;
    padding: 0;
    border-radius: 1rem;
    background-color: var(--grayLight);
    border: none
  }
  .carousel .carousel-slide-indicator button:disabled, .carousel .carousel-slide-indicator button:hover, .carousel .carousel-slide-indicator button:focus-visible {
    background-color: var(--white);
  }
  &.text-light {
    h4 {
      a {
        color: var(--yellow) !important;
        text-decoration: underline;
        &:hover {
          color: var(--yellowHover) !important;
        }
      }
    }
  }
}
.carousel-arrows-off {
  .carousel .carousel-navigation-buttons {
    display: none;
  }
}

/* Adding quote marks around headers */
.quote-wheel {
  :has(h4) {
    div div{
      padding-top:.8em;
    }
    :before, :after {
      content: "";
      font-family: "Georgia", cursive;
      line-height: 0;
      font-size: 800%;
      width: 0;
      height: 0;
      position: absolute;
      color: #f2f2f2;
      z-index: -1;
      margin-top:8px;
    }
    h4:before {
      content: '\201C';
      width: 1em;
      top: 0.3em;
      left: -75px;
      opacity: .2;
    }
    h4:after {
      content: '\201D';
      bottom: 0;
      right: 65px;
      opacity: .2;
    }
  }
  @media (width <= 600px) {
    &.section-top-padding-small, &.section-padding-small {
      text-align: center;
      :has(h4) {
        padding-top:0;
        .carousel .carousel-slide .carousel-slide-content {
          padding: 8px auto !important;

          --slide-content-width: 75%;
        }
      }
    }
  }
}
.image-left {
  .carousel-slides-container {
    ul.carousel-slides {
      li:has(.carousel-slide-image + .carousel-slide-content p, .carousel-slide-content h2, .carousel-slide-content h3, .carousel-slide-content h4, .carousel-slide-content h5, .carousel-slide-content h6, .carousel-slide-content ul, .carousel-slide-content ol, .carousel-slide-content blockquote ) {
        padding: 0;
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 1.6rem;
        width: 100%;
        h2, h3, h4, h5, h6, p {
          margin-bottom: 0;
        }
        div.carousel-slide-image {
          grid-column: 1;
          order: 0;
          /* width: 100%; */
          /* object-fit: cover; */
          align-self: center;
          picture {
            position: relative;
            display: flex;
            justify-content: center;
            inset: 0;
            width: 100%;
            img {
              border-radius: 5px;
              height: 100%;
              width: auto;
            }
          }
        }
        div.carousel-slide-content {
          order: 1;
          grid-column: 2;
          width: 100%;
          text-align: left;
          margin: 0;
          align-self: center;
          padding: 0;
          p {
            font-size: 1.6rem;
          }
        }
        @media (width <= 900px) {
          display: block;
        }
      }
    }
    @media (width <= 900px) {
      .carousel-navigation-buttons {
        display: none;
      }
      .carousel-slides {
        width: 100%;
        li {
          .carousel-slide-content {
            text-align: center !important;
            padding: 1rem 0 0 0 !important;
          }
        }
      }
    }
  }
}

.carousel-slides-container {
  ul.carousel-slides {
    li:has(.carousel-slide-image + .carousel-slide-content p) {
      padding: 0;
      display: block;
      width: 100%;
      div.carousel-slide-image {
        display: flex;
        width: 100%;
        justify-content: center;
        picture {
          position: relative;
          display: block;
          height: 100%;
          width: auto;
          img {
            border-radius: 5px;
            height: 100%;
            /* width: 100%; */
          }
        }
      }
      div.carousel-slide-content {
        width: auto;
        text-align: center;
        margin: 0;
        /* align-self: center; */
        p {
          font-size: 1.6rem;
        }
      }
      @media (width <= 900px) {
        display: block;
      }
    }
  }
  @media (width <= 900px) {
    .carousel-navigation-buttons {
      display: none;
    }
    .carousel-slides {
      width: 100%;
      li {
        .carousel-slide-content {
          text-align: center !important;
          padding: 1rem;
        }
      }
    }
  }
}

.carousel-list {
  .carousel-slide-content {
    padding: 0 !important;
  }
  h2:has(a:link) {
    display: flex;
    justify-content: center;
    margin-bottom: 0;
    &:before {
      content: url('../../../icons/arrow-orange.svg');
      width: 17px;
      display: inline-block;
      font-size: 80%;
      margin: auto 10px auto 0;
      vertical-align: middle;
    }
    a {
      text-decoration: none;
      position: relative;
      text-align: left;
      &:before {
        content: '';
        position: absolute;
        width: 0;
        right: 0;
        bottom: 1px;
        transition: width 500ms;
        height: 3px;
        background-color: var(--blueLight);
      }
      &:hover {
        box-sizing: border-box;
        &:before {
          width: calc(100%);
          right: auto;
          left: 0;
        }
      }
    }
  }
  @media (width <= 900px) {
    padding-bottom: 2.4rem !important;
    .carousel-navigation-buttons {
      display: flex;
    }
  }
}

.carousel-rule {
  border-top: 1px solid var(--grayRule);
  border-bottom: 1px solid var(--grayRule);
  margin: 3.2rem 0;
}
