/* ===== SEZIONE PROCESSO - CSS COMPLETO ===== */

/* ===== Variables ===== */
:root {
    --process-primary: #232962;
    --process-secondary: #E85A19;
    --process-bg: #ffffff;
    --process-card-bg: rgba(255, 255, 255, 0.95);
    --process-shadow: 0 10px 30px rgba(35, 41, 98, 0.1);
    --process-shadow-hover: 0 20px 40px rgba(35, 41, 98, 0.15);
    --process-gradient: linear-gradient(135deg, #232962 0%, #E85A19 100%);
    --process-timeline-bg: rgba(35, 41, 98, 0.1);
    --process-timeline-active: var(--process-secondary);
}

/* ===== Main Section ===== */
.process-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #f8f9ff 0%, #fff5f0 100%);
    position: relative;
    overflow: hidden;
}

.process-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="10" cy="10" r="1" fill="%23E85A19" opacity="0.1"/><circle cx="90" cy="20" r="1.5" fill="%23232962" opacity="0.1"/><circle cx="20" cy="80" r="1" fill="%23E85A19" opacity="0.1"/><circle cx="80" cy="90" r="1.5" fill="%23232962" opacity="0.1"/></svg>');
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

/* ===== Timeline Container ===== */
.process-timeline {
    position: relative;
    margin: 80px 0;
    padding: 40px 0;
}

/* ===== Timeline Line ===== */
.timeline-line {
    position: absolute;
    top: 40px;
    left: 5%;
    right: 5%;
    height: 4px;
    background: var(--process-timeline-bg);
    border-radius: 2px;
    transform: translateY(-50%);
    z-index: 1;
}

.timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--process-gradient);
    border-radius: 2px;
    width: 0%;
    transition: width 1.5s ease;
    box-shadow: 0 0 10px rgba(232, 90, 25, 0.3);
}

/* ===== Process Steps ===== */
.process-steps {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    position: relative;
    z-index: 2;
}

/* ===== Individual Step ===== */
.process-step {
    position: relative;
    opacity: 0.6;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.process-step.active {
    opacity: 1;
    transform: translateY(0);
}

.process-step.completed {
    opacity: 0.8;
}

/* ===== Step Marker ===== */
.step-marker {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s ease;
}

.step-number {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--process-card-bg);
    border: 3px solid var(--process-timeline-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--process-primary);
    transition: all 0.4s ease;
    box-shadow: var(--process-shadow);
}

.step-icon {
    position: absolute;
    width: 80px;
    height: 80px;
    background: var(--process-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.4s ease;
    box-shadow: var(--process-shadow-hover);
}

.step-icon i {
    font-size: 1.5rem;
    color: white;
}

/* Active/Hover States */
.process-step.active .step-number,
.process-step:hover .step-number {
    border-color: var(--process-secondary);
    transform: scale(0.9);
}

.process-step.active .step-icon,
.process-step:hover .step-icon {
    opacity: 1;
    transform: scale(1);
}

.process-step.completed .step-number {
    background: var(--process-secondary);
    border-color: var(--process-secondary);
    color: white;
}

/* ===== Step Content ===== */
.step-content {
    text-align: center;
    padding: 0 10px;
}

.step-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--process-primary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.step-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
    margin-bottom: 16px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease 0.2s;
}

.process-step.active .step-description {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Step Tags ===== */
.step-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 12px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease 0.3s;
}

.process-step.active .step-tags {
    opacity: 1;
    transform: translateY(0);
}

.tag {
    font-size: 0.75rem;
    padding: 4px 8px;
    background: rgba(232, 90, 25, 0.1);
    color: var(--process-secondary);
    border-radius: 12px;
    font-weight: 500;
}

/* ===== Step Duration ===== */
.step-duration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--process-secondary);
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease 0.4s;
}

.process-step.active .step-duration {
    opacity: 1;
    transform: translateY(0);
}

.step-duration i {
    font-size: 0.7rem;
}

/* ===== Process Summary ===== */
.process-summary {
    margin-top: 80px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.summary-card {
    background: var(--process-card-bg);
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--process-shadow);
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--process-shadow-hover);
}

