.custom-image-modal {
    display: flex;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background-color: rgba(0,0,0,0.92);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s;
}
.custom-image-modal-content {
    max-width: 75vw;
    max-height: 70vh;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.7);
    background: #222;
    object-fit: contain;
    display: block;
    margin: auto;
}
.custom-image-modal-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 2010;
    transition: color 0.2s;
    text-shadow: 0 2px 10px #000;
}
.custom-image-modal-close:hover {
    color: #c5a473;
}
@media (max-width: 576px) {
    .custom-image-modal-content {
        max-width: 89vw;
        max-height: 70vh;
    }
    .custom-image-modal-close {
        top: 10px;
        right: 18px;
        font-size: 30px;
    }
}
/* ====== CUSTOM CAROUSEL FOR TIMELINE DETAIL ====== */
.custom-carousel-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: auto;
    background-color: #808080;
    overflow: hidden;
    border-radius: 8px;
}
.carousel-slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
}
/* Base centering & single-slide visibility (mirroring news detail) */
.custom-carousel-container .carousel-item {
    width: 100%;
    flex: 0 0 100%;
    display: none; /* hidden by default */
    align-items: center;
    justify-content: center;
}
.custom-carousel-container .carousel-item.active { display: flex; }
.custom-carousel-container .carousel-item img {
    max-width: 100%;
    max-height: 100%;
    width: auto; /* prevent horizontal stretch */
    height: 100%;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    font-size: 24px;
    padding: 0;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-weight: 600;
}
.carousel-control:hover {
    background-color: rgba(0, 0, 0, 0.6);
}
.carousel-control.prev {
    left: 15px;
}
.carousel-control.next {
    right: 15px;
}
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    margin: auto;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}
.indicator {
    width: 30px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.indicator.active {
    background-color: white;
}
/* Desktop (>=769px) uniform sizing like mobile (no cropping) */
@media (min-width: 769px) {
    .custom-carousel-container .carousel-item { height: 320px; background:#111; }
    .custom-carousel-container .carousel-item img { background:#111; }
}
/* Adjusted carousel image heights for better mobile presentation */
@media (max-width: 768px) {
    /* was 180px */
    .custom-carousel-container .carousel-item img { height: 220px; }
}
@media (max-width: 576px) {
    .custom-carousel-container { max-width: 98vw; }
    /* was 90px */
    .custom-carousel-container .carousel-item img { height: 170px; }
    .carousel-control { width: 34px; height: 34px; font-size: 18px; }
    .indicator { width: 18px; height: 4px; }
}
/* ====== TIMELINE DETAIL ACTIONS & SHARE (MATCH NEWS EVENTS) ====== */
.timeline-detail-actions {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    margin-top: 2rem;
}

.social-share-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: 1rem;
    margin-top: 10px;
}

.share-text {
    margin: 0;
    margin-right: 1rem;
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 1px;
    font-family: 'Montserrat', sans-serif;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    background-color: rgba(6, 16, 31, 0.85);
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    border: none;
    text-decoration: none;
}

.social-icon.facebook:hover { background: #D4ba8e; }
.social-icon.twitter:hover { background: #D4ba8e; }
.social-icon.whatsapp:hover { background: #D4ba8e; }
.social-icon.telegram:hover { background: #D4ba8e; }

.social-icon:hover {
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    opacity: 0.92;
}

.btn-back {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    background-color: transparent;
    color: var(--gold-color);
    border: 1px solid var(--gold-color);
}
.btn-back:hover {
    background-color: var(--gold-color);
    color: var(--dark-bg);
}

@media (max-width: 576px) {
    .timeline-detail-actions {
        flex-direction: column;
        align-items: center;
        gap: 1.2rem;
        padding-top: 1.2rem;
    }
    .btn-back {
        width: 80%;
        margin-bottom: 0.7rem;
        text-align: center;
        font-size: 1rem;
        padding: 0.9rem 0;
    }
    .social-share-group {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.7rem;
        margin-left: 0;
        width: 100%;
    }
    .share-text {
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
        font-size: 0.95rem;
    }
    .social-icon {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
        margin-bottom: 0.2rem;
    }
}
.timeline-image-detail {
    width: 100%;
    height: 380px;
    overflow: hidden;
    background-color: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.timeline-detail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin-left: auto;
    margin-right: auto;
    
}

.timeline-detail-no-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #333333 0%, #1a1a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--gold-color);
    border-top: 1px solid var(--gold-color);
}

.timeline-detail-date-large {
    font-size: 2.2rem;
    color: var(--gold-color);
    text-align: center;
    font-weight: 600;
    letter-spacing: 3px;
    font-family: 'Times New Roman', Times, serif;
    opacity: 0.8;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}
.timeline-content-link {
    display: flex; 
    flex-direction: column; 
    flex-grow: 1; 
    text-decoration: none;
    color: inherit;
}

.timeline-content-detail {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-top: none;
    padding: 3rem;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.timeline-detail-title {
    color: var(--gold-color);
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    font-family: 'Times New Roman', Times, serif;
}

.timeline-detail-date {
    color: var(--text-dark);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline-detail-description {
    color: var(--text-light);
    line-height: 1.9;
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.timeline-detail-description p {
    margin-bottom: 1.5rem;
}

.timeline-detail-gallery h4 {
    color: var(--gold-color);
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    font-family: 'Times New Roman', Times, serif;
}

.gallery-item {
    display: block;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    height: 200px;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .timeline-image-detail {
        height: 220px;
    }
    .timeline-content-detail {
        padding: 1.5rem;
    }
    .timeline-detail-title {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    
    .timeline-detail-title {
        font-size: 1.4rem;
    }
    .gallery-item {
        height: 120px;
    }
}
/* ====== CSS MODAL SHARE DAN RESPONSIVE FOOTER TIMELINE ====== */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none; /* diubah oleh JS menjadi 'flex' */
    justify-content: center;
    align-items: center;
    z-index: 1050;
    backdrop-filter: blur(5px);
}
.share-modal-content {
    background-color: var(--card-bg);
    color: var(--text-light);
    padding: 2.5rem;
    border: 1px solid var(--gold-color);
    border-radius: 8px;
    position: relative;
    width: 90%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.7);
    font-family: 'Montserrat', sans-serif;
    animation: fadeIn 0.3s ease-in-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.share-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    color: var(--text-dark);
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease, transform 0.3s ease;
}
.share-modal-close:hover {
    color: var(--gold-color);
    transform: rotate(90deg);
}
.share-modal-content h4 {
    font-family: 'Times New Roman', Times, serif;
    color: var(--gold-color);
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 2rem;
    font-weight: 600;
}
.share-modal-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.share-link-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 1rem;
    transition: all 0.3s ease;
    line-height: 1.2;
    gap: 6px;
}
.share-link-item i {
    margin-right: 0;
    width: 1.25em;
    text-align: center;
}
.share-link-item:hover {
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.share-link-item.facebook:hover { background-color: #D4ba8e; border-color: #D4ba8e; }
.share-link-item.twitter:hover { background-color: #D4ba8e; border-color: #D4ba8e; }
.share-link-item.whatsapp:hover { background-color: #D4ba8e; border-color: #D4ba8e; }
.share-link-item.telegram:hover { background-color: #D4ba8e; border-color: #D4ba8e; }
@media (max-width: 576px) {
    .share-modal-links {
        grid-template-columns: 1fr;
    }
    .share-modal-content {
        padding: 2rem 1.5rem;
    }
    .timeline-footer {
        flex-direction: row;
        align-items: center;
        gap: 0.7rem;
        margin-top: 1rem;
        padding-top: 1rem;
    }
}

.timeline-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Push footer to the bottom of the card content */
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}



.share-button {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    padding: 8px 16px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: fit-content;
}
.share-button i {
    margin-right: 8px;
}
.share-button:hover {
    background-color: var(--gold-color);
    border-color: var(--gold-color);
    color: var(--dark-bg);
}
.read-more-link {
    color: var(--gold-color);
    font-weight: 600;
    text-decoration: none;
    transition: letter-spacing 0.3s ease, color 0.3s ease;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
}
.read-more-link i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}
.timeline-item:hover .read-more-link {
    letter-spacing: 1px;
}
.timeline-item:hover .read-more-link i {
    transform: translateX(5px);
}
:root {
    --gold-color: #c5a473;
    --dark-bg: #1a1a1a;
    --card-bg: rgba(6, 16, 31, 0.85);
    --border-color: #333333;
    --text-light: #e0e0e0;
    --text-dark: #cccccc;
}

.timeline-page-content {
    font-family: 'Montserrat', sans-serif;
}

.timeline-page-content h1, 
.timeline-page-content h2, 
.timeline-page-content h3 {
    font-family: 'Times New Roman', Times, serif;
}

.timeline-header {
    text-align: center;
    margin: 2rem 0 4rem 0;
    position: relative;
}

.timeline-header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--gold-color);
    display: inline-block;
    position: relative;
    margin: 0 1rem;
    --header-line-gap: 14px; /* jarak antara teks & garis */
}

/* Hide old container-based lines */
.timeline-header::before,
.timeline-header::after { display:none !important; }
/* New lines attached to the heading text (same style as products) */
.timeline-header h1::before,
.timeline-header h1::after {
    content:'';
    position:absolute;
    top:50%;
    height:1px;
    background-color: var(--gold-color);
    opacity:.5;
    transform:translateY(-50%) scaleX(1);
    width: 200px;
}
.timeline-header h1::before { right:calc(100% + var(--header-line-gap)); }
.timeline-header h1::after { left:calc(100% + var(--header-line-gap)); }

.timeline-year {
    text-align: center;
    margin: 4rem 0 2rem 0;
}

.timeline-year h2 {
    color: var(--gold-color);
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 2px;
    display: inline-block;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}
.timeline-page-content .col-lg-6 {
    margin-bottom: 2rem;
}

.timeline-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex; 
    flex-direction: column;
    height: 100%; 
}

.row-odd-items-last-center .col-lg-6:last-child {
    margin-left: auto;
    margin-right: auto;
}

.timeline-item:hover {
    transform: translateY(-8px);
    border-color: var(--gold-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.timeline-item-link {
    display: flex; 
    flex-direction: column; 
    flex-grow: 1; 
    text-decoration: none;
    color: inherit;
}

.timeline-item-link p{
    overflow-wrap: break-word;
    word-break: break-word;

}

.timeline-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 250px;
    background: #222222; 
}

.timeline-image-wrapper.no-image {
    background: linear-gradient(135deg, #333333 0%, #1a1a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--gold-color);
}

.timeline-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}


.timeline-item:hover .timeline-image {
    transform: scale(1.05);
}

.timeline-date {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: rgba(6, 16, 31, 0.85);
    backdrop-filter: blur(5px);
    color: var(--gold-color);
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--gold-color);
    letter-spacing: 1px;
    z-index: 10;
}

.timeline-date-overlay {
    font-size: 1.8rem;
    color: var(--gold-color);
    text-align: center;
    font-weight: 600;
    letter-spacing: 2px;
    padding: 2rem;
    font-family: 'Times New Roman', Times, serif;
    opacity: 0.8;
    transition: opacity 0.4s ease;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.timeline-item:hover .timeline-date-overlay {
    opacity: 1;
}

.timeline-date-no-image {
    color: var(--text-dark);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.timeline-content {
    padding: 1.5rem;
    display: flex; 
    flex-direction: column; 
    flex-grow: 1;
}

.timeline-content h3 {
    color: var(--text-light);
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.timeline-item:hover .timeline-content h3 {
    color: var(--gold-color);
}

.timeline-content p {
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.read-more {
    color: var(--gold-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: letter-spacing 0.3s ease;
    margin-top: auto;
}

.timeline-item:hover .read-more {
    letter-spacing: 1px;
}

.timeline-detail-container {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    padding: 3rem;
    margin: 2rem 0;
}

.timeline-detail-image-wrapper {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    background-color: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}
.timeline-detail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.timeline-detail-title {
    color: var(--gold-color);
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.timeline-detail-date {
    color: var(--text-dark);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline-detail-description {
    color: var(--text-light);
    line-height: 1.9;
    font-size: 1.1rem;
    margin-bottom: 3rem;
}
.timeline-detail-description p {
    margin-bottom: 1.5rem;
    word-wrap: break-word;     
    overflow-wrap: break-word; 

}

/* Styles for CKEditor content */
.timeline-detail-description h1,
.timeline-detail-description h2,
.timeline-detail-description h3,
.timeline-detail-description h4,
.timeline-detail-description h5,
.timeline-detail-description h6 {
    color: var(--gold-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.timeline-detail-description p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.timeline-detail-description img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
    cursor: zoom-in;
    transition: all 0.3s ease;
}

.timeline-detail-description img:hover {
    border-color: var(--gold-color);
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(197, 164, 115, 0.3);
}

.timeline-detail-description ul,
.timeline-detail-description ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.timeline-detail-description li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.timeline-detail-description blockquote {
    border-left: 4px solid var(--gold-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-dark);
}

.back-to-timeline {
    display: inline-block;
    background-color: transparent;
    color: var(--gold-color);
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--gold-color);
    text-decoration: none;
    margin-top: 2rem;
    transition: all 0.3s ease;
    font-weight: 600;
}

.back-to-timeline:hover {
    background-color: var(--gold-color);
    color: var(--dark-bg);
}

/* Styles for timeline detail page with no image */
.timeline-detail-no-image {
    height: 300px;
    background: linear-gradient(135deg, #333333 0%, #1a1a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--gold-color);
    border-top: 1px solid var(--gold-color);
}

.timeline-detail-date-large {
    font-size: 3rem;
    color: var(--gold-color);
    text-align: center;
    font-weight: 600;
    letter-spacing: 3px;
    font-family: 'Times New Roman', Times, serif;
    opacity: 0.8;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.pagination {
    display: flex;
    list-style: none;
    padding: 0;
}

.pagination .page-item {
    margin: 0 5px;
}

.pagination .page-link {
    color: var(--text-dark);
    background-color: transparent;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    display: block;
    min-width: 40px;
    text-align: center;
}

.pagination .page-item.disabled .page-link {
    color: #555;
    border-color: #333;
    cursor: not-allowed;
}

.pagination .page-item:not(.disabled) .page-link:hover {
    color: var(--dark-bg);
    background-color: var(--gold-color);
    border-color: var(--gold-color);
}

.pagination .page-item.active .page-link {
    z-index: 3;
    color: var(--dark-bg);
    background-color: var(--gold-color);
    border-color: var(--gold-color);
    font-weight: bold;
}

@media (max-width: 768px) {
    .timeline-detail-image-wrapper {
        height: 250px;
    }
    .timeline-detail-container {
        padding: 1.5rem;
    }
    .timeline-detail-title {
        font-size: 2rem;
    }
}

/* ===================== Responsive Timeline Enhancements ===================== */
/* XL ≥1200px */
@media (min-width: 1200px) {
    .timeline-header h1 { font-size: 3rem; letter-spacing: 5px; }
    .timeline-year h2 { font-size: 2.2rem; }
    .timeline-detail-title { font-size: 2.8rem; }
    .timeline-detail-image-wrapper { max-height: 430px; }
}
/* LG 992–1199 */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .timeline-header h1 { font-size: 2.7rem; }
    .timeline-year h2 { font-size: 2.05rem; }
    .timeline-detail-title { font-size: 2.5rem; }
    .timeline-detail-image-wrapper { max-height: 400px; }
}
/* MD 768–991 */
@media (min-width: 768px) and (max-width: 991.98px) {
    .timeline-header h1 { font-size: 2.35rem; }
    .timeline-year h2 { font-size: 1.9rem; }
    .timeline-header h1::before,
    .timeline-header h1::after { width:130px; }
    .timeline-detail-title { font-size: 2.2rem; }
    .timeline-detail-image-wrapper { max-height: 340px; }
    .timeline-image-wrapper { height: 230px; }
}


/* SM 576–767 */
@media (min-width: 576px) and (max-width: 767.98px) {
    .timeline-header h1 { font-size: 2rem; letter-spacing: 3.5px; }
    .timeline-year h2 { font-size: 1.75rem; }
    .timeline-detail-title { font-size: 1.85rem; }
    .timeline-detail-image-wrapper { max-height: 300px; }
    .timeline-image-wrapper { height: 200px; }
    .timeline-header h1::before,
    .timeline-header h1::after { width:120px; }
}
/* XS <576 */
@media (max-width: 575.98px) {
    .timeline-header h1 { font-size: 1.65rem; letter-spacing: 3px; }
    .timeline-year h2 { font-size: 1.6rem; }
    .timeline-header h1::before,
    .timeline-header h1::after { width:50px; }
    .timeline-detail-title { font-size: 1.6rem; }
    .timeline-detail-image-wrapper { max-height: 260px; }
    .timeline-image-wrapper { height: 180px; }
    .timeline-content { padding: 1.2rem; }
}

@media (min-width: 992px) {
    /* Ensure columns in a row stretch to the tallest and allow the card to fill */
    .timeline-page-content .row { align-items: stretch; }
    .timeline-page-content .row > [class*="col-"] { display: flex; }
    .timeline-page-content .row > [class*="col-"] .timeline-item {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto; /* fill the column height */
        min-height: 100%;
    }
}
/* 
/* General tablet & down adjustments */
@media (max-width: 991.98px) {
    .timeline-header { margin: 1.8rem 0 3rem 0; }
    .timeline-detail-container { padding: 2rem; }
}
/* Orientation tweaks */
@media (orientation: portrait) and (max-width: 767.98px) {
    .timeline-header { margin: 1.6rem 0 2.4rem; }
    .timeline-image-wrapper { height: 190px; }
    .timeline-detail-image-wrapper { max-height: 280px; }
}
@media (orientation: landscape) and (max-width: 991.98px) {
    .timeline-header h1 { font-size: 1.85rem; }
    .timeline-header { margin: 1.2rem 0 2.2rem; }
    .timeline-image-wrapper { height: 170px; }
    .timeline-detail-image-wrapper { max-height: 240px; }
}
