:root {
    /* --bg: #f6f6f6;
    --accent: #00946c; */

    /* --bg: #f6f6f6;
    --accent: #00946c; */

    /* --bg: #fdfcfb; */

    --bg: #1F1B24;
    --bg2: #2b2631;
    --accent: #00b4d8;
    --text: white;
    --text-accent: var(--bg);
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
    /* Aggiunto per uno scorrimento più fluido */
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    /* Aggiunto sans-serif come fallback */
    margin: 0;
    padding: 0;
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

header {
    background-color: var(--accent);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    height: 70px;
    /* Ridotto padding laterale per mobile */
    position: sticky;
    top: 0;
    z-index: 100;
}

.headerTitle {
    position: absolute;
    color: white;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    font-size: 22px;
    /* Leggermente ridotto per mobile */
    font-weight: 900;
}

.accedi-btn {
    display: block;
    margin-left: auto;
    background-color: var(--bg2);
    color: var(--accent);
    border: none;
    border-radius: 8px;
    padding: 0.4rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: 2px solid transparent;
    transition: 0.2s all;
}

@media (max-width: 820px) {
    .accedi-btn {
        display: none;
    }
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 15px;
    /* Aggiunto padding laterale per evitare che il contenuto tocchi i bordi */
}

@media (max-width: 1080px) {
    main {
        margin: 0;
    }
}

.pageTitle {
    color: var(--text);
    font-size: 3rem;
    /* Ridotto per una migliore visualizzazione su mobile */
    font-weight: 900;
    margin: 2rem 0 0;
    /* Ridotto margine superiore */
    text-align: center;
    /* Centrato per la visualizzazione mobile */
}

.content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex-direction: column;
    /* Impostato di default a colonna per un approccio mobile-first */
}

.text-section {
    width: 100%;
    /* Occupa tutta la larghezza su mobile */
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Centra gli elementi all'interno */
    padding: 20px 0;
    /* Rimosso padding laterale, gestito dal main */
    text-align: center;
    /* Testo centrato per mobile */
}

.accent {
    color: var(--accent);
}

.bold {
    font-weight: bold;
}

.underline {
    text-decoration: underline;
}

.text-section h3 {
    margin: 0px;
    margin-bottom: 10px;
    color: var(--text);
    font-weight: normal;
    font-size: 1.1rem;
    /* Aggiustata la dimensione per leggibilità */
}

.text-section p {
    margin: 0px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.carouselContainer {
    width: 100%;
    /* Occupa tutta la larghezza */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
    /* Ridotto margine */
}

.carousel {
    position: relative;
    height: 400px;
    /* Ridotta altezza per schermi più piccoli */
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.carousel img {
    width: 240px;
    /* Ridotte dimensioni delle immagini */
    height: 370px;
    border-radius: 15px;
    position: absolute;
    transition: transform 0.8s ease, opacity 0.8s ease;
    object-fit: cover;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.carouselBtnContainer {
    display: flex;
    justify-content: center;
    align-items: center;
}

.carouselBtnContainer button {
    background-color: var(--accent);
    color: var(--text-accent);
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    margin: 10px;
    border: none;
    border-radius: 100%;
}

.cta {
    display: flex;
    justify-content: center;
    /* Centrato di default */
    gap: 10px;
    margin-top: 1rem;
    width: 100%;
    /* Occupa tutta la larghezza per centrare il pulsante */
}

.mobile-text {
    display: none;
}

@media (max-width: 820px) {
    .desktop-text {
        display: none;
    }

    .mobile-text {
        display: inline;
    }
}

.hover:hover {
    transform: translateY(-4px) scale(105%);
}

.cta a {
    text-decoration: none;
    background-color: var(--accent);
    color: var(--text-accent);
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 12px 25px;
    /* Aumentato padding per essere più cliccabile */
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: .2s all;
}

.cta a.secondary {
    background-color: var(--bg2);
    color: var(--accent);
}

.cta a:hover {
    background-color: var(--bg2);
    color: var(--text);
    border: 2px solid var(--accent);
    border-style: dashed;
}

/* === TIMELINE SECTION === */
.timeline {
    width: 100%;
    /* Adattato per occupare la larghezza disponibile */
    margin: 60px auto;
    padding: 0;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 12px;
    /* Posizionato a sinistra per layout mobile */
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--accent), var(--accent));
    border-radius: 2px;
}

.milestone {
    display: flex;
    margin-bottom: 40px;
    /* Ridotto spazio tra gli elementi */
    position: relative;
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    flex-direction: row;
    /* Impostato per il layout mobile */
}

.milestone-content {
    width: 100%;
    background: var(--bg2);
    border: 2px solid var(--text);
    color: var(--text);
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: .2s all;
    margin-left: 40px;
    /* Spazio per la linea e il cerchio */
}

.milestone-content:hover {
    transform: translateY(-4px);
    border-style: dashed;
}

.circle {
    width: 22px;
    height: 22px;
    background: var(--accent);
    border: 4px solid var(--bg);
    border-radius: 50%;
    position: absolute;
    top: 20px;
    left: 2px;
    /* Allineato con la linea */
    transform: none;
    /* Rimosso il transform per il posizionamento a sinistra */
    box-shadow: 0 0 0 4px var(--accent);
    /* Cambiato colore per coerenza */
}

.milestone-content h3 {
    margin-top: 0;
    color: var(--accent);
    font-size: 1.2rem;
}

.milestone-content p {
    margin: 0;
    line-height: 1.5;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-divider {
    width: 100%;
    border: none;
    height: 2.5px;
    margin: 4rem 0;
    /* Ridotto margine */
    background-color: var(--bg2);
}

section h1 {
    text-align: center;
    font-size: 3rem;
    /* Ridotta dimensione per mobile */
    margin: 0 0 3rem;
}

.section-steps-wrapper {
    display: flex;
    flex-direction: column;
    gap: 5rem;
    /* Ridotto gap */
}

.section-step {
    padding-inline: 0;
    /* Rimosso padding, gestito da main */
    display: flex;
    flex-direction: column;
    /* Layout a colonna per mobile */
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

/* Invertire l'ordine per alternare immagine e testo */
.section-step.right {
    flex-direction: column-reverse;
}

.section-step img {
    display: none;
    max-width: 100%;
    /* L'immagine non uscirà dal contenitore */
    height: 512px;
    /* Mantiene le proporzioni */
    border-radius: 20px;
    border: 3px solid black;
    box-shadow: 0 0 5px var(--accent);
    transform: none;
    /* Rimosso l'effetto 3D su mobile per semplicità */
    transition: transform 0.3s ease, box-shadow 0.5s ease;
}

.section-step img:hover {
    transform: scale(1.02);
    /* Semplificato l'hover */
    box-shadow: 0 0 20px var(--accent);
}


.section-step-text {
    width: 100%;
    /* Occupa tutta la larghezza */
    text-align: center;
    /* Testo centrato */
}

.section-step-text h3 {
    font-size: 1.5rem;
}

.section-step-text p {
    margin-bottom: 0;
}

#admin-img, #qr-img {
    transform: none;
    box-shadow: none;
    height: auto;
    /* Altezza automatica */
}

#admin-img {
    max-width: 512px;
    /* Leggermente più piccola per dare aria */
}

#qr-img {
    max-width: 256px;
    /* Dimensioni più contenute */
}

