/* --- OPTLYX SOFT THEME (styles.css) - CONSOLIDATED --- */

:root {
    /* Brand Colors */
    --brand-primary: #738bf4;
    /* Il tuo Blu Soft */
    --brand-dark: #5b6de3;
    /* Hover state */
    --brand-light: #aebbf9;
    /* Accenti chiari */
    --brand-surface: rgba(115, 139, 244, 0.08);
    /* Sfondi leggeri */

    /* Text Colors */
    --text-main: #1e293b;
    --text-muted: #64748b;

    /* Fonts */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter Tight', sans-serif;
}

/* BASE SETUP */
html,
body {
    font-family: var(--font-body);
    color: var(--text-main);
    background: #ffffff;
    overflow-x: hidden;
    /* BLOCCA SCROLL LATERALE */
    width: 100%;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* --- SFONDO ENGAGING (Soft Gradient + Blobs) --- */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at 50% 0%, rgba(115, 139, 244, 0.15), rgba(255, 255, 255, 0) 70%), #ffffff;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: floatBlob 20s infinite alternate ease-in-out;
    z-index: -1;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 700px;
    height: 700px;
    background: rgba(115, 139, 244, 0.2);
    animation-delay: 0s;
}

.blob-2 {
    top: 30%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(160, 180, 255, 0.25);
    animation-delay: -5s;
}

.blob-3 {
    bottom: -20%;
    left: 10%;
    width: 500px;
    height: 500px;
    background: rgba(115, 139, 244, 0.15);
    animation-delay: -8s;
}

@keyframes floatBlob {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(40px, 60px) scale(1.1);
    }
}

/* --- TYPOGRAPHY & HERO --- */
h1,
h2,
h3,
h4,
.font-display {
    font-family: var(--font-display);
}

/* Gradiente Animato Premium */
.text-gradient-brand {
    background: linear-gradient(135deg, #1e293b 0%, #738bf4 40%, #aebbf9 70%, #5b6de3 100%);
    background-size: 300% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shineText 6s linear infinite;
}

@keyframes shineText {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* --- LIQUID GLASS NAVBAR (High-End) --- */
.glass-navbar {
    position: fixed !important;
    top: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 90% !important;
    max-width: 1100px;
    height: 64px !important;
    /* Compatta ed elegante */
    padding: 0 8px 0 24px !important;
    /* Padding asimmetrico per bottone a destra */
    border-radius: 100px !important;
    z-index: 9999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;

    /* THE LIQUID EFFECT */
    background: rgba(255, 255, 255, 0.65) !important;
    /* Non trasparente, ma lattiginoso */
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;

    /* Bordo sottilissimo per definizione su sfondo bianco */
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    /* Ombra composita per volume */
    box-shadow:
        0 4px 30px rgba(0, 0, 0, 0.04),
        /* Ombra diffusa */
        0 1px 2px rgba(0, 0, 0, 0.02),
        /* Ombra contatto */
        inset 0 0 0 1px rgba(255, 255, 255, 0.5) !important;
    /* Inner highlight */

    transition: all 0.3s ease;
}


/* Link Navigazione */
.nav-item {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 100px;
    transition: all 0.2s ease;
}

.nav-item:hover {
    color: #0f172a;
    background: rgba(0, 0, 0, 0.03);
}

/* Bottone CTA nella Navbar (Pillola solida) */
.btn-navbar-cta {
    background: #4f46e5;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 100px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    transition: all 0.2s ease;
}

.btn-navbar-cta:hover {
    background: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

/* Mobile Menu Overlay Custom */
#mobile-menu-overlay {
    /* Assicuriamoci che non erediti stili strani */
    will-change: transform, opacity;
}

/* --- BUTTONS (Animated & Static) --- */
/* Glowing Animation Button */
@property --angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

.btn-glowing-anim {
    position: relative;
    background: #4f46e5;
    color: white;
    font-weight: 700;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 16px 32px;
    border-radius: 100px;
    z-index: 1;
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.5);
}

.btn-glowing-anim::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    padding: 3px;
    border-radius: 100px;
    background: conic-gradient(from var(--angle), transparent 20%, #ffffff 50%, transparent 80%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: rotateBorder 3s linear infinite;
    z-index: 2;
    pointer-events: none;
}

.btn-glowing-anim:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 35px -5px rgba(79, 70, 229, 0.6);
}

@keyframes rotateBorder {
    to {
        --angle: 360deg;
    }
}


