/* =========================================================
   HISTORY PAGE
   첨부 이미지를 참고해 HTML/CSS로 재구성한 연혁 타임라인
========================================================= */

.history-section {
  position: relative;
  width: 100%;
  padding: 72px 0 105px;
  overflow: hidden;
  background: #fff;
  color: #666;
}

.history-shell {
  position: relative;
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 1500px;
}

.history-title {
  position: relative;
  z-index: 4;
  width: 100%;
  margin: 0 0 25px;
  color: #111;
  font-size: clamp(28px, 2.2vw, 38px);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  letter-spacing: -0.04em;
}

.history-timeline {
  --line-color: #38b88b;
  --line-x: 50%;
  position: relative;
  z-index: 3;
  width: 100%;
  padding: 6px 0 0;
}

.history-timeline::before {
  content: "";
  position: absolute;
  top: 15px;
  bottom: 17px;
  left: var(--line-x);
  width: 5px;
  border-radius: 999px;
  background: var(--line-color);
  transform: translateX(-50%);
}

.history-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px 54px 82px minmax(0, 1fr);
  align-items: start;
  min-height: 76px;
  padding: 0 0 12px;
}

.history-item + .history-item {
  margin-top: 2px;
}

.history-node {
  position: absolute;
  top: 2px;
  left: 50%;
  z-index: 4;
  width: 25px;
  height: 25px;
  border: 4px solid var(--line-color);
  border-radius: 50%;
  background: #fff;
  transform: translateX(-50%);
  box-sizing: border-box;
}

.history-year {
  position: relative;
  z-index: 4;
  padding-top: 0;
  color: #111;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.history-desc {
  position: relative;
  z-index: 4;
  margin-top: -2px;
  color: #737373;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -0.035em;
}

.history-desc p {
  margin: 0;
}

.history-desc strong {
  color: #454545;
  font-weight: 800;
}

/* 오른쪽 배치 */
.history-item.is-right .history-year {
  grid-column: 4;
  text-align: left;
}

.history-item.is-right .history-desc {
  grid-column: 5;
  padding-left: 24px;
  text-align: left;
}

.history-item.is-right .history-desc::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-color);
}

.history-item.is-right::after {
  content: "";
  position: absolute;
  top: 13px;
  left: calc(50% + 13px);
  width: 25px;
  border-top: 2px dotted #c8c8c8;
}

/* 왼쪽 배치 */
.history-item.is-left .history-year {
  grid-column: 2;
  grid-row: 1;
  text-align: right;
}

.history-item.is-left .history-desc {
  grid-column: 1;
  grid-row: 1;
  padding-right: 24px;
  text-align: right;
}

.history-item.is-left .history-desc::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-color);
}

.history-item.is-left::after {
  content: "";
  position: absolute;
  top: 13px;
  right: calc(50% + 13px);
  width: 25px;
  border-top: 2px dotted #c8c8c8;
}

/* 긴 연도 블록이 이미지처럼 여유 있게 보이도록 */
.history-item:nth-child(5)  { min-height: 150px; }
.history-item:nth-child(7)  { min-height: 130px; }
.history-item:nth-child(8)  { min-height: 220px; }
.history-item:nth-child(9)  { min-height: 285px; }
.history-item:nth-child(10) { min-height: 195px; }
.history-item:nth-child(11) { min-height: 155px; }
.history-item:nth-child(12) { min-height: 165px; }
.history-item:nth-child(13) { min-height: 125px; }
.history-item:nth-child(14) { min-height: 135px; }
.history-item:nth-child(15) { min-height: 145px; }
.history-item:nth-child(16) { min-height: 125px; }
.history-item:nth-child(17) { min-height: 150px; }

/* =========================================================
   장식 패턴 - 데스크톱 / 태블릿 / 모바일 공통
   내용보다 뒤에 있으면서도 충분히 보이도록 대비 강화
========================================================= */

