.client-story-area {
  background-color: rgba(#0fe493, 0.03);
  position: relative;
  z-index: 1;
  overflow: hidden;

  .shape {
    position: absolute;
    top: 49%;
    right: -20px;
    z-index: -1;
  }

  .slick-dots {
    bottom: 0;

    li {
      button {
        display: none;
      }

      height: 10px;
      width: 30px;
      border-radius: 5px;
      background-color: #ffcae6;
      transition: all 0.3s linear;
      margin: 0 8px;

      &.slick-active {
        width: 80px;
        background-color: $brand_color;
      }
    }
  }
}

.client-story-widget {
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
  height: 100%;
  display: flex;
  flex-direction: column;

  &:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);

    .main-img {
      transform: scale(1.05);
    }

    .content {
      .read-more-btn {
        color: $brand_hover;
        letter-spacing: 0.5px;

        &::after {
          transform: translateX(4px);
          opacity: 1;
        }
      }
    }
  }

  .main-img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    transition: transform 0.6s ease;
  }

  &.variant-2 {
    display: flex;
    flex-direction: row; // Ensure row for variant-2 if used elsewhere

    .main-img {
      max-width: 250px;
      height: auto;
    }

    .content {
      padding: 30px 20px 26px;
    }
  }

  .content {
    padding: 50px;
    display: flex;
    flex-direction: column;
    flex: 1;

    h4 {
      font-size: 22px;
      font-weight: 800;
      color: $black_800;
      line-height: 1.35;
      margin-bottom: 16px;
      transition: color 0.3s ease;
      letter-spacing: -0.02em;

      &:hover {
        color: $brand_color;
      }
    }

    p {
      color: $black_600;
      font-size: 15px;
      line-height: 1.7;
      margin-bottom: 24px;
      flex-grow: 1; // Pushes bottom elements down
    }

    .d-flex {
      margin-top: auto; // align bottom items
      width: 100%;
      justify-content: space-between;
      align-items: center;
    }

    .read-more-btn {
      font-size: 14px;
      font-weight: 700;
      color: $brand_color;
      text-transform: uppercase;
      letter-spacing: 0;
      display: inline-flex;
      align-items: center;
      transition: all 0.3s ease;
      position: relative;
      text-decoration: none;
      white-space: nowrap;
    }

    .social-action {
      display: flex;
      align-items: center;
      gap: 16px;

      a {
        font-size: 13px;
        color: $black_500;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        transition: all 0.3s ease;
        text-decoration: none;

        img {
          width: 16px;
          opacity: 0.6;
          transition: all 0.3s ease;
        }

        &:hover {
          color: $brand_color;

          img {
            opacity: 1;
            filter: invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%); // Approximate brand color filter
          }
        }
      }
    }
  }
}

.client-story-area-two {
  position: relative;
  overflow: hidden;
  z-index: 1;

  .bg-shape {
    img {
      position: absolute;
      z-index: -1;

      &:nth-child(1) {
        left: -30px;
        top: 200px;
      }

      &:nth-child(2) {
        right: 30px;
        top: 380px;
      }

      &:nth-child(3) {
        left: -30px;
        top: 70%;
      }

      &:nth-child(4) {
        right: -10px;
        top: 70%;
      }
    }
  }

  .client-story-widget {
    height: 100%;
  }

  .post-item {
    margin-top: 32px;
    background: rgba(255, 255, 255, 0.5);
    padding: 40px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.03);
    border-radius: 12px;
  }
}

.client_story_slider {
  .client-story-widget {
    h4 {
      font-weight: 700;
    }
  }

  .slick-list {
    margin: -19px -21px;
    padding: 19px 9px;

    .slick-slide {
      margin: 0 12px;
      border: none;
    }
  }
}

.client_story_slider_two {
  .client-story-widget {
    height: 265px;
  }

  .slick-list {
    margin: -19px -40px;
    padding: 7px 40px;

    .slick-slide {
      margin: 12px 0;
      border: none;
      transition: all 0.3s linear;
    }
  }
}

// Story Details

.post-details-widget {
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.03);
  background-color: rgba(255, 255, 255, 0.8);

  p {
    font-size: 16px;
    font-weight: 400;
    color: $black_600;
    margin-bottom: 16px;
    line-height: 26px;
  }

  .post-img {
    border-radius: 8px;
    max-width: 100%;
    margin-top: 18px;
    margin-bottom: 35px;
  }

  .rounded-5 {
    border-radius: 5px;
  }

  h2 {
    font-size: 32px;
    font-weight: 600;
    color: $black_800;
    line-height: 40px;
    margin-bottom: 20px;
  }
}

.tag-widget {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 16px;
  column-gap: 12px;

  h6 {
    font-size: 16px;
    font-weight: 600;
    color: $black_700;
    margin-bottom: 0;
    margin-right: 6px;
    text-transform: uppercase;
  }

  a {
    display: inline-block;
    padding: 2px 16px;
    font-size: 16px;
    line-height: 26px;
    font-weight: 400;
    color: $black_750;
    border-radius: 4px;
    border: 1px solid $black_100;
    background-color: #fff;
    text-transform: capitalize;

    &:hover {
      border-color: $brand_color;
      color: $brand_color;
    }
  }
}

