body {
    font-family: 'Roboto', sans-serif !important;
}

@keyframes mct-floating {
    0% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
    100% { transform: translateY(0); }
}

.mct-warning-dot {
    animation: mct-floating 2s ease-in-out infinite;
    background: #000 !important; /* forza il nero anche se inline */
}

@keyframes mct-floating-light {
    0% { transform: translateY(0); }
    50% { transform: translateY(-1.5px); } /* metà spostamento */
    100% { transform: translateY(0); }
}

.mct-warning-floating-link {
    display: inline-block;
    animation: mct-floating-light 3s ease-in-out infinite;
    color: #a00 !important;
    font-weight: 700 !important;
    cursor: pointer;
    text-decoration: underline !important;
}


.mct-route-alt-results {
    margin-bottom: 40px;
}

/* NEWS / RISULTATI LISTA */

.mct-news, .mct-news .mct-news-item {
    font-size: 0.94em !important;
}


@media (max-width: 768px) {
  .mct-news-item {
    flex-direction: column;
  }

  .mct-news-pdf {
    align-self: flex-start;
    margin-top: 12px;
    display: inline-block;
    margin-left:0px !important;
    margin-top:0px;
  }
}

@media screen and (min-width:990px){
.div-percorso-alternativo{
    margin-top:40px !important;
}
}


