.rcm-home-articles,
.rcm-home-articles * {
    box-sizing: border-box;
}

.rcm-home-articles {
    width: min(1263px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 902px) 331px;
    gap: 30px;
    font-family: "Inter", sans-serif;
}

.rcm-home-articles__content {
    width: 100%;
}

/* Same stack as .rcm-home-guides__header: title row → rule; spacing to cards on header. */
.rcm-home-articles__header {
    margin-bottom: var(--rcm-home-rail-gap-rule-content, 34px);
}

.rcm-home-articles__header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: var(--rcm-home-rail-gap-title-rule, 15px);
}

.rcm-home-articles__title {
    margin: 0;
    color: #183354;
    font-family: "Manrope", sans-serif;
    font-size: 25px;
    font-weight: 700;
    line-height: calc(32.582 / 25);
}

.rcm-home-articles__view-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 110px;
    height: 36px;
    border: 1px solid #cfcfcf;
    border-radius: 4px;
    color: #183354;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
}

.rcm-home-articles__view-all svg {
    width: 10px;
    height: 10px;
    display: block;
}

.rcm-home-articles__rule {
    position: relative;
    width: 100%;
    height: 5px;
    margin-bottom: var(--rcm-home-rail-gap-rule-content, 34px);
    border-top: 1px solid #dfdfdf;
    border-bottom: 1px solid #dfdfdf;
}

.rcm-home-articles__rule-accent {
    position: absolute;
    top: -1px;
    left: 0;
    width: 40px;
    height: 5px;
    background: var(--rcm-topic-color, #7153b0);
}

.rcm-home-articles__rule-notch {
    position: absolute;
    top: -1.5px;
    left: 36px;
    width: 10px;
    height: 6px;
    background: #ffffff;
    -webkit-mask-image: url('../../assets/images/notch-mask.svg');
    mask-image: url('../../assets/images/notch-mask.svg');
    -webkit-mask-size: 10px 6px;
    mask-size: 10px 6px;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: 0 0;
    mask-position: 0 0;
}

.rcm-home-articles__cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 39px;
    margin-bottom: 44px;
}

.rcm-home-articles__card {
    position: relative;
    min-width: 0;
    min-height: 0;
    container-type: inline-size;
}

.rcm-home-articles__card.has-divider::after {
    content: "";
    position: absolute;
    top: 0;
    right: -19.5px;
    width: 0.97px;
    height: 232.727px;
    height: calc(100cqw * 232.727 / 284.121);
    background: #dfdfdf;
}

.rcm-home-articles__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.rcm-home-articles__text {
    display: block;
}

.rcm-home-articles__image {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 0;
    max-width: 100%;
    aspect-ratio: 284.121 / 232.727;
    margin-bottom: 17px;
    overflow: hidden;
    background: #ececec center / cover no-repeat;
}

/*
 * Fill aspect-ratio frame; object-fit: cover avoids stretch.
 * Beats Elementor `.elementor img` via `.elementor img.rcm-home-articles__thumb` (0,2,1).
 */
.elementor img.rcm-home-articles__thumb,
.elementor .rcm-home-articles .rcm-home-articles__image .rcm-home-articles__thumb,
.rcm-home-articles .rcm-home-articles__image img.rcm-home-articles__thumb {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center !important;
}

.rcm-home-articles__play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48.485px;
    height: 48.485px;
    border-radius: 50%;
    background: #fff;
    color: #7153b0;
    font-family: "Font Awesome 5 Free", sans-serif;
    font-size: 17.455px;
    font-weight: 900;
    transform: translate(-50%, -50%);
}

.rcm-home-articles__label {
    display: block;
    margin-bottom: 10px;
    color: #6d757f;
    font-size: 12.606px;
    font-weight: 600;
    line-height: 1.4;
}

.rcm-home-articles__card-title {
    margin: 0;
    color: #183354;
    font-family: "Manrope", sans-serif;
    font-size: 19.394px;
    font-weight: 700;
    line-height: 1.3;
}

.rcm-home-articles__bottom-ad {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 728px;
    height: 90px;
    margin: 0 auto;
    border-radius: 12px;
    background: transparent;
    color: #000;
    font-size: 28.59px;
    font-weight: 500;
    text-transform: uppercase;
    margin-top: 80px;
}

.rcm-home-articles__sidebar {
    width: 300px;
}

.rcm-home-articles__sidebar-ad {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 300px;
    height: 600px;
    background: transparent;
    color: #000;
    font-size: 28.59px;
    font-weight: 500;
    text-transform: uppercase;
}