.card-vision {
    --accent-color: #6366f1;
    --bg-tint: rgba(99, 102, 241, 0.03);
}

.card-accounting {
    --accent-color: #10b981;
    --bg-tint: rgba(16, 185, 129, 0.03);
}

.card-chasing {
    --accent-color: #ec4899;
    --bg-tint: rgba(236, 72, 153, 0.03);
}


/* --- GLASS CARDS (Standard) --- */
.glass-card {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    padding: 2.5rem;
    transition: all 0.4s ease;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-8px);
    border-color: var(--brand-light);
    box-shadow: 0 20px 40px -10px rgba(115, 139, 244, 0.15);
}

/* --- STATIC GLASS CARDS (Trust Section) --- */
.glass-card-static {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.glass-card-static:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    transform: none !important;
    /* Blocca movimento */
}

.trust-bg {
    background: #0f172a;
    color: white;
    position: relative;
    overflow: hidden;
}

/* --- PRICING & TARGET CARDS (With Leo Mascot) --- */
.target-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2rem;
    padding: 3rem 2.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: visible !important;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    z-index: 1;
}

.target-card:hover {
    transform: translateY(-10px);
    z-index: 10;
}

.target-card.pmi:hover {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 25px 60px -15px rgba(37, 99, 235, 0.25);
}

.target-card.studi:hover {
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 25px 60px -15px rgba(168, 85, 247, 0.25);
}

/* Leo Mascot Positioning */
.leo-target-pos {
    position: absolute;
    width: 160px;
    height: auto;
    top: -85px;
    right: -30px;
    z-index: 50;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.5));
    transform: rotate(5deg) scale(1);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.target-card:hover .leo-target-pos {
    transform: rotate(0deg) scale(1.15) translateY(-5px);
}

/* Pricing Leo */
.leo-pricing-top {
    width: 150px;
    position: absolute;
    top: -115px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 0;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.pricing-wrapper-premium:hover .leo-pricing-top {
    transform: translateX(-50%) translateY(-10px) scale(1.1);
}



/* --- FAQ ANIMATION --- */
details>summary {
    list-style: none;
}

details>summary::-webkit-details-marker {
    display: none;
}

details[open] summary~* {
    animation: sweep .5s ease-in-out;
}

@keyframes sweep {
    0% {
        opacity: 0;
        transform: translateY(-10px)
    }

    100% {
        opacity: 1;
        transform: translateY(0)
    }
}

.faq-details {
    overflow: hidden;
}

.faq-details[open] {
    border-color: #6366f1;
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.1);
}

/* --- FOOTER --- */
.footer-section {
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
    font-family: var(--font-body);
}

.footer-link {
    color: #64748b;
    font-size: 0.875rem;
    transition: all 0.2s;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-link:hover {
    color: var(--brand-primary);
    transform: translateX(2px);
}

/* --- MOBILE OPTIMIZATION (Consolidated) --- */
@media (max-width: 768px) {

    /* Navbar Mobile Fix */
    .glass-navbar {
        top: 15px !important;
        width: 92% !important;
        height: 74px !important;
        padding: 0 20px !important;
        border-radius: 20px !important;
        background: rgba(255, 255, 255, 0.7) !important;
    }

    .desktop-only {
        display: none !important;
    }

    /* Typography Scaling */
    h1 {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
        word-wrap: break-word;
    }

    .text-4xl,
    .text-5xl {
        font-size: 2rem !important;
    }

    /* Section Spacing */
    main>section:first-of-type,
    body>section:first-of-type {
        padding-top: 8rem !important;
    }

    /* Trust Grid Stack */
    .grid-cols-3 {
        grid-template-columns: 1fr !important;
    }

    /* Pricing Spacing */
    .pricing-wrapper-premium {
        margin-top: 80px !important;
    }
}

/* --- LEAFLET MAP SYSTEM (Final Clean Version) --- */

/* 1. Container Mappa */
#server-map {
    width: 100%;
    height: 100%;
    background-color: #0f172a;
    /* Slate-900 per matchare il bg */
    z-index: 1;
    cursor: default;
    /* Niente manina */
}

/* 2. Filtri per rendere "Cyber" la mappa Dark */
.leaflet-layer {
    filter: contrast(1.1) brightness(1.1) saturate(0);
    opacity: 0.6;
}

.leaflet-control-attribution {
    display: none !important;
}

