.pinterest-grid {
  column-count: 3;
  column-gap: 1rem;
}

.bg-transparent {
  background: transparent !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
}

@media (max-width: 992px) {
  .pinterest-grid {
    column-count: 2;
  }

  .p-modal-content {
    display: flex !important;
    flex-direction: column !important;
  }

  .p-modal-caption {
    max-width: 100% !important;
  }

  .p-modal-img {
    max-width: 100% !important;
  }
}

@media (max-width: 576px) {
  .pinterest-grid {
    column-count: 1;
  }
}

.p-item {
  margin-bottom: 1rem;
  break-inside: avoid;
}

.p-item img {
  width: 100%;
  border-radius: 12px;
  transition: transform .25s ease, box-shadow .25s ease;
  cursor: zoom-in;
}

.p-item img:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .25);
}

/* Modal wrapper */
.p-modal {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

/* Fundo escurecido */
.p-modal-bg {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity .35s ease;
}

/* Corpo do modal */
.p-modal-content {
  position: relative;
  background: #fff;
  width: 85vw;
  max-width: 1400px;
  max-height: 85vh;
  min-height: 50vh;
  display: flex;
  gap: 22px;
  padding: 25px;
  border-radius: 14px;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity .35s ease, transform .35s ease;
}

/* Imagem da galeria */
.p-modal-img {
  max-width: 65%;
  max-height: 80vh;
  border-radius: 10px;
  object-fit: contain;
  transition: all .35s ease;
}

.full-img {
  max-width: 100% !important;
  width: 100% !important;
}

/* Texto/legenda */
.p-modal-caption {
  max-width: 30%;
  overflow-y: auto;
  font-size: 16px;
  color: #444;
  padding-right: 10px;
}

/* Botão fechar */
.p-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 32px;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 100%;
  cursor: pointer;
  color: #666;
  height: 50px;
  width: 50px;
}

/* Botões navegação */
.p-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 26px;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  cursor: pointer;
  z-index: 10;
}

.p-prev {
  left: -20px;
}

.p-next {
  right: -20px;
}

.p-nav-btn:hover {
  background: white;
}

/* Estilo da descrição */
.p-modal-caption h4 {
  font-weight: 600;
}

.p-modal-caption p {
  font-size: 1.1rem;
  line-height: 1.6;
  font-weight: 400;
  margin-bottom: 12px;
  text-align: justify;
}

.p-modal-caption h1,
.p-modal-caption h2,
.p-modal-caption h3 {
  margin-top: 15px;
  margin-bottom: 8px;
  font-weight: 600;
}