blockquote {
  background: var(--brand_color_25);
  border-left: 10px solid var(--brand_color);
  padding: 60px 30px 40px 30px;
  position: relative;
  z-index: 1;
  margin-bottom: 38px;
  margin-top: 35px;
  box-shadow: var(--subtle_shadow);
  border-radius: 8px;

  &::before,
  &::after {
    content: "";
    position: absolute;
    z-index: -1;
  }

  &::before {
    background-image: url(../img/story/quote-left.png);
    left: 30px;
    top: 30px;
    height: 24px;
    width: 24px;
  }

  &::after {
    background-image: url(../img/story/quote-right.png);
    right: 20px;
    bottom: 20px;
    height: 24px;
    width: 24px;
  }

  p {
    font-size: 24px;
    font-weight: 600;
    color: $black_700;
    line-height: 32px;
    margin-bottom: 0;
  }
}

.story-comment-widget {
  padding: 25px 40px 100px 40px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.03);
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.5);
  margin-top: 48px;

  .comment-author {
    ul {
      list-style: none;
      margin: 0;
      padding: 0;

      li {
        &.children {
          margin-left: 70px;

          .comments-avatar {
            img {
              height: 40px;
              width: 40px;
            }
          }
        }
      }
    }

    .comments-box {
      display: flex;
      margin-top: 40px;

      .comments-text {
        width: 100%;
        margin-left: 30px;

        p {
          font-weight: 400;
          font-size: 16px;
          color: $black_600;
          line-height: 26px;
          margin-top: 14px;
          margin-bottom: 0;
        }

        .avatar-name {
          position: relative;

          h5 {
            font-size: 16px;
            font-weight: 600;
            line-height: 28px;
            color: #000;
            margin-bottom: 3px;
          }

          .post-date {
            font-size: 14px;
            line-height: 20px;
            color: $black_300;
          }

          .reply {
            display: inline-block;
            position: absolute;
            right: 0;
            top: 0;
            background-color: $black_700;
            border-radius: 4px;
            font-size: 12px;
            line-height: 16px;
            color: #fff;
            padding: 4px 9px;

            &:hover {
              background-color: $black_900;
            }

            img {
              margin-right: 4px;
            }
          }
        }
      }
    }

    .comments-avatar {
      img {
        border-radius: 50%;
        height: 56px;
        width: 56px;
      }
    }

    .comments-input {
      position: relative;
      margin-left: 12px;
      width: 100%;

      textarea {
        width: 100%;
        border: 1px solid $black_50;
        border-radius: 4px;
        padding: 18px 16px 46px 16px;
        font-size: 16px;
        line-height: 26px;
        box-shadow: none;

        &::placeholder {
          font-size: 16px;
          line-height: 26px;
          color: #c1c5cd;
        }

        &:focus {
          border-color: $black_400;
        }
      }

      .text-action {
        position: absolute;
        display: flex;
        left: 16px;
        bottom: 8px;
        right: 16px;

        button {
          background-color: transparent;
          padding: 6px;
          border-radius: 50%;
          transition: all 0.3s linear;
          border: none;
          outline: none;

          &:hover {
            background-color: #f2f4f5;
          }
        }
      }
    }
  }
}

.story-leave-reply {
  margin-top: 32px;
  background: rgba(255, 255, 255, 0.5);
  padding: 30px 40px 40px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.03);
  border-radius: 12px;

  .subtext {
    font-size: 20px;
    line-height: 28px;
    color: $black_600;
  }

  .single-input {
    margin-top: 40px;

    label {
      margin-top: -6px;
    }
  }

  label {
    display: block;
    font-size: 14px;
    line-height: 20px;
    color: $black_500;
  }

  .form-control {
    border: 1px solid rgba(#000000, 5%);
    border-radius: 8px;
    height: 59px;
    line-height: 59px;
    padding-left: 24px;
    font-size: 16px;
    color: $black_350;
    box-shadow: none;

    &:focus {
      border-color: $black_400;
    }

    &::placeholder {
      font-size: 16px;
      color: $black_350;
    }
  }

  textarea.form-control {
    height: inherit;
    line-height: 26px;
    padding-top: 16px;
  }

  .form-check-input {
    background-color: transparent;
  }

  .form-check-label {
    color: $black_600;
  }
}

