

/* ===========================================
   Facility1 - 시설안내 갤러리
   PC: 왼쪽 텍스트(flex) + 우측 이미지 갤러리(flex)
   모바일: 이미지 위 + 텍스트 아래
   항목별 다중 이미지 → 스와이퍼 + 썸네일
=========================================== */

/* ===== 최상위 래퍼 ===== */
.Facility1 {
  width: 100%;
  float: left;
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
  height: 100%;
}
.Facility1 .wg_side {
  height: 100%;
}

/* ===== 갤러리 컨테이너 ===== */
.Facility1 .gallery-container {
  max-width: 100%;
  position: relative;
  flex: 1;
}

/* ===== PC: 좌측 텍스트 + 우측 갤러리 ===== */
@media only all and (min-width: 768px) {
  .Facility1 .gallery-container {
    display: flex;
    align-items: stretch;
    gap: clamp(20px, calc(1.56vw + 15px), 40px);
  }
  .Facility1 .slide-title {
    flex: 1;
    min-width: 0;
    position: relative;
    padding: 0;
    display: flex;
    flex-direction: column;
  }
  .Facility1 .slide-title .text-panel {
    flex: 1;
  }
  .Facility1 .slide-title .swiper-btn {
    position: relative;
    left: auto;
    bottom: auto;
    margin-top: auto;
  }
  .Facility1 .sw_all {
    flex: 0 1 600px;
    max-width: 600px;
    min-height: 200px;
  }
}

/* ===== 모바일: 세로 정렬 ===== */
@media only all and (max-width: 767px) {
  .Facility1 .gallery-container {
    display: flex;
    flex-direction: column;
  }
  .Facility1 .sw_all {
    width: 100%;
    order: 1;
    margin-bottom: 20px;
  }
  .Facility1 .slide-title {
    width: 100%;
    order: 2;
    position: relative;
    padding: 0;
    padding-bottom: 70px;
  }
}


/* ===== 텍스트 패널 ===== */
.Facility1 .text-panel {
  display: none;
}
.Facility1 .text-panel.active {
  display: block;
  animation: facility1FadeIn 0.35s ease;
}
@keyframes facility1FadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}


/* ===== 텍스트 스타일 ===== */
.Facility1 .wg_txt1,
.Facility1 .wg_txt2,
.Facility1 .wg_txt3,
.Facility1 .wg_txt4 {
  width: 100%;
  float: left;
}


/* ===== 항목별 이미지 갤러리 ===== */
.Facility1 .item-gallery {
  display: none;
}
.Facility1 .item-gallery.active {
  display: block;
  animation: facility1FadeIn 0.35s ease;
}


/* ===== 단일 이미지 ===== */
.Facility1 .single-img {
  width: 100%;
  float: left;
  overflow: hidden;
  border-radius: 8px;
}
.Facility1 .single-img img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}


/* ===== Swiper 초기화 전 사전 레이아웃 (점프 방지) ===== */
.Facility1 .item-main-swiper:not(.swiper-initialized) {
  overflow: hidden;
}
.Facility1 .item-main-swiper:not(.swiper-initialized) .swiper-wrapper {
  display: flex;
}
.Facility1 .item-main-swiper:not(.swiper-initialized) .swiper-slide {
  flex-shrink: 0;
  width: 100%;
}
.Facility1 .item-thumb-swiper:not(.swiper-initialized) {
  overflow: hidden;
}
.Facility1 .item-thumb-swiper:not(.swiper-initialized) .swiper-wrapper {
  display: flex;
  gap: 10px;
}
/* 항상 4등분 크기 (2~3개일 때도 동일 크기, 왼쪽 정렬) */
.Facility1 .item-thumb-swiper:not(.swiper-initialized) .swiper-slide {
  width: calc((100% - 30px) / 4);
  flex-shrink: 0;
}


/* ===== 메인 이미지 래퍼 ===== */
.Facility1 .item-main-wrap {
  width: 100%;
  position: relative;
}

/* ===== 메인 이미지 스와이퍼 ===== */
.Facility1 .item-main-swiper {
  width: 100% !important;
}

