/* --- Reset e Stili Base --- */
body, h1, h2, h3, h4, p, ul, li, form, label, input, textarea, button, img {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif; /* Testo di default */
    line-height: 1.7;
    color: #f0f0f0;
    background-color: #121212; /* Sfondo base molto scuro */
    font-size: 16px;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    font-family: 'Saira', sans-serif; /* Titoli */
    font-weight: 500; /* Saira Medium */
    color: #ff8c00; /* Arancione scuro per i titoli principali */
    margin-bottom: 0.75em;
}
h2 { font-size: 2.8rem; }
h3 { font-size: 2.2rem; text-align: center; padding-top: 1em;}
h4 { font-size: 1.5rem; color: #ffa500; } /* Arancione più chiaro per sottotitoli */


/* --- Header e Navigazione Sticky --- */
#main-header {
    background: rgba(18, 18, 18, 0.85); /* Sfondo semi-trasparente scuro */
    color: #ffffff;
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s ease, padding 0.3s ease, transform 0.3s ease-out;
    backdrop-filter: blur(5px); /* Effetto vetro per header sticky */
}

#main-header.scrolled {
    background: rgba(10, 10, 10, 0.95); /* Più scuro e meno trasparente on scroll */
    padding: 10px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

#main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#logo {
    height: 70px; /* Adatta all'altezza del tuo logo */
    width: auto;
    transition: height 0.3s ease;
}
#main-header.scrolled #logo {
    height: 40px;
}

#main-nav ul {
    list-style: none;
    display: flex;
}

#main-nav ul li {
    margin-left: 25px;
}

#main-nav ul li a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    font-family: 'Saira', sans-serif;
    font-size: 1.1rem;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.3s ease, border-bottom-color 0.3s ease;
}

#main-nav ul li a:hover,
#main-nav ul li a.active-link {
    color: #ff8c00; /* Arancione */
    border-bottom-color: #ff8c00;
}

/* --- Sezioni Parallax --- */
.parallax-section {
    position: relative;
    min-height: 70vh; /* Altezza minima, puoi adattarla */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden; /* Importante per contenere il background */
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-attachment: fixed; /* Effetto Parallax base */
    z-index: -2; /* Dietro il contenuto e l'overlay */
}

.parallax-section::before { /* Overlay per migliorare leggibilità testo */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Overlay scuro */
    z-index: -1; /* Tra background e contenuto */
}

.content-wrapper {
    position: relative; /* Per assicurare che sia sopra l'overlay */
    z-index: 1;
    padding: 40px 20px;
    max-width: 900px; /* Limita larghezza contenuto su parallax */
    margin: auto;
}
.content-wrapper.hero-content h2 {font-size: 3.5rem; text-shadow: 2px 2px 4px rgba(0,0,0,0.7);}
.content-wrapper.hero-content p {font-size: 1.4rem; margin-bottom: 30px; text-shadow: 1px 1px 3px rgba(0,0,0,0.5);}


/* --- Sezioni di Contenuto Standard --- */
.content-section {
    padding: 80px 0;
    background-color: #1e1e1e; /* Sfondo per sezioni non-parallax */
}
.content-section:nth-child(even) { /* Alterna colore di sfondo sezioni */
    background-color: #171717;
}

/* --- Layout a Due Colonne --- */
.two-column-layout {
    display: flex;
    flex-wrap: wrap; /* Va a capo su schermi piccoli */
    align-items: center;
    gap: 40px; /* Spazio tra le colonne */
    margin-top: 30px;
}

.column-text, .column-image {
    flex: 1; /* Entrambe le colonne prendono metà spazio */
    min-width: 300px; /* Larghezza minima prima di andare a capo */
}

.column-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.reverse-columns { /* Per invertire ordine colonne */
    flex-direction: row-reverse;
}


/* --- Stili Specifici Sezioni --- */
#chi-siamo .column-text p { margin-bottom: 1em; }

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.service-item {
    background: rgba(40, 40, 40, 0.8);
    padding: 25px;
    border-left: 5px solid #ff8c00;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

#formazione ul {
    list-style: none;
    padding-left: 0;
}
#formazione ul li {
    background: rgba(50, 50, 50, 0.7);
    padding: 12px 18px;
    margin-bottom: 10px;
    border-radius: 5px;
    border-left: 3px solid #ffa500;
}