.story-sidebar-widget {
  .widget-title {
    font-size: 20px;
    line-height: 28px;
    color: var(--black_800);
    font-weight: 700;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 12px;

    &::after {
      content: "";
      position: absolute;
      left: 0;
      bottom: 0;
      width: 40px;
      height: 3px;
      background: var(--gradient-primary);
      border-radius: 99px;
    }
  }

  .widget {
    @include glass-card;
    padding: 30px;
    margin-bottom: 30px;
    border: var(--glass-border);
  }

  .widget-search {
    position: relative;
    background: #fff;
    border: 1px solid rgba($black_100, 0.5);
    padding: 8px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    margin-bottom: 40px;
    box-shadow: var(--bs_sm);

    &:hover,
    &:focus-within {
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
      border-color: rgba($brand_color, 0.3);
      transform: translateY(-2px);
    }

    .form-control {
      flex: 1;
      height: 54px;
      padding: 0 15px 0 20px;
      background: transparent;
      border: none;
      font-size: 16px;
      font-weight: 500;
      color: $black_800;
      box-shadow: none !important;

      &::placeholder {
        color: $black_300;
        font-weight: 400;
      }
    }

    .search-btn {
      width: 54px;
      height: 54px;
      flex-shrink: 0;
      background: var(--gradient-primary);
      border: none;
      border-radius: 12px;
      color: #fff;
      font-size: 18px;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
      cursor: pointer;
      box-shadow: 0 4px 15px rgba($brand_color, 0.3);

      &:hover {
        transform: scale(1.08) rotate(5deg);
        box-shadow: 0 8px 25px rgba($brand_color, 0.4);
      }

      &:active {
        transform: scale(0.95);
      }
    }
  }

  .widget-catagory {
    margin-bottom: 40px;

    ul {
      li {
        &:not(:last-child) {
          border-bottom: 1px solid rgba($black_100, 0.3);
        }

        a {
          display: flex;
          align-items: center;
          justify-content: space-between;
          font-size: 16px;
          font-weight: 500;
          color: $black_600;
          padding: 14px 0;
          transition: all 0.3s ease;

          .cat-name {
            display: flex;
            align-items: center;
            gap: 12px;

            i {
              width: 32px;
              height: 32px;
              background: var(--brand_color_50);
              color: $brand_color;
              display: flex;
              align-items: center;
              justify-content: center;
              border-radius: 8px;
              font-size: 14px;
              transition: all 0.3s ease;
            }
          }

          .count {
            background: var(--black_50);
            color: $black_500;
            padding: 2px 10px;
            border-radius: 99px;
            font-size: 12px;
            font-weight: 600;
            transition: all 0.3s ease;
          }

          &:hover {
            color: $brand_color;
            padding-left: 8px;

            .cat-name i {
              background: $brand_color;
              color: #fff;
              transform: rotate(10deg);
            }

            .count {
              background: var(--brand_color);
              color: #fff;
              box-shadow: 0 4px 10px rgba($brand_color, 0.3);
            }
          }
        }
      }
    }
  }

  .widget-news {
    margin-bottom: 40px;

    .recent-post {
      li {
        display: flex;
        gap: 18px;
        padding: 15px 0;
        border-bottom: 1px solid rgba($black_100, 0.3);
        transition: all 0.3s ease;

        &:last-child {
          border: none;
          padding-bottom: 0;
        }

        &:first-child {
          padding-top: 0;
        }

        .news-img {
          border-radius: 12px;
          height: 80px;
          width: 80px;
          object-fit: cover;
          flex-shrink: 0;
          box-shadow: var(--bs_sm);
          transition: all 0.4s ease;
        }

        .news-content {
          margin-left: 0;

          h6 {
            font-size: 15px;
            font-weight: 700;
            color: $black_800;
            line-height: 22px;
            margin-bottom: 10px;
            transition: all 0.3s ease;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;

            a:hover {
              color: $brand_color;
            }
          }

          .post-author {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-size: 13px;
            font-weight: 600;
            color: $black_400;
            transition: all 0.3s ease;

            img {
              height: 24px;
              width: 24px;
              border-radius: 50%;
              border: 2px solid #fff;
              box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
            }

            &:hover {
              color: $brand_color;
            }
          }
        }

        &:hover {
          .news-img {
            transform: scale(1.05) rotate(-2deg);
            box-shadow: var(--bs_md);
          }
        }
      }
    }
  }

  .widget-tags {
    .tag-widget {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;

      a {
        padding: 6px 18px;
        font-size: 14px;
        font-weight: 500;
        color: $black_600;
        background: #fff;
        border: 1px solid rgba($black_100, 0.8);
        border-radius: 99px;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);

        &:hover {
          background: var(--gradient-primary);
          color: #fff !important;
          border-color: transparent;
          transform: translateY(-3px) scale(1.05);
          box-shadow: 0 8px 20px rgba($brand_color, 0.3);
        }
      }
    }
  }
}


.story-details-breadcrumb {
  .blog-meta {
    >div {
      box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
      display: flex;
      align-items: center;
      justify-content: center;
      background-color: rgba(255, 255, 255, 0.2);
      padding: 8px 20px;
      border-radius: 50rem;
      color: var(--black_500);
      font-size: 14px;

      i {
        color: var(--brand_color_500);
        margin-right: 4px;
      }
    }
  }
}