/* =========================
   GALLERY — HERO
========================= */

.hero-soft {
  background-color: var(--verde-claro);
}

.gallery-hero {
  height: 60vh;
  margin-bottom: 100px;

  background-color: var(--verde-oliva);

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.gallery-hero-content {
  max-width: 700px;
  padding: 0 30px;
}

.gallery-hero h1 {
  margin-bottom: 16px;
}

.gallery-subtitle {
  font-size: 1rem;
  opacity: 0.75;
}

/* =========================
   GALLERY — GRID
========================= */

.gallery-section {
  padding: 0 60px 140px;
}

.gallery-grid {
  max-width: 1100px;   /* 🔥 limita largura */
  margin: 0 auto;      /* 🔥 centraliza */
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.gallery-item {
  aspect-ratio: 4 / 3; /* 🔥 segredo da elegância */
  overflow: hidden;
  border-radius: 8px;
}

.gallery-lightbox-trigger {
  border: none;
  background: transparent;
  padding: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;

  transition: transform 0.6s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

/* LIGHTBOX */

.gallery-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.65);
  z-index: 2000;
}

.gallery-lightbox.is-open {
  display: flex;
}

.gallery-lightbox-content {
  position: relative;
  max-width: min(1100px, 92vw);
  max-height: 88vh;
  background: white;
  padding: 16px;
  border-radius: 10px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
}

.gallery-lightbox-content img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.gallery-lightbox-close {
  position: absolute;
  top: 6px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: var(--marrom-texto);
}

/* =========================
   GALLERY — CTA
========================= */

.gallery-cta {
  padding: 100px 40px;
  margin-bottom: 0;

  background-color: var(--bege-claro);
  text-align: center;
}

.gallery-cta h2 {
  max-width: 500px;
  margin: 0 auto 16px;
}

.gallery-cta p {
  max-width: 400px;
  margin: 0 auto;
}

.gallery-cta .btn-outline {
  display: inline-block;
  text-decoration: none;
}

/* =========================
   RESPONSIVO — GALLERY
========================= */

@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }

  .gallery-section {
    padding: 0 40px 120px;
  }
}

@media (max-width: 768px) {
  .gallery-hero {
    height: 45vh;
    margin-bottom: 60px;
  }

  .gallery-section {
    padding: 0 24px 100px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* evita zoom estranho em touch */
  .gallery-item img {
    transform: none !important;
  }

  .gallery-cta {
    padding: 80px 30px;
  }
}

@media (max-width: 480px) {
  .gallery-section {
    padding: 40px 20px;
  }

  .gallery-grid {
    gap: 20px;
  }

  .gallery-item img {
    height: 240px;
  }

  .gallery-hero {
    padding: 120px 20px 50px;
  }

  .gallery-cta {
    padding: 60px 20px;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item {
    height: 220px;
  }
}
