/* DAI, VIVI! - Stili principali */
:root {
    --verde: #009246;
    --rosso: #ce2b37;
    --bianco: #ffffff;
    --scuro: #1a1a2e;
    --grigio: #f0f2f5;
    --testo: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--grigio);
    color: var(--testo);
}

/* Topbar */
.topbar {
    background: var(--verde);
    color: white;
    padding: 15px 20px;
    text-align: center;
}
.topbar a {
    color: white;
    text-decoration: none;
}
.topbar h1 {
    font-size: 24px;
}
.topbar h1 span {
    color: var(--rosso);
}

/* Footer */
.footer {
    background: var(--verde);
    color: #aaa;
    text-align: center;
    padding: 2rem;
    font-size: 0.8rem;
    margin-top: 2rem;
}
.footer a {
    color: white;
    text-decoration: underline;
}

/* Hero */
.hero {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('/assets/images/cecina-mare.jpg');
    background-size: cover;
    background-position: center;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}
.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}
.hero p {
    font-size: 1.5rem;
}

/* Sezioni */
.section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.section h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
}

/* Griglia card */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}
.card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}
.card:hover {
    transform: translateY(-5px);
}
.card-content {
    padding: 1.5rem;
}
.card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}
.card h4 a {
    color: var(--scuro);
    text-decoration: none;
}
.card h4 a:hover {
    color: var(--rosso);
}
.card .data {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.5rem;
}
.card .luogo {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 0.75rem;
}

/* Chip */
.chip-sponsor {
    background: #ffd700;
    color: #000;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    display: inline-block;
    margin-top: 0.5rem;
}
.chip-evidenza {
    background: var(--rosso);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    display: inline-block;
    margin-top: 0.5rem;
}
.gratis {
    background: #d4edda;
    color: #155724;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-left: 5px;
}

/* Bottoni */
.btn-scopri {
    display: inline-block;
    margin-top: 1rem;
    background: var(--rosso);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: bold;
}
.btn-scopri:hover {
    background: #b01e2a;
}
.btn-tutti {
    display: inline-block;
    background: var(--verde);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 40px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 2rem;
}
.btn-tutti:hover {
    background: #006b33;
}

/* Statistiche (opzionali) */
.stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--verde);
}
.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

/* Mobile */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .hero {
        height: 350px;
    }
    .section {
        padding: 2rem 1rem;
    }
    .stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    .grid-cards {
        grid-template-columns: 1fr;
    }
}
/* Griglia eventi (griglia.php) */
.layout {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    gap: 30px;
}
.sidebar {
    width: 260px;
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.sidebar h3 {
    margin-bottom: 15px;
    font-size: 18px;
}
.filtro-group {
    margin-bottom: 15px;
}
.filtro-group label {
    display: block;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #666;
}
.filtro-group select, .filtro-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
}
.btn-filtra, .btn-reset {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 8px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
}
.btn-filtra {
    background: var(--verde);
    color: white;
}
.btn-reset {
    background: #e0e0e0;
    color: #333;
}
.contenuto {
    flex: 1;
}
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.chip {
    background: #f0f0f0;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    color: #555;
    transition: background 0.2s;
}
.chip.attivo {
    background: var(--verde);
    color: white;
}
.chip:hover:not(.attivo) {
    background: #e0e0e0;
}
.contatore {
    margin-bottom: 20px;
    font-size: 14px;
    color: #888;
}
.vuoto {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 16px;
}
.vuoto h2 {
    font-size: 24px;
    margin-bottom: 10px;
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.gratis-badge {
    background: #d4edda;
    color: #155724;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 8px;
}
.logo-desktop {
    height: 60px;
}
.burger {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
}
@media (max-width: 768px) {
    .layout {
        flex-direction: column;
        padding: 10px;
    }
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        width: 260px;
        z-index: 1000;
        transition: left 0.3s;
        border-radius: 0;
        overflow-y: auto;
    }
    .sidebar.aperto {
        left: 0;
    }
    .burger {
        display: block;
    }
    .contenuto {
        margin-top: 10px;
    }
    .grid {
        grid-template-columns: 1fr;
    }
    .logo-desktop {
        height: 40px;
    }
}
/* Griglia Cecina - stile come Varese */
.layout {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    gap: 30px;
}

.sidebar {
    width: 260px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.sidebar h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
}

.contenuto {
    flex: 1;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.chip {
    background: #f0f0f0;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    text-decoration: none;
    color: #333;
}

.chip.attivo {
    background: var(--verde);
    color: white;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-body {
    padding: 16px;
}

.card-body h2 {
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: 600;
}

.card-body .data {
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
}

.card-body .luogo {
    font-size: 13px;
    color: #555;
    margin-bottom: 10px;
}

.categoria {
    font-size: 11px;
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 20px;
}

.gratis-badge {
    background: #d4edda;
    color: #155724;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 11px;
    margin-left: 6px;
}

.contatore {
    margin-bottom: 15px;
    font-size: 13px;
    color: #666;
}

.burger {
    display: none;
}

@media (max-width: 1200px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .layout {
        flex-direction: column;
        padding: 10px;
    }
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        width: 260px;
        z-index: 1000;
        transition: left 0.3s;
        border-radius: 0;
    }
    .sidebar.aperto {
        left: 0;
    }
    .burger {
        display: block;
        background: none;
        border: none;
        color: white;
        font-size: 24px;
        cursor: pointer;
    }
    .grid {
        grid-template-columns: 1fr;
    }
}
.badge-evidenza {
    background: var(--rosso);
    color: white;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    display: inline-block;
    margin-left: 6px;
}

.badge-sponsor {
    background: #ffd700;
    color: #000;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    display: inline-block;
    margin-left: 6px;
}

.card.in-evidenza {
    background: #fff8e7;
    border-left: 4px solid var(--rosso);
}
/* Mercati espandibili */
.mercati-container {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.mercato-item {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}
.mercato-item:last-child {
    border-bottom: none;
}

.mercato-note {
    font-size: 12px;
    color: #666;
    display: inline-block;
    margin-top: 4px;
}

.mercato-stagionale {
    font-size: 11px;
    background: #fff3cd;
    color: #856404;
    padding: 2px 6px;
    border-radius: 12px;
    margin-left: 5px;
}

.mercati-toggle-btn {
    background: var(--verde);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 15px;
    width: 100%;
    transition: opacity 0.2s;
}
.mercati-toggle-btn:hover {
    opacity: 0.9;
}

.mercati-container-griglia {
    margin-bottom: 25px;
}