/* ============================================
   Sphere Image Grid — Gallery Section
   "Um pedaco da nossa historia"
   ============================================ */

.gallery {
  position: relative;
  overflow: hidden;
}

.gallery__accent-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(30, 33, 48, 0.12), transparent);
}

.gallery__header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.gallery__sphere-wrapper {
  perspective: 1000px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 0;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.gallery__sphere-wrapper:active,
.gallery__sphere-wrapper--dragging {
  cursor: grabbing;
}

.gallery__scene {
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
}

.gallery__card-positioner {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
}

.gallery__card {
  position: absolute;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid rgba(183, 182, 178, 0.20);
  box-shadow:
    0 2px 8px rgba(0,0,0,0.12),
    0 8px 24px rgba(0,0,0,0.08),
    0 16px 48px rgba(0,0,0,0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  will-change: transform;
  cursor: pointer;
}

.gallery__card:hover {
  transform: scale(1.3);
  box-shadow:
    0 4px 12px rgba(0,0,0,0.18),
    0 16px 40px rgba(0,0,0,0.12),
    0 32px 80px rgba(0,0,0,0.08);
  border-color: rgba(183, 182, 178, 0.50);
  z-index: 10;
}

.gallery__card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* Gallery stats (counter section below) */
.gallery__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding: 2rem 0 0;
  text-align: center;
}

.gallery__stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.gallery__stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: -0.02em;
  line-height: 1;
}

.gallery__stat-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 400;
}

/* ============================================
   Responsive — Gallery
   ============================================ */

@media (max-width: 900px) {
  .gallery__stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .gallery__stat-number {
    font-size: 2rem;
  }
}

@media (max-width: 600px) {
  .gallery__sphere-wrapper {
    perspective: 800px;
  }

  .gallery__stats {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .gallery__stat-number {
    font-size: 1.8rem;
  }
}
