/* TW Section */

.tw-agg-inner-wrapper {
    /**/
}

/* Container + grid */
.tw-agg .grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
}

@media (max-width: 1024px) {
    .tw-agg .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .tw-agg .grid {
        grid-template-columns: 1fr;
    }

    .tw-media img {
        aspect-ratio: 1 / 1;        /* optional: square thumbnails on mobile */
        object-position: 50% 25%;
    }
}

/* Card shell */
.tw-card {
    position: relative;
    background: #F2f2f2;
    transition: box-shadow .2s ease, transform .2s ease;
}

/* Media */
.tw-media {
    display: block;
    overflow: hidden;
}

.tw-media img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: 50% 20%;
    display: block;
    transition: transform .1s ease;
}

.tw-card:hover .tw-media img {
    transform: scale(1.1);
    transition: all .3s linear 0s;
}

/* Blue panel overlapping the image */
.tw-panel {
    background: #0A3C57;
    color: #fff;
    margin: -56px 10px 20px;
    padding: 30px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
    position: relative;
    z-index: 1;
}

/* Typography */
.tw-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(2 * 1.3em);
    margin: 0 0 5px 0;
    font-size: 18px;
    line-height: 1.3em;
    font-weight: 700;
}

.tw-title a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tw-meta {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 1.3em;
    font-size: 13px;
    line-height: 1.3;
    opacity: .9;
    margin-bottom: 10px;
}

.tw-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(4 * 1.45em);
    margin: 0 0 10px 0;
    font-size: 14px;
    line-height: 1.5;
}

.tw-more {
    color: #fff;
    font-size: 15px;
    line-height: 1;
    text-decoration: underline;
    font-weight: 400;
}

a.tw-more:hover,
a.tw-more a:focus {
    color: #fff;
}

/* Pagination (scoped) */
.tw-agg .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 18px;
}

.tw-agg .pagination a,
.tw-agg .pagination span {
    display: inline-block;
    border: none;
    font-size: 1em;
    margin: 0 .4em .4em 0;
    padding: .75em;
    font-weight: 400;
    color: #000;
    text-decoration: underline;
    cursor: pointer;
}

.tw-agg .pagination .current {
    text-decoration: none;
    cursor: default;
}

/* Voir plus button row */
.tw-agg .tw-more-row {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.tw-agg .tw-more-row .btn {
    text-decoration: none;
    color: #fff;
    border-style: solid;
    border-color: #0A3C57;
    background: #0A3C57;
    border-radius: 4px;
    padding: 12px 24px;
    font-size: 14px;
    line-height: 1;
}