
/* ---------------------------------------------- */
/* VARIABILI GLOBALI                              */
/* ---------------------------------------------- */
:root {
    --bg: #0d0d0d;
    --bg-light: #1a1a1a;
    --accent: #00e0ff;
    --text: #f1f1f1;
    --text-muted: #bfbfbf;
    --radius: 18px;
    --transition: 0.35s ease;
    --shadow: 0 12px 40px rgba(0,0,0,0.3);
}


/* ---------------------------------------------- */
/* RESET                                          */
/* ---------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
    padding-top: 80px; /* evita overlap con navbar */
}


/* ---------------------------------------------- */
/* BACKGROUND PARALLAX                           */
/* ---------------------------------------------- */
.parallax-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 130%;
    height: 130%;
    background: radial-gradient(circle at 30% 30%, #1a1a1a, #000);
    z-index: -1;
    transition: transform 0.2s linear;
    filter: brightness(0.9);
}


/* ---------------------------------------------- */
/* LANG SWITCH                                    */
/* ---------------------------------------------- */
.lang-switch {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 2000;
}

.lang-btn {
    background: var(--bg-light);
    border: 1px solid #333;
    padding: 7px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text);
}

.lang-btn:hover {
    background: var(--accent);
    color: #000;
    transform: translateY(-3px);
}


/* ---------------------------------------------- */
/* HERO                                           */
/* ---------------------------------------------- */
.hero {
    padding: 100px 10vw 80px;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 10;
}

.hero {
    position: relative;
}


.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    text-shadow: 0 0 12px rgba(0, 224, 255, 0.2);
}

.hero .subtitle {
    font-size: 1.4rem;
    margin-top: 15px;
    max-width: 650px;
    color: var(--accent);
}

.hero .description {
    font-size: 1.2rem;
    margin-top: 15px;
    max-width: 650px;
    color: var(--text);
}

.spacer {
	margin-top: 10px;
}


.hero.section-with-parallax .parallax-section-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35); /* velatura nera */
  z-index: 2;
}


/* ---------------------------------------------- */
/* GENERIC SECTIONS                               */
/* ---------------------------------------------- */
section {
    padding: 80px 10vw;
}

section h2 {
    font-size: 2.4rem;
    margin-bottom: 25px;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(0, 224, 255, 0.15);
}


/* ---------------------------------------------- */
/* CARDS (BASE)                                   */
/* ---------------------------------------------- */
.card {
    background: rgba(0,0,0,0.65);
    padding: 25px;
    border-radius: var(--radius);
    border: 1px solid #222;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    transform-style: preserve-3d;
}

.card a {
    display: inline-block;
    /* font-weight: 600; */
    transition: var(--transition);
        
    text-decoration: none;
    background-color: var(--accent);
    /* line-height: 30px; */
    border-radius: 8px;
    height: 1rem;
    display: inline-table;
    padding: 5px 10px 5px 10px;
    right: calc(50% - 100px);
    position: absolute;
    color: var(--bg);
    margin-top: 20px;
}

.card a:hover {
    border-color: var(--accent);
    color: white;
    box-shadow: 0 10px 40px rgba(0, 224, 255, 0.5);
}


/* ---------------------------------------------- */
/* CONTACT SECTION                                */
/* ---------------------------------------------- */
#contact p {
    margin-bottom: 10px;
}

.contact-link {
    display: block;
    margin-top: 6px;
    font-size: 1.1rem;
    text-decoration: none;
    color: var(--accent);
    transition: var(--transition);
}

.contact-link:hover {
    color: #fff;
    transform: translateX(6px);
}


/* ---------------------------------------------- */
/* NAVBAR                                          */
/* ---------------------------------------------- */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    padding: 0 5vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(16px);
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    z-index: 2000;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent);
    min-width: min(12%, 200px);
	position: absolute;
	left: 60px;
}

.menu {
    list-style: none;
    display: flex;
    gap: 35px;
}

.menu a {
    text-decoration: none;
    color: var(--text);
    font-size: 1rem;
    transition: var(--transition);
}

