/* --- PAGE HERO (Ereditato e coerente) --- */
.page-hero {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 80px 20px;
}
.page-hero h1 { font-family: var(--font-heading); font-size: 2.8rem; margin-bottom: 15px; }
.page-hero p { font-size: 1.2rem; opacity: 0.9; max-width: 700px; margin: 0 auto; }

/* --- FILTRI --- */
.filter-section {
    padding: 30px 0;
    background: var(--white);
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 80px; /* Sotto l'header sticky */
    z-index: 900;
}
.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}
.filter-btn {
    padding: 8px 20px;
    border: 2px solid #e5e7eb;
    background: transparent;
    border-radius: 50px;
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
}
.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

/* --- PROJECT CARDS --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}
.project-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s, opacity 0.3s;
}
.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.project-img {
    height: 200px;
    position: relative;
    /* Sostituire con: background-image: url('../assets/images/progetto.jpg'); background-size: cover; */
}

/* Badge di stato */
.project-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-active {
    background: #dcfce7;
    color: #166534;
}
.badge-ended {
    background: #f3f4f6;
    color: #4b5563;
}

.project-body {
    padding: 25px;
}
.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.85rem;
}
.project-category {
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.project-date {
    color: var(--text-light);
}
.project-body h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--text-dark);
}
.project-body p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}
.btn-text {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.btn-text:hover {
    gap: 10px; /* Effetto freccia che si muove */
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .page-hero h1 { font-size: 2rem; }
    .filter-section { top: 70px; padding: 15px 0; }
    .filter-btn { padding: 6px 15px; font-size: 0.9rem; }
    .projects-grid { grid-template-columns: 1fr; }
}