/* Numeración multinivel compartida por edición y publicación. */
/* El contenedor de lista evita que las viñetas invadan el margen de un medio
   flotante. Su sangría se mide desde el espacio disponible, no detrás de él. */
.wf-rich-content :is(ul, ol) { display: flow-root; padding-inline-start: 2rem; }
.wf-rich-content ol { counter-reset: wf-list var(--wf-list-start, 0); }
.wf-rich-content ol > li { counter-increment: wf-list; }
.wf-rich-content ol > li::marker { content: counters(wf-list, '.') '. '; }
.wf-rich-content li > ol, .wf-rich-content li > ul { margin-block: .25rem; }

/* Misma escala en edición y publicación: entre H4 (1.5rem) y párrafo. */
.wf-rich-content h5 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  margin-block: 0 .5rem;
}

.wf-rich-content details[data-wf-disclosure] {
  width: var(--wf-disclosure-width, 100%);
  max-width: 100%;
  margin-block: 1rem;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: .4rem;
  background: var(--bs-body-bg, #fff);
  color: var(--bs-body-color, #212529);
  clear: both;
}
.wf-rich-content details[data-wf-disclosure-align="center"] { margin-inline: auto; }
.wf-rich-content details[data-wf-disclosure-align="end"] { margin-inline-start: auto; margin-inline-end: 0; }
.wf-rich-content details[data-wf-disclosure-wrap] {
  clear: none;
  max-width: calc(100% - 12rem);
  margin-block: .25rem 1rem;
}
.wf-rich-content details[data-wf-disclosure-wrap="start"] { float: left; margin-inline: 0 1rem; }
.wf-rich-content details[data-wf-disclosure-wrap="end"] { float: right; margin-inline: 1rem 0; }
@container wf-rich-content (max-width: 36rem) {
  .wf-rich-content details[data-wf-disclosure] { width: 100%; max-width: 100%; float: none; clear: both; margin: 1rem 0; }
}
@media (max-width: 575.98px) {
  .wf-rich-content details[data-wf-disclosure] { width: 100%; max-width: 100%; float: none; clear: both; margin: 1rem 0; }
}
.wf-rich-content details[data-wf-disclosure] > summary {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  padding: .65rem .85rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  overflow-wrap: anywhere;
}
.wf-rich-content details[data-wf-disclosure] > summary::-webkit-details-marker { display: none; }
.wf-rich-content details[data-wf-disclosure] > summary::marker { content: ''; }
.wf-rich-content details[data-wf-disclosure] > summary::before {
  content: '+';
  flex: 0 0 1rem;
  text-align: center;
  font-size: 1.1em;
  line-height: 1;
}
.wf-rich-content details[data-wf-disclosure][open] > summary::before { content: '\2212'; }
.wf-rich-content details[data-wf-disclosure] > summary:hover { background: var(--bs-tertiary-bg, #f8f9fa); }
.wf-rich-content details[data-wf-disclosure] > summary:focus-visible {
  outline: 2px solid var(--bs-primary, #0d6efd);
  outline-offset: 2px;
}
.wf-rich-content details[data-wf-disclosure] > [data-wf-disclosure-body] {
  display: flow-root;
  padding: .25rem .85rem .85rem;
}
.wf-rich-content details[data-wf-disclosure] > [data-wf-disclosure-body] > :last-child { margin-bottom: 0; }

.wf-rich-content {
  max-width: 100%;
  overflow-x: auto;
  overflow-wrap: anywhere;
  container-type: inline-size;
  container-name: wf-rich-content;
}

.wf-rich-content table {
  --wf-table-border-width: 1px;
  --wf-table-border-style: solid;
  width: auto;
  max-width: 100%;
  margin: .75rem 0;
  border-collapse: collapse;
  background: var(--bs-body-bg);
}

.wf-rich-content table[data-wf-table-width="20"] { width: 20%; }
.wf-rich-content table[data-wf-table-width="25"] { width: 25%; }
.wf-rich-content table[data-wf-table-width="30"] { width: 30%; }
.wf-rich-content table[data-wf-table-width="35"] { width: 35%; }
.wf-rich-content table[data-wf-table-width="40"] { width: 40%; }
.wf-rich-content table[data-wf-table-width="45"] { width: 45%; }
.wf-rich-content table[data-wf-table-width="50"] { width: 50%; }
.wf-rich-content table[data-wf-table-width="55"] { width: 55%; }
.wf-rich-content table[data-wf-table-width="60"] { width: 60%; }
.wf-rich-content table[data-wf-table-width="65"] { width: 65%; }
.wf-rich-content table[data-wf-table-width="70"] { width: 70%; }
.wf-rich-content table[data-wf-table-width="75"] { width: 75%; }
.wf-rich-content table[data-wf-table-width="80"] { width: 80%; }
.wf-rich-content table[data-wf-table-width="85"] { width: 85%; }
.wf-rich-content table[data-wf-table-width="90"] { width: 90%; }
.wf-rich-content table[data-wf-table-width="95"] { width: 95%; }
.wf-rich-content table[data-wf-table-width="100"] { width: 100%; }

.wf-rich-content table[data-wf-table-align="start"] { margin-left: 0; margin-right: auto; }
.wf-rich-content table[data-wf-table-align="center"] { margin-left: auto; margin-right: auto; }
.wf-rich-content table[data-wf-table-align="end"] { margin-left: auto; margin-right: 0; }

.wf-rich-content table[data-wf-table-border-width="thin"] { --wf-table-border-width: 1px; }
.wf-rich-content table[data-wf-table-border-width="regular"] { --wf-table-border-width: 2px; }
.wf-rich-content table[data-wf-table-border-width="thick"] { --wf-table-border-width: 3px; }
.wf-rich-content table[data-wf-table-border-style="solid"] { --wf-table-border-style: solid; }
.wf-rich-content table[data-wf-table-border-style="dashed"] { --wf-table-border-style: dashed; }
.wf-rich-content table[data-wf-table-border-style="dotted"] { --wf-table-border-style: dotted; }

.wf-rich-content col[data-wf-col-width="5"] { width: 5%; }
.wf-rich-content col[data-wf-col-width="10"] { width: 10%; }
.wf-rich-content col[data-wf-col-width="15"] { width: 15%; }
.wf-rich-content col[data-wf-col-width="20"] { width: 20%; }
.wf-rich-content col[data-wf-col-width="25"] { width: 25%; }
.wf-rich-content col[data-wf-col-width="30"] { width: 30%; }
.wf-rich-content col[data-wf-col-width="35"] { width: 35%; }
.wf-rich-content col[data-wf-col-width="40"] { width: 40%; }
.wf-rich-content col[data-wf-col-width="45"] { width: 45%; }
.wf-rich-content col[data-wf-col-width="50"] { width: 50%; }
.wf-rich-content col[data-wf-col-width="55"] { width: 55%; }
.wf-rich-content col[data-wf-col-width="60"] { width: 60%; }
.wf-rich-content col[data-wf-col-width="65"] { width: 65%; }
.wf-rich-content col[data-wf-col-width="70"] { width: 70%; }
.wf-rich-content col[data-wf-col-width="75"] { width: 75%; }
.wf-rich-content col[data-wf-col-width="80"] { width: 80%; }
.wf-rich-content col[data-wf-col-width="85"] { width: 85%; }
.wf-rich-content col[data-wf-col-width="90"] { width: 90%; }
.wf-rich-content col[data-wf-col-width="95"] { width: 95%; }
.wf-rich-content col[data-wf-col-width="100"] { width: 100%; }

.wf-rich-content th,
.wf-rich-content td {
  min-width: 4rem;
  padding: .35rem .5rem;
  border-bottom: 1px solid var(--wf-table-border-color, var(--bs-border-color));
  vertical-align: top;
}

.wf-rich-content th {
  background: var(--bs-tertiary-bg);
  font-weight: 600;
}

.wf-rich-content caption {
  caption-side: top;
  padding: .4rem .5rem;
  color: var(--bs-body-color);
  font-weight: 600;
}

.wf-rich-content table[data-wf-table-bordered="1"] th,
.wf-rich-content table[data-wf-table-bordered="1"] td {
  border-width: var(--wf-table-border-width);
  border-style: var(--wf-table-border-style);
  border-color: var(--wf-table-border-color, var(--bs-border-color));
}

.wf-rich-content table[data-wf-table-borderless="1"] th,
.wf-rich-content table[data-wf-table-borderless="1"] td {
  border: 0;
}

.wf-rich-content table[data-wf-table-striped-rows="1"] tbody tr:nth-child(even) > * {
  background: var(--bs-tertiary-bg);
}

.wf-rich-content table[data-wf-table-striped-columns="1"] tr > :nth-child(even) {
  background: var(--bs-tertiary-bg);
}

.wf-rich-content table[data-wf-table-hover="1"] tbody tr:hover > * {
  background: rgba(var(--bs-primary-rgb), .12);
}

.wf-rich-content table[data-wf-table-compact="1"] th,
.wf-rich-content table[data-wf-table-compact="1"] td {
  min-width: 2.75rem;
  padding: .2rem .35rem;
  font-size: .9em;
}

.wf-rich-content th[scope="row"] {
  background: var(--bs-tertiary-bg);
  font-weight: 600;
}

.wf-rich-content [data-wf-cell-tone="muted"] { background: var(--bs-secondary-bg) !important; }
.wf-rich-content [data-wf-cell-tone="primary"] { background: rgba(var(--bs-primary-rgb), .18) !important; }
.wf-rich-content [data-wf-cell-tone="success"] { background: rgba(var(--bs-success-rgb), .18) !important; }
.wf-rich-content [data-wf-cell-tone="warning"] { background: rgba(var(--bs-warning-rgb), .28) !important; }
.wf-rich-content [data-wf-cell-tone="danger"] { background: rgba(var(--bs-danger-rgb), .18) !important; }

.wf-rich-content [data-wf-cell-align="start"],
.wf-rich-content [data-wf-text-align="start"] { text-align: start; }
.wf-rich-content [data-wf-cell-align="center"],
.wf-rich-content [data-wf-text-align="center"] { text-align: center; }
.wf-rich-content [data-wf-cell-align="end"],
.wf-rich-content [data-wf-text-align="end"] { text-align: end; }
.wf-rich-content [data-wf-cell-align="justify"],
.wf-rich-content [data-wf-text-align="justify"] { text-align: justify; }

.wf-rich-content [data-wf-cell-vertical-align="top"] { vertical-align: top; }
.wf-rich-content [data-wf-cell-vertical-align="middle"] { vertical-align: middle; }
.wf-rich-content [data-wf-cell-vertical-align="bottom"] { vertical-align: bottom; }

.wf-rich-content blockquote {
  padding-left: 1rem;
  border-left: .25rem solid var(--bs-border-color);
  color: var(--bs-secondary-color);
}

.wf-rich-content pre {
  padding: .75rem;
  overflow: auto;
  border-radius: var(--bs-border-radius);
  background: var(--bs-tertiary-bg);
}

.wf-rich-content__youtube,
.wf-rich-content :where(figure[data-wf-youtube]),
.wf-rich-content .wf-rich-media,
.wf-rich-content :where(figure[data-wf-media-kind]) {
  width: 75%;
  max-width: 100%;
  margin: 1rem auto;
}

.wf-rich-content [data-wf-media-width="25"] { width: 25%; }
.wf-rich-content [data-wf-media-width="30"] { width: 30%; }
.wf-rich-content [data-wf-media-width="35"] { width: 35%; }
.wf-rich-content [data-wf-media-width="40"] { width: 40%; }
.wf-rich-content [data-wf-media-width="45"] { width: 45%; }
.wf-rich-content [data-wf-media-width="50"] { width: 50%; }
.wf-rich-content [data-wf-media-width="55"] { width: 55%; }
.wf-rich-content [data-wf-media-width="60"] { width: 60%; }
.wf-rich-content [data-wf-media-width="65"] { width: 65%; }
.wf-rich-content [data-wf-media-width="70"] { width: 70%; }
.wf-rich-content [data-wf-media-width="75"] { width: 75%; }
.wf-rich-content [data-wf-media-width="80"] { width: 80%; }
.wf-rich-content [data-wf-media-width="85"] { width: 85%; }
.wf-rich-content [data-wf-media-width="90"] { width: 90%; }
.wf-rich-content [data-wf-media-width="95"] { width: 95%; }
.wf-rich-content [data-wf-media-width="100"] { width: 100%; }

.wf-rich-content [data-wf-media-align="start"] { margin-inline-start: 0; margin-inline-end: auto; }
.wf-rich-content [data-wf-media-align="center"] { margin-inline-start: auto; margin-inline-end: auto; }
.wf-rich-content [data-wf-media-align="end"] { margin-inline-start: auto; margin-inline-end: 0; }

.wf-rich-content [data-wf-indent="1"] { --wf-rich-indent: 2rem; }
.wf-rich-content [data-wf-indent="2"] { --wf-rich-indent: 4rem; }
.wf-rich-content [data-wf-indent="3"] { --wf-rich-indent: 6rem; }
.wf-rich-content [data-wf-indent="4"] { --wf-rich-indent: 8rem; }
.wf-rich-content [data-wf-indent] {
  max-width: calc(100% - var(--wf-rich-indent));
  margin-inline-start: var(--wf-rich-indent) !important;
  margin-inline-end: auto !important;
}

/* Un margen de párrafo queda oculto bajo una foto/PDF flotante. Aislar el
   bloque y usar relleno hace visible cada paso desde el borde del texto. */
.wf-rich-content :is(p, h2, h3, h4, h5, blockquote, pre, ul, ol)[data-wf-indent] {
  display: flow-root;
  max-width: 100%;
  margin-inline-start: 0 !important;
  margin-inline-end: 0 !important;
  padding-inline-start: var(--wf-rich-indent);
}
.wf-rich-content :is(ul, ol)[data-wf-indent] { padding-inline-start: calc(2rem + var(--wf-rich-indent)); }
.wf-rich-content blockquote[data-wf-indent] { padding-inline-start: calc(1rem + var(--wf-rich-indent)); }
.wf-rich-content pre[data-wf-indent] { padding-inline-start: calc(.75rem + var(--wf-rich-indent)); }

/* Compartido por editor y publicación: solo flotan bloques que lo solicitan.
   Los controles y pies de medios permanecen dentro de su propio bloque. */
.wf-rich-content :is(table, figure) { clear: both; }
.wf-rich-content :is(table[data-wf-table-wrap], figure[data-wf-media-wrap]) {
  clear: none;
  max-width: calc(100% - 12rem - var(--wf-rich-indent, 0px));
  margin-block: .25rem 1rem;
}
.wf-rich-content :is(table[data-wf-table-wrap="start"], figure[data-wf-media-wrap="start"]) {
  float: left;
  margin-inline-start: var(--wf-rich-indent, 0px) !important;
  margin-inline-end: 1rem !important;
}
.wf-rich-content :is(table[data-wf-table-wrap="end"], figure[data-wf-media-wrap="end"]) {
  float: right;
  margin-inline-start: 1rem !important;
  margin-inline-end: var(--wf-rich-indent, 0px) !important;
}

/* Centro compartido: elementos independientes en la misma línea, sin un
   nuevo bloque de columnas. Solo cambia el flujo que lo solicita. */
.wf-rich-content[data-wf-layout-center-flow],
.wf-rich-content [data-wf-layout-center-flow] { text-align: center; }
.wf-rich-content :where([data-wf-layout-center-flow] > *),
.wf-rich-content:where([data-wf-layout-center-flow]) > :where(*) { text-align: start; }
.wf-rich-content [data-wf-layout-center-spacer] { display: contents; }
.wf-rich-content [data-wf-layout-center-spacer] > br { display: none; }
@container wf-rich-content (max-width: 36rem) {
  .wf-rich-content :is(table[data-wf-table-wrap], figure[data-wf-media-wrap]) {
    float: none;
    clear: both;
    max-width: 100%;
    margin: 1rem auto !important;
  }
}

.wf-rich-content figure[data-wf-video-width="25"] { width: 25%; }
.wf-rich-content figure[data-wf-video-width="30"] { width: 30%; }
.wf-rich-content figure[data-wf-video-width="35"] { width: 35%; }
.wf-rich-content figure[data-wf-video-width="40"] { width: 40%; }
.wf-rich-content figure[data-wf-video-width="45"] { width: 45%; }
.wf-rich-content figure[data-wf-video-width="50"] { width: 50%; }
.wf-rich-content figure[data-wf-video-width="55"] { width: 55%; }
.wf-rich-content figure[data-wf-video-width="60"] { width: 60%; }
.wf-rich-content figure[data-wf-video-width="65"] { width: 65%; }
.wf-rich-content figure[data-wf-video-width="70"] { width: 70%; }
.wf-rich-content figure[data-wf-video-width="75"] { width: 75%; }
.wf-rich-content figure[data-wf-video-width="80"] { width: 80%; }
.wf-rich-content figure[data-wf-video-width="85"] { width: 85%; }
.wf-rich-content figure[data-wf-video-width="90"] { width: 90%; }
.wf-rich-content figure[data-wf-video-width="95"] { width: 95%; }
.wf-rich-content figure[data-wf-video-width="100"] { width: 100%; }

.wf-rich-content__video {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--bs-border-radius);
  background: #000;
  aspect-ratio: 16 / 9;
}

.wf-rich-content__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.wf-external-placeholder {
  display: flex;
  width: 100%;
  height: 100%;
  padding: 1.25rem;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: .45rem;
  background: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  text-align: center;
}

.wf-external-placeholder p {
  max-width: 42rem;
  margin: 0;
  color: var(--bs-secondary-color);
}

.wf-external-placeholder__icon {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 50%;
  background: var(--bs-danger);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
}

.wf-external-placeholder__actions {
  display: flex;
  margin-top: .35rem;
  justify-content: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.wf-rich-media {
  overflow: hidden;
}

.wf-rich-media--image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--bs-border-radius);
}

.wf-rich-media__image-expand {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: var(--bs-border-radius);
  color: inherit;
  cursor: zoom-in;
}

.wf-rich-media__image-expand:focus-visible {
  outline: 3px solid var(--bs-primary);
  outline-offset: -3px;
}

.wf-rich-image-viewer {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 100vw;
  height: 100%;
  height: 100dvh;
  max-height: 100%;
  margin: 0;
  padding: calc(3.5rem + env(safe-area-inset-top, 0px)) max(.75rem, env(safe-area-inset-right, 0px)) max(.75rem, env(safe-area-inset-bottom, 0px)) max(.75rem, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
  border: 0;
  background: transparent;
  color: #fff;
  overflow: hidden;
  overscroll-behavior: contain;
}

.wf-rich-image-viewer[open] {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
}
.wf-rich-image-viewer::backdrop { background: rgba(0, 0, 0, .9); }

.wf-rich-image-viewer__photo {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-out;
}

.wf-rich-image-viewer__photo img {
  display: block;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.wf-rich-image-viewer__close {
  position: absolute;
  top: max(.4rem, env(safe-area-inset-top, 0px));
  right: max(.4rem, env(safe-area-inset-right, 0px));
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 50%;
  background: #222;
  color: #fff;
  font: 32px/1 sans-serif;
  cursor: pointer;
}

.wf-rich-image-viewer button:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }

.wf-rich-media--image figcaption,
.wf-rich-media--carousel > figcaption,
.wf-rich-media--gallery > figcaption {
  padding: .5rem .25rem;
  color: var(--bs-secondary-color);
  font-size: .925rem;
  text-align: center;
}

.wf-rich-media__stage {
  position: relative;
  overflow: hidden;
  border-radius: var(--bs-border-radius);
  background: #111;
  aspect-ratio: 16 / 9;
}

.wf-rich-media__slide {
  display: block;
  width: 100%;
  height: 100%;
}

.wf-rich-media__slide[hidden] { display: none; }

.wf-rich-media__slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wf-rich-media__arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .68);
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
  transform: translateY(-50%);
}

.wf-rich-media__arrow--previous { left: .65rem; }
.wf-rich-media__arrow--next { right: .65rem; }

/* Incrustada: todas las fotos caben en el mismo marco, sin bandas negras ni
   recortes. El visor ampliado conserva los datos de la galería. */
[data-wf-rich-gallery] > [data-wf-rich-presentation] .wf-rich-media__stage {
  aspect-ratio: 16 / 9;
  background: transparent;
}
[data-wf-rich-gallery] > [data-wf-rich-presentation] .wf-rich-media__slide {
  height: 100%;
  cursor: pointer;
}
[data-wf-rich-gallery] > [data-wf-rich-presentation] .wf-rich-media__slide img {
  display: block;
  height: 100%;
}
[data-wf-rich-details][hidden] { display: none !important; }
.wf-rich-media__position {
  padding: .25rem 0;
  color: var(--bs-secondary-color);
  font-size: .8rem;
  text-align: center;
}
.wf-rich-media__overlay {
  position: absolute;
  z-index: 3;
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
}
.wf-rich-media__overlay--expand { top: .5rem; left: .5rem; }
.wf-rich-media__overlay--fullscreen { top: .5rem; right: .5rem; }
.wf-rich-media__overlay--play {
  top: 50%;
  left: 50%;
  width: 3rem;
  height: 3rem;
  transform: translate(-50%, -50%);
}
.wf-rich-media__overlay svg { display: block; width: 1.35rem; height: 1.35rem; pointer-events: none; }
.wf-rich-media__overlay--play svg { width: 1.65rem; height: 1.65rem; }
.wf-rich-media__overlay:hover { color: #fff; background: rgba(0, 0, 0, .8); }
.wf-rich-media__overlay:focus-visible, .wf-rich-media__arrow:focus-visible {
  outline: 3px solid var(--bs-primary);
  outline-offset: 2px;
}
.wf-rich-media__overlay[hidden],
.wf-rich-media__overlay[aria-pressed="true"] [data-wf-rich-icon="play"],
.wf-rich-media__overlay:not([aria-pressed="true"]) [data-wf-rich-icon="pause"],
.wf-rich-media__overlay[aria-pressed="true"] [data-wf-rich-icon="fullscreen"],
.wf-rich-media__overlay:not([aria-pressed="true"]) [data-wf-rich-icon="exit-fullscreen"] { display: none; }
.wf-rich-media__overlay:disabled, .wf-rich-media__arrow:disabled { opacity: .4; cursor: default; }
.wf-rich-gallery-viewer .wf-rich-media__overlay { display: none; }
[data-wf-rich-presentation]:fullscreen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: .5rem;
  background: var(--bs-body-bg);
}
[data-wf-rich-gallery] > [data-wf-rich-presentation]:fullscreen .wf-rich-media__stage {
  flex: 1;
  min-height: 0;
}
[data-wf-rich-gallery] > [data-wf-rich-presentation]:fullscreen .wf-rich-media__slide,
[data-wf-rich-gallery] > [data-wf-rich-presentation]:fullscreen .wf-rich-media__slide img { height: 100%; }
[data-wf-rich-gallery] > [data-wf-rich-presentation]:fullscreen .wf-rich-media__slide { position: absolute; inset: 0; }

.wf-rich-media__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .5rem 0;
  color: var(--bs-secondary-color);
  font-size: .875rem;
}

.wf-rich-media__controls [data-wf-rich-counter] {
  flex: 0 0 auto;
  white-space: nowrap;
}

.wf-rich-media__photo-meta {
  display: grid;
  gap: .2rem;
  padding: .65rem 0 0;
  color: var(--bs-secondary-color);
  font-size: .9rem;
}

.wf-rich-media__photo-meta strong { color: var(--bs-body-color); }

.wf-rich-media:fullscreen {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 1rem;
  overflow: auto;
  background: var(--bs-body-bg);
}

.wf-rich-media:fullscreen .wf-rich-media__stage { max-height: calc(100vh - 10rem); }

.wf-rich-media__thumbnails {
  display: flex;
  gap: .4rem;
  padding: .25rem 0;
  overflow-x: auto;
}

.wf-rich-media__thumbnails button {
  flex: 0 0 auto;
  padding: 2px;
  border: 2px solid transparent;
  border-radius: var(--bs-border-radius-sm);
  background: transparent;
}

.wf-rich-media__thumbnails button[aria-current="true"] { border-color: var(--bs-primary); }
.wf-rich-media__thumbnails img { display: block; object-fit: cover; }

.wf-rich-media__thumbnails[hidden] { display: none !important; }
.wf-rich-gallery-viewer {
  width: min(96vw, 100rem);
  max-width: 100%;
  height: 94dvh;
  max-height: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--bs-border-radius);
  overflow: hidden;
  color: var(--bs-body-color);
  background: var(--bs-body-bg);
}
.wf-rich-gallery-viewer::backdrop { background: rgba(0, 0, 0, .85); }
.wf-rich-gallery-viewer__content {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: .6rem;
  background: var(--bs-body-bg);
}
.wf-rich-gallery-viewer__content:fullscreen { width: 100vw; height: 100dvh; }
.wf-rich-gallery-viewer__toolbar { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding-bottom: .5rem; }
.wf-rich-gallery-viewer [data-wf-rich-viewer-mount] { flex: 1; min-height: 0; }
.wf-rich-gallery-viewer [data-wf-rich-presentation] { height: 100%; display: flex; flex-direction: column; }
.wf-rich-gallery-viewer .wf-rich-media__stage { flex: 1; min-height: 0; aspect-ratio: auto; cursor: default; }
.wf-rich-gallery-viewer .wf-rich-media__slide { position: absolute; inset: 0; }
.wf-rich-gallery-viewer .wf-rich-media__thumbnails { flex-shrink: 0; }
.wf-rich-gallery-viewer .wf-rich-media__photo-meta { padding-top: .35rem; }
.wf-rich-media__slide { cursor: zoom-in; }
@media (max-width: 575.98px) {
  .wf-rich-content :is(table[data-wf-table-wrap], figure[data-wf-media-wrap]) {
    float: none;
    clear: both;
    max-width: 100%;
    margin: 1rem auto !important;
  }
  /* Galerías usan ancho entero libre en escritorio; en móvil conservan la
     presentación a todo ancho, igual en el editor y en la publicación. */
  .wf-rich-content :is(.wf-rich-media--gallery, [data-wf-media-kind="gallery"], [data-wf-media-kind="carousel"]) {
    width: 100% !important;
  }
  .wf-rich-gallery-viewer { width: 100%; height: 100dvh; border-radius: 0; }
  .wf-rich-gallery-viewer__toolbar { font-size: .875rem; }
  .wf-rich-gallery-viewer .wf-rich-media__controls { gap: .35rem; }
  .wf-rich-media__overlay, .wf-rich-media__arrow { width: 2.25rem; height: 2.25rem; }
  .wf-rich-media__overlay--play { width: 2.75rem; height: 2.75rem; }
}

