/* assets/css/main2_overlay.css */

/* 배경 dim */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: none;                /* JS에서 flex로 켬 */
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

/* 흰 카드 박스 */
.overlay-box {
  width: min(900px, 88vw);
  height: min(600px, 78vh);
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  overflow: hidden;
  position: relative;
}

/* 닫기 버튼 (오른쪽 위) */
.overlay-close{
  position: absolute;
  top: 18px;
  right: 22px;
  width: 50px;
  height: 36px;
  border: none;
  /* background: rgba(255,255,255,0.85); */
  background: rgba(220,231,213,0.85);
  border-radius: 10px;
  cursor: pointer;
  font-size: 25px;
  z-index: 10;
}

/* 좌우 레이아웃 */
.overlay-content{
  display: flex;
  height: 100%;
}

/* 왼쪽: 세로 긴 이미지 영역 */
.overlay-images{
  width: 60%;
  position: relative;
  background: #f3f3f3;
}

.overlay-images img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 슬라이드 버튼 */
.slide-btn{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 12px;
  background: rgba(255,255,255,0.75);
  cursor: pointer;
  font-size: 22px;
}

.slide-btn.left{ left: 14px; }
.slide-btn.right{ right: 14px; }

/* 오른쪽: 설명 */
.overlay-text{
  width: 40%;
  padding: 44px 40px;
  overflow: auto;
}

.overlay-text h2{
  margin: 0 0 6px 0;
  font-size: 28px;
}

.overlay-text h4{
  margin: 0 0 18px 0;
  font-style: italic;
  font-weight: 600;
  color: #666;
}

/* .overlay-text p{
  margin: 0;
  line-height: 1.6;
  color: #333;
  font-size: 16px;
} */
.overlay-text p {
  white-space: pre-line;      /* ← \n / 엔터를 실제 줄바꿈으로 */
  /*text-align: justify;        /*← 양쪽 정렬*/
  line-height: 1.75;          /* ← 줄 간격 */
  /* letter-spacing: 0.01em; */
  margin-top: 10px;
}

/* 모바일: 세로 스택 */
@media (max-width: 768px){
  .overlay-box{
    width: 92vw;
    height: 82vh;
  }
  .overlay-content{
    flex-direction: column;
  }
  .overlay-images{
    width: 100%;
    height: 46%;
  }
  .overlay-text{
    width: 100%;
    height: 54%;
    padding: 24px 22px;
  }
}
