/* Editor de texto enriquecido (avisos y artículos) y estilos del contenido publicado (.rich-content). */
.rte2 { border: 1px solid rgba(255,255,255,.3); border-radius: 10px; background: rgba(0,0,0,.25); overflow: hidden; }
.rte2:focus-within { box-shadow: 0 0 0 2px var(--primary-light); }
.rte2__bar { display: flex; flex-wrap: wrap; gap: 6px 10px; padding: 8px; border-bottom: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.07); position: sticky; top: 0; z-index: 2; }
.rte2__group { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.rte2__group + .rte2__group { padding-left: 10px; border-left: 1px solid rgba(255,255,255,.18); }
.rte2 .rte2__btn, .rte2 .rte2__block { min-width: 34px; min-height: 34px; padding: 3px 9px; margin: 0; border: 1px solid rgba(255,255,255,.28); border-radius: 8px; background: rgba(255,255,255,.1); color: #fff; font: inherit; font-size: .85rem; line-height: 1; cursor: pointer; width: auto; }
.rte2 .rte2__block { padding-right: 4px; }
.rte2 .rte2__block option { color: #111; background: #fff; }
.rte2 .rte2__btn:hover, .rte2 .rte2__btn:focus-visible, .rte2 .rte2__block:hover { background: rgba(255,255,255,.24); }
.rte2 .rte2__btn[aria-pressed=true], .rte2 .rte2__btn.is-on { background: var(--primary); color: #032500; border-color: transparent; }
.rte2 .rte2__btn mark { padding: 0 .25em; border-radius: 3px; }
.rte2__area { min-height: 220px; max-height: 70vh; overflow: auto; padding: 14px 16px; color: #fff; line-height: 1.6; outline: none; }
.rte2__area:empty::before { content: attr(data-placeholder); color: rgba(255,255,255,.5); pointer-events: none; }
.rte2 .rte2__source { display: block; width: 100%; min-height: 260px; max-height: 70vh; margin: 0; padding: 14px 16px; border: 0; border-radius: 0; background: rgba(0,0,0,.35); color: #c8ffb4; font: .85rem/1.5 ui-monospace, Menlo, Consolas, monospace; resize: vertical; box-sizing: border-box; }
.rte2 .rte2__source[hidden] { display: none; }
.rte2__foot { display: flex; justify-content: space-between; gap: 12px; padding: 5px 12px 8px; font-size: .78rem; color: #cfe0cb; }
.rte2__msg.is-error { color: #ff9b9b; font-weight: 700; }
.rte2__area img.is-selected, .rte2__area .rich-video.is-selected { outline: 3px solid var(--primary-light); }

/* Contenido publicado */
.rich-content { overflow-wrap: anywhere; }
.rich-content > :first-child { margin-top: 0; }
.rich-content p { margin: 0 0 1em; }
.rich-content h2 { margin: 1.4em 0 .5em; font-size: 1.6rem; line-height: 1.25; }
.rich-content h3 { margin: 1.3em 0 .5em; font-size: 1.3rem; line-height: 1.3; }
.rich-content h4 { margin: 1.2em 0 .4em; font-size: 1.1rem; line-height: 1.3; }
.rich-content ul, .rich-content ol { margin: 0 0 1em; padding-left: 1.5em; }
.rich-content ul { list-style: disc; } .rich-content ol { list-style: decimal; }
.rich-content li { margin: .25em 0; }
.rich-content blockquote { margin: 1em 0; padding: .6em 1em; border-left: 4px solid var(--primary); background: rgba(255,255,255,.08); border-radius: 0 8px 8px 0; font-style: italic; }
.rich-content a { color: var(--primary-light); text-decoration: underline; text-underline-offset: 2px; }
.rich-content mark { background: var(--primary); color: #032500; padding: 0 .25em; border-radius: 4px; }
.rich-content hr { border: 0; border-top: 1px solid rgba(255,255,255,.3); margin: 1.5em 0; }
.rich-content img { display: block; max-width: 100%; height: auto; margin: 1em auto; border-radius: 10px; }
.rich-content .rich-video { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 1em 0; border-radius: 10px; overflow: hidden; background: #000; }
.rich-content .rich-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.rich-content table { width: 100%; border-collapse: collapse; margin: 1em 0; }
.rich-content th, .rich-content td { padding: 6px 10px; border: 1px solid rgba(255,255,255,.25); text-align: left; }
.rich-content .ta-center { text-align: center; } .rich-content .ta-right { text-align: right; } .rich-content .ta-justify { text-align: justify; }
.rich-content--inline p { margin: 0 0 .5em; } .rich-content--inline > :last-child { margin-bottom: 0; }

/* Versión compacta (textos cortos de la portada) y mejoras de legibilidad */
.rte2 { border-color: rgba(255,255,255,.38); }
.rte2:focus-within { border-color: var(--primary-light); }
.rte2__bar { align-items: center; gap: 6px 8px; padding: 8px 10px; background: rgba(255,255,255,.1); }
.rte2__group + .rte2__group { padding-left: 8px; }
.rte2 .rte2__btn { color: #fff; font-size: .88rem; }
.rte2 .rte2__btn:disabled, .rte2 .rte2__block:disabled { opacity: .45; cursor: default; }
.rte2__foot { color: #dbe8d8; font-size: .82rem; }
.rte2__foot .is-over { color: #ff9b9b; font-weight: 700; }
.rte2--inline .rte2__area { min-height: 120px; max-height: 40vh; font-size: 1rem; }
.rte2--inline .rte2__bar { position: static; }
.rte2--inline .rte2__area p { margin: 0 0 .7em; }
.rte2--inline .rte2__area ul, .rte2--inline .rte2__area ol { margin: 0 0 .7em; padding-left: 1.4em; }
.rte2--inline .rte2__area ul { list-style: disc; } .rte2--inline .rte2__area ol { list-style: decimal; }
.rte2--inline .rte2__area a { color: var(--primary-light); text-decoration: underline; }
.rte2--inline .rte2__area mark { background: var(--primary); color: #032500; padding: 0 .25em; border-radius: 4px; }
@media (max-width: 600px) {
  .rte2__bar { gap: 6px; padding: 8px; }
  .rte2__group + .rte2__group { padding-left: 0; border-left: 0; }
  .rte2 .rte2__btn, .rte2 .rte2__block { min-height: 40px; min-width: 40px; }
}
.rte2--inline .rte2__group + .rte2__group { border-left: 0; padding-left: 0; }
.rte2--inline .rte2__bar { gap: 6px 14px; }
