#projects {
  height: 100vh;
}

.projects-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  width: 90%;
}

.project {
  padding: 30px 35px;
  border-radius: 15px;
  border: 3px solid var(--matte-black);
  box-shadow: 10px 10px 5px;
  display: grid;
  grid-template-columns: 2fr 5fr;
  gap: 20px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  width: 100%;
}

.project-img {
  width: 100%;
  height: auto;
  max-height: 250px;
  object-fit: contain;
}

.project-img-container {
  width: 100%;
  display: flex;
  justify-content: center;
}

.project-name {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.project-text {
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}

/* Screenshots Container */
.screenshot-container {
  width: 100%;
  border-radius: 10px;
  text-align: center;
  z-index: 5;
  transition: opacity 1s ease-out;
  transition: opacity 1s ease-out, transform 1s ease-out;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

.screenshot-container.active {
  opacity: 1;
  height: auto;
}

.screenshots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  column-gap: 20px;
  row-gap: 30px;
  padding: 30px 35px;
  justify-content: center;
}

.screenshots img {
  width: 100%;
  height: auto;
  max-height: 200px;
  border-radius: 5px;
  object-fit: contain;
  transition: transform 0.3s ease-in-out;
  cursor: pointer;
}

.screenshots img:hover {
  transform: scale(1.1);
}

/* Close button */
.close-btn {
  margin: 0 auto;
  margin-bottom: 20px;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 10px;
  border: 2px solid var(--bright-blue);
  width: fit-content;
  padding: 8px 50px;
  cursor: pointer;
  color: white;
  /* transition: background 0.3s ease-in-out; */
}

/* Responsive for Mobile */
@media only screen and (max-width: 768px) {
  #projects {
    height: unset;
  }
  .projects-container {
    display: block;
  }
  .project {
    display: flex;
    flex-wrap: wrap;
    padding: 20px;
    border: unset;
    box-shadow: unset;
  }
  .project-img {
    margin-bottom: 20px;
  }
  .project-desc {
    padding: unset;
  }
  .screenshot-container {
    padding: 10px;
  }
}