.summary-icon {
    width: 60px;
    height: 60px;
    background: var(--process-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: all 0.4s ease;
}

.summary-card:hover .summary-icon {
    transform: scale(1.1);
}

.summary-icon i {
    font-size: 1.5rem;
    color: white;
}

.summary-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--process-primary);
    margin-bottom: 10px;
}

.summary-content p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
}

/* ===== Responsive Design ===== */

/* Large Desktop */
@media screen and (min-width: 1200px) {
    .process-section {
        padding: 140px 0;
    }
    
    .step-marker {
        width: 90px;
        height: 90px;
    }
    
    .step-number {
        width: 70px;
        height: 70px;
        font-size: 1.4rem;
    }
    
    .step-icon {
        width: 90px;
        height: 90px;
    }
    
    .step-icon i {
        font-size: 1.7rem;
    }
}

/* ===== FIX LAYOUT MOBILE PROCESS - Sostituisci la sezione mobile in process.css ===== */

/* Tablet e Mobile - Layout corretto con marker accanto ai widget */
@media screen and (max-width: 768px) {
    .process-section {
        padding: 80px 0;
    }
    
    .process-timeline {
        margin: 60px 0;
        padding: 30px 0;
    }
    
    /* RIMUOVI timeline line su mobile - non serve più */
    .timeline-line {
        display: none;
    }
    
    .timeline-progress {
        display: none;
    }
    
    /* Layout mobile: ogni step è una riga con marker a sinistra e contenuto a destra */
    .process-steps {
        grid-template-columns: 1fr;
        gap: 30px;
        max-width: 500px;
        margin: 0 auto;
    }
    
    /* Ogni step diventa una card orizzontale */
    .process-step {
        display: flex;
        align-items: flex-start;
        gap: 20px;
        background: var(--process-card-bg);
        padding: 20px;
        border-radius: 16px;
        box-shadow: var(--process-shadow);
        backdrop-filter: blur(10px);
        opacity: 1;
        transform: none;
        transition: all 0.3s ease;
    }
    
    .process-step:hover {
        transform: translateY(-2px);
        box-shadow: var(--process-shadow-hover);
    }
    
    /* Marker a sinistra della card */
    .step-marker {
        margin: 0;
        width: 70px;
        height: 70px;
        flex-shrink: 0;
        align-self: flex-start;
    }
    
    .step-number {
        width: 60px;
        height: 60px;
        font-size: 1.1rem;
    }
    
    .step-icon {
        width: 70px;
        height: 70px;
    }
    
    .step-icon i {
        font-size: 1.3rem;
    }
    
    /* Contenuto a destra del marker */
    .step-content {
        flex: 1;
        text-align: left;
        padding: 0;
        margin-top: 5px;
    }
    
    .step-title {
        font-size: 1.2rem;
        margin-bottom: 10px;
        color: var(--process-primary);
    }
    
    /* MOBILE: Mostra sempre tutti i contenuti, gestisci visibilità con JavaScript */
    .step-description {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 12px;
        color: #666;
        /* RIMUOVI le animazioni opacity, gestite da JS */
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .step-tags {
        margin-bottom: 8px;
        justify-content: flex-start;
        /* RIMUOVI le animazioni opacity, gestite da JS */
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .step-duration {
        justify-content: flex-start;
        /* RIMUOVI le animazioni opacity, gestite da JS */
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    /* Step attivo ha bordo colorato */
    .process-step.active {
        border: 2px solid var(--process-secondary);
        box-shadow: 0 8px 25px rgba(232, 90, 25, 0.15);
    }
    
    /* Step inattivo su mobile: contenuto nascosto ma layout mantenuto */
    .process-step:not(.active) {
        opacity: 0.7;
    }
    
    .process-step:not(.active) .step-description {
        display: none;
    }
    
    .process-step:not(.active) .step-tags {
        display: none;
    }
    
    .process-step:not(.active) .step-duration {
        display: none;
    }
    
    /* Step attivo mostra tutto */
    .process-step.active .step-description {
        display: block;
    }
    
    .process-step.active .step-tags {
        display: flex;
    }
    
    .process-step.active .step-duration {
        display: flex;
    }
    
    /* Summary Grid su mobile */
    .summary-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .nav-pills {
        padding: 6px;
        flex-wrap: wrap;
    }
    
    .nav-pill {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

/* Mobile piccolo - layout ancora più compatto */
@media screen and (max-width: 480px) {
    .process-section {
        padding: 60px 0;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    .process-timeline {
        margin: 40px 0;
        padding: 20px 0;
    }
    
    .process-steps {
        gap: 25px;
        max-width: 100%;
        padding: 0 10px;
    }
    
    .process-step {
        padding: 15px;
        gap: 15px;
    }
    
    .step-marker {
        width: 60px;
        height: 60px;
    }
    
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    .step-icon {
        width: 60px;
        height: 60px;
    }
    
    .step-icon i {
        font-size: 1.2rem;
    }
    
    .step-title {
        font-size: 1.1rem;
    }
    
    .step-description {
        font-size: 0.85rem;
    }
    
    .tag {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    .step-duration {
        font-size: 0.75rem;
    }
    
    /* Summary cards più compatte */
    .summary-card {
        padding: 20px;
    }
    
    .summary-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }
    
    .summary-icon i {
        font-size: 1.2rem;
    }
    
    .nav-pill {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .process-navigation {
        margin-top: 40px;
    }
}

/* Mobile extra piccolo */
@media screen and (max-width: 360px) {
    .process-steps {
        padding: 0 5px;
    }
    
    .process-step {
        padding: 12px;
        gap: 12px;
    }
    
    .step-marker {
        width: 50px;
        height: 50px;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .step-icon {
        width: 50px;
        height: 50px;
    }
    
    .step-icon i {
        font-size: 1rem;
    }
    
    .step-title {
        font-size: 1rem;
    }
    
    .step-description {
        font-size: 0.8rem;
    }
}

/* Mobile */
@media screen and (max-width: 480px) {
    .process-section {
        padding: 60px 0;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    .process-timeline {
        margin: 40px 0;
        padding: 20px 0;
    }
    
    .process-steps {
        gap: 30px;
    }
    
    .step-marker {
        width: 60px;
        height: 60px;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .step-icon {
        width: 60px;
        height: 60px;
    }
    
    .step-icon i {
        font-size: 1.1rem;
    }
    
    .step-title {
        font-size: 0.95rem;
    }
    
    .step-description {
        font-size: 0.8rem;
    }
    
    .step-content {
        padding: 15px;
    }
    
    .tag {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    .summary-card {
        padding: 20px;
    }
    
    .summary-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }
    
    .summary-icon i {
        font-size: 1.2rem;
    }
    
    .timeline-line {
        height: 2px;
        top: 30px;
    }
}

/* Desktop: Timeline sopra i pallini */
@media screen and (min-width: 769px) {
    .timeline-line {
        top: 20px;
        z-index: 3;
    }
    
    .process-steps {
        z-index: 2;
    }
    
    .step-marker {
        z-index: 1;
    }
}

/* ===== Animations ===== */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Progress Animation */
.timeline-progress.animated {
    animation: progressFill 2s ease-out forwards;
}

@keyframes progressFill {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

/* Mobile Progress Animation */
@media screen and (max-width: 768px) {
    .timeline-progress.animated {
        animation: progressFillVertical 2s ease-out forwards;
    }
    
    @keyframes progressFillVertical {
        from {
            height: 0%;
        }
        to {
            height: 100%;
        }
    }
}

/* Intersection Observer Animations */
.process-step.animate-in {
    animation: slideInProcess 0.6s ease forwards;
}

@keyframes slideInProcess {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .process-step,
    .step-description,
    .step-tags,
    .step-duration,
    .timeline-progress {
        transition: none;
        animation: none;
    }
    
    .timeline-progress {
        width: 100%;
    }
    
    @media screen and (max-width: 768px) {
        .timeline-progress {
            height: 100%;
        }
    }
}