/* ==========================================================================
   Tabellone Madness/Final Four: usato da [tabellone_bracket] e dagli alberi del Crystal Ball
   ========================================================================== */

/* =========================================
   3. MASTER BRACKET SCHEME (UFFICIALE)
========================================= */
.rsc-master-wrapper {
    width: 100%;
    overflow-x: auto;
    padding: 20px 0;
    -webkit-overflow-scrolling: touch;
}
.rsc-master-grid {
    display: grid;
    grid-template-columns: 1fr 320px 1fr;
    gap: 25px;
    min-width: 1380px;
    align-items: center;
}
.rsc-col-side {
    display: flex;
    flex-direction: column;
    gap: 40px;
}
.rsc-block-box {
    display: flex !important;
    flex-direction: column !important;
    margin-bottom: 20px !important;
}
.rsc-block-title {
    font-family: var(--e-global-typography-2f375f0-font-family), sans-serif;
    font-size: 14px;
    font-weight: 900;
    color: var(--e-global-color-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}
.rsc-col-right .rsc-block-title {
    text-align: right;
}
/* =========================================
   4. ALBERI TREE UFFICIALI (SCHEDA TORNEO)
========================================= */
.rsc-tree-container {
    display: flex !important;
    gap: 20px !important;
    align-items: stretch !important;
    height: 280px !important;
    width: 100% !important;
}
.rsc-tree-container.is-reversed {
    flex-direction: row-reverse !important;
}
.rsc-tree-round {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-around !important;
    height: 100% !important;
    flex: 1 1 0px !important;
    margin: 0 !important;
    padding: 0 !important;
}
.rsc-tree-round:has(> .rsc-micro-card:only-child) {
    justify-content: center !important;
}
.rsc-micro-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    margin: 0 !important;
    width: 100%;
}
.rsc-micro-card.is-played {
    border-color: var(--e-global-color-primary);
}
.rsc-micro-team {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 700;
    color: #334155;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}
.rsc-micro-team:last-child {
    border-bottom: none;
}
.rsc-micro-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}
.rsc-micro-team.is-win {
    background: rgba(122, 0, 38, 0.06);
    color: var(--e-global-color-primary);
}
.rsc-micro-team.is-win .rsc-micro-score {
    background: var(--e-global-color-primary);
    color: #ffffff;
}
.rsc-micro-score {
    font-size: 11px;
    font-weight: 900;
    background: #f1f5f9;
    padding: 1px 6px;
    border-radius: 4px;
}
/* =========================================
   5. FINAL FOUR UFFICIALE (TORNEO)
========================================= */
.rsc-col-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--e-global-color-primary);
    padding: 20px 15px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.rsc-col-center.is-locked {
    filter: grayscale(1);
}
.rsc-ff-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 20px;
}
.rsc-ff-block {
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
}
.rsc-ff-semi-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}
.rsc-ff-match-label {
    font-size: 10px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    text-align: center;
    background: rgba(220, 169, 44, 0.12);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(220, 169, 44, 0.25);
}
.rsc-ff-final-box.rsc-gold-championship {
    background: linear-gradient(145deg, var(--e-global-color-primary) 0%, #4b000f 100%);
    border: 2px solid #f59e0b;
    border-radius: 16px;
    padding: 16px 12px;
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.35), inset 0 0 15px rgba(245, 158, 11, 0.15);
    position: relative;
    overflow: hidden;
}
.rsc-ff-final-box.rsc-gold-championship::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(254, 240, 138, 0.1) 0%, transparent 60%);
    pointer-events: none;
}
.rsc-gold-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 10px;
}
.rsc-gold-icon { font-size: 14px; }
.rsc-ff-badge-gold {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.5px;
    background: linear-gradient(90deg, #fef08a 0%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}
.rsc-gold-championship .rsc-micro-card {
    border: 1px solid #d97706;
    background: var(--e-global-color-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.rsc-gold-championship .rsc-micro-team {
    background: var(--e-global-color-primary);
    color: #f8fafc;
    border-bottom-color: #4b000f;
}
.rsc-gold-championship .rsc-micro-name {
    color: #fef08a;
    font-weight: 800;
}
.rsc-gold-championship .rsc-micro-score {
    background: #1e293b;
    color: #f59e0b;
}
.rsc-winner-trophy-gold {
    margin-top: 14px;
    background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
    color: #ffffff;
    font-weight: 900;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.5), 0 0 0 2px #fef08a;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.rsc-winner-trophy-gold .trophy-symbol { font-size: 16px; }
/* =========================================
   6. RESPONSIVE MOBILE OVERRIDES (TORNEO)
========================================= */
.rsc-mobile-tabs-nav { display: none; }
@media (max-width: 1024px) {
    .rsc-mobile-tabs-nav {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 10px 0 15px 0;
        margin-bottom: 20px;
        -webkit-overflow-scrolling: touch;
        border-bottom: 2px solid #e2e8f0;
    }

    .rsc-tab-btn {
        background: #f1f5f9;
        color: #475569;
        border: 1px solid #cbd5e1;
        padding: 8px 14px;
        border-radius: 20px;
        font-family: var(--e-global-typography-2f375f0-font-family), sans-serif;
        font-size: 11px;
        font-weight: 800;
        white-space: nowrap;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .rsc-tab-btn.active {
        background: var(--e-global-color-primary);
        color: #ffffff;
        border-color: var(--e-global-color-primary);
        box-shadow: 0 4px 10px rgba(122, 0, 38, 0.25);
    }

    .rsc-mobile-tabs-nav .rsc-tab-btn:focus,
    .rsc-mobile-tabs-nav .rsc-tab-btn:hover {
        background: var(--e-global-color-primary) !important;
        color: #ffffff !important;
    }

    .rsc-tab-btn.highlight-ff { border-color: #f59e0b; color: #b45309; }
    .rsc-tab-btn.highlight-ff.active {
        background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
        color: #ffffff;
        box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    }

    .rsc-master-grid { display: block !important; min-width: 100% !important; width: 100% !important; }
    .rsc-col-side, .rsc-col-center { width: 100% !important; margin: 0 !important; }
    .rsc-tab-content { display: none !important; }
    .rsc-tab-content.rsc-mobile-active { display: flex !important; flex-direction: column !important; width: 100% !important; }
    .rsc-col-right .rsc-block-title { text-align: left !important; }

    .rsc-tree-container, .rsc-tree-container.is-reversed {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        min-height: auto !important;
        gap: 20px !important;
        padding: 10px 0 !important;
        width: 100% !important;
    }

    .rsc-tree-round {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 10px !important;
        height: auto !important;
        min-height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .rsc-tree-round:nth-child(1)::before {
        content: 'QUARTI DI FINALE';
        display: block;
        font-family: var(--e-global-typography-2f375f0-font-family), sans-serif;
        font-size: 11px;
        font-weight: 900;
        color: var(--e-global-color-primary);
        letter-spacing: 1px;
        margin-bottom: 2px;
    }

    .rsc-tree-round:nth-child(2)::before {
        content: 'SEMIFINALI';
        display: block;
        font-family: var(--e-global-typography-2f375f0-font-family), sans-serif;
        font-size: 11px;
        font-weight: 900;
        color: var(--e-global-color-primary);
        letter-spacing: 1px;
        margin-bottom: 2px;
        margin-top: 10px;
    }

    .rsc-tree-round:nth-child(3)::before {
        content: 'FINALE MADNESS';
        display: block;
        font-family: var(--e-global-typography-2f375f0-font-family), sans-serif;
        font-size: 11px;
        font-weight: 900;
        color: #f59e0b;
        letter-spacing: 1px;
        margin-bottom: 2px;
        margin-top: 10px;
    }

    .rsc-micro-card {
        flex: 1 1 100% !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 10px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
    }

    .rsc-micro-team { padding: 10px 14px !important; font-size: 13px !important; }
    .rsc-micro-name { max-width: none !important; width: auto !important; font-size: 12px !important; white-space: normal !important; overflow: visible !important; }
    .rsc-micro-score { font-size: 13px !important; padding: 3px 8px !important; }
    .rsc-ff-block { gap: 16px !important; }
    .rsc-ff-final-box.rsc-gold-championship { padding: 16px 12px !important; }
}
/* Vincitore Torneo Sbagliato / Busted */
.rsc-champ-name-display.is-wrong-text {
    text-decoration: line-through !important;
    color: #94a3b8 !important;
    opacity: 0.7 !important;
}
/* =========================================
   STILI PER IL BOX TROFEO (VINCITRICE TORNEO)
========================================= */
/* 1. Trofeo quando la squadra pronosticata è SBAGLIATA / ELIMINATA */
.rsc-winner-trophy-gold.is-wrong {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%) !important;
    border: 1px solid #475569 !important;
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.6) !important;
    opacity: 0.75 !important;
}
.rsc-winner-trophy-gold.is-wrong .trophy-text,
.rsc-winner-trophy-gold.is-wrong .rsc-champ-name-display {
    color: #94a3b8 !important;
    text-decoration: line-through !important;
}
.rsc-winner-trophy-gold.is-wrong .trophy-symbol {
    filter: grayscale(100%) opacity(0.5);
}
/* 2. Trofeo quando il pronostico è ESATTO (Verde Vittoria Neon) */
.rsc-winner-trophy-gold.is-correct {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%) !important;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.7), 0 0 0 2px #34d399 !important;
}
.rsc-winner-trophy-gold.is-correct .rsc-champ-name-display {
    color: #ffffff !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.6) !important;
}

/* ==========================================================================
   "GAME ON" (novembre 2026): pagina Tabellone Madness (Elementor 84068) come la tavola del mockup.
   Solo dentro .elementor-84068: gli alberi del Bracket Game (Crystal Ball, rimandato) restano com'erano.
   Partite = mini tabelloni LED con il bordo della fase (ottavi bronzo, quarti argento, Final Four oro).
   ========================================================================== */
/* niente hero generico dell'header: il titolo della pagina fa da hero */
body.page-id-84068 .elementor-element-2ee6e959 { display: none !important; }

.elementor-84068 .elementor-element-c8a8ebd .elementor-heading-title {
    text-align: center !important;
    font-family: var(--rsc-font-display) !important;
    font-size: 110px !important;
    font-weight: 900 !important;
    font-style: italic !important;
    letter-spacing: -.01em !important;
    text-transform: uppercase !important;
    line-height: .9 !important;
    background: linear-gradient(180deg, #FFF1C2 0%, #FFD978 40%, #C08E1F 60%, #FFE7A1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    padding: 0 .08em;
}

/* Campo da basket dietro tutto il tabellone (decorazione) */
.elementor-84068 .rsc-master-wrapper { position: relative; overflow-x: auto; padding: 20px 0 40px; }
.elementor-84068 .rsc-master-grid {
    position: relative;
    grid-template-columns: 1fr 300px 1fr;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 120'%3E%3Cpath d='M4 4h192v112H4zM100 4v112M4 40h34v40H4zM196 40h-34v40h34zM38 60m-14 0a14 14 0 1 0 28 0a14 14 0 1 0-28 0M162 60m-14 0a14 14 0 1 0 28 0a14 14 0 1 0-28 0M100 60m-16 0a16 16 0 1 0 32 0a16 16 0 1 0-32 0M4 14h18c40 0 62 20 62 46s-22 46-62 46H4M196 14h-18c-40 0-62 20-62 46s22 46 62 46h18' fill='none' stroke='rgba(230,184,74,.16)' stroke-width='1.2'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

/* Titoli dei blocchi: "MADNESS 1" in etichetta oro */
.elementor-84068 .rsc-block-title {
    font-family: var(--rsc-font-titolo) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: .08em !important;
    text-transform: uppercase;
    color: #FFD978 !important;
}

/* Partita = mini tabellone LED */
.elementor-84068 .rsc-micro-card {
    background-color: #0B0204 !important;
    background-image: radial-gradient(rgba(255, 217, 120, .07) 1px, transparent 1.4px) !important;
    background-size: 5px 5px !important;
    border: 0 !important;
    border-left: 3px solid #E0A574 !important;   /* ottavi: bronzo */
    border-radius: 8px !important;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, .8), 0 0 0 1px #3A0A16 !important;
    overflow: hidden;
}
.elementor-84068 .rsc-tree-round:nth-child(2) .rsc-micro-card { border-left-color: #F5F7FA !important; }   /* quarti: argento */
.elementor-84068 .rsc-tree-round:nth-child(3) .rsc-micro-card { border-left-color: #FFE08A !important; }   /* semifinali: oro */
.elementor-84068 .rsc-micro-team {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 244, 230, .08) !important;
    padding: 6px 10px !important;
}
.elementor-84068 .rsc-micro-team:last-child { border-bottom: 0 !important; }
.elementor-84068 .rsc-micro-name {
    font-family: var(--rsc-font-display) !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    font-style: italic;
    letter-spacing: -.01em;
    text-transform: uppercase;
    color: #C9A9AE !important;
}
.elementor-84068 .rsc-micro-score {
    background: none !important;
    font-family: "Doto", "Courier New", monospace !important;
    font-size: 18px !important;
    font-weight: 900 !important;
    color: #8A5A2A !important;
    padding: 0 !important;
    min-width: 2ch;
    text-align: right;
}
.elementor-84068 .rsc-micro-team.is-win { background: transparent !important; }
.elementor-84068 .rsc-micro-team.is-win .rsc-micro-name { color: #FFF4E6 !important; }
.elementor-84068 .rsc-micro-team.is-win .rsc-micro-score { color: #FFB547 !important; text-shadow: 0 0 8px rgba(255, 160, 40, .7); }
.elementor-84068 .rsc-micro-card.is-my-school, .elementor-84068 .rsc-micro-team.is-my-school { box-shadow: inset 0 0 0 2px #FFF4E6 !important; }

/* Centro: Final Four su fondo trasparente, finale con cornice leggendaria */
.elementor-84068 .rsc-col-center {
    background: rgba(30, 5, 11, .75) !important;
    border: 1px solid rgba(230, 184, 74, .35);
    border-radius: 0 !important;
    box-shadow: none !important;
    clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}
.elementor-84068 .rsc-col-center.is-locked { filter: none; }
.elementor-84068 .rsc-ff-title {
    font-family: var(--rsc-font-display) !important;
    font-size: 30px !important;
    font-weight: 900 !important;
    font-style: italic;
    letter-spacing: -.01em !important;
    text-transform: uppercase;
    color: #FFF4E6 !important;
}
.elementor-84068 .rsc-ff-match-label {
    background: none !important;
    border: 0 !important;
    font-family: var(--rsc-font-titolo) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: .08em !important;
    color: #FFD978 !important;
    text-align: left !important;
}
.elementor-84068 .rsc-ff-semi-wrap .rsc-micro-card { border-left-color: #FFE08A !important; }
.elementor-84068 .rsc-ff-final-box.rsc-gold-championship {
    background: linear-gradient(160deg, #C0284A 0%, #5A0E1F 55%, #3A0A16 100%) !important;
    border: 2px solid #FFD978 !important;
    border-radius: 0 !important;
    box-shadow: 0 20px 50px rgba(230, 184, 74, .25) !important;
}
.elementor-84068 .rsc-ff-final-box.rsc-gold-championship::before { display: none !important; }
.elementor-84068 .rsc-gold-header { justify-content: center; }
.elementor-84068 .rsc-gold-icon { display: none; }
.elementor-84068 .rsc-ff-badge-gold {
    background: linear-gradient(180deg, #FFE7A1, #E6B84A) !important;
    color: #1E050B !important;
    padding: 4px 18px !important;
    border-radius: 0 !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    -webkit-text-fill-color: #1E050B !important;
    text-shadow: none !important;
    font-family: var(--rsc-font-display) !important;
    font-size: 22px !important;
    font-weight: 900 !important;
    font-style: italic;
    letter-spacing: -.01em !important;
}
.elementor-84068 .rsc-gold-championship .rsc-micro-card { border-left-color: #FFD978 !important; }
.elementor-84068 .rsc-winner-trophy-gold {
    background: linear-gradient(180deg, #FFE7A1, #E6B84A) !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #1E050B !important;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.elementor-84068 .rsc-winner-trophy-gold .trophy-text,
.elementor-84068 .rsc-winner-trophy-gold .rsc-champ-name-display {
    color: #1E050B !important;
    font-family: var(--rsc-font-display) !important;
    font-weight: 900 !important;
    font-style: italic;
    letter-spacing: -.01em;
}

/* Mobile e tablet: schede delle fasi come pulsanti del sito */
@media (max-width: 1024px) {
    .elementor-84068 .elementor-element-c8a8ebd .elementor-heading-title { font-size: 64px !important; }
    .elementor-84068 .rsc-master-grid { background: none; }
    .elementor-84068 .rsc-mobile-tabs-nav { border-bottom: 2px solid rgba(230, 184, 74, .3); }
    .elementor-84068 .rsc-tab-btn {
        background: rgba(255, 244, 230, .06) !important;
        color: #FFF4E6 !important;
        border: 1px solid rgba(230, 184, 74, .35) !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        min-height: 44px;
        font-family: var(--rsc-font-display) !important;
        font-size: 16px !important;
        font-weight: 900 !important;
        font-style: italic;
        text-transform: uppercase;
    }
    .elementor-84068 .rsc-tab-btn.active,
    .elementor-84068 .rsc-tab-btn:hover,
    .elementor-84068 .rsc-tab-btn:focus { background: #E6B84A !important; color: #1E050B !important; border-color: #E6B84A !important; }
    .elementor-84068 .rsc-col-center { clip-path: none; }
    .elementor-84068 .rsc-micro-name { font-size: 17px !important; }
    .elementor-84068 .rsc-tree-round::before { color: #FFD978 !important; font-family: var(--rsc-font-titolo) !important; letter-spacing: .08em !important; }
    .elementor-84068 .rsc-micro-score { font-size: 20px !important; }
}
@media (max-width: 767px) {
    .elementor-84068 .elementor-element-c8a8ebd .elementor-heading-title { font-size: 48px !important; }
}
