/**
 * CSS File: history.css
 * 2026-05-18 | Final checked
 */

.l-history-section {
  background-color: #a9e3e4;
}

.p-history-content-wrap {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

.p-history-scroll-box {
  position: relative;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  perspective: 1px;
  perspective-origin: 50% 50%;
}

.p-history-scroll-box::before,
.p-history-scroll-box::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 100px;
  z-index: 25;
  pointer-events: none;
}

.p-history-scroll-box::before {
  top: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.05) 50%,
    rgba(0, 0, 0, 0) 100%
  );
}

.p-history-scroll-box::after {
  bottom: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.05) 50%,
    rgba(0, 0, 0, 0) 100%
  );
}

.p-history-bg-decor {
  position: absolute;
  top: 100px;
  left: 0;
  width: 100%;
  height: 200%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  opacity: 0.35;
  pointer-events: none;
  z-index: 10;
  transform-style: preserve-3d;
  transform: translateZ(-1px) scale(2) scaleY(-1);
}

.p-history-bg-decor__img {
  width: 50%;
  height: auto;
  object-fit: contain;
}

.p-history-scroll-content {
  position: relative;
  z-index: 20;
  height: 550px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 60px 24px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.p-history-scroll-content::-webkit-scrollbar {
  display: none;
}

.p-history-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.p-history-item {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s ease;
  transform: scale(0.95);
}

.p-history-item.is-active {
  background: rgba(255, 255, 255, 0.95);
  transform: scale(1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.p-history-item__year {
  position: relative;
  width: 90px;
  height: 90px;
  flex-shrink: 0;
}

.p-history-item__year-bg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.p-history-item__year-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  font-size: 1.1rem;
}

.p-history-item__body {
  flex: 1;
  text-align: left;
}

.p-history-item__title {
  font-size: 1.325rem;
  color: #555;
  margin: 0 0 10px;
  font-weight: bold;
  line-height: 1.4;
}

.p-history-item__desc {
  font-size: 1.075rem;
  color: #666;
  line-height: 1.6;
  margin: 0;
}

.p-history-topic-list {
  margin-top: 15px;
}

.p-history-topic {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px dashed #ddd;
}

.p-history-topic__label {
  display: inline-block;
  font-size: 0.8875rem;
  background-color: #f69381;
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: bold;
  margin-bottom: 6px;
}

.p-history-topic__sub {
  font-size: 0.95rem;
  font-weight: bold;
  color: #555;
  margin: 0 0 6px;
}

.p-history-topic__link {
  font-size: 1.0125rem;
  color: #50bae7;
  text-decoration: underline;
  display: block;
  line-height: 1.4;
}

.p-history-indicator {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 30;
  pointer-events: none;
}

.p-history-indicator__bar {
  width: 6px;
  height: 180px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.p-history-indicator__progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: #f69381;
}

.p-history-indicator__text {
  writing-mode: vertical-lr;
  font-size: 0.6875rem;
  font-weight: bold;
  color: #a7abb4;
  letter-spacing: 0.2em;
  text-align: center;
  text-transform: uppercase;
}

@media screen and (min-width: 768px) {
  .p-history-scroll-content {
    height: 650px;
    padding: 60px 60px;
  }

  .p-history-item {
    flex-direction: row;
    padding: 30px;
    gap: 30px;
  }

  .p-history-item__year {
    width: 100px;
    height: 100px;
    margin: 0;
  }

  .p-history-item__year-text {
    font-size: 1.45rem;
  }

  .p-history-item__title {
    font-size: 1.575rem;
  }

  .p-history-topic__link:hover {
    text-decoration: none;
  }

  .p-history-item__desc {
    font-size: 1.2rem;
  }

  .p-history-indicator {
    right: 20px;
  }

  .p-history-indicator__bar {
    height: 240px;
  }
}
