/* News Filter Button Styles - Same as Calendario */
.news-filter-btn {
    background: white;
    color: #5B2C6F;
    border: 2px solid #5B2C6F;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    outline: none;
}

.news-filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(91, 44, 111, 0.2);
    background: rgba(91, 44, 111, 0.05);
}

.news-filter-btn.active {
    background: #5B2C6F !important;
    color: white !important;
    border-color: #5B2C6F !important;
}

.news-filter-btn.active:hover {
    background: #4a2359 !important;
    transform: translateY(-2px);
}

.news-filter-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(91, 44, 111, 0.15);
}

/* Section animation */
.news-category-section {
    animation: newsFadeIn 0.4s ease-in-out;
}

@keyframes newsFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* News Grid */
.news-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.news-card {
    flex: 1;
    min-width: 300px;
    max-width: 340px;
}

/* News Card */
.news-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(91, 44, 111, 0.15);
}

.news-card-link {
    text-decoration: none;
    display: block;
}

/* Card Image */
.news-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #5B2C6F 0%, #7A4A8E 100%);
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.news-card:hover .news-card-image img {
    transform: scale(1.08);
}

.news-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.4);
}

.news-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-card:hover .news-card-overlay {
    opacity: 1;
}

/* Badge */
.news-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    z-index: 2;
}

/* Duration */
.news-duration {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 2;
}

/* Card Content */
.news-card-content {
    padding: 1.5rem;
}

.news-card-title {
    color: #1a1a2e;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 0.75rem 0;
    transition: color 0.3s ease;
}

.news-card:hover .news-card-title {
    color: #5B2C6F;
}

.news-card-excerpt {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

/* Meta */
.news-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.news-date,
.news-views {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #999;
    font-size: 0.8rem;
}

/* CTA Button */
.news-cta-btn {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #5B2C6F 0%, #7A4A8E 100%);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(91, 44, 111, 0.3);
}

.news-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(91, 44, 111, 0.4);
    background: linear-gradient(135deg, #6B3C7F 0%, #8A5A9E 100%);
}

/* Responsive */
@media (max-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .news-filter-btn {
        padding: 0.6rem 1.5rem !important;
        font-size: 0.9rem !important;
    }
}

@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Forza struttura verticale: immagine FULL WIDTH sopra, testo sotto */
    .news-card,
    .news-card-link {
        display: block !important;
        flex-direction: column !important;
        width: 100% !important;
    }
    .news-card-image {
        display: block !important;
        width: 100% !important;
        height: 200px !important;
        aspect-ratio: auto !important;
        flex: none !important;
    }
    .news-card-content {
        display: block !important;
        width: 100% !important;
        padding: 1.25rem !important;
        flex: none !important;
    }
}
