/* 
 * Company Roadmap Timeline
 * Elegant timeline/roadmap for company history with dates and milestones
 */

.company-roadmap-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2c3e50 100%);
    padding: 80px 20px 140px 20px; /* Extra bottom padding for dots */
    position: relative;
    overflow: hidden; /* Contain all elements - prevents showing outside */
    min-height: auto;
    height: auto;
    isolation: isolate; /* Create stacking context */
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
}

/* REMOVED - causing shadow */
/* .company-roadmap-section::before removed */

.roadmap-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    height: auto;
    overflow: visible;
    padding-bottom: 120px; /* Space for dots below */
}

/* Enable horizontal scroll for many items - FIXED */
.roadmap-container-scroll {
    overflow-x: auto;
    overflow-y: visible !important;
    padding-top: 350px;    /* Space for cards above road */
    padding-bottom: 420px;  /* Extra space for dots at bottom */
    margin-top: 20px;
    margin-bottom: 40px;
    position: relative;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* Smooth scroll on iOS */
    height: auto !important;
    max-height: none !important;
    /* Ensure scrolling works */
    width: 100%;
    max-width: 100%;
}

/* REMOVED - causing shadow artifacts */
/* No more ::after shadow */

/* HIDE scrollbar - use dots navigation instead */
.roadmap-container-scroll::-webkit-scrollbar {
    height: 0;
    width: 0;
    display: none;
}

.roadmap-container-scroll {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

/* Scroll Navigation Dots - ABSOLUTE WITHIN ROADMAP ONLY */
.roadmap-scroll-nav {
    position: absolute;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
    z-index: 30;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(249, 250, 251, 0.98));
    padding: 18px 30px;
    border-radius: 35px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 0 0 1px rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    animation: slideUpFadeIn 0.6s ease-out;
}

@keyframes slideUpFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.roadmap-scroll-nav .dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(44, 62, 80, 0.25);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 3px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.roadmap-scroll-nav .dot:hover {
    background: rgba(235, 90, 62, 0.7);
    transform: scale(1.3);
    box-shadow: 
        0 4px 16px rgba(235, 90, 62, 0.3),
        0 0 20px rgba(235, 90, 62, 0.2);
    border-color: rgba(235, 90, 62, 0.3);
}

.roadmap-scroll-nav .dot.active {
    background: linear-gradient(135deg, #EB5A3E 0%, #ff7a5a 100%);
    width: 42px;
    border-radius: 8px;
    border-color: rgba(235, 90, 62, 0.3);
    box-shadow: 
        0 4px 20px rgba(235, 90, 62, 0.4),
        0 0 30px rgba(235, 90, 62, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% {
        box-shadow: 
            0 4px 20px rgba(235, 90, 62, 0.4),
            0 0 30px rgba(235, 90, 62, 0.3);
    }
    50% {
        box-shadow: 
            0 6px 28px rgba(235, 90, 62, 0.6),
            0 0 40px rgba(235, 90, 62, 0.5);
    }
}

.roadmap-scroll-nav .dot::after {
    content: attr(data-year);
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    font-weight: 700;
    color: #2c3e50;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    background: white;
    padding: 6px 12px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

.roadmap-scroll-nav .dot:hover::after,
.roadmap-scroll-nav .dot.active::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

/* Arrow Navigation Buttons - HIDDEN (user requested removal) */
.roadmap-nav-arrows {
    display: none !important;
}

.roadmap-arrow {
    display: none !important;
}

/* Keyboard hint - UPDATED TEXT */
.roadmap-keyboard-hint {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.08));
    padding: 10px 18px;
    border-radius: 20px;
    opacity: 0.8;
    transition: all 0.3s ease;
    z-index: 20;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    animation: fadeInDown 0.6s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 0.8;
        transform: translateY(0);
    }
}

.roadmap-keyboard-hint:hover {
    opacity: 1;
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.12));
    box-shadow: 
        0 6px 20px rgba(235, 90, 62, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.roadmap-header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    z-index: 2;
}

.roadmap-header h2 {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.roadmap-header p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto;
}

/* Scroll hint text */
.scroll-hint {
    text-align: center;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    animation: bounceHorizontal 2s ease-in-out infinite;
}

.scroll-hint.hidden {
    display: none;
}

@keyframes bounceHorizontal {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(10px);
    }
}

/* Main Road/Timeline - FIXED */
.roadmap-road {
    position: relative;
    padding: 0;
    min-width: 100%;
    height: auto;
    overflow: visible;
    width: 100%; /* Ensure full width */
}

/* Dynamic width based on number of items */
.roadmap-road.items-1,
.roadmap-road.items-2,
.roadmap-road.items-3 {
    min-width: 100%;
}

