:root {
    --ptc-bg: rgba(10, 13, 12, 0.90);
    --ptc-bg-soft: rgba(255,255,255,0.055);
    --ptc-border: rgba(255,255,255,0.11);
    --ptc-text: #ffffff;
    --ptc-muted: rgba(255,255,255,0.68);
    --ptc-green: #18994d;
    --ptc-red: #d51028;
}

.ptc-dashboard,
.ptc-dashboard * { box-sizing: border-box; }

.ptc-dashboard {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    font-family: inherit;
    color: var(--ptc-text);
}

.ptc-match-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-bottom: 24px;
}

.ptc-card {
    position: relative;
    overflow: hidden;
    color: var(--ptc-text);
    background:
        radial-gradient(circle at top right, rgba(24,153,77,.14), transparent 38%),
        linear-gradient(145deg, rgba(11,14,13,.94), rgba(18,20,19,.88));
    border: 1px solid var(--ptc-border);
    border-radius: 24px;
    box-shadow: 0 18px 45px rgba(0,0,0,.24);
}

.ptc-card::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--ptc-green) 0 50%, var(--ptc-red) 50% 100%);
}

.ptc-match-card { padding: 25px 26px 21px; text-align: center; }

.ptc-eyebrow {
    color: var(--ptc-muted);
    font-size: 11px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 1.55px;
    text-transform: uppercase;
}

.ptc-match-date {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 750;
    color: rgba(255,255,255,.90);
}

.ptc-match-grid {
    display: grid;
    grid-template-columns: minmax(0,1fr) 92px minmax(0,1fr);
    gap: 12px;
    align-items: center;
    margin-top: 22px;
}

.ptc-team { min-width: 0; }
.ptc-team-name {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 15px;
    line-height: 1.15;
    font-weight: 850;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.ptc-logo-box {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.ptc-logo-box img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.ptc-score-zone { min-width: 0; }
.ptc-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-size: 38px;
    line-height: 1;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}
.ptc-score b { color: rgba(255,255,255,.46); font-weight: 500; }

.ptc-vs {
    width: 58px;
    height: 58px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ptc-border);
    border-radius: 50%;
    background: var(--ptc-bg-soft);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 1px;
}

.ptc-status {
    margin-top: 8px;
    color: var(--ptc-muted);
    font-size: 11px;
    line-height: 1.2;
}

.ptc-scorers {
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,.08);
    color: rgba(255,255,255,.83);
    font-size: 12px;
    line-height: 1.5;
}

.ptc-source {
    margin-top: 15px;
    color: rgba(255,255,255,.38);
    font-size: 10px;
    letter-spacing: .35px;
}

.ptc-standings-card { padding: 24px 24px 18px; }
.ptc-standings-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}
.ptc-standings-head h3 {
    margin: 5px 0 0;
    color: #fff;
    font-size: 28px;
    line-height: 1.05;
    font-weight: 900;
}
.ptc-standings-head .ptc-source { margin: 0; }


/* =========================
   LEGENDA E ZONE CLASSIFICA
   ========================= */
.ptc-zone-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px 16px;
    margin: -2px 0 14px;
    color: rgba(255,255,255,.66);
    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;
}

.ptc-zone-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.ptc-zone-dot {
    width: 9px;
    height: 9px;
    display: inline-block;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(255,255,255,.06);
}

