  .timeline-outer {
    position: relative;
    margin-bottom: 40px;
  }
  .timeline-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 10px 10px 40px 10px;
    cursor: grab;
    /* nicer scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #3498db #e6e9ed;
  }
  .timeline-scroll.dragging {
    cursor: grabbing;
    scroll-behavior: auto;
    user-select: none;
  }
  .timeline-scroll::-webkit-scrollbar {
    height: 6px;
  }
  .timeline-scroll::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
  }
  .timeline-scroll::-webkit-scrollbar-track {
    background: #e6e9ed;
  }
  .timeline {
    position: relative;
    display: flex;
    align-items: center;
    width: max-content;
    min-width: 100%;
  }
  .timeline-point {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 0 0 130px;   /* fixed width per point so it scrolls instead of squeezing */
    flex-direction: column;
    align-items: center;
    cursor: pointer;
  }
  /* Line segment connecting this point to the next one — travels with the content when scrolling */
  .timeline-point:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 10px;              /* half of the 20px dot height, centers the line on the dot */
    left: 50%;
    width: 100%;
    height: 4px;
    background: #d0d7de;
    z-index: -1;
  }
  .nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #d0d7de;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    font-size: 16px;
    color: #3498db;
    user-select: none;
    transition: opacity 0.2s ease;
  }
  .nav-arrow:hover {
    background: #3498db;
    color: #fff;
  }
  .nav-arrow.left { left: -18px; }
  .nav-arrow.right { right: -18px; }
  .nav-arrow.disabled {
    opacity: 0.3;
    pointer-events: none;
  }
  .timeline-dot {
    width: 20px;
    height: 20px;
    background: #fff;
    border: 4px solid #3498db;
    border-radius: 50%;
    transition: all 0.25s ease;
  }
  .timeline-year {
    margin-top: 12px;
    font-weight: 600;
    color: #000;
    font-size: 15px;
    padding: 4px 10px;
    border-radius: 6px;
    transition: all 0.25s ease;
  }
  .timeline-point:hover .timeline-dot {
    background: #3498db;
    transform: scale(1.2);
  }
  .timeline-point.active .timeline-dot {
    background: #ff0000;
    border-color: #ff0000;
    transform: scale(1.3);
  }
  .timeline-point.active .timeline-year {
    color: #fff;
    background: #ff0000;
  }
  .timeline-details {
    position: relative;
  }
  .timeline-content {
    display: none;
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    width: 360px;
    min-height: auto;
    margin: 0 auto;
    text-align: center;
  }
  .timeline-content.active {
    display: block;
  }
  .timeline-content img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    margin-bottom: 14px;
  }
  .timeline-content h3 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #ff0000;
    font-size: 20px;
  }
  .timeline-content p {
    color: #555;
    line-height: 1.5;
    margin-bottom: 0;
    font-size: 18px;
  }
  .fade {
    animation: fadeIn 0.35s ease;
  }
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* ---- Responsive ---- */
  @media (max-width: 768px) {
    body { padding: 40px 12px; }
    h2 { font-size: 22px; margin-bottom: 30px; }
    .timeline-point { flex-basis: 100px; }
    .timeline-dot { width: 16px; height: 16px; border-width: 3px; }
    .timeline-year { font-size: 13px; padding: 3px 8px; margin-top: 10px; }
    .nav-arrow { width: 30px; height: 30px; font-size: 13px; }
    .nav-arrow.left { left: -6px; }
    .nav-arrow.right { right: -6px; }
    .timeline-content { padding: 16px; width: 100%; max-width: 260px; }
    .timeline-content img { height: 140px; }
    .timeline-content h3 { font-size: 15px; }
    .timeline-content p { font-size: 13px; }
  }

  @media (max-width: 480px) {
    .timeline-point { flex-basis: 84px; }
    .timeline-dot { width: 14px; height: 14px; }
    .timeline-year { font-size: 12px; padding: 3px 6px; }
    /* Arrows get in the way on very small screens; swipe/scroll still works */
    .nav-arrow { display: none !important; }
  }