/* 기존 공통 스타일 유지 */
* {
  margin: 0;
  padding: 0;
}

div {
  box-sizing: border-box;
}

.section-wrap {
  position: relative;
  margin: 0 auto;
  height: fit-content;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 1680px;
}

.section-wrap > div {
  width: 100%;
}

@media screen and (max-width: 767px) {
  .section-wrap {
    max-width: 720px;
  }

  .desktop {
    display: none !important;
  }
}

.board-container {
  max-width: 1680px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: row;
  margin-top: 50px;
  padding: 0 20px;
  gap: 50px;
  justify-content: center;
}

@media screen and (max-width: 767px) {
  .board-container {
    display: block;
  }
}

/* 콘텐츠 */
.content-container {
  width: 80%;
  display: flex;
  flex-direction: column;
}

@media screen and (max-width: 767px) {
  .content-container {
    margin-left: unset;
  }
}

.title_box {
  width: 100%;
  border-bottom: 1px solid #d2d2d2;
  margin-bottom: 30px;
}

.content-container > .title_box > h1 {
  font-size: 48px;
  font-weight: 800;
  padding-bottom: 20px;
}

@media screen and (max-width: 767px) {
  .content-container {
    width: 100%;
  }

  .content-container > .title_box > h1 {
    font-size: 36px;
  }
}

/* ============================================
   협약기관 전용 스타일
============================================ */

/* 타임라인 래퍼 */
.timeline-wrapper {
  display: flex;
  gap: 40px;
  width: 100%;
}

/* 연도 사이드바 - sticky 적용 (PC만) */
.year-list {
  width: 160px;
  flex-shrink: 0;
  position: sticky;
  top: 120px;
  align-self: flex-start;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}

.year-list::-webkit-scrollbar {
  width: 4px;
}

.year-list::-webkit-scrollbar-thumb {
  background: #2e9fa2;
  border-radius: 2px;
}

.year-item {
  padding: 16px 24px;
  margin-bottom: 12px;
  background: #fff;
  border-left: 4px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  font-weight: 500;
  color: #666;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.year-item:hover {
  background: #e8f5f5;
  border-left-color: #2e9fa2;
  transform: translateX(4px);
  color: #2e9fa2;
}

.year-item.active {
  background: linear-gradient(135deg, #2e9fa2 0%, #258a8d 100%);
  color: #fff;
  font-weight: 700;
  border-left-color: #1f7a7d;
  box-shadow: 0 4px 12px rgba(46, 159, 162, 0.3);
  transform: translateX(4px);
}

/* 콘텐츠 영역 */
.timeline-content {
  flex: 1;
  min-width: 0;
}

.year-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 50px;
  font-size: 32px;
  font-weight: 700;
  color: #2e9fa2;
  padding-bottom: 20px;
  border-bottom: 3px solid #2e9fa2;
}

.year-title::before {
  content: '';
  width: 16px;
  height: 16px;
  background: #2e9fa2;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(46, 159, 162, 0.2);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 4px rgba(46, 159, 162, 0.2);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(46, 159, 162, 0.1);
  }
}

/* 그리드 */
.timeline-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

/* 협약기관 카드 */
.partner-card {
  background: #fff;
  border-radius: 12px;
  padding: 35px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid #eee;
  min-height: 320px;
  display: flex;
  flex-direction: column;
}

.partner-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #2e9fa2 0%, #4ab8bb 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.partner-card:hover {
  box-shadow: 0 8px 24px rgba(46, 159, 162, 0.15);
  transform: translateY(-6px);
  border-color: #2e9fa2;
}

.partner-card:hover::before {
  transform: scaleX(1);
}

/* 로고 */
.partner-logo {
  width: 100%;
  height: 80px;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
}

.partner-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(20%);
  transition: filter 0.3s ease;
}

.partner-card:hover .partner-logo img {
  filter: grayscale(0%);
}

.no-logo {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #2e9fa2 0%, #4ab8bb 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 24px;
  font-weight: 700;
}

/* 기관명 */
.partner-name {
  font-size: 20px;
  font-weight: 700;
  color: #222;
  margin-bottom: 20px;
  text-align: center;
  line-height: 1.4;
}

/* 정보 */
.partner-info {
  border-top: 2px dashed #e5e5e5;
  padding-top: 20px;
  margin-top: auto;
}