.roadmap-road.items-4 {
    min-width: 1200px;
}

.roadmap-road.items-5,
.roadmap-road.items-6 {
    min-width: 1500px;
}

.roadmap-road.items-7,
.roadmap-road.items-8 {
    min-width: 1800px;
}

.roadmap-road.items-9,
.roadmap-road.items-10 {
    min-width: 2100px;
}

.road-line {
    position: relative;
    height: 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Dashed line in the middle of the road */
.road-line::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background-image: repeating-linear-gradient(
        to right,
        #ffffff 0px,
        #ffffff 20px,
        transparent 20px,
        transparent 40px
    );
    transform: translateY(-50%);
}

/* Timeline Items */
.roadmap-timeline {
    position: relative;
    height: auto;
    min-height: 100px;
}

.timeline-item {
    position: absolute;
    width: 280px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Alternating top/bottom positioning */
.timeline-item:nth-child(odd) {
    top: -280px;
}

.timeline-item:nth-child(even) {
    bottom: -280px;
}

/* Connecting Line - SIMPLIFIED */
.timeline-connector {
    position: absolute;
    width: 2px;
    background: linear-gradient(to bottom, var(--milestone-color), transparent);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.timeline-item:nth-child(odd) .timeline-connector {
    bottom: -60px;
    height: 60px;
}

.timeline-item:nth-child(even) .timeline-connector {
    top: -60px;
    height: 60px;
    background: linear-gradient(to top, var(--milestone-color), transparent);
}

/* Fade connectors when scrolling */
.roadmap-timeline.scrolling .timeline-connector {
    opacity: 0.2;
}

/* Milestone Point on Road - SIMPLIFIED (no shadow when scrolling) */
.milestone-point {
    position: absolute;
    bottom: -66px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 18px;
    background: var(--milestone-color);
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 
        0 0 0 2px var(--milestone-color-light),
        0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 3;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.timeline-item:nth-child(even) .milestone-point {
    bottom: auto;
    top: -66px;
}

.milestone-point:hover {
    transform: translateX(-50%) scale(1.2);
    opacity: 1;
    box-shadow: 
        0 0 0 4px var(--milestone-color-light),
        0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Hide milestone points on scroll (prevent floating shadows) */
.roadmap-timeline.scrolling .milestone-point {
    opacity: 0.3;
    box-shadow: 0 0 0 2px var(--milestone-color-light);
}

/* Milestone Card - DARK THEME */
.milestone-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    position: relative;
    transition: all 0.3s ease;
    border-top: 4px solid var(--milestone-color);
    backdrop-filter: blur(10px);
}

.milestone-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.6),
        0 0 30px var(--milestone-color),
        0 0 0 1px var(--milestone-color);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.08) 100%);
}

/* Phase Badge */
.phase-badge {
    position: absolute;
    top: -15px;
    right: 20px;
    width: 70px;
    height: 70px;
    background: var(--milestone-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 4px solid #fff;
    z-index: 2;
}

.phase-badge span {
    text-align: center;
    line-height: 1.2;
}

/* Date */
.milestone-date {
    font-size: 24px;
    font-weight: 800;
    color: var(--milestone-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.milestone-date::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--milestone-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--milestone-color);
}

/* Title */
.milestone-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.3;
}

/* Description */
.milestone-description {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin: 0;
}

/* Color Variations for Different Milestones */
.timeline-item:nth-child(5n+1) {
    --milestone-color: #FF6B6B;
    --milestone-color-light: rgba(255, 107, 107, 0.2);
}

.timeline-item:nth-child(5n+2) {
    --milestone-color: #4ECDC4;
    --milestone-color-light: rgba(78, 205, 196, 0.2);
}

.timeline-item:nth-child(5n+3) {
    --milestone-color: #FFD93D;
    --milestone-color-light: rgba(255, 217, 61, 0.2);
}

.timeline-item:nth-child(5n+4) {
    --milestone-color: #6BCF7F;
    --milestone-color-light: rgba(107, 207, 127, 0.2);
}

.timeline-item:nth-child(5n+5) {
    --milestone-color: #5B9BD5;
    --milestone-color-light: rgba(91, 155, 213, 0.2);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .timeline-item {
        width: 240px;
    }
    
    .timeline-item:nth-child(odd) {
        top: -300px;
    }
    
    .timeline-item:nth-child(even) {
        bottom: -300px;
    }
}

