/* 전체 섹션 기본 스타일 */
#diagram-advancement {
  margin: 0;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0px 2rem;
  box-sizing: border-box;
}

#diagram-advancement .container {
  width: 100%;
  max-width: 1200px;
}

/* 다이어그램 가로 정렬 */
.process-grid {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  align-items: flex-start;
}

/* 각 단계 컨테이너 */
.step-block {
  display: flex;
  flex-direction: column;
  width: 400px;
  margin-right: -30px; /* 겹침 효과 */
  position: relative;
}

/* 다이어그램 박스 */
.process-step {
  position: relative;
  color: white;
  width: 400px;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 50%, calc(100% - 30px) 100%, 0 100%);
  z-index: inherit; /* z-index 상속 */
}

/* 텍스트 스타일 */
.process-step h2 {
  margin: 0 0 0.25rem 0;
  font-size: 24.5px;
  font-weight: 700;
}

.process-step p {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 300;
}

/* 단계별 색상 */
.rpa {
  background: linear-gradient(to right, #A3B0C3, #798CA7);
}
.ipa {
  background: linear-gradient(to right, #798CA7, #2D3746);
}
.cpa {
  background: linear-gradient(to right, #2D3746, #1c2330);
}

/* 설명 박스 */
.detail-box {
  margin-top: 1.5rem;
  color: #1f2937;
  padding-left:10px;
  border-radius: 8px;
  text-align: left;
  z-index: 0;
}

.detail-box h4 {
  font-size: 21px;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.detail-box ul {
  padding-left: 1.2rem;
  font-size: 18px;
  list-style-type: disc;
}

/* 반응형 처리 */
@media (max-width: 900px) {
  .process-grid {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .step-block {
    margin-right: 0;
    width: 350px;
  }

  .process-step {
    width: 350px;
    clip-path: polygon(0 0, calc(100% - 25px) 0, 100% 50%, calc(100% - 25px) 100%, 0 100%);
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
  }

  .detail-box {
    width: 350px;
    padding-left:8px;
  }
}

/* vision & mission 다이어그램 */
.circle-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  margin: 0 auto;
}

.circle-item {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background-color: #0a2b3d;
  color: white;
  font-size: 30px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -20px; /* 겹치게 하기 위해 음수 마진 */
  z-index: 1;
}

.circle-item:nth-child(odd) {
  background-color: #0a2b3d; /* 남색 */
  color: white;
}

.circle-item:nth-child(even) {
  background-color: #DAA520; /* 노란색 */
  color: white;
}

/* 모바일 대응 */
@media (max-width: 900px) {
  .circle-grid {
    flex-direction: column;
    align-items: center;
  }

  .circle-item {
    margin: -20px 0; /* 세로 겹침만 유지 */
  }
}


/* RPA 성숙 단계 */
.ellipse-stair-wrapper {
  position: relative;
  height: 600px;
}

.ellipse-stair {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 80px;
  height: 100%;
}

.ellipse {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  /* background: linear-gradient(135deg, #0a2b3d, #798CA7); */
  color: white;
  font-weight: bold;
  text-align: center;
  position: relative;
  animation: pulse 1.8s ease-in-out infinite;
  padding: 20px 30px;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: break-word;
}

.ellipse span {
  font-size: 14px;
  font-weight: normal;
  margin-top: 6px;
  color: #ddd;
}

.ellipse ul {
  margin-top: 12px;
  padding-left: 20px;
  font-weight: normal;
  font-size: 16px;
  line-height: 1.4;
  list-style-type: disc;
  width: 100%;
  max-width: 90%;
  list-style-position: outside; /* 불릿을 텍스트 바깥쪽으로 */
  text-align: left;
}

#ellipse1 ul {
  padding-left: 40px;
}

#ellipse2 ul {
  padding-left: 60px;
}

#ellipse3 ul {
  padding-left: 80px;
}

.ellipse ul li {
  margin-bottom: 6px;
}

#ellipse1 {
  width: 320px;   /* 크게 */
  height: 210px;
  font-size: 30px;
  bottom: 0;
}

#ellipse2 {
  width: 400px;
  height: 260px;
  font-size: 30px;
  bottom: 140px;
}

#ellipse3 {
  width: 420px;
  height: 280px;
  font-size: 30px;
  bottom: 280px;
}

.arrow-text {
  position: absolute;
  transform-origin: center center;
  font-size: 50px;
  color: #DAA520;
  z-index: 1;
  pointer-events: none;
}

.ellipse-content {
  padding: 20px 25px;
  text-align: left;
  width: 100%;
  height: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
  box-sizing: border-box;
  color: white;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

@media (max-width: 1200px) {
  .ellipse-stair-wrapper {
    height: auto !important;
    padding-top: 40px;
    padding-bottom: 40px; /* 아래 여유 공간 추가 (필요시 조정) */
  }

  .ellipse-stair {
    flex-direction: column;
    align-items: center;
    height: auto;
    gap: 40px; /* 간격 넉넉하게 */
  }

  #ellipse1,
  #ellipse2,
  #ellipse3 {
    bottom: 0 !important;  /* bottom 모두 제거 */
  }

  .arrow-text {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: rotate(90deg) !important;
    font-size: 40px;
    margin: -10px 0 10px 0;
  }
}

@media (max-width: 400px) {
    #ellipse1 {
      width: 320px;
      height: 240px;
      font-size: 30px;
      bottom: 0;
    }

    #ellipse2 {
      width: 320px;
      height: 240px;
      font-size: 30px;
      bottom: 140px;
    }

    #ellipse3 {
      width: 320px;
      height: 240px;
      font-size: 30px;
      bottom: 280px;
    }

    #ellipse1 ul {
      padding-left: 30px;
    }

    #ellipse2 ul {
      padding-left: 50px;
    }

    #ellipse3 ul {
      padding-left: 60px;
    }
}

