
/* Bloco cinza de largura total, com as bordas verde-lima da barra superior */
.team-projects-section {
  position: relative;
  /* clip (e não hidden): corta o fundo inclinado sem virar área rolável. Com hidden, o scrollIntoView
     dos cards de serviço rolava a seção por dentro e o título, a equipe e o vídeo sumiam para cima */
  overflow: clip;
  margin: 2rem 0 0;
  padding: 2.5rem 1rem;
  background: var(--color-neutral-10);
  border-top: 3px solid var(--color-logo-green);
  border-bottom: 3px solid var(--color-logo-green);
}

/* Fundo com a logo horizontal repetida, em branco, inclinada e apagada (20%) atrás do conteúdo */
.team-projects-section::before {
  content: "";
  position: absolute;
  inset: -50%; /* maior que a seção para a inclinação não deixar cantos vazios */
  transform: rotate(-20deg);
  background: url("../../img/fundos/padrao-logo.webp") repeat;
  background-size: 520px 203px;
  opacity: 0.2;
  pointer-events: none;
}

.team-projects-section__layout {
  position: relative;
  z-index: 1; /* acima do fundo com a logo */
  max-width: 1200px;
  margin: 0 auto;
}

/* HEADER */

.section-header {
  margin-bottom: 1rem;
}


#team-projects h2,
#team-projects h3,
#team-projects h4,
#team-projects h5,
#team-projects p {
  color: white;
}

#team-projects strong {
  color: var(--color-logo-green);
  font-weight: 600;
}

/* Botões principais: verde-lima do CTA */
#team-projects .btn--success {
  background: var(--color-logo-green);
  color: white;
  border: 2px solid var(--color-logo-green);
}

#team-projects .btn--success:hover {
  background: #68a818;
  border-color: #68a818;
}

/* "Ver mais no Instagram" e "Entender qual serviço eu preciso": contorno branco sobre o cinza */
#team-projects .team-gallery .btn--success,
#team-projects .btn--outline {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.7);
  padding: 0.9rem 1.5rem !important;
}

#team-projects .team-gallery .btn--success:hover,
#team-projects .btn--outline:hover {
  background: white;
  color: var(--color-neutral-10);
  border-color: white;
}

/* BLOCO EQUIPE */

.team-block {
  display: grid;
  grid-template-columns: 11fr 8fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.team-highlight {
  display: grid;
  gap: 1rem;
}

/* botão com a largura do texto, não da coluna */
.team-highlight .btn {
  justify-self: start;
}

.team-highlight img {
  width: 100%;  
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 1rem;
}

.team-highlight__content {
  display: grid;
  gap: 1rem;
}

.team-gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.insta-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: zoom-in; /* abre a galeria */
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 0.6rem;
}

.insta-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.insta-card__title {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  text-align: center;
  font-weight: 600;
  color: white;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.insta-card:hover .insta-card__title,
.insta-card:focus-visible .insta-card__title {
  opacity: 1;
}

/* Selo "+N" no último card (criado pelo script/gallery.js): a galeria tem mais fotos que a grade */
.insta-card__more {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.3rem 0.6rem;
  border-radius: 0.35rem; /* no formato dos botões */
  background: var(--color-logo-green);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: white;
  pointer-events: none;
}

/* Em telas pequenas o card é estreito: selo menor */
@media (max-width: 600px) {
  .insta-card__more {
    top: 0.35rem;
    right: 0.35rem;
    padding: 0.15rem 0.4rem;
    font-size: 0.7rem;
    letter-spacing: 0;
  }
}

.insta-card:hover img,
.insta-card:focus-visible img {
  transform: scale(1.06);
}

/* Sem hover (celular): título sempre visível numa faixa embaixo */
@media (hover: none) {
  .insta-card__title {
    inset: auto 0 0 0;
    opacity: 1;
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  }
}

/* DIVIDER */

/* Linhas internas iguais à borda da barra superior */
.section-divider {
  border: none;
  border-top: 3px solid var(--color-logo-green);
  margin: 1rem 0;
}

/* RESPONSIVO */

@media (max-width: 768px) {
  .team-projects-section {
    padding: 1.5rem 1rem;
  }
}

@media (max-width: 1024px) {
  .team-block {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .team-highlight img {
    height: 280px;
  }
}
