/* Variables (keep yours, add these extras) */
#immigopro-timeline-wrapper {
  --imt-bg-color: #031625;
  --imt-accent-color: #1779cf;
  --imt-text-color: #ffffff;

  /* timeline/hover colors */
  --imt-bar-color: rgba(255,255,255,.92);
  --imt-bar-hover-color: #d41414; /* red on hover */

  /* overlay darkness */
  --imt-overlay-1: rgba(3, 22, 37, 0.45); /* normal */
  --imt-overlay-2: rgba(3, 22, 37, 0.78); /* hover */

  --imt-gap: 16px;
  --imt-radius: 16px;
}

/* Card = full background image */
#immigopro-timeline-wrapper .imt__card {
  position: relative;
  overflow: hidden;
  background: var(--imt-bg-color);
  color: var(--imt-text-color);
  aspect-ratio: 1 / 1.06;
}

/* Background image layer */
#immigopro-timeline-wrapper .imt__media {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 1;
}

/* Darkness + gradient overlay */
#immigopro-timeline-wrapper .imt__card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;

  /* Normal state: mild dark + bottom heavier gradient */
  background:
    linear-gradient(
      to bottom,
      rgba(3,22,37,0.35) 0%,
      rgba(3,22,37,0.55) 55%,
      rgba(3,22,37,0.82) 100%
    );
  opacity: 1;
  transition: opacity .25s ease;
}

/* Hover state: darker overall */
#immigopro-timeline-wrapper .imt__card:hover::before {
  background:
    linear-gradient(
      to bottom,
      rgba(3,22,37,0.55) 0%,
      rgba(3,22,37,0.78) 55%,
      rgba(3,22,37,0.92) 100%
    );
}

/* Timeline bar (white normal, red on hover) */
#immigopro-timeline-wrapper .imt__timeline-bar {
  position: absolute;
  top: 50px;
  left: 0px;
  right: 14px;
  height: 16px;
  z-index: 3;

  background: var(--imt-bar-color);
  border-radius: 0;
}

/* Right arrow tip */
#immigopro-timeline-wrapper .imt__timeline-bar::after {
  content: "";
  position: absolute;
  top: 0;
  right: -14px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 14px solid var(--imt-bar-color);
}

#immigopro-timeline-wrapper .imt__card:hover .imt__timeline-bar {
  background: var(--imt-bar-hover-color);
}
#immigopro-timeline-wrapper .imt__card:hover .imt__timeline-bar::after {
  border-left-color: var(--imt-bar-hover-color);
}

/* Body content layout */
#immigopro-timeline-wrapper .imt__body {
  position: relative;
  z-index: 4;
  height: 100%;
  padding: 26px 18px 20px;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
}

/* Year bubble (top center) */
#immigopro-timeline-wrapper .imt__year {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 74px;
  height: 74px;
  border-radius: 999px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 22px;
  font-weight: 800;
  line-height: 1;

  background: #ffffff;
  color: var(--imt-bar-hover-color);

  border: 0;
  padding: 0;
}

/* Hover year bubble: red with white text */
#immigopro-timeline-wrapper .imt__card:hover .imt__year {
  background: var(--imt-bar-hover-color);
  color: #ffffff;
}

/* Title: big in normal, smaller on hover (like your screenshots) */
#immigopro-timeline-wrapper .imt__title {
  margin: 0;
  font-weight: 100;
  letter-spacing: .2px;
  color: var(--imt-text-color);
  font-size: 30px;
}

/* Content hidden normally, revealed on hover */
#immigopro-timeline-wrapper .imt__content {
  font-size: 14px;
  line-height: 1.5;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(8px);
  transition: opacity 1s ease, max-height 1s ease, transform 1s ease;
}

#immigopro-timeline-wrapper .imt__card:hover .imt__content {
  opacity: .95;
  max-height: 220px; /* enough for your paragraph */
  transform: translateY(0);
}

/* Optional: add a subtle lift on hover (nice in carousel) */
#immigopro-timeline-wrapper .imt__card {
  transition: transform .5s ease, border-color .5s ease;
}
#immigopro-timeline-wrapper .imt__card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,.22);
}
