/* VISUAL FLOWS & DIAGRAMS (Visual Capitalist Style / Deep Design) */

:root {
    --vf-bg: #0b0f14;
    --vf-card-bg: rgba(20, 30, 40, 0.6);
    --vf-border: rgba(255, 255, 255, 0.1);

    --vf-accent-primary: #00F0FF;
    /* Cyan */
    --vf-accent-secondary: #7000FF;
    /* Purple */
    --vf-accent-success: #00FF94;
    /* Green */
    --vf-accent-warn: #FFD600;
    /* Yellow */

    --vf-text-main: #ffffff;
    --vf-text-muted: #94a3b8;
}

/* --- Container --- */
.vf-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    position: relative;
}

.vf-section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    background: linear-gradient(to right, #fff, var(--vf-accent-primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 240, 255, 0.3);
}

/* --- 1. DYNAMIC PROCESS FLOW (Arrow Connected) --- */
.vf-flow-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 80px;
    padding: 20px 0;
}

.vf-flow-step {
    flex: 1;
    background: linear-gradient(180deg, rgba(20, 30, 40, 0.8), rgba(10, 15, 20, 0.95));
    border: 1px solid var(--vf-border);
    border-top: 3px solid var(--vf-accent-primary);
    border-radius: 12px;
    padding: 30px 20px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
}

.vf-flow-step:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--vf-accent-primary);
    box-shadow: 0 20px 50px rgba(0, 240, 255, 0.1);
    z-index: 2;
}

/* --- VISUAL CAPITALIST STYLE FLOWS --- */

.vf-container {
    padding: 80px 0;
    max-width: 1000px;
    margin: 0 auto;
    font-family: 'Outfit', sans-serif;
}

.vf-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.vf-header h2 {
    font-size: 3.5rem;
    background: linear-gradient(to right, #ffffff, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -2px;
}

.vf-header p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Vertical Timeline Line */
.vf-timeline {
    position: relative;
    padding-left: 40px;
    border-left: 2px dashed rgba(255, 255, 255, 0.15);
    margin-left: 20px;
}

/* Timeline Nodes */
.vf-node {
    position: relative;
    margin-bottom: 60px;
    padding-left: 40px;
}

/* The Dot on the Line */
.vf-node::before {
    content: '';
    position: absolute;
    left: -51px;
    /* aligns with border-left of timeline */
    top: 24px;
    width: 20px;
    height: 20px;
    background: var(--bg-dark);
    border: 2px solid var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--primary-glow);
    z-index: 2;
}

/* The Card Content */
.vf-card {
    background: rgba(20, 25, 35, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    position: relative;
    transition: transform 0.3s ease;
}

.vf-card:hover {
    transform: translateX(10px);
    border-color: var(--primary);
    background: rgba(20, 25, 35, 0.8);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Step Number Badge */
.vf-badge {
    position: absolute;
    top: -15px;
    right: 30px;
    background: var(--primary);
    color: #000;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    box-shadow: 0 0 20px var(--primary-glow);
    text-transform: uppercase;
}

/* Content Typography */
.vf-card h3 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 12px;
}

.vf-card ul {
    list-style: none;
    padding: 0;
}

.vf-card li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 8px;
    color: #cbd5e1;
    font-size: 1.1rem;
}

.vf-card li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
    font-size: 1.4rem;
    line-height: 1;
}

/* Output Box (Distinct look) */
.vf-output {
    margin-top: 20px;
    background: rgba(0, 240, 255, 0.05);
    border-left: 3px solid var(--primary);
    padding: 16px;
    border-radius: 0 12px 12px 0;
}

.vf-output h4 {
    color: var(--primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

/* Dynamic Arrow Connector */
.vf-flow-step:not(:last-child)::after {
    content: "";
    position: absolute;
    right: -25px;
    top: 50%;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, var(--vf-accent-primary), transparent);
    z-index: 0;
}

/* Triangle tip for arrow */
.vf-flow-step:not(:last-child)::before {
    content: "►";
    position: absolute;
    right: -32px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--vf-accent-primary);
    font-size: 14px;
    z-index: 1;
}

