.rsam-external-card {
    width: 100%;
    margin: 0 0 32px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.rsam-external-label {
    display: inline-flex;
    margin: 22px 24px 0;
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(204, 34, 34, 0.10);
    color: var(--theme-palette-color-1, #cc2222);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.rsam-external-image {
    margin: 18px 24px 0;
    overflow: hidden;
    border-radius: 12px;
}

.rsam-external-image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.rsam-external-body {
    padding: 22px 24px 26px;
}

.rsam-external-content {
    font-size: 17px;
    line-height: 1.7;
}

.rsam-external-content > :first-child {
    margin-top: 0;
}

.rsam-external-content p,
.rsam-external-content ul,
.rsam-external-content ol,
.rsam-external-content blockquote {
    font-size: inherit;
    line-height: inherit;
    margin-bottom: 1.2em;
}

.rsam-external-content h2,
.rsam-external-content h3,
.rsam-external-content h4 {
    margin-top: 1.5em;
    margin-bottom: .6em;
    line-height: 1.3;
}

.rsam-external-content h2 { font-size: 22px; }
.rsam-external-content h3 { font-size: 20px; }
.rsam-external-content h4 { font-size: 18px; }

.rsam-external-content img {
    max-width: 100%;
    height: auto;
}

.rsam-external-summary {
    margin: 0;
    color: inherit;
    font-size: 17px;
    line-height: 1.7;
}

.rsam-external-attribution {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(15, 23, 42, 0.10);
}

.rsam-external-source {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    opacity: .82;
}

.rsam-external-source span {
    font-weight: 700;
}

.rsam-external-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 11px 18px;
    border-radius: 8px;
    background: var(--theme-palette-color-1, #cc2222);
    color: #fff !important;
    font-weight: 700;
    text-decoration: none !important;
    transition: transform .2s ease, opacity .2s ease;
}

.rsam-external-button:hover {
    color: #fff !important;
    opacity: .92;
    transform: translateY(-1px);
}

/* El título principal lo maneja Blocksy. */
.single-rsam_noticia .entry-meta {
    display: none;
}

@media (max-width: 689px) {
    .rsam-external-card {
        border-radius: 12px;
    }

    .rsam-external-label {
        margin: 18px 18px 0;
    }

    .rsam-external-image {
        margin: 14px 18px 0;
        border-radius: 10px;
    }

    .rsam-external-body {
        padding: 18px;
    }

    .rsam-external-content,
    .rsam-external-summary {
        font-size: 16px;
        line-height: 1.7;
    }

    .rsam-external-content h2 { font-size: 21px; }
    .rsam-external-content h3 { font-size: 19px; }
    .rsam-external-content h4 { font-size: 17px; }

    .rsam-external-button {
        width: 100%;
        justify-content: center;
    }
}


/* v0.1.8 — Colaboradores / Home / Continuar leyendo */
.rsam-related {
    margin-top: 42px;
    padding-top: 32px;
    border-top: 1px solid rgba(15,23,42,.16);
}
.rsam-related > h2 {
    margin: 0 0 24px;
    font-size: 30px;
    line-height: 1.2;
}
.rsam-related-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 28px;
}
.rsam-related-image {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 16/9;
    background: #f1f3f5;
}
.rsam-related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.rsam-related-item h3 {
    margin: 10px 0 6px;
    font-size: 18px;
    line-height: 1.35;
}
.rsam-related-item h3 a { color: inherit; text-decoration: none; }
.rsam-related-date { font-size: 14px; opacity: .7; }

.rsam-home-collaborators {
    width: 100%;
    border-top: 6px solid var(--theme-palette-color-1,#e60012);
    padding-top: 28px;
}
.rsam-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
}
.rsam-section-head h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: .08em;
    color: var(--theme-palette-color-1,#e60012);
}
.rsam-section-head h2:before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 26px;
    margin-right: 14px;
    border-radius: 3px;
    background: var(--theme-palette-color-1,#e60012);
    vertical-align: -5px;
}
.rsam-section-head > a {
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}
.rsam-collaborator-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin: 0 0 22px;
    font-size: 13px;
}
.rsam-collaborator-strip > span:first-child { opacity: .72; }
.rsam-collaborator-brand {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    text-decoration: none;
    color: inherit;
    font-weight: 700;
}
.rsam-collaborator-brand img {
    display: block;
    width: auto;
    max-width: 125px;
    height: 38px;
    object-fit: contain;
}
.rsam-home-news {
    display: grid;
    grid-template-columns: minmax(0,1.05fr) minmax(0,1fr);
    gap: 30px;
}
.rsam-home-featured-image {
    display: block;
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 16/9;
    background: #f1f3f5;
}
.rsam-home-featured-image img,
.rsam-home-secondary-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.rsam-home-featured h3 {
    margin: 16px 0 8px;
    font-size: 22px;
    line-height: 1.25;
}
.rsam-home-featured h3 a,
.rsam-home-secondary-item h3 a {
    color: inherit;
    text-decoration: none;
}
.rsam-home-featured p {
    margin: 10px 0 0;
    font-size: 16px;
    line-height: 1.55;
    opacity: .78;
}
.rsam-home-date {
    font-size: 14px;
    opacity: .68;
}
.rsam-home-secondary {
    display: flex;
    flex-direction: column;
}
.rsam-home-secondary-item {
    display: grid;
    grid-template-columns: 104px minmax(0,1fr);
    gap: 18px;
    padding: 0 0 16px;
    margin: 0 0 16px;
    border-bottom: 1px solid rgba(15,23,42,.10);
}
.rsam-home-secondary-item:last-child { margin-bottom: 0; }
.rsam-home-secondary-image {
    display: block;
    overflow: hidden;
    border-radius: 5px;
    aspect-ratio: 4/3;
    background: #f1f3f5;
}
.rsam-home-secondary-item h3 {
    margin: 4px 0 8px;
    font-size: 17px;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .rsam-related-grid { grid-template-columns: 1fr; gap: 24px; }
    .rsam-section-head { align-items: flex-start; }
    .rsam-home-news { grid-template-columns: 1fr; }
    .rsam-home-secondary-item { grid-template-columns: 110px minmax(0,1fr); }
}
@media (max-width: 480px) {
    .rsam-section-head { display: block; }
    .rsam-section-head > a { display: inline-block; margin-top: 10px; }
    .rsam-collaborator-strip { align-items: flex-start; }
    .rsam-home-secondary-item { grid-template-columns: 92px minmax(0,1fr); gap: 12px; }
}


