/* ===================================
   SCROLL TIMELINE WIDGET STYLES
   =================================== */

.scroll-timeline-wrapper {
    position: relative;
    padding: 80px 0;
    overflow: visible;
}

.timeline-container {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===================================
   TIMELINE LINE
   =================================== */

.timeline-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    transition: all 0.3s ease;
}

[data-alignment="left"] .timeline-line {
    left: 32px;
    transform: translateX(-50%);
}

.timeline-progress {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    transition: height 0.3s ease-out;
    height: 0;
}

[data-alignment="left"] .timeline-progress {
    left: 32px;
    transform: translateX(-50%);
}

/* ===================================
   TIMELINE ITEMS
   =================================== */

.timeline-items {
    position: relative;
    z-index: 3;
}

.timeline-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 120px;
}

/* ===================================
   TIMELINE CONTENT CARDS
   =================================== */

.timeline-content {
    position: relative;
    width: 45%;
    max-width: 550px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-style: solid;
    box-sizing: border-box;
}

/* Center Alignment - Alternating */
[data-alignment="center"] .timeline-item {
    flex-direction: row;
}

[data-alignment="center"] .timeline-content.align-left {
    order: 1;
    text-align: left;
    margin-right: 0;
}

[data-alignment="center"] .timeline-content.align-right {
    order: 3;
    text-align: right;
    margin-left: 0;
}

[data-alignment="center"] .timeline-item .timeline-dot-wrapper {
    order: 2;
}

/* Spacer for opposite side */
[data-alignment="center"] .timeline-item::before {
    content: '';
    width: 45%;
    max-width: 550px;
}

[data-alignment="center"] .timeline-item:nth-child(odd)::before {
    order: 3;
}

[data-alignment="center"] .timeline-item:nth-child(even)::before {
    order: 1;
}

/* Left Alignment - All items on right */
[data-alignment="left"] .timeline-item {
    flex-direction: row;
    justify-content: flex-start;
}

[data-alignment="left"] .timeline-content {
    width: calc(100% - 80px);
    max-width: 100%;
    margin-left: 48px;
    text-align: left;
    order: 2;
}

/* Active State */
.timeline-content.active {
    transform: scale(1) !important;
    opacity: 1 !important;
}

/* ===================================
   YEAR BADGE
   =================================== */

.timeline-year {
    display: inline-block;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

/* ===================================
   TITLE
   =================================== */

.timeline-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

/* ===================================
   DESCRIPTION
   =================================== */

.timeline-description {
    margin: 0;
    font-size: 14px;
}

/* ===================================
   TIMELINE DOTS
   =================================== */

.timeline-dot-wrapper {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    order: 2;
}

[data-alignment="left"] .timeline-dot-wrapper {
    left: 32px;
    transform: translateX(-50%);
    order: 1;
}

.timeline-dot {
    position: relative;
    border-radius: 50%;
    border-style: solid;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    /* No transform here - let active state handle it */
}

.timeline-dot.active {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    /* Scale is applied via Elementor control */
}

/* ===================================
   PULSE EFFECT
   =================================== */

.timeline-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}

/* Brief tooltip-style pulse on activation - single burst */
.timeline-dot.active ~ .timeline-pulse {
    animation: tooltipPulse 0.8s ease-out;
}

@keyframes tooltipPulse {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    30% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.3);
    }
    70% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(1.8);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(2.2);
    }
}

/* ===================================
   RESPONSIVE: TABLET
   =================================== */

@media (max-width: 768px) {
    .scroll-timeline-wrapper {
        padding: 60px 0;
    }

    .timeline-container {
        padding: 0 15px;
    }
    
    /* Force left alignment on tablet */
    .timeline-item {
        flex-direction: row !important;
        justify-content: flex-start !important;
    }

    .timeline-content {
        width: calc(100% - 80px) !important;
        max-width: 100% !important;
        margin-left: 48px !important;
        margin-right: 0 !important;
        text-align: left !important;
        order: 2 !important;
    }
    
    .timeline-line,
    .timeline-progress {
        left: 32px !important;
        transform: translateX(-50%) !important;
    }
    
    .timeline-dot-wrapper {
        left: 32px !important;
        transform: translateX(-50%) !important;
        order: 1 !important;
    }

    /* Remove spacer */
    .timeline-item::before {
        display: none !important;
    }
}

/* ===================================
   RESPONSIVE: MOBILE
   =================================== */

@media (max-width: 480px) {
    .scroll-timeline-wrapper {
        padding: 40px 0;
    }
    
    .timeline-container {
        padding: 0 10px;
    }

    .timeline-content {
        padding: 20px !important;
        margin-left: 40px !important;
        width: calc(100% - 60px) !important;
    }
    
    .timeline-line,
    .timeline-progress {
        left: 20px !important;
        transform: translateX(-50%) !important;
    }
    
    .timeline-dot-wrapper {
        left: 10px !important;
        transform: translateX(-50%) !important;
    }
    
    .timeline-dot {
        width: 16px !important;
        height: 16px !important;
        border-width: 3px !important;
    }
    
    .timeline-title {
        font-size: 18px !important;
    }
    
    .timeline-description {
        font-size: 13px !important;
    }

    .timeline-year {
        font-size: 10px !important;
        padding: 3px 12px !important;
    }

    .timeline-pulse {
        width: 30px !important;
        height: 30px !important;
    }
}

/* ===================================
   ELEMENTOR EDITOR PREVIEW
   =================================== */

.elementor-editor-active .timeline-content {
    opacity: 1 !important;
    transform: scale(1) !important;
}

.elementor-editor-active .timeline-dot {
    opacity: 1 !important;
}

/* Ensure full width in editor */
.elementor-editor-active .timeline-container {
    max-width: 100%;
}

