/* --- Variabili Globali --- */
:root {
    --primary: #B39DDB;
    --primary-light: #D1C4E9;
    --primary-dark: #7E57C2;
    --primary-darker: #5E35B1;
    --background: #F5F5F5;
    --card-bg: #FFFFFF;
    --text: #424242;
    --text-light: #757575;
    --text-primary: var(--primary-dark);
    --warning: #FFD700; /* Giallo per le stelle */
    --success: #66BB6A; /* Verde per conferme/gratis */
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

    /* NUOVE Variabili per lo slider */
    --toggle-bg: #e0e0e0;
    --toggle-bg-dark: #2d2d2d; /* Per un eventuale tema scuro */
    --toggle-slider-gradient: linear-gradient(135deg, #ff8a80, #ea80fc, #8c9eff, #80d8ff);
}

/* --- Reset e Stili di Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    background-color: var(--background);
    background-image: url('https://www.transparenttextures.com/patterns/subtle-white-feathers.png');
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.7;
}

.body-no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

main {
    flex: 1;
    overflow-x: hidden;
}

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

.narrow-content {
    max-width: 800px;
    margin: 0 auto;
}

.text-center {
    text-align: center;
}

strong {
    font-weight: 700;
    color: var(--primary-darker);
}

/* --- Navbar --- */
.navbar {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.navbar .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.6rem;
    color: var(--primary-dark);
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.navbar .logo-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-dark);
    background-color: var(--primary-light);
}

/* SPECIAL B2B LINK */
.nav-link.special-b2b-link {
    color: var(--primary-darker);
    font-weight: 800;
}

/* --- Hero Section --- */
.hero-section {
    min-height: calc(100vh - 75px);
    padding: 20px;
    background: linear-gradient(rgba(94, 53, 177, 0.6), rgba(94, 53, 177, 0.6)),
                url('https://images.unsplash.com/photo-1506126613408-4e05960270e5?auto=format&fit=crop&q=80&w=2070') no-repeat center center/cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3.2rem;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-content .hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 0.9;
    font-weight: 300;
}

.hero-content h1 strong, .hero-content .hero-subtitle strong {
    color: white;
    font-weight: 700;
}

/* NEW: Micro-copy per Hero CTA */
.hero-micro-copy {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.95);
    margin-top: 15px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

@keyframes pulse-fast {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* --- Pulsanti --- */
.btn {
    display: inline-block;
    padding: 14px 30px;
    font-size: 1.1rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    margin: 5px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(126, 87, 194, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(94, 53, 177, 0.4);
}

/* === NUOVA CLASSE PER B2B CTA === */
.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary-dark);
    background: transparent;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(126, 87, 194, 0.2);
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.2rem;
}

