/* Lista programów treningowych */
.stellar-program-list {
  .stellar-program-header-title {
    text-align: center;
    margin-bottom: 55px;

    @media (max-width: 1024px) {
      font-size: 21px;
      margin-bottom: 21px;
      padding-top: 34px;
    }
  }

  /* Dots navigation (shown on mobile) */
  .stellar-program-list__dots {
    display: none;
    gap: 8px;
    justify-content: center;
    padding-top: 10px;
    background: #2e2e2e80;
    width: max-content;
    margin: 0 auto;
    padding: 9px 17px;
    border-radius: 21px;
    margin-top: 9px;
  }

  .stellar-program-list__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    aspect-ratio: 1/1;
    border: none;
    background: #d9d9d980;
    opacity: 0.5;
    cursor: pointer;
    padding: 0;
  }

  .stellar-program-list__dot[aria-selected="true"] {
    background: #d9d9d9;
    opacity: 1;
  }

  @media (max-width: 1024px) {
    .stellar-program-list__dots {
      display: flex;
    }
  }

  .stellar-program-list__items {
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 51px;
    display: flex;
    flex-direction: column;
    max-width: 1150px;
    margin: 0 auto;

    @media (max-width: 1024px) {
      /* Horizontal carousel on mobile */
      flex-direction: row;
      overflow: hidden;
      /* JS drag scrolling */
      /* overflow-x: scroll; REMOVED for JS drag */
      /* scroll-snap-type: x mandatory; REMOVED for JS drag */
      gap: 16px;
      /* tighter gap for mobile */
      padding: 0 60px 0 16px;
      /* right padding to show next item peek */
      margin: 0;
      /* full width */
      max-width: none;
      width: 100%;
      cursor: grab;
      /* Indicate draggable */
      /* scroll-padding-left: 16px; REMOVED */
    }

    .stellar-program-list__items:active {
      cursor: grabbing;
    }

    .stellar-program-list__item {
      background-color: #303030;
      border-radius: 42px;
      padding: 21px;
      color: #fff;
      display: flex;
      flex-direction: row;
      gap: 36px;
      position: relative;
      min-height: 350px;

      @media (max-width: 1024px) {
        .stellar-program-list__index {
          display: none;
        }
      }

      &:first-child {
        .stellar-program-list__index {
          left: -80px;
        }

        &:nth-child(10) {}
      }

      @media (max-width: 1024px) {
        flex-direction: column;
        /* Use thumb as background on mobile */
        background-image: var(--stellar-thumb);
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        aspect-ratio: 1/1;
        justify-content: flex-end;
        -webkit-box-shadow: inset 0px -100px 100px 34px rgba(0, 0, 0, 1);
        -moz-box-shadow: inset 0px -100px 100px 34px rgba(0, 0, 0, 1);
        box-shadow: inset 0px -100px 100px 34px rgba(0, 0, 0, 1);
        border: 9px solid #303030;
        /* Carousel item sizing + snapping */
        flex: 0 0 auto;
        width: 100%;
        /* scroll-snap-align: start; REMOVED */
        /* scroll-snap-stop: always; REMOVED */
      }

      .stellar-program-list__index {
        position: absolute;
        font-weight: 600;
        font-size: 340px;
        line-height: 550px;
        color: #7e7e7e;
        left: -130px;
        top: 50%;
        transform: translateY(-50%);
        z-index: -1;

        @media (max-width: 1024px) {
          display: none;
        }
      }

      &.active .stellar-program-list__index {
        color: #00b9f2;
      }

      .stellar-program-list__inner {
        display: flex;
        flex-direction: column;
        gap: 21px;

        @media (max-width: 1024px) {
          gap: 14px;

          &.stellar-program-list__inner--thumb {
            display: none;
          }
        }

        .stellar-program-list__thumb {
          width: 350px;
          height: 350px;
          aspect-ratio: 1/1;
          object-fit: cover;
          border-radius: 16px;
          display: block;
        }

        .stellar-program-list__inner--content {
          width: 100%;
        }

        .stellar-program-list__title {
          font-family: Poppins, sans-serif;
          font-weight: 600;
          margin: 0;
          font-size: 21px !important;
          line-height: 28px;

          @media (max-width: 1024px) {
            font-size: 17px;
          }
        }

        .stellar-program-list__desc {
          margin: 0;

          @media (max-width: 1024px) {
            font-size: 13px;
          }
        }

        .stellar-program-list__cta {
          display: flex;
          align-items: center;
          justify-content: center;
          width: 326px;
          height: 66px;
          border-radius: 50px;
          background: #00b9f2;
          text-decoration: none;
          font-weight: 700;
          font-size: 19px;
          transition: 0.3s;
          text-align: center;

          @media (max-width: 1024px) {
            font-size: 13px;
            max-width: 100%;
            width: 220px;
            height: 46px;
            border-radius: 34px;
            margin: 10px auto 0 auto;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
          }

          .stellar-program-list__cta-label {
            display: none;
          }

          img {
            display: inline-block;
          }

          @media (max-width: 1024px) {
            .stellar-program-list__cta-label {
              display: inline;
            }

            img {
              display: none;
            }
          }
        }

        .stellar-program-list__cta:hover {
          background: #005a87;
          transition: 0.3s;
        }

        /* Disabled state for CTA when program already selected */
        .stellar-program-list__cta[aria-disabled="true"],
        .stellar-program-list__cta.is-disabled {
          background: #5a5a5a;
          cursor: not-allowed;
          pointer-events: none;
          opacity: 0.75;
        }
      }
    }
  }
}

