/* .t888-history-wrapper {
   padding-right: 36px;
} */



.t888-year-block {
    margin-bottom: 60px;
}
.t888-year-block:last-child {
    margin-bottom: 0;
}
.t888-year {
    font-family: 'Open Sans';
    display: flex;
    align-items: center;
    width: 100%;
    gap: 12px;
}

.t888-year-icon {
    margin-top: -30px;
}

.t888-year-left {
    color: #00377B;
    font-weight: 700;
    font-size: 48px;
    line-height: 60px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    font-family: var(--font-dinroundot);
}

.t888-year-content {
    margin-top: 60px;
}

.t888-year-line {
    flex: 1 1 auto;
    height: 4px;
    background: rgba(0, 55, 123, 0.10);
    margin-top: 30px;
}

.t888-year-toggle {
    position: relative;
    width: 48px;
    height: 48px;
    background: none;
    border: none;
    cursor: pointer;
}

.t888-year-toggle::before {
    content: "";
    position: absolute;
    width: 28px;
    border-top: 4px solid #00377B;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


.t888-year-toggle[aria-expanded="false"]::after {
    content: "";
    position: absolute;
    height: 28px;
    border-left: 4px solid #E90380;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.t888-year-toggle[aria-expanded="false"]::before {
    border-top-color: #E90380;
}


.t888-button-event {
    border-bottom: 4px solid rgba(0, 55, 123, 0.1);
    width: 100%;
    display: flex;
    justify-content: end;
}

.t888-event {
    display: flex;
    align-items: center;
    position: relative;
    margin: 0 120px 60px 120px;
}

.t888-event.is-reverse {
    margin-bottom: 0;
}

.t888-event-text {
    padding: 50px 90px 50px 60px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.3);
    box-shadow:
        0 0 4px rgba(0, 0, 0, 0.15),
        0 2px 16px rgba(0, 0, 0, 0.15);
    max-width: 55.556%;
    z-index: 1;
}

.t888-event-date {
    display: inline-block;
    background: #00377B;
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    padding: 5px 0px;
    border-radius: 4px;
    margin-bottom: 20px;
    align-items: center;
    width: 100%;
    text-align: center;
    line-height: 27px;
    font-family: var(--font-dinroundot);
}

.t888-event-description {
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 400px;
    line-height: 100%;
    letter-spacing: 0px;
    color: #1E1E1E;
    line-height: 22px;
}

/* ===== IMAGE ===== */

.t888-event-image {
    flex: 1;
    z-index: 2;
}

.t888-event-image img {
    width: 100%;
    display: block;
    border-radius: 12px;
}

.t888-event:not(.is-reverse) .t888-event-text {
    margin-right: -50px;
}

.t888-event.is-reverse {
    flex-direction: row-reverse;
}

.t888-event.is-reverse .t888-event-text {
    margin-left: -50px;
    padding: 50px 60px 50px 90px !important;
}

.t888-event+.t888-event {
    margin-top: 20px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px){
.t888-event{
    margin: 0 40px;
}
}
@media (max-width: 767px) {
    .t888-event+.t888-event{
        margin-top: 26px;
    }
    .t888-event{
        margin: 0;
        gap: 10px;
    }
    .t888-event,
    .t888-event.is-reverse {
        flex-direction: column;
    }

    .t888-event-text,
    .t888-event.is-reverse .t888-event-text {
        max-width: 100%;
        margin: 2px ;
    }
    .t888-event:not(.is-reverse) .t888-event-text {
        margin-right: 2px;
    }
    .t888-event-text{
        padding: 20px;
    }
    .t888-event.is-reverse .t888-event-text {
        padding: 20px !important;
    }
    .t888-year-left{
        font-size: 28px;
        line-height: 38px;
    }
    .t888-year-content{
        margin-top: 40px;
    }
    .t888-year-block{
        margin-bottom: 30px;
    }
    .t888-event-image{
        margin: 2px;
        order: -1;
    }
    .t888-year-toggle::before{
        width: 18px;
    }
    .t888-year-toggle[aria-expanded="false"]::after{
        height: 18px;
    }
}

/* //dong mơ  */
.t888-year-content {
    overflow: hidden;
    transition: height 0.35s ease, opacity 0.25s ease;
}

.t888-year-block.is-collapsed .t888-year-content {
    height: 0 !important;
    opacity: 0;
}



/* ICON XOAY */
.t888-year-block.is-collapsed .t888-year-toggle {
    transform: rotate(360deg);
}


/* ============================================================
   STYLE 2 – SNAKE TIMELINE
   ──────────────────────────────────────────────────────────
   Công thức connector:
     - row có min-height cố định (--s2-row-min-h)
     - dot center từ top row = --s2-dc = dot-size / 2
     - connector height = --s2-row-min-h  (bằng row height)
     - margin-top  = -(row-min-h - dc)  → kéo lên đúng track row trên
     - margin-bottom = -(dc)            → kéo row dưới lên đúng track
   ============================================================ */

