@import url("https://p.typekit.net/p.css?s=1&k=dhu3lgx&ht=tk&f=463.464.42901.42905&a=17964275&app=typekit&e=css");

@font-face {
    font-family:"sofachrome";
    src:url("https://use.typekit.net/af/f1b0d4/0000000000000000773596db/31/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3") format("woff2"),url("https://use.typekit.net/af/f1b0d4/0000000000000000773596db/31/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3") format("woff"),url("https://use.typekit.net/af/f1b0d4/0000000000000000773596db/31/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3") format("opentype");
    font-display:auto;font-style:normal;font-weight:400;font-stretch:normal;
}

@font-face {
    font-family:"sofachrome";
    src:url("https://use.typekit.net/af/2fe4bd/0000000000000000773596dd/31/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i4&v=3") format("woff2"),url("https://use.typekit.net/af/2fe4bd/0000000000000000773596dd/31/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i4&v=3") format("woff"),url("https://use.typekit.net/af/2fe4bd/0000000000000000773596dd/31/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i4&v=3") format("opentype");
    font-display:auto;font-style:italic;font-weight:400;font-stretch:normal;
}

@font-face {
    font-family:"novecento-sans";
    src:url("https://use.typekit.net/af/13a4f0/00000000000000007735cd02/31/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n3&v=3") format("woff2"),url("https://use.typekit.net/af/13a4f0/00000000000000007735cd02/31/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n3&v=3") format("woff"),url("https://use.typekit.net/af/13a4f0/00000000000000007735cd02/31/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n3&v=3") format("opentype");
    font-display:auto;font-style:normal;font-weight:300;font-stretch:normal;
}

@font-face {
    font-family:"novecento-sans";
    src:url("https://use.typekit.net/af/b68060/00000000000000007735cd10/31/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n7&v=3") format("woff2"),url("https://use.typekit.net/af/b68060/00000000000000007735cd10/31/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n7&v=3") format("woff"),url("https://use.typekit.net/af/b68060/00000000000000007735cd10/31/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n7&v=3") format("opentype");
    font-display:auto;font-style:normal;font-weight:700;font-stretch:normal;
}


:root {
    --bg-nero: #000000;
    --rosso-pgk: #E6232B;
    --rosso-hover-pgk: #f5363e;
    --f-titoli: 'RacingBold', sans-serif;
    --f-testibold: 'Testibold', sans-serif;
    --f-testi: 'Testi', sans-serif;
    --f-testineri: 'Testineri', sans-serif;
}
.btn-primary {
    --bs-btn-bg: var(--rosso-pgk);
    --bs-btn-border-color: var(--rosso-pgk);
    --bs-btn-hover-bg: var(--rosso-hover-pgk);
    --bs-btn-hover-border-color: var(--rosso-hover-pgk);
 }
.form-check-input:checked {
    background-color: var(--rosso-pgk);
    border-color: var(--rosso-pgk);
}