#admin-img:hover {
    transform: scale(1.05);
    /* Ridotto l'effetto hover */
}

#qr-img:hover {
    animation: pulse 0.6s infinite alternate;
}

@keyframes pulse {
    from {
        transform: scale(100%);
    }

    to {
        transform: scale(103%);
    }
}

/* Lista feature */
.features {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0 0;
    /* Aggiunto margine superiore */
    display: inline-block;
    /* Per centrare la lista */
    text-align: left;
    /* Allinea il testo a sinistra all'interno della lista */
}

.features li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    font-weight: 500;
}

.features li::before {
    content: "✔";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 900;
}

/* === Media Query per Desktop === */
@media (min-width: 1080px) {
    main {
        padding: 0 30px;
        /* Ripristina padding per desktop */
    }

    .pageTitle {
        font-size: 4rem;
        /* Ripristina dimensione per desktop */
        margin: 5rem 0 0;
        text-align: left;
        /* Allinea a sinistra su desktop */
    }

    .content {
        flex-direction: row;
        /* Layout a riga per desktop */
        gap: 7.5rem;
        justify-content: center;
    }

    .text-section {
        width: 450px;
        align-items: flex-start;
        /* Allinea a sinistra */
        text-align: left;
    }

    .carouselContainer {
        width: 550px;
        margin-top: 4rem;
    }

    .carousel {
        height: 500px;
    }

    .carousel img {
        width: 298px;
        height: 460px;
    }

    .cta {
        justify-content: flex-start;
        /* Allinea a sinistra */
    }

    /* Timeline per desktop */
    .timeline::before {
        left: 50%;
        transform: translateX(-50%);
    }

    .milestone {
        justify-content: space-between;
    }

    .milestone:nth-child(even) {
        flex-direction: row-reverse;
    }

    .milestone-content {
        width: 45%;
        margin-left: 0;
        /* Reset margine */
    }

    .circle {
        left: 50%;
        transform: translateX(-50%);
    }

    /* Sezioni "Perché sceglierci" per desktop */
    .section-steps-wrapper {
        gap: 10rem;
    }

    .section-step {
        flex-direction: row;
        padding-inline: 10rem;
        gap: 5rem;
    }

    .section-step.right {
        flex-direction: row;
        /* Ripristina la direzione per desktop */
    }

    .section-step.left img {
        display: flex;
        /* transform: rotateY(25deg) rotateX(10deg); */
    }

    .section-step.left img:hover {
        /* transform: rotateY(8deg) rotateX(4deg) scale(1.02); */
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.35);
    }

    .section-step.right img {
        display: flex;
        /* transform: rotateY(-25deg) rotateX(10deg); */
    }

    .section-step.right img:hover {
        /* transform: rotateY(8deg) rotateX(4deg) scale(1.02); */
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.35);
    }

    .section-step-text {
        width: 45%;
        text-align: left;
    }

    .features {
        text-align: left;
    }
}

.note {
    color: gray;
    font-style: italic;
    opacity: 0.5
}

.circle.secret {
    cursor: pointer;
}

.pricing-section {
    text-align: center;
    width: 100%;
}

.pricing-section h2 {
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
    color: var(--text);
}

.pricing-cards {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.pricing-card {
    background-color: var(--bg2);
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 2rem;
    width: 400px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: 0.3s all;
    text-align: left;
}

.pricing-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    /* border: 2px solid var(--accent); */
}

.pricing-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.price {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.price sup {
    font-size: 1.2rem;
    vertical-align: top;
}

.features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    text-align: left;
}

.features li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.5rem;
}

.features li::before {
    content: "✔";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.btn-select {
    background-color: var(--accent);
    color: var(--text-accent, var(--bg));
    border: none;
    border-radius: 8px;
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.2s all;
}

.btn-select:hover {
    background-color: var(--bg2);
    color: var(--accent);
    border: 2px solid var(--accent);
    border-style: dashed;
}

.pricing-card .cta {
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .pricing-cards {
        flex-direction: column;
        align-items: center;
    }

    .pricing-card {
        width: 100%;
        max-width: 400px;
    }
}