:root {
  --white: white;
  --arada-light: Arada-Light;
  --arada-regular: Arada-Regular;
  --arada-headline-bold: Arada-Headline-Bold;
}

body {
  overflow: visible;
}

.timeline-section {
  font-family: var(--arada-regular);
  z-index: 9;
  background-color: var(--white);
  color: #000;
  position: relative;
  overflow: visible;
}

.border-section {
  background-color: var(--white);
  height: 120px;
  position: relative;
  z-index: 10;
}

.timeline-section .container {
  max-width: calc(1190px + 32px);
  width: 100%;
  margin: 0 auto;
  padding: 0 16px;
}

.timeline_heading {
  text-align: center;
  background-color: var(--white);
  padding-bottom: 90px;
}

.timeline_heading-title {
  font-size: 48px;
  font-family: var(--arada-headline-bold);
  line-height: 1.3;
}

.timeline_heading-range {
  font-size: 40px;
  line-height: 1.3;
}

.timeline_component {
  position: relative;
  clip-path: inset(0);
}

.timeline_progress {
  z-index: 0;
  background-color: rgba(241, 241, 241, 1);
  width: 4px;
  height: 100%;
  position: absolute;
  left: calc((239 + 80 + 10 - 2) / 1190 * 100%);
}

.timeline_progress-bar {
  z-index: -1;
  background-color: #000;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%);
  width: 4px;
  height: 50vh;
  position: fixed;
  inset: 0 auto 50vh;
}

.timeline__list {
  width: 100%;
}

.timeline__item {
  display: flex;
}

.timeline__item--has-more:last-child .timeline__entry:last-child {
  max-height: 240px;
  overflow: hidden;
}

.timeline__year {
  flex: 0 0 calc((239 + 80) / 1190 * 100%);
  padding-top: 91px;
}

.timeline__year-text {
  font-family: var(--arada-light);
  color: #000;
  font-size: 100px;
  line-height: 1;
  position: sticky;
  top: 45vh;
}

.timeline__content {
  margin-left: 20px;
  position: relative;
  padding-left: 80px;
  flex: 1;
}

.timeline__entry {
  display: flex;
  padding: 60px 0;
}

.timeline__marker {
  justify-content: center;
  display: flex;
  transform: translateX(calc(-80px - 20px));
}

.timeline__dot {
  background-color: #000;
  width: 20px;
  height: 20px;
  position: sticky;
  top: 50vh;
  box-shadow: 0 0 0 10px #fff;
  transform: rotate(45deg);
}

.timeline__body {
  flex: 1;
  font-size: 14px;
  font-family: var(--arada-regular);
  line-height: 1.3;
  margin-left: -20px;
}

.timeline__location {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-bottom: 12px;
  font-family: var(--arada-regular);
}

.timeline__meta {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}

.timeline__category,
.timeline__status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 14px;
  width: max-content;
  font-family: var(--arada-regular);
}

.timeline__category img {
  width: 20px;
  height: 20px;
}

.timeline__category {
  color: #fff;
}

.timeline__status {
  color: #000;
  background-color: rgba(241, 241, 241, 1);
}

.timeline__status .icon-status {
  display: inline-flex;
  width: 16px;
  height: 16px;
}

.timeline__status .icon-status.is-ongoing {
  background: #1d428a;
  transform: rotate(45deg);
  width: 12px;
  height: 12px;
  margin: 4px;
}

.timeline__status .icon-status.is-completed {
  background: #008e6d;
  border-radius: 100%;
}

.timeline__body-bottom {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-right: 48px;
}

.timeline__body-text {
  flex: 0 1 calc((400 / 748) * 100%);
}

.timeline__title {
  font-size: 24px;
  margin-bottom: 12px;
  font-family: var(--arada-regular);
}

.timeline__highlights {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
  font-family: var(--arada-regular);
  font-size: 14px;
}

.timeline__highlights li {
  position: relative;
  color: rgba(81, 81, 81, 1);
  padding-left: 18px;
}

.timeline__highlights li::before {
  content: "";
  width: 6px;
  height: 6px;
  background-color: rgba(81, 81, 81, 1);
  border-radius: 50%;
  display: inline-block;
  position: absolute;
  left: 0;
  top: 25%;
}

