/* Versione definitiva con responsive completo e hero section */

/* ===== HERO SECTION CON SFONDO A TUTTO SCHERMO ===== */
.hero-section {
    position: relative;
    min-height: 100vh; /* Altezza minima tutta la viewport */
    width: 100%;
    background-image: url('../img/auto/fer1.jpg'); /* Percorso della immagine */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    /*background-attachment: fixed; /* Effetto parallax opzionale */

    
    
    /* Flexbox per centrare il contenuto */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Padding per evitare che il testo tocchi i bordi */
    padding: 80px 20px;
    box-sizing: border-box;
}

/* Overlay scuro sopra l'immagine di sfondo */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); /* Oscuramento del 50% - regola questo valore */
    z-index: 1;
}

/* Contenuto principale (testo) */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    color: #fff;
}

/* Stile per il titolo principale */
.hero-content h1 {
    font-size: 3.5rem;
    color: #F7BF05; /* Giallo ocra */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 2rem;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Container per il testo descrittivo */
.hero-text {
    max-width: 900px;
    margin: 0 auto;
}

/* Stile per i paragrafi */
.hero-text p {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: #F7BF05; /* Giallo ocra */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
    background-color: rgba(0, 0, 0, 0.4); /* Sfondo semi-trasparente per migliorare leggibilità */
    padding: 15px 25px;
    border-radius: 10px;
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
}

/* Rimuovo margini per l'ultimo paragrafo */
.hero-text p:last-child {
    margin-bottom: 0;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet e dispositivi medi */
@media screen and (max-width: 992px) {
    .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .hero-text p {
        font-size: 1.1rem;
        padding: 12px 20px;
    }
    
    .hero-section {
        padding: 60px 20px;
    }
}

/* Mobile landscape */
@media screen and (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.2rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-text p {
        font-size: 1rem;
        line-height: 1.6;
        padding: 10px 15px;
    }
    
    .hero-section {
        padding: 50px 15px;
        background-attachment: scroll; /* Su mobile toglie l'effetto parallax per performance */
        min-height: 60vh; /* Riduce l'altezza al 60% della viewport */
    }
        .regole-section {
        padding: 30px 20px;
    }
    
    .regole-section h2 {
        font-size: 1.5rem;
    }
    
    .regole-steps {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .step {
        padding: 20px;
    }
}

/* Mobile portrait */
@media screen and (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-text p {
        font-size: 0.9rem;
        padding: 8px 12px;
    }
    
    .hero-section {
        padding: 40px 12px;
        min-height: 60vh; /* Riduce l'altezza al 60% della viewport */
    }
}

/* Per schermi molto grandi (desktop 4K) */
@media screen and (min-width: 1920px) {
    .hero-content h1 {
        font-size: 4.5rem;
    }
    
    .hero-text p {
        font-size: 1.4rem;
        max-width: 1200px;
    }
}

/* ===== SUPPORTO PER DISPOSITIVI CON BASSA RISOLUZIONE ===== */
@media screen and (max-width: 320px) {
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .hero-text p {
        font-size: 0.85rem;
        padding: 6px 10px;
    }
}

/* Opzione: Rimuovere l'effetto parallax per dispositivi che preferiscono motion ridotto */
@media (prefers-reduced-motion: reduce) {
    .hero-section {
        background-attachment: scroll;
    }
}
/* ===== REGOLE SECTION (tre pilastri) ===== */
.regole-section {
    background: var(--grigio-chiaro);
    padding: 40px;
    border-radius: 10px;
    margin: 40px 0;
}

.regole-section h2 {
    color: var(--blu-scuro);
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-align: center;
    line-height: 1.4;
}

.regole-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.step {
    text-align: center;
    padding: 25px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.step-number {
    background: var(--primario-medio);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0 auto 20px;
    box-shadow: 0 4px 10px rgba(44, 82, 130, 0.3);
}

.step h3 {
    color: var(--primario-scuro);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.step p {
    color: var(--grigio-testo);
    font-size: 1rem;
    line-height: 1.6;
    text-align: left;
}