/* --- NAVIGAZIONE FISSA ED EFFETTI --- */
html { scroll-behavior: smooth; }

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
}

body {
  background: #f5f7fb;
  color: #1c2b4a;
}

/* CONTAINER */
.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* HEADER */
.header {
 /* background: linear-gradient(90deg, #0b2d6b, #1f4fa3);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(90deg, #0b2d6b, #1f4fa3);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);*/
	background-color: #0b2d6b; /* Lo stesso blu della contact bar */
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav a.nav-link.active {
  color: #4da3ff;
  border-bottom: 2px solid #4da3ff;
  padding-bottom: 5px;
}

.logo {
  display: flex;
  align-items: center;
  color: #fff;
position: relative; /* Necessario per posizionare l'immagine rispetto al testo */
  z-index: 1100;      /* Assicura che il logo sia sopra tutto */
}

.logo img {
 /* height: 45px;
  margin-right: 10px;*/
  height: 62px;       /* Aumenta l'altezza (regola a piacere) */
  width: auto;
  position: absolute; /* Esce dal flusso del testo per muoversi liberamente */
  top: -10px;         /* Lo sposta leggermente verso l'alto rispetto alla barra */
  left: 0;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3)); /* Aggiunge profondità */
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo:hover img {
  transform: scale(1.1) rotate(-3deg); /* Si ingrandisce e ruota leggermente */
}

/* Sposta il testo del logo a destra per non farlo coprire dall'immagine */
.logo span {
  margin-left: 95px;  /* Spazio pari alla larghezza del logo ingrandito */
  font-size: 16px;
  line-height: 1.2;
}

nav a {
  color: #fff;
  margin-left: 20px;
  text-decoration: none;
  font-size: 15px;
  transition: background-color 0.3s ease, color 0.3s ease;
  padding: 8px 16px;
  border-radius: 20px;
  display: inline-block;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.2); /* Bianco semitrasparente */
    color: #ffffff; /* Mantiene il testo bianco o puoi cambiarlo in #4da3ff */
    transform: translateY(-2px); /* Opzionale: piccolo scatto verso l'alto */
}

nav a:not(.btn-nav):hover {
  background-color: rgba(255, 255, 255, 0.15); /* Bianco trasparente */
  color: #4da3ff; /* Cambia colore del testo in azzurro */
}



.btn-nav {
  background: #4da3ff;
  padding: 8px 14px;
  border-radius: 20px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-nav:hover {
  background-color: #3686e0; /* Un blu leggermente più scuro */
  transform: translateY(-2px); /* Piccolo scatto verso l'alto */
  color: #fff !important; /* Forza il testo a rimanere bianco */
}

/* HERO */
.hero {
  /*background: linear-gradient(180deg, #eaf1ff, #ffffff);
  padding: 60px 0;*/
  position: relative;
  min-height: 80vh; /* Altezza minima: 80% della finestra */
  display: flex;
  align-items: center;
  padding: 100px 0 150px 0;
  
  /* Background con immagine e overlay scuro per far leggere il testo */
  background: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.4)), 
              url('../images/hero.jpg'); 
  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* Effetto leggero parallasse */
}

.hero-content {
//*  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;*//
  display: block; /* Non serve più il grid se l'immagine è lo sfondo */
  width: 100%;
  display: flex;
  justify-content: flex-end;
}
.hero-text {
  max-width: 600px; /* Stringiamo il testo per non farlo andare sopra i volti nell'immagine */
}

.hero-text h1 {
  font-size: 38px;
  margin-bottom: 15px;
}

.hero-text span {
  color: #1f4fa3;
}

.hero-text p {
  margin-bottom: 25px;
  font-size: 18px;
}

.hero-buttons a {
  padding: 12px 22px;
  border-radius: 25px;
  margin-right: 10px;
  text-decoration: none;
  font-weight: 600;
}