.bg-red { background-color: var(--rosso-pgk); }
.bg-grey { background-color: #d9d9d9; }
.text-grey { color: #d9d9d9; }
.text-red { color: var(--rosso-pgk); }
/* =========================================
   2. LAYOUT GLOBALE
   ========================================= */
html, body {
    background-color: var(--bg-nero) !important;
    color: #ffffff;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden; /* Evita scroll orizzontale */
    font-family: "novecento-sans", sans-serif;
}
.anima{
    -webkit-transition: all 300ms ease;
    -moz-transition: all 300ms ease;
    -ms-transition: all 300ms ease;
    -o-transition: all 300ms ease;
    transition: all 300ms ease;
}

.font-testibold { font-weight: bold; }
.font-testi     { font-weight: normal; }
.font-testineri { font-family: "novecento-sans",sans-serif; }

.font-titoli,
.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 {
    font-family: "sofachrome",sans-serif;
}
.btn-red {
    min-width: 420px;
}


.bg-body.bg-site::before {
    min-height: 40vw !important;
    left: 0px !important;
    transform: translateX(0) !important;
    width: 100vw !important;
    min-width: 100vw !important;
}

.bg-body.bg-site::after {
    width: 140vw !important;
}
.bg-body.bg-site::before {
    height: 50vw !important;
}

@media only screen and (min-width: 990px) {
    .bg-body.bg-site::before {
        height: 250px !important;
        max-height: 250px !important;
        min-height: 250px !important;
    }
}

@media only screen and (max-width: 899px) {
    .bg-body.bg-site::before,
    .bg-body.bg-site::after {
        min-width: 1300px;
    }
}

@media only screen and (min-width: 768px) {
    #layout-header + #content {
        margin-top: 25vw;
    }
}
@media only screen and (min-width: 1200px) {
    #layout-header + #content {
        margin-top: 240px;
    }
}
@media only screen and (max-width: 767px) {
    #layout-header + #content {
        /*
        margin-top: calc(35vw * -1 );
         */
        margin-top: 35vw;
    }
    .bg-body.bg-site::before {
        min-height: 40vw !important;
        left: 0px !important;
        transform: translateX(0) !important;
        width: 100vw !important;
        max-width: 100vw !important;
        min-width: 100vw !important;
        max-height: 40vw !important;
    }
    .bg-body.bg-site::before,
    .bg-body.bg-site::after {
        min-height: 90vw;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 100vw !important;
        margin-left: 0;
        margin-right: 0;
        background-size: cover;
        max-width: 100vw !important;
        top: 130px;
        min-width: 570px;
    }
    .btn-red {
        min-width: 280px;
    }
}
@media only screen and (max-width: 440px) {
    #layout-header + #content {
        margin-top: 160px;
    }
    .bg-body.bg-site::after {
        min-height: 380px !important;
    }
}

.bg-body {
    background-color: #000 !important;
    position: relative;
    z-index: 0;
}
.bg-body:before,
.bg-body:after {
    content: '';
    background-image: var(--bg-image-desk);
    background-size: 100%;
    background-position: center top;
    background-repeat: no-repeat;
    background-color: #000;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1400px;
    height: 100%;
    z-index: -1;
    min-width: 1000px;
}
.bg-body::before {
    background: linear-gradient(to bottom, rgba(0,0,0,1) 0%,rgba(0,0,0,0) 50%);
    z-index: 0;
    height: 50%;
}
.bg-body:after {
    background-image: var(--bg-image-desk);
}
@media only screen and (max-width: 767px) {
    .bg-body:after {
        background-image: var(--bg-image-mob);
        height: var(--dynamic-bg-limit) !important;
        background-position: center top;
        width: 120%;
        top: 10%;
        left: 70%;
        max-width: 600px;
        min-width: 460px;
    }
}

.bg-header {
    background-image: var(--bg-image);
    min-height: 100vw;
    background-size: contain;
    background-position-y: bottom;
}





.header-racing img {
    width: 100%;
    max-width: 270px; /* limite massimo */
}


.py-3 text-center lh-1 {
    position: relative;
    line-height: 1;
    text-align: center;
    padding: 1rem 3rem;
}



.sfondokart {
    /* Usa height (altezza fissa) invece di min-height, così non si stira */
    height: 400px; 
    width: 100%;
    
    background-image: var(--img-mobile);
    background-size: auto 100%; /* Meglio di 'auto 100%' per evitare spazi vuoti */
    background-position: center top;
    background-repeat: no-repeat;
    
    /* Questo impedisce ai contenuti interni di "rompere" l'altezza */
    position: relative; 
}

/* Altezza specifica per i computer (Desktop) */
@media (min-width: 768px) {
    .sfondokart {
        background-image: var(--img-desktop);
        height: 800px; /* <-- Cambia l'altezza fissa per il PC qui */
    }
}

.titolorosso {
    
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}




.testo-contornato {
    color: var(--rosso-pgk) !important;
    -webkit-text-stroke: 4px #ffffff;
    paint-order: stroke fill;
}


