/* assets/css/main-slide.css */

.main-slide {
  position: relative;
  width: 100vw;
  max-width: 100%;
  margin-left: calc(50% - 50vw);
  height: 100vh;
  overflow: hidden;
  background: #000;
}

/* 슬라이드 컨테이너 */
.slide-container {
  position: relative;
  width: 100%;
  height: 100%;
}

/* 각 슬라이드 */
.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease-in-out;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

/* 배경 이미지 */
.slide-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  animation: zoomIn 5s ease-out forwards;
}

/* PC용 배경 */
.slide-bg-pc {
  display: block;
}

/* 모바일용 배경 */
.slide-bg-mobile {
  display: none;
}

/* PC용 텍스트 */
.word-pc {
  display: block;
}

/* 모바일용 텍스트 */
.word-mobile {
  display: none;
}

@keyframes zoomIn {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.05);
  }
}

/* 워드 이미지 컨테이너 */
.slide-word {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* 워드 이미지 */
.word-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
}

/* word1 (위에서 아래로) */
.word1 {
  animation: fadeInDown 1.5s ease-out 1s forwards;
}

@keyframes fadeInDown {
  0% {
    opacity: 0;
    transform: translateY(-100px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* word2 (아래에서 위로) */
.word2 {
  animation: fadeInUp 1.5s ease-out 1s forwards;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(100px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 슬라이드 인디케이터 */
.slide-indicators {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
  z-index: 20;
}

.indicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator:hover {
  background: rgba(255, 255, 255, 0.8);
}

.indicator.active {
  background: rgba(255, 255, 255, 1);
  width: 36px;
  border-radius: 7px;
}

/* 좌우 화살표 네비게이션 */
.slide-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.slide-nav:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: translateY(-50%) scale(1.1);
}

.slide-prev {
  left: 30px;
}

.slide-next {
  right: 30px;
}

/* 반응형: 모바일 */
@media (max-width: 900px) {
  /* 모바일 슬라이드 높이 조절 (768 x 1024 비율) */
  .main-slide {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    height: auto;
    min-height: auto; /* min-height 제거 */
    background: transparent; /* 배경 투명 */
    margin-bottom: 0; /* 마진 제거 */
  }
  
  .slide-container {
    height: auto;
    aspect-ratio: 768 / 1024;
    margin-bottom: 0; /* 마진 제거 */
  }
  
  .slide {
    height: 100%;
  }
  
  /* PC 배경 숨기고 모바일 배경 표시 */
  .slide-bg-pc {
    display: none;
  }
  
  .slide-bg-mobile {
    display: block;
  }
  
  /* PC 텍스트 숨기고 모바일 텍스트 표시 */
  .word-pc {
    display: none;
  }
  
  /* 모바일 텍스트 표시: scale은 keyframes 안에서 처리해야 animation transform과 충돌하지 않음 */
  .word-mobile {
    display: block;
  }
  
  .word-img {
    width: 100%;
    height: 100%;
  }
  
  @keyframes fadeInDown {
    0% {
      opacity: 0;
      transform: translateY(-60px) scale(1.1);
    }
    100% {
      opacity: 1;
      transform: translateY(0) scale(1.1);
    }
  }
  
  @keyframes fadeInUp {
    0% {
      opacity: 0;
      transform: translateY(60px) scale(1.1);
    }
    100% {
      opacity: 1;
      transform: translateY(0) scale(1.1);
    }
  }
  
  .slide-indicators {
    bottom: 10px; /* 인디케이터 위치 낮춤 */
  }
  
  /* 모바일에서 화살표 작게 */
  .slide-nav {
    width: 40px;
    height: 40px;
  }
  
  .slide-prev {
    left: 15px;
  }
  
  .slide-next {
    right: 15px;
  }
}
