/* =========================================================
   QS JOURNEY – FULL UPDATED CSS (SAFE & PIXEL PERFECT)
   ========================================================= */

/* ================= CENTER LINE ================= */

.qs-center-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    transform: translateY(-50%);
    pointer-events: none;
}

.qs-center-line line {
    stroke: #25728d;
    stroke-width: 1;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLine 1.2s ease forwards;
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

/* ================= TRACK ================= */

.qs-journey-track {
    display: flex;
    justify-content: space-between;
    position: relative;
    max-width: 1400px;
    margin: auto;
    padding-left: 80px;
}

/* ================= ITEM ================= */

.qs-journey-item {
    width: 220px;
    position: relative;
    text-align: center;
}

.qs-journey-item.top {
    padding-bottom: 140px;
}

.qs-journey-item.top .qs-content{
    display: flex;
    flex-direction: column;
}

.qs-journey-item.top .qs-content .qs-year{
    order: 1;
}

.qs-journey-item.bottom {
    padding-top: 140px;
    position: relative;
}

/* ================= ICON ================= */

.qs-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 1px solid #25728d;
    background: #fff;
    margin: auto 0 auto auto;
    margin-right: -25px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transform: scale(0);
    transition: transform .35s ease;
    z-index: 5;
}

.qs-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ================= CONNECTOR (UPDATED ANIMATION ONLY) ================= */

.qs-connector {
    position: absolute;
    width: 1px;
    height: 0; /* hidden initially */
    left: 90%;
    transform: translateX(-50%);
    background: #25728d;
    transition: height 0.6s ease;
}

/* TOP ITEM */
.qs-journey-item.top .qs-connector {
    bottom: 70px;
    transform-origin: bottom;
}

/* BOTTOM ITEM */
.qs-journey-item.bottom .qs-connector {
    top: 70px;
    transform-origin: top;
}

/* WHEN ITEM APPEARS */
.qs-journey-item.show .qs-connector {
    height: 180px;
}

/* ================= ICON POSITION ================= */

.qs-journey-item.top .qs-icon{
    margin-top: -150px;
}

.qs-journey-item.bottom .qs-icon{
    margin-bottom: -150px;
    position: absolute;
    right: 0;
    bottom: 0;
}

/* ================= CONTENT ================= */

.qs-content {
    position: absolute;
    width: 260px;
    text-align: right;
    opacity: 0;
    transition: opacity .3s ease;
}

.qs-journey-item.top .qs-content {
    right: 50px;
    bottom: 80px;
}

.qs-journey-item.bottom .qs-content {
    right: 50px;
    top: 80px;
}

.qs-year {
    font-family: "Montserrat", Sans-serif;
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #25728d;
}

.top .qs-year{
    margin-top: 5px;
}

.bottom .qs-year{
    margin-bottom: 5px;
}

.qs-content h3 {
    font-family: "Montserrat", Sans-serif;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 0px;
    color: #00b286;
    text-transform: capitalize;
}

.qs-content p {
    font-family: "Montserrat", Sans-serif;
    font-size: 12px;
    color: #000;
}

/* ================= ANIMATION STATE ================= */

.qs-journey-item.show .qs-icon {
    transform: scale(1);
}

.qs-journey-item.show .qs-content {
    opacity: 1;
}

/* ================= MOBILE ================= */

@media (max-width: 991px) {
    .qs-content {
        width: 220px;
    }

    .qs-journey-item.top .qs-content,
    .qs-journey-item.bottom .qs-content {
        right: 90px;
    }
}

@media (max-width: 768px) {
    .qs-journey-track {
        flex-direction: column;
        align-items: center;
    }

    .qs-center-line {
        display: none;
    }

    .qs-journey-item {
        margin: 70px 0;
        padding: 0 !important;
    }

    .qs-connector {
        display: none;
    }

    .qs-content {
        position: relative;
        width: 100%;
        text-align: center;
        right: auto;
        top: auto;
        bottom: auto;
        margin-top: 20px;
        opacity: 1;
    }
}