.ptc-zone-dot-promotion { background: #25c76f; }
.ptc-zone-dot-playoff { background: #3b9df5; }
.ptc-zone-dot-playout { background: #f3a62f; }
.ptc-zone-dot-relegation { background: #ef4b4b; }

.ptc-zone-promotion { --ptc-zone-color: #25c76f; --ptc-zone-tint: rgba(37,199,111,.075); }
.ptc-zone-playoff { --ptc-zone-color: #3b9df5; --ptc-zone-tint: rgba(59,157,245,.07); }
.ptc-zone-playout { --ptc-zone-color: #f3a62f; --ptc-zone-tint: rgba(243,166,47,.075); }
.ptc-zone-relegation { --ptc-zone-color: #ef4b4b; --ptc-zone-tint: rgba(239,75,75,.08); }

.ptc-table tr[class*="ptc-zone-"] td {
    background: linear-gradient(90deg, var(--ptc-zone-tint), rgba(255,255,255,.055) 24%);
}

.ptc-table tr[class*="ptc-zone-"] td:first-child,
.ptc-mobile-row[class*="ptc-zone-"] {
    position: relative;
}

.ptc-table tr[class*="ptc-zone-"] td:first-child::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--ptc-zone-color);
}

.ptc-table tr[class*="ptc-zone-"] .ptc-col-pos span,
.ptc-mobile-row[class*="ptc-zone-"] .ptc-mobile-pos {
    color: var(--ptc-zone-color);
}

.ptc-mobile-row[class*="ptc-zone-"] {
    background: linear-gradient(90deg, var(--ptc-zone-tint), rgba(255,255,255,.055) 30%);
}

.ptc-mobile-row[class*="ptc-zone-"]::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--ptc-zone-color);
}

/* L'evidenziazione Pontevecchio resta visibile senza nascondere la zona sportiva. */
.ptc-table tr.ptc-highlight td,
.ptc-mobile-row.ptc-highlight-mobile {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.10);
}

.ptc-zone-note {
    margin: 11px 2px 0;
    color: rgba(255,255,255,.38);
    font-size: 9px;
    line-height: 1.35;
}

/* =========================
   CLASSIFICA DESKTOP
   ========================= */
.ptc-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ptc-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0 6px;
    color: #fff;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.ptc-table th {
    padding: 9px 8px;
    color: rgba(255,255,255,.52);
    font-size: 10px;
    line-height: 1;
    letter-spacing: .75px;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
}

.ptc-table th.ptc-col-team { text-align: left; }

.ptc-table .ptc-col-pos { width: 48px; }
.ptc-table .ptc-col-team { width: 34%; }
.ptc-table .ptc-col-points { width: 62px; }
.ptc-table .ptc-col-played,
.ptc-table .ptc-col-wins,
.ptc-table .ptc-col-draws,
.ptc-table .ptc-col-losses,
.ptc-table .ptc-col-for,
.ptc-table .ptc-col-against,
.ptc-table .ptc-col-diff { width: 54px; }

.ptc-table td {
    padding: 12px 8px;
    background: rgba(255,255,255,.055);
    border-top: 1px solid rgba(255,255,255,.045);
    border-bottom: 1px solid rgba(255,255,255,.045);
    text-align: center;
    font-weight: 650;
    vertical-align: middle;
}

.ptc-table td:first-child {
    border-left: 1px solid rgba(255,255,255,.045);
    border-radius: 12px 0 0 12px;
}

.ptc-table td:last-child {
    border-right: 1px solid rgba(255,255,255,.045);
    border-radius: 0 12px 12px 0;
}

.ptc-table td.ptc-col-pos {
    color: rgba(255,255,255,.54);
    font-weight: 800;
}

.ptc-table td.ptc-col-team {
    text-align: left;
    font-weight: 800;
    white-space: normal;
}

.ptc-table td.ptc-col-points {
    font-weight: 950;
    font-size: 15px;
    color: #fff;
}

.ptc-team-cell-content {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.ptc-team-cell-content > span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.ptc-mini-logo {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: block;
    object-fit: contain;
}

.ptc-mini-logo-placeholder {
    border-radius: 50%;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.06);
}

.ptc-table tr.ptc-highlight td {
    background: linear-gradient(90deg, rgba(20,143,72,.22), rgba(204,16,46,.14));
    border-top-color: rgba(255,255,255,.12);
    border-bottom-color: rgba(255,255,255,.12);
}

.ptc-table tr.ptc-highlight td:first-child {
    border-left-color: rgba(37,199,111,.45);
}

/* =========================
   CLASSIFICA MOBILE
   ========================= */
.ptc-standings-mobile { display: none; }

.ptc-mobile-head,
.ptc-mobile-row {
    display: grid;
    grid-template-columns: 38px minmax(0,1fr) 44px 52px;
    align-items: center;
    gap: 8px;
}

.ptc-mobile-head {
    padding: 0 12px 8px;
    color: rgba(255,255,255,.46);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .7px;
    text-transform: uppercase;
}

.ptc-mobile-head span:nth-child(1),
.ptc-mobile-head span:nth-child(3),
.ptc-mobile-head span:nth-child(4) { text-align: center; }

.ptc-mobile-row {
    min-height: 64px;
    margin-bottom: 7px;
    padding: 9px 12px;
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(255,255,255,.05);
    border-radius: 14px;
}

.ptc-mobile-pos {
    color: rgba(255,255,255,.52);
    font-size: 12px;
    font-weight: 900;
    text-align: center;
}

.ptc-mobile-team {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    color: #fff;
    font-size: 13px;
    line-height: 1.18;
    font-weight: 800;
}

.ptc-mobile-team > span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.ptc-mobile-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
}

.ptc-mobile-stat-label {
    display: none;
    color: rgba(255,255,255,.42);
    font-size: 8px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .5px;
}

.ptc-mobile-stat strong {
    color: rgba(255,255,255,.82);
    font-size: 13px;
    line-height: 1;
    font-weight: 800;
}

.ptc-mobile-points strong {
    color: #fff;
    font-size: 17px;
    font-weight: 950;
}

.ptc-highlight-mobile {
    border-color: rgba(255,255,255,.14);
}

.ptc-fallback {
    width: 100%;
    overflow-x: auto;
    text-align: center;
}
.ptc-fallback iframe { display: block; max-width: none; margin: 0 auto; }

@media (max-width: 900px) and (min-width: 761px) {
    .ptc-table { font-size: 12px; }
    .ptc-table .ptc-col-team { width: 30%; }
    .ptc-table .ptc-col-played,
    .ptc-table .ptc-col-wins,
    .ptc-table .ptc-col-draws,
    .ptc-table .ptc-col-losses,
    .ptc-table .ptc-col-for,
    .ptc-table .ptc-col-against,
    .ptc-table .ptc-col-diff { width: 48px; }
}

@media (max-width: 760px) {
    .ptc-match-row { grid-template-columns: 1fr; gap: 16px; }
    .ptc-card { border-radius: 20px; }
    .ptc-match-card { padding: 22px 16px 19px; }
    .ptc-match-grid { grid-template-columns: minmax(0,1fr) 68px minmax(0,1fr); gap: 7px; }
    .ptc-team-name { min-height: 36px; font-size: 13px; }
    .ptc-logo-box { width: 82px; height: 82px; }
    .ptc-score { font-size: 31px; gap: 6px; }
    .ptc-vs { width: 46px; height: 46px; font-size: 11px; }

    .ptc-standings-card { padding: 20px 12px 14px; }
    .ptc-standings-head { align-items: flex-start; margin-bottom: 14px; }
    .ptc-standings-head h3 { font-size: 24px; }
    .ptc-zone-legend { gap: 8px 12px; margin-bottom: 12px; font-size: 9px; }
    .ptc-table-desktop-wrap { display: none; }
    .ptc-standings-mobile { display: block; }
    .ptc-mini-logo { width: 28px; height: 28px; flex-basis: 28px; }
}

@media (max-width: 390px) {
    .ptc-match-grid { grid-template-columns: minmax(0,1fr) 54px minmax(0,1fr); }
    .ptc-team-name { font-size: 12px; }
    .ptc-logo-box { width: 72px; height: 72px; }
    .ptc-score { font-size: 27px; }
    .ptc-standings-head .ptc-source { display: none; }

    .ptc-mobile-head,
    .ptc-mobile-row {
        grid-template-columns: 32px minmax(0,1fr) 38px 46px;
        gap: 6px;
    }
    .ptc-mobile-row { padding-left: 9px; padding-right: 9px; }
    .ptc-mobile-team { font-size: 12px; gap: 7px; }
    .ptc-mini-logo { width: 25px; height: 25px; flex-basis: 25px; }
    .ptc-mobile-points strong { font-size: 16px; }
}

/* ======================================================
   HOME - PROSSIMA PARTITA AUTOMATICA
   Shortcode: [ponte_home_prossima_partita]
   ====================================================== */
.ptc-home-match-card,
.ptc-home-match-card * {
    box-sizing: border-box;
}

.ptc-home-match-card {
    width: min(720px, calc(100% - 40px));
    margin: 20px auto 35px;
    padding: 28px 34px 30px;
    color: #fff;
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
    background: rgba(5, 7, 8, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 24px;
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.ptc-home-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    padding: 8px 15px;
    font-size: 12px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 1.8px;
    color: #fff;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    text-transform: uppercase;
}

.ptc-home-teams {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
}

.ptc-home-team {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.ptc-home-team-name {
    width: 100%;
    min-height: 44px;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.ptc-home-logo {
    width: 115px;
    height: 115px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ptc-home-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.ptc-home-vs {
    width: 55px;
    height: 55px;
    margin: 30px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.90);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
}

.ptc-home-info {
    margin-top: 25px;
}

.ptc-home-date {
    margin: 0;
    font-size: 26px;
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.ptc-home-time {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 9px;
    font-size: 20px;
    line-height: 1;
    font-weight: 800;
}

.ptc-home-location {
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.82);
}

.ptc-home-location strong,
.ptc-home-location span {
    display: block;
}

.ptc-home-location strong {
    color: #fff;
    font-size: 15px;
    line-height: 1.35;
}

.ptc-home-divider {
    width: 42px;
    height: 3px;
    margin: 21px auto;
    background: linear-gradient(90deg, #008f45 0%, #008f45 48%, #d71920 52%, #d71920 100%);
    border-radius: 10px;
}

.ptc-home-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 27px;
    color: #fff !important;
    background: linear-gradient(135deg, #cc0715, #fa1a22);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 13px;
    box-shadow: 0 8px 25px rgba(216, 0, 18, 0.28);
    font-size: 15px;
    line-height: 1;
    font-weight: 800;
    text-decoration: none !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.ptc-home-button:hover {
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(216, 0, 18, 0.40);
    filter: brightness(1.06);
}

@media (max-width: 768px) {
    .ptc-home-match-card {
        width: calc(100% - 32px);
        max-width: 620px;
        margin: 22px auto 28px;
        padding: 25px 24px 27px;
        border-radius: 21px;
    }

    .ptc-home-teams { gap: 14px; }
    .ptc-home-logo { width: 100px; height: 100px; }
    .ptc-home-team-name { min-height: 38px; font-size: 15px; }
    .ptc-home-date { font-size: 23px; }
}

@media (max-width: 520px) {
    .ptc-home-match-card {
        width: calc(100% - 34px);
        margin: 15px auto 25px;
        padding: 21px 15px 23px;
        background: rgba(5, 7, 8, 0.40);
        border-radius: 20px;
        -webkit-backdrop-filter: blur(6px);
        backdrop-filter: blur(6px);
    }

    .ptc-home-label {
        margin-bottom: 17px;
        padding: 7px 13px;
        font-size: 10px;
        letter-spacing: 1.5px;
    }

    .ptc-home-teams {
        grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
        gap: 7px;
    }

    .ptc-home-team-name {
        min-height: 36px;
        margin-bottom: 8px;
        font-size: 14px;
        line-height: 1.15;
    }

    .ptc-home-logo { width: 88px; height: 88px; }

    .ptc-home-vs {
        width: 39px;
        height: 39px;
        margin-top: 25px;
        font-size: 11px;
    }

    .ptc-home-info { margin-top: 20px; }

    .ptc-home-date {
        font-size: 20px;
        line-height: 1.15;
        letter-spacing: 0.3px;
    }

    .ptc-home-time { margin-top: 8px; font-size: 18px; }
    .ptc-home-location { margin-top: 13px; font-size: 12px; line-height: 1.4; }
    .ptc-home-location strong { font-size: 13px; }
    .ptc-home-divider { margin: 17px auto; }

    .ptc-home-button {
        width: 100%;
        max-width: 290px;
        padding: 14px 16px;
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    .ptc-home-match-card {
        width: calc(100% - 24px);
        padding-left: 11px;
        padding-right: 11px;
    }

    .ptc-home-teams {
        grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr);
        gap: 5px;
    }

    .ptc-home-team-name { font-size: 12px; }
    .ptc-home-logo { width: 76px; height: 76px; }
    .ptc-home-vs { width: 34px; height: 34px; font-size: 10px; }
    .ptc-home-date { font-size: 18px; }
}
