.c-gallery__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.c-gallery__title {
  color: var(--color-text-light);
  margin-bottom: 0.35rem;
}

.c-gallery__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}

.c-gallery__btn {
  position: relative;
  z-index: 15;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(20, 20, 22, 0.9);
  color: var(--color-text-light);
  font-size: 1.25rem;
  cursor: pointer;
  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.c-gallery__btn:hover {
  background: var(--color-primary, #b80d0d);
  border-color: var(--color-primary, #b80d0d);
  transform: scale(1.08);
  box-shadow: 0 10px 24px -6px rgba(184, 13, 13, 0.6);
}

.c-gallery__btn:active {
  transform: scale(0.94);
}

.c-gallery__track {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  padding: calc(var(--space-xl) + 0.75rem) 0;
}

.c-gallery__belt {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  width: max-content;
  will-change: transform;
}

.c-gallery__slide {
  position: relative;
  overflow: hidden;
  flex: 0 0 min(68vw, 240px);
  width: min(68vw, 240px);
  aspect-ratio: 1 / 1;
  padding: var(--space-md);
  justify-content: space-between;
  text-decoration: none;
  opacity: 0.72;
  transform: scale(0.88);
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.45);
  transition:
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.65s ease;
}

.c-gallery__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 20%,
    rgba(255, 255, 255, 0.16) 50%,
    transparent 80%
  );
  transform: translateX(-130%);
  pointer-events: none;
}

.c-gallery__slide.is-focused {
  opacity: 1;
  transform: scale(1.16) translateY(-4px);
  z-index: 10;
  border-color: rgba(235, 38, 38, 0.78);
  box-shadow:
    0 24px 48px -12px rgba(0, 0, 0, 0.88),
    0 0 30px -4px rgba(184, 13, 13, 0.48);
}

.c-gallery__slide.is-focused::after {
  animation: sidelec-sheen 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.c-gallery__slide:hover {
  opacity: 1;
  transform: scale(1.2) translateY(-6px);
  z-index: 12;
  box-shadow:
    0 28px 54px -10px rgba(0, 0, 0, 0.92),
    0 0 36px -2px rgba(184, 13, 13, 0.58);
}

@keyframes sidelec-sheen {
  0% {
    transform: translateX(-130%);
  }
  100% {
    transform: translateX(130%);
  }
}

.c-gallery__slide .c-card__title {
  position: relative;
  z-index: 2;
  margin-bottom: 0;
  font-size: var(--font-size-base);
  color: var(--color-text, #141416);
  transition: color 0.45s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.c-gallery__slide.is-focused .c-card__title {
  color: var(--color-text, #141416);
  transform: translateY(-2px);
}

.c-gallery__media {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  margin-bottom: var(--space-xs);
  padding: var(--space-xs);
  border-radius: var(--radius-sm);
  background:
    radial-gradient(circle at 50% 35%, rgba(184, 13, 13, 0.14), transparent 70%),
    rgba(0, 0, 0, 0.03);
  border: 1px dashed rgba(0, 0, 0, 0.14);
  transition: background 0.5s ease, border-color 0.5s ease;
}

.c-gallery__slide.is-focused .c-gallery__media {
  background:
    radial-gradient(circle at 50% 40%, rgba(220, 26, 26, 0.24), transparent 72%),
    rgba(0, 0, 0, 0.04);
  border-color: rgba(184, 13, 13, 0.35);
}

.c-gallery__media img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1), filter 0.65s ease;
}

.c-gallery__slide.is-focused .c-gallery__media img {
  transform: scale(1.08);
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.35));
  animation: sidelec-float 3.2s ease-in-out infinite;
}

@keyframes sidelec-float {
  0%, 100% {
    transform: scale(1.08) translateY(0);
  }
  50% {
    transform: scale(1.1) translateY(-5px);
  }
}

.c-gallery__progress {
  width: 100%;
  max-width: 220px;
  height: 3px;
  margin: var(--space-xs) auto 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.c-gallery__progress-bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #b80d0d, #ff4d4d);
  transform-origin: left center;
  transform: scaleX(0);
}

@media (max-width: 640px) {
  .c-gallery__stage {
    gap: var(--space-xs);
  }

  .c-gallery__btn {
    width: 2.35rem;
    height: 2.35rem;
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .c-gallery__slide,
  .c-gallery__media img,
  .c-gallery__btn {
    transition: none;
    animation: none;
  }

  .c-gallery__slide.is-focused::after,
  .c-gallery__slide.is-focused .c-gallery__media img {
    animation: none;
  }
}