/* ============================================================
   CRS GARAGE — foglio di stile
   ============================================================ */

:root {
    --rosso:        #e53935;
    --rosso-scuro:  #c62828;
    --nero:         #0f0f10;
    --carbone:      #16161a;
    --grigio:       #1f1f23;
    --bordo:        #2e2e33;
    --bianco:       #ffffff;
    --tenue:        #9d9d9d;

    --titolo: 'Oswald', 'Arial Narrow', Arial, sans-serif;
    --testo:  'Roboto', Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background: var(--nero);
    color: var(--bianco);
    font-family: var(--testo);
    font-size: 16px;
    line-height: 1.55;
}

section { scroll-margin-top: 70px; }
a { color: inherit; }

:focus-visible { outline: 3px solid var(--rosso); outline-offset: 2px; }

.titolo {
    font-family: var(--titolo);
    font-size: clamp(28px, 3.6vw, 40px);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.titolo-centro { text-align: center; }

/* ============ TESTATA ============ */
.testata {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 380px;
}

.testata-sx {
    background: #f2f2f2;
    color: #111;
    padding: 40px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo { width: 100%; max-width: 300px; height: auto; margin-bottom: 26px; }

.mestiere {
    font-family: var(--titolo);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.dati { list-style: none; font-size: 15.5px; line-height: 1.75; }
.dati a { color: #111; text-decoration: none; font-weight: 500; }
.dati a:hover { color: var(--rosso); text-decoration: underline; }

.dati-fiscali { margin-top: 14px; font-size: 13px; color: #666; }

.solo-online {
    margin-top: 14px;
    padding: 9px 13px;
    background: rgba(209, 55, 44, 0.1);
    border-left: 3px solid var(--rosso);
    font-size: 14px;
    font-weight: 500;
}

.solo-online i { color: var(--rosso); margin-right: 7px; }

/* Metti una foto dell'auto accanto agli altri file, chiamata auto.jpg */
/* La foto riempie tutto il pannello, la scritta ci sta sopra */
.testata-dx {
    display: flex;
    align-items: flex-end;
    padding: 34px 42px;
    background-color: #17171a;
    background-image:
        radial-gradient(120% 90% at 80% 20%, rgba(229, 57, 53, 0.16), transparent 62%),
        url('carbonio.png');
    background-size: cover, 161px 201px;
    background-repeat: no-repeat, repeat;

    /* Foto dell'officina: togli le due barre qui sotto quando ce l'hai
    background-image:
        linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0) 60%),
        url('officina.jpg');
    background-size: cover;
    background-position: center;
    */
}

/* ============ MENU ============ */
.menu {
    position: sticky;
    top: 0;
    z-index: 90;
    background: var(--bianco);
    border-bottom: 3px solid var(--rosso);
}

.menu-voci { display: flex; justify-content: center; }

.menu-voci a {
    padding: 15px 22px;
    color: #111;
    text-decoration: none;
    font-family: var(--titolo);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-bottom: 3px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.menu-voci a:hover, .menu-voci a.corrente {
    color: var(--rosso);
    border-bottom-color: var(--rosso);
}

.menu-tasto {
    display: none;
    width: 100%;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    background: var(--bianco);
    border: none;
    color: #111;
    font-family: var(--titolo);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
}

.menu-tasto i { color: var(--rosso); }

/* ============ LISTA DEI LAVORI ============ */
.lavori {
    position: relative;
    overflow: hidden;
    padding: 60px 24px 70px;
    background-color: var(--carbone);
    background-image:
        linear-gradient(115deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.6) 40%, rgba(140,20,16,0.55) 100%),
        url('carbonio.png');
    background-repeat: no-repeat, repeat;
    background-size: cover, 161px 201px;
}

.lavori-dentro { position: relative; max-width: 1060px; margin: 0 auto; }

.lavori .titolo { margin-bottom: 30px; }

.griglia {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.riquadro {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 132px;
    padding: 22px 14px;
    background: rgba(18, 18, 20, 0.88);
    border: 1px solid var(--bordo);
    border-radius: 6px;
    text-align: center;
    transition: transform 0.18s, border-color 0.18s, background 0.18s;
}

.riquadro:hover {
    transform: translateY(-4px);
    border-color: var(--rosso);
    background: rgba(30, 30, 33, 0.94);
}

.riquadro i { font-size: 30px; color: var(--bianco); }

.riquadro h3 {
    font-family: var(--titolo);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1.25;
}

/* Il riquadro in evidenza è bianco, come nel modello */
.riquadro.in-luce {
    background: var(--bianco);
    border-color: var(--bianco);
    color: #121212;
}

.riquadro.in-luce i { color: var(--rosso); }
.riquadro.in-luce:hover { background: #f2f2f2; }

/* ============ CHI SIAMO ============ */

/* ============ RECENSIONI ============ */
.recensioni { padding: 60px 24px 54px; background: var(--nero); }
.recensioni .titolo { margin-bottom: 32px; }

.giostra {
    position: relative;
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 46px;
}

.binario {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 6px;
    scrollbar-width: none;
}

.binario::-webkit-scrollbar { display: none; }

.parere {
    flex: 0 0 250px;
    scroll-snap-align: start;
    background: var(--bianco);
    color: #111;
    border-radius: 6px;
    padding: 20px 20px 18px;
    display: flex;
    flex-direction: column;
}

.stelle { color: #f5a623; letter-spacing: 2px; margin-bottom: 10px; }

.parere blockquote { font-size: 14.5px; line-height: 1.5; flex: 1; margin-bottom: 14px; }

.parere figcaption {
    font-weight: 700;
    font-size: 14px;
    padding-top: 12px;
    border-top: 1px solid #e6e6e6;
}

.parere figcaption span {
    display: block;
    font-weight: 400;
    font-size: 12.5px;
    color: #777;
}

.freccia {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    background: var(--grigio);
    border: 1px solid var(--bordo);
    border-radius: 50%;
    color: var(--bianco);
    cursor: pointer;
    z-index: 2;
}

.freccia:hover { background: var(--rosso); border-color: var(--rosso); }
.freccia[disabled] { opacity: 0.3; cursor: default; }
.freccia-sx { left: 0; }
.freccia-dx { right: 0; }

.pallini { display: flex; justify-content: center; gap: 7px; margin-top: 20px; }

.pallino {
    width: 22px;
    height: 4px;
    border: none;
    border-radius: 2px;
    background: #3a3a3e;
    cursor: pointer;
    padding: 0;
}

.pallino.acceso { background: var(--rosso); }

/* ============ PREVENTIVI ============ */
.preventivi {
    padding: 62px 24px 66px;
    text-align: center;
    background: linear-gradient(180deg, var(--rosso) 0%, #b02a21 100%);
}

.sottotitolo {
    max-width: 520px;
    margin: 10px auto 22px;
    font-size: 16.5px;
    color: rgba(255, 255, 255, 0.92);
}

.promesse {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 30px;
    list-style: none;
    margin-bottom: 30px;
    font-size: 14.5px;
    color: rgba(255, 255, 255, 0.95);
}

.promesse i { margin-right: 7px; }

.btn-grande {
    padding: 17px 40px;
    background: #101012;
    color: var(--bianco);
    border: none;
    border-radius: 4px;
    font-family: var(--titolo);
    font-size: 21px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.28);
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-grande i { margin-right: 10px; }
.btn-grande:hover { transform: translateY(-3px); box-shadow: 0 9px 0 rgba(0, 0, 0, 0.28); }
.btn-grande:active { transform: translateY(2px); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.28); }

/* ============ CONTATTI ============ */
.contatti { padding: 60px 24px; background: var(--carbone); }
.contatti .titolo { margin-bottom: 30px; }

.contatti-dentro {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 24px;
    max-width: 1060px;
    margin: 0 auto;
}

.contatti-dati h3 {
    font-family: var(--titolo);
    font-size: 22px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.contatti-dati ul { list-style: none; }

.contatti-dati li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 14px;
    font-size: 15px;
    color: #ddd;
}

.contatti-dati i { color: var(--rosso); font-size: 17px; margin-top: 3px; width: 20px; flex-shrink: 0; }
.contatti-dati a { color: #ddd; text-decoration: none; }
.contatti-dati a:hover { color: var(--rosso); text-decoration: underline; }

.btn-mappa {
    display: inline-block;
    margin-top: 6px;
    padding: 12px 22px;
    background: var(--rosso);
    border-radius: 4px;
    color: var(--bianco);
    text-decoration: none;
    font-family: var(--titolo);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.btn-mappa:hover { background: var(--rosso-scuro); }

.contatti-mappa {
    min-height: 300px;
    border: 1px solid var(--bordo);
    border-radius: 6px;
    overflow: hidden;
}

.contatti-mappa iframe {
    width: 100%;
    height: 100%;
    min-height: 300px;
    border: 0;
    display: block;
    filter: grayscale(35%) contrast(1.05);
}

/* ============ PIEDE ============ */
.piede {
    padding: 26px 24px;
    text-align: center;
    background: var(--nero);
    border-top: 3px solid var(--rosso);
    font-size: 14px;
    color: var(--tenue);
}

.piede-piccolo { font-size: 12px; margin-top: 6px; }
.piede-piccolo a { color: #5c5c5c; text-decoration: none; }
.piede-piccolo a:hover { color: var(--rosso); }

/* ============================================================
   MODULO A PASSI
   ============================================================ */
.modale {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modale[hidden] { display: none; }
.velo { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.78); }

.foglio {
    position: relative;
    width: 100%;
    max-width: 620px;
    max-height: 92vh;
    overflow-y: auto;
    background: var(--grigio);
    border: 1px solid var(--bordo);
    border-top: 4px solid var(--rosso);
    border-radius: 8px;
    padding: 26px 28px 22px;
}

.chiudi {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    color: var(--tenue);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.chiudi:hover { color: var(--bianco); }

.foglio-titolo {
    font-family: var(--titolo);
    font-size: 24px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 18px;
    padding-right: 40px;
}

.tacche { display: flex; gap: 6px; list-style: none; margin-bottom: 22px; }

.tacca {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 7px;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--bordo);
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--tenue);
}

.tacca span {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #333;
    font-weight: 700;
    font-size: 12px;
}

.tacca.attiva { color: var(--bianco); border-bottom-color: var(--rosso); }
.tacca.attiva span { background: var(--rosso); }
.tacca.finita { border-bottom-color: var(--rosso); color: #bbb; }
.tacca.finita span { background: var(--rosso); }

.quadro { border: none; }
.quadro[hidden] { display: none; }

.quadro legend {
    font-family: var(--titolo);
    font-size: 19px;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.scelte { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 9px; }

.scelta {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 14px;
    background: #26262a;
    border: 2px solid var(--bordo);
    border-radius: 6px;
    color: var(--bianco);
    font-family: var(--testo);
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.scelta i { color: var(--rosso); font-size: 17px; width: 20px; flex-shrink: 0; }
.scelta:hover { border-color: #5a5a60; }
.scelta.presa { border-color: var(--rosso); background: rgba(209, 55, 44, 0.16); }

.campo { display: block; margin-bottom: 15px; }

.campo label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #ddd;
}

.campo input, .campo select, .campo textarea {
    width: 100%;
    padding: 11px 12px;
    background: #131315;
    border: 1px solid var(--bordo);
    border-radius: 4px;
    color: var(--bianco);
    font-family: var(--testo);
    font-size: 16px;
}

.campo textarea { resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus { border-color: var(--rosso); }
.campo input.sbagliato, .campo select.sbagliato { border-color: #ff6b6b; }

.aiuto, .errore { display: block; margin-top: 5px; font-size: 12.5px; color: var(--tenue); }
.errore { color: #ff8a80; font-weight: 600; min-height: 15px; }

.riepilogo {
    background: #26262a;
    border-left: 3px solid var(--rosso);
    border-radius: 0 5px 5px 0;
    padding: 12px 15px;
    font-size: 13.5px;
    color: #ccc;
    line-height: 1.7;
}

.riepilogo b { color: var(--bianco); }

.trappola { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.esito { min-height: 20px; margin-top: 12px; font-size: 14.5px; font-weight: 600; }
.esito.male { color: #ff8a80; }

.comandi {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--bordo);
}

.btn-rosso, .btn-vuoto {
    padding: 13px 28px;
    border-radius: 4px;
    font-family: var(--titolo);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
}

.btn-rosso { background: var(--rosso); color: var(--bianco); border: none; }
.btn-rosso:hover { background: var(--rosso-scuro); }
.btn-rosso:disabled { opacity: 0.6; cursor: wait; }

.btn-vuoto {
    background: none;
    border: 1px solid var(--bordo);
    color: #ccc;
    margin-right: auto;
}

.btn-vuoto:hover { color: var(--bianco); border-color: #666; }

.fatto { text-align: center; padding: 24px 8px 8px; }
.fatto[hidden] { display: none; }
.fatto > i { font-size: 52px; color: #4caf50; margin-bottom: 14px; }

.fatto h3 {
    font-family: var(--titolo);
    font-size: 25px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.fatto p { color: #ccc; margin-bottom: 20px; }

body.bloccato { overflow: hidden; }

/* ============================================================
   SCHERMI STRETTI
   ============================================================ */
@media (max-width: 1000px) {
    .griglia { grid-template-columns: repeat(3, 1fr); }
    .contatti-dentro { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .testata { grid-template-columns: 1fr; min-height: 0; }
    .testata-sx { padding: 30px 22px; }
    .testata-dx { min-height: 260px; padding: 26px 24px; }
    .logo { max-width: 240px; }

    .menu-tasto { display: flex; }
    .menu-voci { display: none; flex-direction: column; border-top: 1px solid #eee; }
    .menu-voci.aperto { display: flex; }
    .menu-voci a { padding: 14px 22px; border-bottom: 1px solid #eee; border-left: 4px solid transparent; }
    .menu-voci a:hover, .menu-voci a.corrente { border-bottom-color: #eee; border-left-color: var(--rosso); background: #fafafa; }

    .lavori { padding: 44px 18px 52px; }
    .griglia { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .riquadro { min-height: 116px; }

    .giostra { padding: 0 34px; }
    .parere { flex: 0 0 78vw; }
    .freccia { width: 32px; height: 32px; }

    .btn-grande { width: 100%; font-size: 18px; padding: 16px 20px; }
    .promesse { flex-direction: column; align-items: center; gap: 8px; }

    .foglio { padding: 22px 18px 18px; max-height: 100vh; border-radius: 0; }
    .modale { padding: 0; }
    .scelte { grid-template-columns: 1fr; }
    .tacca { font-size: 0; gap: 0; justify-content: center; }
    .tacca span { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .binario { scroll-behavior: auto; }
    * { transition: none !important; }
}
