:root {
    --ht-primary-color: #00193D;
}

.history-timeline-container-6f0d4b7f {
    width: 100%;
    margin: 0 auto;
    font-family: sans-serif;
}

.history-timeline-main-title-6f0d4b7f {
    text-align: center;
    margin-bottom: 40px;
    font-size: 32px;
    font-weight: bold;
}

.history-timeline-grid-6f0d4b7f {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: start;
}

.history-timeline-item-6f0d4b7f {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.history-timeline-image-6f0d4b7f {
    width: 100%;
    margin-bottom: 20px;
}

.history-timeline-image-6f0d4b7f img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover; /* Default, can be overridden by Elementor control */
    border-radius: 8px;
    display: block;
}

.history-timeline-pill-6f0d4b7f {
    display: inline-block;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 15px;
    z-index: 2;
}

.history-timeline-node-6f0d4b7f {
    width: 100%;
    height: 30px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.history-timeline-line-6f0d4b7f {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--ht-primary-color);
    transform: translateY(-50%);
    z-index: 1;
}

.history-timeline-item-6f0d4b7f:first-child .history-timeline-line-6f0d4b7f {
    left: 50%;
}

.history-timeline-item-6f0d4b7f:last-child .history-timeline-line-6f0d4b7f {
    right: 50%;
}

.history-timeline-dot-6f0d4b7f {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--ht-primary-color);
    z-index: 2;
    position: relative;
}

.history-timeline-desc-6f0d4b7f {
    font-size: 15px;
    line-height: 1.5;
    padding: 0 10px;
}

/* Tablet & Mobile Layout */
@media (max-width: 1024px) {
    .history-timeline-grid-6f0d4b7f {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px 20px;
    }
    
    /* Reset line behavior for 2-column grid */
    .history-timeline-item-6f0d4b7f .history-timeline-line-6f0d4b7f {
        left: 0;
        right: 0;
    }
    .history-timeline-item-6f0d4b7f:nth-child(odd) .history-timeline-line-6f0d4b7f {
        left: 50%;
    }
    .history-timeline-item-6f0d4b7f:nth-child(even) .history-timeline-line-6f0d4b7f {
        right: 50%;
    }
}

@media (max-width: 767px) {
    .history-timeline-grid-6f0d4b7f {
        display: flex;
        flex-direction: column;
        gap: 40px;
    }
    
    .history-timeline-item-6f0d4b7f {
        display: grid;
        grid-template-columns: 30px 1fr;
        grid-template-rows: auto auto auto;
        column-gap: 20px;
        text-align: left;
        align-items: start;
    }
    
    .history-timeline-node-6f0d4b7f {
        grid-column: 1;
        grid-row: 1 / 4;
        height: 100%;
        width: 100%;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        margin-bottom: 0;
        padding-top: 5px; /* Align dot roughly with top of image */
    }
    
    .history-timeline-line-6f0d4b7f {
        width: 2px;
        height: calc(100% + 40px); /* Bridge the gap to the next item */
        left: 50%;
        right: auto;
        top: 10px; /* Start below the dot */
        transform: translateX(-50%);
    }
    
    .history-timeline-item-6f0d4b7f:last-child .history-timeline-line-6f0d4b7f {
        display: none;
    }
    
    .history-timeline-image-6f0d4b7f {
        grid-column: 2;
        grid-row: 1;
        margin-bottom: 15px;
    }
    
    .history-timeline-pill-6f0d4b7f {
        grid-column: 2;
        grid-row: 2;
        justify-self: start;
        margin-bottom: 10px;
    }
    
    .history-timeline-desc-6f0d4b7f {
        grid-column: 2;
        grid-row: 3;
        padding: 0;
    }
}