/**
 * Custom Timeline / History Widget Styles
 * Exact layout & typography alignment for Elementor
 */

.timeline-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Continuous vertical timeline track line */
.timeline-track {
    position: absolute;
    top: 8px;
    bottom: 24px;
    left: 5.5px;
    width: 1px;
    border-left: 1px solid #e5e5e5;
    z-index: 1;
    pointer-events: none;
    box-sizing: border-box;
}

/* Vertical stack of milestone rows */
.timeline-items {
    display: flex;
    flex-direction: column;
    gap: 80px;
    position: relative;
    z-index: 2;
}

/* Single milestone row: 2-column grid */
.timeline-row {
    display: grid;
    grid-template-columns: 260px 1fr;
    column-gap: 48px;
    align-items: start;
    position: relative;
}

/* ==========================================
   LEFT COLUMN: Axis, Bullet, Index, Period
   ========================================== */
.timeline-col--meta {
    position: relative;
    width: 100%;
}

.timeline-meta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 16px; /* Aligns center with the 8px baseline of top divider */
    width: 100%;
}

.timeline-node {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Hollow circular bullet node sitting on the track */
.timeline-node__bullet {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 2px solid #e53935;
    display: inline-block;
    box-sizing: border-box;
    flex-shrink: 0;
    position: relative;
    z-index: 3;
}

/* Red numeric step indicator: 02, 03... */
.timeline-node__index {
    font-size: 13px;
    font-weight: 700;
    color: #e53935;
    letter-spacing: 0.06em;
    font-family: inherit;
    line-height: 1;
}

/* Date range: 2011–2016, 2022–TODAY */
.timeline-period {
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
    letter-spacing: 0.05em;
    font-family: inherit;
    line-height: 1;
    white-space: nowrap;
}

/* ==========================================
   RIGHT COLUMN: Top Divider, Eyebrow, Title, Body, Badges
   ========================================== */
.timeline-col--body {
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 0;
}

/* Subtle continuous horizontal divider line */
.timeline-content__divider {
    width: 100%;
    height: 0;
    border-top: 1px solid #e5e5e5;
    margin: 8px 0 24px 0; /* Center sits exactly at 8px to align with bullet center */
    box-sizing: border-box;
}

.timeline-content__body {
    display: flex;
    flex-direction: column;
}

/* Eyebrow milestone tag: THE FOUNDATION */
.timeline-content__eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #e53935;
    margin-bottom: 12px;
    display: block;
    line-height: 1.2;
}

/* Primary Milestone Title */
.timeline-content__title {
    font-size: 34px;
    line-height: 1.2;
    font-weight: 400;
    color: #1a1a1a;
    letter-spacing: -0.02em;
    margin: 0 0 16px 0;
    font-family: inherit;
}

/* Milestone Description / Paragraph */
.timeline-content__desc {
    font-size: 15px;
    line-height: 1.6;
    color: #555555;
    margin: 0 0 24px 0;
    max-width: 720px;
}

.timeline-content__desc p {
    margin: 0 0 1em 0;
}

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

/* Pill Badges Container */
.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Individual Pill Badge */
.timeline-tag {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background-color: #e7e5e0;
    color: #222222;
    padding: 6px 13px;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* ==========================================
   RESPONSIVE DESIGN (Tablets & Mobile: max-width 1024px)
   Both Tablet and Mobile use the clean, full-width stacked layout
   ========================================== */
@media (max-width: 1024px) {
    .elementor .timeline-row,
    .elementor-widget-custom_history_timeline .timeline-row,
    .timeline-container .timeline-row,
    .timeline-row {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        row-gap: 16px !important;
        width: 100% !important;
    }

    /* Meta bar sits horizontally on top */
    .timeline-col--meta {
        width: 100% !important;
    }

    .timeline-meta-inner {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: 100% !important;
        height: auto !important;
    }

    .timeline-node {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
    }

    /* Push the date cleanly to the right edge of the header */
    .timeline-period {
        margin-left: auto !important;
        font-size: 13px !important;
    }

    /* Content expands full width below */
    .timeline-col--body {
        width: 100% !important;
    }

    /* Hide vertical axis line to prevent awkward line breaks/overflows */
    .timeline-track {
        display: none !important;
    }

    /* Subtle divider separating header and body */
    .timeline-content__divider {
        display: block !important;
        margin: 4px 0 16px 0 !important;
    }

    .timeline-content__title {
        font-size: 28px !important;
        line-height: 1.25 !important;
        margin-bottom: 14px !important;
    }

    .timeline-content__desc {
        font-size: 15px !important;
        line-height: 1.6 !important;
        margin-bottom: 20px !important;
    }

    .timeline-items {
        gap: 52px !important;
    }
}

/* Specific Mobile Refinements (max-width 767px) */
@media (max-width: 767px) {
    .timeline-content__title {
        font-size: 24px !important;
        margin-bottom: 12px !important;
    }

    .timeline-content__desc {
        font-size: 14px !important;
        line-height: 1.55 !important;
        margin-bottom: 18px !important;
    }

    .timeline-items {
        gap: 44px !important;
    }
}