.stellar-program-list p:not(.stellar-program-list__desc) {
  margin: 0 auto;
  font-size: 17px !important;
  line-height: 25px;


}

/* Guard against accidental empty paragraphs inserted by wpautop in calendar nav */
.stellar-trening-calendar__nav>p:empty {
  display: none !important;
}

.stellar-other-programs {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;

  .stellar-program-header-title {
    font-weight: 400;
    font-size: 70px;
    text-align: left;

    @media (max-width: 1024px) {
      font-size: 55px;
      text-align: center;
    }

    @media (max-width: 1024px) {
      font-size: 25px;
    }
  }

  .stellar-program-list__items {
    display: flex;
    flex-direction: column;
    gap: 13px;
    max-width: 100%;
    list-style: none;

    @media (max-width: 1024px) {
      /* Horizontal carousel on mobile */
      flex-direction: row;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      scroll-snap-type: x mandatory;
      gap: 16px;
      padding: 0 60px 0 16px;
      width: 100%;
      scroll-padding-left: 16px;

      &::-webkit-scrollbar {
        display: none;
      }
    }

    .stellar-program-list__item {
      padding: 13px;
      border-radius: 34px;
      min-height: 0;
      gap: 20px;

      @media (max-width: 1024px) {
        flex: 0 0 auto;
        width: 100%;
        scroll-snap-align: start;
        scroll-snap-stop: always;
      }

      .stellar-program-list__inner {
        gap: 10px;

        @media (max-width: 1024px) {
          gap: 14px;

          p {
            display: none;
          }
        }

        &.stellar-program-list__inner--content {
          position: static;
          display: flex;
          flex-direction: column;
          justify-content: space-around;

          .stellar-program-list__title {
            font-weight: 500;
            font-size: 28px !important;
            width: 80%;

            @media (max-width: 1024px) {
              font-size: 21px;
              width: 100%;
            }
          }

          .stellar-program-list__desc {
            font-weight: 400;
            font-size: 13px;
            line-height: 17px;
            width: 80%;

            @media (max-width: 1024px) {
              font-size: 10px;
              line-height: 13px;
              width: 100%;
            }
          }

          .stellar-program-list__cta {
            position: absolute;
            bottom: 13px;
            right: 13px;
            height: calc(100% - 26px);
            width: 60px;
            border-radius: 21px;

            .stellar-program-list__cta-label {
              display: none;
            }

            img {
              display: inline-block;
            }

            @media (max-width: 1024px) {
              position: relative;
              width: 100%;
              max-width: 220px;
              height: 46px;
              border-radius: 34px;
              margin: 10px auto 0 auto;

              .stellar-program-list__cta-label {
                display: inline;
              }

              img {
                display: none;
              }
            }
          }
        }

        .stellar-program-list__thumb {
          width: 400px;
          height: 200px;
          border-radius: 21px;

          @media (max-width: 1024px) {
            width: 100%;
            height: auto;
            aspect-ratio: 1/1;
          }

          &:hover {
            background: #005a87;
            transition: 0.3s;
          }
        }
      }
    }
  }

  .stellar-program-list__cta-all {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    cursor: pointer;
    margin-top: 50px;

    a {
      background: #00b9f2;
      border-radius: 50px;
      padding: 10px 20px;
      transition: 0.3s;
      text-decoration: none;
      color: #fff;
      font-weight: 700;
      font-size: 19px;
      height: 60px;
      width: 400px;
      display: flex;
      align-items: center;
      justify-content: center;

      &:hover {
        background: #005a87;
        transition: 0.3s;
      }
    }
  }
}