/* 3. Marker Container (La scatola invisibile 20x20) */
.city-marker {
    background: transparent;
    /* Rimuoviamo flexbox per evitare errori di rendering sui sub-pixel */
}

/* 4. Il Puntino (Posizionato matematicamente al centro) */
.dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    /* Spostiamo indietro di metà grandezza per centrare il pivot */
    margin-top: -4px;
    margin-left: -4px;

    background-color: #818cf8;
    /* Indigo-400 */
    border-radius: 50%;
    z-index: 20;
    /* Sopra la linea */
    box-shadow: 0 0 10px rgba(129, 140, 248, 1);
}

/* 5. L'onda pulsante (Centrata sullo stesso pivot) */
.pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin-top: -12px;
    margin-left: -12px;

    background-color: rgba(99, 102, 241, 0.4);
    border-radius: 50%;
    animation: mapPulse 2.5s infinite ease-out;
    z-index: 10;
}

/* 6. Etichetta Città */
.marker-label {
    position: absolute;
    top: 50%;
    left: 18px;
    /* Spostato a destra del pallino */
    transform: translateY(-50%);
    /* Centratura verticale perfetta */

    color: #cbd5e1;
    font-weight: 700;
    font-size: 10px;
    font-family: monospace;
    letter-spacing: 0.05em;
    white-space: nowrap;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
    background: rgba(15, 23, 42, 0.8);
    padding: 3px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
    z-index: 30;
}

