/* Stili base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
}

a {
    color: #3498db;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #2980b9;
}

h1, h2, h3, h4 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

/* Dashboard layout */
.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: #fff;
    padding: 20px 0;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #34495e;
}

.menu {
    list-style: none;
}

.menu li {
    padding: 0;
}

.menu a {
    display: block;
    padding: 12px 20px;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s ease;
}

.menu a:hover,
.menu a.active {
    background-color: #34495e;
    color: #3498db;
}

.menu a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 20px;
    transition: all 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Hamburger menu per dispositivi mobili */
.hamburger, .close-sidebar {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    position: fixed;
    z-index: 1010;
}

.hamburger {
    top: 20px;
    left: 20px;
    color: #2c3e50;
}

.close-sidebar {
    top: 20px;
    right: 20px;
    color: #fff;
}

/* Navigazione del calendario */
.calendario-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    background-color: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calendario-nav h2 {
    margin: 0;
    font-size: 1.5rem;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: #3498db;
    color: white;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.nav-btn:hover {
    background-color: #2980b9;
    color: white;
}

.nav-btn i {
    margin: 0 5px;
}

/* Filtri */
.filtri-container {
    background-color: #fff;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filtri-container h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.filtri-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 1rem;
}

.filtro {
    display: flex;
    align-items: center;
}

.filtro input[type="radio"] {
    margin-right: 8px;
}

.filtro label {
    cursor: pointer;
}

.btn-filtro {
    padding: 0.5rem 1rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn-filtro:hover {
    background-color: #2980b9;
}

/* Griglia del calendario */
.calendario-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    background-color: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.giorno-header {
    text-align: center;
    font-weight: 600;
    padding: 10px;
    background-color: #3498db;
    color: white;
    border-radius: 4px;
}

.giorno {
    min-height: 100px;
    padding: 6px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.giorno:hover {
    background-color: #f8f9fa;
}

.giorno.vuoto {
    background-color: #f5f7fa;
    border: 1px dashed #e0e0e0;
}

.numero-giorno {
    font-weight: 600;
    margin-bottom: 6px;
    text-align: right;
    padding: 2px 4px;
    border-radius: 50%;
    display: inline-block;
    width: 26px;
    height: 26px;
    line-height: 22px;
    text-align: center;
}

.giorno.oggi {
    background-color: #e3f2fd;
    border: 2px solid #3498db;
}

.giorno.oggi .numero-giorno {
    background-color: #3498db;
    color: white;
}

.sessioni-giorno {
    margin-top: 4px;
}

.sessione-item {
    font-size: 0.8rem;
    padding: 4px 6px;
    margin-bottom: 4px;
    background-color: #e1f5fe;
    border-radius: 3px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
}

.sessione-ora {
    font-weight: 600;
    white-space: nowrap;
}

.sessione-nome {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-prenota-mini {
    background-color: #4caf50;
    color: white;
    border-radius: 3px;
    padding: 2px 5px;
    font-size: 0.7rem;
    white-space: nowrap;
}

.btn-prenota-mini:hover {
    background-color: #388e3c;
    color: white;
}

/* Legenda */
.legenda {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.legenda-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legenda-colore {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

.oggi-colore {
    background-color: #e3f2fd;
    border: 2px solid #3498db;
}

.sessione-colore {
    background-color: #e1f5fe;
}

/* Lista sessioni dettagliata */
.lista-sessioni {
    margin-top: 2rem;
}

.giorno-sessioni {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.giorno-sessioni h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.sessioni-lista {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.sessione-card {
    display: flex;
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.sessione-card:hover {
    transform: translateY(-5px);
}

.sessione-img {
    width: 80px;
    height: 100%;
    overflow: hidden;
}

.sessione-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sessione-info {
    flex: 1;
    padding: 0.75rem;
}

.sessione-info h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.sessione-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.sessione-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    background-color: #f1f1f1;
    border-radius: 4px;
}

.sessione-meta i {
    color: #3498db;
}

.sessione-azioni {
    display: flex;
    gap: 0.5rem;
}

.btn-dettaglio, .btn-prenota {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    transition: background-color 0.3s ease;
}

.btn-dettaglio {
    background-color: #f1f1f1;
    color: #333;
}

.btn-dettaglio:hover {
    background-color: #e0e0e0;
}

.btn-prenota {
    background-color: #4caf50;
    color: white;
}

.btn-prenota:hover {
    background-color: #388e3c;
    color: white;
}

/* Footer con azioni */
.azioni-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding: 1rem 0;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.6rem 1.2rem;
    background-color: #95a5a6;
    color: white;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
    color: white;
}

/* Messaggio nessun risultato */
.no-results {
    background-color: #f8f9fa;
    padding: 2rem;
    text-align: center;
    border-radius: 8px;
    color: #7f8c8d;
}

/* Responsive design */
@media (max-width: 992px) {
    .calendario-grid {
        gap: 4px;
    }
    
    .giorno {
        min-height: 80px;
        padding: 4px;
    }
    
    .sessione-item {
        font-size: 0.7rem;
        padding: 3px 4px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .hamburger {
        display: block;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar.active + .close-sidebar {
        display: block;
    }
    
    .calendario-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .calendario-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 2px;
    }
    
    .giorno-header {
        padding: 6px 2px;
        font-size: 0.8rem;
    }
    
    .giorno {
        min-height: 60px;
        padding: 2px;
    }
    
    .numero-giorno {
        font-size: 0.9rem;
        margin-bottom: 2px;
        width: 22px;
        height: 22px;
        line-height: 18px;
    }
    
    .sessione-item {
        padding: 2px;
        margin-bottom: 2px;
        font-size: 0.65rem;
    }
    
    .btn-prenota-mini {
        padding: 1px 3px;
        font-size: 0.6rem;
    }
    
    .sessioni-lista {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .calendario-grid {
        display: none; /* Nascondiamo la griglia su schermi molto piccoli */
    }
    
    .filtri-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sessione-card {
        flex-direction: column;
    }
    
    .sessione-img {
        width: 100%;
        height: 120px;
    }
}