/* Variabili dei colori */
:root {
    --primary-color: #009FE3;
    --text-color: #333;
    --bg-light: #f8f9fa;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Reset e stili base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f4f4f4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header e Logo */
header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 20px 0;
}

.logo {
    text-align: center;
    padding: 10px 0;
}

.logo-img {
    max-width: 500px;
    width: 100%;
    height: auto;
}

.logo-description {
    margin: 10px auto 0;
    padding: 10px 0;
    position: relative;
    width: calc(100% - 40px);
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
}

.logo-description::before,
.logo-description::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #009FE3;
}

.logo-description::before {
    top: 0;
}

.logo-description::after {
    bottom: 0;
}

.logo-description h3 {
    color: #009FE3;
    font-size: 1.4em;
    margin: 5px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    width: 100%;
}

/* Aggiungiamo la media query per dispositivi mobili */
@media (max-width: 768px) {
    .logo-description {
        width: calc(100% - 40px);
        margin-left: auto;
        margin-right: auto;
    }
    
    .logo-description h3 {
        font-size: 2.2vw;
        margin: 3px 0;
        white-space: nowrap;
        width: 100%;
    }
    
    /* Aggiustiamo dinamicamente la dimensione del testo finché non riempie lo spazio */
    @media (max-width: 700px) { .logo-description h3 { font-size: 2.4vw; }}
    @media (max-width: 600px) { .logo-description h3 { font-size: 2.6vw; }}
    @media (max-width: 500px) { .logo-description h3 { font-size: 2.8vw; }}
    @media (max-width: 400px) { .logo-description h3 { font-size: 3vw; }}
}

/* Per schermi molto piccoli, riduciamo ulteriormente */
@media (max-width: 480px) {
    .logo-description {
        width: calc(100% - 20px);
    }
    
    .logo-description h3 {
        font-size: 2vw;
    }
}

/* Menu di navigazione */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin: 10px;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #009FE3;
    margin: 5px 0;
    transition: transform 0.3s;
}

.menu {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 15px;
}

.menu-link {
    color: #333;
    text-decoration: none;
    padding: 5px 10px;
}

.menu-link:hover,
.menu-link.active {
    background-color: #009FE3;
    color: white;
    border-radius: 4px;
}

/* Stili per la pagina prodotti */
.products-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.products-content h2 {
    color: var(--primary-color);
    margin-bottom: 40px;
    font-size: 28px;
    text-align: center;
}

.product-section {
    margin-bottom: 40px;
    padding: 20px;
    background-color: var(--bg-light);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.product-content {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.product-image {
    flex: 0 0 120px;
    width: 120px;
    height: 120px;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-info {
    flex: 1;
}

.product-info h3 {
    color: var(--primary-color);
    font-size: 20px;
    margin: 0 0 10px 0;
}

/* Sezione Mappa */
.map-section {
    margin-bottom: 3rem;
}

.map-section h2 {
    margin-bottom: 1rem;
}

.google-map {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.google-map iframe {
    display: block;
    width: 100%;
    border: none;
}

/* Sezione Contatti */
.contact-info {
    margin-bottom: 3rem;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.contact-info h2 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.contact-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* Form di contatto */
.contact-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.contact-form h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 24px;
    text-align: center;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.privacy-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.privacy-check input[type="checkbox"] {
    margin-top: 3px;
}

.submit-btn {
    width: 100%;
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #0085c0;
}

/* Form di Richiesta Informazioni */
.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

/* Aggiorna la media query esistente */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Stili per la pagina dei corsi */
.courses-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.courses-content h2 {
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 28px;
    text-align: center;
}

.courses-intro {
    text-align: center;
    margin-bottom: 40px;
}

.courses-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.course-item {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.course-item:hover {
    transform: translateY(-5px);
}

.course-image {
    height: 200px;
    overflow: hidden;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-info {
    padding: 20px;
}

.course-info h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 18px;
}

.course-info p {
    color: #666;
    font-size: 14px;
}

.lab-info {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.lab-image {
    max-width: 600px;
    margin: 0 auto 20px;
    border-radius: 8px;
    overflow: hidden;
}

.lab-image img {
    width: 100%;
    height: auto;
}

/* Aggiunta di stili responsive per i corsi */
@media (max-width: 768px) {
    .courses-list {
        grid-template-columns: 1fr;
    }
    
    .course-image {
        height: 180px;
    }
    
    .lab-image {
        max-width: 100%;
    }
}

/* Aggiungiamo media query per rendere il contenitore immagine responsivo */
@media (max-width: 768px) {
    .product-image {
        width: 100px;
        height: 100px;
    }
}

.authorized-dealer {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
    padding: 2rem;
    background-color: #f5f5f5;
    border-radius: 8px;
}

.dealer-image {
    flex: 0 0 auto;
    max-width: 300px;
}

.dealer-image img {
    width: 100%;
    height: auto;
}

.dealer-text {
    flex: 1;
}

/* Per dispositivi mobili */
@media (max-width: 768px) {
    .authorized-dealer {
        flex-direction: column;
        text-align: center;
    }
    
    .dealer-image {
        max-width: 200px;
        margin: 0 auto;
    }
}

.welcome-section {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-width: 1200px;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 0 0 auto;
    max-width: 400px;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Per dispositivi mobili */
@media (max-width: 768px) {
    .welcome-section {
        flex-direction: column;
        text-align: center;
    }
    
    .about-image {
        max-width: 100%;
        margin-top: 1rem;
    }
}

/* Stili per il pulsante di invio e lo spinner */
.btn-submit {
    position: relative;
    transition: all 0.3s ease;
}

.btn-submit.loading {
    background-color: #0056b3;
    cursor: wait;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Stili per i messaggi di feedback */
.form-message {
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 4px;
    display: none;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Media query per mobile */
@media (max-width: 768px) {
    .hamburger {
        display: block; /* Mostra il pulsante hamburger */
        position: fixed;
        top: 10px;
        right: 10px;
        z-index: 1000;
    }
    
    .menu {
        display: none; /* Nasconde il menu di default */
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        width: 250px;
        height: 100vh;
        background-color: white;
        padding: 60px 20px 20px;
        box-shadow: -2px 0 5px rgba(0,0,0,0.1);
        z-index: 999;
    }
    
    .menu.active {
        display: flex; /* Mostra il menu quando attivo */
    }
    
    /* Animazione per le linee dell'hamburger quando il menu è aperto */
    .hamburger.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Previene lo scroll quando il menu è aperto */
    body.menu-open {
        overflow: hidden;
    }
}