
/* ========================================
   HISTORY PAGE
======================================== */

.history-page {
  width: 100%;
  background: var(--color-black);
  color: var(--color-white);
  overflow: hidden;
}

.history-section {
  position: relative;
  padding: 90px 0 350px;

  background:
    var(--color-black) url('../images/history_bg.png')
    center bottom / 100% auto no-repeat;
}

.history-inner {
  position: relative;
  width: 100%;
  max-width: var(--inner);
  margin: 0 auto;

}

/* ========================================
   TITLE
======================================== */

.history-title {
  margin: 0 0 85px;

  font-size: var(--font-visual);
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  letter-spacing: -0.04em;
}

/* ========================================
   TIMELINE
======================================== */

.history-timeline {
  position: relative;
  padding-bottom: 50px;
}

/* 중앙 세로선 */
.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;

  transform: translateX(-50%);

  background: linear-gradient(
    to bottom,
    var(--color-cyan) 0%,
    var(--color-blue-bright) 50%,
    var(--color-cyan) 100%
  );

  box-shadow:
    0 0 6px rgba(60, 205, 255, 0.9),
    0 0 14px rgba(0, 157, 255, 0.4);
}

/* 타임라인 마지막 화살표 */
.timeline-line::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;

  transform: translateX(-50%);

  width: 0;
  height: 0;

  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 12px solid var(--color-cyan);

  filter: drop-shadow(0 0 5px var(--color-cyan));
}

/* ========================================
   HISTORY GROUP
======================================== */

.history-group {
  position: relative;

  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 90px;
}

/* ========================================
   HISTORY VISUAL
======================================== */

.history-visual {
  width: 100%;
}

.history-visual img {
  display: block;
  width: 100%;
  height: auto;

  border-radius: 16px;
  object-fit: cover;
}

.history-visual-left {
  padding-right: 10px;
}

.history-visual-right {
  align-self: start;
  padding-left: 10px;
}

/* ========================================
   HISTORY EVENTS
======================================== */

.history-events {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 35px;
}

.history-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 30px;

  min-height: 30px;
}

/* 타임라인 원형 포인트 */
.history-item::before {
  content: "";
  position: absolute;
  top: 10px;

  width: 11px;
  height: 11px;

  border-radius: 50%;
  background: var(--color-cyan);

  box-shadow:
    0 0 5px var(--color-cyan),
    0 0 12px rgba(46, 190, 255, 0.8);

  z-index: 2;
}

/* 오른쪽 연혁 포인트 */
.history-events-right .history-item::before {
  left: -51px;
}

/* 왼쪽 연혁 포인트 */
.history-events-left .history-item::before {
  right: -51px;
}

/* 날짜 */
.history-date {
  flex-shrink: 0;
 width: 100px;
  font-size: var(--font-lg);
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-blue-bright);
}

/* 내용 */
.history-item p {
  margin: 0;
  padding-top: 5px;

  font-size: var(--font-base);
  font-weight: 400;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

/* ========================================
   RIGHT EVENTS
======================================== */

.history-events-right {
  padding-left: 0;
}

.history-events-right .history-item {
  flex-direction: row;
}

/* ========================================
   LEFT EVENTS
======================================== */

.history-events-left {
  padding-right: 0;
}

.history-events-left .history-item {
  flex-direction: row-reverse;
  text-align: right;
}

/* ========================================
   BOTTOM GROUP
======================================== */

.history-group-bottom {
  margin-top: 55px;
}

.history-group-bottom .history-events {
  gap: 45px;
}

.history-group-bottom .history-visual {
  margin-top: 0;
}

/* ========================================
   EXTRA EVENT
======================================== */

.history-item-extra::before {
  display: none;
}



/* ========================================
   TABLET
======================================== */

@media (max-width: 1200px) {

  .history-group {
    column-gap: 60px;
  }

  .history-date {
    font-size: var(--font-lg);
  }

  .history-item {
    gap: 18px;
  }

  .history-item p {
    font-size: var(--font-sm);
  }

  .history-events-right .history-item::before {
    left: -36px;
  }

  .history-events-left .history-item::before {
    right: -36px;
  }

}

@media (max-width: 1024px) {

  .history-section {
    padding: 75px 0 100px;
  }

  .history-title {
    margin-bottom: 65px;
    font-size: var(--font-title-md);
  }

  .history-group {
    column-gap: 45px;
  }

  .history-events {
    gap: 30px;
  }

  .history-item {
    flex-wrap: wrap;
    gap: 5px;
  }

  .history-date {
    width: 100%;
    font-size: var(--font-base);
  }

  .history-item p {
    width: 100%;
    padding-top: 0;
    font-size: var(--font-xs);
  }

  .history-events-right .history-item::before {
    left: -28px;
  }

  .history-events-left .history-item::before {
    right: -28px;
  }

  .history-item-extra .history-date {
    display: none;
  }

}

/* ========================================
   MOBILE
======================================== */

@media (max-width: 767px) {

  .history-section {
    padding: 65px 0 85px;
    background-size: auto 100%;
  }

  .history-inner {
    padding: 0 20px;
  }

  .history-title {
    margin-bottom: 50px;
    font-size: var(--font-title-sm);
  }

  /* 모바일은 타임라인을 왼쪽에 배치 */
  .history-timeline {
    padding-left: 24px;
    padding-bottom: 30px;
  }

  .timeline-line {
    left: 0;
    transform: none;
  }

  .history-group {
    display: flex;
    flex-direction: column;
    gap: 30px;
  }

  .history-group-top {
    flex-direction: column;
  }

  .history-group-bottom {
    margin-top: 35px;
  }

  /* 모바일에서는 이미지를 연혁 위/아래에 배치 */
  .history-visual {
    padding: 0;
  }

  .history-visual img {
    border-radius: 10px;
  }

  .history-events {
    gap: 25px;
  }

  .history-item,
  .history-events-left .history-item {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 6px;
  }

  .history-item::before,
  .history-events-right .history-item::before,
  .history-events-left .history-item::before {
    left: -29px;
    right: auto;
    top: 8px;

    width: 10px;
    height: 10px;
  }

  .history-date {
    width: auto;
    font-size: var(--font-lg);
  }

  .history-item p {
    width: 100%;
    font-size: var(--font-xs);
    line-height: 1.7;
  }

  .history-item-extra::before {
    display: none;
  }

  .history-item-extra .history-date {
    display: none;
  }

  .history-group-bottom .history-events {
    gap: 25px;
  }

}

/* ========================================
   SMALL MOBILE
======================================== */

@media (max-width: 380px) {

  .history-date {
    font-size: var(--font-base);
  }

  .history-item p {
    font-size: var(--font-xs);
  }

}

/* ========================================
   SUBPAGE SCROLL REVEAL (ADDED ONLY)
   Existing layout / hover / responsive styles preserved.
======================================== */
@media (prefers-reduced-motion: no-preference) {
  .cs-motion-ready .cs-reveal {
    opacity: 0;
    translate: 0 32px;
    transition: opacity .85s ease, translate .85s cubic-bezier(.2,.7,.2,1);
    transition-delay: var(--cs-delay, 0ms);
  }
  .cs-motion-ready .cs-reveal.cs-from-left { translate: -48px 0; }
  .cs-motion-ready .cs-reveal.cs-from-right { translate: 48px 0; }
  .cs-motion-ready .cs-reveal.cs-from-scale { scale: .96; transition-property: opacity, translate, scale; }
  .cs-motion-ready .cs-reveal.cs-visible {
    opacity: 1;
    translate: 0 0;
    scale: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cs-reveal { opacity: 1 !important; translate: none !important; scale: 1 !important; }
}
