@charset "utf-8";

/* 이미지 모달 스타일 */
.image-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
}

.image-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  max-width: 80%;
  max-height: 80%;
  position: relative;
}

.modal-content img {
  width: 100%;
  height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.close-modal {
  position: absolute;
  top: -80px;
  right: -80px;
  color: #fff;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  background: none;
  border: none;
  padding: 10px;
  line-height: 1;
}

.close-modal:hover {
  color: #ddd;
}

/* 네비게이션 버튼 스타일 */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 24px;
  padding: 15px 10px;
  cursor: pointer;
  border-radius: 5px;
  transition: background 0.3s ease;
  z-index: 10000;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.nav-btn.prev {
  left: 300px;
}

.nav-btn.next {
  right: 300px;
}

.nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* 아파트 정보 컨테이너 너비 제한 */
.apartment-info-container {
  max-width: 835px;
  width: 100%;
}

/* 탭 컨텐츠 영역 너비 제한 */
.tab-content {
  max-width: 1200px;
  margin: 0 auto;
}

/* 이미지 갤러리 컨테이너 - Flexbox 사용 */
.image-gallery-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bf-img {
  max-width: 900px;
  width: fit-content;
  text-align: center;
  display: inline-block;
  padding: 0;
  margin: 0 auto 150px auto;
  cursor: pointer;
}

.bf-img:last-child {
  margin-bottom: 0;
}

.bf-img img {
  max-width: 100%;
  max-height: 958.8px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0;
  padding: 0;
  loading: lazy;
  decoding: async;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* 아파트 상세 정보 스타일 */
.apartment-details {
  text-align: center;
  max-width: 600px;
  width: 100%;
}

.apartment-details .apartment-name {
  font-size: 21px;
  font-weight: 600;
  color: #212529;
  margin-bottom: 8px;
}

.apartment-details .apartment-size {
  font-size: 14px;
  color: #6c757d;
  margin: 0;
  font-weight: 500;
}

@media (max-width: 1200px) {
  .apartment-details .apartment-name {
    font-size: 14px;
  }

  .apartment-details .apartment-size {
    font-size: 10px;
  }

  .bf-img {
    margin: 0 auto 70px auto;
  }
  .nav-btn.prev {
    left: 5%;
  }
  .nav-btn.next {
    right: 5%;
  }
}

/* 모바일에서 모달 이미지 크기 조정 */
@media (max-width: 767px) {
  .modal-content {
    max-width: 95%;
    max-height: 75%;
    margin-top: -10vh;
  }

  .modal-content img {
    height: 65vh;
  }

  .close-modal {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 35px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
  }

  .nav-btn {
    position: fixed;
    top: auto;
    bottom: 50px;
    transform: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 20px 15px;
    font-size: 20px;
    z-index: 10001;
  }

  .nav-btn.prev {
    left: 30px;
  }

  .nav-btn.next {
    right: 30px;
  }

  .apartment-details .apartment-name {
    font-size: 21px;
  }

  .apartment-details .apartment-size {
    font-size: 14px;
  }
}
