/* ============================================
   PÁGINA GALERIA — galeria.css
   ============================================ */

/* ===== HERO ===== */
.gal-hero {
  position: relative;
  display: flex;
  height: 460px;
  max-height: 460px;
  background: var(--pink);
  overflow: hidden;
}

.gal-hero__content {
  flex: 0 0 44%;
  padding: 64px 40px 100px 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.gal-hero__titulo {
  font-family: 'Nunito', sans-serif;
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--pink-dark);
  line-height: 1.1;
}

.gal-hero__titulo em {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 700;
  display: block;
  font-size: 3rem;
}

.gal-hero__desc {
  font-size: 0.98rem;
  font-weight: 700;
  color: rgba(255,255,255,0.88);
  line-height: 1.55;
}

.gal-hero__foto {
  flex: 0 0 56%;
  overflow: hidden;
  position: relative;
}

.gal-hero__foto img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  mask-image: linear-gradient(to left, rgba(0,0,0,1) 55%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1) 55%, rgba(0,0,0,0) 100%);
}

.gal-hero__onda {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 2;
  line-height: 0;
}

.gal-hero__onda svg {
  width: 100%;
  height: 80px;
}

/* ===== GRID DE FOTOS ===== */
.galeria-grid {
  background: var(--white);
  padding: 56px 48px 64px;
}

.galeria-grid__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 14px;
  max-width: 1100px;
  margin: 0 auto;
}

/* Item padrão */
.gal-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--pink-light);
  cursor: pointer;
  position: relative;
}

/* Item alto: ocupa 2 linhas */
.gal-item--tall {
  grid-row: span 2;
}

/* Item largo: ocupa 2 colunas */
.gal-item--wide {
  grid-column: span 2;
}

.gal-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.38s ease, filter 0.38s ease;
}

.gal-item:hover img {
  transform: scale(1.06);
  filter: brightness(0.88);
}

/* Overlay de lupa ao hover */
.gal-item::after {
  content: '';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(244, 103, 157, 0.18);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.gal-item:hover::after {
  opacity: 1;
}

/* Fotos extras — ocultas inicialmente */
.gal-item--extra {
  display: none;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

/* Estado expandido: fotos extras aparecem */
.galeria-grid--expandido .gal-item--extra {
  display: block;
}

.galeria-grid--expandido .gal-item--extra.visivel {
  opacity: 1;
  transform: none;
}

/* ===== BOTÃO VER MAIS / VER MENOS ===== */
.galeria-grid__btn-wrap {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.btn--ver-mais {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 2.5px solid var(--pink);
  color: var(--pink);
  background: transparent;
  padding: 13px 36px;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.btn--ver-mais:hover {
  background: var(--pink);
  color: var(--white);
  transform: scale(1.03);
}

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  cursor: pointer;
}

.lightbox__container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: 90vw;
  max-height: 90vh;
  padding: 0 16px;
}

.lightbox__img {
  max-width: 80vw;
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.6);
  object-fit: contain;
  display: block;
  animation: lb-fadein 0.25s ease;
}

@keyframes lb-fadein {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.lightbox__fechar {
  position: absolute;
  top: -48px;
  right: 0;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.lightbox__fechar:hover {
  background: rgba(255,255,255,0.3);
}

.lightbox__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  transition: background 0.2s;
}

.lightbox__nav--prev { left: 24px; }
.lightbox__nav--next { right: 24px; }

.lightbox__nav:hover {
  background: var(--pink);
}

.lightbox__contador {
  position: absolute;
  bottom: -36px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  font-family: 'Nunito', sans-serif;
  white-space: nowrap;
}

/* ===== RESPONSIVO ===== */
@media (max-width: 1024px) {
  .galeria-grid { padding: 48px 32px; }
  .galeria-grid__inner { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .gal-hero {
    flex-direction: column;
    height: auto;
    max-height: none;
  }
  .gal-hero__content {
    flex: unset;
    padding: 48px 28px 90px;
  }
  .gal-hero__foto {
    flex: unset;
    height: 260px;
  }
  .gal-hero__foto img {
    mask-image: none;
    -webkit-mask-image: none;
  }
  .galeria-grid__inner {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
  }
}

@media (max-width: 480px) {
  .galeria-grid { padding: 32px 16px; }
  .galeria-grid__inner {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
    gap: 8px;
  }
  .gal-item--wide { grid-column: span 1; }
  .lightbox__nav { width: 36px; height: 36px; }
  .lightbox__img { max-width: 95vw; }
}
