.editorial-carousel {
  --editorial-gutter: max(clamp(1.25rem, 4.8vw, 5rem), calc((100% - 84rem) / 2));
  --editorial-card-size: min(80vw, clamp(18.75rem, 36vw, 33.75rem));
  --editorial-gap: clamp(.85rem, 1.45vw, 1.65rem);
  padding-block: clamp(3.5rem, 7vw, 7.5rem);
  background: #fff;
  color: #181818;
}
.editorial-carousel-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  align-items: end;
  gap: clamp(2rem, 6vw, 8rem);
  margin-inline: var(--editorial-gutter);
}
.editorial-carousel-intro h2 {
  max-width: 19ch;
  font-size: clamp(2.3rem, 5.3vw, 5rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -.058em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.editorial-carousel-intro > p {
  max-width: 42ch;
  margin-bottom: .15rem;
  font-size: clamp(1rem, 1.25vw, 1.23rem);
  line-height: 1.5;
  color: #484845;
  overflow-wrap: anywhere;
}
.editorial-carousel-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem 1.25rem;
  margin: clamp(1.7rem, 3.4vw, 3rem) var(--editorial-gutter) .85rem;
}
.editorial-related-link {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 44px;
  font-size: 1rem;
  font-weight: 600;
  color: #222;
  text-decoration: underline;
  text-underline-offset: .22em;
  overflow-wrap: anywhere;
}
.editorial-related-link:hover { color: #2348bb; }
.editorial-carousel-controls {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-inline-start: auto;
}
.editorial-carousel-controls[hidden] { display: none; }
.editorial-count {
  margin-right: .55rem;
  white-space: nowrap;
  font-size: .875rem;
  font-weight: 600;
  color: #41413f;
  font-variant-numeric: tabular-nums;
}
.editorial-carousel-controls button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #41413e;
  color: #161616;
  background: #fff;
}
.editorial-carousel-controls button[aria-disabled="true"] {
  cursor: default;
  color: #777772;
  border-color: #c7c7c3;
}
.editorial-carousel-controls button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: white;
  z-index: 1;
  mix-blend-mode: difference;
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}
@media (hover: hover) {
  .editorial-carousel-controls button:not([aria-disabled="true"]):hover::before { transform: scaleX(1); }
}
.editorial-carousel-controls button:not([aria-disabled="true"]):focus-visible::before { transform: scaleX(1); }
.editorial-carousel :is(button, a, .editorial-slide):focus-visible { outline: 3px solid #315bd9; outline-offset: 2px; }
.editorial-track {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--editorial-card-size);
  align-items: start;
  gap: var(--editorial-gap);
  margin: 0;
  padding: .375rem var(--editorial-gutter) .75rem;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--editorial-gutter);
  scrollbar-width: thin;
  scrollbar-color: #92928e #f1f1ed;
}
.js .editorial-track { scrollbar-width: none; }
.js .editorial-track::-webkit-scrollbar { display: none; }
.editorial-track:focus-visible { outline: 2px solid #315bd9; outline-offset: -2px; }
.editorial-slide {
  min-width: 0;
  scroll-snap-align: start;
  overflow-wrap: anywhere;
}
:where(.editorial-slide) > :where(a, article) { display: block; color: inherit; }
.editorial-card-image {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: end;
  --caption-inset: clamp(1.25rem, 2.4vw, 2.5rem);
  min-height: calc(var(--editorial-card-size) * 10 / 11);
  padding: var(--caption-inset);
  overflow: hidden;
  border-radius: clamp(.65rem, 1.05vw, 1.05rem);
  background: #393732;
  color: #fff;
}
.editorial-card-image > img {
  position: absolute;
  width: 100%;
  height: 100%;
  inset: 0;
}
.editorial-card-image > img { z-index: -2; object-fit: cover; }
.editorial-card-image h3 {
  position: relative;
  isolation: isolate;
  font-size: clamp(1.65rem, 3vw, 3.15rem);
  line-height: 1.04;
  letter-spacing: -.045em;
  font-weight: 600;
  color: #fff;
  text-wrap: balance;
}
/* Track the full caption height when the visitor enlarges the lettering. */
.editorial-card-image h3::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -2.2em calc(-1 * var(--caption-inset)) calc(-1 * var(--caption-inset));
  background: linear-gradient(to top, rgb(0 0 0 / 83%), rgb(0 0 0 / 66%) calc(100% - 2.2em), transparent);
}
.editorial-card-copy { padding: 1rem .1rem 0; }
.editorial-card-copy p {
  max-width: 46ch;
  color: #454542;
  font-size: clamp(1rem, 1.12vw, 1.12rem);
  line-height: 1.5;
}
.editorial-card-link {
  display: inline-block;
  margin-top: .75rem;
  font-size: .96rem;
  font-weight: 600;
  color: #222;
  text-decoration: underline;
  text-underline-offset: .22em;
}
.editorial-slide a:is(:hover, :focus-visible) .editorial-card-link { color: #2348bb; }
@media (prefers-reduced-motion: no-preference) {
  .editorial-carousel-controls button::before { transition: transform .24s var(--ease-out); }
  .editorial-card-image > img { transition: transform .35s var(--ease-out); }
  .editorial-slide a:is(:hover, :focus-visible) .editorial-card-image > img { transform: scale(1.025); }
}
@media (max-width: 700px) {
  .editorial-carousel-intro { grid-template-columns: minmax(0, 1fr); gap: .9rem; }
  .editorial-card-image { min-height: var(--editorial-card-size); }
  .editorial-carousel-tools { margin-top: 1.3rem; }
}
@media (forced-colors: active) {
  .editorial-carousel-controls button::before { display: none; }
  .editorial-card-image h3 { width: fit-content; background: Canvas; color: LinkText; }
}

/* Integración con la maqueta de la portada: misma retícula, títulos y ritmo que el resto de secciones. */
.editorial-carousel.sec {
  --editorial-gutter: 0px;
  --editorial-card-size: min(78vw, clamp(17rem, 28vw, 24rem));
  --editorial-gap: 20px;
  padding-block: 0;
  background: var(--surface-canvas);
  color: var(--title);
}
.editorial-carousel .editorial-wrap { overflow: hidden; }
.editorial-carousel-intro { align-items: end; gap: 24px 64px; }
.editorial-carousel-intro .h2 {
  margin-top: 12px;
  max-width: 22ch;
  font-size: clamp(32px, 3.6vw, 52px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.02em;
}
.editorial-carousel-intro > p { max-width: 44ch; font-size: 18px; line-height: 1.45; color: var(--text-secondary); }
.editorial-carousel-tools { margin: 28px 0 16px; }
.editorial-count { color: var(--text-secondary); }
.editorial-carousel-controls button { width: 44px; height: 44px; flex-basis: 44px; border-color: var(--hairline-strong); color: var(--title); background: var(--surface); }
.editorial-carousel-controls button[aria-disabled="true"] { border-color: var(--hairline); color: var(--text-tertiary); }
.editorial-card-image { border-radius: var(--r-xl); }
.editorial-card-image h3 { font-size: clamp(1.45rem, 2.1vw, 2rem); font-weight: 750; letter-spacing: -.02em; }
.editorial-card-copy { padding: 14px 2px 0; }
.editorial-card-copy p { color: var(--text-secondary); font-size: 16px; }
.editorial-card-link { margin-top: 10px; font-size: 15px; color: var(--link); text-decoration: none; }
.editorial-slide a:is(:hover, :focus-visible) .editorial-card-link { color: var(--action-hover); text-decoration: underline; }
.editorial-track { padding: 4px 0 8px; scroll-padding-inline: 0; }
