.tool-bar {
  margin-top: 5rem;
  display: flex;
  align-items: center;
  margin-left: 10px;
  margin-bottom: 10px;
}

.tool-results {
    display: flex;
    align-items: center;
    margin-left: 10px;
    margin-bottom: 10px;
}

@media (max-width: 520px) {
  .tool-bar {
    flex-direction: column;
    margin-bottom: 15px;
  }
  
  .tool-results {
    flex-direction: column;
  }
}

.sort-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 0.5rem 0 1rem 0;
}

.tool-bar h3 {
  font-size: 0.8rem;
}

.srt-btns {
  border: 1px solid var(--primary);
  padding: 5px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: ease-in 0.3s;
  font-size: 0.8rem;
  user-select: none;
}

.srt-btns:hover {
  background-color: var(--primary);
}

.sort-active {
  background-color: var(--primary);
}

.blogs-search {
  position: relative;
  margin-left: auto;
  margin-right: 10px;
}

.blogs-search input {
  border: 1.6px solid var(--primary);
  border-radius: 20px;
  padding: 5px;
  padding-right: 40px;
  padding-left: 15px;
  font-size: 0.8rem;
}

.blogs-search button {
  cursor: pointer;
  border: none;
  position: absolute;
  right: 0;
  padding: 10px;
  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background-color: var(--primary);
}

.blogs-search button i {
  font-size: 0.8rem;
}

.blogs-search button:hover {
  background-color: var(--secondary);
}

@media (max-width: 520px) {
  .tool-bar {
    flex-direction: column;
    margin-bottom: 15px;
  }
  
  .tool-results {
    flex-direction: column;
  }

  .blogs-search {
    margin-left: 10px;
    margin-right: 10px;
    width: 95%;
  }

  .blogs-search input {
    width: 100%;
  }
}

/* Pagination */

.pagination-php ul {
  width: fit-content;
  display: flex;
  flex-wrap: wrap;
  background: #fff;
  padding: 5px;
  margin-top: 15px;
  margin-left: 10px;
  border-radius: 5px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.37);
  margin-bottom: 20px;
}
.pagination-php ul li {
  color: var(--primary);
  list-style: none;
  line-height: 45px;
  text-align: center;
  align-items: center;
  display: flex;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: all 0.3s ease;
  background-color: transparent;
}
.pagination-php ul li.numb {
  list-style: none;
  height: 45px;
  width: 45px;
  margin: 0 3px;
  line-height: 45px;
  border-radius: 50%;
}
.pagination-php ul li.numb.first {
  margin: 0px 3px 0 -5px;
}
.pagination-php ul li.numb.last {
  margin: 0px -5px 0 3px;
}
.pagination-php ul li.dots {
  font-size: 22px;
  cursor: default;
}
.pagination-php ul li.btn {
  padding: 0 20px;
  border-radius: 50px;
}
.pagination-php li.active,
.pagination-php ul li.numb:hover,
.pagination-php ul li:first-child:hover,
.pagination-php ul li:last-child:hover {
  color: #fff;
  background: var(--primary);
}

/* Single Blog  */
.blog {
  align-self: center;
  margin-top: 76px;
  width: 97vw;
  height: 87.5vh;
  display: flex;
  /* box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.37); */
}

@media (max-width: 900px) {
  .blog {
    height: fit-content;
    display: flex;
    flex-direction: column;
  }
}

.post {
  width: 60%;
  height: 100%;
}

.post-image {
  width: 100%;
  height: 50vmin;
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.post-image h3 {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 1rem;
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.post-title {
  position: absolute;
  bottom: 0;
  padding: 10px;
  padding-left: 1rem;
  padding-right: 1rem;
  display: flex;
  width: 100%;
  align-items: center;
  background: rgb(255, 255, 255);
  background: linear-gradient(
    177deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(175, 175, 175, 0.328011033514968) 64%
  );
  justify-content: center;
  gap: 10px;
}

.read-time {
  font-size: 0.5rem;
  margin-left: auto;
  margin-right: 10px;
  display: none;
}

.post-date {
  font-size: 0.6rem;
  margin-left: auto;
}

.post-content {
  padding: 10px;
}

@media (max-width: 900px) {
  .blog {
    height: fit-content;
    display: flex;
    flex-direction: column;
  }

  .post {
    width: 100%;
    height: 100vh;
  }
}

/*recent section*/
.recent-posts {
  border-left: 1px solid var(--primary);
  height: 100%;
  width: 40%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recent-posts h2 {
  margin-top: 10px;
  font-size: 1rem;
  text-align: start;
}

.header-line {
  height: 2px;
  background-color: var(--primary);
  width: 100%;
}

.recent {
  width: 95%;
  height: 85px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.37);
  position: relative;
  margin: 3px 0 0 20px;
  border-radius: 5px;
  cursor: pointer;
  overflow: hidden;
  display: flex;
}

.recent:hover {
  background-color: rgb(243, 243, 243);
  box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.6);
}

.active-post {
    background-color: rgb(243, 243, 243);
    box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.6);
}

.number {
  position: absolute;
  left: 0;
  font-size: 0.7rem;
  font-weight: bolder;
  background-color: #fff;
  padding: 7px;
  border-bottom-right-radius: 50%;
}

.recent-post-image {
  background-color: yellow;
  width: 20%;
}

.recent-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.view-more {
  margin-top: 20px;
  text-decoration: none;
  color: black;
  background-color: var(--primary);
  width: 100%;
  text-align: center;
  padding: 10px;
}

.view-more:hover {
  background-color: var(--secondary);
}

.recent-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 1rem;
  text-align: start;
  width: 80%;
}

.title-top {
  margin-bottom: 0.3rem;
  font-size: 0.6rem;
  font-weight: light;
}

.recent-title h2{
 font-size: 0.9rem;
  font-weight: light;
}

.recent-title p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: none;
  margin-left: 7px;
  background-color: blue;
}

@media (max-width: 900px) {
  .blog {
    height: fit-content;
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
  }

  .post {
    width: 100%;
    min-height: 90vh;
  }

  .recent-posts {
    border-top: 2px solid var(--primary);
    border-left: 0px;
    height: 100%;
    width: 100%;
  }

  .recent-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }

  .title-top {
    margin-left: 20px;
  }

  .recent-title p {
    margin-left: 20px;
    width: 75vw;
  }
}

@media (max-width: 670px) {
  .recent-title p {
    margin-left: 20px;
    width: 65vw;
  }

  .post {
    text-align: left;
  }

  .post-title {
    display: grid;
    gap: 10px;
    text-align: center;
    align-items: center;
    justify-content: left;
    grid-template-columns: repeat(2, 1fr);
  }

  .read-time {
    display: none;
  }
}
