/* 배너 배경 스타일 */
.banner1 {
  background: url('/images/banners/banner1.svg') center center no-repeat;
  background-size: cover;
}

.banner2 {
  background: url('/images/banners/banner2.svg') center center no-repeat;
  background-size: cover;
}

.banner3 {
  background: url('/images/banners/banner3.svg') center center no-repeat;
  background-size: cover;
}

/* 배경 이미지 위에 오버레이 효과 */
.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.banner-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 90%; /* 콘텐츠 영역 확대 (80% -> 90%) */
  color: white;
  padding: 0 20px;
  z-index: 5;
  opacity: 0;
  visibility: hidden; /* 비활성화 시 완전히 숨김 */
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

/* 좌/우 정렬 시 추가 여백 설정 */
.banner-content.text-left {
  padding-left: 150px; /* 왼쪽 정렬 시 왼쪽 여백 대폭 증가 (80px -> 150px) */
  text-align: left;
  margin-left: 5%; /* 추가 마진으로 좌측 이동 방지 */
}

.banner-content.text-right {
  padding-right: 150px; /* 오른쪽 정렬 시 오른쪽 여백도 일관성 있게 증가 */
  text-align: right;
  margin-right: 5%; /* 추가 마진으로 우측 이동 방지 */
}

.banner-item.active .banner-content {
  opacity: 1;
  visibility: visible; /* 활성화 시 표시 */
}

.banner-title {
  font-size: 2.8rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  transform: translateY(30px);
  transition: transform 0.8s ease 0.3s, opacity 0.8s ease 0.3s; /* 지연 추가 */
  opacity: 0;
  position: relative; /* 위치 지정 */
  display: block; /* 블록 요소로 설정 */
  letter-spacing: -0.5px; /* 자간 조정 */
  padding-left: 5px; /* 텍스트 왼쪽 여백 추가 */
  padding-right: 5px; /* 텍스트 오른쪽 여백 추가 */
  color: inherit; /* 부모에서 설정된 color 상속 */
}

.banner-subtitle {
  font-size: 1.6rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  transform: translateY(30px);
  transition: transform 0.8s ease 0.5s, opacity 0.8s ease 0.5s; /* 지연 더 추가 */
  opacity: 0;
  position: relative; /* 위치 지정 */
  padding-left: 5px; /* 텍스트 왼쪽 여백 추가 */
  padding-right: 5px; /* 텍스트 오른쪽 여백 추가 */
  display: block; /* 블록 요소로 설정 */
  letter-spacing: -0.2px; /* 자간 조정 */
  color: inherit; /* 부모에서 설정된 color 상속 */
}

.banner-item.active .banner-title,
.banner-item.active .banner-subtitle {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 768px) {
  .banner-title {
    font-size: 1.8rem;
  }

  .banner-subtitle {
    font-size: 1.2rem;
  }

  /* 태블릿에서는 여백 조정 */
  .banner-content.text-left {
    padding-left: 80px; /* 패딩 증가 (40px -> 80px) */
    margin-left: 2%;
  }

  .banner-content.text-right {
    padding-right: 80px; /* 패딩 증가 (40px -> 80px) */
    margin-right: 2%;
  }
}

/* 매우 작은 모바일 화면 */
@media (max-width: 480px) {
  .banner-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .banner-subtitle {
    font-size: 1rem;
  }

  /* 작은 화면에서는 여백 조정 */
  .banner-content.text-left {
    padding-left: 45px; /* 패딩 증가 (25px -> 45px) */
    margin-left: 1%;
  }

  .banner-content.text-right {
    padding-right: 45px; /* 패딩 증가 (25px -> 45px) */
    margin-right: 1%;
  } /* 작은 화면에서는 전체 컨텐츠 너비 확장 */
  .banner-content {
    width: 90%;
  }
}