.menu a:hover,
.menu a.active {
    color: var(--accent);
    text-shadow: 0 0 6px var(--accent);
}

.menu a.active::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
}


/* ---------------------------------------------- */
/* LANG DROPDOWN (NAVBAR)                         */
/* ---------------------------------------------- */
.navbar-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.lang-dropdown {
    position: relative;
}

.lang-toggle {
    background: none;
    color: var(--text);
    border: 1px solid #444;
    padding: 7px 15px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.lang-toggle:hover {
    border-color: var(--accent);
}

.lang-menu {
    position: absolute;
    top: 45px;
    right: 0;
    background: var(--bg-light);
    border: 1px solid #333;
    border-radius: var(--radius);
    padding: 8px 0;
    display: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.lang-option {
    padding: 10px 18px;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.lang-option:hover {
    background: var(--accent);
    color: #000;
}

#learning-container {
display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

@media (max-width: 700px) {
    #learning-container {
        grid-template-columns: 1fr; 
    }
}


/* ---------------------------------------------- */
/* BUTTON NOTIFICHE                               */
/* ---------------------------------------------- */
.notify-btn {
    /* background: var(--accent); */
    background: none;
    color: #000;
    border: 1px solid #444;
    padding: 7px 15px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.notify-btn:hover {
    /* transform: translateY(-3px); 
    background: #fff; */
    border: 1px solid #4f4;
    /* background: rgba(0, 224, 255, 0.4); */
}

.disabled {
    background: none;
    /* border: 1px solid #f44; */
}

.notify-btn.disabled:hover {
    /* transform: translateY(-3px); 
    background: #fff; */
    border: 1px solid #f44;
    /* background: rgba(0, 224, 255, 0.4); */
}


/* ---------------------------------------------- */
/* 3D TILT EFFECT                                 */
/* ---------------------------------------------- */
.card {
    perspective: 1200px;
    transition: transform 0.15s ease-out, box-shadow 0.2s ease-out;
}

.card .light {
    position: absolute;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(0,224,255,0.25), transparent 60%);
    filter: blur(40px);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.card:hover .light {
    opacity: 1;
}


/* ---------------------------------------------- */
/* PARALLAX PER SEZIONE                           */
/* ---------------------------------------------- */

.section-with-parallax {
    position: relative;
    overflow: hidden;
    perspective: 1600px;
}

.parallax-section-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    /* scala alta per permettere movimento */
    transform: translate3d(0,0,0) scale(1.75);
    will-change: transform, filter, opacity;
	z-index: -1;
}

/* Fade laterale */
.section-with-parallax::before,
.section-with-parallax::after {
    content: "";
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.section-with-parallax::before {
    left: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.55), transparent);
}

.section-with-parallax::after {
    right: 0;
    background: linear-gradient(to left, rgba(0,0,0,0.55), transparent);
}




/* ---------------------------------------------- */
/* CAROSELLO ARTICOLI                             */
/* ---------------------------------------------- */

/* --- CAROSELLO CONTENITORE --- */
/*
.articles-carousel {
  position: relative;
  width: 100%;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible; 
}
*/
.articles-carousel {
    position: relative;
    width: 100%;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;

    /* ✅ profondità 3D reale */
    perspective: 1400px;
}


/* --- WRAPPER DEL TRACK --- */
.carousel-track-wrapper {
  width: 100%;
  max-width: 900px;  /* IL CAROSELLO È LARGO 900PX, ADATTALO SE VUOI */
  overflow: visible;
  position: relative;
}

/* --- TRACK --- */
/*
.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
  gap: 40px; 
}
*/
.carousel-track {
    display: flex;
    gap: 40px;
    transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);

    /* ✅ indispensabile per Apple‑TV style */
    transform-style: preserve-3d;
}


/* --- CARD ARTICOLO --- */

.carousel-track .card {
  width: 320px;
  flex-shrink: 0;
  padding: 20px 24px;
  border-radius: 18px;
  background: rgba(0,0,0,0.65);
  color: white;
  border: 1px solid rgba(255,255,255,0.12);
  transition: box-shadow 0.3s ease;
}