.wf-pdf-card { overflow: hidden; border: 1px solid var(--bs-border-color); border-radius: .75rem; background: var(--bs-body-bg); color: var(--bs-body-color); box-shadow: 0 .25rem 1rem #0001; }
.wf-rich-content:not(.wf-richtext__surface) .wf-pdf-card { transition: border-color .18s, box-shadow .18s, transform .18s; }
.wf-rich-content:not(.wf-richtext__surface) .wf-pdf-card:hover,
.wf-rich-content:not(.wf-richtext__surface) .wf-pdf-card:focus-within { border-color: var(--wf-primary); box-shadow: 0 .45rem 1.25rem #0003; transform: translateY(-3px); }
@media (prefers-reduced-motion: reduce) { .wf-rich-content:not(.wf-richtext__surface) .wf-pdf-card { transition: none; } }
.wf-pdf-card__cover { background: var(--bs-tertiary-bg); }
.wf-pdf-card__cover img { display: block; width: 100%; height: auto; max-width: 100%; object-fit: contain; }
.wf-pdf-card__body { display: flex; flex-direction: column; gap: .7rem; padding: .8rem; text-align: center; }
.wf-pdf-card .wf-pdf-card__title { font-size: 1rem; font-weight: 600; line-height: 1.4; margin: 0; overflow-wrap: anywhere; }
.wf-pdf-card__open { align-self: stretch; font-size: .9rem; }
@media (max-width: 575.98px) { .wf-rich-content .wf-pdf-card { width: 100% !important; max-width: 100%; } }

.wf-rich-media--unavailable {
  padding: 1rem;
  border: 1px dashed var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: var(--bs-tertiary-bg);
  color: var(--bs-secondary-color);
  text-align: center;
}

.wf-rich-map {
  position: relative;
  width: var(--wf-map-width, 75%);
  overflow: hidden;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: var(--bs-body-bg);
}

.wf-rich-map__stage {
  display: grid;
  min-height: 250px;
  place-items: stretch;
  overflow: hidden;
  background:
    linear-gradient(45deg, transparent 48%, rgba(var(--bs-secondary-rgb), .08) 49%, rgba(var(--bs-secondary-rgb), .08) 51%, transparent 52%),
    var(--bs-tertiary-bg);
  background-size: 2rem 2rem;
}

.wf-rich-map[data-wf-map-height="250"] .wf-rich-map__stage { height: 250px; }
.wf-rich-map[data-wf-map-height="300"] .wf-rich-map__stage { height: 300px; }
.wf-rich-map[data-wf-map-height="350"] .wf-rich-map__stage { height: 350px; }
.wf-rich-map[data-wf-map-height="400"] .wf-rich-map__stage { height: 400px; }
.wf-rich-map[data-wf-map-height="450"] .wf-rich-map__stage { height: 450px; }
.wf-rich-map[data-wf-map-height="500"] .wf-rich-map__stage { height: 500px; }
.wf-rich-map[data-wf-map-height="600"] .wf-rich-map__stage { height: 600px; }

.wf-rich-map__stage iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.wf-rich-map__placeholder {
  display: flex;
  padding: 1.5rem;
  align-items: center;
  align-self: stretch;
  flex-direction: column;
  justify-content: center;
  gap: .35rem;
  text-align: center;
}

.wf-rich-map__placeholder small {
  max-width: 40rem;
  margin-top: .5rem;
  color: var(--bs-secondary-color);
}

.wf-rich-map__pin {
  font-size: 2.5rem;
  line-height: 1;
}

.wf-rich-map__controls {
  display: flex;
  padding-top: .5rem;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.wf-rich-map__external {
  position: absolute;
  top: .5rem;
  right: .5rem;
  z-index: 2;
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 50%;
  background: rgb(0 0 0 / 65%);
  color: #fff;
  text-decoration: none;
}
.wf-rich-map__external svg { width: 1.15rem; height: 1.15rem; }
a.wf-rich-map__external:hover { background: rgb(0 0 0 / 85%); color: #fff; }
a.wf-rich-map__external:focus-visible { outline: 3px solid var(--bs-primary); outline-offset: 2px; }
.wf-richtext__surface .wf-rich-map__external { pointer-events: none; }

@media (max-width: 575.98px) {
  .wf-rich-content [data-wf-media-width]:not([data-wf-media-kind="image"]):not(.wf-rich-media--image):not([data-wf-mail-cid]):not([data-wf-media-wrap]),
  .wf-rich-content [data-wf-indent]:not([data-wf-media-kind="image"]):not(.wf-rich-media--image):not([data-wf-mail-cid]):not([data-wf-media-wrap]):not([data-wf-table-wrap]) {
    width: 100%;
    max-width: 100%;
    margin-inline-start: 0 !important;
    margin-inline-end: 0 !important;
  }

  .wf-rich-content :is(p, h2, h3, h4, h5)[data-wf-indent] { padding-inline-start: 0; }
  .wf-rich-content :is(ul, ol)[data-wf-indent] { padding-inline-start: 2rem; }
  .wf-rich-content blockquote[data-wf-indent] { padding-inline-start: 1rem; }
  .wf-rich-content pre[data-wf-indent] { padding-inline-start: .75rem; }

  /* Anular la sangría en pantallas pequeñas sin perder el tamaño ni el ajuste
     editorial de las fotografías (el render público usa --image). */
  .wf-rich-content :is(.wf-rich-media--image, [data-wf-media-kind="image"], [data-wf-mail-cid])[data-wf-indent]:not([data-wf-media-wrap]) {
    max-width: 100%;
    margin-inline-start: 0 !important;
    margin-inline-end: auto !important;
  }
  .wf-rich-content :is(.wf-rich-media--image, [data-wf-media-kind="image"], [data-wf-mail-cid])[data-wf-indent]:not([data-wf-media-wrap])[data-wf-media-align="center"] {
    margin-inline-start: auto !important;
    margin-inline-end: auto !important;
  }
  .wf-rich-content :is(.wf-rich-media--image, [data-wf-media-kind="image"], [data-wf-mail-cid])[data-wf-indent]:not([data-wf-media-wrap])[data-wf-media-align="right"] {
    margin-inline-start: auto !important;
    margin-inline-end: 0 !important;
  }

  .wf-rich-map__stage {
    max-height: 65vh;
  }
}

/* Después de las reglas móviles y de cada tipo: el centro compartido nunca
   flota ni pierde su porcentaje. Si no cabe, baja a la línea siguiente. */
.wf-rich-content :is(figure[data-wf-media-wrap="center"], table[data-wf-table-wrap="center"], details[data-wf-disclosure-wrap="center"], [data-wf-sections-wrap="center"]) {
  display: inline-block !important;
  vertical-align: top;
  float: none;
  clear: none;
  max-width: calc(100% - 1rem);
  margin: .5rem .5rem 1rem !important;
  text-align: start;
}
.wf-rich-content table[data-wf-table-wrap="center"] { display: inline-table !important; }
.wf-rich-content .wf-sections[data-wf-sections-wrap="center"] { display: inline-grid !important; }
