/* Rolagem suave e compensação para header fixo */
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-offset, 65px);
}

/* ==========================================
   HERO SLIDER - Ken Burns Effect
   ========================================== */
.hero-slider {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  will-change: opacity;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1);
  animation: heroKenBurns 8s ease-in-out infinite alternate;
}

.hero-slide.active .hero-slide-bg {
  animation-play-state: running;
}

.hero-slide:not(.active) .hero-slide-bg {
  animation-play-state: paused;
}

@keyframes heroKenBurns {
  0% {
    transform: scale(1) translate(0, 0);
  }
  100% {
    transform: scale(1.08) translate(-1%, -1%);
  }
}

/* Overlay gradient */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.55));
  z-index: 2;
}

/* Hero content above overlay */
.hero-content {
  position: relative;
  z-index: 3;
}

/* Hero slider indicators */
.hero-indicators {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 0.5rem;
}

.hero-indicator {
  width: 3rem;
  height: 3px;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hero-indicator:hover {
  background: rgba(255, 255, 255, 0.6);
}

.hero-indicator.active {
  background: #D4AF37;
}

/* ==========================================
   GLIGHTBOX - Ajustes de orientação
   ========================================== */
.glightbox-container .gslide-media .gslide-image img {
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
}

/* Retrato: privilegia altura */
.glightbox-container .gslide.is-portrait .gslide-image img {
  max-height: 88vh;
  max-width: 70vw;
}

/* Paisagem: privilegia largura */
.glightbox-container .gslide.is-landscape .gslide-image img {
  max-width: 92vw;
  max-height: 70vh;
}

/* Mobile: melhor aproveitamento de tela sem cobrir demais */
@media (max-width: 768px) {
  .glightbox-container .gslide-media .gslide-image img {
    max-width: 95vw;
    max-height: 70vh;
  }
  
  .glightbox-container .gslide.is-portrait .gslide-image img {
    max-height: 75vh;
    max-width: 90vw;
  }
  
  .glightbox-container .gslide.is-landscape .gslide-image img {
    max-width: 95vw;
    max-height: 60vh;
  }
  
  /* Botões maiores e mais visíveis no mobile */
  .glightbox-container .gclose,
  .glightbox-container .gnext,
  .glightbox-container .gprev {
    padding: 1rem;
  }
  
  .glightbox-container .gclose {
    top: 10px !important;
    right: 10px !important;
    width: 44px !important;
    height: 44px !important;
  }
  
  .glightbox-container .gclose svg {
    width: 28px !important;
    height: 28px !important;
  }
  
  .glightbox-container .gnext,
  .glightbox-container .gprev {
    width: 44px !important;
    height: 44px !important;
  }
  
  .glightbox-container .gnext svg,
  .glightbox-container .gprev svg {
    width: 24px !important;
    height: 24px !important;
  }
}

/* Oculta painel de descrição vazio para evitar coluna branca */
.glightbox-container .gdesc:empty,
.glightbox-container .gslide-description:empty {
  display: none !important;
}

/* ==========================================
   GALERIA - Layout Masonry-like com load progressivo
   ========================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.gallery-item {
  overflow: hidden;
  border-radius: 0.5rem;
  aspect-ratio: 1;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

/* Skeleton loading para imagens */
.gallery-item.loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Botão ver mais */
.gallery-show-more {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.gallery-show-more button {
  padding: 0.875rem 2.5rem;
  background: transparent;
  border: 2px solid #1A3325;
  color: #1A3325;
  font-weight: 600;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.gallery-show-more button:hover {
  background: #1A3325;
  color: white;
}

.dark .gallery-show-more button {
  border-color: #8FBC8F;
  color: #8FBC8F;
}

.dark .gallery-show-more button:hover {
  background: #8FBC8F;
  color: #0D1619;
}

/* Scroll Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for children */
.reveal-delay-100 {
  transition-delay: 0.1s;
}
.reveal-delay-200 {
  transition-delay: 0.2s;
}
.reveal-delay-300 {
  transition-delay: 0.3s;
}