/* --- Sezioni Generali --- */
.section {
    padding: 80px 0;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-in-container {
    padding-left: 20px;
    padding-right: 20px;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.bg-light {
    background: rgba(255, 255, 255, 0.5);
}

.section-title {
    font-size: 2.2rem;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 1.1rem;
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
    color: var(--text-light);
}

/* --- Card --- */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.card {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    border: 1px solid rgba(179, 157, 219, 0.2);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.card-icon, .feature-icon {
    font-size: 2.8rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.solution-container {
    background: rgba(209, 196, 233, 0.2);
    border-radius: 20px;
    padding: 50px 30px;
    margin-top: 60px;
}

/* --- Sezioni Specifiche --- */
.mission-content, .app-grows-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    font-size: 1.1rem;
}
.app-grows-content p {
    margin-bottom: 30px;
}

.mission-content p {
    margin-bottom: 20px;
}

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

/* --- NUOVA SEZIONE REPORT SHOWCASE --- */
.report-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.report-text {
    flex: 1;
    text-align: left;
}
.report-text h2 {
    margin-bottom: 20px;
}
.report-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--text);
}

.report-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.showcase-screen-static {
    max-height: 500px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 4px solid white;
}

@media (max-width: 768px) {
    .report-content-wrapper {
        flex-direction: column;
        text-align: center;
    }
    .report-text {
        text-align: center;
    }
    .report-text h2 {
        text-align: center !important;
    }
    .showcase-screen-static {
        max-height: 350px;
    }
}


/* --- SEZIONE STUDI SCIENTIFICI --- */
.studies-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.study-card {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 25px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(179, 157, 219, 0.2);
    display: flex;
    align-items: flex-start;
    gap: 20px;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.study-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.study-card-icon {
    font-size: 2rem;
    color: var(--primary-dark);
    padding-top: 5px;
}

.study-card-content h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.study-card-content p {
    margin-bottom: 15px;
    color: var(--text-light);
    line-height: 1.6;
}

.study-link {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

.study-link:hover {
    color: var(--primary-darker);
}

.study-link i {
    font-size: 0.8em;
    margin-left: 5px;
}

/* --- SEZIONE APP SHOWCASE --- */
#app-preview {
    overflow-x: hidden;
}

.app-showcase-container {
    position: relative;
    width: 100%;
    height: 550px;
    margin-top: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.showcase-screen {
    position: absolute;
    height: 480px;
    width: auto;
    border-radius: 25px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-origin: center center;
}

.screen-1 { transform: rotate(-5deg) translate(-20px, 0); z-index: 4; }
.screen-2 { transform: rotate(3deg) translate(20px, 10px); z-index: 3; }
.screen-3 { transform: rotate(8deg) translate(-10px, 5px); z-index: 2; }
.screen-4 { transform: rotate(-3deg) translate(10px, -10px); z-index: 1; }

.section.visible .screen-1 { transform: translateX(-160%) rotate(-8deg); }
.section.visible .screen-2 { transform: translateX(-55%) rotate(-3deg); }
.section.visible .screen-3 { transform: translateX(55%) rotate(3deg); }
.section.visible .screen-4 { transform: translateX(160%) rotate(8deg); }


/* ===== SEZIONE AUDIO PLAYER (NUOVA) ===== */
.audio-player-wrapper {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(179, 157, 219, 0.3);
}

.custom-audio-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.play-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.3s;
    flex-shrink: 0;
}

.play-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.progress-area {
    flex-grow: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--primary-dark);
    border-radius: 3px;
    transition: width 0.1s linear;
}

.time-display {
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.9rem;
    width: 45px;
    text-align: right;
}

/* --- ===== INIZIO STILI SEZIONE PREZZI ===== --- */
.pricing-card {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 35px 40px;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--primary);
    text-align: center;
    position: relative; /* Per il badge donazione */
}

.pricing-card h3 {
    font-size: 1.6rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

#pricing-offer-text {
    background: var(--primary);
    color: white;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 10px; /* Reduced to fit reassurance */
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.pricing-card.show-offer #pricing-offer-text {
    visibility: visible;
    opacity: 1;
}

/* NEW: Prezzo Reassurance (Verde) */
.price-reassurance {
    color: var(--success);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.price-display {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 5px;
}

.price-value {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-darker);
    line-height: 1;
}

.price-frequency {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 600;
}

.price-old {
    font-size: 1.5rem;
    color: var(--text-light);
    text-decoration: line-through;
    display: none;
    margin-top: 5px;
}

.pricing-card.show-old-price .price-old {
    display: block;
}

.pricing-features {
    list-style: none;
    text-align: left;
    max-width: 350px;
    margin: 25px auto 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pricing-features li {
    font-size: 1.1rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* === NUOVO BADGE DONAZIONE === */
.donation-badge {
    display: inline-block;
    background: #ff4081; /* Rosa acceso */
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 50px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(255, 64, 129, 0.3);
    animation: pulse-badge 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes pulse-badge {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 64, 129, 0.7); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(255, 64, 129, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 64, 129, 0); }
}


/* ===== STILI TOGGLE ===== */
.subscription-toggle-container {
    padding: 4px;
    background: var(--toggle-bg);
    border-radius: 50px;
    margin-bottom: 40px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.subscription-toggle {
    display: flex;
    position: relative;
}

.toggle-slider-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: var(--toggle-slider-gradient);
    border-radius: 50px;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.subscription-toggle.monthly-active .toggle-slider-background {
    transform: translateX(100%);
}

.toggle-option {
    flex: 1;
    padding: 12px 10px;
    background: transparent;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    z-index: 1;
    color: var(--text-light);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
    user-select: none;
}

.toggle-option.active {
    color: white;
}

.discount-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
    display: none;
}

@media (max-width: 380px) {
    .toggle-option#yearly-toggle {
        flex-direction: column;
        gap: 2px;
        padding: 8px 5px;
        white-space: normal;
        line-height: 1.2;
        font-size: 0.9rem;
    }
    .toggle-option#yearly-toggle .discount-badge {
        font-size: 0.7rem;
        margin-left: 0;
    }
}

