/* Link az egész kártyára */
.timeline-item {
    position: relative;
    display: flex;
    width: 100%;
    text-decoration: none;
    color: inherit;
    margin-bottom: -0.75em;
    margin-top: -0.75em;
    max-width: 1200px;
  }

 /* --- Mobil nézet --- */
 @media (max-width: 768px) {
  .timeline-item {
    padding-top: 1em;
    padding-bottom: 1em;
    margin-bottom: 0px;
    margin-top: 0px;
  }
}
  
  /* A kis csomópont a vonalon */
  .timeline-node {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #ffffff;
    border: 4px solid #b0b0b0;
    z-index: 1;
  }
  
  /* A kártya maga */
  .timeline-card {
    position: relative;
    width: 46%;
    margin: 0;
    padding: 10px;
    background: #ffffff;
    display: flex;
    gap: 16px;
    align-items: center;
    border-radius: 14px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition:
      border-color 0.2s ease,
      box-shadow 0.2s ease,
      transform 0.2s ease;
    z-index: 2;
  }
  
  /* Balos kártya: bal oldal, jobb oldalon van üres rész a vonalig */
  .timeline-item--left .timeline-card {
    margin-right: auto;
  }
  
  /* Jobbos kártya: jobb oldalra csúszik */
  .timeline-item--right .timeline-card {
    margin-left: auto;
  }
  
  /* Hover kiemelés */
  .timeline-card:hover {
    border-color: #b00000;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  }
  
  /* Ikon + szöveg */
  .timeline-icon img {
    width: 64px;
    height: 64px;
    border-radius: 10%;
    object-fit: cover;
  }
  
  .timeline-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #222222;
    margin-bottom: 4px;
  }
  
  .timeline-subtitle {
    font-size: 0.95rem;
    color: #555555;
  }
  
  /* --- Mobil nézet --- */
  @media (max-width: 768px) {
    /* A node és a vonal balra kerül (ezt a timeline.css-ben is állítottuk) */
    .timeline-node {
      left: 32px;
    }
  
    /* Minden kártya "jobb oldalra" – valójában teljes szélesség, de beljebb tolva */
    .timeline-card {
      width: calc(100% - 72px); /* 32px vonal + 40px extra hely */
      margin-left: 72px;
      margin-right: 0;
    }
  
    .timeline-item--left .timeline-card,
    .timeline-item--right .timeline-card {
      margin-left: 72px; /* mindkét irány ugyanoda kerül */
    }
  }

  /* Vízszintes vonal jobb oldali kártyához */
  .timeline-item--right .timeline-node:after {
    content: "";
    position: absolute;
    top: 50%;
    right: -40px;      /* kicsit kijön a kártyából */
    width: 40px;       /* a vonal hossza */
    height: 4px;
    background: #b0b0b0;
    transform: translateY(-50%);
  }
  
  /* Vízszintes vonal bal oldali kártyához */
  .timeline-item--left .timeline-node::after {
    content: "";
    position: absolute;
    top: 50%;
    left: -40px;       /* kijön balra */
    width: 40px;
    height: 4px;
    background: #b0b0b0;
    transform: translateY(-50%);
  }
  
  /* Függőleges vonal SZAKASZ a pöttyök között */
.timeline-item::after,
.timeline-item::before {
  content: "";
  position: absolute;
  left: 50%;
  width: 4px;
  background: #d0d0d0;
  transform: translateX(-50%);
  z-index: 0;
}

/* Szakasz a pötty FELETT */
.timeline-item::before {
  top: 0;
  bottom: 50%;
}

/* Szakasz a pötty ALATT */
.timeline-item::after {
  top: 50%;
  bottom: 0;
}

/* Az első elem fölött ne legyen vonal */
.timeline-item:first-child::before {
    display: none;
  }
  
  /* Az utolsó elem alatt ne legyen vonal */
  .timeline-item:last-child::after {
    display: none;
  }

  @media (max-width: 768px) {
    .timeline-item--left .timeline-node::after {
        right: -40px; 
        left: auto;
    }

    .timeline-item::after, .timeline-item::before {
        left: 32px;
    }
  }

@media (max-width: 400px) {
  .timeline-item::after, .timeline-item::before {
    left: 50%; 
  }
  .timeline-node {
    display: none;
  }

  .timeline-card {
      width: 100%;
      margin-left: auto;
  }

  .timeline-item--left .timeline-card, .timeline-item--right .timeline-card {
    margin-left: auto;
  }
}
  