/* ==========================================================================
   SP_LEGA_DIES - Super Lega Dies
   38 giornate + classifica progressiva con Media Inglese
   Palette: indigo/navy + crema pesca + accento arancio
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700;9..144,900&family=Inter:wght@400;500;600;700&display=swap');

.sld-container {
    --sld-indigo: #4338ca;
    --sld-navy: #1c2b57;
    --sld-navy-dark: #131e3d;
    --sld-orange: #e8590c;
    --sld-peach: #fbe9d8;
    --sld-cream: #fdf7ef;
    --sld-ink: #22201c;
    --sld-muted: #6f6a63;
    --sld-white: #ffffff;
    --sld-line: #f0e2cd;

    max-width: 1100px;
    margin: 28px auto;
    padding: 0 16px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--sld-ink);
}

.sld-error {
    background: #fdecea;
    color: #8c1d17;
    padding: 18px 22px;
    border-radius: 12px;
    border: 1px solid #f3c6c2;
    font-weight: 600;
    text-align: center;
    max-width: 1100px;
    margin: 28px auto;
}

/* ---------------------------------------------------------------------- */
/* Navigazione rapida giornate                                             */
/* ---------------------------------------------------------------------- */

.sld-quicknav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 30px;
    padding: 12px;
    background: var(--sld-cream);
    border-radius: 14px;
    border: 1px solid var(--sld-line);
    max-height: 96px;
    overflow-y: auto;
}

.sld-quicknav-pill {
    display: inline-block;
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--sld-white);
    border: 1px solid var(--sld-line);
    color: var(--sld-navy);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.sld-quicknav-pill:hover {
    background: var(--sld-indigo);
    color: #ffffff;
    border-color: var(--sld-indigo);
}

/* ---------------------------------------------------------------------- */
/* Blocco giornata                                                         */
/* ---------------------------------------------------------------------- */

.sld-giornata {
    margin-bottom: 54px;
    scroll-margin-top: 24px;
}

.sld-giornata-title {
    text-align: center;
    margin-bottom: 16px;
}

.sld-giornata-title h2 {
    margin: 0;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 800;
    font-size: 24px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--sld-indigo);
}

/* ---------------------------------------------------------------------- */
/* Fixture della giornata                                                  */
/* ---------------------------------------------------------------------- */

.sld-fixtures {
    background: var(--sld-white);
    border-radius: 14px;
    border: 1px solid var(--sld-line);
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(28, 43, 87, 0.06);
    margin-bottom: 22px;
}

.sld-fixture-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 13px 20px;
    border-bottom: 1px solid var(--sld-line);
}

.sld-fixture-row:last-child {
    border-bottom: none;
}

.sld-fixture-row:nth-child(even) {
    background: var(--sld-peach);
}

.sld-fixture-team {
    font-weight: 600;
    font-size: 14.5px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--sld-navy);
}

.sld-fixture-home {
    text-align: right;
}

.sld-fixture-away {
    text-align: left;
}

.sld-fixture-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 60px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--sld-navy);
    color: #ffffff;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 700;
    font-size: 14px;
}

.sld-fixture-sep {
    opacity: 0.7;
}

.sld-fixture-vs {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #ffffff;
}

.sld-fixture-date {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--sld-muted);
    white-space: nowrap;
    text-align: right;
    min-width: 70px;
}

/* ---------------------------------------------------------------------- */
/* Titolo Classifica                                                       */
/* ---------------------------------------------------------------------- */

.sld-classifica-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px 4px;
}

.sld-bullet {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--sld-orange);
    flex-shrink: 0;
}

.sld-classifica-title h3 {
    margin: 0;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 700;
    font-size: 17px;
    color: var(--sld-navy);
}

/* ---------------------------------------------------------------------- */
/* Tabella classifica                                                      */
/* ---------------------------------------------------------------------- */

.sld-table-wrapper {
    background: var(--sld-white);
    border-radius: 14px;
    border: 1px solid var(--sld-line);
    overflow: hidden;
    overflow-x: auto;
    box-shadow: 0 6px 18px rgba(28, 43, 87, 0.06);
}

.sld-standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    min-width: 780px;
}

.sld-standings-table thead th {
    background: var(--sld-navy);
    color: #d9def0;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 13px 12px;
    text-align: center;
    white-space: nowrap;
}

.sld-standings-table th.sld-col-team,
.sld-standings-table td.sld-col-team {
    text-align: left;
}

.sld-standings-table td {
    padding: 11px 12px;
    text-align: center;
    border-bottom: 1px solid var(--sld-line);
    color: var(--sld-ink);
}

.sld-standings-table tbody tr:last-child td {
    border-bottom: none;
}

.sld-standings-table tbody tr:nth-child(even) {
    background: var(--sld-peach);
}

.sld-col-pos {
    width: 36px;
    font-weight: 700;
    color: var(--sld-navy);
}

.sld-col-team {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-size: 14px;
    color: var(--sld-navy);
}

.sld-col-points {
    font-weight: 800;
    color: var(--sld-orange);
    background: rgba(232, 89, 12, 0.1);
}

.sld-row-first td {
    background: rgba(232, 89, 12, 0.1);
}

.sld-row-first .sld-col-points {
    background: rgba(232, 89, 12, 0.22);
}

/* ---------------------------------------------------------------------- */
/* Responsive                                                              */
/* ---------------------------------------------------------------------- */

@media (max-width: 620px) {
    .sld-fixture-row {
        grid-template-columns: 1fr auto 1fr;
        row-gap: 6px;
    }

    .sld-fixture-date {
        grid-column: 1 / -1;
        text-align: center;
        min-width: 0;
    }

    .sld-giornata-title h2 {
        font-size: 20px;
    }
}
