:root {
    --bg-color: #F2F4F8;       
    --card-bg: #FFFFFF;
    --text-primary: #111111;   
    --text-secondary: #86868B; 
    /* Gradiente Apple Blue -> Purple per un look più fresco */
    --accent-gradient: linear-gradient(135deg, #0071E3 0%, #5E5CE6 100%);
    --accent-color: #0071E3;
    --danger-color: #FF3B30;   
    --glass-bg: rgba(255, 255, 255, 0.55);
    --shadow-soft: 0 8px 30px rgba(0,0,0,0.06);
    --shadow-glow: 0 8px 20px rgba(0, 113, 227, 0.25);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-font-smoothing: antialiased; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    /* Sfondo leggermente più vivo con un tocco di gradiente quasi impercettibile */
    background-image: radial-gradient(circle at top left, #E0E7FF 0%, transparent 40%);
    color: var(--text-primary);
    line-height: 1.5;
    padding-bottom: 60px;
}

/* --- ANIMAZIONI --- */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* --- HEADER & NAV --- */
.glass-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-bottom: 1px solid rgba(255,255,255,0.5);
    padding: 12px 0;
    box-shadow: 0 4px 30px rgba(0,0,0,0.02);
}

.header-content {
    /* Correzione: deve occupare lo spazio per centrare gli elementi */
    width: 100%;
    max-width: 600px; 
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center; /* Centra orizzontalmente il logo */
    align-items: center;
}

/* --- LAYOUT --- */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 80vh;
}

.hero-section { 
    margin: 40px 0 30px 0; 
    text-align: center;
    animation: slideUp 0.6s ease-out;
}

.hero-title { 
    font-size: 2.8rem; /* Più grande e impattante */
    font-weight: 800; 
    line-height: 1.1; 
    letter-spacing: -1.5px;
    
    /* Testo con gradiente (Cool factor) */
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-subtitle { 
    font-size: 1.1rem; 
    color: var(--text-secondary); 
    font-weight: 500; 
    margin-top: 5px;
    display: block;
}

/* --- CARD DESIGN --- */
.card {
    background: var(--card-bg);
    border-radius: 28px; /* Curve più morbide (Squircle) */
    padding: 28px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255,255,255,0.6);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); /* Effetto rimbalzo */
    
    /* Animazione di entrata per ogni card */
    animation: slideUp 0.8s ease-out forwards;
    opacity: 0; /* Parte nascosta poi l'animazione la mostra */
}

/* Ritardo a cascata per l'animazione delle card (fino a 5 card) */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }

.card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}

.card-top { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 18px; 
}

.date-badge {
    background: #fff;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
}

.tag-alert {
    color: #fff;
    background: var(--danger-color);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(255, 59, 48, 0.3);
    animation: pulse 2s infinite;
}

.sindacati-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.8px;
    line-height: 1.2;
    color: #111;
}

.info-row { margin-bottom: 15px; }

.label { 
    display: inline-block; 
    font-size: 0.75rem; 
    color: #999; 
    font-weight: 700; 
    letter-spacing: 1px; 
    margin-bottom: 6px; 
    text-transform: uppercase;
    background: #F2F4F8;
    padding: 4px 8px;
    border-radius: 6px;
}

.value { 
    font-size: 1.1rem; 
    color: var(--text-primary);
    font-weight: 500;
}

/* --- BUTTONS --- */
.actions {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px dashed #F2F4F8; /* Linea tratteggiata più simpatica */
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    
    /* Gradiente sul bottone */
    background: var(--accent-gradient);
    color: white;
    
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 25px;
    transition: transform 0.2s;
    box-shadow: var(--shadow-glow);
    border: none;
}

.btn:active { transform: scale(0.95); }
.btn:hover { 
    filter: brightness(1.1);
    transform: translateY(-2px);
}

/* --- FOOTER & EMPTY STATE --- */
footer { text-align: center; color: var(--text-secondary); font-size: 0.85rem; padding: 40px 20px; opacity: 0.7; }

.empty-state { 
    text-align: center; 
    padding: 80px 20px; 
    animation: slideUp 0.5s ease-out;
}
.emoji { 
    font-size: 5rem; 
    margin-bottom: 20px; 
    display: inline-block;
    animation: pulse 3s infinite ease-in-out;
}
.empty-state h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 10px; }

.search-box {
    display: flex;
    gap: 8px;
    margin: 10px 0;
}

#search {
    flex: 1;
    padding: 12px 14px;
    font-size: 1rem;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: var(--text-primary);
}

#searchBtn {
    padding: 12px 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, #FF9500, #FFCC00);
    color: #000;
    font-weight: 600;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 15px rgba(255,150,0,0.3);
}