@media (max-width: 600px) {
	.carousel-track .card {
		transform: scale(0.9)!important;
	}
}

/* ----------------------------------------- */
/* APPLE TV REAL PERSPECTIVE + TRAPEZOIDAL  */
/* ----------------------------------------- */

/* Perspective applicata al contenitore */
.articles-carousel {
    perspective: 1600px;
    overflow: visible;
}

/* Attiva la profondità 3D sul track */
.carousel-track {
    transform-style: preserve-3d;
}

.articles-carousel {
    perspective: 1600px;
    overflow: visible;
}

/* Track in 3D */
.carousel-track {
    transform-style: preserve-3d;
}


/* Transizione fluida per tutte le card */
.carousel-track .card {
    transition:
        transform 0.55s cubic-bezier(.16,1,.3,1),
        opacity   0.35s ease;
    transform-origin: center center;
}

/* ------------------------------ */
/* CARD CENTRALE (zoom + depth)   */
/* ------------------------------ */
.carousel-track .card.active {
    transform:
        scale(1.18)
        translateZ(90px);   /* più in primo piano */
    opacity: 1;
    z-index: 10;
}

/* ------------------------------------ */
/* CARD DI SINISTRA (trapezio moderato) */
/* ------------------------------------ */
.carousel-track .card.left {
    transform:
        translateX(-35px)
        rotateY(22deg)
       /* skewY(3deg) */
        scale(0.92)
        translateZ(0);
    opacity: 0.85;
}

/* ------------------------------------ */
/* CARD DI DESTRA (trapezio moderato)  */
/* ------------------------------------ */
.carousel-track .card.right {
    transform:
        translateX(35px)
        rotateY(-22deg)
       /* skewY(-3deg) */
        scale(0.92)
        translateZ(0);
    opacity: 0.85;
}

/* --------------------------------------------- */
/* CARD LONTANE SINISTRA (trapezio più marcato)  */
/* --------------------------------------------- */
.carousel-track .card.far-left {
    transform:
        translateX(0px)
        rotateY(40deg)
       /* skewY(6deg) */
        scale(0.85)
        translateZ(-40px)
		translateY(0px);
    opacity: 0.35;
}

/* -------------------------------------------- */
/* CARD LONTANE DESTRA (trapezio più marcato)   */
/* -------------------------------------------- */
.carousel-track .card.far-right {
    transform:
        translateX(0px)
        rotateY(-40deg)
       /* skewY(-6deg) */
        scale(0.85)
        translateZ(-40px)
		translateY(0px);
    opacity: 0.35;
}





.carousel-track .card:hover {
  box-shadow: 0 0 20px rgba(0,224,255,0.4);
  border-color: rgba(0,224,255,0.4);
}

/* --- FRECCE --- */

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-86%);
    
    /* ✅ background */
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);

    /* ✅ dimensioni e forma */
    width: 42px;
    height: 42px;
    display: flex;
    justify-content: center;
    align-items: center;

    border-radius: 50%;       /* cerchio */
    border: 1px solid rgba(0,224,255,0.4);

    /* ✅ icona */
    font-size: 1.4rem;
    color: var(--accent);
    cursor: pointer;

    /* ✅ overlay */
    z-index: 10;
    padding: 0;
    transition: 0.25s ease;
}

/* Hover */
.carousel-btn:hover {
    background: rgba(0, 224, 255, 0.8);
    color: #000;
    transform: translateY(-86%) scale(1.15);
}

/* Posizione */
.carousel-btn.left  { left: 10px; }
.carousel-btn.right { right: 10px; }

@media (max-width: 600px) {
	.carousel-btn.left  { left: -30px; }
	.carousel-btn.right { right: -30px; }
}

.carousel-track .card.active {
    transform: scale(1.18);
}



.carousel-track .card.active {
    transform: scale(1.15);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 30px rgba(0,224,255,0.25);
    z-index: 10;
}

/* Card non attive: rimpicciolimento progressivo */
.carousel-track .card {
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}