/* --- IL DIVIDER CURVO --- */
.custom-shape-divider-bottom {
    position: absolute;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
	z-index: 5; /* Più alto dello sfondo, più basso del testo */
	bottom: 0;
	transform: rotate(180deg);
}

.custom-shape-divider-bottom svg {
    position: relative;
    display: block;
    width: calc(201% + 1.3px); /* Leggermente più largo per coprire i bordi */
    height: 85px;
}

.custom-shape-divider-bottom .shape-fill {
    fill: #1f4fa3; /* Il blu della tua sezione successiva */
}

.btn-primary {
  background: #1f4fa3;
  color: #fff;
}

.btn-secondary {
  background: #fff;
  border: 2px solid #1f4fa3;
  color: #1f4fa3;
}

.hero-image img {
  width: 100%;
  border-radius: 20px;
}

/* ABOUT */
.about {
	position: relative; /* Necessario per ancorare il divider */
  padding: 60px 0;
  background: #ffffff;
}

.about h2 {
  font-size: 32px;
  margin-bottom: 15px;
}

.about p {
  max-width: 750px;
  margin-bottom: 40px;
}

.custom-shape-divider-about {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.custom-shape-divider-about svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 80px; /* Altezza della curva */
}

/* Il colore deve essere lo stesso della sezione .courses */
.custom-shape-divider-about .shape-fill {
  fill: #f5f7fb; /* Il grigio/azzurro tenue che usi per il corpo pagina o i corsi */
}

/* ABOUT */
.courses {
  padding: 60px 0;
}

.courses h2 {
  font-size: 32px;
  margin-bottom: 15px;
}

.courses p {
  max-width: 700px;
  margin-bottom: 40px;
}

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

