
/* =====================================
   PORTFOLIO PROJECTS
===================================== */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  align-items: stretch;
}

/* Project Card */
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 20px;
  background: linear-gradient(
    145deg,
    rgba(17, 27, 48, 0.96),
    rgba(9, 15, 29, 0.96)
  );
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-7px);
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.28),
    0 0 24px rgba(59, 130, 246, 0.1);
}

/* Project Image */
.project-card img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: top center;
  background: #0c1324;
  border-bottom: 1px solid rgba(96, 165, 250, 0.16);
  transition: transform 0.5s ease;
}

.project-card:hover img {
  transform: scale(1.035);
}

/* Keep image zoom inside the card */
.project-card > a:first-child,
.project-card .project-image {
  display: block;
  overflow: hidden;
}

/* Project Content */
.project-card h3,
.project-card h4,
.project-card h5 {
  color: #f1f5f9;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.9;
  margin: 0 0 10px;
}

.project-card p {
  color: #a8b4c7;
  font-size: 0.9rem;
  line-height: 2.1;
}

/* Common content wrappers */
.project-card .project-content,
.project-card .card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 22px;
}

/* Project links and buttons */
.project-card a:not(:first-child),
.project-card .btn,
.project-card .project-link {
  color: #67e8f9;
  text-decoration: none;
  transition: color 0.25s ease;
}

.project-card a:hover,
.project-card .btn:hover,
.project-card .project-link:hover {
  color: #93c5fd;
}

/* If the card has a direct action button */
.project-card .btn,
.project-card .project-link {
  margin-top: auto;
  font-weight: 700;
}

/* Optional technology tags, if present in existing HTML */
.project-card .project-tags,
.project-card .tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 18px;
}

.project-card .project-tags span,
.project-card .tech-stack span {
  padding: 5px 10px;
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.08);
  color: #bfdbfe;
  font-size: 0.75rem;
}

/* Responsive layout */
@media (max-width: 991.98px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .project-card img {
    height: 200px;
  }
}

@media (max-width: 575.98px) {
  .projects-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .project-card img {
    height: 220px;
  }

  .project-card .project-content,
  .project-card .card-body {
    padding: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-card,
  .project-card img {
    transition: none;
  }

  .project-card:hover,
  .project-card:hover img {
    transform: none;
  }
}
