/* ==========================================================================
   SERIE D SHORTCODES - CSS MODERNO E ORGANIZZATO
   ========================================================================== */

/* ==========================================================================
   FULLWIDTH CONTAINER - BASE
   ========================================================================== */

.serie-d-fullwidth {
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    position: relative !important;
    overflow-x: hidden;
}

/* ==========================================================================
   DASHBOARD SERIE D - HOMEPAGE
   ========================================================================== */

.serie-d-fullwidth .serie-d-dashboard {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 80px 40px;
    border-top: 6px solid #1e40af;
    border-bottom: 6px solid #dc2626;
    position: relative;
    z-index: 1;
}

.serie-d-fullwidth .dashboard-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1e40af, #dc2626);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 50px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.serie-d-fullwidth .dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto 40px;
}

.serie-d-fullwidth .dashboard-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.serie-d-fullwidth .dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
}

.serie-d-fullwidth .dashboard-card.precedente-card::before {
    background: linear-gradient(135deg, #10b981, #059669);
}

.serie-d-fullwidth .dashboard-card.prossima-card::before {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.serie-d-fullwidth .dashboard-card.capocannoniere-card::before {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.serie-d-fullwidth .dashboard-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.serie-d-fullwidth .dashboard-card h3 {
    margin: 0 0 20px;
    font-size: 1.3rem;
    color: #1e40af;
    font-weight: 700;
    text-align: center;
}

/* Dashboard Components */
.serie-d-fullwidth .mini-match {
    text-align: center;
}

.serie-d-fullwidth .mini-match .teams {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 12px;
    line-height: 1.3;
}

.serie-d-fullwidth .mini-match .score {
    font-size: 2rem;
    font-weight: 800;
    color: #dc2626;
    margin-bottom: 8px;
}

.serie-d-fullwidth .mini-match .date,
.serie-d-fullwidth .mini-match .datetime {
    color: #64748b;
    font-weight: 600;
    font-size: 0.9rem;
}

.serie-d-fullwidth .mini-match .giornata {
    color: #1e40af;
    font-weight: 600;
    font-size: 0.85rem;
    margin-top: 8px;
}

.serie-d-fullwidth .position-display {
    text-align: center;
}

.serie-d-fullwidth .position-big {
    font-size: 3rem;
    font-weight: 800;
    color: #dc2626;
    line-height: 1;
    margin-bottom: 10px;
}

.serie-d-fullwidth .points {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 8px;
}

.serie-d-fullwidth .record {
    color: #64748b;
    font-weight: 600;
    font-size: 0.9rem;
}

.serie-d-fullwidth .player-display {
    text-align: center;
}

.serie-d-fullwidth .player-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 10px;
}

.serie-d-fullwidth .player-goals {
    font-size: 2rem;
    font-weight: 800;
    color: #dc2626;
    margin-bottom: 8px;
}

.serie-d-fullwidth .player-number {
    color: #64748b;
    font-weight: 600;
    font-size: 0.9rem;
}

.serie-d-fullwidth .mini-classifica {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.serie-d-fullwidth .mini-row {
    display: grid;
    grid-template-columns: 30px 1fr 40px;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    background: #f8fafc;
}

.serie-d-fullwidth .mini-row.casatese-highlight {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    font-weight: 700;
}

.serie-d-fullwidth .mini-row .pos {
    font-weight: 700;
    color: #1e40af;
}

.serie-d-fullwidth .mini-row .team {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.serie-d-fullwidth .mini-row .pts {
    font-weight: 700;
    color: #dc2626;
    text-align: center;
}

.serie-d-fullwidth .prossime-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.serie-d-fullwidth .prossima-row {
    padding: 10px 12px;
    border-radius: 8px;
    background: #f8fafc;
    border-left: 4px solid #1e40af;
}

.serie-d-fullwidth .match-teams {
    font-weight: 600;
    color: #1e40af;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.serie-d-fullwidth .match-date {
    color: #64748b;
    font-weight: 600;
    font-size: 0.8rem;
}

.serie-d-fullwidth .dashboard-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.serie-d-fullwidth .btn-dashboard {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

.serie-d-fullwidth .btn-dashboard:hover {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.4);
    color: white;
    text-decoration: none;
}

/* ==========================================================================
   CLASSIFICA SHORTCODE
   ========================================================================== */

.serie-d-fullwidth .classifica-wrapper {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 60px 40px;
    border-top: 6px solid #1e40af;
    border-bottom: 6px solid #1e40af;
}

.serie-d-fullwidth .classifica-title {
    text-align: center;
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 50px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.serie-d-fullwidth .classifica-table-container {
    background: white;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    overflow-x: auto;
    border-radius: 15px;
}

.serie-d-fullwidth .classifica-table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
    font-size: 1rem;
}

.serie-d-fullwidth .classifica-table thead {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
}

.serie-d-fullwidth .classifica-table th {
    padding: 25px 15px;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.serie-d-fullwidth .classifica-table th:first-child {
    text-align: left;
    padding-left: 30px;
}

.serie-d-fullwidth .classifica-table td {
    padding: 20px 15px;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.serie-d-fullwidth .classifica-table td:first-child {
    text-align: left;
    padding-left: 30px;
}

.serie-d-fullwidth .classifica-table tbody tr:hover {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    transform: scale(1.002);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.serie-d-fullwidth .classifica-table .casatese-row {
    background: linear-gradient(135deg, #fef3c7, #fde68a) !important;
    font-weight: 700;
    border-left: 8px solid #f59e0b;
}

.serie-d-fullwidth .classifica-table .casatese-row:hover {
    background: linear-gradient(135deg, #fde68a, #fcd34d) !important;
}

.serie-d-fullwidth .classifica-table .playoff-zone {
    border-left: 6px solid #10b981;
}

.serie-d-fullwidth .classifica-table .playout-zone {
    border-left: 6px solid #ef4444;
}

.serie-d-fullwidth .position-badge {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.4);
}

.serie-d-fullwidth .points-cell {
    font-weight: 800;
    font-size: 1.4rem;
    color: #dc2626;
}

.serie-d-fullwidth .dr-positive {
    color: #10b981;
    font-weight: 700;
    font-size: 1.1rem;
}

.serie-d-fullwidth .dr-negative {
    color: #ef4444;
    font-weight: 700;
    font-size: 1.1rem;
}

.serie-d-fullwidth .classifica-legend {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.serie-d-fullwidth .legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    color: #64748b;
    font-size: 1.1rem;
}

.serie-d-fullwidth .legend-color {
    width: 24px;
    height: 24px;
    border-radius: 6px;
}

.serie-d-fullwidth .legend-playoff {
    background: #10b981;
}

.serie-d-fullwidth .legend-playout {
    background: #ef4444;
}

/* ==========================================================================
   ROSA SQUADRA SHORTCODE
   ========================================================================== */

.serie-d-fullwidth .rosa-wrapper {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 60px 40px;
    border-top: 6px solid #dc2626;
    border-bottom: 6px solid #dc2626;
}

.serie-d-fullwidth .rosa-title {
    text-align: center;
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 50px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.serie-d-fullwidth .giocatori-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 25px !important;
    margin-top: 40px !important;
}

.serie-d-fullwidth .giocatore-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
    position: relative;
    min-height: 480px;
}

.serie-d-fullwidth .giocatore-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
}

.serie-d-fullwidth .giocatore-header {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    padding: 20px;
    text-align: center;
    position: relative;
}

.serie-d-fullwidth .numero-maglia {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.6rem;
    margin: 0 auto 15px;
    border: 3px solid white;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.serie-d-fullwidth .giocatore-nome {
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.serie-d-fullwidth .giocatore-ruolo {
    color: #fca5a5;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.serie-d-fullwidth .giocatore-foto {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.serie-d-fullwidth .giocatore-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.serie-d-fullwidth .giocatore-card:hover .giocatore-foto img {
    transform: scale(1.1);
}

.serie-d-fullwidth .foto-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #cbd5e1;
}

.serie-d-fullwidth .giocatore-stats {
    padding: 25px 20px;
}

.serie-d-fullwidth .stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.serie-d-fullwidth .stat-row:last-child {
    border-bottom: none;
}

.serie-d-fullwidth .stat-label {
    color: #64748b;
    font-weight: 600;
    font-size: 0.9rem;
}

.serie-d-fullwidth .stat-value {
    color: #1e40af;
    font-weight: 700;
    font-size: 1rem;
}

.serie-d-fullwidth .performance-stats {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f1f5f9;
}

.serie-d-fullwidth .perf-stat {
    text-align: center;
    flex: 1;
}

.serie-d-fullwidth .perf-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: #dc2626;
    line-height: 1;
}

.serie-d-fullwidth .perf-label {
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    margin-top: 5px;
}

/* ==========================================================================
   CALENDARIO SHORTCODE
   ========================================================================== */

.serie-d-fullwidth .calendario-wrapper {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 60px 40px;
    border-top: 6px solid #10b981;
    border-bottom: 6px solid #10b981;
}

.serie-d-fullwidth .calendario-title {
    text-align: center;
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #10b981, #059669);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 50px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.serie-d-fullwidth .partite-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 25px !important;
    margin-top: 40px !important;
}

.serie-d-fullwidth .partita-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
    border-left: 8px solid #3b82f6;
    min-height: 180px;
}

.serie-d-fullwidth .partita-card.giocata {
    border-left-color: #10b981;
}

.serie-d-fullwidth .partita-card.rinviata {
    border-left-color: #f59e0b;
}

.serie-d-fullwidth .partita-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
}

.serie-d-fullwidth .partita-header {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.serie-d-fullwidth .giornata-badge {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.serie-d-fullwidth .data-partita {
    color: #64748b;
    font-weight: 700;
    font-size: 0.9rem;
}

.serie-d-fullwidth .partita-content {
    padding: 25px 20px;
}

.serie-d-fullwidth .match-display {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.serie-d-fullwidth .team-info {
    text-align: center;
}

.serie-d-fullwidth .team-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 12px;
    line-height: 1.2;
}

.serie-d-fullwidth .team-score {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.3rem;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

.serie-d-fullwidth .match-separator {
    text-align: center;
}

.serie-d-fullwidth .match-time {
    background: linear-gradient(135deg, #64748b, #475569);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.serie-d-fullwidth .match-status {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.serie-d-fullwidth .match-status.rinviata {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

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

/* 3 COLONNE su schermi medi */
@media (max-width: 1400px) {
    .serie-d-fullwidth .giocatori-grid,
    .serie-d-fullwidth .partite-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* 2 COLONNE su tablet */
@media (max-width: 1024px) {
    .serie-d-fullwidth .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .serie-d-fullwidth .giocatori-grid,
    .serie-d-fullwidth .partite-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
    
    .serie-d-fullwidth .classifica-wrapper,
    .serie-d-fullwidth .rosa-wrapper,
    .serie-d-fullwidth .calendario-wrapper {
        padding: 50px 20px;
    }
    
    .serie-d-fullwidth .classifica-title,
    .serie-d-fullwidth .rosa-title,
    .serie-d-fullwidth .calendario-title {
        font-size: 3rem;
        letter-spacing: 2px;
    }
}

/* 1 COLONNA su mobile */
@media (max-width: 768px) {
    .serie-d-fullwidth .serie-d-dashboard {
        padding: 60px 20px;
    }
    
    .serie-d-fullwidth .dashboard-title {
        font-size: 2.5rem;
    }
    
    .serie-d-fullwidth .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .serie-d-fullwidth .dashboard-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .serie-d-fullwidth .btn-dashboard {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
    
    .serie-d-fullwidth .giocatori-grid,
    .serie-d-fullwidth .partite-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .serie-d-fullwidth .classifica-wrapper,
    .serie-d-fullwidth .rosa-wrapper,
    .serie-d-fullwidth .calendario-wrapper {
        padding: 40px 15px;
    }
    
    .serie-d-fullwidth .classifica-title,
    .serie-d-fullwidth .rosa-title,
    .serie-d-fullwidth .calendario-title {
        font-size: 2.5rem;
        letter-spacing: 1px;
    }
    
    .serie-d-fullwidth .classifica-table {
        min-width: 600px;
    }
    
    .serie-d-fullwidth .position-badge {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .serie-d-fullwidth .numero-maglia {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .serie-d-fullwidth .giocatore-nome {
        font-size: 1.2rem;
    }
    
    .serie-d-fullwidth .giocatore-card {
        min-height: 420px;
    }
    
    .serie-d-fullwidth .performance-stats {
        gap: 15px;
    }
    
    .serie-d-fullwidth .perf-number {
        font-size: 1.8rem;
    }
}

/* Desktop Large - 5 COLONNE */
@media (min-width: 1600px) {
    .serie-d-fullwidth .giocatori-grid,
    .serie-d-fullwidth .partite-grid {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 30px !important;
    }
}