.projects {
  background: #f6f7f9;
  padding: 30px;
}

.projects-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* HEADER */
.projects-header {
  margin-bottom: 3.5rem;
}

.projects-badge {
  display: inline-block;
  background: #fde2e7;
  color: #e11d48;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.projects-title-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.projects-title-row h2 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 700;
  color: #0f172a;
}

.projects-btn {
  margin-left: auto;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: white;
  color: #0f172a;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.projects-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(225, 29, 72, 0.15),
    transparent
  );
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.projects-btn:hover::after {
  transform: translateX(100%);
}

.projects-btn:hover {
  transform: translateY(-2px);
}

/* GRID */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

/* CARD */
.project-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  animation: fadeUp 0.7s ease forwards;
  opacity: 0;
}

.project-card:nth-child(1) {
  animation-delay: 0.1s;
}
.project-card:nth-child(2) {
  animation-delay: 0.25s;
}
.project-card:nth-child(3) {
  animation-delay: 0.4s;
}

.project-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 50px 120px rgba(15, 23, 42, 0.18);
}

.project-card a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* IMAGE */
.img-wrap {
  position: relative;
  overflow: hidden;
}

.img-wrap img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.4s ease;
}

.project-card:hover img {
  transform: scale(1.08);
  filter: contrast(1.05) saturate(1.05);
}

.img-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 60%,
    rgba(0, 0, 0, 0.15)
  );
}

/* TAG */
.project-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: #e11d48;
  color: white;
  padding: 0.3rem 0.7rem;
  font-size: 0.7rem;
  border-radius: 999px;
  z-index: 2;

  /* estado inicial */
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* aparece só no hover */
.project-card:hover .project-tag {
  opacity: 1;
  transform: translateY(0);
}

/* BODY */
.card-body {
  padding: 1.25rem;
}

.card-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  transition: color 0.3s ease, transform 0.3s ease;
}

.project-card:hover h3 {
  color: #e11d48;
  transform: translateX(2px);
}

/* ANIMAÇÃO */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* RESPONSIVO */
@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .projects-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .projects-btn {
    margin-left: 0;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .img-wrap img {
    height: 220px;
  }
}
