/* ==============================================================================
   FORMATOZERO - GLOBAL STYLESHEET (style.css)
   ============================================================================== */

/* --- VARIABILI TEMA CHIARO (Default) --- */
:root {
    --bg-body: #ffffff;
    --bg-surface: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --border-strong: #cbd5e1;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --brand-primary: #3b82f6;
    --brand-primary-hover: #2563eb;
    --hero-bg: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
    --header-bg: rgba(255, 255, 255, 0.95);
    --footer-bg: #050914;
    --footer-text: #94a3b8;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

/* --- VARIABILI TEMA SCURO (Dark Mode) --- */
[data-theme="dark"] {
    --bg-body: #0b0f17;
    --bg-surface: #131b26;
    --bg-card: #1b2636;
    --border-color: #233044;
    --border-strong: #334155;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --brand-primary: #38bdf8;
    --brand-primary-hover: #0284c7;
    --hero-bg: linear-gradient(135deg, #0b0f17 0%, #162032 100%);
    --header-bg: rgba(11, 15, 23, 0.95);
    --footer-bg: #03060a;
    --footer-text: #64748b;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

/* --- RESET & STRUTTURA FLUIDA A TUTTA PAGINA --- */
* {
    box-sizing: border-box;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    display: flex;
    flex-direction: column;
}

main.main-fluid {
    width: 100%;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* --- HEADER & TOPBAR RESPONSIVA --- */
.site-header {
    width: 100%;
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1050;
}

.brand-text {
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
    color: var(--text-main);
}
.brand-accent {
    color: var(--brand-primary);
}

.nav-link-custom {
    color: var(--text-main) !important;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
}
.nav-link-custom:hover {
    color: var(--brand-primary) !important;
}

/* Tasti Lingua IT / EN */
.lang-switch .btn-lang {
    padding: 3px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    text-decoration: none;
}
.lang-switch .btn-lang.active {
    background-color: var(--brand-primary);
    color: #ffffff;
    border-color: var(--brand-primary);
}

.brand-logo-img {
    height: 38px;
    width: 38px;
    display: inline-block;
    vertical-align: middle;
    filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.25));
    transition: transform 0.2s ease;
}

a:hover .brand-logo-img {
    transform: scale(1.05) rotate(-3deg);
}

/* Pulsante Tema */
.btn-theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    cursor: pointer;
}
.btn-theme-toggle:hover {
    transform: scale(1.08);
}

/* ==============================================================================
   NUOVO HERO SECTION IMMERSIVO & FLUTTUANTE
   ============================================================================== */
.hero-stage {
    position: relative;
    width: 100%;
    min-height: 78vh;
    display: flex;
    align-items: center;
    background: var(--hero-bg);
    overflow: hidden;
    padding: 60px 0 40px;
}

/* Luce soffusa sfumata di sfondo */
.hero-glow-bg {
    position: absolute;
    top: -150px;
    right: 5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0) 70%);
    pointer-events: none;
    z-index: 1;
}

.min-vh-75 {
    min-height: 70vh;
}

/* Badge con punto pulsante */
.hero-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}
.hero-pill-badge .badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--brand-primary);
    box-shadow: 0 0 8px var(--brand-primary);
}
.hero-pill-badge .badge-text {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-main);
}

/* Tipografia Hero */
.hero-headline {
    font-size: clamp(2.2rem, 4.2vw, 3.8rem);
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: var(--text-main);
}
.hero-lead {
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 620px;
}

/* Bottoni Hero */
.btn-hero-primary {
    background-color: var(--brand-primary);
    color: #ffffff !important;
    font-weight: 700;
    padding: 14px 32px;
    border-radius: 999px;
    box-shadow: 0 8px 20px -4px rgba(59, 130, 246, 0.4);
    border: none;
    display: inline-flex;
    align-items: center;
}
.btn-hero-primary:hover {
    background-color: var(--brand-primary-hover);
    transform: translateY(-2px);
}

.btn-hero-secondary {
    background-color: var(--bg-surface);
    color: var(--text-main) !important;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
}
.btn-hero-secondary:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary) !important;
    transform: translateY(-2px);
}

/* Statistiche veloci sotto i bottoni */
.hero-stats-row {
    border-color: var(--border-color) !important;
}
.stat-item .stat-number {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1;
}
.stat-item .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}
.stat-divider {
    width: 1px;
    height: 35px;
    background-color: var(--border-color);
}

/* Composizione Immagine Hero Fluttuante */
.hero-visual-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
    z-index: 2;
}

.hero-visual-backdrop {
    position: absolute;
    inset: -15px;
    background: radial-gradient(circle, var(--brand-primary) 0%, transparent 70%);
    opacity: 0.15;
    border-radius: 40px;
    filter: blur(25px);
    z-index: 1;
}

.hero-portrait {
    position: relative;
    z-index: 2;
    max-height: 480px;
    width: auto;
    max-width: 100%;
    border-radius: 28px;
    object-fit: cover;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.25);
    border: 2px solid var(--border-color);
}

/* Card Fluttuanti sovrapposte */
.floating-proof-card {
    position: absolute;
    z-index: 3;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(10px);
}
.floating-proof-card .card-icon {
    font-size: 1.4rem;
}
.floating-proof-card strong {
    font-size: 0.85rem;
    color: var(--text-main);
}
.floating-proof-card small {
    font-size: 0.72rem;
}

.float-bottom-left {
    bottom: 20px;
    left: -20px;
}
.float-top-right {
    top: 25px;
    right: -15px;
}

@media (max-width: 991px) {
    .hero-stage {
        padding: 40px 0;
        text-align: center;
    }
    .hero-copy-col {
        order: 1;
    }
    .hero-visual-col {
        order: 2;
        margin-top: 30px;
    }
    .hero-lead {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-actions {
        justify-content: center;
    }
    .hero-stats-row {
        justify-content: center;
    }
    .float-bottom-left, .float-top-right {
        position: static;
        display: inline-flex;
        margin: 10px 5px 0;
    }
}

/* --- TRUST BAR --- */
.trust-section {
    width: 100%;
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.trust-item {
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

/* --- FEATURE CARDS --- */
.features-section {
    width: 100%;
    background-color: var(--bg-body);
}

.feature-box {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    box-shadow: var(--card-shadow);
}
.feature-box .icon {
    font-size: 1.8rem;
    color: var(--brand-primary);
}
.feature-box h5 {
    color: var(--text-main);
    font-weight: 700;
}
.feature-box p {
    color: var(--text-muted);
}

/* --- FOOTER FLUIDO --- */
.site-footer-fluid {
    width: 100%;
    background-color: var(--footer-bg);
    color: var(--footer-text);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}
.site-footer-fluid a {
    color: var(--footer-text);
    text-decoration: none;
}
.site-footer-fluid a:hover {
    color: #ffffff;
}
