/*
 * 院内紹介ページ - スマホ用（768px以下）
 */

/* ========================================
   Facility Gallery Section（院内紹介）
   ======================================== */
.facility-gallery {
  padding: 50px 0 60px;
  background: var(--color-bg);
}

.facility-gallery__inner {
  width: calc(100% - 40px);
  margin: 0 auto;
}

.facility-gallery__title {
  font-size: 20px;
  letter-spacing: 0.1em;
  line-height: 2;
  font-weight: 400;
  text-align: center;
  margin-bottom: 0px;
}

.description_text {
  font-size: 12px;
  letter-spacing: 0.1em;
  line-height: 2;
  font-weight: 400;
  text-align: center;
  margin-bottom: 30px;
}

.facility-gallery__grid {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.facility-gallery__item {
  display: flex;
  flex-direction: column;
  background: #f9f9f9;
}

.facility-gallery__item .text-box{
  padding: 10px 10px 20px 10px;
}

.facility-gallery__image {
  position: relative;
  width: 100%;
  padding-top: 67.1875%; /* 43/64 = 0.671875 -> 64:43のアスペクト比 */
  overflow: hidden;
}

.facility-gallery__image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.facility-gallery__item-title {
  font-size: 16px;
  letter-spacing: 0.1em;
  line-height: 1.6;
  font-weight: 400;
  margin-bottom: 10px;
}

.facility-gallery__item-text {
  font-size: 13px;
  line-height: 1.8;
  letter-spacing: 0.05em;
}

/* 画像クリックカーソル */
.facility-gallery__image {
  cursor: pointer;
}

/* ========================================
   Lightbox（ライトボックス）
   ======================================== */
.facility-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.facility-lightbox.is-active {
  opacity: 1;
  visibility: visible;
}

.facility-lightbox__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(238, 230, 218, 0.85);
}

.facility-lightbox__content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.facility-lightbox__main {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90%;
  max-height: 90%;
}

.facility-lightbox__close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10;
  padding: 0;
}

.facility-lightbox__close-line {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 2px;
  background: #333;
  transform-origin: center;
}

.facility-lightbox__close-line:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.facility-lightbox__close-line:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.facility-lightbox__image-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.facility-lightbox__image {
  max-width: 100%;
  max-height: 50vh;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.facility-lightbox__info {
  margin-top: 15px;
  padding: 0 15px;
  color: #333;
  max-width: 800px;
}

.facility-lightbox__title {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.facility-lightbox__text {
  font-size: 13px;
  line-height: 1.8;
  letter-spacing: 0.05em;
}

/* ナビゲーション矢印 */
.facility-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  /* background: rgba(0, 0, 0, 0.1); */
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.facility-lightbox__nav--prev {
  left: 10px;
}

.facility-lightbox__nav--next {
  right: 10px;
}

.facility-lightbox__nav-arrow {
  width: 20px;
  height: 20px;
  border-top: 2px solid #333;
  border-right: 2px solid #333;
}

.facility-lightbox__nav--prev .facility-lightbox__nav-arrow {
  transform: rotate(-135deg);
  margin-left: 4px;
}

.facility-lightbox__nav--next .facility-lightbox__nav-arrow {
  transform: rotate(45deg);
  margin-right: 4px;
}
