/* Struttura principale */
.activities-container { 
    max-width: 1200px; 
    margin: 50px auto; 
    padding: 0 20px; 
}

/* Intestazione e Titoli */
.section-header { 
    text-align: center; 
    margin-bottom: 40px; 
}

.section-header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 10px;
}

/* Navigazione Filtri */
.filter-nav { 
    text-align: center; 
    margin-bottom: 40px; 
}

.filter-nav a { 
    display: inline-block; 
    padding: 10px 20px; 
    margin: 5px; 
    background: #f4f4f4; 
    text-decoration: none; 
    color: #555; 
    border-radius: 25px;
    font-size: 0.95rem; 
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid #ddd;
}

.filter-nav a:hover, 
.filter-nav a.active { 
    background: #B52025; 
    color: white; 
    border-color: #B52025;
    transform: translateY(-2px);
}

/* Griglia delle Schede */
.activities-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 30px; 
}

/* La singola scheda attività */
.activity-card {
    background: white; 
    border: 1px solid #eee; 
    border-radius: 12px;
    padding: 25px; 
    transition: all 0.3s ease;
    position: relative; 
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.activity-card:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 12px 24px rgba(0,0,0,0.1); 
}

/* Badge Livello QCER */
.level-badge {
    position: absolute; 
    top: 15px; 
    right: 15px;
    padding: 5px 12px; 
    border-radius: 6px; 
    font-weight: 800; 
    font-size: 0.85rem;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.lvl-A1, .lvl-A2 { background: #28a745; } /* Verde - Base */
.lvl-B1, .lvl-B2 { background: #ffc107; color: #333; } /* Giallo - Indipendente */
.lvl-C1, .lvl-C2 { background: #dc3545; } /* Rosso - Avanzato */

/* Contenuti della scheda */
.activity-cat { 
    font-size: 0.75rem; 
    color: #B52025; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.activity-title { 
    font-size: 1.4rem; 
    margin: 10px 0; 
    color: #222; 
    line-height: 1.2;
}

.activity-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1; /* Spinge il bottone sempre in fondo */
}

.activity-btn { 
    display: block; 
    text-align: center;
    padding: 12px; 
    background: #333; 
    color: white; 
    text-decoration: none; 
    border-radius: 6px; 
    font-weight: 600;
    transition: background 0.3s;
}

.activity-btn:hover { 
    background: #B52025; 
}

.main-cats {
    margin-bottom: 20px;
}

.level-nav {
    text-align: center;
    margin-top: 20px;
}

.level-nav span {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #666;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.level-nav a {
    display: inline-block;
    padding: 8px 18px;
    margin: 0 5px;
    border: 2px solid #ddd;
    text-decoration: none;
    color: #555;
    font-weight: bold;
    border-radius: 5px;
    transition: 0.3s;
}

.level-nav a:hover {
    border-color: #B52025;
    color: #B52025;
}

.level-nav a.lvl-active {
    background: #B52025;
    border-color: #B52025;
    color: white;
}

.empty-msg {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    background: #f9f9f9;
    border-radius: 10px;
    color: #888;
    border: 2px dashed #eee;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .activities-grid { grid-template-columns: 1fr; }
    .section-header h1 { font-size: 1.8rem; }
}