/* Clickable photo stories, generated and validated by scripts/integrate-photo-links.mjs. */
.photo-story-card,
.photo-story-image-link,
.photo-story-card-target {
  color: inherit;
  text-decoration: none;
}

.photo-story-card,
.photo-story-image-link {
  cursor: pointer;
}

.photo-story-card:focus-visible,
.photo-story-image-link:focus-visible {
  outline: 3px solid #d1a04b;
  outline-offset: 4px;
}

.photo-story-image-link--standalone {
  display: block;
  max-width: 100%;
  overflow: hidden;
}

.photo-story-image-link--standalone > picture,
.photo-story-image-link--standalone > img,
.photo-story-image-link--standalone picture > img {
  display: block;
  max-width: 100%;
}

/* The documentary wall now opens the story page directly. */
.documentary-gallery .photo-story-card {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  color: #fff;
  background: transparent;
  text-align: left;
}

.documentary-gallery .photo-story-card::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5, 20, 31, .82), transparent 58%);
  content: '';
  pointer-events: none;
}

.documentary-gallery .photo-story-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 650ms cubic-bezier(.22, 1, .36, 1);
}

.documentary-gallery .photo-story-card:hover img,
.documentary-gallery .photo-story-card:focus-visible img {
  transform: scale(1.045);
}

/* Cards that used to be one link now have a photo link and a content link. */
[data-photo-split-card] {
  position: relative;
}

[data-photo-split-card] > .photo-story-image-link {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  overflow: hidden;
}

[data-photo-split-card] > .photo-story-image-link > img,
[data-photo-split-card] > .photo-story-image-link > picture,
[data-photo-split-card] > .photo-story-image-link picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

[data-photo-split-card] > .photo-story-card-target {
  display: contents;
}

[data-photo-split-card]::after,
[data-photo-split-card] .topic-card__shade {
  pointer-events: none;
}

[data-photo-split-card] > .photo-story-card-target > :not(.topic-card__shade) {
  pointer-events: auto;
}

.related-card > .photo-story-card-target > div {
  position: absolute;
  z-index: 3;
  right: 25px;
  bottom: 24px;
  left: 25px;
}

.agenda-anytime-card > .photo-story-card-target > div {
  position: absolute;
  z-index: 3;
  right: 30px;
  bottom: 30px;
  left: 30px;
}

.topic-card > .photo-story-card-target > .topic-card__number,
.topic-card > .photo-story-card-target > .topic-card__copy {
  z-index: 3;
}

[data-photo-split-card]:focus-within {
  outline: 3px solid #d1a04b;
  outline-offset: 3px;
}

/* Compatibility for image components that originally selected a direct img child. */
.landmark-card__visual > .photo-story-image-link--standalone {
  position: absolute;
  inset: 0;
}

.landmark-card__visual > .photo-story-image-link--standalone > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 650ms ease, transform 750ms cubic-bezier(.22, 1, .36, 1);
}

.landmark-card:hover .landmark-card__visual > .photo-story-image-link--standalone > img {
  transform: scale(1.045);
}

@media (prefers-reduced-motion: reduce) {
  .documentary-gallery .photo-story-card img,
  .landmark-card__visual > .photo-story-image-link--standalone > img {
    transition: none;
  }
}
