/* ─── Gallery-specific styles (reuses vars + nav from style.css) ─── */

/* Page hero strip (shorter than home hero) */
.galeria-hero {
  position: relative;
  padding: 180px 5vw 80px;
  background: var(--cream);
  text-align: center;
  overflow: hidden;
}
.galeria-hero .section-eyebrow { color: var(--peach); }
.galeria-hero h1 {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(48px, 7vw, 88px);
  color: var(--dark);
  line-height: 1;
  margin: 14px 0 18px;
  font-weight: 400;
}
.galeria-hero p {
  max-width: 520px;
  margin: 0 auto;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text);
}
.galeria-hero .divider { margin: 24px auto 0; }

/* ─── Filter pills ─── */
.gal-filters {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 28px 5vw 8px;
  background: var(--cream);
}
.gal-filter {
  font-family: 'Montserrat', sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-light);
  background: rgba(139, 120, 175, 0.06);
  border: 1px solid rgba(139, 120, 175, 0.2);
  padding: 10px 20px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.gal-filter:hover {
  color: var(--dark);
  background: rgba(139, 120, 175, 0.14);
}
.gal-filter.active {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}
.gal-count {
  margin-left: 8px;
  font-size: 9px;
  opacity: 0.7;
}

/* ─── Container for variations ─── */
.gal-section {
  background: var(--cream);
  padding: 32px 0 100px;
}
.gal-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 4vw;
}

/* ─── Reset padrão de <button> nos itens da galeria ─── */
.gal-item {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  padding: 0;
  margin: 0;
  outline: none;
}

/* ─── V1: Uniform square grid ─── */
.gal-grid-uniform {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.gal-grid-uniform .gal-item {
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--purple-pale);
  transform: translateZ(0);
}
.gal-grid-uniform .gal-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}
.gal-grid-uniform .gal-item:hover img { transform: scale(1.06); }
.gal-grid-uniform .gal-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(61,53,80,0.55) 0%, transparent 40%);
  opacity: 0;
  transition: opacity 0.3s;
}
.gal-grid-uniform .gal-item:hover::after { opacity: 1; }

/* ─── V2: Editorial mosaic (featured tiles) ─── */
.gal-grid-mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 180px;
  gap: 10px;
}
.gal-grid-mosaic .gal-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--purple-pale);
  transform: translateZ(0);
}
.gal-grid-mosaic .gal-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease, filter 0.4s ease;
}
.gal-grid-mosaic .gal-item:hover img { transform: scale(1.05); }
/* Feature pattern: every 7th is tall, every 11th wide */
.gal-grid-mosaic .gal-item.feat-tall   { grid-row: span 2; }
.gal-grid-mosaic .gal-item.feat-wide   { grid-column: span 2; }
.gal-grid-mosaic .gal-item.feat-big    { grid-column: span 2; grid-row: span 2; }

/* ─── V3: Masonry (CSS columns) ─── */
.gal-grid-masonry {
  column-count: 4;
  column-gap: 12px;
}
.gal-grid-masonry .gal-item {
  break-inside: avoid;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--purple-pale);
  transform: translateZ(0);
  display: block;
}
.gal-grid-masonry .gal-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s ease;
}
.gal-grid-masonry .gal-item:hover img { transform: scale(1.04); }

/* Shared hover overlay icon (zoom) */
.gal-item .zoom-ico {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,0.9);
  background: rgba(61,53,80,0.4);
  backdrop-filter: blur(4px);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  z-index: 2;
  font-size: 18px;
}
.gal-item:hover .zoom-ico {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Fade out items not matching filter */
.gal-item.hidden { display: none !important; }

/* ─── LIGHTBOX ─── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(139, 120, 175, 0.97);
  backdrop-filter: blur(12px);
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.lightbox.open {
  display: flex;
  opacity: 1;
}
.lightbox-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 80px;
}
.lightbox-img-wrap {
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.lightbox-img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  display: block;
  box-shadow: 0 20px 80px rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.lightbox-img.loaded { opacity: 1; }

/* Close button */
.lb-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 5;
}
.lb-close:hover { background: rgba(255,255,255,0.18); transform: rotate(90deg); }

/* Arrows */
.lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 5;
  font-family: Georgia, serif;
  line-height: 1;
}
.lb-arrow:hover { background: rgba(255,255,255,0.18); }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }

/* Caption + counter */
.lb-meta {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255,255,255,0.7);
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 0 20px;
}
.lb-counter {
  padding: 4px 12px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  letter-spacing: 3px;
}
.lb-caption {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: none;
  color: rgba(255,255,255,0.85);
  max-width: 600px;
}

/* Swipe hint on mobile */
.lb-hint {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.5);
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  pointer-events: none;
}

/* ─── Variation header (only used in design canvas mode) ─── */
.variant-header {
  padding: 18px 4vw 6px;
  border-top: 1px solid rgba(139, 120, 175, 0.15);
  background: var(--cream);
}
.variant-header .v-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--peach);
  font-weight: 600;
}
.variant-header h3 {
  font-family: 'Great Vibes', cursive;
  font-size: 40px;
  color: var(--dark);
  font-weight: 400;
  margin: 2px 0 4px;
  line-height: 1.1;
}
.variant-header p {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  color: var(--text-light);
  max-width: 640px;
}

/* ─── Nav always dark (no hero image on this page) ─── */
#navbar .nav-links a { color: var(--dark); }
#navbar .burger span { background: var(--dark); }

/* ─── CTA buttons ─── */
.contato-cta-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 40px;
}
.contato-cta-btns .wpp-btn-big {
  margin-top: 0;
  max-width: none;
  padding: 15px 32px;
  font-size: 11px;
  letter-spacing: 2.5px;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .galeria-hero { padding: 120px 5vw 48px; }
  .gal-grid-mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .gal-grid-mosaic .gal-item.feat-wide { grid-column: span 2; }
  .gal-grid-mosaic .gal-item.feat-big { grid-column: span 2; grid-row: span 2; }
  .gal-grid-mosaic .gal-item.feat-tall { grid-row: span 2; }
  .gal-grid-masonry { column-count: 2; }
  .lightbox-inner { padding: 60px 12px 80px; }
  .lb-arrow { width: 44px; height: 44px; font-size: 22px; }
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
  .lb-close { top: 16px; right: 16px; width: 40px; height: 40px; }
}
@media (max-width: 520px) {
  .gal-grid-uniform { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .gal-grid-mosaic { grid-auto-rows: 130px; gap: 8px; }
  .gal-grid-masonry { column-count: 2; column-gap: 8px; }
  .gal-grid-masonry .gal-item { margin-bottom: 8px; }
  .galeria-hero h1 { font-size: 54px; }
}
