/* PORTFOLIO - Layout papel de carta + grid elegante */
#portfolio.portfolio-section {
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 50px;
}

/* PAPEL DE CARTA - texto introdutório */
.portfolio-texto {
  position: relative;
  background: linear-gradient(145deg, #fdf8f3 0%, #f9f2ea 50%, #fdf8f3 100%);
  padding: 44px 40px 36px;
  border-radius: 32px;
  box-shadow:
    0 24px 70px rgba(139, 90, 43, 0.20),
    inset 0 2px 10px rgba(255, 255, 255, 0.95),
    inset 0 -2px 10px rgba(139, 90, 43, 0.06);
  border: 1px solid rgba(139, 90, 43, 0.28);
  backdrop-filter: blur(16px);
  overflow: hidden;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.portfolio-texto::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #8b5a2b 12%,
    rgba(139,90,43,0.95) 50%,
    #8b5a2b 88%,
    transparent 100%
  );
  border-radius: 32px 32px 0 0;
}

.portfolio-selo {
  display: inline-block;
  padding: 10px 22px;
  background: rgba(139, 90, 43, 0.15);
  color: #8b5a2b;
  font-size: 14px;
  font-weight: 700;
  border-radius: 50px;
  margin-bottom: 24px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgba(139, 90, 43, 0.3);
}

.portfolio-texto h2 {
  color: #8b5a2b;
  font-size: 2.6rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 28px;
  letter-spacing: -0.02em;
}

.portfolio-texto p {
  font-size: 18px;
  line-height: 1.8;
  color: #5a3b24;
  margin-bottom: 20px;
}

.portfolio-chamada {
  margin-top: 32px;
}

/* GALERIA - Grid responsivo para 15 fotos */
.portfolio-galeria {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
  max-width: 1400px;
  margin: 0 auto;
}

.portfolio-item {
  background: #ffffff;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 16px 50px rgba(139, 90, 43, 0.18);
  transition: all 0.4s ease;
  border: 1px solid rgba(139, 90, 43, 0.14);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.portfolio-item:hover {
  transform: translateY(-12px);
  box-shadow: 0 32px 80px rgba(139, 90, 43, 0.35);
}

.portfolio-item img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: top;
  border-radius: 20px;
  margin-bottom: 18px;
  transition: all 0.4s ease;
}

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

.portfolio-item figcaption {
  font-size: 16px;
  color: #5a3b24;
  font-weight: 500;
  text-align: center;
  padding: 0 8px;
  line-height: 1.5;
}

/* CORREÇÃO ESPECÍFICA - Galinha com corpo completo visível */
.portfolio-itemg {
  background: #ffffff;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 16px 50px rgba(139, 90, 43, 0.18);
  transition: all 0.4s ease;
  border: 1px solid rgba(139, 90, 43, 0.14);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.portfolio-itemg:hover {
  transform: translateY(-12px);
  box-shadow: 0 32px 80px rgba(139, 90, 43, 0.35);
}

.portfolio-itemg img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center 65%;
  border-radius: 20px;
  margin-bottom: 18px;
  transition: all 0.4s ease;
}

.portfolio-itemg:hover img {
  transform: scale(1.05);
}

.portfolio-itemg figcaption {
  font-size: 16px;
  color: #5a3b24;
  font-weight: 500;
  text-align: center;
  padding: 0 8px;
  line-height: 1.5;
}

/* RESPONSIVO */
@media (max-width: 1024px) {
  .portfolio-galeria {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
  }
  
  .portfolio-item img,
  .portfolio-itemg img {
    height: 240px;
  }
}

@media (max-width: 768px) {
  #portfolio.portfolio-section {
    padding: 0 16px;
    gap: 40px;
  }
  
  .portfolio-texto {
    padding: 32px 24px;
  }
  
  .portfolio-texto h2 {
    font-size: 2.2rem;
  }
  
  .portfolio-galeria {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .portfolio-item,
  .portfolio-itemg {
    padding: 20px;
  }
  
  .portfolio-item img,
  .portfolio-itemg img {
    height: 260px;
  }
}

@media (max-width: 480px) {
  .portfolio-texto h2 {
    font-size: 2rem;
  }
  
  .portfolio-item img,
  .portfolio-itemg img {
    height: 280px;
  }
}
