
/* =========================================
   HISTORICAL TIMELINE
========================================= */

.timeline-intro {
    max-width: 850px;
    margin: 0 auto 40px;
    text-align: center;
}

.timeline-eyebrow {
    display: inline-block;
    color: #527b96;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.timeline-intro h2 {
    color: #243e52;
    font-size: 32px;
    margin-bottom: 15px;
}

.timeline-intro p {
    color: #777;
    font-size: 15px;
    line-height: 1.8;
}

/* Search and filters */

.timeline-filter-panel {
    background: #fff;
    border: 1px solid #e7e9ec;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 55px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.04);
}

.timeline-search {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f5f7f9;
    border: 1px solid #e4e8eb;
    border-radius: 6px;
    padding: 0 15px;
    margin-bottom: 20px;
}

.timeline-search i {
    color: #55758b;
}

.timeline-search input {
    border: none;
    background: transparent;
    box-shadow: none;
    height: 48px;
    margin: 0;
    width: 100%;
}

.timeline-search input:focus {
    box-shadow: none;
}

.timeline-filter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.timeline-filter label {
    display: block;
    color: #344b5d;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 8px;
}

.timeline-filter select {
    width: 100%;
    height: 46px;
    border: 1px solid #e0e5e9;
    border-radius: 5px;
    background: #fff;
    color: #455b6c;
    padding: 0 12px;
}

.timeline-filter-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    border-top: 1px solid #edf0f2;
    margin-top: 20px;
    padding-top: 15px;
}

.timeline-filter-footer span {
    color: #667987;
    font-size: 13px;
    margin-right: auto;
}

.timeline-filter-footer button,
.timeline-empty button {
    border: 1px solid #d9e1e7;
    background: #fff;
    color: #315a76;
    padding: 7px 12px;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
}

.timeline-filter-footer button:hover,
.timeline-empty button:hover {
    background: #315a76;
    color: #fff;
}

/* Timeline heading */

.timeline-section-heading {
    margin-bottom: 35px;
}

.timeline-section-heading h3 {
    color: #263f52;
    font-size: 25px;
    margin-bottom: 5px;
}

.timeline-section-heading p {
    color: #888;
    font-size: 14px;
}

/* Timeline structure */

.historical-timeline {
    position: relative;
    padding: 5px 0 10px;
}

.historical-timeline::before {
    content: "";
    position: absolute;
    top: 12px;
    bottom: 25px;
    left: 91px;
    width: 2px;
    background: #dce5eb;
}

.timeline-entry {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 25px;
    position: relative;
    margin-bottom: 35px;
}

.timeline-date {
    position: relative;
    z-index: 1;
    text-align: center;
    padding-top: 22px;
}

.timeline-date::after {
    content: "";
    position: absolute;
    top: 8px;
    right: -8px;
    width: 16px;
    height: 16px;
    background: #315f7d;
    border: 4px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #315f7d;
}

.timeline-date span {
    color: #315b78;
    font-weight: 700;
    font-size: 15px;
    overflow-wrap: anywhere;
}

/* Event cards */

.timeline-card {
    background: #fff;
    border: 1px solid #e5e9ed;
    border-radius: 9px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.035);
    transition: transform .2s ease, box-shadow .2s ease;
}

.timeline-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.timeline-card-image {
    height: 230px;
    overflow: hidden;
}

.timeline-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.timeline-card-content {
    padding: 24px;
}

.timeline-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 12px;
}

.timeline-card-meta span {
    color: #668093;
    font-size: 12px;
}

.timeline-card-meta i {
    margin-right: 5px;
}

.timeline-card-content h4 {
    color: #263e50;
    font-size: 20px;
    margin-bottom: 10px;
}

.timeline-card-content p {
    color: #737e87;
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.timeline-card-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    border-top: 1px solid #edf0f2;
    padding-top: 15px;
}

.timeline-read-more {
    border: none;
    background: transparent;
    color: #315e7d;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
}

.timeline-read-more i {
    margin-left: 5px;
    transition: transform .2s ease;
}

.timeline-read-more:hover i {
    transform: translateX(4px);
}

.timeline-location-link {
    color: #77858f;
    font-size: 12px;
}

/* Empty search result */

.timeline-empty {
    background: #fff;
    border: 1px dashed #d6dfe5;
    border-radius: 10px;
    text-align: center;
    padding: 60px 20px;
}

.timeline-empty > i {
    color: #8ba2b3;
    font-size: 38px;
    margin-bottom: 15px;
}

.timeline-empty h3 {
    color: #344b5d;
}

.timeline-empty p {
    color: #84909a;
    font-size: 14px;
}

/* Event details modal */

.timeline-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(13, 29, 40, .78);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-y: auto;
}

.timeline-modal {
    position: relative;
    width: 100%;
    max-width: 760px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
}

.timeline-modal-close {
    position: absolute;
    top: 12px;
    right: 15px;
    z-index: 3;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,.65);
    color: #fff;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.timeline-modal-image {
    height: 300px;
}

.timeline-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.timeline-modal-content {
    padding: 35px;
}

.timeline-modal-date {
    display: inline-block;
    color: #47738f;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 12px;
}

.timeline-modal-content h2 {
    color: #263e50;
    font-size: 28px;
    margin-bottom: 12px;
}

.timeline-modal-location {
    color: #73818b;
    font-size: 13px;
    margin-bottom: 25px;
}

.timeline-full-description {
    color: #5e6870;
    font-size: 15px;
    line-height: 1.9;
    white-space: normal;
}

.timeline-source {
    background: #f4f7f9;
    border-left: 3px solid #527a96;
    padding: 15px 18px;
    margin-top: 25px;
}

.timeline-source h4 {
    color: #344d60;
    font-size: 14px;
    margin-bottom: 5px;
}

.timeline-source p {
    color: #75828c;
    font-size: 13px;
    margin: 0;
}

.timeline-modal-location-button {
    display: inline-block;
    margin-top: 25px;
    padding: 12px 18px;
    background: #315b78;
    color: #fff !important;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
}

.timeline-modal-location-button:hover {
    background: #24465f;
}

/* Responsive layout */

@media (max-width: 767px) {

    .timeline-intro h2 {
        font-size: 25px;
    }

    .timeline-filter-grid {
        grid-template-columns: 1fr;
    }

    .timeline-filter-panel {
        padding: 18px;
    }

    .historical-timeline::before {
        left: 13px;
    }

    .timeline-entry {
        grid-template-columns: 1fr;
        gap: 8px;
        padding-left: 35px;
    }

    .timeline-date {
        text-align: left;
        padding: 0 0 5px;
    }

    .timeline-date::after {
        top: 3px;
        left: -28px;
        right: auto;
        width: 13px;
        height: 13px;
    }

    .timeline-date span {
        font-size: 14px;
    }

    .timeline-card-image {
        height: 190px;
    }

    .timeline-card-content {
        padding: 18px;
    }

    .timeline-modal-overlay {
        padding: 10px;
    }

    .timeline-modal-content {
        padding: 22px;
    }

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

    .timeline-modal-content h2 {
        font-size: 23px;
    }
}
