/* =========================================================
   AEMIPA - GESTOR DE NOTICIAS 1.2.5
   Todo el CSS necesario va dentro del plugin.
   ========================================================= */

:root {
    --aemipa-blue-dark: #061a33;
    --aemipa-blue: #0b3d75;
    --aemipa-blue-light: #008bd2;
    --aemipa-blue-soft: #e8f5fc;
    --aemipa-grey: #f3f7fb;
    --aemipa-text: #1f2937;
    --aemipa-muted: #5f6b7a;
    --aemipa-white: #ffffff;
    --aemipa-border: rgba(6,26,51,.10);
}

.aemipa-news-page,
.aemipa-news-home,
.aemipa-news-single {
    box-sizing: border-box;
    width: 100%;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--aemipa-text);
}

.aemipa-news-page *,
.aemipa-news-home *,
.aemipa-news-single * {
    box-sizing: border-box;
}

.aemipa-news-page .aemipa-container,
.aemipa-news-home .aemipa-container,
.aemipa-news-single .aemipa-container {
    width: min(90%, 1180px);
    margin-left: auto;
    margin-right: auto;
}

.aemipa-news-page .aemipa-section,
.aemipa-news-home.aemipa-section {
    padding: 76px 0;
}

.aemipa-news-page .aemipa-light {
    background: var(--aemipa-grey);
}

.aemipa-news-home {
    background: #ffffff;
}

.aemipa-news-home .aemipa-section-title {
    max-width: 850px;
    margin-bottom: 36px;
}

.aemipa-news-home .aemipa-section-title > span {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--aemipa-blue-light);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: .8px;
    text-transform: uppercase;
}

.aemipa-news-home .aemipa-section-title h2 {
    margin: 0 !important;
    color: var(--aemipa-blue-dark) !important;
    font-size: clamp(31px, 4vw, 46px) !important;
    line-height: 1.13 !important;
}

.aemipa-news-intro {
    max-width: 900px;
    margin: -16px 0 34px;
}

.aemipa-news-intro p {
    margin: 0;
    color: var(--aemipa-muted);
    font-size: 18px;
}

.aemipa-news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
}

.aemipa-news-card {
    min-width: 0;
    background: #fff;
    border: 1px solid var(--aemipa-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(6,26,51,.09);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.aemipa-news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 42px rgba(6,26,51,.14);
    border-color: rgba(0,139,210,.28);
}

.aemipa-news-card[hidden] {
    display: none !important;
}

.aemipa-news-image-link {
    display: block;
    text-decoration: none !important;
}

.aemipa-news-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 230px;
    overflow: hidden;
    background: #eef5fb;
}

.aemipa-news-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.aemipa-news-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top right, rgba(0,139,210,.22), transparent 38%),
        linear-gradient(135deg, #061a33, #0b3d75);
}

.aemipa-news-image-placeholder span {
    color: #fff;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: .04em;
}

.aemipa-news-body {
    padding: 22px;
}

.aemipa-news-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.aemipa-news-category {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--aemipa-blue-soft);
    color: var(--aemipa-blue);
    font-size: 12px;
    line-height: 1;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .35px;
}

.aemipa-news-date {
    color: var(--aemipa-muted);
    font-size: 13px;
    font-weight: 700;
}

.aemipa-news-card h3 {
    margin: 0 0 12px !important;
    color: var(--aemipa-blue-dark) !important;
    font-size: 21px !important;
    line-height: 1.28 !important;
}

.aemipa-news-card h3 a {
    color: inherit !important;
    text-decoration: none !important;
}

.aemipa-news-card h3 a:hover {
    color: var(--aemipa-blue-light) !important;
}

.aemipa-news-summary {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
    margin: 0;
    color: var(--aemipa-muted);
    font-size: 15px;
    line-height: 1.6;
}

.aemipa-news-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 18px;
}

.aemipa-news-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 15px;
    border-radius: 9px;
    background: var(--aemipa-blue-light);
    color: #fff !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 800;
}

.aemipa-news-btn:hover {
    background: #00a3f5;
}

.aemipa-news-source-link {
    color: var(--aemipa-blue) !important;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none !important;
}

.aemipa-news-source-link:hover {
    text-decoration: underline !important;
}

.aemipa-news-all {
    text-align: center;
    margin-top: 34px;
}

.aemipa-news-all .aemipa-btn {
    display: inline-flex;
    padding: 13px 22px;
    border: 2px solid var(--aemipa-blue);
    border-radius: 10px;
    color: var(--aemipa-blue) !important;
    text-decoration: none !important;
    font-weight: 800;
}

