/* ==========================================================================
   1. RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #1e2d4a; /* Il blu profondo del logo Qualeevo */
    --primary-light: #2c3e66;
    --accent: #3b82f6; /* Blu tech per elementi in evidenza */
    --accent-success: #10b981; /* Verde per validazione attiva */
    --text-dark: #0f172a;
    --text-light: #f8fafc;
    --text-muted: #64748b;
    --bg-light: #f1f5f9;
    --bg-white: #ffffff;
    --font-main: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================================================
   2. UTILITIES & BUTTONS
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.logo-img {
    height: 45px;
    width: auto;
    display: block;
}

.btn {
    display: inline-block;
    background-color: var(--accent);
    color: var(--text-light);
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.2);
}

    .btn:hover {
        background-color: #2563eb;
        transform: translateY(-2px);
        box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
    }

.btn-outline {
    background-color: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
    box-shadow: none;
}

    .btn-outline:hover {
        background-color: var(--text-light);
        color: var(--primary);
        box-shadow: none;
    }

section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

    .section-header h2 {
        font-size: 2.5rem;
        color: var(--primary);
        margin-bottom: 16px;
        font-weight: 700;
        position: relative;
    }

    .section-header p {
        color: var(--text-muted);
        font-size: 1.1rem;
    }

/* ==========================================================================
   3. HEADER & NAVIGATION (DESKTOP)
   ========================================================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(30, 45, 74, 0.95);
    backdrop-filter: blur(8px);
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
}

.logo-icon {
    width: 40px;
    height: 40px;
    margin-right: 12px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
}

.nav-link {
    color: rgba(248, 250, 252, 0.8);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

    .nav-link:hover {
        color: var(--text-light);
    }

/* ==========================================================================
   4. SECTIONS SECTIONS (HERO, SETTORI, PROBLEMA, ECC.)
   ========================================================================== */
#hero {
    background: linear-gradient(135deg, var(--primary) 0%, #111a2e 100%);
    color: var(--text-light);
    padding: 180px 0 120px 0;
    position: relative;
    overflow: hidden;
}

    #hero::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 50%;
        height: 100%;
        background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, transparent 70%);
        pointer-events: none;
    }

.hero-grid {
    display: flex;
    align-items: center;
    gap: 48px;
}

.hero-content {
    flex: 1.2;
}

.hero-tag {
    display: inline-block;
    background-color: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

#hero h1 {
    font-size: 3.2rem;
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

#hero p {
    font-size: 1.25rem;
    color: #cbd5e1;
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.hero-visual {
    flex: 1;
    position: relative;
}

.tablet-mockup {
    background-color: #0f172a;
    border-radius: 18px;
    padding: 12px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    border: 4px solid #334155;
    position: relative;
}

.tablet-screen {
    background-color: #f8fafc;
    border-radius: 10px;
    padding: 20px;
    color: var(--text-dark);
}

.screen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 12px;
}

.screen-logo {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.screen-status-pill {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--accent-success);
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.screen-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
}

.mock-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.mock-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
}

.card-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.card-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.check-icon {
    color: var(--accent-success);
    font-weight: bold;
}

.progress-bar {
    height: 6px;
    background-color: #e2e8f0;
    border-radius: 10px;
    margin-top: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--accent-success);
    width: 100%;
}

#settori {
    background-color: var(--bg-light);
}

.settori-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.settore-card {
    background: var(--bg-white);
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    transition: var(--transition);
    border-top: 4px solid transparent;
}

    .settore-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
        border-top-color: var(--accent);
    }

.settore-icon {
    font-size: 2rem;
    margin-bottom: 16px;
    display: inline-block;
}

.settore-card h3 {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 12px;
    font-weight: 600;
}

.settore-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

#problema {
    background-color: var(--bg-white);
}

.prob-container {
    display: flex;
    align-items: center;
    gap: 60px;
}

.prob-content {
    flex: 1;
}

.prob-list {
    list-style: none;
    margin-top: 32px;
}

.prob-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.prob-icon-box {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    padding: 8px;
    border-radius: 8px;
    font-weight: bold;
    flex-shrink: 0;
}

.prob-text h4 {
    font-size: 1.15rem;
    color: var(--primary);
    margin-bottom: 4px;
}

.prob-text p {
    color: var(--text-muted);
}

#prodotto {
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
}

.prod-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.feature-card {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

    .feature-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 4px;
        background: linear-gradient(90deg, var(--accent), var(--accent-success));
    }

.feature-badge {
    display: inline-block;
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 16px;
}

.feature-card p {
    color: var(--text-muted);
}

#vendor-rating {
    background-color: var(--primary);
    color: var(--text-light);
    position: relative;
}

.vr-grid {
    display: flex;
    align-items: center;
    gap: 60px;
}

.vr-content {
    flex: 1;
}

    .vr-content h2 {
        font-size: 2.5rem;
        margin-bottom: 20px;
        font-weight: 700;
    }

    .vr-content p {
        color: #cbd5e1;
        font-size: 1.1rem;
        margin-bottom: 32px;
    }