@keyframes mapPulse {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* --- HERO & LIGHT SECTION UPGRADES --- */

/* 1. Hero Dashboard Container (Il Monitor) */
.hero-dashboard-glass {
    background: #0f172a;
    /* Slate 900 interno */
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 20px 50px -12px rgba(0, 0, 0, 0.25),
        /* Ombra profonda */
        0 0 0 1px rgba(15, 23, 42, 0.05);
    /* Bordo esterno sottile */
    overflow: hidden;
    position: relative;
    transform: perspective(1000px) rotateX(1deg);
    /* Leggera inclinazione 3D */
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

/* Effetto Hover sul Monitor: si raddrizza e si illumina */
.hero-dashboard-glass:hover {
    transform: perspective(1000px) rotateX(0deg) translateY(-5px);
    box-shadow:
        0 30px 60px -12px rgba(99, 102, 241, 0.15),
        /* Bagliore Indigo */
        0 0 0 1px rgba(99, 102, 241, 0.2);
}

/* 2. Badge "Nuovo" nella Hero */
.badge-pill {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.badge-pill:hover {
    border-color: #818cf8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

/* 3. Card "The Shift" (Problemi) - Light Mode */
.pain-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.pain-card:hover {
    border-color: var(--brand-primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px -5px rgba(115, 139, 244, 0.15);
}

/* Icona dentro le Pain Card */
.pain-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.pain-card:hover .pain-icon-box {
    transform: scale(1.1) rotate(-3deg);
}

/* Rende il testo "gradient" più leggibile su light bg */
.text-gradient-hero {
    background: linear-gradient(135deg, #1e293b 30%, #4f46e5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* --- AGENTS & TIMELINE REFRESH (Professional) --- */

/* 1. AGENTS CARDS (Clean Technical Look) */
.agent-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Hover: Solo elevazione ombra, NESSUNA rotazione */
.agent-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

/* Header Interno Card Agente */
.agent-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.agent-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
}

/* Tag Tecnico (es. "AdE Connector") */
.agent-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 12px;
    border-radius: 100px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
}

/* 2. TIMELINE (Structured & Static) */
.timeline-section {
    position: relative;
    background: #f8fafc;
    /* Slate-50 per stacco visivo */
}

/* Linea Centrale (Desktop) / Laterale (Mobile) */
.timeline-track {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
    /* Default Mobile: Sinistra */
    left: 32px;
}

/* Card Timeline */
.timeline-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    position: relative;
    transition: all 0.3s ease;
    z-index: 10;
}

.timeline-card:hover {
    border-color: #94a3b8;
    /* Highlight bordo */
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.05);
}

/* Badge Orario (es. 23:00) */
.time-badge {
    font-family: 'Space Grotesk', monospace;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 12px;
}

/* Desktop: Linea al centro */
@media (min-width: 768px) {
    .timeline-track {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* --- AGENTS SECTION (Static Enterprise Style) --- */
.agent-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* TRANSIZIONE SOLO COLORE/OMBRA - NIENTE TRANSFORM */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* HOVER: FERMO IMMOBILE. Cambia solo il bordo e l'ombra. */
.agent-card:hover {
    transform: none !important;
    /* BLOCCO MOVIMENTO */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    /* Ombra statica diffusa */
}

/* Colore bordo specifico on hover (Sottile richiamo al brand) */
.agent-card.type-ade:hover {
    border-color: #10b981;
}

/* Emerald Border */
.agent-card.type-ocr:hover {
    border-color: #6366f1;
}

/* Indigo Border */
.agent-card.type-chase:hover {
    border-color: #a855f7;
}

/* Purple Border */

/* Icon Box Stile */
.agent-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 1.5rem;
    transition: background-color 0.3s ease;
    /* Solo cambio colore interno */
}

/* Colori interni statici */
.agent-card.type-ade .agent-icon-box {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #d1fae5;
}

.agent-card.type-ocr .agent-icon-box {
    background: #eef2ff;
    color: #4f46e5;
    border: 1px solid #e0e7ff;
}

.agent-card.type-chase .agent-icon-box {
    background: #faf5ff;
    color: #9333ea;
    border: 1px solid #f3e8ff;
}


/* --- TIMELINE SECTION (Clean Log - NO BARS & MOBILE FIX) --- */
.process-log-container {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.process-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    /* Desktop: Orario | Contenuto */
    border-bottom: 1px solid #e2e8f0;
    /* Nessun bordo sinistro speciale su desktop */
    border-left: none;
    transition: background-color 0.2s ease;
}

.process-row:last-child {
    border-bottom: none;
}

/* HOVER: FERMO IMMOBILE. Solo leggero tint di sfondo. */
.process-row:hover {
    transform: none !important;
}

/* Tinte leggerissime su hover */
.process-row.log-indigo:hover {
    background-color: #f5f7ff;
}

.process-row.log-purple:hover {
    background-color: #faf5ff;
}

.process-row.log-blue:hover {
    background-color: #eff6ff;
}

.process-row.log-green:hover {
    background-color: #ecfdf5;
}

/* Colonna Orario */
.process-time {
    padding: 24px;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.time-val {
    font-family: 'Space Grotesk', monospace;
    font-weight: 700;
    font-size: 1.2rem;
}

.time-icon {
    margin-top: 8px;
    font-size: 1rem;
    opacity: 0.8;
}

/* Colonna Contenuto */
.process-content {
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* --- MOBILE OPTIMIZATION --- */
@media (max-width: 768px) {
    .process-row {
        grid-template-columns: 1fr;
        /* Stack */

        /* FIX BORDI: Forza bordo completo su tutti i lati */
        border: 1px solid #e2e8f0 !important;

        margin-bottom: 16px;
        border-radius: 12px;
        overflow: hidden;
    }

    /* FIX ULTIMO ELEMENTO: Forza il bordo inferiore anche sull'ultima card */
    .process-row:last-child {
        border-bottom: 1px solid #e2e8f0 !important;
    }

    .process-time {
        flex-direction: row;
        justify-content: space-between;
        padding: 12px 20px;
        border-right: none;
        border-bottom: 1px solid #f1f5f9;
        background: #f8fafc;
    }

    /* Colori Header Mobile */
    .process-row.log-indigo .process-time {
        background: #eef2ff;
        color: #4f46e5;
    }

    .process-row.log-purple .process-time {
        background: #faf5ff;
        color: #9333ea;
    }

    .process-row.log-blue .process-time {
        background: #eff6ff;
        color: #2563eb;
    }

    .process-row.log-green .process-time {
        background: #ecfdf5;
        color: #059669;
    }

    .time-icon {
        margin-top: 0;
    }

    .process-content {
        padding: 20px;
    }

    .process-log-container {
        background: transparent;
        border: none;
        box-shadow: none;
        overflow: visible;
    }
}


/* --- PRICING SECTION (Static Mobile, Desktop Scale) --- */

/* Toggle Switch Container */
.pricing-toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 48px;
    position: relative;
    /* Necessario per il badge su mobile */
}

.toggle-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: color 0.3s ease;
}

.toggle-label.active {
    color: #0f172a;
}

/* Switch Fisico */
.switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 30px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
    background-color: #6366f1;
}

input:checked+.slider:before {
    transform: translateX(26px);
}

.save-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: #10b981;
    background: #ecfdf5;
    padding: 4px 8px;
    border-radius: 100px;
    border: 1px solid #d1fae5;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Pricing Cards Base */
.pricing-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    height: 100%;
}

/* HOVER IMMOBILE */
.pricing-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.08);
    transform: none !important;
}