/* v0.1.9 — Ajustes visuales del bloque COLABORADORES */
.rsam-home-collaborators {
    background: #fff;
    padding: 24px;
    border-top: 6px solid var(--theme-palette-color-1, #e60012);
}
.rsam-section-head { margin-bottom: 16px; }
.rsam-section-head h2 { font-size: 16px; font-weight: 700; line-height: 1.25; }
.rsam-section-head h2:before { width: 4px; height: 20px; margin-right: 10px; vertical-align: -4px; }
.rsam-section-head > a { font-size: 13px; font-weight: 700; color: var(--theme-palette-color-1, #e60012); }
.rsam-section-head > a:hover { color: var(--theme-palette-color-1, #e60012); text-decoration: underline; }
.rsam-collaborator-strip { margin-bottom: 24px; }
.rsam-collaborator-brand img { width: auto; max-width: 180px; height: 64px; object-fit: contain; }
.rsam-home-featured h3 a, .rsam-home-secondary-item h3 a { color: var(--theme-palette-color-1, #e60012); }
.rsam-home-featured h3 a:hover, .rsam-home-secondary-item h3 a:hover { color: var(--theme-palette-color-1, #e60012); text-decoration: underline; }
.rsam-home-news { padding: 0; }

@media (max-width: 768px) {
    .rsam-home-collaborators { padding: 20px; }
    .rsam-collaborator-brand img { max-width: 160px; height: 58px; }
}
@media (max-width: 480px) {
    .rsam-home-collaborators { padding: 18px; }
    .rsam-section-head h2 { font-size: 16px; }
    .rsam-collaborator-brand img { max-width: 145px; height: 54px; }
}


/* v0.2.0 — Correcciones de enlaces y hover */
.rsam-home-featured h3 a:hover,
.rsam-home-secondary-item h3 a:hover,
.rsam-section-head > a:hover {
    text-decoration: none !important;
}


/* v0.2.1 — Hover del bloque Colaboradores */
.rsam-home-featured-image img {
    transition: transform .35s ease;
}
.rsam-home-featured-image:hover img {
    transform: scale(1.045);
}
.rsam-home-secondary-item {
    transition: transform .25s ease;
}
.rsam-home-secondary-item:hover {
    transform: translateX(6px);
}
.rsam-home-secondary-image img {
    transition: none;
}


/* v0.3.0 — Portadas de diarios */
.rsam-covers-block,
.rsam-cover-archive-inner {
    background: #fff;
}
.rsam-covers-block {
    padding: 24px;
    border-top: 6px solid var(--theme-palette-color-1, #e60012);
}
.rsam-covers-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}
.rsam-covers-head h1,
.rsam-covers-head h2 {
    margin: 0;
    color: var(--theme-palette-color-1, #e60012);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: .03em;
}
.rsam-covers-head h1:before,
.rsam-covers-head h2:before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 20px;
    margin-right: 10px;
    border-radius: 3px;
    background: var(--theme-palette-color-1, #e60012);
    vertical-align: -4px;
}
.rsam-covers-head a {
    color: var(--theme-palette-color-1, #e60012);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}
.rsam-cover-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}
.rsam-cover-filters button,
.rsam-cover-archive-filters button {
    border: 1px solid rgba(15,23,42,.14);
    border-radius: 999px;
    background: #fff;
    color: #111827;
    padding: 8px 15px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.rsam-cover-filters button.is-active,
.rsam-cover-filters button:hover,
.rsam-cover-archive-filters button {
    background: var(--theme-palette-color-1, #e60012);
    border-color: var(--theme-palette-color-1, #e60012);
    color: #fff;
}
.rsam-cover-slider-wrap {
    position: relative;
}
.rsam-cover-slider {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(190px, 22%);
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 2px;
}
.rsam-cover-slider::-webkit-scrollbar { display: none; }
.rsam-cover-card {
    min-width: 0;
    scroll-snap-align: start;
}
.rsam-cover-card[hidden] { display: none !important; }
.rsam-cover-open {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}
.rsam-cover-open:disabled { cursor: default; }
.rsam-cover-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 8px;
    background: #f3f4f6;
}
.rsam-cover-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}
.rsam-cover-open:hover .rsam-cover-visual img { transform: scale(1.025); }
.rsam-cover-placeholder {
    color: #9ca3af;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: .08em;
}
.rsam-cover-name {
    display: block;
    margin-top: 10px;
    color: var(--theme-palette-color-1, #e60012);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}
.rsam-cover-date {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    opacity: .65;
}
.rsam-cover-nav {
    position: absolute;
    top: 42%;
    z-index: 2;
    width: 38px;
    height: 38px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    background: rgba(15,23,42,.88);
    color: #fff;
    font-size: 27px;
    line-height: 1;
    cursor: pointer;
}
.rsam-cover-prev { left: -15px; }
.rsam-cover-next { right: -15px; }

.rsam-cover-modal {
    width: min(1180px, 95vw);
    max-width: none;
    max-height: 94vh;
    padding: 0;
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}
.rsam-cover-modal::backdrop { background: rgba(0,0,0,.78); }
.rsam-cover-modal-shell {
    display: flex;
    flex-direction: column;
    max-height: 94vh;
}
.rsam-cover-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(15,23,42,.10);
}
.rsam-cover-close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: #f3f4f6;
    color: #111827;
    font-size: 26px;
    cursor: pointer;
}
.rsam-cover-modal-view {
    flex: 1 1 auto;
    overflow: auto;
    min-height: 300px;
    padding: 18px;
    background: #e5e7eb;
    text-align: center;
}
#rsam-cover-modal-image {
    display: block;
    max-width: 100%;
    max-height: 78vh;
    margin: 0 auto;
    object-fit: contain;
}
#rsam-cover-pdf-canvas {
    display: block;
    max-width: 100%;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 6px 24px rgba(0,0,0,.15);
}
.rsam-cover-pdf-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid rgba(15,23,42,.10);
}
.rsam-cover-pdf-controls button {
    border: 1px solid rgba(15,23,42,.15);
    border-radius: 7px;
    background: #fff;
    padding: 7px 11px;
    font-weight: 700;
    cursor: pointer;
}

.rsam-cover-archive {
    padding: 42px 20px 60px;
}
.rsam-cover-archive-inner {
    width: min(1200px, 100%);
    margin: 0 auto;
}
.rsam-cover-archive-filters {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 14px;
    margin: 22px 0 28px;
    padding: 18px;
    border: 1px solid rgba(15,23,42,.10);
    border-radius: 10px;
}
.rsam-cover-archive-filters label {
    display: grid;
    gap: 5px;
    font-size: 13px;
    font-weight: 700;
}
.rsam-cover-archive-filters input,
.rsam-cover-archive-filters select {
    min-height: 40px;
    padding: 6px 10px;
    border: 1px solid rgba(15,23,42,.18);
    border-radius: 7px;
    background: #fff;
}
.rsam-cover-archive-filters a {
    padding: 9px 4px;
    font-size: 13px;
    text-decoration: none;
}
.rsam-cover-archive-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 26px 20px;
}
.rsam-cover-pagination ul {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 34px 0 0;
    padding: 0;
    list-style: none;
}
.rsam-cover-pagination a,
.rsam-cover-pagination span {
    display: inline-flex;
    min-width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(15,23,42,.12);
    border-radius: 7px;
    text-decoration: none;
}

@media (max-width: 900px) {
    .rsam-cover-slider { grid-auto-columns: minmax(180px, 31%); }
    .rsam-cover-archive-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 689px) {
    .rsam-covers-block { padding: 18px; }
    .rsam-covers-head { align-items: flex-start; }
    .rsam-cover-slider { grid-auto-columns: 68%; }
    .rsam-cover-nav { display: none; }
    .rsam-cover-archive { padding: 28px 16px 44px; }
    .rsam-cover-archive-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px 14px; }
    .rsam-cover-modal { width: 98vw; max-height: 96vh; }
}
@media (max-width: 420px) {
    .rsam-covers-head { display: block; }
    .rsam-covers-head a { display: inline-block; margin-top: 8px; }
    .rsam-cover-slider { grid-auto-columns: 78%; }
    .rsam-cover-archive-grid { grid-template-columns: 1fr 1fr; }
}


/* v0.3.3 — visor robusto y zoom de imagen */
#rsam-cover-image-wrap {
    display: inline-block;
    min-width: min(100%, 320px);
    max-width: none;
}
#rsam-cover-modal-image {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0 auto;
    transform-origin: top center;
}
#rsam-cover-pdf-wrap {
    width: 100%;
    height: min(76vh, 900px);
}
#rsam-cover-pdf-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #e5e7eb;
}
.rsam-cover-image-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid rgba(15,23,42,.10);
}
.rsam-cover-image-controls button {
    border: 1px solid rgba(15,23,42,.15);
    border-radius: 7px;
    background: #fff;
    padding: 7px 12px;
    font-weight: 700;
    cursor: pointer;
}
#rsam-cover-image-zoom {
    min-width: 52px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}
@media (max-width: 689px) {
    #rsam-cover-pdf-wrap {
        height: 78vh;
    }
}


