body {
  color: #333;
  margin: 0;
  padding: 0;
}
.mainpage {
  display: flex;
  justify-content: center;
  padding: 20px;
  margin-top: 50px;
}
/* Search bAr */
.search {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 30px 0px;
}
.search_blog {
  height: 5vh;
  width: 30vw;
  border-radius: 10px;
  border-color: transparent;
  box-shadow: 2px 10px 10px black;
  margin-right: 1vw;
  font-size: large;
  padding-left: 30px;
}
.search_button {
  height: 5vh;
  width: 5vw;
  background-color: rgb(47, 130, 255);
  color: white;
  font-size: 1vw;
  border-radius: 5px;
  border-color: black;
}
.row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.blogpost {
  background-color: rgba(0, 0, 0, 0.785);
  border-radius: 2rem;
  box-shadow: 2px 0px 8px rgba(0, 0, 0, 0.708);
  width: 380px;
  margin: 30px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: white;
  padding: 20px;
  transition: transform 0.3s, box-shadow 0.3s;
  height: 85vh;
}

.blogpost:hover {
  transform: translateY(-3px);
}

.blogpost img {
  width: 100%;
  min-height: 300px;
  max-height: 300px;
  border-radius: 20px;
  box-shadow: 0px 1px 10px rgba(0, 0, 0, 0.39);
}

.blogimage {
  height: 40%;
  width: 100%;
}

.blogcontent {
  text-align: center;
  margin-top: 20px;
  height: 60%;
  width: 100%;
}

#part1 {
  position: relative;
  top: 7vh;
  height: 80%;
}

#part2 {
  height: 20%;
}
.box-title {
  font-size: 1.8em;
  margin: 8px 0;
  position: relative;
  bottom: 20px;
  font-weight: 500;
  max-height: 13vh;
}

.description {
  color: #eeeeeee8;
  max-height: 20vh;
  position: relative;
  bottom: 8px;
  padding-top: 1vh;
  font-size: 1.2rem;
  /* width: 20%; */
  overflow: hidden;
}
.blog-tag {
  font-size: 2vh;
  height: 40px;
  width: 20vw;
  font-weight: 500;
  color: rgba(183, 181, 181, 0.756);
  position: relative;
  right: 44px;
  bottom: 5px;
  padding-left: 50px;
}

.blogcontent hr {
  position: relative;
  top: 30px;
}

.button {
  text-align: center;
  padding: 10px;
  background-color: #4f4f4f;
  color: white;
  border-color: transparent;
  text-decoration: none;
  border-radius: 40px;
  transition: 0.3s;
  margin-top: 10px;
  height: 5vh;
  width: 10vw;
  position: relative;
  left: 60px;
  top: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.button:hover {
  background-color: #000000;
}

.likebutton {
  height: 20px;
  width: 20px;
}

/* FLash messahes */
.flashmessage {
  position: fixed;
  justify-content: center;
  align-items: center;
  min-height: 10vh;
  min-width: 30vw;
  font-size: 2.5vw;
  color: white;
  z-index: 99;
  text-align: center;
  border-radius: 5px;
  box-shadow: 0px 1px 10px rgba(0, 0, 0, 0.39);
  padding-top: 1.5vh;
  margin-left: 50vw;
  font-weight: 100;
  transform: translateY(-40px);
  transition: transform 1s ease-in-out; /* Add transition for translateY */
}

#flash_info {
  background-color: rgb(147, 8, 182);
}

#flash_notfound {
  background-color: crimson;
}

#flash_success {
  background-color: rgb(23, 220, 20);
}

@media only screen and (max-width: 600px) {
  /* Search bAr */
  .search {
    margin: 30px 0px;
    margin-bottom: -20px;
  }

  .search_blog {
    height: 4.5vh;
    width: 60vw;
    margin-right: 1vw;
    font-size: medium;
  }

  .search_button {
    height: 4vh;
    width: 15vw;
    font-size: 3vw;
  }

  .row {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
  }

  .blogpost {
    border-radius: 1rem;
    box-shadow: 2px 0px 8px rgba(0, 0, 0, 0.708);
    height: 55vh;
    width: 55vw;
    margin: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    padding: 13px;
    transition: transform 0.3s, box-shadow 0.3s;
  }
  .blogimage {
    height: 50%;
  }
  .blogimage img {
    width: 100%;
    min-height: 25.8vh;
    max-height: 25.8vh;
    border-radius: 10px;
  }

  .blogcontent {
    height: 50%;
    width: 100%;
    margin-top: 0.7rem;
  }
  #part1 {
    top: 1vh;
    height: 80%;
  }
  #part2 {
    height: 20%;
    position: relative;
    bottom: 33px;
  }
  .blog-tag {
    font-size: 1.2vh;
    height: 20%;
    width: 50vw;
    font-weight: 500;
    color: rgba(183, 181, 181, 0.756);
    right: 44px;
    bottom: 10px;
    padding-left: 50px;
  }
  .box-title {
    font-size: 1.1rem;
    height: 20%;
    margin: 0;
    font-weight: 500;
    max-height: 6vh;
  }
  .description {
    padding-top: 1vh;
    padding-bottom: 1vh;
    font-size: 0.62rem;
    height: 60%;
  }

  .blogcontent hr {
    top: 35px;
  }

  .button {
    border-radius: 50px;
    height: 2vh;
    width: 20vw;
    font-size: 2.5vw;
    left: 50px;
    top: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

@media only screen and (min-width: 601px) and (max-width: 1024px) {
  /* CSS rules for tablets goes here */

  /* Search bAr */
  .search {
    margin: 30px 0px;
    margin-bottom: -20px;
  }

  .search_blog {
    height: 4.5vh;
    width: 40vw;
    margin-right: 1vw;
    font-size: 3vw;
  }

  .search_button {
    height: 3vh;
    width: 10vw;
    font-size: 2vw;
  }

  .row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .blogpost {
    border-radius: 1.5rem;
    box-shadow: 2px 0px 8px rgba(0, 0, 0, 0.708);
    width: 45vw;
    height: 55vh;
    margin: 10px;
    overflow: hidden;
    padding: 20px;
  }

  .blogimage {
    height: 50%;
  }
  .blogpost img {
    width: 100%;
    min-height: 26.5vh;
    max-height: 26.5vh;
    border-radius: 20px;
  }

  .blogcontent {
    height: 50%;
    width: 100%;
    margin: 0;
  }

  #part1 {
    top: 1.5vh;
    height: 80%;
  }
  #part2 {
    height: 20%;
    position: relative;
    bottom: 10px;
  }
  .box-title {
    font-size: 1.6rem;
    font-weight: 500;
    height: 20%;
    margin: 0;
    max-height: 4vh;
    /* overflow-x: scroll; */
  }
  .description {
    padding-top: 1vh;
    font-size: 1.1rem;
    height: 60%;
  }
  .blog-tag {
    font-size: 1.4vh;
    height: 20%;
    width: 50vw;
    font-weight: 500;
    color: rgba(183, 181, 181, 0.756);
    right: 44px;
    bottom: 15px;
    padding-left: 50px;
    padding-top: 15px;
  }

  .button {
    border-radius: 50px;
    height: 3vh;
    width: 17vw;
    font-size: 2.5vw;
    left: 80px;
    align-content: center;
  }
}