@media (max-width: 1180px) {
    .rcm-home-articles {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .rcm-home-articles__content,
    .rcm-home-articles__rule {
        width: 100%;
    }

    .rcm-home-articles__cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .rcm-home-articles__card,
    .rcm-home-articles__image,
    .rcm-home-articles__bottom-ad,
    .rcm-home-articles__sidebar,
    .rcm-home-articles__sidebar-ad {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .elementor .elementor-widget.elementor-widget-shortcode:has(.rcm-home-articles) > .elementor-widget-container {
        height: auto !important;
        min-height: 0 !important;
        margin-bottom: 0 !important;
    }

    .elementor .elementor-widget.elementor-widget-shortcode:has(.rcm-home-articles) .elementor-shortcode {
        height: auto !important;
        min-height: 0 !important;
        margin-bottom: 0 !important;
    }

    .elementor .elementor-widget.elementor-widget-shortcode:has(.rcm-home-articles) {
        flex-grow: 0 !important;
        min-height: 0 !important;
        margin-bottom: 0 !important;
    }

    .elementor .e-con:has(.rcm-home-articles) > .e-con-inner {
        height: auto !important;
        min-height: 0 !important;
        flex-grow: 0 !important;
        justify-content: flex-start !important;
        align-content: flex-start !important;
    }

    .rcm-home-articles {
        display: block;
        width: min(100%, calc(100% - 24px));
        padding: 0;
        box-sizing: border-box;
    }

    .rcm-home-articles__header {
        margin-bottom: var(--rcm-home-rail-gap-rule-content, 24px);
    }

    .rcm-home-articles__header-top {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        margin-bottom: var(--rcm-home-rail-gap-title-rule, 16px);
    }

    .rcm-home-articles__title {
        font-size: 22px;
        flex: none;
        min-width: 0;
        overflow: visible;
        text-overflow: unset;
        white-space: normal;
    }

    .rcm-home-articles__view-all {
        flex-shrink: 0;
        width: auto;
        min-width: 0;
        padding: 8px 12px;
        font-size: 12px;
    }

    .rcm-home-articles__link {
        display: grid;
        grid-template-columns: 80px minmax(0, 1fr);
        gap: 12px;
        align-items: start;
        padding: 14px 0;
        border-bottom: 1px solid #e5e1db;
    }

    .rcm-home-articles__card:last-child .rcm-home-articles__link {
        border-bottom: none;
    }

    .rcm-home-articles__cards {
        display: flex;
        flex-direction: column;
        gap: 0;
        margin-bottom: 24px;
        overflow: visible;
        scroll-snap-type: none;
    }

    .rcm-home-articles__card {
        flex: none;
        width: 100%;
        scroll-snap-align: none;
    }

    .rcm-home-articles__card.has-divider::after {
        display: none;
    }

    .rcm-home-articles__image {
        width: 80px;
        height: 80px;
        min-width: 80px;
        min-height: 80px;
        max-width: none;
        aspect-ratio: 1;
        margin-bottom: 0;
        border-radius: 10px;
    }

    .rcm-home-articles__label {
        margin-bottom: 4px;
        font-size: 11px;
        color: #6b7280;
    }

    .rcm-home-articles__card-title {
        font-size: 16px;
        line-height: 1.25;
        color: #111;
    }

    .rcm-home-articles__bottom-ad {
        width: 100%;
        height: auto;
        min-height: 90px;
        max-height: 120px;
        aspect-ratio: 320 / 100;
        margin-top: 24px;
        border-radius: 10px;
        font-size: 18px;
        overflow: hidden;
    }

    /* Bottom ad sits above sidebar in DOM; extra gap when both slots show so creatives do not read as one block. */
    .rcm-home-articles__bottom-ad + .rcm-home-articles__sidebar {
        margin-top: 28px;
    }

    .rcm-home-articles__sidebar {
        display: block;
        width: 100%;
        margin-top: 12px;
    }

    .rcm-home-articles__sidebar-ad {
        width: 100%;
        height: auto;
        min-height: 90px;
        max-height: 120px;
        aspect-ratio: 320 / 100;
        border-radius: 10px;
        font-size: 18px;
        overflow: hidden;
    }

    .rcm-home-articles__bottom-ad iframe,
    .rcm-home-articles__bottom-ad img,
    .rcm-home-articles__bottom-ad ins,
    .rcm-home-articles__sidebar-ad iframe,
    .rcm-home-articles__sidebar-ad img,
    .rcm-home-articles__sidebar-ad ins {
        max-width: 100% !important;
        max-height: 100% !important;
    }

    .rcm-mobile-inline-ad--articles {
        width: min(100%, calc(100% - 40px));
        margin: 16px auto;
        padding: 0;
    }

    .rcm-mobile-inline-ad--articles > .rcm-home-articles__bottom-ad,
    .rcm-mobile-inline-ad--articles > .rcm-home-articles__sidebar-ad {
        width: 100% !important;
        height: auto !important;
        min-height: 90px;
        max-height: 120px;
        aspect-ratio: 320 / 100;
        margin: 0 !important;
        border-radius: 10px;
    }

    .rcm-mobile-inline-ad--articles iframe,
    .rcm-mobile-inline-ad--articles img,
    .rcm-mobile-inline-ad--articles ins {
        max-width: 100% !important;
        max-height: 100% !important;
    }

    .rcm-home-articles__sidebar.rcm-mobile-ad-parent--empty {
        display: none !important;
        margin-top: 0 !important;
    }
}
