/* ================================
   History Page Styles
   ================================ */

.hero {
  position: relative;
  height: 412px;
  width: 100%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #aaa url(/static/history/img/history-hero.jpg) no-repeat center
    top;
  background-size: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(70, 66, 66, 0.3);
}

.hero__title {
  color: #fff;
  font-size: 48px;
  text-shadow: 4px 4px 4px rgba(0, 0, 0, 0.25);
  text-align: center;
  z-index: 1;
}

.scroll-indicator {
  display: none;
}

.history-section {
  padding: 88px 0 80px;
  background-color: #f5f5f2;
}

.history-main {
  display: flex;
  flex-direction: column;
  gap: 120px;
  font-size: 20px;
  color: #8d8d8d;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-item:nth-child(even) {
  flex-direction: row-reverse;
}

.history-item > img {
  display: block;
  width: calc(92% - 424px);
  max-width: 475px;
  border-radius: 50px;
}

.history-item__text {
  width: 45%;
  min-width: 424px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.history-item:nth-child(even) > .history-item__text {
  text-align: right;
}

.history-item__text > h2 {
  font-size: 28px;
  font-weight: 400;
  line-height: 1.2;
  color: #000;
}

.history-item__subtitle {
  font-size: 18px;
}

.link-to-next {
  padding: 100px 0 128px;
  background-color: #f5f5f2;
}

.link-to-next__button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 362px;
  height: 80px;
  border-radius: 40px;
  background-color: #6d6d67;
  color: #fff;
  font-size: 24px;
  margin: 0 auto;
}

.link-to-next__button span {
  padding: 0 48px;
  background: url(/static/history/img/right-arrow.png) no-repeat right center;
  background-size: 10px auto;
}

/* Responsive - Mobile */
@media (max-width: 768px) {
  /* 홈페이지 main: 헤더와 겹치도록 margin 제거 */
  main {
    margin-top: 0;
  }

  .hero {
    height: 65vh;
    height: 65svh;
    padding-top: var(--header-height);
    background-image: url(/static/history/img/history-hero-m.jpg);
  }

  .hero__title {
    font-size: 20px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.25);
  }

  .scroll-indicator {
    position: absolute;
    left: 50%;
    bottom: max(24px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    z-index: 1;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }

  .scroll-indicator::after {
    content: "";
    display: block;
    width: 44px;
    height: 13px;
    opacity: 0.9;
    animation: chevron-bounce 2s ease-in-out infinite;
    will-change: transform, opacity;
    background: url(/static/history/img/scroll-indicator.png) no-repeat center;
    background-size: 100%;
  }

  .history-section {
    padding-bottom: 56px;
  }

  .history-main {
    gap: 60px;
    font-size: 14px;
  }

  .history-item {
    flex-direction: column;
    gap: 20px;
  }

  .history-item:nth-child(even) {
    flex-direction: column;
  }

  .history-item > img {
    width: 280px;
    border-radius: 36px;
  }

  .history-item__text {
    width: 100%;
    min-width: unset;
    text-align: center;
    gap: 12px;
  }

  .history-item:nth-child(even) > .history-item__text {
    text-align: center;
  }

  .history-item__text > h2 {
    font-size: 22px;
  }

  .history-item__subtitle {
    font-size: 12px;
  }

  .link-to-next {
    padding: 24px 0 80px;
  }

  .link-to-next__button {
    width: 166px;
    height: 40px;
    border-radius: 20px;
    font-size: 16px;
  }

  .link-to-next__button span {
    padding: 0 20px;
    background-size: 5px auto;
  }
}

@keyframes chevron-bounce {
  0% {
    transform: translateY(-8px);
    opacity: 0.7;
  }
  45% {
    transform: translateY(8px);
    opacity: 1;
  }
  100% {
    transform: translateY(-8px);
    opacity: 0.7;
  }
}
