/* style.css (Aggiunta gestione Nascosti) */

:root {
    --background-color: #f0f2f5;
    --card-background: #ffffff;
    --text-color: #1c1e21;
    --secondary-text-color: #606770;
    --border-color: #dddfe2;
    --accent-color: #1877f2;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
}
body.modal-open {
    overflow: hidden;
}


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

header {
    margin-bottom: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    color: #1B5E20;
    margin-bottom: 20px;
}

.filters-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.view-switcher {
    display: flex;
    background-color: #e4e6eb;
    border-radius: 8px;
    padding: 4px;
}

.view-switcher button {
    padding: 8px 16px;
    border: none;
    background-color: transparent;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.view-switcher button.active {
    background-color: white;
    color: #388E3C;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}


#searchInput, #sortSelect {
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #BDBDBD;
    font-size: 1rem;
    min-width: 250px;
    background-color: white;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#searchInput:focus, #sortSelect:focus {
    outline: none;
    border-color: #388E3C;
    box-shadow: 0 0 0 3px rgba(56, 142, 60, 0.15);
}

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

.card {
    background-color: var(--card-background);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

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

/* NUOVO: Stile per le card nascoste */
.card.is-hidden {
    opacity: 0.5;
    background-color: #fafafa;
}
.card.is-hidden:hover {
    opacity: 1;
    transform: translateY(0);
}


.card-content {
    position: relative;
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    padding-right: 60px; /* Più spazio per entrambi i bottoni */
}

.card-info {
    font-size: 0.9rem;
    color: var(--secondary-text-color);
    margin: 4px 0;
}

.card-info strong {
    font-weight: 600;
    color: var(--text-color);
}

.card-link {
    display: block;
    margin-top: 15px;
    padding: 12px;
    background-color: #388E3C;
    color: white;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.card-link:hover {
    background-color: #2E7D32;
}

.card-tag {
    align-self: flex-start;
    background-color: #F1F8E9;
    color: #33691E;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: auto;
    Margin-bottom: 1px;
}

.like-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.8rem;
    color: #d1d1d1;
    transition: color 0.2s ease, transform 0.2s ease;
    padding: 0;
}

.like-button:hover {
    transform: scale(1.1);
}

.like-button.liked {
    color: #ff4d4d;
}

/* NUOVO: Stile per il bottone Nascondi */
.hide-button {
    position: absolute;
    top: 18px;
    right: 50px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #BDBDBD;
    transition: color 0.2s ease, transform 0.2s ease;
    padding: 0;
}
.hide-button:hover {
    transform: scale(1.1);
    color: #606770;
}
/* Stile per il bottone "Mostra" su card nascosta */
.is-hidden .hide-button {
    color: #388E3C;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    gap: 15px;
}

.pagination button {
    padding: 10px 20px;
    background-color: var(--card-background);
    color: #388E3C;
    border: 1px solid #388E3C;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.pagination button:hover:not(:disabled) {
    background-color: #388E3C;
    color: white;
}

.pagination button:disabled {
    color: #BDBDBD;
    border-color: #E0E0E0;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Stile per i bottoni filtro */
#showFavoritesBtn, #showHiddenBtn {
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid #BDBDBD;
    font-size: 1rem;
    background-color: white;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

#showFavoritesBtn:hover, #showHiddenBtn:hover {
    border-color: #388E3C;
}

#showFavoritesBtn.active {
    background-color: #388E3C;
    color: white;
    border-color: #388E3C;
}

#showHiddenBtn.active {
    background-color: #607D8B;
    color: white;
    border-color: #607D8B;
}

/* Stili Calendario e Modal (invariati)... */
/* --- STILI CALENDARIO --- */
.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.calendar-header h2 { margin: 0; font-size: 1.8rem; color: #333; padding: 5px 10px; border-radius: 6px; transition: background-color 0.2s; cursor: pointer; }
.calendar-header h2:hover { background-color: #e9ebee; }
.calendar-header button { background: none; border: 1px solid #ccc; border-radius: 50%; width: 40px; height: 40px; font-size: 1.5rem; cursor: pointer; transition: background-color 0.2s; }
.calendar-header button:hover { background-color: #e9ebee; }
.calendar-grid-header, .calendar-days-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.calendar-grid-header div { text-align: center; font-weight: 600; color: var(--secondary-text-color); padding-bottom: 10px; }
.calendar-day { position: relative; border: 1px solid #e0e0e0; background-color: #fff; min-height: 100px; padding: 8px; font-weight: 500; transition: background-color 0.2s; }
.calendar-day[data-date] { cursor: pointer; }
.calendar-day[data-date]:hover { background-color: #f0f8ff; }
.calendar-day.not-current-month { background-color: #f7f7f7; color: #ccc; }
.calendar-day.today { background-color: #F1F8E9; border-color: #8BC34A; }
.event-marker { position: absolute; bottom: 5px; right: 5px; background-color: #c62828; color: white; border-radius: 50%; font-size: 0.75rem; font-weight: 700; min-width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; line-height: 1; padding: 2px; box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.calendar-months-grid, .calendar-years-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.month-item, .year-item { text-align: center; padding: 20px 10px; border-radius: 6px; cursor: pointer; font-weight: 500; transition: background-color 0.2s; }
.month-item:hover, .year-item:hover { background-color: #E3F2FD; }
.calendar-tooltip { position: absolute; display: none; background-color: #333; color: white; padding: 10px; border-radius: 6px; z-index: 1001; font-size: 0.9rem; max-width: 250px; pointer-events: none; }
.calendar-tooltip ul { margin: 0; padding: 0; list-style-type: none; }
.calendar-tooltip li { padding: 2px 0; }
/* --- STILI MODAL --- */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 2000; display: none; justify-content: center; align-items: center; }
.modal.show { display: flex; }
.modal-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); }
.modal-content { position: relative; background-color: var(--background-color); padding: 30px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); width: 90%; max-width: 800px; max-height: 90vh; display: flex; flex-direction: column; }
.modal-close-btn { position: absolute; top: 10px; right: 15px; background: none; border: none; font-size: 2rem; color: #606770; cursor: pointer; }
#modal-title { margin-top: 0; margin-bottom: 20px; color: #1B5E20; }
#modal-card-container { overflow-y: auto; padding-right: 15px; margin-right: -15px; }
/* --- STILI ACCORDION NEL MODAL --- */
.accordion-header { background-color: #fff; border: 1px solid var(--border-color); border-radius: 6px; padding: 15px; width: 100%; text-align: left; font-family: 'Inter', sans-serif; font-size: 1.1rem; font-weight: 600; cursor: pointer; transition: background-color 0.2s ease; margin-top: 5px; }
.accordion-header:hover, .accordion-header.active { background-color: #F1F8E9; }
.accordion-header.active { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.accordion-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; background-color: #fff; border: 1px solid var(--border-color); border-top: none; border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; }
.accordion-content .card { box-shadow: none; border-radius: 0; border: none; }