/* ============================================
   MOD_CALCIO_CALENDARIO - Stili principali
   ============================================ */

.mod-calcio-calendario {
    position: relative;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Container principale */
.calendario-container {
    width: 100%;
    margin: 0 auto;
}

/* Layout a due colonne */
.calendario-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
}

/* Singola colonna */
.calendario-column {
    min-width: 0; /* Previene overflow */
}

/* Header colonna (ANDATA/RITORNO) */
.column-header {
    text-align: center;
    padding: 15px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #ff6600 0%, #ff8833 100%);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(255, 102, 0, 0.2);
}

.column-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Lista giornate */
.giornate-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Card singola giornata */
.giornata-card {
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

/* Header giornata */
.giornata-header {
    padding: 12px 15px;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
}

.giornata-numero {
    font-weight: 700;
}

.giornata-data {
    font-weight: 400;
    opacity: 0.9;
}

/* Container partite */
.partite-container {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Singola partita */
.partita-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

/* Squadra */
.squadra {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0; /* Previene overflow */
}

.squadra-casa {
    justify-content: flex-end;
    text-align: right;
}

.squadra-trasferta {
    justify-content: flex-start;
    text-align: left;
}

.squadra-nome {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.squadra-logo {
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 4px;
}

/* Score box */
.score-box {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    min-width: 50px;
    white-space: nowrap;
}

/* Pulsante Torna su */
.back-to-top {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.back-to-top:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet (fino a 768px) */
@media (max-width: 768px) {
    .calendario-columns {
        gap: 15px;
    }
    
    .column-header h3 {
        font-size: 1.3rem;
        letter-spacing: 1.5px;
    }
    
    .giornata-header {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .partite-container {
        padding: 12px;
        gap: 10px;
    }
    
    .squadra-nome {
        font-size: 0.85rem;
    }
    
    .score-box {
        font-size: 0.9rem;
        padding: 5px 10px;
        min-width: 45px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

/* Mobile (fino a 480px) */
@media (max-width: 480px) {
    .calendario-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .column-header {
        padding: 12px;
    }
    
    .column-header h3 {
        font-size: 1.2rem;
        letter-spacing: 1px;
    }
    
    .giornata-header {
        padding: 10px;
        font-size: 0.85rem;
    }
    
    .partite-container {
        padding: 10px;
        gap: 10px;
    }
    
    .partita-row {
        gap: 8px;
    }
    
    .squadra-nome {
        font-size: 0.8rem;
    }
    
    .score-box {
        font-size: 0.85rem;
        padding: 4px 8px;
        min-width: 40px;
    }
    
    .back-to-top {
        bottom: 15px;
        right: 15px;
        padding: 10px 15px;
        font-size: 0.85rem;
    }
}

/* Print styles */
@media print {
    .back-to-top {
        display: none !important;
    }
    
    .giornata-card {
        page-break-inside: avoid;
    }
}

