:root {
    --timeline-ink: var(--black, #031740);
    --timeline-muted: var(--pra, #49577A);
    --timeline-accent: var(--p1-clr, #1bcfc9);
    --timeline-accent-secondary: var(--p3-clr, #002f87);
    --timeline-bg: #f4f8fb;
    --timeline-card: #ffffff;
    --timeline-border: #dce7ef;
}

.timeline-wrap {
    position: relative;
    padding: 80px 0 110px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(244, 248, 251, 0.98)),
        var(--timeline-bg);
}

.timeline-heading {
    max-width: none;
    margin: 0 auto 44px;
    text-align: center;
}

.timeline-heading .section-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--timeline-accent-secondary);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.timeline-heading .section-subtitle::before,
.timeline-heading .section-subtitle::after {
    content: "";
    width: 36px;
    height: 2px;
    background: var(--timeline-accent);
}

.timeline-heading h2 {
    color: var(--timeline-ink);
    font-size: 42px;
    line-height: 1.15;
    margin-bottom: 14px;
}

.timeline-heading p {
    color: var(--timeline-muted);
    font-size: 17px;
    line-height: 1.7;
    margin: 0;
}

.timeline-heading-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    text-align: center;
}

.timeline-heading-actions p {
    text-align: center;
}

.timeline-toggle-all {
    min-width: 158px;
    margin: 0;
}

.timeline-track {
    position: relative;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, transparent, rgba(0, 47, 135, 0.35) 4%, rgba(27, 207, 201, 0.85) 50%, rgba(0, 47, 135, 0.35) 96%, transparent);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 112px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
    margin-bottom: 54px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-card {
    position: relative;
    grid-column: 1 / 2;
    grid-row: 1;
    background: var(--timeline-card);
    border: 1px solid var(--timeline-border);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 18px 45px rgba(3, 23, 64, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.timeline-card::before {
    content: "";
    position: absolute;
    top: 30px;
    width: 22px;
    height: 22px;
    background: #fff;
    border-top: 1px solid var(--timeline-border);
    border-right: 1px solid var(--timeline-border);
    transform: rotate(45deg);
}

.timeline-item:nth-child(odd) .timeline-card::before {
    right: -12px;
}

.timeline-item:nth-child(even) .timeline-card::before {
    left: -12px;
    transform: rotate(225deg);
}

.timeline-card:hover {
    transform: translateY(-5px);
    border-color: rgba(27, 207, 201, 0.55);
    box-shadow: 0 24px 54px rgba(3, 23, 64, 0.12);
}

.timeline-date {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 34px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(27, 207, 201, 0.12);
    color: var(--timeline-accent-secondary);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 16px;
}

.timeline-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    width: 100%;
}

.timeline-summary > div {
    min-width: 0;
}

.timeline-toggle {
    width: auto;
    height: 44px;
    flex: 0 0 auto;
    margin-left: auto;
    padding: 0 16px;
    gap: 8px;
    border-radius: 999px;
    border: 1px solid rgba(0, 47, 135, 0.18);
    background: #fff;
    color: var(--timeline-accent-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(3, 23, 64, 0.08);
    transition: background 0.24s ease, border-color 0.24s ease, color 0.24s ease, transform 0.24s ease, box-shadow 0.24s ease;
}

.timeline-toggle:hover,
.timeline-toggle:focus {
    background: var(--timeline-accent);
    border-color: var(--timeline-accent);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(27, 207, 201, 0.25);
    outline: none;
}

.timeline-toggle[aria-expanded="true"] {
    background: var(--timeline-accent-secondary);
    border-color: var(--timeline-accent-secondary);
    color: #fff;
}

.timeline-toggle-icon {
    width: 18px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    transform: translateY(-1px);
}

.timeline-toggle-label {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: nowrap;
    border: 0;
    font-size: 13px;
    font-weight: 800;
}

.timeline-details {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #edf2f7;
}

.timeline-details[hidden] {
    display: none;
}

.timeline-year {
    position: relative;
    grid-column: 2 / 3;
    grid-row: 1;
    z-index: 2;
    width: 112px;
    min-height: 112px;
    border-radius: 50%;
    background: var(--timeline-accent-secondary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    border: 8px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 47, 135, 0.14), 0 14px 30px rgba(0, 47, 135, 0.22);
    font-weight: 900;
    line-height: 1.08;
}

.timeline-year span {
    display: block;
    max-width: 82px;
    overflow-wrap: anywhere;
    font-size: 20px;
}

.timeline-node {
    display: none;
}

.timeline-title {
    color: var(--timeline-ink);
    font-size: 25px;
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 10px;
}

.timeline-subtitle {
    color: var(--timeline-accent-secondary);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.5;
    margin-bottom: 15px;
}

.timeline-content {
    color: var(--timeline-muted);
    font-family: "Poppins", sans-serif !important;
    font-size: 15px !important;
    line-height: 25px !important;
}

.timeline-content :where(p, span, a, li, strong, em, b, i, u, blockquote, div) {
    font-family: "Poppins", sans-serif !important;
    font-size: 15px !important;
    line-height: 25px !important;
}

.timeline-content span {
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: baseline !important;
    white-space: normal !important;
    letter-spacing: normal !important;
}

.timeline-content p {
    margin: 0 0 20px;
}

.timeline-content p:last-child {
    margin-bottom: 0;
}

.timeline-content img {
    max-width: 100%;
    height: auto;
    display: block;
}

.timeline-image {
    margin-top: 24px;
    border-radius: 8px;
    overflow: hidden;
    background: #eef2f6;
    border: 1px solid #e5edf3;
}

.timeline-image img {
    width: 100%;
    height: 270px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.timeline-featured-trigger {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    position: relative;
    cursor: zoom-in;
    text-align: inherit;
}

.timeline-featured-trigger:hover .gallery-hover-overlay,
.timeline-featured-trigger:focus-visible .gallery-hover-overlay {
    opacity: 1;
    transform: scale(1);
}

.timeline-featured-trigger .gallery-hover-overlay {
    background: rgba(27, 207, 201, 0.14);
}

.timeline-featured-trigger .gallery-hover-overlay i {
    text-shadow: 0 2px 8px rgba(3, 23, 64, 0.75);
}

.timeline-featured-trigger:focus-visible {
    outline: 3px solid var(--timeline-accent);
    outline-offset: -3px;
}

.timeline-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.timeline-gallery a {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5edf3;
    background: #eef2f6;
    position: relative;
    aspect-ratio: 4 / 3;
}

.gallery-hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(27, 207, 201, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    transform: scale(0.9);
    border-radius: 8px;
}

.timeline-gallery a:hover .gallery-hover-overlay {
    opacity: 1;
    transform: scale(1);
}

.gallery-hover-overlay i {
    color: #fff;
    font-size: 20px;
    transition: transform 0.3s ease;
}

.timeline-gallery a:hover .gallery-hover-overlay i {
    transform: scale(1.15);
}

.timeline-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.timeline-gallery a:hover img { transform: scale(1.08); }

.timeline-lightbox {
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 23, 64, 0.9);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.timeline-lightbox.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.timeline-lightbox-content {
    position: relative;
    max-width: 85vw;
    max-height: 80vh;
    transform: scale(0.95);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.timeline-lightbox.active .timeline-lightbox-content {
    transform: scale(1);
}

.timeline-lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
}

.timeline-lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    z-index: 100;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
}

.timeline-lightbox-close:hover {
    background: var(--timeline-accent);
    border-color: var(--timeline-accent);
    transform: rotate(90deg);
}

.timeline-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    backdrop-filter: blur(4px);
}

.timeline-lightbox-nav:hover {
    background: var(--timeline-accent);
    border-color: var(--timeline-accent);
    box-shadow: 0 0 15px rgba(27, 207, 201, 0.4);
}

.timeline-lightbox-prev { left: 30px; }
.timeline-lightbox-next { right: 30px; }

.timeline-item:nth-child(even) .timeline-card {
    grid-column: 3 / 4;
}

.timeline-item:nth-child(even) .timeline-year {
    grid-column: 2 / 3;
}

@media (max-width: 991px) {
    .timeline-wrap {
        padding: 64px 0 82px;
    }

    .timeline-toggle-all {
        align-self: center;
        margin-left: 0;
        margin-right: 0;
    }

    .timeline-heading {
        margin-bottom: 34px;
    }

    .timeline-heading h2 {
        font-size: 32px;
    }

    .timeline-line {
        left: 44px;
        transform: none;
    }

    .timeline-item {
        grid-template-columns: 88px minmax(0, 1fr);
        gap: 20px;
        margin-bottom: 35px;
    }

    .timeline-item:nth-child(even) .timeline-card,
    .timeline-item:nth-child(odd) .timeline-card {
        order: 2;
        grid-column: 2 / 3;
    }

    .timeline-item:nth-child(even) .timeline-year,
    .timeline-item:nth-child(odd) .timeline-year {
        grid-column: 1 / 2;
        order: 1;
    }

    .timeline-item:nth-child(odd) .timeline-card::before,
    .timeline-item:nth-child(even) .timeline-card::before {
        left: 0;
        right: auto;
        transform: translateX(-50%) rotate(225deg);
    }

    .timeline-year {
        width: 88px;
        min-height: 88px;
        border-width: 6px;
    }

    .timeline-year span {
        max-width: 66px;
        font-size: 16px;
    }

}

@media (max-width: 575px) {
    .timeline-line {
        left: 34px;
    }

    .timeline-item {
        grid-template-columns: 68px minmax(0, 1fr);
        gap: 14px;
    }

    .timeline-year {
        width: 68px;
        min-height: 68px;
        border-width: 5px;
    }

    .timeline-year span {
        max-width: 52px;
        font-size: 13px;
    }

    .timeline-card {
        padding: 22px;
    }

    .timeline-summary {
        gap: 14px;
    }

    .timeline-toggle {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        padding: 0;
        border-radius: 50%;
    }

    .timeline-toggle-all {
        width: auto;
        min-width: 158px;
        height: 44px;
        flex-basis: auto;
        padding: 0 16px;
        border-radius: 999px;
    }

    .timeline-toggle-icon {
        font-size: 23px;
    }

    .timeline-toggle-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .timeline-toggle-all .timeline-toggle-label {
        position: static;
        width: auto;
        height: auto;
        padding: 0;
        margin: 0;
        overflow: visible;
        clip: auto;
        white-space: nowrap;
    }

    .timeline-card::before {
        top: 24px;
    }

    .timeline-title {
        font-size: 21px;
    }

    .timeline-heading h2 {
        font-size: 28px;
    }

    .timeline-image img {
        height: 210px;
    }

    .timeline-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .timeline-lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }
    .timeline-lightbox-prev { left: 10px; }
    .timeline-lightbox-next { right: 10px; }
    .timeline-lightbox-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}