/* ===== STILI CONTENITORE CARD ===== */
.pricing-cards-container {
    position: relative;
    min-height: 650px; /* Aumentato per ospitare il badge */
    max-width: 450px;
    margin: 0 auto;
}

.pricing-cards-container .pricing-card {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    margin: 0;
    visibility: hidden;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.4s ease-in-out;
}

.pricing-cards-container .pricing-card.active {
    position: relative;
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.pricing-offer-text-static {
    background: var(--text-light);
    color: white;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 20px;
    opacity: 0.8;
}

.pricing-features li .fa-times {
    color: #b0b0b0;
    width: 1.2em;
    text-align: center;
    margin-right: -2px;
}


.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    margin-top: 40px;
}
.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}
.about-image img {
    width: 100%;
    max-width: 350px;
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    margin: 0 auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 1 / 1;
}

/* --- SEZIONE PARTNER --- */
.partners-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
}
.partner-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: var(--text-light);
}
.partner-item i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--primary);
}
.partner-item span {
    font-weight: 600;
    font-size: 1.1rem;
}


/* --- SEZIONE SOCIAL MODEL --- */
.social-model-content {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
}
.social-model-icon {
    font-size: 3rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
}

/* --- SEZIONE FAQ --- */
.faq-container {
    text-align: left;
}
.faq-item {
    background: var(--card-bg);
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid var(--primary-light);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.faq-item h4 {
    font-size: 1.2rem;
    color: var(--text-primary);
    padding: 20px;
    cursor: pointer;
    position: relative;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-item h4::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    transition: transform 0.4s ease;
}
.faq-item.active h4::after {
    transform: rotate(180deg);
}
.faq-item p {
    line-height: 1.8;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.5s ease;
    padding: 0 20px;
}
.faq-item.active p {
    max-height: 300px;
    padding: 0 20px 20px;
}

/* --- SEZIONE CONTATTI --- */
.contact-info .contact-email {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}
.contact-info .contact-email:hover { color: var(--primary-darker); }
.contact-info .contact-social-title {
    margin-top: 30px;
    margin-bottom: 20px;
}
.social-icons-contact {
    display: flex;
    justify-content: center;
    gap: 25px;
}
.social-icons-contact a {
    color: var(--primary-dark);
    font-size: 2rem;
    transition: all 0.3s ease;
}
.social-icons-contact a:hover {
    transform: scale(1.1) translateY(-3px);
    color: var(--primary-darker);
}

/* --- Sezione CTA --- */
.cta-section {
    background: var(--primary-darker);
    color: white;
    padding: 70px 20px;
}
.cta-section h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}
.cta-section p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
}
.cta-section strong { color: white; }


/* --- Footer --- */
.footer {
    background: var(--primary-darker);
    color: white;
    padding: 60px 20px 30px;
    overflow-x: hidden;
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}
.footer-logo .footer-logo-link {
    text-decoration: none;
    color: white;
}
.footer-logo h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}
.footer-logo p { opacity: 0.7; }
.footer-links-group h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--primary-light);
}
.footer-links-group ul { list-style: none; }
.footer-links-group ul li { margin-bottom: 10px; }
.footer-links-group ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-links-group ul li a:hover { color: white; }
.footer-social h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--primary-light);
}
.social-icons {
    display: flex;
    gap: 15px;
}
.social-icons a {
    color: white;
    font-size: 1.3rem;
    transition: all 0.3s ease;
}
.social-icons a:hover {
    transform: scale(1.1) translateY(-2px);
    color: var(--primary-light);
}
.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

/* --- ===== RILEVATORE IN-APP BROWSER (Aggiornato) ===== --- */
#iab-detector {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 20px;
    opacity: 0;
    animation: iab-fade-in-bg 0.3s ease forwards;
}

@keyframes iab-fade-in-bg {
    to { opacity: 1; }
}

