/* Show the complete composed photograph, including the marks at its edges. */
img.fdn-photo-raster { object-fit: contain; }

.fdn-photo-framed,
:is(.guide-card-image, .home-guide-image, .article-card-visual):has(> img.fdn-photo-raster) {
  aspect-ratio: auto;
}

.fdn-photo-framed > img.fdn-photo-raster,
:is(.guide-card-image, .home-guide-image, .article-card-visual, .news-card-image) > img.fdn-photo-raster {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
  transform: none;
}

:is(.site-hero-figure, .local-hero-figure, .content-photo, .deliverable-card-visual, .pricing-hero-image).fdn-photo-framed {
  min-height: 0;
  max-height: none;
  height: auto;
}

:is(.site-hero-figure, .local-hero-figure).fdn-photo-framed::after { content: none; }
:is(.site-hero-figure, .local-hero-figure).fdn-photo-framed > figcaption {
  position: static;
  max-width: none;
  margin: 0;
  padding: .65rem .8rem;
  border-radius: 0;
  color: #fff;
  background: var(--fdn-dark);
}
:is(.site-hero-figure, .local-hero-figure).fdn-photo-framed > figcaption a { color: #fff; }

/* The metrics follow the photograph so they cannot cover its baked-in lettering. */
.fdn-photo-panel { min-height: 0; }
.fdn-photo-panel::before,
.fdn-photo-panel > .careers-hero-figure::after { content: none; }

.fdn-photo-panel > img.fdn-photo-raster,
.fdn-photo-panel > .fdn-photo-framed {
  position: relative;
  inset: auto;
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 1rem;
  border-radius: 10px;
  opacity: 1;
}

:is(.news-hero-panel, .directory-hero-panel, .careers-hero-panel).fdn-photo-panel {
  padding: clamp(16px, 3vw, 32px);
}

.directory-hero-panel.fdn-photo-panel .directory-metrics {
  position: relative;
  inset: auto;
  margin-top: 1rem;
}

.glossary-hero-visual.fdn-photo-panel {
  padding: clamp(14px, 3vw, 28px);
  gap: .55rem;
}
.glossary-hero-visual.fdn-photo-panel > :is(img.fdn-photo-raster, .fdn-photo-framed, small) { grid-column: 1 / -1; }
.glossary-hero-visual.fdn-photo-panel > small { position: static; }

.intl-hero-panel.fdn-photo-panel > img.fdn-photo-raster { margin-bottom: 0; border-radius: 0; }
.intl-hero-panel.fdn-photo-panel > figcaption { position: relative; inset: auto; padding: 1rem; }
.intl-hero-panel.fdn-photo-panel > figcaption > p { position: static; margin-top: .75rem; }

@media (max-width: 480px) {
  .directory-hero-panel.fdn-photo-panel .directory-metrics { grid-template-columns: 1fr; }
  .directory-hero-panel.fdn-photo-panel .directory-metrics div { min-height: 0; }
}
