/*--------------------------------------------------------------
# History Tabs Section
--------------------------------------------------------------*/
.history-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
}

.tab-btn {
  background: #fff;
  border: 2px solid #e0e0e0;
  color: var(--color-secondary);
  padding: 12px 30px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
}

.tab-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-2px);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--color-primary), var(--color-point));
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 15px rgba(35, 213, 165, 0.3);
}

.tab-content {
  display: none !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tab-content.active {
  display: block !important;
  opacity: 1;
  visibility: visible;
}

@media screen and (max-width: 575px) {
  .history-tabs {
    gap: 8px;
  }

  .tab-btn {
    padding: 10px 20px;
    font-size: 14px;
  }
}

/*--------------------------------------------------------------
# History Table Section
--------------------------------------------------------------*/
.history-table {
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border: 1px solid #f0f0f0;
}

.history-table .table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
}

.history-table .table thead th {
  background: #007bff;
  color: #fff;
  padding: 20px 15px;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  border: none;
}

.history-table .table thead th:first-child {
  width: 80px;
}

.history-table .table thead th:nth-child(2) {
  width: 80px;
}

.history-table .table tbody td {
  padding: 15px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 15px;
  line-height: 1.6;
  vertical-align: middle;
}

.history-table .table tbody tr:last-child td {
  border-bottom: none;
}

.history-table .table tbody tr:hover {
  background-color: #f8f9fa;
}

.year-cell {
  background: #f8f9fa;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 18px;
  text-align: center;
  border-right: 2px solid var(--color-primary) !important;
}

.month-cell {
  background: #fff;
  color: var(--color-point);
  font-weight: 600;
  text-align: center;
  min-width: 60px;
}

@media screen and (max-width: 991px) {
  .history-table .table thead th {
    padding: 15px 10px;
    font-size: 16px;
  }

  .history-table .table tbody td {
    padding: 12px 10px;
    font-size: 14px;
  }

  .year-cell {
    font-size: 16px;
  }
}

@media screen and (max-width: 767px) {
  .history-table {
    margin: 0 -15px;
    border-radius: 0;
  }

  .history-table .table thead th {
    padding: 12px 8px;
    font-size: 14px;
  }

  .history-table .table tbody td {
    padding: 10px 8px;
    font-size: 13px;
  }

  .history-table .table thead th:first-child,
  .history-table .table thead th:nth-child(2) {
    width: 60px;
  }

  .year-cell {
    font-size: 14px;
  }
}

@media screen and (max-width: 575px) {
  .history-table .table thead th {
    padding: 10px 6px;
    font-size: 12px;
  }

  .history-table .table tbody td {
    padding: 8px 6px;
    font-size: 12px;
    line-height: 1.4;
  }

  .history-table .table thead th:first-child,
  .history-table .table thead th:nth-child(2) {
    width: 50px;
  }

  .year-cell {
    font-size: 12px;
  }

  .month-cell {
    font-size: 11px;
  }
}

/*--------------------------------------------------------------
# History Timeline Section
--------------------------------------------------------------*/
.history-timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 0;
}

/* 중앙 세로선 */
.history-timeline::after {
  content: "";
  position: absolute;
  width: 4px;
  background: linear-gradient(
    to bottom,
    var(--color-primary),
    var(--color-point)
  );
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -2px;
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  width: 100%;
  padding: 20px 0;
  margin-bottom: 40px;
  min-height: 120px;
}

.timeline-item:nth-child(odd) {
  text-align: right;
}

.timeline-item:nth-child(even) {
  text-align: left;
}

.timeline-year {
  display: inline-block;
  background: linear-gradient(135deg, var(--color-primary), var(--color-point));
  color: #fff;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(35, 213, 165, 0.3);
  position: relative;
  z-index: 2;
}

.timeline-content {
  background: #fff;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  position: relative;
  border: 1px solid #f0f0f0;
  transition: all 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* 홀수 번째 아이템 (오른쪽 정렬) */
.timeline-item:nth-child(odd) .timeline-content {
  margin-right: calc(50% + 30px);
}

/* 짝수 번째 아이템 (왼쪽 정렬) */
.timeline-item:nth-child(even) .timeline-content {
  margin-left: calc(50% + 30px);
}

/* 화살표 */
.timeline-content::before {
  content: "";
  position: absolute;
  top: 60px;
  width: 0;
  height: 0;
  border: 15px solid transparent;
}

/* 홀수 번째 아이템 화살표 (오른쪽에서 왼쪽으로) */
.timeline-item:nth-child(odd) .timeline-content::before {
  right: -30px;
  border-left-color: #fff;
}

/* 짝수 번째 아이템 화살표 (왼쪽에서 오른쪽으로) */
.timeline-item:nth-child(even) .timeline-content::before {
  left: -30px;
  border-right-color: #fff;
}

.timeline-event {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.timeline-event:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.timeline-date {
  display: inline-block;
  background: var(--color-point);
  color: #fff;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}

.timeline-description {
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-default);
  font-weight: 400;
}

/* 중앙 원형 포인트 */
.timeline-item::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--color-primary);
  border: 4px solid #fff;
  border-radius: 50%;
  top: 80px;
  left: 50%;
  margin-left: -10px;
  z-index: 3;
  box-shadow: 0 0 0 4px var(--color-primary);
  transition: all 0.3s ease;
}

.timeline-item:hover::before {
  transform: scale(1.2);
  box-shadow: 0 0 0 8px rgba(35, 213, 165, 0.3);
}

/* 모바일 반응형 */
@media screen and (max-width: 991px) {
  .history-timeline::after {
    left: 30px;
  }

  .timeline-item {
    text-align: right;
    min-height: 100px;
  }

  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    text-align: right;
  }

  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    margin-left: 70px;
    margin-right: 0;
  }

  .timeline-content::before {
    left: -30px !important;
    right: auto !important;
    border-right-color: #fff !important;
    border-left-color: transparent !important;
    top: 40px !important;
  }

  .timeline-item::before {
    left: 30px;
    margin-left: -10px;
    top: 60px;
  }

  .timeline-year {
    font-size: 20px;
    padding: 10px 20px;
  }

  .timeline-content {
    padding: 25px;
    text-align: left;
  }
}

@media screen and (max-width: 575px) {
  .history-timeline {
    padding: 20px 10px;
  }

  .timeline-item {
    min-height: 90px;
    text-align: right;
  }

  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    text-align: right;
  }

  .history-timeline::after {
    left: 20px;
  }

  .timeline-item::before {
    left: 10px;
    width: 16px;
    height: 16px;
    margin-left: -8px;
    top: 50px;
  }

  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    margin-left: 50px;
  }

  .timeline-content::before {
    top: 30px !important;
  }

  .timeline-year {
    font-size: 18px;
    padding: 8px 16px;
  }

  .timeline-content {
    padding: 20px;
    border-radius: 12px;
    text-align: left;
  }

  .timeline-date {
    font-size: 13px;
    padding: 5px 12px;
  }

  .timeline-description {
    font-size: 15px;
    line-height: 1.5;
  }
}
