/* Contexto fotográfico editorial. Los datos de solicitud mantienen prioridad. */
.editorial-photo {
  margin: 2rem 0;
  min-width: 0;
  max-width: 100%;
}
.editorial-photo--hero.container {
  width: min(960px, calc(100% - 40px));
  margin: 0 auto 2rem;
}
.editorial-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  background: #eaf1e9;
}
.editorial-photo figcaption {
  padding: .7rem .2rem 0;
  color: #354f48;
  font-size: .875rem;
  line-height: 1.5;
}
.editorial-photo__caption,
.editorial-photo__provenance {
  display: block;
}
.editorial-photo__provenance {
  margin-top: .25rem;
  color: #536a62;
}
.prose .editorial-photo + h2 {
  margin-top: 2rem;
}
.prose:has(.editorial-photo) {
  /* Las URL oficiales largas también deben caber en la columna de lectura. */
  overflow-wrap: anywhere;
}

/* La portada conserva texto y acciones primero en el DOM y en móvil. */
.hero-inner:has(> .editorial-photo--landing) {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(230px, .8fr);
  column-gap: clamp(24px, 4vw, 52px);
  max-width: var(--content, 1160px);
}
.hero-inner:has(> .editorial-photo--landing) > * {
  grid-column: 1 / -1;
  min-width: 0;
}
.hero-inner:has(> .editorial-photo--landing) > .eyebrow,
.hero-inner:has(> .editorial-photo--landing) > h1,
.hero-inner:has(> .editorial-photo--landing) > .hero-lede,
.hero-inner:has(> .editorial-photo--landing) > .hero-actions {
  grid-column: 1;
}
.hero-inner:has(> .editorial-photo--landing) > .editorial-photo--landing {
  grid-column: 2;
  grid-row: 1 / span 4;
  align-self: center;
  margin: 0;
}
.hero .editorial-photo figcaption,
.hero .editorial-photo__provenance {
  color: #e3eee6;
}

/* Los índices añaden contexto sin convertir la cabecera en un gran cartel. */
.page-heading:has(> .editorial-photo--compact) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  column-gap: clamp(24px, 4vw, 48px);
}
.page-heading:has(> .editorial-photo--compact) > * {
  grid-column: 1;
  min-width: 0;
}
.editorial-photo--compact {
  width: min(320px, 100%);
  margin: 1rem 0 1.5rem;
}
.page-heading:has(> .editorial-photo--compact) > .editorial-photo--compact {
  grid-column: 2;
  grid-row: 1 / span 10;
  align-self: start;
  margin: 0;
}
.editorial-photo--compact figcaption {
  font-size: .875rem;
  line-height: 1.45;
}
.editorial-photo--tool {
  width: min(280px, 100%);
  justify-self: end;
  margin-block: .5rem 1rem;
}
.editorial-photo.editorial-photo--tool.container {
  width: min(280px, calc(100% - 40px));
  margin: 1.5rem auto;
}
.editorial-photo--portal-inline {
  width: min(800px, calc(100% - 40px));
  margin-inline: auto;
}
.editorial-photo--internal-compact {
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
}
@media (max-width: 680px) {
  .editorial-photo--hero.container {
    width: calc(100% - 30px);
  }
  .editorial-photo {
    margin-block: 1.5rem;
  }
  .editorial-photo img {
    border-radius: 12px;
  }
  .hero-inner:has(> .editorial-photo--landing),
  .page-heading:has(> .editorial-photo--compact) {
    display: block;
  }
  .hero-inner:has(> .editorial-photo--landing) > .editorial-photo--landing {
    max-width: 480px;
    margin: 1.5rem 0;
  }
  .page-heading:has(> .editorial-photo--compact) > .editorial-photo--compact {
    margin: 1rem 0 0;
  }
  .editorial-photo--tool {
    justify-self: start;
  }
}
