/* Base Variables & Reset */
:root {
    --primary: #2E3192;
    --secondary: #1BFFFF;
    --accent: #6B4BCC;
    --text-dark: #1F2937;
    --text-light: #64748B;
    --bg-light: #F8FAFC;
    --white: #FFFFFF;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

body.no-scroll {
    overflow: hidden;
}

/* Mockup Splash Screen (Dentro il telefono) */
.mockup-splash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #F8FAFC;
    z-index: 20; /* Sopra l'immagine, sotto la Dynamic Island finta se ci fosse */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 34px; /* Stesso raggio dell'immagine */
    transition: opacity 0.8s ease, visibility 0.8s;
    background-image: 
        linear-gradient(rgba(203, 213, 225, 0.2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(203, 213, 225, 0.2) 1px, transparent 1px);
    background-size: 20px 20px;
    overflow: hidden;
}

.mockup-splash.hide {
    opacity: 0;
    visibility: hidden;
}

.mockup-splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: slideUpFadeMockup 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.mockup-splash-logo {
    width: 80px;
    height: 80px;
    background: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #0288D1;
    box-shadow: 0 12px 28px rgba(2, 136, 209, 0.18);
    margin-bottom: 16px;
    animation: scaleUpMockup 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.mockup-splash-title {
    font-size: 32px;
    font-weight: 900;
    color: #1E293B;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.mockup-splash-subtitle {
    padding: 4px 12px;
    background: rgba(2, 136, 209, 0.08);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: #0288D1;
    letter-spacing: 1px;
}

#splashCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Behind the content, above the background grid */
    pointer-events: none;
}

@keyframes scaleUpMockup {
    0% { transform: scale(0.3); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes slideUpFadeMockup {
    0% { transform: translateY(30px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

a {
    text-decoration: none;
    color: inherit;
}

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

/* Header (Dark Glassmorphism) */
.header {
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

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

.logo {
    font-size: 24px;
    font-weight: 800;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.5px;
}

.nav-logo-img {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(27, 255, 255, 0.25);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a:not(.btn) {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.nav-links a:not(.btn):hover {
    color: #1BFFFF;
    text-shadow: 0 0 10px rgba(27, 255, 255, 0.4);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
    text-align: center;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(46, 49, 146, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 49, 146, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #2E3192, #6B4BCC);
    color: var(--white);
    border: 1px solid rgba(27, 255, 255, 0.35);
    box-shadow: 0 0 15px rgba(27, 255, 255, 0.2);
}

.btn-secondary:hover {
    box-shadow: 0 0 25px rgba(27, 255, 255, 0.5);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
}

.btn-block {
    width: 100%;
    padding: 16px;
    font-size: 16px;
}

/* Hero Section */
/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1A1C29 0%, #2E3192 60%, #1F1B4D 100%);
    padding: 170px 0 110px;
    min-height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    opacity: 0.35;
    z-index: 1;
}

.glow-1 {
    width: 400px;
    height: 400px;
    background: #1BFFFF;
    top: -100px;
    right: 10%;
    animation: glowFloat 8s infinite alternate ease-in-out;
}

.glow-2 {
    width: 350px;
    height: 350px;
    background: #6B4BCC;
    bottom: -50px;
    left: 5%;
    animation: glowFloat 10s infinite alternate-reverse ease-in-out;
}

@keyframes glowFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 40px) scale(1.1); }
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-content {
    color: var(--white);
}

.badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 24px;
}

.hero-live-badge {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #10B981;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero h1 {
    font-size: 56px;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.gradient-text {
    background: linear-gradient(135deg, #FFFFFF 30%, #1BFFFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 40px;
    max-width: 480px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.btn-glow {
    box-shadow: 0 0 25px rgba(27, 255, 255, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-glow:hover {
    box-shadow: 0 0 35px rgba(27, 255, 255, 0.6);
    transform: translateY(-3px);
}

.hero-trust-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.trust-item {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    gap: 8px;
}

.trust-item i {
    color: #1BFFFF;
    font-size: 14px;
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
}

/* Floating Mockup Animation */
.hero-floating-mockup {
    animation: floatMockup 4s ease-in-out infinite;
    box-shadow: 
        0 30px 70px -15px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(27, 255, 255, 0.15),
        inset 0 0 0 2px rgba(255, 255, 255, 0.15) !important;
}

@keyframes floatMockup {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

/* Glassmorphism Floating Cards (Dark Glass Style) */
.floating-badge {
    position: absolute;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(20px) contrast(110%);
    -webkit-backdrop-filter: blur(20px) contrast(110%);
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 12px 18px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    z-index: 20;
    transition: all 0.3s ease;
}

.badge-left {
    top: 12%;
    left: -50px;
    animation: floatBadgeLeft 5s ease-in-out infinite;
}

.badge-right {
    bottom: 18%;
    right: -50px;
    animation: floatBadgeRight 6s ease-in-out infinite;
}

@keyframes floatBadgeLeft {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-10px) rotate(0deg); }
}

@keyframes floatBadgeRight {
    0%, 100% { transform: translateY(0) rotate(2deg); }
    50% { transform: translateY(10px) rotate(0deg); }
}

.badge-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #FFF;
    flex-shrink: 0;
}

.icon-bell {
    background: linear-gradient(135deg, #FF6B6B, #EE5253);
}

.icon-amber {
    background: linear-gradient(135deg, #F59E0B, #D97706);
}

.icon-check {
    background: linear-gradient(135deg, #10B981, #059669);
}

.badge-info {
    display: flex;
    flex-direction: column;
}

.badge-info strong {
    font-size: 13px;
    color: #FFFFFF;
    font-weight: 700;
    line-height: 1.3;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.badge-info span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* App Mockup (Realistico) */
.app-mockup {
    width: 300px;
    height: 620px;
    background: #000000;
    border: 10px solid #0F172A;
    border-radius: 44px;
    box-shadow: 
        0 30px 60px -15px rgba(0, 0, 0, 0.4),
        inset 0 0 0 2px rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transform: rotate(-6deg) translateY(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden; 
}

.app-mockup:hover {
    transform: rotate(0deg) translateY(-10px);
    box-shadow: 
        0 40px 70px -15px rgba(0, 0, 0, 0.5),
        inset 0 0 0 2px rgba(255, 255, 255, 0.15);
}

.mockup-straight, .mockup-straight:hover {
    transform: none !important;
}

.mockup-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 34px; /* Adatta agli angoli del telefono */
}

/* Features */
.features {
    padding: 100px 0;
    background: var(--white);
}

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--primary);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto 64px;
}

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

.feature-card {
    padding: 32px;
    background: var(--bg-light);
    border-radius: 24px;
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.02);
}

.feature-card.highlight {
    background: linear-gradient(135deg, rgba(46, 49, 146, 0.05), rgba(27, 255, 255, 0.1));
    border: 1px solid rgba(46, 49, 146, 0.1);
    grid-column: 1 / -1; /* Occupa tutta la riga se usiamo auto-fit */
}

@media (min-width: 768px) {
    .feature-card.highlight {
        grid-column: span 2; /* Su schermi più grandi occupa 2 colonne */
    }
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    background: var(--white);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(46, 49, 146, 0.1), rgba(107, 75, 204, 0.1));
    color: var(--accent);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 24px;
}

.feature-card h3 {
    margin-bottom: 12px;
    font-size: 20px;
}

.feature-card p {
    color: var(--text-light);
    font-size: 15px;
}

/* =========================================
   TUTORIAL SECTION & COACH MARK ANIMATION
   ========================================= */

.tutorial-section {
    padding: 100px 0;
    background-color: var(--white);
}

.tutorial-content h2 {
    color: var(--text-dark);
    font-size: 40px;
    margin-bottom: 16px;
}

.tutorial-content p {
    color: var(--text-light);
    font-size: 18px;
    margin-bottom: 32px;
}

.tutorial-content .badge {
    background: rgba(2, 136, 209, 0.1);
    color: var(--primary);
}

.tutorial-features-list {
    list-style: none;
    padding: 0;
    margin: 24px 0 32px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tutorial-features-list li {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.tutorial-feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(46, 49, 146, 0.08);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.tutorial-features-list h4 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.tutorial-features-list p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 0;
    line-height: 1.5;
}

.coach-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 15; /* Sotto lo splash, sopra l'immagine */
    overflow: hidden;
    pointer-events: none;
    border-radius: 34px;
}

.coach-spotlight {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    /* Questo crea l'effetto ombra gigante tranne nel centro */
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.75);
    left: 50%;
    top: 30%;
    transform: translate(-50%, -50%);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.coach-tooltip {
    position: absolute;
    width: max-content;
    max-width: 190px;
    background: #FFFFFF;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    /* Posizionato via JS (top o bottom) */
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 20;
}

/* Freccia in alto (quando il tooltip è sotto) */
.coach-tooltip.pointer-up::before {
    content: '';
    position: absolute;
    top: -6px;
    left: var(--pointer-pos, 50%);
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: #FFFFFF;
}

/* Freccia in basso (quando il tooltip è sopra) */
.coach-tooltip.pointer-down::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: var(--pointer-pos, 50%);
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: #FFFFFF;
}

.coach-title {
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 4px;
}

.coach-text {
    font-size: 11px;
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: 8px;
}

.coach-btn {
    display: inline-block;
    font-size: 11px;
    font-weight: bold;
    color: var(--white);
    background: var(--primary);
    padding: 4px 12px;
    border-radius: 12px;
}

/* Gallery Section */
.gallery-section {
    padding: 100px 0;
    background: linear-gradient(to bottom, var(--white), var(--bg-light));
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 48px;
}

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

.gallery-item h4 {
    margin-top: 24px;
    font-size: 18px;
    color: var(--primary);
}

.gallery-item p {
    color: var(--text-light);
    font-size: 14px;
    margin-top: 8px;
}

.mockup-frame {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    border-radius: 36px;
    border: 8px solid #1F2937;
    background: #1F2937;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    transition: var(--transition);
    position: relative;
}



.mockup-frame:hover {
    transform: translateY(-10px);
}

.mockup-frame img {
    width: 100%;
    display: block;
    border-radius: 28px;
}

/* Steps Section */
.steps-section {
    padding: 100px 0;
    background: var(--bg-light);
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 64px;
}

.step {
    text-align: center;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    margin: 0 auto 24px;
    box-shadow: 0 10px 20px rgba(46, 49, 146, 0.2);
}

.step h3 {
    margin-bottom: 12px;
    font-size: 20px;
}

.step p {
    color: var(--text-light);
    font-size: 15px;
}

/* Contact Section */
.contact-section {
    padding: 100px 0;
    background: var(--white);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.contact-text h2 {
    font-size: 40px;
    font-weight: 900;
    margin-bottom: 24px;
    color: var(--primary);
    line-height: 1.2;
}

.contact-text p {
    font-size: 18px;
    color: var(--text-light);
}

.contact-form-card {
    background: var(--white);
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input {
    width: 100%;
    padding: 16px;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    font-size: 15px;
    transition: var(--transition);
    background: #F8FAFC;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(46, 49, 146, 0.1);
}

.form-success-msg {
    margin-top: 16px;
    padding: 16px;
    background: #DEF7EC;
    color: #03543F;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
}

.hidden {
    display: none;
}

/* Footer */
.footer {
    background: #0F172A;
    color: var(--white);
    padding: 64px 0 24px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 8px;
}

.footer-brand p {
    color: #94A3B8;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: #94A3B8;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #64748B;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 992px) {
    .hero-container, .contact-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 48px;
    }

    .hero p {
        margin: 0 auto 40px;
    }

    .steps-container {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 64px;
    }

    .app-mockup {
        margin-top: 40px;
        transform: rotate(0);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero {
        padding: 120px 0 60px;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }
}

/* =========================================
   APPLE-STYLE SCROLL ANIMATIONS
   ========================================= */

/* Base Reveal Class */
.reveal {
    opacity: 0;
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

/* 1. Dal basso verso l'alto */
.reveal-up {
    transform: translateY(40px);
}

/* 2. Da sinistra */
.reveal-left {
    transform: translateX(-40px);
}

/* 3. Da destra */
.reveal-right {
    transform: translateX(40px);
}

/* 4. Zoom in (Scale) */
.reveal-scale {
    transform: scale(0.9);
}

/* Quando l'elemento entra nello schermo (aggiunto da JS) */
.reveal.active {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* Delay (Staggering) */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ==========================================================================
   STATISTICS SECTION
   ========================================================================== */
.stats-section {
    padding: 60px 0;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.stats-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
    text-align: center;
}

.stat-item {
    flex: 1;
    min-width: 150px;
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary);
    display: inline-block;
}

.stat-suffix {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 1rem;
    color: var(--text-dark);
    margin-top: 10px;
    font-weight: 500;
}

/* ==========================================================================
   SECURITY SECTION
   ========================================================================== */
.security-section {
    padding: 100px 0;
    background-color: var(--white);
}

.security-container {
    display: flex;
    align-items: center;
    gap: 60px;
}

.security-icon-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.animated-padlock {
    position: relative;
    width: 120px;
    height: 160px;
    min-width: 120px;
    min-height: 160px;
    flex-shrink: 0;
    margin: 0 auto;
    display: block !important;
}

.padlock-shackle {
    position: absolute;
    top: 0;
    left: 20px;
    width: 80px;
    height: 100px;
    border: 16px solid var(--text-dark);
    border-bottom: none;
    border-top-left-radius: 40px;
    border-top-right-radius: 40px;
    transform: translateY(-30px);
    transition: all 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Animated State (Added via JS on scroll) */
.animated-padlock.locked .padlock-shackle {
    transform: translateY(15px);
    border-color: var(--text-dark);
}

.padlock-body {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 120px;
    height: 90px;
    background: linear-gradient(135deg, var(--primary), var(--primary));
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.3);
    z-index: 2;
}

.padlock-body i {
    color: var(--white);
    font-size: 2rem;
    opacity: 0;
    transition: opacity 0.5s ease 0.5s;
}

.animated-padlock.locked .padlock-body i {
    opacity: 1;
}

.security-text {
    flex: 1;
}

.security-text .badge {
    background: rgba(46, 49, 146, 0.1);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 20px;
}

.security-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.security-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.security-list {
    list-style: none;
}

.security-list li {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--primary);
}

.security-list li i {
    color: var(--accent);
    font-size: 1.2rem;
    width: 30px;
}

@media (max-width: 768px) {
    .security-container {
        flex-direction: column;
        text-align: center;
    }
    .security-list li {
        justify-content: center;
    }
}

/* ==========================================================================
   TESTIMONIALS SECTION
   ========================================================================== */
.testimonials-section {
    padding: 100px 0;
    background-color: var(--bg-color);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.testimonial-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: var(--transition);
    position: relative;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

.quote-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: rgba(79, 70, 229, 0.1);
}

.testimonial-card p {
    font-style: italic;
    color: var(--text-dark);
    margin-bottom: 25px;
    line-height: 1.7;
}

.testimonial-author strong {
    display: block;
    color: var(--primary);
    font-size: 1.1rem;
}

.testimonial-author span {
    font-size: 0.9rem;
    color: var(--primary);
}

/* ==========================================================================
   FINAL CTA SECTION
   ========================================================================== */
.final-cta-section {
    padding: 80px 0;
    background-color: var(--white);
}

.cta-banner {
    background: linear-gradient(135deg, var(--primary), #7C3AED);
    padding: 60px 40px;
    border-radius: 30px;
    text-align: center;
    color: var(--white);
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.3);
}

.cta-banner h2 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-banner p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-large-btn {
    background-color: var(--white);
    color: var(--primary);
    padding: 18px 40px;
    font-size: 1.1rem;
}

.cta-large-btn:hover {
    background-color: var(--bg-color);
    transform: translateY(-3px);
}

/* =========================================
   MIGLIORAMENTI MOBILE SUPREMI (SMARTPHONE)
   ========================================= */
@media (max-width: 768px) {
    /* Prevenzione zoom automatico iOS Safari */
    input, select, textarea {
        font-size: 16px !important;
    }

    /* Header Nav su Mobile */
    .nav-links {
        display: flex !important;
        gap: 0;
    }
    .nav-links a:not(.btn) {
        display: none;
    }
    .logo {
        font-size: 20px;
    }
    .header {
        padding: 0 16px;
    }
    .btn-secondary {
        padding: 8px 16px;
        font-size: 13px;
    }

    /* Hero Section per Mobile - Nessun taglio e spaziatura perfetta */
    .hero {
        padding: 130px 0 50px !important;
        min-height: auto;
        overflow: visible !important;
    }
    .hero-content {
        text-align: center;
    }
    .hero-live-badge {
        font-size: 11px;
        padding: 6px 14px;
        margin: 0 auto 16px;
        display: inline-flex;
    }
    .hero h1 {
        font-size: 30px !important;
        line-height: 1.25;
        margin-bottom: 16px;
        text-align: center;
    }
    .hero p {
        font-size: 15px;
        margin: 0 auto 24px;
        text-align: center;
        max-width: 90%;
    }
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 12px;
        align-items: center;
    }
    .hero-buttons .btn {
        width: 100%;
        max-width: 320px;
        padding: 14px 20px;
        font-size: 15px;
        justify-content: center;
    }

    /* Trust bar centrata e ordinata */
    .hero-trust-bar {
        justify-content: center;
        gap: 10px 16px;
        margin-top: 24px;
        padding-top: 18px;
    }
    .trust-item {
        font-size: 12px;
    }

    /* Mockup Telefono e Notifiche su Mobile - Disposizione verticale perfetta senza tagli */
    .hero-image {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        margin-top: 24px;
        position: relative;
        width: 100%;
    }

    .app-mockup {
        width: 235px !important;
        height: 490px !important;
        margin: 12px auto !important;
        transform: none !important;
        border: 7px solid #0F172A !important;
        border-radius: 36px !important;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4) !important;
        order: 2 !important; /* Telefono al centro */
    }

    .floating-badge {
        display: flex !important;
        position: relative !important;
        top: auto !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        margin: 8px auto !important;
        width: 92% !important;
        max-width: 290px !important;
        padding: 10px 14px !important;
        background: rgba(15, 23, 42, 0.88) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        border-radius: 16px !important;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3) !important;
        animation: floatMobile 3s ease-in-out infinite alternate !important;
        z-index: 10;
    }

    .badge-left {
        order: 1 !important; /* Notifica 1 sopra il telefono */
    }

    .badge-right {
        order: 3 !important; /* Notifica 2 sotto il telefono */
    }

    @keyframes floatMobile {
        0% { transform: translateY(0px); }
        100% { transform: translateY(-6px); }
    }

    /* Spaziature sezioni generali */
    .features, .tutorial-section, .gallery-section, .steps-section, 
    .contact-section, .stats-section, .security-section, 
    .testimonials-section, .final-cta-section {
        padding: 50px 0 !important;
    }

    .section-header h2 {
        font-size: 28px;
    }

    /* Feature Cards */
    .features-grid {
        gap: 20px;
    }
    .feature-card {
        padding: 22px;
        border-radius: 20px;
    }

    /* Statistiche 2x2 su Mobile */
    .stats-container {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    .stat-item {
        padding: 20px 12px;
    }
    .stat-number {
        font-size: 2.2rem;
    }
    .stat-suffix {
        font-size: 1.4rem;
    }
    .stat-label {
        font-size: 12px;
    }

    /* Tutorial Lista */
    .tutorial-features-list {
        gap: 16px;
    }
    .tutorial-feature-icon {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
    .tutorial-features-list h4 {
        font-size: 15px;
    }

    /* Galleria a scorrimento orizzontale continuo (Swipeable App-style) */
    .gallery-grid {
        display: flex !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 16px !important;
        padding-bottom: 20px;
        margin-left: -24px;
        margin-right: -24px;
        padding-left: 24px;
        padding-right: 24px;
        -webkit-overflow-scrolling: touch;
    }
    .gallery-grid::-webkit-scrollbar {
        display: none;
    }
    .gallery-item {
        flex: 0 0 85%;
        scroll-snap-align: center;
    }

    /* Sicurezza */
    .security-container {
        flex-direction: column;
        text-align: center;
        gap: 32px;
    }
    .security-list li {
        justify-content: center;
        text-align: left;
    }
    .security-text h2 {
        font-size: 26px;
    }
    .animated-padlock {
        transform: scale(0.75);
    }

    /* Form Contatti */
    .contact-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .contact-text h2 {
        font-size: 28px;
    }
    .contact-form-wrapper {
        padding: 20px;
        border-radius: 24px;
    }
}

/* ===== SEZIONE DOWNLOAD ===== */
.download-section {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--bg-light) 0%, #EEF2FF 100%);
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 28px;
    margin-top: 56px;
}

.download-card {
    background: var(--white);
    border-radius: 24px;
    padding: 36px 28px;
    text-align: center;
    box-shadow: 0 4px 24px rgba(46,49,146,0.08);
    border: 1.5px solid rgba(46,49,146,0.07);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.download-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(46,49,146,0.14);
}
.download-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}
.download-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Card Windows in evidenza */
.download-card--featured {
    border: 2px solid var(--primary);
    background: linear-gradient(145deg, #fff 70%, #EEF2FF 100%);
}
.download-card-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Card Mac coming soon */
.download-card--soon {
    opacity: 0.65;
}

/* Icone */
.download-card-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: linear-gradient(135deg, #EEF2FF, #C7D2FE);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: var(--primary);
}
.download-card-icon--android { background: linear-gradient(135deg, #E8F5E9, #A5D6A7); color: #2E7D32; }
.download-card-icon--windows { background: linear-gradient(135deg, #E3F2FD, #90CAF9); color: #1565C0; }
.download-card-icon--mac     { background: linear-gradient(135deg, #F3F4F6, #D1D5DB); color: #374151; }

/* Pulsanti download */
.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    width: 100%;
    justify-content: center;
}
.download-btn i { font-size: 1.4rem; }
.download-btn span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.download-btn small { font-size: 0.68rem; font-weight: 400; opacity: 0.8; }

.download-btn-apple  { background: #000; color: #fff; }
.download-btn-apple:hover  { background: #222; }
.download-btn-google { background: #fff; color: var(--text-dark); border: 1.5px solid #E5E7EB; }
.download-btn-google:hover { background: #F9FAFB; }
.download-btn-windows { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; box-shadow: 0 4px 16px rgba(46,49,146,0.3); }
.download-btn-windows:hover { transform: scale(1.03); box-shadow: 0 8px 24px rgba(46,49,146,0.4); }
.download-btn-soon { background: #F3F4F6; color: #9CA3AF; cursor: default; }

.download-note {
    margin-top: 12px;
    font-size: 0.75rem;
    color: var(--text-light);
}
.download-note i { margin-right: 4px; }

/* ===== MODAL ISTRUZIONI WINDOWS ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.65);
    backdrop-filter: blur(6px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.active { display: flex; }

.modal-box {
    background: var(--white);
    border-radius: 28px;
    padding: 48px 40px 40px;
    max-width: 560px;
    width: 100%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: #F3F4F6;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.modal-close:hover { background: #E5E7EB; }

.modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, #E3F2FD, #90CAF9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #1565C0;
    margin-bottom: 16px;
}
.modal-box h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 28px;
}

.modal-steps { display: flex; flex-direction: column; gap: 20px; }
.modal-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}
.modal-step strong { display: block; color: var(--text-dark); margin-bottom: 4px; }
.modal-step p { color: var(--text-light); font-size: 0.9rem; margin-bottom: 10px; }
.modal-step code {
    background: #F3F4F6;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--primary);
}

.modal-update-box {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: linear-gradient(135deg, #EEF2FF, #E0E7FF);
    border-radius: 14px;
    padding: 18px;
    margin-top: 28px;
}
.modal-update-box > i { font-size: 1.4rem; color: var(--primary); margin-top: 2px; }
.modal-update-box strong { display: block; color: var(--text-dark); margin-bottom: 4px; }
.modal-update-box p { color: var(--text-light); font-size: 0.88rem; }

.btn-block { display: flex; width: 100%; justify-content: center; gap: 8px; margin-top: 8px; }

@media (max-width: 768px) {
    .download-grid { grid-template-columns: 1fr 1fr; }
    .modal-box { padding: 36px 24px 28px; }
}
@media (max-width: 480px) {
    .download-grid { grid-template-columns: 1fr; }
}