.timeline__link,
.timeline__viewMore .timeline__viewMore-btn {
  display: inline-flex;
  padding: 9px 16px;
  background-color: #000;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.33;
  cursor: pointer;
  border: none;
}

.timeline__body-img {
  flex: 1 1 calc((348 / 748) * 100%);
  display: flex;
  cursor: pointer;
  position: relative;
  max-width: 300px;
  max-height: 200px;
}

.timeline__body-img .timeline__image {
  aspect-ratio: 300/200;
  object-fit: cover;
  object-position: center center;
  transition: 0.3s;
  border-radius: 12px;
  width: 100%;
}

.timeline__body-img:hover .timeline__image {
  transform: translateX(-33%) scale(1.667);
}

.timeline__body-img .timeline__icon-zoom-img {
  position: absolute;
  right: 12px;
  bottom: 12.5px;
  z-index: 1;
}

.timeline__body-img:hover .timeline__icon-zoom-img {
  display: none;
}

.overlay-fade-bottom {
  position: absolute;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #ffffff 100%);
  height: 230px;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: auto;
}

.overlay-fade-top {
  background-image: linear-gradient(#ffffff, #edebeb00);
  height: 80px;
  position: absolute;
  inset: 0% 0% auto;
}

.timeline__viewMore {
  position: relative;
  padding-top: 40px;
  text-align: center;
  background-color: var(--white);
  z-index: 10;
}

.timeline__viewMore .timeline__viewMore-btn {
  cursor: pointer;
  border: 0;
}

/* Modal/detail classes below (order unchanged) */
.timeline-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.timeline-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;

  visibility: hidden;
  pointer-events: none;
}

.timeline-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.timeline-detail-modal.is-open {
  visibility: visible;
  pointer-events: auto;
}

.timeline-detail-modal.is-open .timeline-detail__dialog {
  transform: translateX(0);
  transition: all 0.4s ease;
}

.timeline-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.75);
}

.timeline-detail-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.timeline-modal__dialog {
  display: flex;
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%) scale(0.8);
  aspect-ratio: 350 / 233;
  width: 100%;
  max-width: 350px;
  transition: transform 0.5s ease;
}

.timeline-modal.is-open .timeline-modal__dialog {
  transform: translate(-50%, -50%) scale(1);
}

.timeline-modal__img {
  width: 100%;
  height: auto;
  display: block;
  background: #fff;
  border-radius: 12px;
  object-fit: cover;
}

.timeline-modal__close {
  position: absolute;
  top: -40px;
  right: 0;
  background: #000;
  color: #fff;
  border: 0;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 18px;
}

.timeline-detail__dialog {
  max-width: 953px;
  width: 100%;
  height: 100vh;
  position: absolute;
  top: 0;
  right: 0;
  overflow-y: auto;
  background: white;

  transform: translateX(100%); /* fully off screen */
  transition: all 0.4s ease;
}

.timeline-detail__close {
  position: absolute;
  top: 40px;
  right: 40px;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 0;
  z-index: 2;
}

.timeline-detail__close img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.timeline-detail__image {
  display: flex;
  position: relative;
  z-index: 1;
}

.timeline-detail__image img {
  width: 100%;
  height: 572px;
  object-fit: cover;
}

.timeline-detail__card {
  width: 100%;
  max-width: 870px;
  margin: 0 auto;
  padding: 80px;
  position: relative;
  z-index: 2;
  margin-top: -170px;
  border-radius: 20px;
  color: white;
  margin-bottom: 64px;
}

.timeline-detail__card h3 {
  color: white;
  font-size: 40px;
  line-height: 1.3;
  font-weight: 700;
  font-family: Arada-Headline-Bold;
  margin-bottom: 32px;
}

.timeline-detail__date {
  font-family: Arada-Headline-Regular;
  font-weight: 400;
  font-size: 20px;
  line-height: 1.3;
  margin-bottom: 16px;
  display: block;
}

.timeline-detail__location {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
}

.timeline-detail__location-text {
  font-family: Arada-Regular;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.3;
}

.timeline-detail__category {
  border: 1px solid white;
}

.timeline-detail__wrapper {
  max-width: 750px;
  padding: 0 20px;
  margin: 0 auto;
  padding-bottom: 120px;
}