.mct-news {
    margin: 0em 0 1em 0;
    padding: 0;
    list-style: none;
    padding-top:20px;
}
.mct-news-item, .mct-search-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    background: #f6f7fa;
    border-left-width: 5px !important;
    border-left-style: solid !important;
    border-left-color: #0080ff; /* fallback, sarà poi sovrascritto a livello inline/classi */
    padding: 18px 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px #44465f13;
}
.mct-news-rosso     { border-left: 5px solid #ff0000 !important; }  /* rosso acceso */
.mct-news-blu       { border-left: 5px solid #0078ff !important; }  /* blu acceso */
.mct-news-verde     { border-left: 5px solid #3ecf54 !important; }  /* verde */
.mct-news-arancione { border-left: 5px solid #ffa83b !important; }  /* arancione */


.mct-news-icon {
    width: 38px;
    min-width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 !important;
    background: none !important;
    box-shadow: none !important;
    padding: 0;
}
.mct-news-blu .mct-news-icon,
.mct-news-rosso .mct-news-icon,
.mct-news-verde .mct-news-icon,
.mct-news-arancione .mct-news-icon {
    background: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.mct-news-body { flex: 1 1 0; }
.mct-news-title { font-weight: bold; color: #44465F; font-size: 1.13em; }
.mct-news-tratto { font-size: 1em; color: #333; margin: 4px 0; }
.mct-news-date { font-size: .97em; color: #666; }
.mct-news-pdf {
    color: #44465F;
    font-weight: 700;
    background: #e5e7fa;
    padding: 6px 16px;
    border-radius: 7px;
    margin-left: 15px;
    text-decoration: none;
}
.mct-news-pdf:hover {
    background: #44465F;
    color: #fff;
}

/* MINI-DOT COLORATO SUGLI SVG */
.mct-mini-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    z-index: 2;
}

/* TOOLTIP MAPPA (INFO CANTIERE) */
.mct-tooltip-pop {
    border-left: transparent;
    border-radius: 8px;
    box-shadow: 0 2px 18px #2221;
    padding: 13px 16px 10px 14px;
    background: none;
    min-width: 200px;
    max-width: 270px;
    font-family: inherit;
    color: #23253c;
    font-size: 1em;
    line-height: 1.4;
}
.mct-tooltip-pop-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}
.mct-tooltip-pop-icon-wrap {
    position: relative;
    display: inline-block;
    width: 48px !important;
    height: 48px !important;
}
.mct-tooltip-pop-icon {
    width: 48px !important;
    height: 48px !important;
    border-radius: 10px;
    box-shadow: 0 2px 10px #0003;
    background: #fff;
    object-fit: contain;
    display: block;
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
    max-height: none !important;
}
.mct-tooltip-pop-title {
    font-weight: 700;
    color: #222b47;
    font-size: 1.07em;
    margin-bottom: 1px;
    line-height: 1.15;
}
.mct-tooltip-pop-tratto {
    color: #466cf6;
    font-size: 0.98em;
    font-weight: 500;
    margin-bottom: 0px;
}
.mct-tooltip-pop-info {
    margin-bottom: 6px;
    color: #31335a;
    font-size: 0.98em;
}
.mct-tooltip-pop-date {
    font-size: 0.93em;
    color: #71759d;
    margin-bottom: 4px;
}
.mct-tooltip-pop-pdf a {
    background: #3da8ff;
    color: #fff !important;
    padding: 2px 11px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.97em;
    transition: background 0.14s;
}
.mct-tooltip-pop-pdf a:hover { background: #ff7c36; color: #fff; }

/* COLORI TOOLTIP IN BASE ALLO STATO */
.mct-tooltip-pop.mct-tooltip-rosso     { border-left-color: #ff7c36; }
.mct-tooltip-pop.mct-tooltip-blu       { border-left-color: #3da8ff; }
.mct-tooltip-pop.mct-tooltip-verde     { border-left-color: #3ecf54; }
.mct-tooltip-pop.mct-tooltip-arancione { border-left-color: #ffa83b; }

/* FORM ROUTING (SOTTO MAPPA) */
.mct-route-form {
    margin-bottom: 22px;
    gap: 14px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.mct-route-form input,
.mct-route-form button {
    font-size: 1em;
    padding: 9px 12px;
    border-radius: 7px;
    border: 1px solid #c1c7d0;
    min-width: 110px;
    box-sizing: border-box;
}
.mct-route-form button {
    background: #3da8ff;
    color: #fff;
    font-weight: 700;
    border: none;
    min-width: 110px;
    cursor: pointer;
    transition: background 0.16s;
}
.mct-route-form button:hover {
    background: #2069c9;
}

.mct-alt-route-btn{
    margin-top:-10px;
}

/* Responsive: stack verticalmente su mobile */
@media (max-width: 600px) {
    .mct-alt-route-btn{
    margin-top:0px;
    }

    .mct-route-form {
        flex-direction: column;
        gap: 11px;
        align-items: stretch;
    }
    .mct-route-form input,
    .mct-route-form button {
        width: 100%;
        min-width: 0;
        font-size: 1.08em;
    }
    .mct-route-form span {
        display: none;
    }
}

.mct-route-directions {
    text-align: center;
}

.mct-legend-title {
    font-weight: bold;
    font-size: 17px;
    margin-bottom: 12px;
    letter-spacing: 0.3px;
}

.mct-legend-reset{
background: #3da8ff !important;
    color: #fff !important;
    font-weight: 700 !important;
    border: 1px solid #3da8ff !important;
    border-radius: 10px !important;
    padding: 8px 16px !important;
    cursor: pointer !important;
    font-size: 1em !important;
    transition: background 0.2s !important;
    box-sizing: border-box !important;
    width: 400px !important;
    min-width: 300px !important;
}


.mct-legend-reset:hover,
.mct-legend-reset:focus {
    background: #297fd4 !important;
    border-color: #297fd4 !important;
}
@media screen and (max-width:768px){
.mct-legend-reset {
        width: 100% !important;
        margin-top: 0 !important;
        box-sizing: border-box !important;
        border-radius: 10px !important;
    }
}
    .mobile-or {
      display: none;
    }
  .mct-search-mid-2-mobile{
      display:none;
  }
@media (max-width: 600px) {
  .mobile-or {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #eee;
    margin: 0 12px;
  }
  
  .mct-search-mid-2-mobile {
        display: flex
    ;
        justify-content: center;
        margin-bottom: 20px;
    }
}






.mct-search-form {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 40px !important;
    margin-top:20px !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
.mct-search-left {
    display: flex !important;
    flex: 0 1 700px !important;
    min-width: 0 !important;
    max-width: 700px !important;
    width: 700px !important;
}
.mct-search-mid {
    display: flex !important;
    flex: 0 1 400px !important;
    justify-content: flex-start !important;
    width: 400px !important;
    min-width: 300px !important;
}
.mct-search-right {
    display: flex !important;
    flex: 0 1 190px !important;
    justify-content: flex-end !important;
    width: 190px !important;
    min-width: 190px !important;
    margin-left: 100px !important;
}
.mct-search-via {
    width: 100% !important;
    padding: 8px 11px !important;
    border-radius: 10px !important;
    border: 1px solid #c1c7d0 !important;
    font-size: 1em !important;
    background: #fff !important;
    margin-right: 8px !important;
    box-sizing: border-box !important;
}
.mct-search-via::placeholder {
    color: #888 !important;
    opacity: 1 !important;
    text-align: left !important;
}
.mct-search-btn {
    background: #3da8ff !important;
    color: #fff !important;
    font-weight: 700 !important;
    border: 1px solid #3da8ff !important;
    border-radius: 10px !important;
    padding: 8px 16px !important;
    cursor: pointer !important;
    font-size: 1em !important;
    transition: background 0.2s !important;
    box-sizing: border-box !important;
    width: 400px !important;
    min-width: 300px !important;
}
.mct-search-btn:hover,
.mct-search-btn:focus {
    background: #297fd4 !important;
    border-color: #297fd4 !important;
}
.mct-alt-route-btn {
    background: #ffa83b !important;
    color: white !important;
    font-weight: 700 !important;
    border: 1px solid #ffa83b !important;
    border-radius: 10px !important;
    padding: 8px 16px !important;
    cursor: pointer !important;
    font-size: 1em !important;
    margin-top: 0px !important;
    transition: background 0.2s !important;
    width: 400px !important;
    min-width: 300px !important;
    box-sizing: border-box !important;
}
.mct-alt-route-btn:hover,
.mct-alt-route-btn:focus {
    background: #e08612 !important;
    border-color: #e08612 !important;
}

.mct-search-mid {
    margin-right: 200px;
}

    .mct-search-results-div{
        color:#d70000;margin-bottom:20px;text-align:left;
    }
    
    
/* --- MOBILE: Tre righe e una colonna --- */
@media (max-width: 640px) {
    .mct-search-form {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        max-width: 100% !important;
        margin-top:50px !important;
    }
    .mct-search-left,
    .mct-search-mid,
    .mct-search-right {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-bottom: 0 !important;
        display: block !important;
        flex: 0 1 0px !important;
    }
    .mct-search-via,
    .mct-search-btn,
    .mct-alt-route-btn {
        width: 100% !important;
        margin-top: 0 !important;
        box-sizing: border-box !important;
        border-radius: 10px !important;
    }
    .mct-search-via::placeholder {
        text-align: center !important;
    }
    .mct-search-via{
        text-align: center !important;
    }
    
    .mct-search-results-div{
        text-align:center;
    }
}

.mct-search-results{
    margin-bottom:40px !important;
}
@media screen and (max-width:990px){
.mct-search-results{
    margin-top:40px !important;
}
}
