/* Club history — white gym timeline / coverflow */

.gym-history {
  --gh-bg: #ffffff;
  --gh-soft: #f5f5f6;
  --gh-line: rgba(0, 0, 0, 0.08);
  --gh-text: #121212;
  --gh-muted: #6b7280;
  --gh-red: #d32f2f;

  background: var(--gh-bg);
  color: var(--gh-text);
  padding: clamp(4rem, 8vw, 7rem) var(--moytay-gutter, clamp(1.35rem, 5.5vw, 4rem));
  position: relative;
  overflow: hidden;
}

.gym-history::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, black 0%, transparent 85%);
  pointer-events: none;
}

.gym-history__inner {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
}

.gym-history__head {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto clamp(2rem, 4vw, 3rem);
}

.gym-history__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gh-red);
}

.gym-history__eyebrow::before,
.gym-history__eyebrow::after {
  content: "";
  width: 1.75rem;
  height: 2px;
  background: var(--gh-red);
}

.gym-history__title {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.gym-history__title span {
  color: var(--gh-red);
}

.gym-history__lead {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--gh-muted);
}

.gym-history__stage-wrap {
  position: relative;
}

.gym-history__stage {
  position: relative;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gym-history__slide {
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: -110px;
  margin-top: -150px;
  width: 220px;
  cursor: pointer;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease;
  will-change: transform, opacity;
}

.gym-history__card {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 4px;
  overflow: hidden;
  background: var(--gh-soft);
  border: 1px solid var(--gh-line);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.gym-history__slide.is-active .gym-history__card {
  border-color: rgba(211, 47, 47, 0.55);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.14),
    0 0 0 1px rgba(211, 47, 47, 0.2);
}

.gym-history__card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gym-history__card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(18, 18, 18, 0.78) 100%);
  pointer-events: none;
}

.gym-history__meta {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 1;
  padding: 1rem 0.9rem 1.05rem;
  text-align: center;
}

.gym-history__year {
  display: inline-block;
  margin: 0 0 0.35rem;
  padding: 0.15rem 0.45rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--gh-red);
  border-radius: 2px;
}

.gym-history__name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.35;
  color: #fff;
}

.gym-history__caption {
  text-align: center;
  min-height: 3.25rem;
  margin: 0.25rem 0 1.25rem;
}

.gym-history__caption-year {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--gh-red);
}

.gym-history__caption-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.35;
}

.gym-history__caption-link {
  display: inline-block;
  margin-top: 0.55rem;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--gh-red);
  text-decoration: none;
}

.gym-history__caption-link[hidden] {
  display: none;
}

.gym-history__caption-link:hover {
  color: #b71c1c;
}

.gym-history__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.gym-history__nav {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gh-line);
  border-radius: 2px;
  background: #fff;
  color: var(--gh-text);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.gym-history__nav:hover {
  border-color: rgba(211, 47, 47, 0.55);
  color: var(--gh-red);
  background: rgba(211, 47, 47, 0.06);
}

.gym-history__dots {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.gym-history__dot {
  width: 1.65rem;
  height: 3px;
  border: 0;
  padding: 0;
  border-radius: 1px;
  background: rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: background 0.2s ease, width 0.2s ease;
}

.gym-history__dot.is-active {
  width: 2.25rem;
  background: var(--gh-red);
}

@media (min-width: 768px) {
  .gym-history__stage {
    height: 460px;
  }

  .gym-history__slide {
    margin-left: -120px;
    margin-top: -162px;
    width: 240px;
  }
}

@media (max-width: 640px) {
  .gym-history__stage {
    height: 380px;
  }

  .gym-history__slide {
    margin-left: -95px;
    margin-top: -130px;
    width: 190px;
  }

  .gym-history__card img {
    object-position: center 20%;
  }

  .gym-history__name {
    font-size: 0.85rem;
  }
}