.aemipa-news-all .aemipa-btn:hover {
    background: var(--aemipa-blue);
    color: #fff !important;
}

/* =========================================================
   LISTADO DE NOTICIAS
   ========================================================= */

.aemipa-news-page {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
}

.aemipa-news-page-hero {
    background:
        radial-gradient(circle at top right, rgba(0,139,210,.32), transparent 35%),
        linear-gradient(135deg, #061a33 0%, #0b3d75 58%, #06284f 100%);
    padding: 78px 0 68px;
    color: #fff;
}

.aemipa-news-page-hero span {
    display: inline-block;
    margin-bottom: 12px;
    color: #8ed8ff;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .8px;
}

.aemipa-news-page-hero h1 {
    max-width: 820px;
    margin: 0 0 16px !important;
    color: #fff !important;
    font-size: clamp(40px, 6vw, 68px) !important;
    line-height: 1.02 !important;
}

.aemipa-news-page-hero p {
    max-width: 800px;
    margin: 0;
    color: #e9f5ff;
    font-size: 18px;
}

.aemipa-news-tools {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(240px,.55fr) auto;
    gap: 16px;
    align-items: end;
    padding: 20px;
    margin-bottom: 16px;
    background: #fff;
    border: 1px solid var(--aemipa-border);
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(6,26,51,.07);
}

.aemipa-news-tool {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.aemipa-news-tool label {
    color: var(--aemipa-blue-dark);
    font-size: 14px;
    font-weight: 800;
}

.aemipa-news-tool input,
.aemipa-news-tool select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(6,26,51,.18);
    border-radius: 10px;
    background: #fff;
    color: var(--aemipa-text);
    font-size: 16px;
}

.aemipa-news-tool input:focus,
.aemipa-news-tool select:focus {
    outline: none;
    border-color: var(--aemipa-blue-light);
    box-shadow: 0 0 0 3px rgba(0,139,210,.14);
}

.aemipa-news-reset {
    min-height: 48px;
    padding: 0 20px;
    border: 0;
    border-radius: 10px;
    background: var(--aemipa-blue);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}

.aemipa-news-reset:hover {
    background: var(--aemipa-blue-light);
}

.aemipa-news-count {
    margin: 6px 0 22px;
    color: var(--aemipa-muted);
    font-size: 15px;
    font-weight: 700;
}

.aemipa-news-empty {
    padding: 30px;
    border: 2px dashed rgba(11,61,117,.22);
    border-radius: 18px;
    background: #fff;
    color: var(--aemipa-muted);
    text-align: center;
    font-weight: 700;
}

/* Evitar que plantillas de WordPress estrechen o estiren el shortcode */
body .wp-block-post-content > .aemipa-news-page,
body .entry-content > .aemipa-news-page,
body main .aemipa-news-page {
    width: 100% !important;
    max-width: none !important;
}

/* =========================================================
   INTERIOR DE NOTICIA — DISEÑO COMPACTO
   ========================================================= */

.aemipa-news-single {
    min-height: 100vh;
    background: #f5f8fb;
}

.aemipa-news-single-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(255,255,255,.98);
    border-bottom: 1px solid var(--aemipa-border);
    backdrop-filter: blur(10px);
}

.aemipa-news-single-header-inner {
    width: min(94%, 1220px);
    min-height: 82px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.aemipa-news-single-logo {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.aemipa-news-single-logo img {
    width: 88px;
    max-height: 62px;
    object-fit: contain;
    display: block;
}

.aemipa-news-single-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.aemipa-news-single-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 11px;
    border-radius: 999px;
    color: var(--aemipa-blue-dark) !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 800;
}

.aemipa-news-single-nav a:hover {
    color: var(--aemipa-blue-light) !important;
}

.aemipa-news-single-nav .is-primary {
    padding-left: 16px;
    padding-right: 16px;
    background: var(--aemipa-blue);
    color: #fff !important;
}

.aemipa-news-single-main {
    width: min(92%, 960px);
    margin: 0 auto;
    padding: 54px 0 76px;
}

.aemipa-news-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
    margin-bottom: 22px;
    color: var(--aemipa-muted);
    font-size: 13px;
    font-weight: 700;
}

.aemipa-news-breadcrumb a {
    color: var(--aemipa-blue) !important;
    text-decoration: none !important;
}

.aemipa-news-article {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--aemipa-border);
    border-radius: 26px;
    box-shadow: 0 20px 52px rgba(6,26,51,.11);
}

.aemipa-news-article-head {
    padding: 44px 48px 32px;
}

.aemipa-news-article-meta {
    display: flex;
    gap: 10px 14px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 17px;
}