.history-orb,
.history-fade-dot {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.history-orb {
  border-radius: 50%;
  overflow: hidden;
}

/* 우측 상단 녹색 스트라이프 구체 */
.history-orb-right {
  top: 300px;
  right: -12px;
  width: 280px;
  aspect-ratio: 1;
  opacity: .50;
  background:
    repeating-linear-gradient(
      16deg,
      rgba(164, 236, 74, .98) 0 17px,
      rgba(255,255,255,.96) 17px 37px
    );
  box-shadow:
    inset -20px -20px 30px rgba(53, 211, 160, .22),
    0 8px 28px rgba(67, 190, 138, .06);
  transform: rotate(-10deg);
}

/* 좌측 중하단 녹색 스트라이프 구체 */
.history-orb-left-stripe {
  top: 1000px;
  left: -55px;
  width: 220px;
  aspect-ratio: 1;
  opacity: .42;
  background:
    repeating-linear-gradient(
      16deg,
      rgba(165, 235, 75, .96) 0 14px,
      rgba(255,255,255,.95) 14px 31px
    );
  box-shadow: inset -14px -14px 26px rgba(79, 215, 164, .18);
  transform: rotate(7deg);
}

/* 좌측 민트 도트 구체 */
.history-orb-left-dot {
  top: 1090px;
  left: 38px;
  width: 250px;
  aspect-ratio: 1;
  opacity: .48;
  background-color: rgba(91, 224, 222, .10);
  background-image:
    radial-gradient(
      circle,
      rgba(48, 211, 209, 1) 0 5px,
      transparent 6px
    );
  background-size: 23px 23px;
  box-shadow: inset -12px -12px 25px rgba(42, 192, 191, .08);
  transform: rotate(9deg);
}

/* 좌측 작은 하늘색 사선 구체 */
.history-orb-left-small {
  top: 1270px;
  left: 205px;
  width: 160px;
  aspect-ratio: 1;
  opacity: .58;
  background:
    repeating-linear-gradient(
      50deg,
      rgba(55, 210, 224, 1) 0 5px,
      rgba(255,255,255,.94) 5px 10px
    );
  transform: rotate(-5deg);
}

/* 은은한 보조 원 */
.history-fade-dot {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(99, 222, 190, .17);
}

.history-fade-dot-1 {
  top: 1195px;
  left: 330px;
}

.history-fade-dot-2 {
  top: 1420px;
  left: 90px;
}

/* 타임라인 글자가 패턴보다 위에 오도록 유지 */
.history-title,
.history-timeline {
  position: relative;
  z-index: 3;
}

/* =========================================================
   반응형
========================================================= */

@media (max-width: 1050px) {
  .history-shell {
    width: min(930px, calc(100% - 40px));
  }

  .history-year {
    font-size: 23px;
  }

  .history-desc {
    font-size: 15px;
  }

  .history-item {
    grid-template-columns: minmax(0, 1fr) 72px 46px 72px minmax(0, 1fr);
  }

  .history-orb-right {
    right: -65px;
    width: 235px;
  }

  .history-orb-left-stripe {
    left: -78px;
    width: 195px;
  }

  .history-orb-left-dot {
    left: -5px;
    width: 220px;
  }

  .history-orb-left-small {
    left: 170px;
  }
}

@media (max-width: 760px) {
  .history-section {
    padding: 52px 0 72px;
  }

  .history-shell {
    width: calc(100% - 34px);
    min-height: 0;
  }

  .history-title {
    margin-bottom: 36px;
    text-align: left;
    padding-left: 55px;
  }

  .history-timeline {
    --line-x: 22px;
  }

  .history-timeline::before {
    left: 22px;
  }

  .history-item {
    display: block;
    min-height: 0 !important;
    margin: 0 0 34px !important;
    padding: 0 0 0 58px;
  }

  .history-node {
    left: 22px;
    top: 2px;
  }

  .history-item::after {
    left: 35px !important;
    right: auto !important;
    width: 18px !important;
  }

  .history-item.is-left .history-year,
  .history-item.is-right .history-year {
    display: block;
    padding: 0;
    text-align: left;
    font-size: 22px;
  }

  .history-item.is-left .history-desc,
  .history-item.is-right .history-desc {
    display: block;
    margin-top: 8px;
    padding: 0 0 0 18px;
    text-align: left;
    font-size: 14px;
    line-height: 1.58;
  }

  .history-item.is-left .history-desc::after {
    display: none;
  }

  .history-item.is-left .history-desc::before,
  .history-item.is-right .history-desc::before {
    content: "";
    position: absolute;
    top: 7px;
    left: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #38b88b;
  }

  /* 모바일에서도 장식 패턴을 숨기지 않고 재배치 */
  .history-orb-right {
    top: 255px;
    right: -78px;
    width: 178px;
    opacity: .38;
  }

  .history-orb-left-stripe {
    display: block;
    top: 760px;
    left: -90px;
    width: 150px;
    opacity: .30;
  }

  .history-orb-left-dot {
    top: 1170px;
    left: -92px;
    width: 172px;
    opacity: .30;
    background-size: 19px 19px;
  }

  .history-orb-left-small {
    display: block;
    top: 1490px;
    left: auto;
    right: -48px;
    width: 96px;
    opacity: .38;
  }

  .history-fade-dot {
    display: block;
    width: 52px;
    height: 52px;
    opacity: .75;
  }

  .history-fade-dot-1 {
    top: 960px;
    left: auto;
    right: 12px;
  }

  .history-fade-dot-2 {
    top: 1710px;
    left: -5px;
  }
}


@media (max-width: 480px) {
  .history-orb-right {
    right: -82px;
    width: 162px;
    opacity: .34;
  }

  .history-orb-left-stripe {
    left: -92px;
    width: 142px;
    opacity: .26;
  }

  .history-orb-left-dot {
    left: -102px;
    width: 160px;
    opacity: .26;
  }

  .history-orb-left-small {
    right: -52px;
    width: 88px;
    opacity: .34;
  }
}

/* =========================================================
   Q&A 상단 배너 모바일 이미지 위치 보정
   - 모바일에서 Q&A 큐브 3개가 잘리지 않도록 표시
   - indexboard.html 내부의 !important 규칙보다 우선하도록
     선택자 우선순위를 높여 적용
========================================================= */

@media (max-width: 760px) {
  body .product-hero .product-hero-visual {
    background-size: auto 100% !important;
    background-position: 76% center !important;
    background-repeat: no-repeat !important;
  }
}

@media (max-width: 480px) {
  body .product-hero {
    min-height: 190px !important;
  }

  body .product-hero .product-hero-visual {
    background-size: auto 100% !important;
    background-position: 76% center !important;
  }
}