.t888-s2-wrapper {
    --s2-dot-size: 36px;
    --s2-track-h: 21px;
    --s2-curve-w: 80px;
    --s2-row-min-h: 220px;
    --s2-dc: calc(var(--s2-dot-size) / 2); /* = 18px */
    --s2-color: #E90380;
    --s2-from-color: #E90380;
    --s2-to-color:   #00377B;
    padding: 0 var(--s2-curve-w);
    position: relative;
    box-sizing: border-box;
}

/* ── ROW ── */
.t888-s2-row {
    display: flex;
    align-items: flex-start;
    position: relative;
    min-height: var(--s2-row-min-h);
}

/* Đường track ngang – màu đặc theo hàng */
.t888-s2-row::before {
    content: '';
    position: absolute;
    top: calc(var(--s2-dc) - var(--s2-track-h) / 2);
    left: 0;
    right: 0;
    height: var(--s2-track-h);
    background: var(--s2-color);
    border-radius: 4px;
}

/* ── ITEM ── */
.t888-s2-item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.t888-s2-item--empty {
    pointer-events: none;
}

/* ── DOT ── luôn màu navy, viền trắng */
.t888-s2-dot {
    width: var(--s2-dot-size);
    height: var(--s2-dot-size);
    border-radius: 50%;
    background: #00377B;
    border: 6px solid #fff;
    box-sizing: border-box;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

/* empty slot: ẩn dot (hàng giữa) */
.t888-s2-item--empty .t888-s2-dot {
    display: none;
}

/* placeholder (hàng cuối): dot hiện nhưng không có content */
.t888-s2-item--placeholder {
    pointer-events: none;
}

/* ── CONTENT ── */
.t888-s2-content {
    margin-top: 16px;
    width: 100%;
    padding: 0 8px;
    text-align: left;
    box-sizing: border-box;
}

.t888-s2-date {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #00377B;
    margin-bottom: 8px;
    line-height: 1.3;
}

.t888-s2-desc {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    color: #1E1E1E;
    line-height: 1.6;
}

.t888-s2-desc p {
    margin: 0 0 4px;
}

/* ── CONNECTOR (C-shape gradient) ──
   Dùng background gradient + pseudo-element cutout (background page = #FFFBE2)
   để tạo đường cong có màu chuyển tiếp giữa 2 hàng.
   JS sẽ override height/margin theo row height thực tế.
*/
.t888-s2-connector {
    width: var(--s2-curve-w);
    height: var(--s2-row-min-h);
    background: linear-gradient(to bottom, var(--s2-from-color, #E90380), var(--s2-to-color, #00377B));
    position: relative;
    flex-shrink: 0;
    margin-top: calc(-1 * (var(--s2-row-min-h) - var(--s2-dot-size) / 2 + var(--s2-track-h) / 2));
    margin-bottom: calc(-1 * (var(--s2-dot-size) / 2 + var(--s2-track-h) / 2));
}

/* right: cong về bên phải, hở bên trái */
.t888-s2-connector--right {
    border-radius: 0 999px 999px 0;
    margin-left: auto;
    margin-right: calc(-1 * var(--s2-curve-w));
}
.t888-s2-connector--right::after {
    content: '';
    position: absolute;
    inset: var(--s2-track-h) var(--s2-track-h) var(--s2-track-h) 0;
    background: #FFFBE2;
    border-radius: 0 999px 999px 0;
}

/* left: cong về bên trái, hở bên phải */
.t888-s2-connector--left {
    border-radius: 999px 0 0 999px;
    margin-right: auto;
    margin-left: calc(-1 * var(--s2-curve-w));
}
.t888-s2-connector--left::after {
    content: '';
    position: absolute;
    inset: var(--s2-track-h) 0 var(--s2-track-h) var(--s2-track-h);
    background: #FFFBE2;
    border-radius: 999px 0 0 999px;
}

/* ── RESPONSIVE: tablet 768–1024px ── */
@media (max-width: 1024px) {
    .t888-s2-wrapper {
        --s2-curve-w: 60px;
        --s2-row-min-h: 200px;
    }

    .t888-s2-date {
        font-size: 15px;
    }

    .t888-s2-content {
        padding: 0 4px;
    }
}

/* ── RESPONSIVE: mobile ≤767px – danh sách dọc ── */
@media (max-width: 767px) {
    .t888-s2-wrapper {
        padding: 0 0 0 44px;
    }

    /* track dọc */
    .t888-s2-wrapper::before {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: var(--s2-dc);
        width: var(--s2-track-h);
        background: #00377B;
        border-radius: 3px;
    }

    /* ẩn connector ziczac */
    .t888-s2-connector {
        display: none;
    }

    /* rows xếp dọc */
    .t888-s2-row {
        flex-direction: column;
        gap: 28px;
        min-height: unset;
        margin-bottom: 28px;
    }

    .t888-s2-row::before {
        display: none;
    }

    /* item: dot trái, content phải */
    .t888-s2-item {
        flex-direction: row;
        align-items: flex-start;
        gap: 14px;
        flex: unset;
        width: 100%;
    }

    .t888-s2-item--empty,
    .t888-s2-item--placeholder {
        display: none;
    }

    .t888-s2-dot {
        flex-shrink: 0;
        margin-top: 3px;
    }

    .t888-s2-content {
        margin-top: 0;
        padding: 0;
    }
}