.aemipa-news-article-category {
    display: inline-flex;
    padding: 7px 11px;
    border-radius: 999px;
    background: var(--aemipa-blue-soft);
    color: var(--aemipa-blue);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .45px;
}

.aemipa-news-article-date {
    color: var(--aemipa-muted);
    font-size: 14px;
    font-weight: 700;
}

.aemipa-news-article h1 {
    max-width: 820px;
    margin: 0 0 20px !important;
    color: var(--aemipa-blue-dark) !important;
    font-size: clamp(34px, 5.2vw, 56px) !important;
    line-height: 1.07 !important;
    letter-spacing: -1.1px;
}

.aemipa-news-article-lead {
    max-width: 780px;
    margin: 0;
    color: var(--aemipa-muted);
    font-size: 19px;
    line-height: 1.65;
}

.aemipa-news-article-image {
    width: 100%;
    max-height: 520px;
    aspect-ratio: 16 / 9;
    background: #eef4f8;
    overflow: hidden;
}

.aemipa-news-article-image img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 520px;
    object-fit: cover;
}

.aemipa-news-article-content {
    width: min(100% - 64px, 760px);
    margin: 0 auto;
    padding: 42px 0 24px;
    color: var(--aemipa-text);
    font-size: 17px;
    line-height: 1.78;
}

.aemipa-news-article-content > *:first-child {
    margin-top: 0;
}

.aemipa-news-article-content h2 {
    margin: 34px 0 14px !important;
    color: var(--aemipa-blue-dark) !important;
    font-size: 28px !important;
    line-height: 1.2 !important;
}

.aemipa-news-article-content h3 {
    margin: 28px 0 12px !important;
    color: var(--aemipa-blue-dark) !important;
    font-size: 23px !important;
}

.aemipa-news-article-content p {
    margin: 0 0 21px;
}

.aemipa-news-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
}

.aemipa-news-article-source {
    width: min(100% - 64px, 760px);
    margin: 8px auto 44px;
    padding: 20px 22px;
    border: 1px solid rgba(0,139,210,.20);
    border-left: 5px solid var(--aemipa-blue-light);
    border-radius: 14px;
    background: #f4fbff;
}

.aemipa-news-article-source strong {
    display: block;
    margin-bottom: 5px;
    color: var(--aemipa-blue-dark);
}

.aemipa-news-article-source a {
    color: var(--aemipa-blue) !important;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.aemipa-news-back {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 26px;
}

.aemipa-news-back a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 17px;
    border-radius: 10px;
    color: var(--aemipa-blue) !important;
    border: 2px solid var(--aemipa-blue);
    background: #fff;
    text-decoration: none !important;
    font-weight: 800;
}

.aemipa-news-back a:hover {
    background: var(--aemipa-blue);
    color: #fff !important;
}

.aemipa-news-single-footer {
    padding: 28px 0;
    background: var(--aemipa-blue-dark);
    color: #dce8f4;
    text-align: center;
    font-size: 14px;
}

.aemipa-news-single-footer a {
    color: #fff !important;
    font-weight: 800;
    text-decoration: none !important;
}

@media (max-width: 1050px) {
    .aemipa-news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .aemipa-news-tools {
        grid-template-columns: 1fr 1fr;
    }

    .aemipa-news-reset {
        grid-column: 1/-1;
    }
}

@media (max-width: 760px) {
    .aemipa-news-single-header-inner {
        min-height: 72px;
        gap: 12px;
    }

    .aemipa-news-single-logo img {
        width: 76px;
    }

    .aemipa-news-single-nav a:not(.is-primary) {
        display: none;
    }

    .aemipa-news-single-main {
        width: min(94%, 960px);
        padding: 32px 0 54px;
    }

    .aemipa-news-article-head {
        padding: 30px 24px 24px;
    }

    .aemipa-news-article h1 {
        font-size: clamp(31px, 9vw, 44px) !important;
    }

    .aemipa-news-article-lead {
        font-size: 17px;
    }

    .aemipa-news-article-content,
    .aemipa-news-article-source {
        width: calc(100% - 48px);
    }

    .aemipa-news-article-content {
        padding-top: 30px;
    }

    .aemipa-news-article-image {
        max-height: 380px;
    }
}

@media (max-width: 680px) {
    .aemipa-news-grid {
        grid-template-columns: 1fr;
    }

    .aemipa-news-tools {
        grid-template-columns: 1fr;
    }

    .aemipa-news-reset {
        grid-column: auto;
        width: 100%;
    }

    .aemipa-news-body {
        padding: 20px;
    }

    .aemipa-news-page-hero {
        padding: 62px 0 54px;
    }

    .aemipa-news-page .aemipa-section,
    .aemipa-news-home.aemipa-section {
        padding: 58px 0;
    }
}


