/**
 * Module news de la home ([aperamrc_news]) — porté de style.css (aperam.com,
 * blocs .news-container / .news-holder / .news / .arrow-holder).
 * Desktop : layout absolu 1 grand + 2 petits, flèches de swap (news-slider.js).
 * Mobile (<576px) : carousel slick vertical 3 slides.
 * Icônes Font Awesome remplacées par des SVG inline (stroke: currentColor).
 */

/* ─── Débord à droite (comportement aperam.com) ──────────────────────────────
   Le widget vit dans le conteneur boxé standard d'Elementor : la gauche reste
   alignée sur le contenu du site, .news-bleed déborde à droite jusqu'au bord
   de l'écran (marge négative = moitié de l'espace hors conteneur). */

.news-bleed {
    position: relative;
    overflow: hidden;
    margin-right: calc(50% - 50vw);
}

/* 100vw inclut la scrollbar : on clippe le léger dépassement horizontal
   pour ne pas créer de scroll de page. */
body:has(.news-bleed) {
    overflow-x: clip;
}

/* ─── En-tête du module : titre + flèches + bouton « See all the news » ──── */

.news-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.news-header__nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.news-header__title {
    color: #1E1E1E;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 400;
    margin: 0;
}

@media (min-width: 768px) {
    .news-header__title {
        font-size: 37px;
    }
}

/* Bouton porté de .btn-aperam (aperam.com), recoloré/reformé au design pilule
   violet utilisé pour les autres boutons du site (voir trader-finder.css,
   single-trader.css : #771783, border-radius: 999px). */
.news-holder__btn.btn-aperam {
    display: none;
    background: #771783;
    text-transform: none;
    border-radius: 999px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 24px;
    color: white;
    letter-spacing: normal;
    line-height: 1;
    text-decoration: none;
    transition: all 0.3s ease-in;
}

@media (min-width: 576px) {
    .news-holder__btn.btn-aperam {
        display: inline-block;
    }
}

.news-holder__btn.btn-aperam:hover {
    transform: translateX(5px);
    background-color: #601268;
    color: white;
}

.news-holder {
    position: relative;
    display: inline-block;
    height: 100%;
    width: 100%;
    padding: 0;
    margin: 0 0 30px;
}

@media (max-width: 1000px) {
    .news-holder {
        margin-top: 50px;
    }
}

@media (max-width: 575px) {
    .news-holder {
        margin-top: 0;
    }
}

/* Flèches : dans l'en-tête, à gauche du bouton « See all the news » */
.news-header .arrow-holder {
    display: none;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

@media (min-width: 576px) {
    .news-header .arrow-holder {
        display: flex;
    }
}

.news-header .arrow-holder__item {
    cursor: pointer;
    line-height: 0;
}

.news-header .arrow-holder__item svg {
    width: 42px;
    height: 42px;
    color: #eb5e0b;
    opacity: 1;
}

.news-header .arrow-holder__item svg:hover {
    opacity: 0.5;
}

.news {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 0 15px;
    margin: 0;
}

@media (min-width: 576px) {
    .news {
        width: 3000px;
        min-height: 560px;
        padding: 0;
    }
}

.news__item {
    position: relative;
    left: 0;
    top: 0;
    width: 100%;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
}

@media (min-width: 576px) {
    .news__item {
        position: absolute;
        left: 3000px;
        top: 0;
        width: calc(1170px / 4);
        margin-bottom: 0;
    }
}

.news__item:nth-child(3n + 1) {
    width: 100%;
}

.news__item:nth-child(3n + 1) .news__item-des {
    display: block;
}

@media (min-width: 720px) {
    .news__item:nth-child(3n + 1) {
        width: calc(1170px / 2);
    }
}

.news__item:nth-child(3n + 2) .news__item-des,
.news__item:nth-child(3n) .news__item-des {
    display: none;
}

.news__item:nth-child(n + 4) {
    opacity: 1;
}

@media (min-width: 576px) {
    .news__item:nth-child(n + 4) {
        opacity: 0.5;
    }
}

.news__item a {
    position: relative;
    display: block;
    line-height: 0;
}

.news__item a:hover svg {
    color: #eb5e0b;
}

.news__item-overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    width: 100%;
    transition: 0.3s ease;
    background-color: rgba(5, 5, 4, 0.5);
}

.news__item-overlay svg {
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.news__item img {
    width: 100%;
}

.news__item h3 {
    font-size: 19px;
    font-weight: 400;
    margin-bottom: 10px;
    color: #1E1E1E;
}

@media (min-width: 960px) {
    .news__item h3 {
        font-size: 22px;
    }
}

.news__item-des {
    font-size: 16px;
    line-height: 24px;
}

.news__item-btn {
    margin: 10px 0;
    text-align: right;
}

.news__item-btn svg {
    color: #eb5e0b;
}

.news__item-btn a:hover svg {
    color: #5f2869;
}
