section.slider {
  min-height: 600px;
  position: relative;
  overflow: hidden;

  .slider-container {
    min-height: 600px;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
  }

  .slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    pointer-events: none;

    &.active {
      opacity: 1;
      pointer-events: auto;
    }

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
  }

  /* Show all slides in editor */
  .editor-styles-wrapper & .slider-slide,
  .block-editor-block-list__layout & .slider-slide {
    opacity: 1;
    position: relative;
  }

  .slider-button-prev,
  .slider-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    color: var(--color-white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: transform 0.2s ease-in-out;

    &:hover {
      transform: translateY(-50%) scale(1.1);
    }

    &::before {
      content: "";
      display: block;
      width: 36px;
      height: 36px;
      border-top: 3px solid white;
      border-right: 3px solid white;
    }
  }

  .slider-button-prev {
    left: 10px;

    &::before {
      transform: rotate(-135deg);
      margin-left: 3px;
    }
  }

  .slider-button-next {
    right: 10px;

    &::before {
      transform: rotate(45deg);
      margin-right: 3px;
    }
  }

  .body {
    position: absolute;
    width: 100%;
    bottom: 0;
    padding: 2rem 0;
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 1) 95%
    );
    z-index: 2;
    pointer-events: none;

    .container {
      display: flex;
      flex-direction: column;
      padding: 0 1rem;
      gap: 1rem;
      pointer-events: auto;
    }
  }

  h2 {
    color: var(--color-white);
    text-align: center;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.25);
    width: 100%;
    font-size: var(--text-3xl);

    span.line1 {
      display: inline-block;
      font-size: var(--text-2xl);
    }
  }

  p {
    color: var(--color-white);
    text-align: center;
    font-size: var(--text-lg);
  }
}

section.slider.layout-secondary {
  .slider-container {
    min-height: 320px;
  }

  .slider-slide img {
    object-position: left;
  }

  .body {
    position: relative;
    min-width: 400px;
    font-size: var(--text-xl);
    background: var(--color-tcc-light-cyan);
    display: flex;
    justify-content: center;
    flex-direction: column;

    h2 {
      text-align: left;
      text-shadow: none;
      color: var(--color-tcc-blue);
    }

    ul {
      list-style: disc;
      margin-left: 12%;
    }

    li {
      color: var(--color-tcc-blue);
    }
  }
}

@media (min-width: 1024px) {
  section.slider {
    p {
      font-size: var(--text-xl);
    }

    h2 {
      font-size: var(--text-5xl);

      span.line1 {
        font-size: var(--text-3xl);
      }
    }

    .body .container {
      padding-inline: 2rem;
    }
  }

  section.slider.layout-secondary {
    .slider-slide img {
      object-position: center;
    }

    .body {
      position: absolute;
      height: 100%;
      width: 33.3333%;
      right: 0;
      background: rgba(255, 255, 255, 0.8);
      backdrop-filter: blur(8px);

      ul {
        margin-left: 2rem;
      }
    }

    .slider-container {
      min-height: 700px;
    }
  }
}

/* Editor view - only show first slide in secondary layout */
.editor-styles-wrapper section.slider.layout-secondary .slider-slide,
.block-editor-block-list__layout section.slider.layout-secondary .slider-slide {
  opacity: 0;
  position: absolute;
}

.editor-styles-wrapper
  section.slider.layout-secondary
  .slider-slide:first-child,
.block-editor-block-list__layout
  section.slider.layout-secondary
  .slider-slide:first-child {
  opacity: 1;
}
