/* =====================================================
   PROJETOS.CSS
   Carregado SOMENTE no projetos.html (página de listagem).
   Contém: grid de cards de projeto e o efeito de overlay
   que aparece ao passar o mouse sobre a imagem.
   ===================================================== */

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

.project-card {
  position: relative;
  display: block;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.project-card__image {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  display: block;
  filter: brightness(0.55);
  transition: filter 0.4s ease, transform 0.4s ease;
}

.project-card:hover .project-card__image,
.project-card:focus-visible .project-card__image {
  filter: brightness(0.4);
  transform: scale(1.02);
}

.project-card__overlay {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(0, -50%);
  width: 58%;
  max-width: 460px;
  background: rgba(20, 18, 18, 0.72);
  padding: 44px 36px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-card:hover .project-card__overlay,
.project-card:focus-visible .project-card__overlay {
  opacity: 1;
}

.project-card__title {
  font-family: "IM Fell English", serif;
  font-style: normal;
  font-weight: 400;
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.project-card__subtitle {
  font-family: "Spectral", serif;
  font-weight: 400;
  font-size: 1.05rem;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.project-card__year {
  font-family: "Spectral", serif;
  font-weight: 400;
  font-size: 1.05rem;
  color: var(--text-dim);
  margin-bottom: 22px;
}

.project-card__desc {
  font-family: "Spectral", serif;
  font-weight: 400;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-dim);
}

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  .project-card {
    display: flex;
    flex-direction: column;
  }

  .project-card__image {
    max-height: 320px;
    filter: none;
  }

  .project-card:hover .project-card__image,
  .project-card:focus-visible .project-card__image {
    filter: none;
    transform: none;
  }

  /* No mobile a descrição fica abaixo da imagem, no fluxo normal da
     página, em vez de sobreposta (que dependia de :hover, inexistente
     em telas de toque). */
  .project-card__overlay {
    position: static;
    transform: none;
    width: 100%;
    max-width: none;
    opacity: 1;
    background: none;
    padding: 20px 4px 0;
    text-align: center;
  }

  .project-card__title {
    font-size: 1.25rem;
  }
}
