/* =========================
   PORTFOLIO GALLERY (VISUAL)
   ========================= */
.portfolio-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin-top: 1.5rem;
}

.portfolio-item {
  position: relative;
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  text-decoration: none;
  color: inherit;
  background: #000000;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  order: calc(999 - var(--portfolio-index));
}

.portfolio-item-thumb {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #111827;
}

.portfolio-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 0.5s ease;
}

.portfolio-item:hover .portfolio-item-thumb img {
  transform: scale(2);
}

.portfolio-item-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.9rem 1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0));
  color: #f9fafb;
}

.portfolio-item-overlay h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 600;
}

.portfolio-item-tag {
  display: inline-block;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.1);
  border: 1px solid rgba(248, 250, 252, 0.3);
  font-size: 0.78rem;
  font-weight: 500;
}

.portfolio-item:hover {
  border-color: #2563eb;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  transform: translateY(-4px);
}

/* Responsive: 1 columna en móvil */
@media (max-width: 600px) {
  .portfolio-gallery {
    grid-template-columns: 1fr;
  }
}