.project_hero {
  background-image: url(https://happho.com/wp-content/uploads/2017/10/Scaffolding-to-be-done-for-External-Painting.jpg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  width: 100%;
  height: 50vh;
}
.project_overlay {
  position: absolute;
  left: 0%;
  background-color: #000;
  height: 50vh;
  width: 100%;
  opacity: 0.4;
}
.project_hero h2 {
  position: absolute;
  top: 44%;
  left: 27%;
  transform: translate(-59%, -78%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 65px;
}
.project_border {
  position: absolute;
  top: 40%;
  left: 10%;
  transform: translate(-60%, -90%);
  background-color: #fff;
  width: 120px;
  height: 3px;
  border-radius: 8px;
}
.project_bg {
  background-image: url(../Assets/white_painted_textured.jpg);
  background-repeat: repeat;
  background-position: center;
  height: 100%;
  width: 100%;
}
.projects {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem calc((100vw - 1200px) / 2);
}
.project_grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 400px);
  grid-gap: 1rem;
}
.projects_card {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
}
.projects_card img {
  height: 400px;
  width: 100%;
  border-radius: 20px;
  object-fit: cover;
}
.project_data {
  position: absolute;
  bottom: 0%;
  left: 2%;
  padding: 10px;
  width: 100%;
}
.project_data h2 {
  margin: auto;
  color: #fff;
  z-index: 1000000;
  text-align: center;
}
.projectMargin {
  padding-bottom: 20px;
}
.data_overlay {
  position: absolute;
  bottom: 0%;
  left: 0%;
  background-color: #144178;
  height: 90px;
  width: 100%;
  opacity: 0.66;
  border-radius: 0px 0px 20px 20px;
}
.projects_card .read_box {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  height: 78%;
  width: 100%;
  background-color: #144178;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.5s ease;
  z-index: 1;
  border-radius: 20px 20px 0px 0px;
}
.projects_card:hover .read_box {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  opacity: 0.6;
}
.read_btn {
  position: absolute;
  top: 35%;
  right: 0;
  bottom: 0;
  left: 31%;
  background-color: #fff;
  color: #333;
  text-align: center;
  padding-top: 5px;
  width: 40%;
  height: 10%;
  border-radius: 8px;
  opacity: 0;
  z-index: 1;
  font-size: 19px;
  font-weight: 500;
  transition: all 0.5s ease;
}
.projects_card:hover .read_btn {
  opacity: 1;
}
.modalProject {
  position: fixed;
  top: -60%;
  left: 50%;
  transform: translate(-40%, -50%);
  transition: top 0.3s ease-in-out;
  border: 1px solid #ccc;
  border-radius: 20px;
  background-color: #fff;
  z-index: 2;
  width: 650px;
  margin-top: 50px;
}
.modalProject.active {
  top: 50%;
}
#overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}
#overlay.active {
  display: block;
}
.project_detail {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 1rem;
}
.project_detail {
  position: relative;
}
.project_detail div img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px 0px 0px 20px;
}
.project_detail div h2 {
  font-weight: 400;
}
.project_detail div h3 {
  font-size: 17px;
  font-weight: 500;
  margin-top: 15px;
}
.project_detail div h5 {
  font-weight: 400;
  color: rgb(25, 25, 240);
  font-size: 18px;
  margin-bottom: 15px;
}
.close-modal {
  padding: 3px 10px;
  border: 2px solid #000;
  border-radius: 50%;
  font-size: 17px;
}
.close_project {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 10px;
  cursor: pointer;
}

@media only screen and (max-width: 991px) {
  .project_grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-gap: 1rem;
    padding: 10px;
  }
  .project_hero,
  .project_overlay {
    height: 30vh;
  }
  .projects_card img {
    height: 400px;
  }
  .project_hero h2 {
    position: absolute;
    top: 32%;
    left: 55%;
    transform: translate(-59%, -78%);
    font-size: 35px;
  }
  .project_border {
    position: absolute;
    top: 30%;
    left: 20%;
    transform: translate(-60%, -90%);
    width: 100px;
  }
  .project_detail {
    display: grid;
    grid-template-columns: 1fr;
    grid-gap: 1rem;
    padding-left: 10px;
  }
  .project_detail div h2 {
    font-weight: 400;
    margin-bottom: 2px;
    width: 105%;
  }
  .projectMargin {
    padding-bottom: 7px;
  }
  .modalProject {
    position: fixed;
    top: -60%;
    left: 42%;
    transform: translate(-40%, -58%);
    transition: top 0.3s ease-in-out;
    border: 1px solid #ccc;
    border-radius: 20px;
    background-color: #fff;
    z-index: 2;
    width: 320px;
    margin-top: 80px;
  }
  .project_detail div img {
    display: none;
  }
  .close_project {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 0px 10px;
    cursor: pointer;
  }
}