.vr-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.stat-box {
    background-color: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 24px;
    border-radius: 12px;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #60a5fa;
    display: block;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.9rem;
    color: #94a3b8;
}

#chi-siamo {
    background-color: var(--bg-white);
    text-align: center;
}

.about-box {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-light);
    padding: 48px;
    border-radius: 20px;
    box-shadow: inset 0 2px 4px 0 rgba(0,0,0,0.05);
}

.about-badge {
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.9rem;
    margin-bottom: 16px;
    display: block;
}

.about-box p {
    font-size: 1.2rem;
    color: #334155;
    line-height: 1.8;
    margin-bottom: 24px;
}

#contatti {
    background: linear-gradient(135deg, #1e2d4a 0%, #0f172a 100%);
    color: var(--text-light);
    text-align: center;
}

.form-container {
    max-width: 550px;
    margin: 0 auto;
    background: rgba(255,255,255,0.03);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

    .form-group label {
        display: block;
        font-size: 0.85rem;
        font-weight: 600;
        margin-bottom: 8px;
        color: #94a3b8;
    }

    .form-group input, .form-group select {
        width: 100%;
        padding: 12px 16px;
        background: rgba(255,255,255,0.05);
        border: 1px solid rgba(255,255,255,0.15);
        border-radius: 6px;
        color: white;
        font-family: var(--font-main);
        font-size: 1rem;
        transition: var(--transition);
    }

        .form-group input:focus, .form-group select:focus {
            outline: none;
            border-color: var(--accent);
            background: rgba(255,255,255,0.1);
        }

footer {
    background-color: #0b111e;
    color: #64748b;
    padding: 40px 0;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 0.9rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==========================================================================
   5. WORKFLOW CONTAINER STYLES (SEMPRE VALIDE)
   ========================================================================== */
.wf-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 960px;
    margin: 40px auto;
    padding: 30px;
    background: #f8fafc;
    border-radius: 12px;
    flex-wrap: wrap;
    gap: 20px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.wf-step {
    flex: 1;
    min-width: 220px;
    text-align: center;
}

.wf-circle {
    width: 50px;
    height: 50px;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px auto;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.wf-arrow {
    color: #cbd5e1;
    font-size: 1.8rem;
    font-weight: bold;
}

/* ==========================================================================
   6. RESPONSIVE MEDIA QUERIES (GLOBAL FIXES)
   ========================================================================== */

/* Media Query principale per schermi Tablet e Smartphone */
@media (max-width: 968px) {
    .hero-grid, .prob-container, .vr-grid {
        flex-direction: column;
        text-align: center;
    }

    /* Compensa l'altezza dell'header su due righe evitando sovrapposizioni */
    #hero {
        padding: 220px 0 80px 0 !important;
    }

        #hero h1 {
            font-size: 2.2rem;
        }

        #hero p {
            margin-left: auto;
            margin-right: auto;
            font-size: 1.1rem;
        }

    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        gap: 12px;
    }

    /* HEADER MOBILE STRUCTURE: Evita i tagli e calcola bene lo spazio */
    .nav-container {
        height: auto !important;
        padding: 15px 15px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        align-items: center !important;
    }

    /* Nasconde il testo del logo testuale se presente in HTML per non affollare */
    .logo-text {
        display: none !important;
    }

    .logo-container {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 40px;
    }

    .logo-img {
        height: 35px !important;
        width: auto;
        display: block;
    }

    /* NAV MENU MOBILE: Forza la distribuzione dei link in orizzontale/multiriga */
    .nav-menu {
        display: flex !important;
        list-style: none;
        gap: 8px !important;
        margin: 0 !important;
        padding: 0 !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        width: 100% !important;
    }

        /* Sblocca elementi precedentemente nascosti */
        .nav-menu li {
            display: block !important;
        }

    .nav-link {
        font-size: 0.85rem !important;
        padding: 4px 6px !important;
        white-space: nowrap;
    }

    /* Ottimizzazione pulsante Demo affiancato */
    .nav-menu .btn-outline {
        padding: 4px 10px !important;
        font-size: 0.8rem !important;
        margin-left: 2px;
        border-width: 1px !important;
    }

    /* Griglia Caratteristiche Prodotto */
    .prod-features {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 24px;
        width: 100%;
    }

    .feature-card {
        flex: 0 1 calc(33.333% - 16px);
        min-width: 300px;
        display: flex;
        flex-direction: column;
    }
}

/* Gestione intermedia per Tablet (schermi sopra i 650px fino a 968px) */
@media (min-width: 650px) and (max-width: 968px) {
    .nav-container {
        flex-direction: row !important;
        justify-content: space-between !important;
    }

    .nav-menu {
        width: auto !important;
        justify-content: flex-end !important;
    }

    #hero {
        padding: 180px 0 100px 0 !important;
    }
}

/* Switch verticale per gli step del Workflow su smartphone piccoli */
@media (max-width: 768px) {
    .wf-container {
        flex-direction: column;
    }

    .wf-arrow {
        transform: rotate(90deg);
        margin: 5px 0;
    }
}