.course {
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

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

.course h3 {
  padding: 15px;
  font-size: 18px;
}

.course p {
  padding: 0 15px 20px;
  font-size: 14px;
}


.clickable-course {
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.clickable-course:hover {
  transform: scale(1.05); /* Ingrandimento leggero */
  box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

/* --- MODAL (FOCUS) --- */
.modal {
  display: none; 
  position: fixed;
  z-index: 2000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.7);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  padding: 40px;
  border-radius: 20px;
  max-width: 500px;
  text-align: left;
  position: relative;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.close-modal {
  position: absolute;
  top: 15px; right: 20px;
  font-size: 30px;
  cursor: pointer;
}

/* CERTIFICATIONS */

.certifications {
  display: flex;
  flex-direction: column; /* Dispone Titolo e Riga uno sopra l'altro */
  align-items: center;    /* Centra il titolo e la riga orizzontalmente */
  width: 100%;
  background: #eaf1ff;
}

.sezione-certificazioni {
  display: flex;             /* Mette i blocchi uno di fianco all'altro */
  justify-content: center;   /* Centra l'intera riga nella pagina */
  align-items: anchor-center;   /* Allinea i blocchi in alto */
  gap: 40px;                 /* Spazio orizzontale tra le varie certificazioni */
  padding: 20px;
  width: 100%;
}

.titolo-sezione {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 5px;   
  color: #333;
  padding-top: 10px;
}

.sezione-certificazioni h2{
   align: center;
   color: #1f4fa3;
   margin: 0 15px;
   font-size: 32px;
   font-weight: bold;
}

.cert-block {
  display: flex;
  flex-direction: column;    /* Dispone testo e logo in verticale */
  align-items: center;       /* Centra il testo rispetto al logo */
  width: 150px;              /* Larghezza fissa opzionale per uniformità */
}

.cert-block span {
	color: #1f4fa3;
	 margin: 0 15px;
  font-weight: bold;
}
.cert-label {
  font-weight: bold;
  color: #003366;
  margin-bottom: 15px;       /* Spazio tra il testo e il logo sottostante */
  font-family: Arial, sans-serif;
}

.cert-logo {
  max-width: 100%;           /* Il logo non supera la larghezza del blocco */
  height: auto;              /* Mantiene le proporzioni */
}

/* FOOTER */
.footer {
  background: #0b2d6b;
  color: #fff;
  padding: 25px 0;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  text-align: center;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  nav {
    display: none;
  }
}

/* SIDEBAR */
.sidebar {
  height: 100%;
  width: 300px;
  position: fixed;
  z-index: 2000; /* Sopra la header sticky */
  top: 0;
  right: -300px; /* Nascosta a destra */
  background-color: #fff;
  box-shadow: -5px 0 15px rgba(0,0,0,0.1);
  transition: 0.4s ease; /* Velocità scorrimento */
  padding: 40px 20px;
}

.sidebar-cta {
  padding: 30px 22px;
  border-radius: 25px;
  margin-right: 10px;
  text-decoration: none;
  font-weight: 600;
}

.sidebar-cta a{
  padding: 12px 22px;
  border-radius: 25px;
  margin-right: 10px;
  text-decoration: none;
  font-weight: 600;
}

.sidebar.open {
  right: 0; /* Appare scorrendo verso sinistra */
}

.sidebar-content h2 {
  color: #0b2d6b;
  margin-bottom: 30px;
  border-bottom: 2px solid #4da3ff;
  padding-bottom: 10px;
}

.sidebar-info p {
  margin-bottom: 20px;
  font-size: 16px;
  color: #1c2b4a;
}


.sidebar-social {
  margin-top: 30px;
  border-top: 1px solid #eee;
  padding-top: 20px;
}

.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.social-link {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  text-decoration: none;
  font-size: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.social-link.facebook {
  background-color: #1877F2;
}

.social-link.instagram {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

.social-link.whatsapp {
  background-color: #25D366;
  color: #fff;
}

.social-link:hover {
transform: translateY(-5px) scale(1.1);
  box-shadow: 0 6px 15px rgba(0,0,0,0.2);
  filter: brightness(1.1);
}

/* Sidebar info links */
.sidebar-info a {
  text-decoration: none;
  color: #1f4fa3;
  transition: color 0.2s;
}

.sidebar-info a:hover {
  color: #0b2d6b;
}

/* Pulsante di chiusura */
.close-sidebar {
  position: absolute;
  top: 0;
  right: 20px;
  font-size: 35px;
  cursor: pointer;
  color: #0b2d6b;
}

/* OVERLAY */
.overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1999;
}

.overlay.active {
  display: block;
}

/*TEST*/
    /* Popup Overlay */
    .test-popup-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(5px);
        z-index: 9999;
        animation: fadeIn 0.3s ease-out;
    }

    .test-popup-overlay.active {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 20px;
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    @keyframes slideUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Popup Container */
    .test-popup-container {
        background: white;
        border-radius: 16px;
        max-width: 900px;
        width: 100%;
        max-height: 90vh;
        overflow: hidden;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Popup Header */
    .test-popup-header {
        background: linear-gradient(135deg, #2986cc 0%, #073763 100%);
        padding: 30px 32px;
        color: white;
        position: relative;
    }

    .test-popup-header h2 {
        font-size: 28px;
        font-weight: 700;
        margin-bottom: 8px;
    }

    .test-popup-header p {
        font-size: 14px;
        opacity: 0.95;
    }

    .test-close-button {
        position: absolute;
        top: 20px;
        right: 20px;
        background: rgba(255, 255, 255, 0.2);
        border: none;
        color: white;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        cursor: pointer;
        font-size: 24px;
        line-height: 1;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .test-close-button:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: rotate(90deg);
    }

	
	
	
    /* Tabs */
    .test-tabs {
        display: flex;
        background: #f8f9fa;
        padding: 0 32px;
        gap: 8px;
        border-bottom: 2px solid #e9ecef;
    }

    .test-tab-button {
        padding: 16px 28px;
        background: transparent;
        border: none;
        border-bottom: 3px solid transparent;
        cursor: pointer;
        font-size: 15px;
        font-weight: 600;
        color: #6c757d;
        transition: all 0.3s;
        position: relative;
    }

    .test-tab-button.active {
        color: #2a9d8f;
        border-bottom-color: #e76f51;
    }

    .test-tab-button:hover:not(.active) {
        color: #495057;
    }

    /* Popup Content */
    .test-popup-content {
        padding: 32px;
        max-height: calc(90vh - 180px);
        overflow-y: auto;
    }

    .test-popup-content::-webkit-scrollbar {
        width: 8px;
    }

    .test-popup-content::-webkit-scrollbar-track {
        background: #f8f9fa;
        border-radius: 4px;
    }

    .test-popup-content::-webkit-scrollbar-thumb {
        background: #cbd5e0;
        border-radius: 4px;
    }

    .test-popup-content::-webkit-scrollbar-thumb:hover {
        background: #a0aec0;
    }

    /* Tab Content */
    .test-tab-content {
        display: none;
        animation: fadeInContent 0.4s ease-out;
    }

    .test-tab-content.active {
        display: block;
    }

    @keyframes fadeInContent {
        from {
            opacity: 0;
            transform: translateY(10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
	
	        /* User Info Section */
        .user-info-section {
            background: linear-gradient(to right, #f0f9f8, white);
            padding: 24px;
            border-radius: 12px;
            margin-bottom: 28px;
            border-left: 4px solid #e76f51;
        }

        .user-info-section h3 {
            color: #2a9d8f;
            font-size: 18px;
            margin-bottom: 16px;
            font-weight: 600;
        }

        .form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 16px;
            margin-bottom: 16px;
        }

        .form-group {
            display: flex;
            flex-direction: column;
        }

        .form-group label {
            font-size: 14px;
            font-weight: 600;
            color: #2c3e50;
            margin-bottom: 6px;
        }

        .form-group label .required {
            color: #dc3545;
            margin-left: 2px;
        }

        .form-group input {
            padding: 12px 16px;
            border: 2px solid #e9ecef;
            border-radius: 8px;
            font-size: 15px;
            transition: all 0.2s;
            font-family: inherit;
        }

        .form-group input:focus {
            outline: none;
            border-color: #2a9d8f;
            box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.1);
        }

        .form-group input.error {
            border-color: #dc3545;
        }

        .error-message {
            color: #dc3545;
            font-size: 13px;
            margin-top: 4px;
            display: none;
        }

        .error-message.show {
            display: block;
        }

        /* Test Intro */
        .test-intro {
            background: linear-gradient(to right, #e8f5f3, white);
            padding: 20px;
            border-radius: 10px;
            margin-bottom: 28px;
            border-left: 4px solid #2a9d8f;
        }

        .test-intro h3 {
            color: #2a9d8f;
            font-size: 20px;
            margin-bottom: 12px;
        }

        .test-intro p {
            color: #6c757d;
            font-size: 14px;
            line-height: 1.6;
            margin-bottom: 8px;
        }

    /* Test Sections */
    .test-section {
        margin-bottom: 40px;
    }

    .test-section:last-child {
        margin-bottom: 0;
    }

    .test-section-header {
        background: linear-gradient(to right, #f0f9f8, transparent);
        padding: 18px 20px;
        border-left: 4px solid #e76f51;
        margin-bottom: 24px;
        border-radius: 8px;
    }

    .test-section-header h3 {
        font-size: 20px;
        color: #2a9d8f;
        margin-bottom: 4px;
        font-weight: 700;
    }

    .test-section-header p {
        font-size: 13px;
        color: #6c757d;
        font-style: italic;
    }

    /* Instructions */
    .test-instructions {
        background: #f8f9fa;
        padding: 16px 20px;
        border-radius: 10px;
        margin-bottom: 28px;
        border: 1px solid #e9ecef;
    }

    .test-instructions strong {
        color: #2a9d8f;
        font-weight: 600;
    }

    /* Questions */
    .test-question {
        background: white;
        padding: 24px;
        border-radius: 12px;
        margin-bottom: 20px;
        border: 2px solid #e9ecef;
        transition: all 0.3s;
    }

    .test-question:hover {
        border-color: #2a9d8f;
        box-shadow: 0 4px 12px rgba(42, 157, 143, 0.1);
    }

	        .test-question.correct {
            border-color: #4a8f7c;
            background: rgba(74, 143, 124, 0.05);
        }

        .test-question.incorrect {
            border-color: #dc3545;
            background: rgba(220, 53, 69, 0.05);
        }
		
    .test-question-number {
        display: inline-block;
        background: #2a9d8f;
        color: white;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        text-align: center;
        line-height: 28px;
        font-weight: 700;
        font-size: 14px;
        margin-right: 12px;
    }
	
	       .test-question.correct .test-question-number {
            background: #4a8f7c;
        }

        .test-question.incorrect .test-question-number {
            background: #dc3545;
        }

    .test-question-text {
        font-size: 16px;
        font-weight: 500;
        margin-bottom: 16px;
        color: #2c3e50;
    }
	
	       .test-question.correct .test-question-number {
            background: #4a8f7c;
        }

        .test-question.incorrect .test-question-number {
            background: #dc3545;
        }
		
		        /* Correct and Wrong answers */
        .test-option.correct-answer label {
            background: rgba(74, 143, 124, 0.15) !important;
            border-color: #4a8f7c !important;
            font-weight: 600;
        }

        .test-option.correct-answer label::before {
            border-color: #4a8f7c !important;
            background: #4a8f7c !important;
        }

        .test-option.correct-answer label::after {
            content: '✓';
            position: absolute;
            right: 16px;
            top: 50%;
            transform: translateY(-50%);
            color: #4a8f7c;
            font-weight: 700;
            font-size: 20px;
        }

        .test-option.wrong-answer label {
            background: rgba(220, 53, 69, 0.15) !important;
            border-color: #dc3545 !important;
            font-weight: 600;
        }

        .test-option.wrong-answer label::before {
            border-color: #dc3545 !important;
            background: #dc3545 !important;
        }

        .test-option.wrong-answer label::after {
            content: '✗';
            position: absolute;
            right: 16px;
            top: 50%;
            transform: translateY(-50%);
            color: #dc3545;
            font-weight: 700;
            font-size: 22px;
        }

    /* Options */
    .test-options {
        display: grid;
        gap: 10px;
    }

    .test-option {
        position: relative;
    }

    .test-option input[type="radio"] {
        position: absolute;
        opacity: 0;
    }

    .test-option label {
        display: block;
        padding: 14px 20px 14px 48px;
        background: #f8f9fa;
        border: 2px solid #e9ecef;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s;
        position: relative;
    }

    .test-option label::before {
        content: '';
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        width: 20px;
        height: 20px;
        border: 2px solid #cbd5e0;
        border-radius: 50%;
        background: white;
        transition: all 0.2s;
    }

    .test-option input[type="radio"]:checked + label::before {
        border-color: #2a9d8f;
        background: #2a9d8f;
        box-shadow: inset 0 0 0 4px white;
    }

    .test-option label:hover {
        background: white;
        border-color: #2a9d8f;
    }

    .test-option input[type="radio"]:checked + label {
        background: rgba(42, 157, 143, 0.05);
        border-color: #2a9d8f;
        font-weight: 500;
    }

	
	        /* Correct and Wrong answers */
        .test-option.correct-answer label {
            background: rgba(74, 143, 124, 0.15) !important;
            border-color: #4a8f7c !important;
            font-weight: 600;
        }

        .test-option.correct-answer label::before {
            border-color: #4a8f7c !important;
            background: #4a8f7c !important;
        }

        .test-option.correct-answer label::after {
            content: '✓';
            position: absolute;
            right: 16px;
            top: 50%;
            transform: translateY(-50%);
            color: #4a8f7c;
            font-weight: 700;
            font-size: 20px;
        }

        .test-option.wrong-answer label {
            background: rgba(220, 53, 69, 0.15) !important;
            border-color: #dc3545 !important;
            font-weight: 600;
        }

        .test-option.wrong-answer label::before {
            border-color: #dc3545 !important;
            background: #dc3545 !important;
        }

        .test-option.wrong-answer label::after {
            content: '✗';
            position: absolute;
            right: 16px;
            top: 50%;
            transform: translateY(-50%);
            color: #dc3545;
            font-weight: 700;
            font-size: 22px;
        }
		        .test-submitted .test-option label {
            cursor: default;
        }

        .test-submitted .test-option input[type="radio"] {
            pointer-events: none;
        }

    /* Submit Button */
    .test-submit-button {
        background: linear-gradient(135deg, #e76f51 0%, #d35400 100%);
        color: white;
        border: none;
        padding: 16px 40px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 12px;
        cursor: pointer;
        transition: all 0.3s;
        width: 100%;
        margin-top: 32px;
        box-shadow: 0 4px 12px rgba(231, 111, 81, 0.3);
    }

    .test-submit-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(231, 111, 81, 0.4);
    }

    .test-submit-button:active {
        transform: translateY(0);
    }

        /* Result */
        .test-result {
            display: none;
            background: linear-gradient(135deg, #2a9d8f 0%, #264653 100%);
            color: white;
            padding: 24px;
            border-radius: 12px;
            margin-top: 28px;
            text-align: center;
        }

        .test-result.show {
            display: block;
            animation: slideUp 0.4s ease-out;
        }

        .test-result h4 {
            font-size: 24px;
            margin-bottom: 8px;
            font-weight: 700;
        }

        .test-result p {
            font-size: 16px;
            opacity: 0.95;
            margin: 8px 0;
        }

        .test-score {
            font-size: 48px;
            font-weight: 700;
            margin: 16px 0;
        }

        .trigger-btn {
            background: linear-gradient(135deg, #2a9d8f 0%, #264653 100%);
            color: white;
            padding: 14px 32px;
            border: none;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            font-size: 16px;
            transition: all 0.3s;
            box-shadow: 0 4px 12px rgba(42, 157, 143, 0.3);
        }

        .trigger-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(42, 157, 143, 0.4);
        }

        /* Loading Spinner */
        .spinner {
            display: none;
            width: 20px;
            height: 20px;
            border: 3px solid rgba(255,255,255,0.3);
            border-top-color: white;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            margin: 0 auto;
        }

        .spinner.show {
            display: block;
        }

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

        /* Responsive */
        @media (max-width: 768px) {
            .form-row {
                grid-template-columns: 1fr;
            }

            .test-popup-header {
                padding: 20px 24px;
            }

            .test-popup-content {
                padding: 24px 20px;
            }

            .test-question {
                padding: 20px;
            }
        }
		
/* SEZIONE TESTS */
#tests {
  position: relative;
  padding: 120px 0;
  text-align: center;

  background:
    linear-gradient(
      rgba(255, 255, 255, 0.85),
      rgba(255, 255, 255, 0.65)
    ),
    url('../images/sala2.jpeg');

  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* stesso mood della hero */
}

#tests .btn-test {
  margin-top: 30px;
  padding: 16px 36px;
  font-size: 18px;
  border-radius: 30px;
  box-shadow: 0 8px 20px rgba(31, 79, 163, 0.35);
	transition: all 0.3s ease;
	    animation: pulse 2.5s infinite;
		  inset: 0;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(31, 79, 163, 0.5);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(31, 79, 163, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(31, 79, 163, 0);
  }
}