/* 컨테이너 max-width 이 페이지만 1280px */
.history-container {
  width: min(1280px, calc(100% - 80px));
  margin: 0 auto;
}

/* =========================================================
  Period Filter
========================================================= */

.history-filter {
  border-top: 1px solid #edf1f5;
  border-bottom: 1px solid #e4eaf1;
  background: var(--color-bg);
}

.history-filter-inner {
  min-height: 90px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-filter-slogan {
  display: flex;
  flex-direction: column;
  color: #8b9ab0;
  font-size: 13px;
  line-height: 1.35;
}

.history-filter-slogan strong {
  font-weight: 700;
}

.history-filter-buttons {
  display: flex;
  align-items: center;
  gap: 36px;
}

.history-filter-buttons button {
  position: relative;
  height: 90px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #718198;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.history-filter-buttons button::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 3px;
  background: var(--color-primary);
  transform: translateX(-50%);
  transition: width var(--ease);
}

.history-filter-buttons button.active {
  color: var(--color-primary);
  font-weight: 700;
}

.history-filter-buttons button.active::after {
  width: 100%;
}

/* =========================================================
  History Content Layout
========================================================= */

.history-content {
  padding: 78px 0 120px;
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-subtle) 100%);
}

.history-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 65px;
}

/* =========================================================
  Left Sidebar
========================================================= */

.history-side {
  position: relative;
}

.history-side-sticky {
  position: sticky;
  top: 110px;
}

.history-side h2 {
  margin-top: 15px;
  color: #102f57;
  font-size: 31px;
  line-height: 1.35;
  letter-spacing: -0.045em;
}

.history-side > .history-side-sticky > p {
  margin-top: 20px;
  color: #73859b;
  font-size: 16px;
  line-height: 1.95;
}

/* Sidebar image */
.history-side-image {
  position: relative;
  margin-top: 38px;
  height: 360px;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #102f57;
  box-shadow: 0 20px 45px rgba(16, 47, 87, 0.14);
}

.history-side-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(3, 24, 48, 0.88) 100%);
}

.history-side-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.history-side-image-text {
  position: absolute;
  left: 25px;
  right: 25px;
  bottom: 24px;
  z-index: 2;
  color: #fff;
}

.history-side-image-text span {
  display: block;
  margin-bottom: 7px;
  color: #43a9ff;
  font-size: 12px;
  letter-spacing: 0.1em;
}

.history-side-image-text strong {
  display: block;
  font-size: 20px;
  line-height: 1.45;
  letter-spacing: -0.03em;
}

.history-side-image-text a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
  color: #fff;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 38px;
  padding: 0 20px;
  border: 1px solid #fff;
  border-radius: var(--radius-pill);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background var(--ease),
    color var(--ease),
    border-color var(--ease);
}

.history-side-image-text a span {
  display: flex;
  width: 24px;
  height: 24px;
  margin: 0;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
}

/* Sidebar stats */
.history-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 30px;
  border-top: 1px solid #dbe3ec;
  border-bottom: 1px solid #dbe3ec;
}

.history-stat {
  min-height: 110px;
  padding: 18px 8px;
  text-align: center;
}

.history-stat + .history-stat {
  border-left: 1px solid #dbe3ec;
}

.history-stat-icon {
  width: 30px;
  height: 30px;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #edf6ff;
  color: var(--color-primary);
  font-size: 9px;
  font-weight: 700;
}

.history-stat span {
  display: block;
  color: #8291a5;
  font-size: 10px;
}
.history-stat strong {
  display: block;
  margin-top: 3px;
  color: #133968;
  font-size: 12px;
  font-weight: 700;
}

/* =========================================================
   Timeline
========================================================= */

.history-timeline {
  position: relative;
  padding-left: 38px;
}

.history-timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 16px;
  bottom: 18px;
  width: 1px;
  background: linear-gradient(180deg, var(--color-primary) 0%, #b7d8f7 40%, #dfe8f1 100%);
}

/* Timeline item */
.history-item {
  position: relative;
  margin-bottom: 14px;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity var(--ease),
    transform var(--ease);
}

.history-item.hidden {
  display: none;
}

