.history {
  position: relative;
  width: 100%;
  padding-top: 100px;
  padding-bottom: 143px;
}
.history__intro {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.history__intro__background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.history__intro__background img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.history__intro__menu {
  position: absolute;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  align-content: center;
  flex-wrap: wrap;
  background: #fff;
  padding-left: calc((100vw - 1420px) / 2);
  z-index: 2;
}
.history__intro__menu__item {
  position: relative;
  display: flex;
  color: #afafaf;
  min-width: 198px;
  padding: 20px 25px;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  background: #fff;
  font-family: Pretendard, sans-serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 140%;
  cursor: pointer;
  transition: color 0.3s ease;
}
.history__intro__menu__item::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 100%;
  height: 4px;
  background-color: #0075D0;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}
.history__intro__menu__item:hover {
  color: #0075D0;
}
.history__intro__menu__item:hover::after,
.history__intro__menu__item.active::after {
  transform: translateX(-50%) scaleX(1);
}
.history__intro__menu__item.active {
  color: #0075D0;
}
.history__intro__menu__bar {
  position: relative;
  width: 2px;
  height: 15px;
  background: #d4d4d4;
}
.history__intro__contents {
  display: flex;
  flex-direction: column;
  padding-top: 190px;
  padding-bottom: 150px;
  gap: 23px;
  position: relative;
  max-width: 1420px;
  margin: 0 auto;
  align-items: flex-end;
}
.history__intro__contents__title {
  width: 707px;
  color: #fff;
  text-align: right;
  font-family: Raleway, sans-serif;
  font-size: 90px;
  font-weight: 300;
  line-height: 110%;
}
.history__intro__contents__title span {
  font-weight: 600;
}
.history__intro__contents__paragraph {
  color: #fff;
  font-family: Pretendard, sans-serif;
  font-size: 32px;
  font-weight: 500;
  line-height: 140%;
  letter-spacing: -0.64px;
  text-align: right;
}
.history__contents {
  position: relative;
  max-width: 1420px;
  margin: 0 auto;
  padding: 133px 40px;
  box-sizing: border-box;
}
.history__contents__title {
  color: #111;
  text-align: center;
  font-family: Raleway, sans-serif;
  font-size: 70px;
  font-weight: 600;
  line-height: 140%;
}
.history__contents__timeline {
  position: relative;
  margin-top: 80px;
}
.history__contents__timeline__dot {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}
.history__contents__timeline__line {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 100%;
  background: #006c96;
}
.history__contents__timeline__list {
  width: 100%;
  position: relative;
  list-style: none;
}
.history__contents__timeline__list__item {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding-bottom: 360px;
  width: 100%;
}
.history__contents__timeline__list__item__icon {
  position: relative;
  margin-top: 33px;
  z-index: 2;
}
.history__contents__timeline__list__item__icon span {
  display: block;
  width: 28px;
  height: 28px;
  background: #3cbca0;
  border-radius: 100%;
}
.history__contents__timeline__list__item__line {
  position: relative;
  width: 220px;
  height: 2px;
  background: #006c96;
  top: -55px;
  left: 155px;
}
.history__contents__timeline__list__item__line__dot {
  position: relative;
  background: #006c96;
  width: 15px;
  height: 15px;
  border-radius: 100%;
  top: -7px;
  left: 212px;
}
.history__contents__timeline__list__item__year {
  position: relative;
  color: #000;
  font-family: "Noto Sans", sans-serif;
  font-size: 35px;
  font-weight: 500;
  line-height: normal;
  letter-spacing: -0.7px;
  top: -110px;
  left: 200px;
}
.history__contents__timeline__list__item__text {
  display: flex;
  position: relative;
  top: -80px;
  left: 328px;
  flex-direction: column;
  width: 350px;
}
.history__contents__timeline__list__item__text__line {
  display: flex;
  position: relative;
  margin-bottom: 5px;
}
.history__contents__timeline__list__item__text__line__subject {
  color: #606060;
  font-family: "Noto Sans", sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: normal;
  letter-spacing: -0.32px;
  padding-left: 30px;
  flex-shrink: 0;
}
.history__contents__timeline__list__item__text__line__subject:before {
  content: "";
  position: absolute;
  left: 16px;
  top: 8px;
  width: 6px;
  height: 6px;
  background: #4d5459;
  border-radius: 50%;
}
.history__contents__timeline__list__item__text__line__value {
  color: #606060;
  font-family: "Noto Sans", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: -0.32px;
  margin-left: 4px;
}
.history__contents__timeline__list__item__thumbnail {
  position: absolute;
  right: 0;
  bottom: 0;
  border-radius: 30px;
  overflow: hidden;
}
.history__contents__timeline__list__item:nth-child(even) {
  margin-top: -220px;
}
.history__contents__timeline__list__item:nth-child(3),
.history__contents__timeline__list__item:nth-child(5),
.history__contents__timeline__list__item:nth-child(7) {
  margin-top: -160px;
}
.history__contents__timeline__list__item:nth-of-type(even)
  .history__contents__timeline__list__item__line {
  width: 415px;
  height: 2px;
  background: #3cbca0;
  top: -15px;
  left: unset;
  right: 210px;
}
.history__contents__timeline__list__item:nth-of-type(even)
  .history__contents__timeline__list__item__line__dot {
  background: #3cbca0;
  top: -7px;
  left: unset;
  right: 0px;
}
.history__contents__timeline__list__item:nth-of-type(3)
  .history__contents__timeline__list__item__line {
  width: 259px;
  left: 185px;
}
.history__contents__timeline__list__item:nth-of-type(3)
  .history__contents__timeline__list__item__line__dot {
  left: 259px;
}
.history__contents__timeline__list__item:nth-of-type(3)
  .history__contents__timeline__list__item__text {
  left: 380px;
}
.history__contents__timeline__list__item:nth-of-type(even)
  .history__contents__timeline__list__item__thumbnail {
  right: unset;
  left: 0;
}
.history__contents__timeline__list__item:nth-of-type(2)
  .history__contents__timeline__list__item__thumbnail,
.history__contents__timeline__list__item:nth-of-type(4)
  .history__contents__timeline__list__item__thumbnail {
  left: 180px;
  bottom: 80px;
}
.history__contents__timeline__list__item:nth-of-type(5)
  .history__contents__timeline__list__item__thumbnail {
  bottom: 40px;
}
.history__contents__timeline__list__item:nth-of-type(even)
  .history__contents__timeline__list__item__year {
  top: -66px;
  left: -340px;
}
.history__contents__timeline__list__item:nth-of-type(3)
  .history__contents__timeline__list__item__year {
  top: -110px;
  left: 250px;
}
.history__contents__timeline__list__item:nth-of-type(even)
  .history__contents__timeline__list__item__text {
  top: -40px;
  left: -212px;
}
.history__contents__timeline__list__item:nth-last-child(1) {
  padding-bottom: 0;
}

/* --- ✨ 타임라인 인터랙션을 위한 CSS --- */
.history__contents__timeline__line--progress {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 0;
  background: #006c96;
  transition: height 0.1s linear;
  z-index: 1;
}

/* PC에서만 애니메이션이 동작하도록 설정 */
@media (min-width: 1281px) {
  .history__contents__timeline__list__item__icon,
  .history__contents__timeline__list__item__line,
  .history__contents__timeline__list__item__line__dot,
  .history__contents__timeline__list__item__year,
  .history__contents__timeline__list__item__text,
  .history__contents__timeline__list__item__thumbnail {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  }
  .history__contents__timeline__list__item__line {
    transform: scaleX(0);
  }
  .history__contents__timeline__list__item:nth-of-type(odd)
    .history__contents__timeline__list__item__line {
    transform-origin: left;
  }
  .history__contents__timeline__list__item:nth-of-type(even)
    .history__contents__timeline__list__item__line {
    transform-origin: right;
  }
  .history__contents__timeline__list__item.is-visible
    .history__contents__timeline__list__item__icon {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
  }
  .history__contents__timeline__list__item.is-visible
    .history__contents__timeline__list__item__line {
    opacity: 1;
    transform: scaleX(1);
    transition-delay: 0.2s;
  }
  .history__contents__timeline__list__item.is-visible
    .history__contents__timeline__list__item__line__dot {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
  }
  .history__contents__timeline__list__item.is-visible
    .history__contents__timeline__list__item__year {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.5s;
  }
  .history__contents__timeline__list__item.is-visible
    .history__contents__timeline__list__item__text {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.6s;
  }
  .history__contents__timeline__list__item.is-visible
    .history__contents__timeline__list__item__thumbnail {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.8s;
  }
}

/* --- 📱 반응형 스타일 (사용자 코드) --- */
@media (max-width: 1440px) {
  .history__intro__menu {
    padding-left: 40px;
  }
  .history__intro__contents {
    padding-right: 40px;
    box-sizing: border-box;
  }
}

@media (max-width: 1280px) {
  .history {
    padding-top: 80px;
    padding-bottom: 150px;
  }
  .history__intro__contents {
    padding: 150px 40px 120px;
  }
  .history__intro__contents__title {
    font-size: 70px;
    width: auto;
  }
  .history__intro__contents__paragraph {
    font-size: 24px;
  }
  .history__intro__menu {
    padding-left: 0;
    justify-content: center;
  }
  .history__contents {
    padding: 100px 40px;
    padding-left: 0;
  }
  .history__contents__title {
    font-size: 50px;
    margin-bottom: 60px;
  }
  .history__contents__timeline__line {
    left: 10px;
    transform: none;
  }
  .history__contents__timeline__dot {
    display: none;
  }
  .history__contents__timeline__list__item,
  .history__contents__timeline__list__item:nth-of-type(even),
  .history__contents__timeline__list__item:nth-of-type(3),
  .history__contents__timeline__list__item:nth-of-type(5) {
    display: block;
    position: relative;
    padding: 0 0 60px 40px;
    margin: 0;
  }
  .history__contents__timeline__list__item:nth-child(7) {
    margin-top: 0;
  }
  .history__contents__timeline__list__item__icon {
    display: none;
  }
  .history__contents__timeline__list__item:nth-of-type(even)
    .history__contents__timeline__list__item__text {
    top: unset;
    left: unset;
  }
  .history__contents__timeline__list__item:nth-of-type(2)
    .history__contents__timeline__list__item__thumbnail,
    .history__contents__timeline__list__item:nth-of-type(4)
    .history__contents__timeline__list__item__thumbnail,
    .history__contents__timeline__list__item:nth-of-type(5)
    .history__contents__timeline__list__item__thumbnail {
    left: unset;
    bottom: unset;
  }
  .history__contents__timeline__list__item:nth-of-type(3)
    .history__contents__timeline__list__item__text {
    left: unset;
    top: unset;
  }
  .history__contents__timeline__list__item:nth-of-type(3)
    .history__contents__timeline__list__item__thumbnail {
    bottom: unset;
    left: unset;
  }
  .history__contents__timeline__list__item:nth-of-type(3)
    .history__contents__timeline__list__item__year {
    top: unset;
    left: unset;
  }
  .history__contents__timeline__list__item:nth-of-type(even)
    .history__contents__timeline__list__item__year {
    top: unset;
    left: unset;
  }
  .history__contents__timeline__list__item__year {
    position: relative;
    font-size: 42px;
    font-weight: 700;
    margin-top: 50px;
    margin-bottom: 20px;
  }
  .history__contents__timeline__list__item__text {
    background: #f0fbfc;
    padding: 20px;
    border-radius: 10px;
  }
  .history__contents__timeline__list__item__thumbnail {
    margin-top: 20px;
  }
  .history__contents__timeline__list__item__thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 10px;
  }
  .history__contents__timeline__list__item__line {
    display: none;
  }
  .history__contents__timeline__list__item > div {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    transform: none;
    width: auto;
  }
  .history__contents__timeline__list__item:nth-of-type(5) {
    padding-bottom: 0;
  }
  .history__contents__timeline__line--progress {
    left: 20px;
    transform: none;
  }
}

