@import "globals.css";
header {
  background-color: #fff !important;
}
.works_projects {
  padding-top: 9rem;
}
main {
  padding-top: 64px;
  display: flex;
  flex-direction: column;
  gap: 64px;
  margin-top: 18px;
  padding-bottom: 120px;
}

main .header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 500px;
}

main .header h1 {
  font-weight: 700;
  font-size: 56px;
  line-height: 64px;
  color: rgba(0, 0, 0, 1);
}

main .header p {
  font-weight: 500;
  font-size: 24px;
  line-height: 32px;
  color: rgba(0, 0, 0, 1);
  font-style: italic;
}

main .grid-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 54px;
  row-gap: 64px;
}

.grid-item {
  background-color: white;
  overflow: hidden;
  display: flex;
  justify-content: start;
  align-items: start;
  position: relative;
}
.grid-title {
  position: absolute;
  bottom: -100%;
  height: 100px;
  width: 100%;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.5s;
}
.grid-item:hover .grid-title {
  bottom: 0;
}
.grid-item:hover img {
  transform: scale(1.2);
  transition: transform 0.6s;
}
.grid-title h5 {
  font-family: Cormorant;
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
  text-align: center;
  color: rgba(0, 0, 0, 1);
}
.grid-item .grid-img {
  height: 396px;
  overflow: hidden;
  width: 100%;
}
.grid-item img {
  object-fit: cover;
  object-position: center;
  width: 100%;
  height: 100%;
}

.grid-container .grid-item:nth-child(even) {
  justify-content: end !important;
  align-items: end !important;
}

.grid-container .grid-item:nth-child(2n) {
  margin-top: 45px;
}

@media only screen and (max-width: 991px) {
  .works_projects {
    padding-top: 4rem;
  }
  main {
    gap: 95px;
    padding-bottom: 48px;
    padding-top: 48px;
    margin-top: 0;
  }
  main .header {
    margin-top: 60px;
  }
  main .grid-container {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    row-gap: 10px;
  }
  .grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .grid-container .grid-item:nth-child(2n) {
    margin-top: 0;
  }
}