.btn-back-racing {
    /* 1. POSIZIONAMENTO LIBERO */
     
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 200; /* Sopra a tutto */
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* 2. CARICAMENTO SVG COME MASCHERA */
.btn-back-icon {
    width: 30px;
    height: 30px;
    background-color: #E6232B; /* Colore dell'icona */
    
    /* Inserisci qui il percorso del tuo file .svg */
    -webkit-mask-image: url('../images/fti.svg');
    mask-image: url('../images/fti.svg');
    
    -webkit-mask-size: contain;
    mask-size: contain;
    mask-repeat: no-repeat;
    transition: background-color 0.3s ease;
}

.riquadrorosso1{
    background-color: var(--rosso-pgk, #E6232B);
    color: #ffffff;
    border: 4px solid #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.riquadrorosso1 a {
    color: #ffffff !important;
}

.btn-classifiche{
    background-color: var(--rosso-pgk, #E6232B);
    color: #ffffff;
    border-left: 3px solid #ffffff;
    display: flex;
    flex: 1;

    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    align-self: stretch;
    padding: 5px;
}

.btn-classifiche a {
    color: #ffffff !important;
}

.riquadrorosso3{
    background-color: var(--rosso-pgk, #E6232B);
    color: #ffffff;
    border-right: 3px solid #ffffff;
    display: flex;
    flex: 0 0 15%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    align-self: stretch;
    padding: 5px;
}

.riquadrorosso3 a {
    color: #ffffff !important;
}



.fascia-tappa {
    --bg-fascia: #d9d9d9;
    --rosso-pgk: #E6232B;
    --fascia-h: 80px; 
    
    /* --- L'UNICA VARIABILE PER LO SPAZIO TRA LE RIGHE --- */
    --riga-gap: 0px; 

    width: 100vw;
    position: relative;
    left: 50%;
    margin-left: -50vw;
    background-color: var(--bg-fascia);
    min-height: var(--fascia-h);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: sans-serif;
    color: #000;
   
}

/* --- LO STACK DELLE 5 RIGHE --- */
.tappa-stack {
    width: 100%;
    max-width: 650px;
    display: flex;
    flex-direction: column;
    align-items: center;
    
    /* Applica lo spazio identico tra ognuna delle 5 righe */
    gap: var(--riga-gap); 
}

/* --- RESET RIGHE --- */
.tappa-stack > * {
    margin: 0 !important;
    line-height: 1; /* Fondamentale per rendere lo spazio preciso */
    text-align: center;
}



/* --- STILI TESTO --- */
.tappa-titolo { color: var(--rosso-pgk); font-size: 2.2rem; font-weight: 900; font-style: italic; text-transform: uppercase; }
.tappa-date   { font-weight: 800; font-size: 1.1rem; }
.tappa-mall   { font-weight: 900; font-size: 1.4rem; text-transform: uppercase; }
.tappa-city   { font-weight: 700; font-size: 1.1rem; }

/* --- FRECCE --- */
.btn-tappa {
    width: 60px;
    height: 60px;
    /*
    background-image: url('/storage/app/media/icone/fth.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    flex-shrink: 0;
    */
}
.btn-prev { transform: scaleX(-1); }

/* --- MARKER ROSSO --- */
.tappa-marker {
    display: none;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 0);
    width: 46px; height: 23px;
    background-color: var(--rosso-pgk);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    position: absolute;
}

body[data-tappa="01-01"] [data-tappa-start="01-01"] .tappa-marker,
body[data-tappa="01-01"] [data-tappa-start="02-05"] .tappa-marker,
body[data-tappa="02-05"] [data-tappa-start="02-05"] .tappa-marker,
body[data-tappa="11-07"] [data-tappa-start="11-07"] .tappa-marker,
body[data-tappa="19-09"] [data-tappa-start="19-09"] .tappa-marker {
    display: block;
}




.icone > img {
    max-width: 66px !important;
    height: auto;
}


.testosotto {
    position: relative; /* Lo aggancia alla griglia fisica della pagina */
    z-index: 10;        /* Se la fascia grigia prova a coprirlo, lui le sta sopra */
    background-color: var(--bg-nero); /* (Opzionale) Assicura che non sia trasparente se la fascia sale */
    padding: 20px 0;    /* Crea una "bolla" di spazio vitale sopra e sotto */
    width: 100%;
}





.full-width[class*="bg-"] {
    position: relative;
    z-index: 1;
}

.full-width[class*="bg-"]:after {
    content: '';
    position: absolute;
    top: 0;
    left: calc((( 100vw - 100% ) / 2) * -1 );
    width: 100vw;
    height: 100%;
    background-color: inherit;
    z-index: -1;
}


.chamfer-box {
    position: relative;
    /* nessun background — trasparente di default */
    padding: 1.5rem 2rem;
}

.chamfer-box svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.chamfer-box img {
    width: 100%;
    max-width: 80px;
}

.content {
    height: 100%;
    box-sizing: border-box;
}

.fisichella-img {
    max-height: 380px;
}

.classifica-single-numero {
    width: 120px;
    border-right: 4px solid #fff;
}

.cerca-partecipante:focus,
.cerca-partecipante {
    border: none;
    font-size: 1.5rem;
    padding: 0;
    color: #fff;
    background-color: #000;
}

.cerca-partecipante::placeholder {
    color: #fff;
}

/* Bootstrap responsive fs-* utilities (sm/md/lg/xl/xxl) */
@media (min-width: 576px) {
    .fs-sm-1 { font-size: calc(1.375rem + 1.5vw) !important; }
    .fs-sm-2 { font-size: calc(1.325rem + .9vw) !important; }
    .fs-sm-3 { font-size: calc(1.3rem + .6vw) !important; }
    .fs-sm-4 { font-size: calc(1.275rem + .3vw) !important; }
    .fs-sm-5 { font-size: 1.25rem !important; }
    .fs-sm-6 { font-size: 1rem !important; }
}

@media (min-width: 768px) {
    .fs-md-1 { font-size: calc(1.375rem + 1.5vw) !important; }
    .fs-md-2 { font-size: calc(1.325rem + .9vw) !important; }
    .fs-md-3 { font-size: calc(1.3rem + .6vw) !important; }
    .fs-md-4 { font-size: calc(1.275rem + .3vw) !important; }
    .fs-md-5 { font-size: 1.25rem !important; }
    .fs-md-6 { font-size: 1rem !important; }
}

@media (min-width: 992px) {
    .fs-lg-1 { font-size: calc(1.375rem + 1.5vw) !important; }
    .fs-lg-2 { font-size: calc(1.325rem + .9vw) !important; }
    .fs-lg-3 { font-size: calc(1.3rem + .6vw) !important; }
    .fs-lg-4 { font-size: calc(1.275rem + .3vw) !important; }
    .fs-lg-5 { font-size: 1.25rem !important; }
    .fs-lg-6 { font-size: 1rem !important; }
}

@media (min-width: 1200px) {
    .fs-xl-1 { font-size: 2.5rem !important; }
    .fs-xl-2 { font-size: 2rem !important; }
    .fs-xl-3 { font-size: 1.75rem !important; }
    .fs-xl-4 { font-size: 1.5rem !important; }
    .fs-xl-5 { font-size: 1.25rem !important; }
    .fs-xl-6 { font-size: 1rem !important; }
}

@media (min-width: 1400px) {
    .fs-xxl-1 { font-size: 2.5rem !important; }
    .fs-xxl-2 { font-size: 2rem !important; }
    .fs-xxl-3 { font-size: 1.75rem !important; }
    .fs-xxl-4 { font-size: 1.5rem !important; }
    .fs-xxl-5 { font-size: 1.25rem !important; }
    .fs-xxl-6 { font-size: 1rem !important; }
}

#sg-cookiesBar {
    color: #000;
}

.home-boxes .chamfer-box:hover {
    transform: scale(1.03);
}


.icons-scroll-wrapper {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* nasconde scrollbar su Firefox */
}
.icons-scroll-wrapper::-webkit-scrollbar {
    display: none; /* nasconde scrollbar su Chrome/Safari */
}

@media (min-width: 768px) {
    .icons-scroll-wrapper {
        flex-wrap: wrap; /* desktop: non scorre */
        overflow-x: visible;
        scroll-snap-type: none;
    }
}

.cerca-partecipante-results {
    position: absolute;
    width: 100%;
    top: calc( 100% + 10px );
    overflow: hidden;
    overflow-y: auto;
    z-index: 999;
    max-height: 200px;
    height: auto;
    display: none;
    left: 50%;
    transform: translateX(-50%);
    max-width: 400px;
    background-color: rgba(0,0,0,.8);
}
.cerca-partecipante-results.show {
    display: flex;
}