.article-container-v4 {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.article-filters-v4 {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}
.filter-button {
    background: linear-gradient(135deg, #1758ad, #4e62a9);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 15px;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.filter-button:hover {
    background: linear-gradient(135deg, #1e6ad7, #6a84df);
    color: #fff;
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.filter-button.active {
    background: linear-gradient(135deg, #3c6ff7, #6488ea);
    color: white;
    box-shadow: 0 4px 12px rgba(60, 111, 247, 0.4);
    transform: scale(1.05);
}

/* 🔄 Transizione attiva */
.filter-button,
.filter-button.active {
    transition: all 0.3s ease;
}

/* griglia articoli */
.article-grid-v4 {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: left;
}

.article-card-v4 {
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    width: calc(33.333% - 30px);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    position: relative;
}
.article-card-v4:hover {
    transform: translateY(-5px);
}

.article-img-v4 {
    width: 100%;
    height: 220px;
    position: relative;
    overflow: hidden;
}
.article-img-v4 img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
    transition: transform 0.3s ease;
}
.article-card-v4:hover .article-img-v4 img {
    transform: scale(1.07);
}

.article-category-v4 {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 0, 0.9);
    padding: 6px 12px;
    font-weight: bold;
    font-size: 0.8rem;
    border-radius: 10px;
    z-index: 2;
    text-transform: uppercase;
}

.article-content-v4 {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.article-title-v4 {
    color: #d2006b;
    font-weight: 700;
    font-size: 18px;
}

.article-date-v4 {
    color: #888;
    font-size: 0.85rem;
}

.article-excerpt-v4 {
    color: #333;
    font-size: 15px;
    line-height: 1.5;
    margin-top: 0 !important;
}

/* paginazione */
.article-pagination-v4 {
    text-align: center;
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.article-pagination-v4 .page-numbers {
    background: #f1f1f1;
    color: #333;
    padding: 10px 16px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease;
}
.article-pagination-v4 .page-numbers:hover {
    background: #dcdcdc;
}
.article-pagination-v4 .current {
    background: #d2006b;
    color: white;
}

/* responsive */
@media (max-width: 768px) {
    .article-card-v4 {
        width: calc(50% - 20px);
    }
}
@media (max-width: 480px) {
    .article-card-v4 {
        width: 100%;
    }
}