/* Dot */
.history-dot {
  position: absolute;
  left: -38px;
  top: 26px;
  width: 18px;
  height: 18px;
  border: 4px solid #e5f2ff;
  border-radius: 50%;
  background: var(--color-primary);
  z-index: 2;
}

/* Card */
.history-card {
  min-height: 120px;
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 160px;
  align-items: center;
  gap: 25px;
  padding: 20px;
  border: 1px solid #e4eaf0;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-card);
  transition:
    transform var(--ease),
    box-shadow var(--ease),
    border-color var(--ease);
}

.history-card:hover {
  transform: translateY(-3px);
  border-color: #cfe3f7;
  box-shadow: 0 14px 35px rgba(24, 67, 108, 0.09);
}

/* Year */
.history-year {
  color: var(--color-primary);
  font-size: 29px;
  font-weight: 700;
  letter-spacing: -0.045em;
}

/* Events */
.history-events {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.history-event {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  column-gap: 10px;
}

.history-event time {
  color: #7890aa;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.7;
}

.history-event h3 {
  margin: 0;
  color: #21476f;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.7;
}

.history-event p {
  margin-top: 4px;
  color: #7a8da4;
  font-size: 14px;
  line-height: 1.75;
}

/* Card image */
.history-image {
  height: 88px;
  overflow: hidden;
  border-radius: 7px;
  background: #edf2f7;
}

.history-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.history-card:hover .history-image img {
  transform: scale(1.05);
}

/* =========================================================
   Responsive — Tablet
========================================================= */

@media (max-width: 1100px) {
  .history-container {
    width: min(100% - 50px, 1000px);
  }
  .history-layout {
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 35px;
  }
  .history-card {
    grid-template-columns: 80px minmax(0, 1fr) 130px;
    gap: 15px;
    padding: 16px;
  }
  .history-image {
    height: 78px;
  }
  .history-filter-buttons {
    gap: 24px;
  }
}

/* =========================================================
  Responsive — Mobile
========================================================= */

@media (max-width: 768px) {
  .history-side,
  .history-filter-slogan {
    /* width: calc(100% - 40px); */
    display: none;
  }

  /* Intro */
  .history-intro {
    padding: 55px 0 40px;
  }
  .history-intro .history-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 25px;
  }
  .history-intro-title h2 {
    font-size: 31px;
  }
  .history-intro-desc {
    padding: 0;
  }

  /* Content */
  .history-content {
    padding: 55px 0 80px;
  }
  .history-layout {
    display: block;
  }
  .history-side-sticky {
    position: static;
  }
  .history-side {
    margin-bottom: 50px;
  }
  .history-side h2 {
    font-size: 29px;
  }
  .history-side p {
    font-size: 14px !important;
  }
  .history-side-image {
    height: 260px;
  }
  .history-stats {
    margin-top: 20px;
  }

  /* Timeline */
  .history-timeline {
    padding-left: 25px;
  }
  .history-timeline::before {
    left: 5px;
  }
  .history-dot {
    left: -25px;
    width: 14px;
    height: 14px;
    border-width: 3px;
  }
  .history-card {
    grid-template-columns: 65px minmax(0, 1fr);
    gap: 12px;
    padding: 18px;
    align-items: start;
  }
  .history-year {
    font-size: 23px;
  }
  .history-image {
    grid-column: 2;
    width: 100%;
    height: 110px;
    margin-top: 5px;
  }
  .history-event time {
    font-size: 14px;
  }
  .history-event h3 {
    font-size: 14px;
  }
  .history-event p {
    font-size: 14px;
  }
}

/* =========================================================
  Responsive — Small Mobile
========================================================= */

@media (max-width: 480px) {
  .history-hero {
    height: 410px;
  }
  .history-intro-title h2 {
    font-size: 28px;
  }
  .history-side h2 {
    font-size: 26px;
  }
  .history-side-image {
    height: 230px;
  }
  .history-card {
    grid-template-columns: 55px minmax(0, 1fr);
    padding: 15px;
    border-radius: var(--radius-md);
  }
  .history-year {
    font-size: 21px;
  }

  .history-image {
    height: 95px;
  }
}