/* v0.3.4 — Filtros más visibles y zoom real de imagen */
.rsam-cover-archive-filters {
    align-items: center;
}
.rsam-cover-type-buttons {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}
.rsam-cover-type-buttons button {
    border: 1px solid rgba(15,23,42,.16);
    border-radius: 999px;
    background: #fff;
    color: #111827;
    padding: 8px 15px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.rsam-cover-type-buttons button.is-active,
.rsam-cover-type-buttons button:hover {
    border-color: var(--theme-palette-color-1, #e60012);
    background: var(--theme-palette-color-1, #e60012);
    color: #fff;
}
.rsam-cover-date-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}
.rsam-cover-date-filter span {
    font-size: 13px;
    font-weight: 700;
}
.rsam-cover-filter-submit {
    border-radius: 8px !important;
}
.rsam-cover-clear-filter {
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

#rsam-cover-image-wrap {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    height: min(76vh, 900px);
    overflow: auto;
    padding: 14px;
    box-sizing: border-box;
}
#rsam-cover-modal-image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    transition: transform .16s ease;
    transform-origin: top center;
    will-change: transform;
}
.rsam-cover-modal-view {
    overflow: hidden;
}
.rsam-cover-image-controls {
    position: sticky;
    bottom: 0;
    background: #fff;
    z-index: 2;
}

@media (max-width: 689px) {
    .rsam-cover-archive-filters {
        align-items: stretch;
    }
    .rsam-cover-date-filter {
        width: 100%;
        justify-content: space-between;
    }
}


/* v0.3.5 — Corrección de cambio Imagen/PDF dentro del modal */
#rsam-cover-image-wrap[hidden],
#rsam-cover-pdf-wrap[hidden],
#rsam-cover-modal-image[hidden],
#rsam-cover-loading[hidden],
.rsam-cover-image-controls[hidden] {
    display: none !important;
}

#rsam-cover-pdf-wrap:not([hidden]) {
    display: block !important;
    width: 100%;
    height: min(76vh, 900px);
}

#rsam-cover-image-wrap:not([hidden]) {
    display: flex !important;
}

#rsam-cover-pdf-frame {
    display: block !important;
    width: 100%;
    min-height: 70vh;
    height: 100%;
}


/* v0.3.6 — Distribución visual del slider de Portadas */
.rsam-cover-slider {
    grid-auto-columns: calc((100% - 54px) / 4);
    gap: 18px;
}

@media (max-width: 900px) {
    .rsam-cover-slider {
        grid-auto-columns: calc((100% - 36px) / 3);
    }
}

@media (max-width: 689px) {
    .rsam-cover-slider {
        grid-auto-columns: calc((100% - 14px) / 2);
        gap: 14px;
    }
}
