#projects {
  margin-bottom: -50px;
}

.main-text {
  padding: 80px 0 50px;
  margin: 150px 0 90px;
}

.main-text h2 {
  font-size: 60px;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 40px;
  animation: slideRight 1s ease forwards;
}

.main-text h2 span {
  color: var(--secondary-color);
}

.Project-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  padding: 0 40px;
}

.row {
  position: relative;
  background-color: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s, filter 0.3s;
  cursor: pointer;
  animation: slideLeft 1s ease forwards;
  animation-delay: calc(2s * var());
  margin: 30px 15px 30px 0;
}

.row:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  filter: brightness(1.05);
}

.row img {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 1px solid #eee;
  transition: transform 0.5s;
}

.row:hover img {
  transform: scale(1.1);
}

.layer {
  width: 100%;
  height: 0;
  position: absolute;
  bottom: 0;
  left: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.2), var(--secondary-color));
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 20px;
  transition: height 0.5s ease;
}

.row:hover .layer {
  height: 100%;
}

.layer h5 {
  color: var(--secondary-color);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 15px;
}

.layer p {
  color: var(--customized);
  font-size: 1rem;
  line-height: 1.6;
}

.layer a {
  margin-top: 20px;
  color: var(--secondary-color);
  font-size: 20px;
  transition: color 0.3s ease;
}

.layer a i {
  background: var(--primary-color);
  color: var(--secondary-color);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s, box-shadow 0.3s, text-shadow 0.3s;
}

.layer a:hover i {
  color: var(--primary-color);
  transform: scale(1.2);
  box-shadow: 0 0 5px var(--secondary-color), 0 0 15px var(--secondary-color);
  text-shadow: 0 0 5px var(--secondary-color), 0 0 10px var(--secondary-color);
}


@media screen and (max-width: 1024px) {
  .main-text h2 {
    font-size: 48px;
  }

  .Project-content {
    padding: 0 20px;
    gap: 20px;
  }

  .row {
    margin: 20px 10px;
  }

  .layer h5 {
    font-size: 18px;
  }

  .layer p {
    font-size: 0.95rem;
  }

  .layer a i {
    width: 50px;
    height: 50px;
    font-size: 18px;
  }
}

@media screen and (max-width: 768px) {
  .main-text {
    padding: 60px 0 30px;
    margin: -80px 0 60px;
  }

  .main-text h2 {
    font-size: 36px;
    margin-bottom: 30px;
  }

  .Project-content {
    grid-template-columns: 1fr;
    padding: 0 15px;
    gap: 15px;
  }

  .layer h5 {
    font-size: 16px;
  }

  .layer p {
    font-size: 0.9rem;
  }

  .layer a i {
    width: 45px;
    height: 45px;
    font-size: 16px;
  }
}

@media screen and (max-width: 480px) {
  .main-text h2 {
    font-size: 15px;
  }

  .layer p {
    font-size: 10px;
  }

  .layer a i {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }
}