.timeline-detail__description {
  margin-bottom: 40px;
}

.timeline-detail__highlights-title {
  font-family: Arada-Bold;
  font-size: 28px;
  line-height: 1.3;
  font-weight: 700;
  border-bottom: 1px solid black;
  padding-bottom: 24px;
}

.timeline-detail__highlights li {
  border-bottom: 1px solid black;
  padding: 24px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.timeline-detail__highlight-count {
  font-family: Arada-Headline-Bold;
  font-size: 48px;
  line-height: 1.3;
}

.timeline-detail__highlight-text {
  font-family: Arada-Regular;
  font-size: 28px;
  line-height: 1.3;
  font-weight: 400;
}

.timeline__back-button {
  margin: 0 0 40px 40px;
  padding: 13px 20px;
  background: #000000;
  width: fit-content;

  a {
    color: #ffffff;
  }

  img {
    margin-right: 8px;
  }
}

@media screen and (max-width: 1199px) {
  .container {
    max-width: calc(900px + 32px);
  }

  .timeline_progress {
    left: calc((13 + 153 + 40 + 10 - 2) / 900 * 100%);
  }

  .timeline__year {
    flex: 0 0 calc((13 + 153 + 40) / 900 * 100%);
  }

  .timeline__year-text {
    font-size: 64px;
    text-align: right;
    padding-right: 40px;
  }

  .timeline__content {
    padding-left: 50px;
  }

  .timeline__marker {
    transform: translateX(calc((-50px - 20px)));
  }

  .timeline__body-bottom {
    padding-right: 0;
  }

  .timeline__body-img {
    max-width: 240px;
  }

  .timeline__body-img .timeline__image {
    aspect-ratio: 240/160;
  }
}

@media screen and (max-width: 991px) {
  .container {
    max-width: calc(720px + 32px);
  }

  .timeline_progress {
    left: calc((13 + 153 + 40 + 10 - 2) / 720 * 100%);
  }

  .timeline__year {
    flex: 0 0 calc((13 + 153 + 40) / 720 * 100%);
  }
}

@media screen and (max-width: 768px) {
  .container {
    max-width: 100%;
  }

  .timeline_progress {
    left: calc(20px - 2px - 4px);
  }

  .timeline__item {
    padding-top: 40px;
    padding-left: 50px;
    flex-direction: column;
  }

  .timeline__year {
    padding-top: 0;
  }

  .timeline__year-text {
    text-align: unset;
    padding-right: 0;
    padding-left: 20px;
    margin-bottom: 12px;
  }

  .timeline__title {
    font-size: 20px;
  }

  .timeline__body-bottom {
    flex-direction: column;
  }

  .timeline__content {
    margin-left: 0;
    padding-left: 0;
  }

  .timeline__entry {
    padding: 40px 0;
  }

  .timeline__content .timeline__entry:first-child {
    padding-top: 0;
  }

  .timeline__marker {
    transform: translateX(calc(-50px + 10px - 4px));
  }

  .timeline__meta {
    flex-direction: column;
  }

  .timeline__body-img:hover .timeline__image {
    transform: none;
  }

  .timeline__icon-zoom-img {
    position: absolute;
    right: 10px;
    bottom: 10px;
  }

  .timeline-detail__card {
    margin-top: -40px;
    max-width: calc(100% - 20px);
    padding: 32px 30px 40px 30px;
    margin-bottom: 40px;
  }

  .timeline-detail__wrapper {
    padding-bottom: 80px;
  }

  .timeline-detail__image img {
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 3;
  }

  .timeline-detail__close {
    width: 40px;
    height: 40px;
    top: 12px;
    right: 12px;
  }

  .timeline-detail__dialog {
    transform: translateY(100%); /* fully off screen */
    transition: all 0.5s ease;
  }

  .timeline-detail-modal.is-open .timeline-detail__dialog {
    transform: translateY(0);
    transition: all 0.5s ease;
  }

  .timeline-detail__highlight-text {
    font-size: 20px;
  }

  .timeline-detail__card h3 {
    font-size: 28px;
  }

  .timeline-detail__highlights-title {
    font-size: 20px;
  }

  .timeline__back-button {
    margin: 0 0 0 12px;

    img {
      margin: 0;
    }

    span {
      display: none;
    }
  }
}