.vf-step-number {
    position: absolute;
    top: -20px;
    left: 20px;
    background: var(--vf-bg);
    border: 1px solid var(--vf-accent-primary);
    color: var(--vf-accent-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.vf-step-title {
    margin-top: 15px;
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.vf-step-desc {
    color: var(--vf-text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* --- 2. RADIAL REVENUE ENGINE (Hub & Spoke) --- */
.vf-engine-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 80px;
}

.vf-engine-hub {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.1), rgba(0, 0, 0, 0.8));
    border: 2px solid var(--vf-accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    font-weight: 900;
    font-size: 1.5rem;
    box-shadow: 0 0 60px rgba(0, 240, 255, 0.2);
    position: relative;
    z-index: 2;
    padding: 20px;
}

/* Spokes (Connectors from Hub) */
.vf-engine-spoke-item {
    flex: 0 1 250px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--vf-border);
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    transition: 0.3s;
    position: relative;
}

.vf-engine-spoke-item:hover {
    background: rgba(0, 240, 255, 0.05);
    border-color: var(--vf-accent-primary);
}

.vf-engine-spoke-item h4 {
    color: var(--vf-accent-primary);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.vf-engine-spoke-item p {
    color: var(--vf-text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* --- 3. STRATEGY GRID (Levers) --- */
.vf-strategy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.vf-strategy-card {
    background: rgba(20, 30, 40, 0.4);
    border: 1px solid var(--vf-border);
    padding: 24px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-left: 4px solid var(--vf-accent-secondary);
    transition: transform 0.2s;
}

.vf-strategy-card:hover {
    transform: translateY(-5px);
    background: rgba(20, 30, 40, 0.8);
}

.vf-icon-box {
    font-size: 2rem;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px rgba(112, 0, 255, 0.5));
}

.vf-strategy-card h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #fff;
}

/* --- 4. ACTION BAR (CTA) --- */
.vf-action-bar {
    text-align: center;
    padding: 40px;
    background: rgba(255, 214, 0, 0.05);
    /* Yellow Tint */
    border: 1px solid rgba(255, 214, 0, 0.2);
    border-radius: 20px;
    margin-top: 60px;
}

.btn-case-study {
    background: var(--vf-accent-warn);
    color: #000;
    font-weight: 800;
    padding: 18px 40px;
    border-radius: 50px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    box-shadow: 0 10px 30px rgba(255, 214, 0, 0.3);
    transition: 0.3s;
}

.btn-case-study:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 214, 0, 0.5);
    background: #fff;
}

/* --- 5. IMAGE BOX --- */
.vf-image-box {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    border: 1px dashed var(--vf-border);
    margin: 40px 0;
}

.vf-image-box img {
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    max-width: 100%;
}

@media (max-width: 900px) {
    .vf-flow-wrapper {
        flex-direction: column;
        gap: 40px;
    }

    .vf-flow-step:not(:last-child)::after {
        content: "";
        left: 50%;
        top: auto;
        bottom: -25px;
        right: auto;
        width: 2px;
        height: 30px;
        transform: translateX(-50%);
        background: linear-gradient(180deg, var(--vf-accent-primary), transparent);
    }

    .vf-flow-step:not(:last-child)::before {
        content: "▼";
        left: 50%;
        top: auto;
        bottom: -32px;
        right: auto;
        width: auto;
        transform: translateX(-50%);
    }
}

/* --- SECTOR BACKGROUNDS --- */
body[data-page="Estetica"],
body[data-page="Parrucchieri"],
body[data-page="Massoterapia"],
body[data-page="Attivita"],
body[data-page="Benessere"] {
    background-image: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85)), url('../assets/img_modern/bg_imprese.png');
    background-size: cover;
    background-position: center bottom;
    background-attachment: fixed;
    /* Removed blend-mode */
}

body[data-page="Yoga"],
body[data-page="Pilates"],
body[data-page="Team"] {
    background-image: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85)), url('../assets/img_modern/bg_palestre.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

body[data-page="Protocollo"] {
    background-image: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85)), url('../assets/img_modern/bg_famiglie.png');
    background-size: cover;
    background-position: center bottom;
    background-attachment: fixed;
}

/* --- BIG PILL BUTTONS (Attivita) --- */
.settori-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.big-pill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    background: rgba(20, 30, 40, 0.6);
    border: 1px solid var(--border);
    border-radius: 16px;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
}

.big-pill:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.big-pill.accent-cyan {
    border-left: 4px solid #00F0FF;
}

.big-pill.accent-cyan:hover {
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
    background: rgba(0, 240, 255, 0.1);
}

.big-pill.accent-purple {
    border-left: 4px solid #7000FF;
}

.big-pill.accent-purple:hover {
    box-shadow: 0 0 20px rgba(112, 0, 255, 0.2);
    background: rgba(112, 0, 255, 0.1);
}

.big-pill.accent-lime {
    border-left: 4px solid #ccff00;
}

.big-pill.accent-lime:hover {
    box-shadow: 0 0 20px rgba(204, 255, 0, 0.2);
    background: rgba(204, 255, 0, 0.1);
}

.big-pill.accent-pink {
    border-left: 4px solid #ff00cc;
}

.big-pill.accent-pink:hover {
    box-shadow: 0 0 20px rgba(255, 0, 204, 0.2);
    background: rgba(255, 0, 204, 0.1);
}

.big-pill.accent-orange {
    border-left: 4px solid #ff9900;
}

.big-pill.accent-orange:hover {
    box-shadow: 0 0 20px rgba(255, 153, 0, 0.2);
    background: rgba(255, 153, 0, 0.1);
}

.big-pill.accent-yellow {
    border-left: 4px solid #ffd93b;
    color: #fff;
}

.big-pill.accent-yellow:hover {
    box-shadow: 0 0 20px rgba(255, 217, 59, 0.2);
    background: rgba(255, 217, 59, 0.1);
}

.big-pill.accent-red {
    border-left: 4px solid #ff3333;
}

.big-pill.accent-red:hover {
    box-shadow: 0 0 20px rgba(255, 51, 51, 0.2);
    background: rgba(255, 51, 51, 0.1);
}

/* --- ZAR AI SPECIFIC OVERRIDES (High Impact) --- */

/* Hero Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(0, 240, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 240, 255, 0);
    }
}

.hero-zar {
    padding: 100px 0 60px;
}

/* Ensure branding colors are strong */
body[data-page="ZarAI"] .page-title {
    background: linear-gradient(135deg, #ffffff 30%, #00F0FF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 240, 255, 0.3);
    animation: fadeInUp 0.8s ease-out;
}

body[data-page="ZarAI"] .subtitle {
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

/* Flow Step Enhancements */
.vf-flow-step {
    border-top-width: 4px;
    /* Thicker accent */
}

/* Timeline Pulse */
.vf-node::before {
    animation: pulse-glow 2s infinite;
}

/* Economic Grid Tweaks */
.vf-strategy-card {
    justify-content: space-between;
}

.vf-strategy-card strong {
    display: block;
    margin-top: auto;
    padding-top: 15px;
}