.cont4 {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 60px 20px;
  width: 100vw;
  height: auto;
  background: var(--color-box-bg);
}

.cont4 .neon-text {
  margin-bottom: 60px;
  font-size: clamp(1.5rem, 6vw, 2.5rem);
  color: var(--color-text-white);
}

.box-wrap {
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 박스 모음만 따로 flex 줄로 정렬 */
.box-row {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  /* 작은 화면에서 줄바꿈 허용 */
}

.box {
  position: relative;
  overflow: hidden;
  background: var(--color-box-bg);
  /* 어두운 박스 배경 */
  color: var(--color-accent);
  box-shadow: var(--color-shadow);
  /* 그대로 유지 */
  width: 30vw;
  /* height: 60vh; */
  min-height: 300px;
  /* 최소 높이 지정 */
  max-height: 600px;
  /* 최대 높이 제한, 필요하면 조절 */
  border-radius: 10px;

  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* 제목 가운데 */
  justify-content: center;
  text-align: center;
  min-width: 300px;
  transform: translateY(50px);
  opacity: 0;
  transition: transform 0.6s ease, opacity 0.6s ease;
  flex-shrink: 0;
  /* ✅ 잘리는 것 방지 */
}

.box h3,
.box p {
  position: relative;
  z-index: 1;
  /* 텍스트가 영상 위로 나오도록 */
}

.box.animate img,
.box.animate video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  /* ✅ 꽉 채우기 */
  height: 100%;
  /* ✅ 꽉 채우기 */
  object-fit: cover;
  /* ✅ 비율 유지하며 박스 채우기 */
  z-index: 0;
  opacity: 0.3;
  transform: none;
  /* ✅ 가운데 정렬 제거 (필요 없음) */
}

.box.animate {
  transform: translateY(0);
  opacity: 1;
}

.box:hover img {
  opacity: 0.7;
}

.box:hover video {
  opacity: 0.7;
}

.box h3 {
  margin-bottom: 20px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-accent);
}

.box:hover h3 {
  display: none;
}

.box:hover p {
  display: none;
}

.box p {
  text-align: left;
  /* 본문은 왼쪽 정렬 */
  max-width: 90%;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

/* 998px 이하에서 .box-row를 2열 그리드로 강제 고정 */
@media (max-width: 998px) {
  .box-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2열 고정 */
    gap: 20px 30px;
    /* 행과 열 간격 조절 */
    justify-content: center;
    /* 가운데 정렬 */
  }

  .box {
    width: 100%;
    max-width: 400px;
    height: auto;
    min-height: 300px;
    max-height: none;
    /* 그리드에 맞게 높이 자유롭게 */
  }
}

/* 더 작은 화면 (예: 600px 이하)에서는 1열로 바꾸기 */
@media (max-width: 600px) {
  .box-row {
    grid-template-columns: 1fr;
  }
}