/* ========================================
   ROADMAP MODULE - TIMELINE ORIZZONTALE ENTERPRISE
   ======================================== */

/* Container principale */
.roadmap-section {
    padding: 60px 0;
    width: 100%;
    margin: 0;
    min-height: 800px;
}

.roadmap-section .section-header {
    text-align: center;
    margin-bottom: 40px;
}

.roadmap-section .section-title {
    font-size: var(--font-size-4xl); /* 2.25rem - stesso di h2 */
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 15px;
    letter-spacing: -0.025em;
}

/* Sottotitolo roadmap ora usa formattazione standard del sito */

/* Container per il contenuto centrato */
.roadmap-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Container roadmap - REMOVED (using section background directly) */

/* TIMELINE CARDS AREA */
.timeline-area {
    margin-bottom: 40px;
    max-width: 100%;
    position: relative;
}

/* Indicatori visivi per scroll orizzontale */
.timeline-area::before,
.timeline-area::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 40px;
    background: linear-gradient(90deg, rgba(255,255,255,0.8) 0%, transparent 100%);
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.timeline-area::before {
    left: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0.8) 0%, transparent 100%);
}

.timeline-area::after {
    right: 0;
    background: linear-gradient(-90deg, rgba(255,255,255,0.8) 0%, transparent 100%);
}

/* Mostra indicatori solo su mobile */
@media (max-width: 768px) {
    .timeline-area::before,
    .timeline-area::after {
        opacity: 1;
    }
}

.timeline-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-blue) rgba(255,255,255,0.3);
    cursor: grab;
    height: 100%;
    
    /* Scroll Snap per centrare automaticamente le card */
    scroll-snap-type: x mandatory;
    scroll-padding: 20px;
}

.timeline-wrapper:active {
    cursor: grabbing;
}

.timeline-wrapper::-webkit-scrollbar {
    height: 8px;
}

.timeline-wrapper::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
}

.timeline-wrapper::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 10px;
}

.timeline-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--egonex-orange);
}

.timeline {
    display: flex;
    gap: 20px;
    padding: 20px;
    min-width: fit-content;
    height: 100%;
    align-items: center;
}

.timeline-card {
    min-width: 280px;
    height: 160px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(6, 95, 70, 0.2);
    border-radius: 12px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    flex-shrink: 0;
    user-select: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    
    /* Scroll Snap per centrare le card */
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

.timeline-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
    border-color: var(--egonex-orange);
    background: rgba(255, 255, 255, 0.8);
}

.timeline-card.active {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(255, 165, 0, 0.2); /* Cambiato da verde ad arancione, stessa opacità */
    border-color: var(--egonex-orange); /* Mantiene bordo arancione quando attivo */
    background: rgba(255, 255, 255, 0.9);
    border-width: 3px;
}

.year-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-blue);
    color: white;
    width: 60px;
    height: 32px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.timeline-card:hover .year-badge {
    background: var(--egonex-orange);
}

.timeline-card.active .year-badge {
    background: var(--egonex-orange); /* Mantiene arancione quando attivo */
}

.milestone-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 8px;
    line-height: 1.2;
}

.milestone-description {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.4;
    font-weight: 400;
}

/* DETAILS AREA */
.details-area {
    max-width: 100%;
    padding: 0;
    overflow-y: visible;
}

.details-header {
    display: flex;
    align-items: center; /* Allineamento verticale perfetto */
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(6, 95, 70, 0.1);
}

.details-year {
    background: var(--primary-blue); /* Cambiato da arancione a blu */
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 600;
    margin-right: 15px;
}

.details-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-blue); /* Cambiato da arancione a blu */
    flex: 1;
    line-height: 32px; /* Stessa altezza del badge (16px + 8px padding top + 8px padding bottom) */
    margin: 0; /* Rimuove margini extra */
}

.details-content {
    line-height: 1.7;
}

.details-description {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 25px;
}

.details-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.feature-item {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 20px;
}

.feature-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

.feature-description {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
}


/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
    .roadmap-section {
        padding: 50px 15px;
        min-height: 700px;
    }
    
    .roadmap-container {
        padding: 25px;
        height: 550px;
    }
    
    .timeline-area {
        flex: 0 0 180px;
        margin-bottom: 25px;
    }
    
    .timeline-card {
        min-width: 260px;
        height: 150px;
        padding: 22px;
    }
    
    .milestone-title {
        font-size: 18px;
    }
    
    .details-features {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 18px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .roadmap-section {
        padding: 40px 15px;
        min-height: 700px;
    }

    .roadmap-section .section-title {
        font-size: var(--font-size-3xl); /* 1.875rem - proporzionale per mobile */
    }

    /* Sottotitolo roadmap mobile ora usa formattazione standard */

    .roadmap-container {
        padding: 20px;
        height: 550px;
    }

    .timeline-area {
        flex: 0 0 180px;
        margin-bottom: 20px;
    }

    .timeline {
        gap: 15px;
        padding: 15px;
    }

    .timeline-card {
        min-width: 240px;
        height: 140px;
        padding: 20px;
    }

    .year-badge {
        width: 50px;
        height: 28px;
        font-size: 16px;
        margin-bottom: 12px;
    }

    .milestone-title {
        font-size: 18px;
        margin-bottom: 6px;
    }

    .milestone-description {
        font-size: 13px;
    }

    .details-area {
        padding: 20px;
        max-height: 300px; /* Altezza limitata per mobile */
        overflow-y: auto; /* Scroll verticale interno */
        overflow-x: hidden;
        scrollbar-width: thin;
        scrollbar-color: var(--primary-blue) rgba(255,255,255,0.3);
    }

    .details-area::-webkit-scrollbar {
        width: 6px;
    }

    .details-area::-webkit-scrollbar-track {
        background: rgba(255,255,255,0.3);
        border-radius: 10px;
    }

    .details-area::-webkit-scrollbar-thumb {
        background: var(--primary-blue);
        border-radius: 10px;
    }

    .details-area::-webkit-scrollbar-thumb:hover {
        background: var(--egonex-orange);
    }

    .details-title {
        font-size: 20px;
    }

    .details-description {
        font-size: 15px;
    }

    .details-features {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .timeline-card {
        min-width: 220px;
        height: 130px;
        padding: 18px;
    }

    .milestone-title {
        font-size: 16px;
    }

    .milestone-description {
        font-size: 12px;
    }

    .details-area {
        padding: 18px;
        max-height: 280px; /* Altezza leggermente ridotta per mobile small */
        overflow-y: auto; /* Scroll verticale interno */
        overflow-x: hidden;
    }

    .details-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* ========================================
   ACCESSIBILITÀ E UTILITY
   ======================================== */

/* Focus states per accessibilità */
.timeline-card:focus {
    outline: 2px solid var(--egonex-orange);
    outline-offset: 2px;
}

.timeline-card:focus-visible {
    outline: 2px solid var(--egonex-orange);
    outline-offset: 2px;
}

/* Mostrare timeline orizzontale */
.timeline {
    display: flex;
}

/* Utility classes - cleaned */

/* Loading animation */
.loading-shimmer {
    background: linear-gradient(90deg, rgba(255,255,255,0.0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0.0) 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}