/* Wrapper */
.webcivix-timeline-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Scroll container */
.webcivix-timeline {
    position: relative;
    display: flex;
    gap: 5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    width: 100%;
    margin-left: -16px
}

/* Hide scrollbar */
.webcivix-timeline::-webkit-scrollbar {
    display: none;
}

/* ===== TIMELINE RAIL ===== */
.timeline-line {
    position: absolute;
    top: 15%;
    left: 7%;
    height: 4px;
    width: 86%;
    background: #000;
    pointer-events: none;
    z-index: 1;
}

/* Individual item */
.timeline-item {
    position: relative;
    min-width: 220px;
    background: none;
    border: none;
    text-align: center;
    cursor: pointer;
    padding-top: 2.5rem;
    color: #000;
}

/* Dot */
.timeline-dot {
    position: absolute;
    top: 1.4rem;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--timeline-color, #000);
    z-index: 2;
}

/* Date */
.timeline-date {
    display: block;
    margin-top: 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Title */
.timeline-title {
    display: block;
    margin-top: 0.4rem;
    font-size: 1rem;
}

/* Read more */
.timeline-read {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.85rem;
    text-decoration: underline;
}

/* Nav buttons */
.timeline-nav {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #000;
    padding: 2em 25px;
}

.timeline-nav:hover {
    opacity: 0.6;
    background: none;
    color: #000;
}

/* ===== SHADOWBOX MODAL ===== */
.timeline-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

/* Only show when NOT hidden */
.timeline-modal:not([hidden]) {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dimmed background */
.timeline-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}

/* Modal panel */
.timeline-modal-content {
    position: relative;
    background: #fff;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    padding: 2rem;
    border-radius: 6px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
    z-index: 1;
    overflow-y: auto;
}

/* Close button */
.timeline-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: none;
    border: none;
    color: #000;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

/* Modal image */
.timeline-modal-image {
    max-width: 100%;
    height: auto;
    margin-bottom: 1rem;
    display: block;
}

/* Modal typography */
.timeline-modal-title {
    margin-top: 0;
    font-size: 1.5rem;
}

.timeline-modal-description {
    font-size: 1rem;
    line-height: 1.6;
}
