/* GENERAL */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");

* {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", sans-serif;
  
}

.fade-in {
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
  from {
      opacity: 0;
      transform: translateY(20px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

.back-button {
  position: absolute;
  top: 20px;
  left: 60px;
  padding: 10px 15px;
  margin-bottom: 60px;
  font-size: 16px;
  color: white;
  background-color: #685ed1;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
}

.back-button:hover {
  background-color: #0056b3;
}

html {
  scroll-behavior: smooth;
}

#projects-container {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  margin: auto;
  padding: 30px;
  margin-top: 30px;
  box-sizing: border-box;
  float:inline-start
}

.project_item { 
  text-align: center;
  width: calc(50% - 60px);
  height: fit-content;
  margin: 30px; 
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 20px;
  transition: transform 0.2s;
  box-sizing: border-box;
  overflow: hidden;
}

.project_item img {
  /*all pics w:800  h: 450*/
  max-width: 100%;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.project_item h2 {
  margin-top: 10px;
  color: #333;
}

.project_item:hover {
  transform: translateY(-5px);
  cursor: pointer;
}

.project_item .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.5);
  color: rgb(0, 0, 0);
  font-size: 26px;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transform: translateY(100%);
  transition: transform 0.5s ease, opacity 0.3s ease;
  pointer-events: none; 
  border-radius: 8px;
}

.project_item:hover .overlay {
  opacity: 1;
  transform: translateY(0); /* Slide the overlay up */
}

.project_item:hover img {
  opacity: 0.3;
}

@media (max-width: 800px) {
  .project_item {
      width: calc(100% - 40px); 
  }
}