.medirex-timeline-premium,
.medirex-timeline-premium * {
  box-sizing: border-box;
}

.medirex-timeline-premium {
  --mx-blue: #42a6cc;
  --mx-orange: #ff6700;
  --mx-title: #2d2d2d;
  --mx-text: #000000;
  --mx-muted: #8e8e8e;
  --mx-border: #e9e9e9;
  --mx-bg: #ffffff;
  --mx-head-max: 760px;
  --mx-wrap-max: 1180px;
  width: 100%;
  padding: 20px 0 12px;
  background: transparent;
  position: relative;
}

.medirex-timeline-wrap {
  width: 100%;
  max-width: var(--mx-wrap-max);
  margin: 0 auto;
  position: relative;
  padding: 0 8px;
}

.medirex-timeline-head {
  max-width: var(--mx-head-max);
  margin: 0 auto 30px;
  text-align: center;
}

.medirex-timeline-head .mx-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mx-muted);
}

.medirex-timeline-head .mx-kicker::before {
  content: '';
  width: 28px;
  height: 2px;
  border-radius: 20px;
  background: var(--mx-orange);
  flex: 0 0 28px;
}

.medirex-timeline-head h2 {
  margin: 0 0 10px;
  font-size: 42px;
  line-height: 0.96;
  letter-spacing: -0.04em;
  color: var(--mx-title);
  font-weight: 400;
  text-wrap: balance;
}

.medirex-timeline-head h2 span {
  color: var(--mx-blue);
}

.medirex-timeline-head p {
  margin: 0 auto;
  max-width: 640px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--mx-text);
  text-wrap: pretty;
}

.medirex-timeline-core {
  position: relative;
  padding: 2px 0;
}

.medirex-timeline-core::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  background: linear-gradient(
    180deg,
    rgba(66, 166, 204, 0.1) 0%,
    rgba(66, 166, 204, 0.35) 18%,
    rgba(255, 103, 0, 0.3) 50%,
    rgba(66, 166, 204, 0.16) 100%
  );
  border-radius: 30px;
}

.mx-row {
  position: relative;
  display: flex;
  width: 100%;
  margin-bottom: 16px;
}

.mx-row:last-child {
  margin-bottom: 0;
}

.mx-row.left {
  justify-content: flex-start;
}

.mx-row.right {
  justify-content: flex-end;
}

.mx-row-inner {
  width: calc(50% - 34px);
  position: relative;
}

.mx-connector {
  position: absolute;
  top: 28px;
  width: 26px;
  height: 2px;
  background: linear-gradient(90deg, rgba(66, 166, 204, 0.2), rgba(255, 103, 0, 0.32));
}

.mx-row.left .mx-connector {
  right: -26px;
}

.mx-row.right .mx-connector {
  left: -26px;
}

.mx-dot {
  position: absolute;
  left: 50%;
  top: 19px;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--mx-blue);
  box-shadow: 0 0 0 5px rgba(66, 166, 204, 0.1);
  z-index: 3;
  transition: 0.25s ease;
}

.mx-row.active .mx-dot {
  border-color: var(--mx-orange);
  box-shadow: 0 0 0 7px rgba(255, 103, 0, 0.11);
}

.mx-card {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfb 100%);
  border: 1px solid var(--mx-border);
  border-radius: 22px;
  padding: 16px 18px 16px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.035);
  transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
}

.mx-card::after {
  content: '';
  position: absolute;
  right: -18px;
  bottom: -18px;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  opacity: 0.07;
  pointer-events: none;
}

.mx-row.orange .mx-card::after {
  background: var(--mx-orange);
}

.mx-row.blue .mx-card::after {
  background: var(--mx-blue);
}

.mx-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.06);
}

.mx-row.orange .mx-card:hover {
  border-color: rgba(255, 103, 0, 0.22);
}

.mx-row.blue .mx-card:hover {
  border-color: rgba(66, 166, 204, 0.22);
}

.mx-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.mx-card-line {
  width: 28px;
  height: 2px;
  border-radius: 20px;
  flex: 0 0 28px;
}

.mx-row.orange .mx-card-line {
  background: var(--mx-orange);
}

.mx-row.blue .mx-card-line {
  background: var(--mx-blue);
}

.mx-card-kicker {
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mx-muted);
}

.mx-year {
  font-size: 30px;
  line-height: 0.92;
  letter-spacing: -0.05em;
  color: var(--mx-blue);
  margin-bottom: 8px;
  font-weight: 400;
}

.mx-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.08;
  font-weight: 400;
  color: var(--mx-orange);
  letter-spacing: -0.02em;
  max-width: 95%;
  text-wrap: balance;
}

.mx-card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.52;
  color: var(--mx-text);
  max-width: 98%;
  text-wrap: pretty;
}

.mx-tags {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mx-tags li {
  padding: 8px 11px;
  border-radius: 999px;
  background: #f7f7f7;
  border: 1px solid #ececec;
  font-size: 11.5px;
  line-height: 1.1;
  color: var(--mx-title);
  white-space: nowrap;
}

.mx-fade {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.mx-fade.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .medirex-timeline-head h2 {
    font-size: 36px;
  }

  .mx-row-inner {
    width: calc(50% - 26px);
  }

  .mx-card {
    border-radius: 20px;
  }
}

@media (max-width: 767px) {
  .medirex-timeline-premium {
    padding: 10px 0 4px;
  }

  .medirex-timeline-wrap {
    padding: 0;
  }

  .medirex-timeline-head {
    margin: 0 auto 18px;
    padding: 0 6px;
  }

  .medirex-timeline-head h2 {
    font-size: 30px;
    line-height: 0.98;
  }

  .medirex-timeline-head p {
    font-size: 13px;
    line-height: 1.5;
  }

  .medirex-timeline-core::before {
    left: 12px;
    transform: none;
  }

  .mx-row,
  .mx-row.left,
  .mx-row.right {
    justify-content: flex-start;
    margin-bottom: 12px;
  }

  .mx-row-inner {
    width: calc(100% - 34px);
    margin-left: 34px;
  }

  .mx-dot {
    left: 12px;
    top: 18px;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    box-shadow: 0 0 0 4px rgba(66, 166, 204, 0.1);
  }

  .mx-row.active .mx-dot {
    box-shadow: 0 0 0 6px rgba(255, 103, 0, 0.11);
  }

  .mx-connector {
    left: -18px !important;
    right: auto !important;
    width: 18px;
    top: 24px;
  }

  .mx-card {
    border-radius: 18px;
    padding: 15px 14px 14px;
  }

  .mx-year {
    font-size: 25px;
    margin-bottom: 7px;
  }

  .mx-card h3 {
    font-size: 17px;
    margin-bottom: 7px;
  }

  .mx-card p {
    font-size: 13px;
    line-height: 1.48;
    max-width: 100%;
  }

  .mx-tags {
    gap: 6px;
    margin-top: 10px;
  }

  .mx-tags li {
    font-size: 11px;
    padding: 7px 10px;
    white-space: normal;
  }
}
