.blog-box-wrapper {
  .blog-box {
    &:not(:last-of-type) {
      margin-bottom: 30px;

      @include breakpoint(max-mf) {
        margin-bottom: 20px;
      }
    }
  }
}
.blog-box {
  @extend %d-flex, %justify-between, %item-center;
  gap: 5px;
  border-radius: 20px;
  border: 1px solid $color-2;
  background-color: $color-2;
  @include transition($transition);
  padding: 40px;

  .blog-content {
    max-width: 500px;

    .blog-sub-title {
      font-size: 18px;
      line-height: 155.556%;
      margin-bottom: 30px;
      position: relative;
      padding-left: 18px;
      color: $color-primary;

      @include breakpoint(max-md) {
        margin-bottom: 20px;
        padding-left: 13px;
      }
      @include breakpoint(max-sm) {
        font-size: 15px;
      }

      &::before {
        @extend %p-absolute;
        @include transform(translateY(-50%));
        left: 0px;
        top: 50%;
        width: 8px;
        height: 8px;
        border-radius: 100%;
        background-color: $color-primary;

        @include breakpoint(max-sm) {
          width: 6px;
          height: 6px;
        }
      }

      i,
      svg {
        font-size: 10px;
        color: inherit;
      }
    }
    .blog-title {
      margin-top: 10px;
      @include breakpoint(max-xl) {
        margin-top: 5px;
      }
      @include breakpoint(max-sm) {
        margin-top: 0px;
      }
    }
  }
  .agx-btn2 {
    @extend %shrink-0;
  }
  &:hover,
  &.active {
    border-color: $color-primary;

    .agx-btn2 {
      border-color: $color-primary;
      background-color: $color-primary;
      color: $color-1;
    }
  }
}
.blog-box-thumbs {
  @extend %p-relative;
  width: 100%;
  height: 100%;
  border-radius: 40px;
  overflow: hidden;

  @include breakpoint(max-lg) {
    border-radius: 15px;
  }

  img {
    @extend %p-absolute;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    @include transform(scale(0.8));
    @include transition($transition-5-ease-in-out);
    z-index: -1;

    &.active {
      @include transform(scale(1.1));
      opacity: 1;
      z-index: 1;
      @include transition($transition-5-ease-in-out);
      @include breakpoint(max-lg) {
        position: relative;
      }
    }
  }
}

.blog-box2 {
  .blog-thumb {
    overflow: hidden;
    border-radius: 10px;
    margin-top: 34px;

    @include breakpoint(max-xl) {
      margin-top: 20px;
    }

    img {
      @include transition($transition);
      width: 100%;
    }
  }
  .blog-content {
    .blog-meta {
      @extend %p-relative;
      padding-bottom: 8px;

      &::before {
        @extend %p-absolute;
        @include transition($transition);
        height: 1px;
        width: 0%;
        left: 0;
        bottom: -1px;
        background-color: $color-primary;
      }
      &::after {
        @extend %p-absolute;
        @include transition($transition);
        height: 1px;
        width: 100%;
        left: 0;
        bottom: -1px;
        background-color: rgba($color-white, 0.14);
      }
    }
    .blog-title {
      margin-top: 22px;

      @include breakpoint(max-xl) {
        margin-top: 15px;
      }
    }
  }
  &:hover,
  &.active {
    .blog-thumb {
      img {
        @include transform(scale(1.05));
      }
    }
    .blog-content {
      .blog-meta {
        &::before {
          width: 100%;
        }
      }
    }
  }
}

