// SCSS Variables
.ridetile-container {
  margin: 2rem auto;
  padding: 0 120px;
  max-width: 1550px;

  @media (max-width: 1024px) {
    padding: 0 60px;
  }

  @media (max-width: 768px) {
    margin: 1rem;
    padding: 0;
  }
}

.ridetile-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 2rem 0;
  color: $ridetile-title-color;
  text-align: center;

  @media (max-width: 767px) {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }
}

/* Ride Cards Grid Layout */
.ride-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding-bottom: 50px;

  @media (max-width: 1023px) {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  @media (max-width: 767px) {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Owl Carousel Slider */
.ride-card-slider.owl-carousel {
  margin: 0;
  padding: 0 0 3rem 0;

  .owl-item {
    padding: 3px;

    .ride-card {
      margin: 0 auto;
    }
  }

  .owl-nav {
    button {
      width: 52px;
      height: 52px;

      @media (max-width: 767px) {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
      }

      &.owl-prev {
        margin-left: -75px;

        @media (max-width: 767px) {
          margin-left: -20px;
        }
      }

      &.owl-next {
        margin-right: -75px;

        @media (max-width: 767px) {
          margin-right: -20px;
        }
      }

      &.owl-prev:before,
      &.owl-next:before {
        font-size: 1.5rem !important;
        line-height: 3.25rem !important;
      }
    }

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

  .owl-dots {
    display: flex;
    justify-content: center;
    gap: 0px;

    &.disabled {
      display: none;
    }
  }

  .owl-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: $ridetile-dot-inactive;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;

    &.active {
      background: $ridetile-title-color;
      width: 16px;
      border-radius: 360px;
    }
  }
}

/* Ride Card */
.ride-card {
  background: $ridetile-text-white;
  overflow: hidden;
  transition: none;
  border-radius: 12px;
  position: relative;

  >span {
    position: absolute;
    z-index: 1;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 40%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
  }

  &:hover .ride-card-image img {
    transform: scale(1.05);
  }

  .ride-card-image {
    position: relative;
    width: 100%;
    max-height: 450px;
    overflow: hidden;
    height: 450px;

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.3s ease;
    }
  }

  .ride-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    // background: linear-gradient(to top, $ridetile-overlay-black 0%, $ridetile-overlay-black-60 50%, $ridetile-overlay-black-30 70%, transparent 100%);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    z-index: 2;

    @media (max-width: 767px) {
      padding: 1.25rem;
    }

    @media (max-width: 480px) {
      padding: 1.5rem 1rem 1rem;
    }

    .ride-card-content {
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      align-self: flex-end;
      width: 100%;
      margin-top: auto;

      .ride-card-title {
        font-size: 20px;
        font-weight: 700;
        margin: 0;
        color: $ridetile-text-white;
        line-height: 1.2;
        border-radius: 0 12px 12px 0;
        background: $ridetile-background-color;
        display: inline-block;
        padding: 0.5rem 24px;
        width: fit-content;
        max-width: 100%;
        margin-left: -24px;
      }

      .ride-card-description {
        font-size: 0.95rem;
        color: $ridetile-text-white;
        margin: 0;
        line-height: 1.4;
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);

        p {
          padding-bottom: 0;
          margin: 0;
          color: $ridetile-text-white;
          font-size: 16px;
          font-style: normal;
          font-weight: 400;
          line-height: 24px;
          margin-bottom: 1rem;

          a {
            color: $ridetile-text-white;
            font-size: 16px;
            font-style: normal;
            font-weight: 700;
            line-height: 150%;
            margin-top: 0.75rem;
          }
        }

        ul {
          list-style: none;
          padding: 0;
          margin: 0;

          li {
            padding-left: 0;
            padding-bottom: 0.25rem;
            color: $ridetile-text-white;

            &::before {
              display: none;
            }
          }
        }
      }

      .ride-card-link {
        color: $ridetile-text-white;
        font-size: 16px;
        font-style: normal;
        font-weight: 700;
        line-height: 150%;

        @media (max-width: 767px) {
          padding: 0.6rem 1.25rem;
          font-size: 0.85rem;
        }
      }
    }
  }
}