/* ====================================
   SEZIONE NEWS DOMOTICA
   ==================================== */

.news-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, #faf9f7 0%, #f0ede8 100%);
}

.news-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--color-primary-dark);
    margin-bottom: 10px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: #6b6b6b;
    margin-bottom: 50px;
}

/* Grid delle news */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Singola news card */
.news-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(140, 123, 107, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(140, 123, 107, 0.2);
}

/* Immagine news */
.news-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #e8e4df 0%, #d4cfc7 100%);
}

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

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

/* Categoria badge */
.news-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--color-primary);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Contenuto news */
.news-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 0.875rem;
    color: #888;
}

.news-date::before {
    content: '📅 ';
}

.news-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-excerpt {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-link {
    display: inline-flex;
    align-items: center;
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: gap 0.3s ease, color 0.3s ease;
    gap: 5px;
    margin-top: auto;
}

.news-link:hover {
    color: var(--color-primary-dark);
    gap: 10px;
}

/* Messaggio nessuna news */
.no-news {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 1.1rem;
}

/* Pulsante Carica Altre */
.news-load-more {
    text-align: center;
    margin-top: 50px;
}

.load-more-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(140, 123, 107, 0.3);
}

.load-more-btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(140, 123, 107, 0.4);
}

.load-more-btn:active {
    transform: translateY(0);
}

/* Animazione caricamento */
.news-card.loading {
    opacity: 0.5;
    pointer-events: none;
}

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

.news-card {
    animation: fadeIn 0.5s ease forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .news-section {
        padding: 60px 15px;
    }
    
    .news-section h2 {
        font-size: 2rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-image {
        height: 180px;
    }
}