.fermate .card.next { background-color: #bfdbbf; }
.fermate .card { border-radius: 10px; border: 1px solid #a7a7a7; }
.opendetail { cursor: pointer; }
body {
    background-color: #fff;
}
#premain {
    border-top-left-radius: 50px 50px;
    border-top-right-radius: 50px 50px;
    margin-top: 20px;
    background-color: #fff !important;
    color: #000;
    margin-bottom: -1px;
    font-size: 1.3em;
    line-height: 1.1em;
    text-align: center;
}
#main {
    background-color: #fff !important;
}
.bghead {
    /*background-image: url('/img/bghead.png');*/
    background-position: bottom;
    background-size: cover;
    background-repeat: no-repeat;
    color: #fff;
    background-color: #00953c;
    /*border-bottom-left-radius: 240px 61px;
    border-bottom-right-radius: 240px 61px;*/
    background: linear-gradient(180deg,rgba(0, 149, 60, 1) 0%, rgba(59, 108, 164, 1) 100%);
}
.prevfermata { background-color: #f0f0f0; border-radius: 20px; color: #000;}
.nextfermata { background-color: #ffffff; border: 1px solid #00333E; border-radius: 20px; color: #000; }
.busname { font-size: 1.05em; line-height: 1.1em}
.stoptime { font-size: 2em; }
.direzione { font-size: 1.05em; line-height: 1em; margin-bottom: 5px; }
.headsign { font-size: 1.05em; line-height: 1.1em; }
.status { font-size: 0.9em; }
.plusdetail {
    width: 30px; height: 30px; border-radius: 15px;
    background-color: #00953c;
    color: #fff;
    position: absolute;
    right: 20px; bottom: 20px;
    background-image: url('/img/plus-btn.png');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}
.visibility-hidden {
    visibility: hidden;
    height: 0px !important;
    margin: 0px !important; 
}
.badge-danger {
    color: #fff;
    background-color: #dc3545;
    line-height: 1.1em;
}
.badge-pill {
    padding: .6em;
    border-radius: 8px;
}
.stato {
    margin: 5px 0px;
    width: 10px;
    height: 10px;
    background-color: #FFF;
    border: 1px solid #999;
    border-radius: 5px;
    display: inline-block;
}
.stato.success { background-color: #00953c; }
.stato.danger { background-color: #dc3545; }

.head-section {
    font-size: 1.15em;
    color: #000;
}


.listime { font-size: 1.32em; }
.cartbuy {
    width: 50px;
    height: 36px;
    border-radius: 25px;
    background-color: #00953c;
    color: #fff;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    background-image: url(/img/cart-btn.png);
}
.border-pre { border-left: 4px solid #00953c;}
.border-now { border-left: 4px dotted #00953c; }
.border-post { border-left: 4px dotted #C0C4C2; }
.border-last { border-left: 4px solid #ffffff;}

.dot-now, .dot-post, .dot-past, .dot-this, .dot-classic { width: 16px; height: 16px; border-radius: 8px; background-color: #00953c; position: absolute; top: -1px; left: -10px;}
.dot-past { background-color: #00953c; }
.dot-classic { background-color: #00953c; }
/*.dot-post { background-color: #C0C4C2; }*/
.dot-post { background: #ffffff; border: 2px double #C0C4C2; }
.dot-this { background-color: #1e8ff8; }
.dot-now { background-color: #d6c20f; border: 2px double #d6c20f;}
.blink {
    animation: blink-animation 1s steps(5, start) infinite;
    -webkit-animation: blink-animation 1s steps(5, start) infinite;
}
@keyframes blink-animation {
    to {
        visibility: hidden;
    }
}
@-webkit-keyframes blink-animation {
    to {
        visibility: hidden;
    }
}

.badge-pill-detail {
    padding: .8em;
    border-radius: 16px;
}
strong.currentstop {
    border: 1px solid #000;
    padding: 4px 8px;
    border-radius: 6px;
}

/* Testo visibile solo alle tecnologie assistive (screen reader) */
.sr-only-a11y {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* === Accessibilità: focus visibile da tastiera (WCAG 2.4.7) === */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid #1e8ff8;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.95);
    border-radius: 4px;
}
/* I pulsanti-icona (link vuoti resi come bottoni) hanno bisogno di offset extra */
.cartbuy:focus-visible,
.plusdetail:focus-visible {
    outline-offset: 3px;
}
/* Fallback per browser che non supportano :focus-visible */
a:focus,
button:focus,
input:focus {
    outline: 3px solid #1e8ff8;
    outline-offset: 2px;
}
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
input:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

/* === Footer con link "Accessibilità" e corpo della dichiarazione === */
.footer-paline {
    text-align: center;
    padding: 16px 16px 28px;
    background-color: #fff;
}
.footer-paline a {
    color: #16193B;
    font-size: 1.1em;
    text-decoration: underline;
    padding: 8px 12px;
    display: inline-block;
}
.accessibilita-body {
    color: #16193B;
    font-size: 1.05em;
    line-height: 1.5;
    max-width: 800px;
    margin: 0 auto;
}
.accessibilita-body h2 {
    font-size: 1.35em;
    margin: 1.4em 0 0.5em;
    font-weight: 700;
}
.accessibilita-body a {
    color: #0a58ca;
    text-decoration: underline;
    overflow-wrap: anywhere;
}