/* =========================================================
   V1.2 - INTERIOR ESTABLE DENTRO DE /noticias-aemipa/
   ========================================================= */

.aemipa-news-inline-single {
    background: #f4f7fa;
}

.aemipa-news-inline-top {
    padding: 22px 0 0;
}

.aemipa-news-inline-back {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 9px;
    background: #ffffff;
    border: 1px solid rgba(6,26,51,.12);
    color: var(--aemipa-blue, #0b3d75) !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 800;
}

.aemipa-news-inline-back:hover {
    border-color: rgba(0,139,210,.35);
    color: var(--aemipa-blue-light, #008bd2) !important;
}

.aemipa-news-inline-wrap {
    padding: 24px 0 72px;
}

.aemipa-news-inline-single .aemipa-container {
    width: min(92%, 1020px);
}

.aemipa-news-inline-single .aemipa-news-article {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
}

.aemipa-news-inline-single .aemipa-news-back {
    width: 100%;
    max-width: 920px;
    margin: 24px auto 0;
}

@media (max-width: 680px) {
    .aemipa-news-inline-top {
        padding-top: 16px;
    }

    .aemipa-news-inline-wrap {
        padding-top: 18px;
        padding-bottom: 52px;
    }
}


/* =========================================================
   V1.2.2 - CORRECCIÓN DE IMÁGENES Y MÁRGENES LATERALES
   ========================================================= */

/* Evita que cualquier contenido interno fuerce el ancho del artículo */
.aemipa-news-article,
.aemipa-news-article-head,
.aemipa-news-article-image,
.aemipa-news-article-content,
.aemipa-news-article-source {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Imagen principal: siempre contenida dentro de la tarjeta */
.aemipa-news-article-image {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.aemipa-news-article-image img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    margin: 0 !important;
}

/* Imágenes insertadas dentro del contenido */
.aemipa-news-article-content img {
    display: block !important;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Figuras de WordPress / Gutenberg */
.aemipa-news-article-content figure,
.aemipa-news-article-content .wp-block-image,
.aemipa-news-article-content .wp-block-gallery,
.aemipa-news-article-content .wp-block-media-text,
.aemipa-news-article-content .wp-block-embed {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}

/* WordPress puede aplicar 100vw y márgenes negativos a alignfull / alignwide */
.aemipa-news-article-content .alignfull,
.aemipa-news-article-content .alignwide {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: none !important;
}

/* Vídeos, iframes y otros medios también quedan contenidos */
.aemipa-news-article-content iframe,
.aemipa-news-article-content video,
.aemipa-news-article-content embed,
.aemipa-news-article-content object {
    max-width: 100% !important;
}

/* Tablas largas: scroll interno en vez de romper la página */
.aemipa-news-article-content table {
    max-width: 100% !important;
}

.aemipa-news-article-content .wp-block-table {
    max-width: 100% !important;
    overflow-x: auto !important;
}

/* Ajuste extra en móvil */
@media (max-width: 680px) {
    .aemipa-news-inline-single .aemipa-container {
        width: calc(100% - 28px) !important;
        max-width: 100% !important;
    }

    .aemipa-news-article-content,
    .aemipa-news-article-source {
        width: calc(100% - 36px) !important;
        max-width: calc(100% - 36px) !important;
    }

    .aemipa-news-article-head {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}


/* =========================================================
   V1.2.4 - IDENTIDAD AEMIPA EN NOTICIA INDIVIDUAL
   Se añade solo la marca. No modifica la rejilla ni el artículo.
   ========================================================= */

.aemipa-news-inline-brand {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid rgba(6,26,51,.10);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(6,26,51,.07);
}

.aemipa-news-inline-logo {
    flex: 0 0 82px;
    width: 82px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
}

.aemipa-news-inline-logo img {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 82px !important;
    max-height: 60px !important;
    object-fit: contain !important;
    margin: 0 !important;
}

.aemipa-news-inline-brand-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.aemipa-news-inline-brand-copy span {
    color: var(--aemipa-blue-light, #008bd2);
    font-size: 11px;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.aemipa-news-inline-brand-copy strong {
    color: var(--aemipa-blue-dark, #061a33);
    font-size: 22px;
    line-height: 1.15;
    font-weight: 900;
}

.aemipa-news-inline-brand .aemipa-news-inline-back {
    margin-left: auto;
    flex: 0 0 auto;
}

/* Mantener de forma explícita los límites de la noticia */
.aemipa-news-inline-single .aemipa-news-article {
    width: 100% !important;
    max-width: 920px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.aemipa-news-inline-single .aemipa-news-article-image,
.aemipa-news-inline-single .aemipa-news-article-image img {
    max-width: 100% !important;
}

@media (max-width: 680px) {

    .aemipa-news-inline-brand {
        gap: 11px;
        padding: 11px 12px;
        border-radius: 14px;
        flex-wrap: wrap;
    }

    .aemipa-news-inline-logo {
        flex-basis: 66px;
        width: 66px;
        height: 52px;
    }

    .aemipa-news-inline-logo img {
        max-width: 66px !important;
        max-height: 50px !important;
    }

    .aemipa-news-inline-brand-copy {
        flex: 1 1 calc(100% - 85px);
    }

    .aemipa-news-inline-brand-copy strong {
        font-size: 18px;
    }

    .aemipa-news-inline-brand .aemipa-news-inline-back {
        width: 100%;
        margin-left: 0;
        justify-content: center;
    }
}


/* =========================================================
   V1.2.5 - MAQUETACIÓN PROFESIONAL DE IMAGEN DE NOTICIA
   ========================================================= */

/*
 * La imagen principal deja de ocupar todo el ancho de la ficha.
 * Se comporta como parte del contenido editorial.
 */

.aemipa-news-inline-single .aemipa-news-article-image {
    width: min(calc(100% - 64px), 760px) !important;
    max-width: 760px !important;

    aspect-ratio: 16 / 9 !important;

    height: auto !important;
    max-height: 430px !important;

    margin: 8px auto 0 !important;

    border-radius: 18px !important;
    overflow: hidden !important;

    background: #eef4f8 !important;

    box-shadow: 0 10px 28px rgba(6, 26, 51, 0.10) !important;
}


/* Imagen principal */
.aemipa-news-inline-single .aemipa-news-article-image img {
    display: block !important;

    width: 100% !important;
    height: 100% !important;

    max-width: 100% !important;
    max-height: 430px !important;

    object-fit: cover !important;
    object-position: center center !important;

    margin: 0 !important;

    border-radius: 0 !important;
}


/*
 * El contenido de texto queda alineado visualmente
 * con la imagen principal.
 */
.aemipa-news-inline-single .aemipa-news-article-content {
    width: min(calc(100% - 64px), 760px) !important;
    max-width: 760px !important;

    margin-left: auto !important;
    margin-right: auto !important;
}


/* Fuente al mismo ancho editorial */
.aemipa-news-inline-single .aemipa-news-article-source {
    width: min(calc(100% - 64px), 760px) !important;
    max-width: 760px !important;

    margin-left: auto !important;
    margin-right: auto !important;
}


/*
 * Las imágenes pegadas dentro del texto
 * tampoco podrán desbordar el ancho editorial.
 */
.aemipa-news-inline-single .aemipa-news-article-content img {
    display: block !important;

    width: auto !important;
    max-width: 100% !important;

    height: auto !important;

    margin: 22px auto !important;

    border-radius: 14px !important;
}


/* Gutenberg: figuras y bloques de imagen */
.aemipa-news-inline-single .aemipa-news-article-content figure,
.aemipa-news-inline-single .aemipa-news-article-content .wp-block-image,
.aemipa-news-inline-single .aemipa-news-article-content .alignwide,
.aemipa-news-inline-single .aemipa-news-article-content .alignfull {
    width: 100% !important;
    max-width: 100% !important;

    margin-left: 0 !important;
    margin-right: 0 !important;
}


/* TABLET */
@media (max-width: 900px) {

    .aemipa-news-inline-single .aemipa-news-article-image,
    .aemipa-news-inline-single .aemipa-news-article-content,
    .aemipa-news-inline-single .aemipa-news-article-source {
        width: calc(100% - 48px) !important;
        max-width: calc(100% - 48px) !important;
    }

    .aemipa-news-inline-single .aemipa-news-article-image {
        max-height: 390px !important;
    }

}


/* MÓVIL */
@media (max-width: 680px) {

    .aemipa-news-inline-single .aemipa-news-article-image,
    .aemipa-news-inline-single .aemipa-news-article-content,
    .aemipa-news-inline-single .aemipa-news-article-source {
        width: calc(100% - 32px) !important;
        max-width: calc(100% - 32px) !important;
    }

    .aemipa-news-inline-single .aemipa-news-article-image {
        aspect-ratio: 16 / 10 !important;

        max-height: 300px !important;

        margin-top: 4px !important;

        border-radius: 14px !important;
    }

    .aemipa-news-inline-single .aemipa-news-article-image img {
        max-height: 300px !important;
    }

}

