/* LISTA DE GALERIAS (portfolio.html) */


.spacer {
  margin-top: 80px;
}

.galerias{
  display:grid;
  grid-template-columns: repeat(4,1fr);
  gap:40px;
  padding:4rem 2rem;
}

/* TABLET */
@media (max-width:1000px){
  .galerias{
    grid-template-columns: repeat(3,1fr);
  }
}

/* CELULAR */
@media (max-width:768px){
  .galerias{
    grid-template-columns: repeat(2,1fr);
    gap:25px;
  }
}
.galeria {
  position:relative;
  overflow:hidden;
  border-radius:12px;
  box-shadow:0 4px 12px rgba(0,0,0,.15);
  text-decoration:none;
  color:#fff;
}

/* PADRONIZAÇÃO DE PROPORÇÃO */
.galeria img {
  width: 100%;
  aspect-ratio: 3 / 4;  /* padrão retrato elegante */
  object-fit: cover;    /* corta mantendo proporção */
  display: block;
  transition: .4s;
}

.galeria:hover img { transform:scale(1.05); }

.galeria span {
  position:absolute;
  bottom:10px;
  left:10px;
  background:rgba(0,0,0,.6);
  padding:.5rem 1rem;
  border-radius:6px;
}

/* GALERIA PINTEREST (galeria.html) */
.galeria-fotos {
  column-count:3;
  column-gap:20px;
  padding:2rem;
}

@media(max-width:900px){ .galeria-fotos{ column-count:2; } }
@media(max-width:600px){ .galeria-fotos{ column-count:1; } }

.foto-container {
  break-inside: avoid;
  margin-bottom:20px;
}

.foto-container img {
  width:100%;
  border-radius:12px;
  display:block;
}


/* =========================
   FILTROS DO PORTFÓLIO
========================= */

.filtros {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 2.5rem 0;
}

/* BOTÃO BASE */
.filtros button {
  padding: 0.6rem 1.4rem;
  border-radius: 30px;
  border: 1.5px solid #708e48;
  background: transparent;
  color: #708e48;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: 
    background-color 0.3s ease,
    color 0.3s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

/* HOVER (quando NÃO está ativo) */
.filtros button:hover:not(.active) {
  background: #8ba06f;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(112, 142, 72, 0.25);
}

/* BOTÃO ATIVO (FILTRO SELECIONADO) */
.filtros button.active {
  background: #708e48;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(112, 142, 72, 0.35);
  transform: scale(1.05);
  cursor: default;
}

/* REMOVE HOVER QUANDO ATIVO */
.filtros button.active:hover {
  transform: scale(1.05);
}

/* MOBILE */
@media (max-width: 600px) {
  .filtros {
    gap: 10px;
  }

  .filtros button {
    padding: 0.5rem 1.1rem;
    font-size: 0.85rem;
  }
}


/* =========================
   CONTROLE DO LINK "VOLTAR"
========================= */

/* Por padrão, o botão NÃO aparece */
.menu-voltar {
  display: none;
}

/* Somente dentro da galeria ele aparece */
body.pagina-galeria .menu-voltar {
  display: inline-block;
  color: #708e48;
  font-weight: 500;
}


/* =========================
   LIGHTBOX (OVERLAY REAL)
========================= */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 10px;
}

.lightbox .close {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 2.5rem;
  color: #fff;
  cursor: pointer;
}

/* =========================
   LIGHTBOX AVANÇADO
========================= */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 10px;
}

.lightbox .close {
  position: absolute;
  top: 25px;
  right: 35px;
  font-size: 2.5rem;
  color: #fff;
  cursor: pointer;
}

.lightbox .nav {
  position: absolute;
  top: 50%;
  font-size: 3rem;
  color: #fff;
  cursor: pointer;
  user-select: none;
  padding: 0 20px;
  transform: translateY(-50%);
}

.lightbox .prev { left: 0; }
.lightbox .next { right: 0; }

.lightbox .contador {
  position: absolute;
  bottom: 25px;
  color: #fff;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* MOBILE */
@media (max-width: 768px) {
  .lightbox .nav {
    font-size: 2.2rem;
  }
}

.lightbox-loading {
  position: absolute;
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255,255,255,0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


/* =========================
   HERO DA GALERIA
========================= */

/* =========================
   HERO DA GALERIA
========================= */

.galeria-hero {
  text-align: center;
  padding: 7rem 1rem 4rem 1rem;
}

.galeria-hero-content {
  max-width: 900px;
  margin: auto;
}

#titulo-galeria {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  color: #708e48;
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
}

#subtitulo-galeria {
  font-family: 'Poppins', sans-serif;
  font-size: 1.2rem;
  color: #444;
  opacity: 0.85;
}

#titulo-galeria::after {
  content: "";
  display: block;
  width: 80px;
  height: 3px;
  background: #708e48;
  margin: 1.2rem auto 0 auto;
  border-radius: 2px;
}


/* =========================
   GRID EDITORIAL
========================= */

.galerias {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 50px;
  padding: 4rem 2rem;
}

/* =========================
   CARD EDITORIAL
========================= */

.card-editorial {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform .3s ease;
}

.card-editorial:hover {
  transform: translateY(-6px);
}

/* IMAGEM PADRONIZADA */
.card-image {
  width: 100%;
  aspect-ratio: 4 / 5;  /* proporção elegante */
  overflow: hidden;
  border-radius: 16px;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* CONTEÚDO */
.card-content {
  margin-top: 1.5rem;
}

.card-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: #222;
  margin-bottom: 0.8rem;
  position: relative;
  padding-bottom: 12px;
}
/* Linha fina editorial */
.card-content h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;                /* tamanho inicial */
  height: 2px;
  background: #708e48;
  transition: width 0.4s ease;
}
.card-editorial:hover h3::after {
  width: 100%;
}
.card-content p {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  color: #555;
  line-height: 1.6;
}