@media (max-width: 768px) {
  .history {
    padding-top: 80px;
  }
  .history__intro__contents {
    padding: 120px 20px 100px;
    align-items: center;
  }
  .history__intro__contents__title {
    font-size: 42px;
    text-align: center;
    width: auto;
  }
  .history__intro__contents__paragraph {
    font-size: 18px;
    text-align: center;
  }
  .history__intro__menu {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .history__intro__menu::-webkit-scrollbar {
    display: none;
  }
  .history__intro__menu__item {
    min-width: auto;
    font-size: 18px;
    width: auto;
    padding: 15px 20px;
    white-space: nowrap;
  }
  .history__contents {
    padding: 80px 20px;
    padding-bottom: 0;
  }
  .history__contents__title {
    font-size: 32px;
  }
  .history__contents__timeline__line {
    display: none;
  }
  .history__contents__timeline__line--progress {
    display: none;
  }
  .history__contents__timeline__list__item {
    padding: 0 0 !important;
  }
  .history__contents__timeline__list__item__year {
    font-size: 28px;
    text-align: center;
  }
  .history__contents__timeline__list__item__text__line__subject,
  .history__contents__timeline__list__item__text__line__value {
    font-size: 17px;
  }
  .history__contents__timeline__list__item__text__line {
    justify-content: center;
  }
  .history__contents__timeline__list__item__text__line__subject {
    padding: 0;
  }
  .history__contents__timeline__list__item__text__line__subject:before {
    display: none;
  }
  .history__contents__timeline__list__item__thumbnail {
    position: relative;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin-top: 50px;
    width: 200px !important;
    height: 200px !important;
    overflow: hidden;
    border-radius: 100%;
  }
  .history__contents__timeline__list__item__thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

@media (max-width: 480px) {
  .history {
    padding-top: 80px;
  }
  .history__intro__contents {
    padding: 80px 20px 190px;
  }
  .history__intro__menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 10px;
    width: 100%;
    left: 0;
    transform: none;
    padding: 10px;
    box-sizing: border-box;
    justify-items: center;
  }
  .history__intro__menu__item {
    width: 100%;
    font-size: 16px;
    padding: 12px 10px;
    text-align: center;
    white-space: normal;
  }
  .history__intro__menu__bar {
    display: none;
  }
}