.blog-box3 {
  .blog-thumb {
    border-radius: 14px;
    overflow: hidden;
  }
  .blog-content {
    padding-block-start: 20px;

    @include breakpoint(max-md) {
      padding-block-start: 10px;
    }

    .blog-title {
      a {
        &:hover {
          color: $color-primary;
        }
      }
    }
  }

  .blog-meta {
    @extend %d-flex, %justify-between, %item-center;
    margin-block-end: 18px;

    @include breakpoint(max-md) {
      margin-block-end: 10px;
    }

    a {
      font-size: 16px;
      font-weight: 400;
      line-height: 162.5%;

      &.post-category {
        border-radius: 20px;
        border: 1px solid rgba($color-white, 0.3);
        padding: 2px 20px;
      }

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

.blog-box4 {
  .blog-thumb {
    @extend %p-relative;
    border-radius: 14px;
    overflow: hidden;

    img {
      @include transition($transition);
    }

    .blog-link {
      @extend %p-absolute;
      inset: 0;
      border-radius: 14px;
      overflow: hidden;
    }
  }
  .blog-content {
    margin-top: 25px;

    @include breakpoint(max-md) {
      margin-top: 20px;
    }
  }
  .blog-meta {
    ul {
      @extend %d-flex, %justify-between, %item-center, %flex-wrap;
      row-gap: 25px;
      li {
        a {
          @extend %d-inline-flex, %item-center;
          color: rgba($color-white, 0.7);
          color: rgba(255, 255, 255, 0.7);

          &:hover {
            color: $color-primary;
          }
          &::before {
            padding-right: 7px;
          }
        }
        .post-date {
          &::before {
            font: var(--fa-font-regular);
            content: "\f073";
          }
        }
        .post-comment {
          &::before {
            font: var(--fa-font-regular);
            content: "\f086";
          }
        }
      }
    }
  }
  .blog-title {
    margin-top: 10px;

    @include breakpoint(max-md) {
      margin-top: 5px;
    }

    a {
      &:hover {
        color: $color-primary;
      }
    }
  }

  &:hover {
    .blog-thumb {
      img {
        @include transform(rotate(5deg) scale(1.15));
      }
    }
  }
}

.blog-box5 {
  .blog-thumb {
    @extend %p-relative;
    border-radius: 20px;
    overflow: hidden;
    img {
      @include transition($transition);
    }

    .blog-link {
      @extend %p-absolute;
      inset: 0;
      border-radius: 20px;
      overflow: hidden;
    }
  }
  .blog-content {
    margin-top: 20px;

    @include breakpoint(max-md) {
      margin-top: 15px;
    }

    .blog-meta {
      ul {
        @extend %d-flex, %item-center, %flex-wrap;
        column-gap: 20px;
        li {
          a {
            @extend %d-inline-flex, %item-center;
            color: $color-primary;
            font-size: $fs-18;
            font-family: $ff-rubik;

            &:hover {
              color: $color-primary;
            }
            &::before {
              padding-right: 7px;
              font: var(--fa-font-solid);
              content: "\e122";
              font-size: 12px;
            }
          }
        }
      }
    }
    .blog-title {
      margin-top: 5px;
    }
  }
  &:hover {
    .blog-thumb {
      img {
        @include transform(scale(1.1) rotate(5deg));
      }
    }
  }
}

.blog6 {
  &.section {
  }
}
.blog-box6 {
  border-radius: 20px;
  background: $color-2;
  padding: 30px;

  @include breakpoint(max-lg) {
    border-radius: 10px;
    padding: 20px;
  }
  .blog-thumb {
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 30px;
    @extend %p-relative;

    @include breakpoint(max-lg) {
      border-radius: 10px;
      margin-bottom: 20px;
    }

    img {
      @include transition($transition);
    }

    .blog-link {
      @extend %p-absolute;
      inset: 0;
    }
  }
  .blog-content {
    margin-bottom: 30px;
    @include breakpoint(max-lg) {
      margin-bottom: 20px;
    }
    .blog-sub-title {
      @extend %d-inline-block;
      line-height: 155.556%;
      margin-bottom: 10px;
      position: relative;
      padding-left: 18px;
      color: $color-primary;

      &:not(h1, h2, h3, h4, h5, h6) {
        font-size: 18px;
      }

      @include breakpoint(max-md) {
        margin-bottom: 5px;
        padding-left: 13px;
      }
      @include breakpoint(max-sm) {
        font-size: 15px;
      }

      &::before {
        @extend %p-absolute;
        @include transform(translateY(-50%));
        left: 0px;
        top: 50%;
        width: 8px;
        height: 8px;
        border-radius: 100%;
        background-color: $color-primary;

        @include breakpoint(max-sm) {
          width: 6px;
          height: 6px;
        }
      }

      i,
      svg {
        font-size: 10px;
        color: inherit;
      }
      &.double-icon {
        padding-right: 18px;

        @include breakpoint(max-md) {
          padding-right: 13px;
        }

        &::after {
          @extend %p-absolute;
          @include transform(translateY(-50%));
          right: 0px;
          top: 50%;
          width: 8px;
          height: 8px;
          border-radius: 100%;
          background-color: $color-primary;

          @include breakpoint(max-sm) {
            width: 6px;
            height: 6px;
          }
        }
      }
      &.no-icon {
        padding-left: 0;
        padding-right: 0;
        &::before,
        &::after {
          content: none;
          width: 0;
        }
      }

      &.white-version {
        @extend %d-inline-block;
        color: $color-white;

        &::before {
          background-color: $color-white;
        }
        &.double-icon {
          &::after {
            background-color: $color-white;
          }
        }
      }
    }
    .blog-title {
      max-width: 490px;
    }
  }
  &:hover {
    .blog-thumb {
      img {
        @include transform(scale(1.1) rotate(5deg));
      }
    }
  }
}

.blog-main {
  &__wrapper {
    .blog-main__box {
      &:not(:last-of-type) {
        margin-bottom: 70px;

        @include breakpoint(max-lg) {
          margin-bottom: 50px;
        }
      }
    }
  }
  &__pagination {
    @include breakpoint(xxl) {
      margin-top: 90px;
    }
    .pagination {
      gap: 20px;

      @include breakpoint(max-md) {
        gap: 10px;
      }

      .page-item {
        .page-link {
          width: 67px;
          height: 67px;
          border: 1px solid $color-primary;
          display: grid;
          place-content: center;
          border-radius: 100%;
          background-color: transparent;
          color: $color-white;

          @include breakpoint(max-md) {
            width: 50px;
            height: 50px;
          }

          &:focus {
            z-index: 3;
            color: $color-white;
            background-color: inherit;
            outline: 0;
            -webkit-box-shadow: none;
            box-shadow: none;
          }
          &:hover {
            background-color: $color-primary;
            color: $color-1;
          }
        }
        &.active {
          .page-link {
            background-color: $color-primary;
            color: $color-1;
          }
        }
      }
    }
  }
  &__box {
    .blog-thumb {
      @extend %p-relative;
      border-radius: 40px;
      overflow: hidden;

      a {
        @extend %d-block;
      }

      @include breakpoint(max-lg) {
        border-radius: 20px;
      }

      @include breakpoint(max-sm) {
        border-radius: 10px;
      }

      .post-dates {
        @extend %p-absolute, %text-center;
        left: 30px;
        bottom: 30px;
        background-color: $color-primary;
        border-radius: 10px;

        .date,
        .month {
          padding: 5px 10px;
        }
        .date {
          color: $color-1;
        }
        .month {
          background-color: $color-1;
          color: $color-primary;
          border-radius: 10px;
        }

        @include breakpoint(max-md) {
          left: 20px;
          bottom: 20px;
        }
      }
    }
    .blog-content {
      margin-top: 20px;
      @include breakpoint(max-md) {
        margin-top: 15px;
      }
      .blog-meta {
        @extend %d-flex, %item-center;
        gap: 20px;

        @include breakpoint(max-md) {
          gap: 10px;
        }

        a {
          @extend %d-inline-flex, %item-center;
          gap: 7px;
          color: $color-white;

          i,
          svg {
            color: $color-primary;
          }

          @include breakpoint(max-md) {
            gap: 6px;
          }
        }
      }
      .post-content {
        .post-title {
          margin-block: 15px;
          @include breakpoint(max-md) {
            margin-block: 10px;
          }
        }
        p {
          font-size: 16px;
          line-height: 162.5%;
        }
        .agx-btn {
          margin-top: 22px;
        }
      }
    }
  }
}

.blog {
  &-single {
    p {
      font-size: 16px;
    }
    .p-space {
      margin-top: 30px;

      @include breakpoint(max-md) {
        margin-top: 20px;
      }
    }
    .blockquote {
      border-radius: 20px;
      border: 2px solid $color-primary;
      padding: 30px;
      margin-top: 40px;
      margin-bottom: 20px;

      @include breakpoint(max-md) {
        margin-top: 30px;
        margin-bottom: 15px;
        padding: 20px;
      }

      .blockquote-footer {
        @extend %d-flex, %justify-between, %item-center;
        gap: 20px;
        margin-top: 20px;
        line-height: 1;

        &::before {
          content: unset;
        }
        cite {
          font-style: normal;
          @extend %p-relative, %d-flex, %item-center;
          gap: 10px;

          &::before {
            @extend %p-relative;
            content: "";
            top: 50%;
            left: 0px;
            width: 40px;
            height: 2px;
            background-color: $color-primary;
            @include transform(translateY(-50%));
          }
          .author {
            @extend %d-inline-block;
            font-weight: 500;
            font-family: $ff-title;
            color: $color-white;
            font-size: $fs-h5;
            // $fs-h5: 24px;
            @include breakpoint(max-lg) {
              font-size: calc($fs-h5 - 1px); // 23px
            }
            @include breakpoint(max-md) {
              font-size: calc($fs-h5 - 4px); // 20px
            }
            @include breakpoint(max-sm) {
              font-size: calc($fs-h5 - 6px); // 18px
            }
          }
        }
        .quote-icon {
          font-size: 42.286px;
          color: $color-primary;
        }
      }
    }
    .images {
      margin-top: 40px;
      .img {
        border-radius: 40px;
        overflow: hidden;
      }
      @include breakpoint(max-md) {
        margin-top: 20px;
        .img {
          border-radius: 20px;
        }
      }
      @include breakpoint(max-sm) {
        .img {
          border-radius: 10px;
        }
      }
    }

    &__tagsAndSocial {
      @extend %d-flex, %justify-between, %item-center, %flex-wrap;
      margin-top: 50px;
      padding-block: 25px;
      padding-inline: 40px 10px;
      border-radius: 20px;
      border: 1px solid $color-5;
      gap: 20px;

      @include breakpoint(max-xl) {
        margin-top: 30px;
        padding-inline: 20px 10px;
        border-radius: 10px;
      }
      .tags {
        @extend %d-flex, %item-center, %flex-wrap;
        column-gap: 15px;
        row-gap: 5px;

        .title {
          font-weight: 500;
          line-height: 116.667%;
        }
        ul {
          @extend %d-flex, %item-center;
          gap: 15px;

          li {
            a {
              color: $color-white;
              font-size: 16px;
              font-weight: 400;

              &:hover {
                color: $color-primary;
              }
            }
          }
        }
      }
      .social-share {
        ul {
          @extend %d-flex, %item-center;
          gap: 20px;

          li {
            a {
              @extend %d-grid, %place-center;
              color: $color-white;
              font-size: 25px;
              border: 1px solid $color-white;
              border-radius: 14px;
              padding-inline: 20px;
              width: 65px;
              height: 52px;

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

              @include breakpoint(max-xl) {
                padding-inline: 12px;
                font-size: 20px;
                width: 50px;
                height: 42px;
              }
            }
          }
        }
      }
    }

    &__navigations {
      @extend %d-flex, %justify-between;
      margin-top: 60px;
      gap: 15px;

      @include breakpoint(max-xl) {
        margin-top: 30px;
      }
      @include breakpoint(max-sm) {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
      }
      .previous,
      .next {
        @extend %d-flex, %item-center;
        gap: 20px;

        @include breakpoint(max-md) {
          gap: 10px;
        }

        .arrow {
          @extend %d-grid, %place-center, %shrink-0;
          width: 60px;
          height: 60px;
          border-radius: 100%;
          background-color: $color-primary;
          color: $color-1;
          font-size: 16px;

          @include breakpoint(max-md) {
            width: 50px;
            height: 50px;
          }
        }

        .navigation-content {
          span {
            color: $color-5;
            font-family: Inter;
            font-size: 16px;
            font-style: normal;
            font-weight: 400;
          }

          .title {
            margin-top: 4px;
          }
        }
      }
    }
    &__comments {
      margin-top: 60px;

      .comment-title {
        margin-bottom: 30px;
        font-weight: 500;

        @include breakpoint(max-md) {
          font-size: 27px;
        }
      }
      @include breakpoint(max-xl) {
        margin-top: 30px;
        .comment-title {
          margin-bottom: 20px;
        }
      }

      .comment-item {
        &:not(:first-of-type) {
          margin-top: 34px;
          @include breakpoint(max-lg) {
            margin-top: 30px;
          }
        }
      }
    }
    &__comment-form {
      border-radius: 20px;
      background: $color-2;
      padding-inline: 60px;
      padding-block: 50px 60px;
      margin-top: 50px;

      @include breakpoint(max-md) {
        border-radius: 10px;
        padding-inline: 40px;
        padding-block: 30px 40px;
        margin-top: 40px;
      }
      @include breakpoint(max-sm) {
        padding-inline: 30px;
        padding-block: 20px 30px;
      }

      .title {
        margin-bottom: 10px;
      }

      p {
        color: $color-5;
        font-size: 16px;
      }

      .comment-form {
        margin-top: 30px;
        @include breakpoint(max-md) {
          margin-top: 20px;
        }

        .input-group {
          @extend %flex-col;

          &:not(:last-of-type) {
            margin-bottom: 20px;
            @include breakpoint(max-md) {
              margin-bottom: 10px;
            }
          }

          label {
            @extend %d-inline-block;
            color: $color-white;
            font-size: 16px;
            font-weight: 400;
            margin-bottom: 14px;
          }

          > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(
              .valid-feedback
            ):not(.invalid-tooltip):not(.invalid-feedback) {
            border-radius: 20px;

            @include breakpoint(max-md) {
              border-radius: 10px;
            }
          }
          .form-control {
            width: 100%;
            border-radius: 20px;
            border: 1px solid $color-5;
            background-color: transparent;
            color: $color-white;
            padding-inline: 20px;
            padding-block: 22px;

            &::placeholder {
              color: $color-white;
              opacity: 0.3;
            }
            &:focus,
            &:active,
            &:focus-visible {
              box-shadow: none;
              outline: none;
            }

            @include breakpoint(max-md) {
              border-radius: 10px;
              padding-inline: 10px;
              padding-block: 10px;
            }
          }
        }

        .agx-btn {
          margin-top: 30px;
          @include breakpoint(max-md) {
            margin-top: 20px;
          }
        }
      }
    }
  }
}

.comment-item {
  @extend %d-flex;
  column-gap: 30px;
  row-gap: 15px;

  .avatar {
    @extend %shrink-0, %d-inline-block;
    width: 80px;
    height: 80px;
    border-radius: 100%;
    overflow: hidden;
  }
  .comment-body {
    .author-title {
      font-weight: 600;
    }
    .comment-date {
      color: $color-5;
      font-family: $ff-body;
      font-size: 16px;
      font-weight: 400;
      line-height: 1;
    }
    p {
      margin-top: 12px;
      @include breakpoint(max-md) {
        margin-top: 6px;
      }
    }

    a {
      @extend %d-inline-block;
      color: $color-primary;
      margin-top: 4px;
    }
  }

  @include breakpoint(max-sm) {
    flex-direction: column;
    text-align: center;

    .avatar {
      margin-inline: auto;
    }
  }
}