.iab-detector-content {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 30px 25px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    max-width: 420px;
    width: 100%;
    border: 1px solid rgba(179, 157, 219, 0.2);

    opacity: 0;
    transform: scale(0.95) translateY(10px);
    animation: iab-fade-in-card 0.4s 0.1s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes iab-fade-in-card {
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Nuova Icona grande */
.iab-detector-icon {
    font-size: 3.5rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
    line-height: 1;
}

/* Nuovo Titolo grande viola */
.iab-detector-content h3 {
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
    font-weight: 800;
}

/* Testo principale */
.iab-main-text {
    font-size: 1.1rem;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Box istruzioni con contrasto aumentato */
.iab-instruction-box {
    background: #E8EAF6; /* Colore più scuro per contrasto */
    border: 1px solid #C5CAE9; /* Bordo aggiunto */
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 25px;
    text-align: center;
}
.iab-instruction-box p {
    margin-bottom: 0;
    font-size: 1.05rem;
    color: var(--text);
    font-weight: 500;
}
.iab-instruction-box strong {
    color: var(--primary-dark);
    font-weight: 800;
}

/* Info Browser (🤖/🍎) */
.iab-browser-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 1rem;
    color: var(--text);
}
.iab-browser-info span {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Footer di aiuto */
.iab-help-footer {
     font-size: 0.9rem;
     color: var(--text-light);
     margin-bottom: 0;
}
.iab-help-footer strong {
    color: var(--primary-dark);
}


/* ===== NUOVO: TOAST DI AIUTO (FIX APPLE/MOBILE) ===== */
.help-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px); /* Nascosto giù */
    background: white;
    padding: 12px 15px; /* Padding leggermente ridotto per guadagnare spazio */
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); /* Rimbalzo */
    border: 1px solid var(--primary-light);

    /* Regole per larghezza e contenuto */
    max-width: 90%;
    width: auto;
    min-width: 280px;
    flex-direction: row; /* Forza la riga */
    justify-content: space-between;
}

.help-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1; /* Permette al testo di prendere tutto lo spazio disponibile */
}

.toast-text {
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 600;
    line-height: 1.3;
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1.2rem; /* Icona un po' più grande per facilitare il tocco */
    padding: 5px;
    display: flex;
    align-items: center;
    flex-shrink: 0; /* Impedisce al bottone di restringersi */
    margin-left: 10px;
    position: static; /* Rimuove posizionamento assoluto se presente */
}

.toast-close:hover {
    color: var(--primary-dark);
}

/* Media Query specifica per schermi molto piccoli */
@media (max-width: 360px) {
    .help-toast {
        border-radius: 20px; /* Meno arrotondato se va su due righe */
        padding: 15px;
    }
    .toast-text {
        font-size: 0.85rem;
    }
}

/* ===== NUOVO: STICKY CTA MOBILE (FIX SAFE AREA) ===== */
.mobile-sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);

    /* PADDING SAFE AREA: 15px standard + lo spazio variabile del notch */
    padding: 15px 20px;
    padding-bottom: calc(15px + env(safe-area-inset-bottom));

    z-index: 9999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transform: translateY(100%); /* Nascosto inizialmente */
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-sticky-cta.visible {
    transform: translateY(0);
}

.sticky-text-group {
    display: flex;
    flex-direction: column;
}

.sticky-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.sticky-subtitle {
    font-size: 0.75rem;
    color: var(--text-light);
}

.sticky-btn {
    font-size: 0.95rem;
    padding: 10px 20px;
    margin: 0;
    animation: pulse-soft 2s infinite ease-in-out; /* Battito continuo delicato */
    box-shadow: 0 4px 12px rgba(126, 87, 194, 0.4);
}

/* Animazione Pulsante Soft */
@keyframes pulse-soft {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(126, 87, 194, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(126, 87, 194, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(126, 87, 194, 0); }
}

/* Nascondi sticky CTA su desktop */
@media (min-width: 769px) {
    .mobile-sticky-cta {
        display: none !important;
    }
}


/* --- Menu Mobile --- */
.mobile-menu { display: none; z-index: 9999; }
.menu-btn {
    position: relative;
    width: 30px;
    height: 30px;
    cursor: pointer;
    background: none;
    border: none;
}
.menu-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--primary-dark);
    margin: 5px 0;
    border-radius: 3px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.menu-btn.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.menu-btn.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0.5);
}
.menu-btn.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-nav-links {
    position: fixed;
    top: 76px;
    right: -100%;
    width: 100%;
    height: calc(100vh - 76px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 25px;
    padding: 40px 0;
    z-index: 9998;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-nav-links.active { right: 0; }
.mobile-nav-links .nav-link { font-size: 1.5rem; color: var(--text-primary); }

/* --- ===== NUOVI STILI PER IL MODALE B2B ===== --- */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 10002;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--primary-light);

    /* FIX OVERFLOW */
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scroll iOS */
}

.modal-backdrop.open .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--primary-dark);
}

.modal-header {
    text-align: center;
    margin-bottom: 25px;
}

.modal-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.modal-header h3 {
    font-size: 1.8rem;
    color: var(--text-primary);
}

