/* IMPOSTAZIONI BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}
html {
    scroll-behavior: smooth;
}

/* LA NOSTRA TAVOLOZZA COLORI */
:root {
    --verde-principale: #2E7D32; /* Un verde agricolo intenso */
    --arancione-accento: #F57C00; /* Arancione caldo che richiama il sole/terra */
    --bianco: #ffffff;
    --testo-scuro: #333333;
}

/* MENU DI NAVIGAZIONE */
.navbar {
    position: fixed; /* Il menu rimane sempre in alto quando si scorre */
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    background-color: rgba(255, 255, 255, 0.95); /* Bianco leggermente trasparente */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.logo img {
    height: 60px; /* Regola questa altezza in base a quanto vuoi grande il logo */
    width: auto;
}

/* Regole Menu PC */
.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links li a {
    text-decoration: none;
    color: var(--testo-scuro);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.nav-links li a:hover {
    color: var(--verde-principale); /* Il testo diventa verde quando ci passi col mouse */
}

/* SEZIONE HERO (Il blocco col video) */
.hero {
    position: relative;
    height: 100vh; /* Occupa il 100% dell'altezza dello schermo */
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

/* IMPOSTAZIONI VIDEO DI SFONDO */
.video-background {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    z-index: -2;
    background-color: #4CAF50; /* Colore di riserva se il video non c'è */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* Scurisce l'immagine di fondo */
    z-index: -1;
}

/* TESTI SOPRA IL VIDEO */
.hero-content {
    z-index: 1;
    color: var(--bianco);
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 4.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
}

.hero-content .highlight {
    color: var(--arancione-accento);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 40px;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
}

/* PULSANTE */
.btn-primary {
    display: inline-block;
    padding: 15px 40px;
    background-color: var(--verde-principale);
    color: var(--bianco);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 50px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-primary:hover {
    background-color: var(--arancione-accento); /* Diventa arancione al passaggio del mouse */
    transform: scale(1.05); /* Si ingrandisce leggermente */
}

/* ---- SEZIONE CHI SIAMO ---- */
.about-section {
    padding: 100px 20px;
    background-color: var(--bianco);
}
.btn-storia {
    margin-top: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto; /* Centra il contenuto nella pagina */
}

.about-content {
    display: flex;
    align-items: center;
    gap: 60px; /* Spazio tra testo e immagine */
}

.about-text {
    flex: 1; /* Occupa metà spazio */
}

.about-text h2 {
    font-size: 2.5rem;
    color: var(--verde-principale);
    margin-bottom: 10px;
}

.divider {
    height: 4px;
    width: 60px;
    background-color: var(--arancione-accento);
    margin-bottom: 30px;
    border-radius: 2px;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--testo-scuro);
    margin-bottom: 20px;
}

.about-image {
    flex: 1; /* Occupa l'altra metà dello spazio */
}

.about-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1); 
    background-color: #e0e0e0; 
    min-height: 300px; 
}

/* ---- SEZIONE SERVIZI ---- */
.services-section {
    padding: 100px 20px;
    background-color: #f9f9f9; 
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--verde-principale);
    margin-bottom: 10px;
}

.section-title .divider {
    margin: 0 auto; 
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 30px;
}

.service-card {
    background-color: var(--bianco);
    padding: 25px 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px); 
    box-shadow: 0 15px 30px rgba(0,0,0,0.15); 
}

.service-icon {
    width: 100%;
    height: 180px; 
    object-fit: cover; 
    border-radius: 8px;
    margin-bottom: 20px;
    background-color: #e0e0e0; 
}

.service-card h3 {
    font-size: 1.3rem;
    color: var(--testo-scuro);
    margin-bottom: 15px;
}

.service-card p {
    font-size: 1rem;
    color: #666666; 
    line-height: 1.6;
}

/* ---- SEZIONE PARCO MACCHINE ---- */
.fleet-section {
    padding: 100px 20px;
    background-color: var(--bianco);
}

.section-subtitle {
    text-align: center;
    margin-bottom: 40px;
    color: var(--testo-scuro);
    font-size: 1.1rem;
}

.fleet-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px; 
}

.fleet-item {
    background-color: var(--bianco);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08); 
    overflow: hidden;
    text-align: center;
    padding-bottom: 20px; 
    transition: transform 0.3s ease; 
}

