.gallery-track {
  height: 100%;
  width: 100%;
}

.gallery-section {
  padding: 100px 8%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.m-gallery {
  width: 80vw;
  aspect-ratio: 16/9;
  position: relative;
}

.gallery-card {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition:
    transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.4s ease;
  will-change: transform;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition:
    opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.6s ease;
  display: block;
}

.gallery-card img.fade-out {
  opacity: 0;
}

.gallery-controls {
  margin-top: auto;
  padding-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.gallery-dots {
  display: flex;
  gap: 10px;
  align-items: center;
}

.gallery-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--border-strong);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  padding: 0;
  position: relative;
}

.gallery-dot:hover {
  background: var(--muted-light);
  transform: scale(1.2);
}

.gallery-dot.active {
  width: 28px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.15);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: var(--red);
}

.hero-picture {
  position: relative;
}

.gallery-btns {
  position: absolute;
  top: 40%;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

/* .gallery-controls:hover .gallery-btns {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
} */

.gallery-track-box:hover .gallery-btns {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.gallery-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.06);
}

.gallery-btn:hover {
  background: var(--red-dark);
  border-color: var(--ink);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgb(0 0 0 / 0.12);
}

.gallery-btn:hover svg {
  stroke: white;
}

.gallery-btn svg {
  width: 18px;
  height: 18px;
  stroke: #0f0e0d;
  transition: stroke 0.2s ease;
}

.gallery-btn:active {
  transform: scale(0.96);
}

@media (max-width: 640px) {
  .gallery-controls {
    flex-direction: column;
    align-items: center;
  }

  .gallery-track-box:hover .gallery-btns {
    opacity: 0;
  }

  .gallery-btns {
    visibility: visible;
    height: 85%;
    top: 0;
  }
  .gallery-btn {
    height: 100%;
  }
}