/* ============================================================
   TIMELINE VERTICALE ALTERNATA (PREMIUM + LINEE COLLEGATE)
============================================================ */

.vertical-timeline-alt {
    position: relative;
    width: 100%;
    margin: 40px auto;
    padding: 0 20px;
}

/* ✅ LINEA CENTRALE CONTINUA */
.vertical-timeline-alt::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;

    /* 👉 LINEA ALLINEATA AI PALLINI (20px / 2 = 10px) */
    left: calc(50% + 40px);

    width: 3px;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0.08),
        rgba(255,255,255,0.25),
        rgba(255,255,255,0.08)
    );
    z-index: 1;
}


/* ITEM ALTERNATI */
.vt-alt-item {
    position: relative;
    width: 50%;
    padding: 20px 30px;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.45s ease;
}

/* collegamento verticale tra i punti */
.vt-alt-item::before {
    content: "";
    position: absolute;
    top: -20px;
    bottom: 20px;
    width: 3px;
    background: rgba(255,255,255,0.15);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.vt-alt-item:last-child::before {
    bottom: 50%;
}

/* visibile al scroll */
.vt-alt-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* sinistra e destra */
.vt-alt-item.left  { left: 0; text-align: right; }
.vt-alt-item.right { left: 50%; text-align: left; }

.vt-alt-item.left.visible::before  { left: 100%; text-align: right; }
.vt-alt-item.right.visible::before { left: 0; text-align: left; }

/* ✅ MARKER */
.vt-alt-marker {
    position: absolute;
    top: 24px;
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    border: 3px solid #0d0d0d;
    box-shadow: 0 0 12px rgba(0,224,255,0.6);
    z-index: 3;
}

.vt-alt-item.left  .vt-alt-marker { right: -10px; }
.vt-alt-item.right .vt-alt-marker { left: -10px; }

/* CONTENUTO */
.vt-alt-content {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 15px 20px;
    border-radius: 12px;
    backdrop-filter: blur(6px);
    transition: 0.3s ease;
}

.vt-alt-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,224,255,0.25);
}

.vt-alt-content h3 {
    margin: 0;
    color: var(--accent);
    font-size: 1.25rem;
}

.vt-alt-date {
    margin: 6px 0 10px 0;
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
}


/* MOBILE: timeline diventa verticale normale */
@media (max-width: 840px) {
	
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
  }

  /* nascondi il menu normale */
  .menu {
    position: absolute;
    top: 60px;
    right: 0;
    left: 0;
    display: none; /* ✅ chiuso di default */
    flex-direction: column;
    background: rgba(0,0,0,0.9);
    padding: 20px 0;
    gap: 14px;
    text-align: center;
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  /* quando il menu è aperto */
  .menu.open {
    display: flex;
  }

  /* bottone hamburger */
  .hamburger {
    display: block;
    width: 32px;
    height: 24px;
    cursor: pointer;
    position: relative;
  }

  .hamburger span {
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--accent);
    left: 0;
    transition: 0.3s ease;
  }

  .hamburger span:nth-child(1) { top: 0; }
  .hamburger span:nth-child(2) { top: 10px; }
  .hamburger span:nth-child(3) { top: 20px; }

  /* animazione X */
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 10px;
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg);
    top: 10px;
  }
}
@media (max-width: 800px) {
    .vertical-timeline-alt::before {
        left: 15px;
    }

    .vt-alt-item {
        width: 100%;
        padding-left: 40px;
        text-align: left !important;
    }

    .vt-alt-item.left,
    .vt-alt-item.right {
        left: 0;
    }

    .vt-alt-marker {
        left: 0 !important;
        right: auto !important;
    }
	
	.vt-alt-item.left.visible::before  { left: 10px!important; text-align: right; }
	.vt-alt-item.right.visible::before { left: 10px!important; text-align: left; }

}


