.story-timeline-wrapper {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 20px 72px;
}

.story-timeline-wrapper * {
    box-sizing: border-box;
}

.story-timeline-header {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-bottom: 24px;
}

.story-timeline-title-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
}

.story-timeline-title {
    margin: 0;
    max-width: 760px;
    font-size: 32px;
    line-height: 1.1;
    font-weight: 700;
    color: #083d78;
    text-align: center;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.story-timeline-title.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.story-timeline {
    position: relative;
    padding: 12px 0 28px;
    --center-col: 86px;
    --arrow-size: 18px;
    --line-width: 5px;
    --line-color: #9da3a3;
    --dot-size: 18px;
    --dot-color: #09a629;
    --year-gap: 16px;
}

.story-timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: var(--line-width);
    background: var(--line-color);
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-row {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    margin-bottom: 54px;
    min-height: 120px;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transition-delay: var(--delay, 0ms);
    z-index: 2;
}

.timeline-row.left {
    transform: translateX(-18px);
}

.timeline-row.right {
    transform: translateX(18px);
}

.timeline-row.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-row .timeline-card,
.timeline-row .timeline-spacer {
    width: calc(50% - 43px);
    flex: 0 0 calc(50% - 43px);
}

.timeline-spacer {
    min-width: 0;
}

.timeline-center {
    position: relative;
    width: var(--center-col);
    flex: 0 0 var(--center-col);
    min-height: 40px;
    align-self: stretch;
    z-index: 4;
}

.timeline-center::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 18px;
    width: var(--dot-size);
    height: var(--dot-size);
    background: var(--dot-color);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 5;
}

.timeline-year {
    position: absolute;
    top: 16px;
    white-space: nowrap;
    font-size: 16px;
    font-weight: 700;
    color: #083d78;
    line-height: 1;
    z-index: 6;
}

.timeline-row.left .timeline-year {
    left: calc(50% + var(--year-gap));
    text-align: left;
}

.timeline-row.right .timeline-year {
    right: calc(50% + var(--year-gap));
    text-align: right;
}

.timeline-card {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    overflow: visible;
    z-index: 3;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.timeline-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.10);
}

.timeline-card.card-small {
    width: 100%;
    max-width: 310px;
    padding: 16px;
}

.timeline-card.card-large {
    width: 100%;
    max-width: 390px;
    padding: 18px;
}

.timeline-card::after {
    content: "";
    position: absolute;
    top: 16px;
    width: var(--arrow-size);
    height: var(--arrow-size);
    background: #ffffff;
    transform: rotate(45deg);
}

.timeline-row.left .timeline-card {
    order: 1;
    margin-left: auto;
    margin-right: 0;
}

.timeline-row.left .timeline-card::after {
    right: calc(var(--arrow-size) / -2);
}

.timeline-row.left .timeline-center {
    order: 2;
}

.timeline-row.left .timeline-spacer {
    order: 3;
}

.timeline-row.right .timeline-spacer {
    order: 1;
}

.timeline-row.right .timeline-center {
    order: 2;
}

.timeline-row.right .timeline-card {
    order: 3;
    margin-right: auto;
    margin-left: 0;
}

.timeline-row.right .timeline-card::after {
    left: calc(var(--arrow-size) / -2);
}

.timeline-card-image {
    width: 100%;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 12px;
    line-height: 0;
    background: #fff;
}

.timeline-card.card-small .timeline-card-image {
    height: 140px;
}

.timeline-card.card-large .timeline-card-image {
    height: 235px;
}

.timeline-card-image img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 10px;
}

.timeline-card.card-small .timeline-card-image img,
.timeline-card.card-large .timeline-card-image img {
    object-fit: contain;
    object-position: center;
    background: #fff;
}

.timeline-card-title {
    margin: 0 0 10px;
    color: #083d78;
    font-weight: 700;
}

.timeline-card.card-small .timeline-card-title {
    font-size: 18px;
    line-height: 1.3;
}

.timeline-card.card-large .timeline-card-title {
    font-size: 20px;
    line-height: 1.28;
}

.timeline-card-description {
    color: #666d75;
}

.timeline-card-description p:first-child {
    margin-top: 0;
}

.timeline-card-description p:last-child {
    margin-bottom: 0;
}

.timeline-card.card-small .timeline-card-description {
    font-size: 13px;
    line-height: 1.55;
}

.timeline-card.card-large .timeline-card-description {
    font-size: 14px;
    line-height: 1.6;
}