/* ===== 메인 이미지 좌우 화살표 ===== */
.Facility1 .main-arr {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s;
}
.Facility1 .main-arr:hover {
  background: rgba(255, 255, 255, 0.95);
}
.Facility1 .main-arr i {
  font-size: 24px;
  line-height: 1;
}
.Facility1 .main-arr-prev {
  left: 12px;
}
.Facility1 .main-arr-next {
  right: 12px;
}
.Facility1 .main-arr.swiper-button-disabled {
  opacity: 0.3;
  cursor: default;
}
.Facility1 .item-main-swiper .swiper-slide .wg_img_box {
  width: 100%;
  float: left;
  overflow: hidden;
  border-radius: 8px;
}
.Facility1 .item-main-swiper .swiper-slide img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}


/* ===== 썸네일 스트립 (공통) ===== */
.Facility1 .item-thumb-wrap {
  width: 100%;
  margin-top: 10px;
  position: relative;
}

/* 4개 이하: 화살표 없이 전체 폭 사용 */
.Facility1 .item-thumb-wrap:not(.has-arrows) .item-thumb-swiper {
  width: 100%;
}

/* 5개 이상: 화살표 + 여백 */
.Facility1 .item-thumb-wrap.has-arrows {
  display: flex;
  align-items: center;
  gap: 8px;
}
.Facility1 .item-thumb-wrap.has-arrows .item-thumb-swiper {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}


/* ===== 썸네일 슬라이드 ===== */
.Facility1 .item-thumb-swiper .swiper-slide {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  opacity: 0.5;
  cursor: pointer;
  transition: opacity 0.3s ease;
  border-radius: 5px;
}
.Facility1 .item-thumb-swiper .swiper-slide-thumb-active {
  opacity: 1;
}
.Facility1 .item-thumb-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
  display: block;
}
.Facility1 .item-thumb-swiper .swiper-slide .thumb-alt {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 5px;
}
.Facility1 .item-thumb-swiper .swiper-slide .thumb-alt img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
  display: block;
}


/* ===== 썸네일 화살표 버튼 ===== */
.Facility1 .thumb-arr {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #999;
  transition: color 0.2s;
}
.Facility1 .thumb-arr:hover {
  color: #333;
}
.Facility1 .thumb-arr i {
  font-size: 22px;
  line-height: 1;
}
.Facility1 .thumb-arr.swiper-button-disabled {
  opacity: 0.3;
  cursor: default;
}


/* ===== 항목 전환 네비게이션 버튼 (prev/next) ===== */
.Facility1 .swiper-btn {
  width: 100%;
  float: left;
  position: relative;
  padding-top: 20px;
}
.Facility1 .swiper-btn:before {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 5px;
  border-radius: 30px;
  background-color: #e8e8e8;
  width: calc(100% - 120px);
  content: "";
}
.Facility1 .swiper-button-prev,
.Facility1 .swiper-button-next {
  color: #000;
  top: 50%;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  position: absolute;
  background: #fff;
  border: none;
  border-radius: 50%;
  box-shadow: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.Facility1 .swiper-button-prev {
  right: 60px;
  left: auto !important;
}
.Facility1 .swiper-button-prev:after {
  content: "\ebb4";
  font-family: unicons-line;
  font-size: 24px;
}
.Facility1 .swiper-button-next {
  right: 0;
  left: auto;
}
.Facility1 .swiper-button-next:after {
  content: "\ebb5";
  font-family: unicons-line;
  font-size: 24px;
}

/* 모바일 네비게이션 */
@media only all and (max-width: 767px) {
  .Facility1 .swiper-btn {
    position: absolute;
    left: 0;
    bottom: 0;
  }
  .Facility1 .swiper-btn:before {
    left: 0;
    top: 0;
  }
}


/* ===== 위젯 래퍼 ===== */
.Facility1 .wg_box {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  height: 100%;
  display: flex;
  flex-direction: column;
}
@media only all and (min-width: 768px) {
  .Facility1 .wg_box {
    background-color: #f7f7f7;
    border-radius: 30px;
    padding: clamp(30px, calc(1.56vw + 25px), 50px) clamp(40px, calc(0.78vw + 37.5px), 50px);
  }
}
@media only all and (max-width: 767px) {
  .Facility1 .wg_box {
    background-color: transparent;
    border-radius: 0;
    padding: 0;
  }
}
