/* pipeline-section.css */

.ams-pipeline-section {
    position: relative;
    padding: 120px 0;
    background-color: var(--ams-dark-blue, #1357D5);
    background-image: radial-gradient(circle at top right, rgba(240, 39, 74, 0.3), transparent 60%);
    font-family: var(--ams-body-font, sans-serif);
    overflow: hidden;
}

.ams-pipeline-container {
    max-width: var(--ams-container-width, 1320px);
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* Header */
.ams-pipeline-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 80px;
}

.ams-pipeline-header .ams-section-label {
    display: inline-block;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 25px;
    backdrop-filter: blur(4px);
}

.ams-pipeline-header .ams-section-heading {
    font-family: var(--ams-heading-font, sans-serif);
    font-size: 42px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 20px;
}

.ams-pipeline-header .ams-section-description {
    font-size: 18px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

/* Timeline Layout */
.ams-pipeline-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    gap: 30px;
}

/* Connecting Line for Desktop */
.ams-pipeline-timeline::before {
    content: '';
    position: absolute;
    top: 55px; /* Center of the node */
    left: 5%;
    right: 5%;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    z-index: 1;
}

.ams-pipeline-step {
    flex: 1;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Node (Number & Icon) */
.ams-pipeline-step-node {
    position: relative;
    width: 110px;
    height: 110px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
    transition: all 0.3s ease;
    border: 4px solid rgba(255, 255, 255, 0.2);
    background-clip: padding-box;
}

.ams-pipeline-step:hover .ams-pipeline-step-node {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-color: #ffffff;
}

.ams-pipeline-step-number {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--ams-accent-red, #F0274A);
    color: var(--ams-white, #fff);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(240, 39, 74, 0.3);
}

.ams-pipeline-step-icon {
    color: var(--ams-primary-blue, #0E88D3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ams-pipeline-step-icon svg {
    width: 40px;
    height: 40px;
}

.ams-pipeline-step:hover .ams-pipeline-step-icon {
    color: var(--ams-accent-red, #F0274A);
}

/* Content */
.ams-pipeline-step-title {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 15px 0;
}

.ams-pipeline-step-desc {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    padding: 0 10px;
}

/* Responsive */

/* 1024px (Tablet Landscape) -> 2x2 Grid */
@media (max-width: 1024px) {
    .ams-pipeline-timeline::before {
        display: none; /* Remove horizontal line */
    }
    .ams-pipeline-timeline {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 60px 40px;
    }
    .ams-pipeline-step {
        align-items: center;
    }
}

/* 768px (Tablet Portrait / Mobile) -> Vertical Timeline */
@media (max-width: 768px) {
    .ams-pipeline-header {
        margin-bottom: 50px;
    }
    .ams-pipeline-header .ams-section-heading {
        font-size: 32px;
    }
    .ams-pipeline-timeline {
        display: flex;
        flex-direction: column;
        gap: 40px;
        position: relative;
    }
    
    /* Vertical Connecting Line */
    .ams-pipeline-timeline::before {
        display: block;
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: 55px; /* Center of the 110px node */
        width: 2px;
        height: auto;
        background: rgba(255, 255, 255, 0.3);
        z-index: 1;
    }

    .ams-pipeline-step {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        gap: 30px;
    }

    .ams-pipeline-step-node {
        flex-shrink: 0;
        margin-bottom: 0;
    }

    .ams-pipeline-step-content {
        padding-top: 15px;
    }

    .ams-pipeline-step-desc {
        padding: 0;
    }
}

/* 480px (Small Mobile) */
@media (max-width: 480px) {
    .ams-pipeline-timeline::before {
        left: 40px; /* Center of 80px node */
    }
    .ams-pipeline-step-node {
        width: 80px;
        height: 80px;
    }
    .ams-pipeline-step-icon svg {
        width: 30px;
        height: 30px;
    }
    .ams-pipeline-step-title {
        font-size: 18px;
        margin-bottom: 8px;
    }
    .ams-pipeline-step-desc {
        font-size: 14px;
    }
}
