/* 시설소개(sub104) 전용. 공통 헤더·히어로·서브메뉴·푸터는 common.css / sub_common.css / sub_empty.css. */

.page-facilities .sub-body {
  color: #1e3a52;
  min-width: 0;
}
.page-facilities .sub-body__inner {
  min-width: 0;
}
.page-facilities .fac {
  min-width: 0;
}

.page-facilities .fac-tabs {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 4px;
  margin-top: clamp(28px, 3.2vw, 48px);
  min-width: 0;
}
.page-facilities .fac-tabs__nav {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #1e3a52;
  display: grid;
  place-items: center;
}
.page-facilities .fac-tabs__nav svg {
  width: 18px;
  height: 18px;
  display: block;
}
/* 탭 Swiper 컨테이너.
   Swiper 기본 CSS 의 .swiper { margin-left:auto; margin-right:auto } 는 grid 칸 안에서 너비를 칸에 맞추지 않고
   내용 크기(fit-content)로 정하게 한다. 슬라이드 너비는 컨테이너 너비로 계산되므로(컨테이너 → 슬라이드 → 다시 컨테이너)
   크기가 계속 커졌다. 칸 너비를 그대로 쓰도록 width:100% 와 margin:0 으로 고정한다. 슬라이드 너비는 Swiper 가 계산한다. */
.page-facilities .fac-tabs__swiper {
  width: 100%;
  min-width: 0;
  margin: 0;
  overflow: hidden;
}
.page-facilities .fac-tabs__swiper .swiper-wrapper {
  height: auto;
}
.page-facilities .fac-tabs__swiper .swiper-slide {
  height: auto;
}
/* Swiper 초기화 전에만 쓰는 대체 너비(깜빡임 방지). 초기화되면 swiper-initialized 가 붙어 Swiper 의 inline 너비가 적용된다. */
.page-facilities .fac-tabs__swiper:not(.swiper-initialized) .swiper-slide {
  width: calc((100% - 10px) / 2);
  margin-right: 10px;
}
.page-facilities .fac-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  padding: 0 12px;
  border: 1px solid #d6b992;
  border-radius: 12px;
  background: transparent;
  color: #c4a574;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  white-space: nowrap;
}
.page-facilities .fac-tab[aria-selected="true"] {
  border-color: #1e3a52;
  background: #1e3a52;
  color: #fff;
}
.page-facilities .fac-tab:focus-visible {
  outline-color: #1e3a52;
}
.page-facilities .fac-tabs__nav.swiper-button-disabled,
.page-facilities .fac-photo__nav.swiper-button-disabled {
  opacity: 0.28;
  cursor: default;
}

.page-facilities .fac-gallery {
  margin-top: clamp(22px, 2.4vw, 36px);
  padding: clamp(28px, 3vw, 44px) clamp(16px, 2vw, 32px) clamp(22px, 2.2vw, 32px);
  border-radius: clamp(28px, 2.6vw, 40px);
  background: #1e3a52;
  min-width: 0;
}
.page-facilities .fac-gallery__name {
  margin: 0 0 clamp(18px, 2vw, 28px);
  color: #d6b992;
  font-size: clamp(22px, 1.7vw, 30px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.3;
  text-align: center;
}
.page-facilities .fac-gallery__stage {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  align-items: center;
  gap: clamp(10px, 1.4vw, 22px);
  max-width: 1080px;
  margin: 0 auto;
  min-width: 0;
}
/* 사진 높이는 슬라이드가 아니라 프레임이 만든다.
   Swiper의 height:100% 와 absolute 이미지가 서로를 0으로 줄이지 않게 한다. */
.page-facilities .fac-photo__frame {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 3 / 2;
}
.page-facilities .fac-photo__swiper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #163044;
  touch-action: pan-y;
}
.page-facilities .fac-photo__swiper .swiper-wrapper,
.page-facilities .fac-photo__swiper .swiper-slide {
  height: 100%;
}
.page-facilities .fac-photo__swiper .swiper-slide {
  position: relative;
  min-width: 0;
}
.page-facilities .fac-photo__img,
.page-facilities .fac-photo__empty {
  display: block;
  width: 100%;
  height: 100%;
}
.page-facilities .fac-photo__img {
  object-fit: cover;
}
.page-facilities .fac-photo__empty {
  display: grid;
  place-items: center;
  margin: 0;
  color: #d6b992;
  background: #163044;
}
.page-facilities .fac-photo__empty p {
  margin: 0;
  font-size: clamp(15px, 1.2vw, 18px);
  font-weight: 600;
  letter-spacing: -0.03em;
}
.page-facilities .fac-photo__nav {
  justify-self: center;
  width: 46px;
  height: 92px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  display: grid;
  place-items: center;
}
.page-facilities .fac-photo__nav svg {
  width: 18px;
  height: 18px;
  display: block;
}
.page-facilities .fac-photo__dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 16px;
  margin-top: clamp(16px, 1.8vw, 24px);
}
.page-facilities .fac-photo__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
}
.page-facilities .fac-photo__dot.is-active {
  width: 28px;
  background: #d6b992;
}
.page-facilities .fac-photo__dot:focus-visible {
  outline-color: #d6b992;
}

@media (min-width: 768px) {
  .page-facilities .fac-tab {
    height: 60px;
    font-size: 17px;
  }
  .page-facilities .fac-tabs__swiper:not(.swiper-initialized) .swiper-slide {
    width: calc((100% - 24px) / 3);
    margin-right: 12px;
  }
}
@media (min-width: 1100px) {
  .page-facilities .fac-tab {
    height: 68px;
    font-size: 19px;
  }
  .page-facilities .fac-tabs__swiper:not(.swiper-initialized) .swiper-slide {
    width: calc((100% - 80px) / 5);
    margin-right: 20px;
  }
}
@media (max-width: 767px) {
  .page-facilities .fac-gallery__stage {
    display: block;
    position: relative;
  }
  .page-facilities .fac-photo__nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 32px;
    height: 58px;
    transform: translateY(-50%);
  }
  .page-facilities .fac-photo__nav--prev {
    left: 8px;
  }
  .page-facilities .fac-photo__nav--next {
    right: 8px;
  }
  .page-facilities .fac-photo__swiper {
    border-radius: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-facilities .fac-photo__swiper .swiper-wrapper {
    transition-duration: 0ms !important;
  }
  .page-facilities .fac-tabs__swiper .swiper-wrapper {
    transition-duration: 0ms !important;
  }
}