/* Pulse Glow Animation */
@keyframes pulseGlow {
    0% {
        box-shadow: 
            0 0 0px rgba(0,224,255,0.0),
            0 0 12px rgba(0,224,255,0.55);
        transform: scale(1);
    }
    50% {
        box-shadow: 
            0 0 12px rgba(0,224,255,0.35),
            0 0 25px rgba(0,224,255,0.75),
            0 0 45px rgba(0,224,255,0.45);
        transform: scale(1.15);
    }
    100% {
        box-shadow: 
            0 0 0px rgba(0,224,255,0.0),
            0 0 12px rgba(0,224,255,0.55);
        transform: scale(1);
    }
}

/* Marker della timeline con glow animato */
.vt-alt-marker {
    position: absolute;
    top: 24px;
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    border: 3px solid #0d0d0d;

    /* ✅ GLOW ANIMATO */
    animation: pulseGlow 2.8s ease-in-out infinite;
    z-index: 3;
}

.vt-alt-item.left  .vt-alt-marker { right: -10px; }
.vt-alt-item.right .vt-alt-marker { left:  -10px; }




 #cookie-consent-box {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    max-width: 900px;
    margin: 0 auto;
    background: rgba(30, 33, 39, 0.88);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 14px;
    color: #f8f9fa;
    box-shadow: 0 14px 34px rgba(0,0,0,0.35);
    z-index: 9999;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  #cookie-consent-box.hidden { display: none; }

  #cookie-consent-box .cookie-text {
    flex: 1 1 800px;
    font-size: 0.95rem;
    line-height: 1.35;
  }

  #cookie-consent-box .consent-row {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .switch {
    position: relative;
    width: 52px;
    height: 32px;
    display: inline-block;
  }
  .switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }
  .slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: rgba(255,255,255,0.28);
    border-radius: 999px;
    transition: 0.25s ease;
    border: 1px solid rgba(255,255,255,0.2);
  }
  .slider:before {
    content: "";
    position: absolute;
    left: 4px;
    top: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #fff;
    transition: 0.25s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,.25);
  }
  input:checked + .slider {
    background-color: #4cd964;
  }
  input:checked + .slider:before {
    transform: translateX(20px);
  }

  .cookie-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .cookie-buttons button {
    border: 0;
    border-radius: 8px;
    font-weight: 600;
    padding: 8px 14px;
    cursor: pointer;
  }
  .cookie-buttons .apply { background: #1d7cfb; color: #fff; }
  .cookie-buttons .decline { background: rgba(255,255,255,0.1); color: #fff; }

.toggle-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

#cookie-consent-toggle-label {
  white-space: nowrap;
  font-weight: 600;
}

/* mantenere i pulsanti a destra */
.consent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}

  /* responsivo sotto 640px */
@media (max-width: 640px) {
  #cookie-consent-box {
    flex-direction: column;
    align-items: stretch;
    max-height: 130px;
  }

  .cookie-text {
    margin-bottom: 10px;
    display: block;
  }

  .consent-row {
    justify-content: space-between;
    align-items: center;
  }

  .toggle-group {
    flex: 1;
  }

  .cookie-buttons {
    margin-left: auto;
    display: flex;
    gap: 8px;
  }
}






/* --- PAGE TRANSITION --- */
.page-transition {
  opacity: 1;
  transition: opacity 0.35s ease;
}

.page-transition.fade-out {
  opacity: 0;
}

/* --- LOADER OVERLAY --- */
.loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.loader-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.loader-spinner {
  width: 45px;
  height: 45px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.hidden {
  display: none;
}

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


/* CHECKMARK (inizialmente invisibile) */
.loader-check {
  position: absolute;
  width: 45px;
  height: 45px;
  stroke: white;
  stroke-width: 4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;

  opacity: 0;
  transform: scale(0.6);
}

/* Animazione del disegno */
.loader-check path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  transition: stroke-dashoffset 0.35s ease;
}

/* Quando il loader è completato */
.loader-overlay.checked .loader-spinner {
  opacity: 0;
  transform: scale(0.5);
}

.loader-overlay.checked .loader-check {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.loader-overlay.checked .loader-check path {
  stroke-dashoffset: 0;
}
