/* --- BRAND COLORS --- */
:root {
    --light-blue: #c7ebfc;
    --dark-blue: #000943;
    --red-accent: #ce181f;
    --black-bg: #000000;
}

/* --- GENERAL STYLING --- */
.elementor-widget-animated-timeline .how-it-works {
    font-family: 'Poppins', sans-serif;
    color: var(--light-blue);
    overflow-x: hidden;
    padding: 100px 20px;
    position: relative;
}

/* --- HOW IT WORKS SECTION --- */
.elementor-widget-animated-timeline .how-it-works-title, 
.elementor-widget-animated-timeline .how-it-works-title::after {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.elementor-widget-animated-timeline .how-it-works.section-visible .how-it-works-title {
    opacity: 1;
    transform: translateY(0);
}

.elementor-widget-animated-timeline .how-it-works.section-visible .how-it-works-title::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    transition-delay: 0.2s;
}

.elementor-widget-animated-timeline .how-it-works-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 80px;
    position: relative;
    color: #fff;
    text-shadow: 0 0 10px rgba(199, 235, 252, 0.5);
}

.elementor-widget-animated-timeline .how-it-works-title::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 4px;
    background-color: var(--red-accent);
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%) translateY(30px);
    border-radius: 2px;
    box-shadow: 0 0 15px var(--red-accent);
}

/* --- TIMELINE CONTAINER --- */
.elementor-widget-animated-timeline .timeline {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
}

/* The background track */
.elementor-widget-animated-timeline .timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: rgba(0, 9, 67, 0.5);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
    border-radius: 3px;
}

/* The progress bar that animates */
.elementor-widget-animated-timeline .timeline-progress {
    content: '';
    position: absolute;
    width: 6px;
    background: linear-gradient(to bottom, var(--light-blue), var(--red-accent));
    box-shadow: 0 0 15px rgba(199, 235, 252, 0.5);
    top: 0;
    left: 50%;
    margin-left: -3px;
    border-radius: 3px;
    z-index: 1;
    height: 0; /* JS will animate this */
    transition: height 0.2s linear; /* Smooths the drawing */
}

/* --- TIMELINE ITEM (CARD) --- */
.elementor-widget-animated-timeline .timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    opacity: 0;
    transform: translateX(-100px) scale(0.9);
    transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 2;
}

.elementor-widget-animated-timeline .timeline-item.right {
    left: 50%;
    transform: translateX(100px) scale(0.9);
}

.elementor-widget-animated-timeline .timeline-item.show {
    opacity: 1;
    transform: translateX(0) scale(1);
}

/* --- CARD CONTENT STYLING --- */
.elementor-widget-animated-timeline .timeline-content {
    padding: 25px 30px;
    background: rgba(0, 9, 67, 0.3);
    position: relative;
    border-radius: 12px;
    border: 2px solid rgba(199, 235, 252, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.elementor-widget-animated-timeline .timeline-content:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 0 25px rgba(199, 235, 252, 0.6);
    border-color: rgba(199, 235, 252, 0.5);
}

.elementor-widget-animated-timeline .timeline-content h3, 
.elementor-widget-animated-timeline .timeline-content p {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.elementor-widget-animated-timeline .timeline-item.show .timeline-content h3 {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
}

.elementor-widget-animated-timeline .timeline-item.show .timeline-content p {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.6s;
}

.elementor-widget-animated-timeline .timeline-content::before {
    content: '';
    position: absolute;
    top: 35px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.elementor-widget-animated-timeline .timeline-item.left .timeline-content::before {
    right: -20px;
    border-left: 10px solid var(--light-blue);
}

.elementor-widget-animated-timeline .timeline-item.right .timeline-content::before {
    left: -20px;
    border-right: 10px solid var(--light-blue);
}

.elementor-widget-animated-timeline .timeline-content:hover::before {
    opacity: 1;
}

/* --- STEP NUMBER CIRCLE --- */
.elementor-widget-animated-timeline .timeline-item .step-number {
    position: absolute;
    width: 50px;
    height: 50px;
    right: -25px;
    top: 32px;
    background-color: var(--red-accent);
    border: 4px solid var(--light-blue);
    border-radius: 50%;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 0 20px var(--red-accent);
    transform: scale(0);
}

@keyframes pulse-pop {
    0% { transform: scale(0); }
    80% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.elementor-widget-animated-timeline .timeline-item.show .step-number {
    animation: pulse-pop 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
    animation-delay: 0.2s;
}

.elementor-widget-animated-timeline .timeline-item.right .step-number {
    left: -25px;
}

/* --- RESPONSIVE DESIGN for tablets and mobile --- */
@media screen and (max-width: 992px) {
    .elementor-widget-animated-timeline .how-it-works-title { font-size: 2.5rem; }
    .elementor-widget-animated-timeline .timeline::after, 
    .elementor-widget-animated-timeline .timeline-progress { left: 31px; }
    .elementor-widget-animated-timeline .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; }
    .elementor-widget-animated-timeline .timeline-item.left, 
    .elementor-widget-animated-timeline .timeline-item.right { left: 0; transform: translateX(-100px) scale(0.9); }
    .elementor-widget-animated-timeline .timeline-item.show { transform: translateX(0) scale(1); }
    .elementor-widget-animated-timeline .timeline-item.left .step-number, 
    .elementor-widget-animated-timeline .timeline-item.right .step-number { left: 6px; }
    .elementor-widget-animated-timeline .timeline-item.left .timeline-content::before, 
    .elementor-widget-animated-timeline .timeline-item.right .timeline-content::before { left: -20px; border-left: none; border-right: 10px solid var(--light-blue); }
}