/* Project Card */
.project-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid #f1f1f1;
}

.row.gx-3 > .col, 
.row.gy-4 > .col {
  margin-bottom: 0 !important; /* no double margins */
}

.col-12.col-md-6.col-lg-4 {
  display: flex;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

.project-img-wrapper {
  position: relative;
  height: 230px;
  overflow: hidden;
  border-bottom: 1px solid #f1f1f1;
}

@media (max-width: 768px) {
  .project-img-wrapper {
    height: 180px;
  }
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover .project-img {
  transform: scale(1.08);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.img-popup i {
  font-size: 1.3rem;
  color: #fff;
}

/* Card Body */
.project-body {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.project-meta {
  font-size: 0.85rem;
  color: #6c757d;
  margin-bottom: 12px;
}

.project-desc {
  color: #444;
  line-height: 1.5;
  font-size: 0.9rem;
  flex-grow: 1;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 4; /* limit to 4 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-btn {
  border-radius: 8px;
  padding: 6px 16px;
  font-weight: 600;
  align-self: flex-start;
}

/* Form & Button styles */
.form-select {
  border-radius: 10px !important;
  padding: 0.65rem 0.9rem !important;
}

.btn {
  border-radius: 8px !important;
  font-weight: 600 !important;
}