.info-row {
  display: flex;
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.6;
}

.info-row:last-child {
  margin-bottom: 0;
}

.info-label {
  color: #2e9fa2;
  font-weight: 700;
  width: 90px;
  flex-shrink: 0;
  position: relative;
}

.info-label::after {
  content: '|';
  position: absolute;
  right: 8px;
  color: #ddd;
}

.info-value {
  color: #555;
  flex: 1;
  word-break: keep-all;
}

/* 년도 섹션 간격 */
.year-section {
  margin-bottom: 80px;
  padding-top: 20px;
}

.year-section:last-child {
  margin-bottom: 0;
}

/* 이미지 없는 카드 스타일 */
.partner-card.no-image {
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* 위아래 요소 분리 */
}

.partner-card.no-image .partner-name {
  font-size: 26px;
  font-weight: 700;
  text-align: center;
  flex: 1; /* 남은 공간 차지 */
  display: flex;
  align-items: center; /* 세로 중앙 */
  justify-content: center; /* 가로 중앙 */
  margin: 0;
  padding: 20px 0;
}

.partner-card.no-image .partner-info {
  margin-top: 0; /* auto 제거 */
}

/* 반응형 */
@media (max-width: 1200px) {
  .year-list {
    top: 100px;
  }
  
  .timeline-grid {
    gap: 25px;
  }
}

@media (max-width: 768px) {
  .timeline-wrapper {
    flex-direction: column;
    gap: 20px;
  }
  
  .year-list {
    width: 100%;
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 10px 0;
    position: relative;
    top: auto;
    background: transparent;
    z-index: auto;
    border-radius: 0;
    box-shadow: none;
    -webkit-overflow-scrolling: touch;
    max-height: none;
    margin-bottom: 20px;
  }

  .year-list::-webkit-scrollbar {
    height: 6px;
    width: auto;
  }

  .year-list::-webkit-scrollbar-thumb {
    background: #2e9fa2;
    border-radius: 3px;
  }
  
  .year-item {
    margin-bottom: 0;
    white-space: nowrap;
    min-width: 100px;
    flex-shrink: 0;
  }

  .year-item:hover {
    transform: translateX(0);
    transform: scale(1.05);
  }

  .year-item.active {
    transform: scale(1.05);
    background: linear-gradient(135deg, #2e9fa2 0%, #258a8d 100%);
  }
  
  .year-title {
    font-size: 24px;
    margin-bottom: 30px;
    color: #2e9fa2;
    border-bottom-color: #2e9fa2;
  }

  .year-title::before {
    background: #2e9fa2;
    box-shadow: 0 0 0 4px rgba(46, 159, 162, 0.2);
  }
  
  .timeline-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .partner-card {
    padding: 25px;
    min-height: 280px;
  }

  .partner-name {
    font-size: 18px;
  }

  .info-label {
    width: 80px;
  }

  .partner-card.no-image .partner-name {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .year-list {
    padding: 8px 0;
    gap: 8px;
  }

  .year-item {
    min-width: 85px;
    padding: 12px 16px;
    font-size: 14px;
  }

  .year-title {
    font-size: 20px;
  }

  .partner-card {
    padding: 20px;
    min-height: 260px;
  }

  .partner-logo {
    height: 60px;
    margin-bottom: 20px;
  }

  .partner-name {
    font-size: 16px;
  }
  
  .info-row {
    flex-direction: column;
    gap: 5px;
  }
  
  .info-label {
    width: 100%;
  }
  
  .info-label::after {
    display: none;
  }

  .partner-card.no-image .partner-name {
    font-size: 20px;
  }
}

/* 링크 스타일 */
.partner-logo a {
  display: block;
  width: 100%;
  height: 100%;
}

.partner-name a {
  color: #222;
  text-decoration: none;
  transition: color 0.3s ease;
}

.partner-name a:hover {
  color: #2e9fa2;
  text-decoration: underline;
}

.partner-card:hover .partner-name a {
  color: #2e9fa2;
}


/* 클릭 가능한 카드 스타일 */
.partner-card.has-link {
  cursor: pointer;
}

.partner-card.has-link:hover {
  box-shadow: 0 8px 28px rgba(46, 159, 162, 0.2);
  transform: translateY(-8px);
}

.partner-card.has-link:active {
  transform: translateY(-4px);
}