.fleet-item:hover {
    transform: translateY(-8px);
}

.fleet-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.machine-title {
    color: var(--verde-principale);
    font-size: 1.25rem;
    margin-top: 15px;
    padding: 0 10px;
}

/* ---- SEZIONE CONTATTI ---- */
.contact-section {
    padding: 100px 20px;
    background-color: #f9f9f9; 
}

.contact-wrapper {
    display: flex;
    gap: 50px;
    justify-content: space-between;
}

.contact-info, .contact-form-container {
    flex: 1; 
}

.contact-info h3 {
    font-size: 1.8rem;
    color: var(--verde-principale);
    margin-bottom: 25px;
}

.contact-info ul {
    list-style: none;
    line-height: 2.2; 
    color: var(--testo-scuro);
    font-size: 1.1rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px; 
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #cccccc;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    transition: border-color 0.3s ease;
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--verde-principale); 
}

.contact-form button {
    cursor: pointer;
    border: none;
    width: 100%; 
    margin-top: 10px;
}

/* ---- FOOTER ---- */
.site-footer {
    background-color: var(--testo-scuro); 
    color: var(--bianco);
    text-align: center;
    padding: 25px 20px;
    font-size: 0.9rem;
}

/* ---- STILE CHECKBOX PRIVACY ---- */
.privacy-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 5px;
    margin-bottom: 10px;
}

.privacy-consent input[type="checkbox"] {
    width: auto;
    margin-top: 5px;
    cursor: pointer;
}

.privacy-consent label {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--testo-scuro);
}

.privacy-consent label a {
    color: var(--verde-principale);
    font-weight: bold;
    text-decoration: underline;
}

.privacy-consent label a:hover {
    color: var(--arancione-accento);
}

/* ---- MENU MOBILE (HAMBURGER) ---- */
.hamburger {
    display: none; 
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--verde-principale);
    transition: all 0.3s ease;
}

/* ---- RESPONSIVE (Per i cellulari) ---- */
@media (max-width: 850px) {
    .navbar {
        padding: 15px 20px;
    }

    .about-content, .contact-wrapper {
        flex-direction: column; 
        text-align: center;
    }

    .divider {
        margin: 0 auto 30px auto; 
    }

    .hamburger {
        display: flex; 
    }

    /* --- MENU A TENDINA MOBILE --- */
    .nav-links {
        display: none; 
        position: absolute; 
        top: 100%; 
        left: 0;
        width: 100%;
        background-color: var(--bianco); 
        flex-direction: column; 
        padding: 20px 0;
        text-align: center;
        z-index: 999; 
    }

    .nav-links.active {
        display: flex; 
        box-shadow: 0 10px 20px rgba(0,0,0,0.15); 
    }

    .nav-links li {
        margin: 15px 0; 
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* ---- BOTTONE CARD SERVIZI ---- */
.service-card img {
    width: 100%;          
    height: 200px;       
    object-fit: cover;    
    display: block;        
    border-radius: 8px 8px 0 0; 
}

@media (max-width: 500px) {
    .hero-content h1 {
        font-size: 2.8rem;
    }
    .hero-content p {
        font-size: 1.1rem;
    }
}
/* =========================================
   PAGINE SECONDARIE (STORIA E PRIVACY)
   ========================================= */

/* Fascia verde in alto per non finire sotto il menu fisso */
.page-header {
    background-color: var(--verde-principale);
    color: var(--bianco);
    padding: 150px 20px 80px 20px; /* I 150px spingono il titolo in giù, fuori dal menu! */
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* ---- PAGINA STORIA ---- */
.story-content {
    padding: 80px 20px;
    background-color: var(--bianco);
}

.story-grid {
    display: flex;
    gap: 50px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.story-text {
    flex: 1;
}

.story-text h2 {
    font-size: 2.2rem;
    color: var(--verde-principale);
    margin-bottom: 15px;
}

.story-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--testo-scuro);
    margin-bottom: 20px;
}

.story-image {
    flex: 1;
}

.story-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    object-fit: cover;
}

/* Responsive per i telefoni (Pagina Storia) */
@media (max-width: 850px) {
    .story-grid {
        flex-direction: column;
        text-align: center;
    }
}