/* Page-specific overrides live here when needed. */

/* Story page helpers */
.story-copy {
  max-width: 860px;
}

.story-note {
  max-width: 820px;
  margin-top: 1.5rem;
  padding-left: 1rem;
  border-left: 3px solid currentColor;
  font-size: 0.95rem;
}

.story-year {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--blue);
  font-size: 1.15rem;
  font-weight: 800;
}

.story-media img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
}

.story-links .card {
  display: flex;
  flex-direction: column;
}

.story-links .text-link {
  margin-top: auto;
  padding-top: 0.9rem;
}

/* Biomechanics page helpers */
.image-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  gap: 1rem;
  width: 100%;
}

.image-row img.two-column {
  max-width: 100%;
  height: auto;
  width: 48%;
}

.image-row img.three-column {
  max-width: 100%;
  height: auto;
  width: 31%;
}

.image-with-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  text-align: left;
  line-height: 1.4;
  max-width: 100%;
}

.image-with-caption .caption,
.caption {
  text-align: center;
  margin-top: 1rem;
  margin-bottom: 0.25rem;
}

.comparison-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 2rem;
}

.comparison-block {
  flex: 1 1 48%;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--panel);
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.image-wrapper,
.image-container {
  width: 100%;
  max-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.image-wrapper img,
.image-container img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.image-container.flipped img {
  transform: scaleX(-1);
}

.caption span {
  color: var(--blue);
  font-weight: bold;
}

.small-caps {
  font-variant: small-caps;
}

@media (max-width: 760px) {
  .image-row {
    flex-direction: column;
    align-items: center;
  }

  .image-row img,
  .image-row img.two-column,
  .image-row img.three-column {
    width: 100%;
  }

  .image-with-caption {
    width: 100%;
    max-width: 400px;
  }

  .comparison-container {
    flex-direction: column;
  }

  .comparison-block {
    flex-basis: 100%;
  }
}