.modal-body {
    font-size: 1rem;
    color: var(--text);
    line-height: 1.6;
}

.modal-steps {
    margin: 20px 0 30px 20px;
    padding-left: 20px;
}

.modal-steps li {
    margin-bottom: 10px;
}

.modal-steps a {
    color: var(--primary-dark);
    font-weight: 700;
}

.modal-cta {
    text-align: center;
}

/* --- Media Queries --- */
@media (max-width: 1200px) {
    .section.visible .screen-1 { transform: translateX(-120%) rotate(-8deg); }
    .section.visible .screen-2 { transform: translateX(-40%) rotate(-3deg); }
    .section.visible .screen-3 { transform: translateX(40%) rotate(3deg); }
    .section.visible .screen-4 { transform: translateX(120%) rotate(8deg); }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu { display: block; }
    .hero-content h1 { font-size: 2.5rem; }
    .hero-content .hero-subtitle { font-size: 1.1rem; }
    .section { padding: 60px 0; }
    .section-title { font-size: 1.8rem; }
    .about-content { grid-template-columns: 1fr; gap: 30px; }
    .about-image { grid-row: 1; }
    .footer-content, .footer-bottom { text-align: center; }
    .social-icons { justify-content: center; }

    .app-showcase-container {
        height: 650px;
    }
    .showcase-screen {
        height: 280px;
    }

    .screen-1, .screen-2, .screen-3, .screen-4 {
        transform: rotate(0deg) translate(0, 0) scale(0.9);
    }
    .screen-1 { z-index: 4; }
    .screen-2 { z-index: 3; }
    .screen-3 { z-index: 2; }
    .screen-4 { z-index: 1; }

    .section.visible .screen-1 { transform: translate(-55%, -55%) rotate(-4deg) scale(1); }
    .section.visible .screen-2 { transform: translate(55%, -55%) rotate(4deg) scale(1); }
    .section.visible .screen-3 { transform: translate(-55%, 55%) rotate(4deg) scale(1); }
    .section.visible .screen-4 { transform: translate(55%, 55%) rotate(-4deg) scale(1); }

    .pricing-card {
        padding: 30px 25px;
    }
    .price-value {
        font-size: 3rem;
    }

    .pricing-cards-container {
        min-height: 680px; /* Aumentato ulteriormente per mobile */
    }
}

@media (max-width: 480px) {
    .app-showcase-container {
        height: 550px;
    }
    .showcase-screen {
        height: 230px;
    }
    .section.visible .screen-1 { transform: translate(-52%, -52%) rotate(-4deg) scale(1); }
    .section.visible .screen-2 { transform: translate(52%, -52%) rotate(4deg) scale(1); }
    .section.visible .screen-3 { transform: translate(-52%, 52%) rotate(4deg) scale(1); }
    .section.visible .screen-4 { transform: translate(52%, 52%) rotate(-4deg) scale(1); }

    .hero-content h1 {
        font-size: 2.2rem;
        line-height: 1.3;
    }

    .hero-content .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .hero-content .btn-large {
        font-size: 1rem;
        padding: 14px 28px;
    }

    .scroll-down-text {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }

    /* Le modifiche principali per il toast mobile sono ora gestite nella classe base .help-toast */

    /* Quando appare lo sticky CTA, sposta il toast un po' su se necessario */
    .mobile-sticky-cta.visible ~ .help-toast {
        bottom: 90px;
    }

    .modal-content {
        padding: 25px 20px; /* Riduci padding su mobile */
        max-height: 85vh; /* Altezza sicura su mobile */
    }
}

/* --- Indicatore di Scorrimento Animato (Corretto Sincronismo) --- */
.scroll-down-text {
    color: white;
    font-size: 0.9rem;
    font-weight: 300;
    opacity: 0.8;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.scroll-down-indicator {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-align: center;
}

.scroll-down-indicator.hidden {
    opacity: 0;
    visibility: hidden;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    /* Animazione sincronizzata "ad onda" */
    animation: breathe 2.4s infinite ease-in-out;
}

/* Ritardi per creare l'effetto onda */
.dot:nth-child(2) {
    animation-delay: 0.7s;
}
.dot:nth-child(3) {
    animation-delay: 0.35s;
}

@keyframes breathe {
    0%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
        background-color: rgba(255,255,255,0.3); /* Leggero riempimento al picco */
    }
}

@media (min-width: 769px) {
    .scroll-down-indicator {
        bottom: 100px;
    }
}
