/* Portfolio row */
.portfolio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
}

/* Cards */
.portfolio-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  width: calc((100% - 60px) / 3);
  min-width: 250px;
  height: 400px;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
  will-change: transform, opacity;
}

/* Show class for scroll animation */
.portfolio-card.show {
  transform: translateY(0);
  opacity: 1;
}

/* Hover effect */
.portfolio-card:hover {
  transform: translateY(-5px) scale(1.02);
  /* Avoid animating box-shadow for performance */
}

/* Image container */
.portfolio-img {
  height: 200px;
  overflow: hidden;
}

.portfolio-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  will-change: transform;
}

.portfolio-card:hover .portfolio-img img {
  transform: scale(1.1);
}

/* Card body */
.portfolio-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.portfolio-body h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.portfolio-body p {
  font-size: 14px;
  color: #555;
  margin-bottom: 15px;
}

.portfolio-buttons {
  display: flex;
  gap: 10px;
}

.btn {
  flex: 1;
  padding: 8px 16px;
  border-radius: 4px;
  text-align: center;
  text-decoration: none;
  font-size: 14px;
}

.btn-live {
  background-color: #4c9cef;
  color: #fff;
}

.btn-live:hover {
  background-color: #357ab8;
}

.btn-github {
  background-color: #f7639a;
  color: #fff;
}

.btn-github:hover {
  background-color: #d94f80;
}

/* Responsive */
@media (max-width: 992px) {
  .portfolio-card { width: calc((100% - 30px) / 2); }
}

@media (max-width: 600px) {
  .portfolio-card { width: 100%; }
}