@media (max-width: 1200px) {
    .story-timeline-wrapper {
        max-width: 1080px;
        padding: 22px 18px 64px;
    }

    .story-timeline {
        --center-col: 78px;
        --year-gap: 14px;
    }

    .timeline-row .timeline-card,
    .timeline-row .timeline-spacer {
        width: calc(50% - 39px);
        flex: 0 0 calc(50% - 39px);
    }

    .timeline-card.card-small {
        max-width: 290px;
    }

    .timeline-card.card-large {
        max-width: 360px;
    }

    .timeline-card.card-small .timeline-card-image {
        height: 128px;
    }

    .timeline-card.card-large .timeline-card-image {
        height: 210px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .story-timeline-wrapper {
        max-width: 920px;
        padding: 20px 18px 56px;
    }

    .story-timeline {
        --center-col: 72px;
        --arrow-size: 16px;
        --year-gap: 12px;
    }

    .timeline-row {
        margin-bottom: 42px;
    }

    .timeline-row .timeline-card,
    .timeline-row .timeline-spacer {
        width: calc(50% - 36px);
        flex: 0 0 calc(50% - 36px);
    }

    .timeline-card.card-small {
        max-width: 260px;
        padding: 14px;
    }

    .timeline-card.card-large {
        max-width: 320px;
        padding: 16px;
    }

    .timeline-card.card-small .timeline-card-image {
        height: 120px;
    }

    .timeline-card.card-large .timeline-card-image {
        height: 190px;
    }

    .timeline-card.card-small .timeline-card-title {
        font-size: 16px;
    }

    .timeline-card.card-large .timeline-card-title {
        font-size: 18px;
    }

    .timeline-card.card-small .timeline-card-description {
        font-size: 12px;
        line-height: 1.55;
    }

    .timeline-card.card-large .timeline-card-description {
        font-size: 13px;
        line-height: 1.6;
    }

    .timeline-center::before {
        top: 18px;
        width: 16px;
        height: 16px;
    }

    .timeline-year {
        top: 16px;
        font-size: 16px;
    }
}


/* ===== FINAL RESPONSIVE OVERRIDE FOR STORY TIMELINE ===== */

/* Tablet */
@media (min-width: 768px) and (max-width: 1024px) {
    .story-timeline-wrapper {
        max-width: 920px !important;
        padding: 20px 18px 56px !important;
    }

    .story-timeline {
        --center-col: 72px !important;
        --arrow-size: 16px !important;
    }

    .story-timeline > .timeline-row {
        margin-bottom: 42px !important;
    }

    .story-timeline > .timeline-row > .timeline-card,
    .story-timeline > .timeline-row > .timeline-spacer {
        width: calc(50% - 36px) !important;
        flex: 0 0 calc(50% - 36px) !important;
    }

    .story-timeline > .timeline-row > .timeline-card.card-small {
        max-width: 260px !important;
        padding: 14px !important;
    }

    .story-timeline > .timeline-row > .timeline-card.card-large {
        max-width: 320px !important;
        padding: 16px !important;
    }

    .story-timeline > .timeline-row > .timeline-card.card-small .timeline-card-image {
        height: 95px !important;
    }

    .story-timeline > .timeline-row > .timeline-card.card-large .timeline-card-image {
        height: 140px !important;
    }

    .story-timeline > .timeline-row > .timeline-card .timeline-card-image img {
        width: 100% !important;
        height: 100% !important;
        max-height: none !important;
        object-fit: contain !important;
    }

    .story-timeline > .timeline-row > .timeline-center::before {
        top: 18px !important;
        width: 16px !important;
        height: 16px !important;
    }

    .story-timeline > .timeline-row > .timeline-center > .timeline-year {
        top: 16px !important;
        font-size: 16px !important;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .story-timeline-wrapper {
        padding: 16px 12px 40px !important;
    }

    .story-timeline-title {
        max-width: 320px !important;
        margin: 0 auto !important;
        font-size: 24px !important;
        line-height: 1.15 !important;
        text-align: center !important;
    }

    .story-timeline::before {
        left: 20px !important;
        transform: none !important;
    }

    .story-timeline > .timeline-row {
        display: block !important;
        position: relative !important;
        padding-left: 68px !important;
        margin-bottom: 28px !important;
        min-height: auto !important;
    }

    .story-timeline > .timeline-row > .timeline-spacer {
        display: none !important;
    }

    .story-timeline > .timeline-row > .timeline-center {
        position: absolute !important;
        left: -7px !important;
        top: -23px !important;
        width: 68px !important;
        min-height: 20px !important;
        margin: 0 !important;
        z-index: 5 !important;
        align-self: auto !important;
    }

    .story-timeline > .timeline-row > .timeline-center::before {
        left: 20px !important;
        top: 2px !important;
        width: 18px !important;
        height: 18px !important;
        transform: none !important;
    }

    .story-timeline > .timeline-row > .timeline-center > .timeline-year {
        position: absolute !important;
        left: 48px !important;
        top: 0 !important;
        right: auto !important;
        width: auto !important;
        transform: none !important;
        display: block !important;
        white-space: nowrap !important;
        line-height: 18px !important;
        font-size: 16px !important;
        text-align: left !important;
        z-index: 6 !important;
    }

    .story-timeline > .timeline-row > .timeline-card,
    .story-timeline > .timeline-row > .timeline-card.card-small,
    .story-timeline > .timeline-row > .timeline-card.card-large {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 16px !important;
    }

    .story-timeline > .timeline-row > .timeline-card::after {
        display: none !important;
    }

    .story-timeline > .timeline-row > .timeline-card.card-small .timeline-card-image {
        height: 110px !important;
    }

    .story-timeline > .timeline-row > .timeline-card.card-large .timeline-card-image {
        height: 145px !important;
    }

    .story-timeline > .timeline-row > .timeline-card .timeline-card-image img {
        width: 100% !important;
        height: 100% !important;
        max-height: none !important;
        object-fit: contain !important;
    }

    .story-timeline > .timeline-row > .timeline-card.card-small .timeline-card-title,
    .story-timeline > .timeline-row > .timeline-card.card-large .timeline-card-title {
        font-size: 16px !important;
    }

    .story-timeline > .timeline-row > .timeline-card.card-small .timeline-card-description,
    .story-timeline > .timeline-row > .timeline-card.card-large .timeline-card-description {
        font-size: 14px !important;
        line-height: 1.6 !important;
    }
}
