.container-block:has(.featured-posts-rotation-block) {
  @media screen and (min-width: 768px) {
    padding-left: 120px;
    
  }

  @media screen and (min-width: 1260px) {
    padding-right: 120px;
  }
}

.featured-posts-rotation-block {
  position: relative;
  /* overflow: hidden; */

  .featured-posts-wrapper {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 12px 0 12px 48px;
    position: relative;

    &::after {
      content: '';
      position: absolute;
      left: 0;
      left: calc(var(--padding) * -1);
      top: 50%;
      transform: translateY(-50%);
      width: 2px;
      height: 100%;
      background: var(--rc-grad-warmth-180);
      z-index: 1;

      @media screen and (max-width: 768px) {
        display: none;
      }
    }

    @media screen and (max-width: 768px) {
      gap: 16px;
      padding: 12px 0px;
      flex-direction: column;
      align-items: start;
    }

    .featured-posts-label {
      font-weight: 700;
      font-size: 20px;
      white-space: nowrap;
      position: relative;

      @media screen and (max-width: 768px) {
      }
    }

    .featured-posts-carousel {
      flex: 1;
      overflow: hidden;
      position: relative;
      min-height: 44px;

      @media screen and (max-width: 768px) {
        width: 100%;
        min-height: 60px;
      } 

      .featured-posts-track {
        display: flex;
        align-items: center;
        height: 100%;

        @media screen and (max-width: 768px) {
        }
      }

      .featured-post-item {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        opacity: 0;
        transform: translateY(10px);
        transition: opacity 0.5s ease, transform 0.5s ease;
        height: 100%;
        display: flex;
        align-items: center;

        &.is-active {
          opacity: 1;
          transform: translateY(0);
          z-index: 2;
        }

        &.is-exiting {
          opacity: 0;
          transform: translateY(-10px);
        }
      }

      .featured-post-link {
        font-size: 16px;
        font-weight: 400;
        line-height: 1.25;
        text-decoration: none;
        color: inherit;
        transition: all 0.3s ease;
        position: relative;
        display: inline-block;

        &:focus,
        &:focus-visible {
          text-decoration: none;
          border: none;
          box-shadow: none;
          padding: 0;
        } 

        @media screen and (max-width: 768px) {
          
        }
      }
    }

    .featured-posts-view-all {
      padding: 0 24px;
      flex-shrink: 0;

      @media screen and (max-width: 768px) {
        padding: 0;
      }
    }
    .featured-posts-empty {
      flex: 1;
      padding: 0 24px;

      p {
        margin: 0;
        font-size: 14px;
        color: rgba(0, 0, 0, 0.5);
        font-style: italic;
      }
    }
  }
}



/* Dark theme adjustments */
.has-background {
  .featured-posts-rotation-block {
    .featured-posts-carousel {
      .featured-posts-track {
    
        .featured-post-link {
          color: var(--wp--preset--color--white);
        }

        .view-all-link {
          color: var(--wp--preset--color--white);
        }
      }
    }
  }
}