/* Featured Card */
.pricing-card.featured {
    border-color: #6366f1;
    box-shadow: 0 25px 50px -12px rgba(99, 102, 241, 0.15);
    background: linear-gradient(to bottom, #ffffff 0%, #f5f7ff 100%);
    z-index: 10;
    transform: none;
    /* Reset base */
}

/* Badge Consigliato */
.badge-featured {
    position: absolute;
    top: -1px;
    right: -1px;
    background: #4f46e5;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 6px 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-top-right-radius: 24px;
    border-bottom-left-radius: 16px;
    z-index: 20;
}

.pricing-amount {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 3.5rem;
    color: #0f172a;
    line-height: 1;
    letter-spacing: -0.02em;
}

.pricing-period {
    color: #64748b;
    font-weight: 500;
    font-size: 1rem;
}

/* --- TABLE FIXES (Bordi più visibili) --- */
.comparison-wrapper {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.comparison-table td,
.comparison-table th {
    border-bottom: 1px solid #f1f5f9;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

/* --- NEW PREMIUM MODAL & SPINNER STYLES --- */

/* 1. Visually Stunning Spinner Overlay */
.spinner-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    /* Match modal rounded */
    animation: fadeIn 0.3s ease;
}

.spinner-icon {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    border-top-color: #4f46e5;
    animation: spinner-spin 0.8s ease-in-out infinite;
    margin-bottom: 1rem;
}

@keyframes spinner-spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4f46e5;
    animation: pulse 1.5s infinite;
}

/* 2. Premium Form Inputs */
.input-premium {
    width: 100%;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    color: #1e293b;
    transition: all 0.2s ease;
    outline: none;
}

.input-premium:focus {
    background: #ffffff;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.input-premium::placeholder {
    color: #94a3b8;
}

/* 3. Auth Form Toggle Animation */
.auth-form-container {
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    max-height: 0;
    opacity: 0;
}

.auth-form-container.active {
    max-height: 300px;
    /* Adjust based on content */
    opacity: 1;
    margin-top: 1rem;
}

/* 4. Separator Text Polish */
.separator-text {
    background: #fff;
    padding: 0 10px;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.comparison-table th {
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 0.02em;
    /* Bordo destro più scuro per separare bene Freelancer */
    border-right: 1px solid #e2e8f0;
}

.comparison-table td {
    /* Bordo destro più scuro */
    border-right: 1px solid #e2e8f0;
}

/* Rimuovo bordo dall'ultima colonna */
.comparison-table th:last-child,
.comparison-table td:last-child {
    border-right: none;
}

/* --- DESKTOP ONLY LOGIC (Min-Width 1024px) --- */
@media (min-width: 1024px) {
    .pricing-card.featured {
        transform: scale(1.02);
    }

    .pricing-card.featured:hover {
        transform: scale(1.02) !important;
        box-shadow: 0 30px 60px -12px rgba(99, 102, 241, 0.25);
        border-color: #4f46e5;
    }
}

/* --- MOBILE RESPONSIVE TWEAKS --- */
@media (max-width: 768px) {

    /* 1. Toggle Mobile Layout: Badge sotto */
    .pricing-toggle-container {
        margin-bottom: 60px;
        /* Spazio extra per il badge */
    }

    .save-badge {
        position: absolute;
        bottom: -32px;
        /* Posizionato sotto gli switch */
        left: 50%;
        transform: translateX(-50%);
        /* Centrato perfettamente */
        width: max-content;
        box-shadow: 0 4px 10px rgba(16, 185, 129, 0.1);
    }

    /* 2. Table Scroll */
    .comparison-wrapper {
        overflow-x: auto;
    }

    /* 3. Reset Hover e Scale su Mobile */
    .pricing-card.featured {
        transform: none !important;
    }

    .pricing-card.featured:hover {
        transform: none !important;
    }
}

/* --- MOBILE OPTIMIZATION (Pricing) --- */
@media (max-width: 768px) {

    /* 1. SELETTORE: Spazio extra sotto per la scritta */
    .pricing-toggle-container {
        margin-bottom: 60px;
        position: relative;
    }

    /* Contenitore Scritta + Freccia */
    .mobile-promo-wrapper {
        position: absolute;
        bottom: -35px;
        left: 50%;
        transform: translateX(-50%);
        /* Centrato perfetto */
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 200px;
        /* Abbastanza largo per contenere la freccia */
        pointer-events: none;
        /* Non cliccabile, solo visuale */
    }

    /* Testo "2 MESI GRATIS" */
    .promo-text {
        font-size: 0.75rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #94a3b8;
        /* Default: Grigio */
        transition: color 0.3s ease;
        position: relative;
        z-index: 10;
        background: #f8fafc;
        /* Match background per coprire la linea se serve */
        padding: 0 5px;
    }

    /* Freccia SVG Curva */
    .promo-arrow {
        position: absolute;
        bottom: 12px;
        /* Parte dal testo */
        right: 40px;
        /* Punta verso destra (Annuale) */
        width: 40px;
        height: 25px;
        stroke: #94a3b8;
        /* Default: Grigio */
        stroke-width: 1.5;
        stroke-dasharray: 4 2;
        /* Tratteggio */
        stroke-linecap: round;
        fill: none;
        transition: stroke 0.3s ease;
        transform: rotate(-10deg);
        /* Leggera inclinazione naturale */
    }

    /* STATO ATTIVO (Quando Annuale è selezionato) */
    .mobile-promo-wrapper.active .promo-text {
        color: #10b981;
        /* Verde */
    }

    .mobile-promo-wrapper.active .promo-arrow {
        stroke: #10b981;
        /* Verde */
    }

    /* 2. TABELLA: Fix Bordi Mancanti */
    .comparison-wrapper {
        overflow-x: auto;
    }

    .comparison-table th,
    .comparison-table td {
        border-right: 1px solid #e2e8f0;
        border-left: 1px solid #e2e8f0;
    }

    /* 3. CARD: Blocco Totale Movimento */
    .pricing-card,
    .pricing-card.featured {
        transform: none !important;
        transition: none !important;
    }

    .pricing-card:hover,
    .pricing-card.featured:hover {
        transform: none !important;
        box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1) !important;
    }
}
/* --- HOLOGRAPHIC MAP STYLES --- */

/* 1. Rimuove lo sfondo grigio di default di Leaflet */
.leaflet-container {
    background: #0b1121 !important;
}

/* 2. Filtri Cyber sui Tile della mappa */
.leaflet-tile {
    filter: invert(100%) hue-rotate(180deg) brightness(0.6) contrast(1.5) grayscale(100%) !important;
    opacity: 0.4 !important;
}

/* 3. Animazione Linea di Connessione (Traffico Dati) */
.connection-line {
    stroke-dasharray: 10;
    animation: dash-flow 1s linear infinite;
    filter: drop-shadow(0 0 5px #6366f1);
}

@keyframes dash-flow {
    to {
        stroke-dashoffset: -20;
    }
}

/* 4. Animazione Marker (Pulsazione Radar) */
.pulse-ring {
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(99, 102, 241, 0.4);
    border: 1px solid rgba(99, 102, 241, 0.8);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: radar-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.pulse-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #a5b4fc;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px #a5b4fc;
    z-index: 2;
}

@keyframes radar-ping {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(3); opacity: 0; }
}

/* 5. Animazione Scanline (Il raggio verticale) */
@keyframes scanline {
    0% { top: 0%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.animate-scanline {
    animation: scanline 4s linear infinite;
}
/* --- STRIPE STYLE H1 GRADIENT --- */

/* 1. Definiamo il gradiente e l'animazione */
.stripe-gradient-text {
    /* Un gradiente complesso e vibrante stile Stripe */
    background: linear-gradient(
        to right bottom,
        #4f46e5 0%,   /* Indigo-600 */
        #9333ea 25%,  /* Purple-600 */
        #2563eb 50%,  /* Blue-600 */
        #0891b2 75%,  /* Cyan-600 */
        #4f46e5 100%  /* Back to Indigo for smooth loop */
    );
    /* Aumentiamo la dimensione per un effetto più fluido */
    background-size: 200% auto;
    
    /* Taglia il background sulla forma del testo */
    -webkit-background-clip: text;
    background-clip: text;
    
    /* Rende il testo trasparente per mostrare il gradiente sotto */
    color: transparent;
    
    /* Assicura che il clipping funzioni bene anche su più righe */
    display: inline; 
    
    /* Opzionale: Animazione lenta per renderlo vivo */
    animation: stripeShine 8s linear infinite;
}

/* 2. Keyframes per l'animazione */
@keyframes stripeShine {
    to {
        background-position: 200% center;
    }
}