.feature-list {
    list-style: none;
    padding: 0;
    max-width: 700px;
    margin: 20px auto 0 auto;
}
.feature-list li {
    background: rgba(255,255,255,0.05);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    text-align: left;
}
.feature-list li strong { color: #ffa500; }

/* --- Testimonial Slider --- */
#testimonial-section h3 { color: #ff8c00; }
.testimonial-slider {
    position: relative;
    background-color: #2a2a2a;
    padding: 30px;
    border-radius: 8px;
    min-height: 150px; /* Adatta se necessario */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.testimonial { display: none; }
.testimonial.active { display: block; }
.testimonial p { font-style: italic; margin-bottom: 10px; font-size: 1.1rem; color: #ddd; }
.testimonial span { font-weight: bold; color: #ff8c00; font-size: 1rem; }

.testimonial-slider button {
    background-color: #ff8c00;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 1.2rem;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: background-color 0.3s ease;
}
.testimonial-slider button:hover { background-color: #e07b00; }
#prevTestimonial { left: 15px; }
#nextTestimonial { right: 15px; }

/* --- Form Contatti --- */
#contatti h3 {color: #fff;}
#contact-form .form-group {
    margin-bottom: 20px;
}
#contact-form label {
    display: block;
    margin-bottom: 8px;
    color: #ccc;
    font-weight: bold;
}
#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form textarea {
    width: 100%;
    padding: 12px;
    border-radius: 5px;
    border: 1px solid #555;
    background-color: rgba(51, 51, 51, 0.8);
    color: #f4f4f4;
    font-size: 1rem;
}
#contact-form textarea { resize: vertical; min-height: 120px; }
.contact-details { margin-top: 30px; text-align: center; }
.contact-details p a { color: #ffa500; text-decoration: none; }
.contact-details p a:hover { text-decoration: underline; }

/* --- CTA Button --- */
.cta-button {
    display: inline-block;
    background: #ff8c00;
    color: #ffffff;
    padding: 15px 30px;
    text-decoration: none;
    font-size: 1.1rem;
    font-family: 'Saira', sans-serif;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(255, 140, 0, 0.3);
}
.cta-button:hover {
    background: #e07b00;
    transform: translateY(-2px);
}

/* --- Footer --- */
footer {
    background: #0a0a0a;
    color: #aaa;
    text-align: center;
    padding: 40px 0;
    margin-top: 0; /* Rimosso margine se le sezioni parallax arrivano fino in fondo */
    border-top: #ff8c00 3px solid;
}
footer .social-links a {
    color: #ff8c00;
    text-decoration: none;
    margin: 0 12px;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}
footer .social-links a:hover { color: #ffffff; }
footer p { font-size: 0.9rem; margin-top: 15px; }
footer p a { color: #aaa; text-decoration: none; }
footer p a:hover { color: #ff8c00; }


/* --- Media Queries per Responsività --- */
@media(max-width: 992px) {
    h2 { font-size: 2.4rem; }
    h3 { font-size: 1.9rem; }
    .content-wrapper.hero-content h2 {font-size: 2.8rem;}
    .content-wrapper.hero-content p {font-size: 1.2rem;}

    .two-column-layout {
        gap: 30px;
    }
}

@media(max-width: 768px) {
    /* Typography */
    html {
        font-size: 14px;
    }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.8rem; }
    h4 { font-size: 1.3rem; }
    p { font-size: 1rem; line-height: 1.6; }

    /* Header */
    #main-header {
        padding: 10px 0;
    }
    
    #logo {
        height: 50px;
    }
    
    #main-header.scrolled #logo {
        height: 35px;
    }

    /* Navigation */
    #main-nav {
        display: none; /* Hide default navigation */
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(18, 18, 18, 0.95);
        padding: 20px 0;
    }

    #main-nav.active {
        display: block;
    }

    #main-nav ul {
        flex-direction: column;
        align-items: center;
    }

    #main-nav ul li {
        margin: 10px 0;
        text-align: center;
    }

    /* Add mobile menu button */
    .mobile-menu-button {
        display: block;
        background: none;
        border: none;
        color: white;
        font-size: 24px;
        cursor: pointer;
        padding: 5px;
    }

    /* Content sections */
    .container {
        width: 95%;
        padding: 0 10px;
    }

    .two-column-layout {
        flex-direction: column;
    }

    .column-text, .column-image {
        width: 100%;
        padding: 10px 0;
    }
}

@media(max-width: 480px) {
    body { font-size: 15px; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.5rem; }
    .content-wrapper.hero-content h2 {font-size: 2rem;}
    .content-wrapper.hero-content p {font-size: 1rem;}
    .cta-button { padding: 12px 25px; font-size: 1rem;}

    .testimonial-slider { padding: 20px 45px; /* Più padding laterale per i bottoni */}
    .testimonial-slider button { display: none; } /* Nascondi bottoni su schermi molto piccoli, o progetta navigazione diversa */

    html {
        font-size: 13px;
    }

    .container {
        padding: 0 1rem;
    }

    .hero-text h2 {
        font-size: 1.4rem;
    }
}

/* Stili per il Banner Cookie e Modal Policy */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    padding: 1rem;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.cookie-content p {
    flex: 1;
    margin: 0;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
}

.cookie-buttons button {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

#accept-cookies {
    background-color: #4CAF50;
    color: white;
}

#reject-cookies {
    background-color: #f44336;
    color: white;
}

.cookie-buttons button:hover {
    opacity: 0.9;
}

/* Modal Policy */
.policy-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.modal-content {
    background: #fff;
    color: #333;
    padding: 2rem;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.close-modal:hover {
    color: #333;
}

.policy-content {
    margin-top: 1rem;
}

.policy-content h2 {
    color: #333;
    margin-bottom: 1rem;
}

.policy-content p {
    margin-bottom: 1rem;
    color: #666;
}

/* Cookie Banner e Preferenze */
.cookie-header {
    margin-bottom: 1rem;
}

.cookie-header h3 {
    margin-bottom: 0.5rem;
}

.cookie-options {
    margin: 1.5rem 0;
}

.cookie-option {
    margin-bottom: 1rem;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.cookie-option label {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.cookie-option input[type="checkbox"] {
    margin-right: 0.5rem;
}

.cookie-option p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.cookie-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
}

.cookie-preferences-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.cookie-preferences-modal .modal-content {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
}

.cookie-preferences-modal h3 {
    margin-bottom: 1rem;
    color: #333;
}

.modal-footer {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

#save-preferences {
    background-color: #4CAF50;
    color: white;
}

#close-preferences {
    background-color: #ccc;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }

    .hero-flex {
        flex-direction: column;
    }
    
    .hero-image {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
}