@media (max-width: 768px) {
    .company-roadmap-section {
        padding: 60px 15px;
    }
    
    .roadmap-header {
        margin-bottom: 60px;
    }
    
    .roadmap-road {
        padding: 0;
    }
    
    /* Disable horizontal scroll on mobile - use vertical layout */
    .roadmap-container-scroll {
        overflow-x: visible;
        overflow-y: visible;
        padding-top: 0;
        padding-bottom: 0;
        padding-left: 40px;
    }
    
    .roadmap-container-scroll::after {
        display: none;
    }
    
    .scroll-hint {
        display: none !important;
    }
    
    /* Hide navigation on mobile */
    .roadmap-scroll-nav,
    .roadmap-nav-arrows,
    .roadmap-keyboard-hint {
        display: none !important;
    }
    
    /* Also hide scroll hint */
    .scroll-hint {
        display: none !important;
    }
    
    /* Force full width on mobile */
    .roadmap-road.items-1,
    .roadmap-road.items-2,
    .roadmap-road.items-3,
    .roadmap-road.items-4,
    .roadmap-road.items-5,
    .roadmap-road.items-6,
    .roadmap-road.items-7,
    .roadmap-road.items-8,
    .roadmap-road.items-9,
    .roadmap-road.items-10 {
        min-width: auto;
    }
    
    /* Stack timeline vertically on mobile */
    .road-line {
        height: 6px;
        width: 6px;
        height: auto;
        background: none;
        box-shadow: none;
    }
    
    .road-line::before {
        display: none;
    }
    
    /* Vertical timeline for mobile */
    .roadmap-timeline {
        display: flex;
        flex-direction: column;
        gap: 40px;
        padding-left: 40px;
        position: relative;
    }
    
    .roadmap-timeline::before {
        content: '';
        position: absolute;
        left: 15px;
        top: 0;
        bottom: 0;
        width: 4px;
        background: #2c3e50;
        border-radius: 2px;
    }
    
    .timeline-item {
        position: static !important;
        width: 100%;
        max-width: 100%;
    }
    
    .timeline-connector {
        display: none;
    }
    
    .milestone-point {
        left: -25px;
        bottom: auto;
        top: 25px;
        transform: none;
    }
    
    .timeline-item:nth-child(even) .milestone-point {
        top: 25px;
    }
    
    .milestone-point:hover {
        transform: scale(1.2);
    }
    
    .phase-badge {
        width: 60px;
        height: 60px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .milestone-card {
        padding: 20px;
    }
    
    .milestone-date {
        font-size: 20px;
    }
    
    .milestone-title {
        font-size: 18px;
    }
    
    .milestone-description {
        font-size: 14px;
    }
    
    .phase-badge {
        width: 50px;
        height: 50px;
        font-size: 11px;
        top: -10px;
        right: 15px;
    }
}

/* Animation Delays */
.timeline-item:nth-child(1) { transition-delay: 0.1s; }
.timeline-item:nth-child(2) { transition-delay: 0.2s; }
.timeline-item:nth-child(3) { transition-delay: 0.3s; }
.timeline-item:nth-child(4) { transition-delay: 0.4s; }
.timeline-item:nth-child(5) { transition-delay: 0.5s; }
.timeline-item:nth-child(6) { transition-delay: 0.6s; }
.timeline-item:nth-child(7) { transition-delay: 0.7s; }
.timeline-item:nth-child(8) { transition-delay: 0.8s; }

/* Elementor specific styles */
.bosa-roadmap-elementor .company-roadmap-section {
    padding: 60px 20px;
    overflow: visible !important;
    height: auto !important;
}

.bosa-roadmap-elementor .roadmap-container-scroll {
    padding-top: 350px;
    padding-bottom: 350px;
    overflow-y: visible !important;
    height: auto !important;
    max-height: none !important;
}

/* Force no vertical scrollbar - only horizontal */
.company-roadmap-section,
.roadmap-container,
.roadmap-container-scroll,
.roadmap-road {
    overflow-y: visible !important;
}

/* Ensure section expands to fit content */
.company-roadmap-section {
    min-height: 900px; /* Enough for cards above and below */
}

/* Disable animations if requested */
.bosa-roadmap-elementor.no-animations .timeline-item {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: none !important;
}

.bosa-roadmap-elementor.no-animations .timeline-item.visible {
    animation: none !important;
}

/* Hide phase badges if requested */
.bosa-roadmap-elementor.no-phases .phase-badge {
    display: none !important;
}

/* Pulse animation for current milestone */
@keyframes pulse {
    0%, 100% {
        box-shadow: 
            0 0 0 4px var(--milestone-color-light),
            0 4px 15px rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 
            0 0 0 8px var(--milestone-color-light),
            0 4px 20px rgba(0, 0, 0, 0.3);
    }
}

.timeline-item.current .milestone-point {
    animation: pulse 2s ease-in-out infinite;
}

/* Icon support */
.milestone-icon {
    width: 40px;
    height: 40px;
    background: var(--milestone-color-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: var(--milestone-color);
    font-size: 20px;
}

