@charset "utf-8";
/* 障がい者・高齢者福祉施設一覧2ページ共通
 * common.css（Swiper使用ページはSwiper CSSも）の後に読み込む。
 * :where() のページ判定は詳細度を増やさず、元の優先順位を維持する。
 * 共通ルールは一度だけ定義し、施設固有の差分のみ適用範囲を限定する。
 */

/* ===== 施設名・メインビジュアル ===== */

/* 適用：disability-list */
:where(.facility-page-disability-list) .hero-bg {
  margin-top: 3rem;
  min-height: 300px;
  background-image: url("../disability/img/illust01.png?");
  background-size: cover;
  background-position: center center;
  border-radius: 16px;
}


/* 適用：elderly-list */
:where(.facility-page-elderly-list) .hero-bg {
  margin-top: 3rem;
  min-height: 300px;
  background-image: url("../elderly/img/illust01.png");
  background-size: cover;
  background-position: center center;
  border-radius: 16px;
}


/* 適用：全ページ共通 */
:where(.facility-list-page) .hero-section {
  position: relative;
  padding: 0 40px;
}

:where(.facility-list-page) .hero-heading {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%,50%);
  z-index: 2;
  margin: 0;
  padding: 20px 70px 24px;
  font-size: clamp(1.8rem,2.6vw,2.8rem);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-align: center;
  white-space: nowrap;
  background: #fcfcf9;
  border-radius: 100px 100px 0 0;
}

:where(.facility-list-page) .hero-figure {
  margin: 0;
  position: relative;
  z-index: 1;
}

:where(.facility-list-page) .hero-figure img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width:576px) {
  :where(.facility-list-page) .facility-hero {
    padding-top: 30px;
  }

  :where(.facility-list-page) .hero-section {
    padding: 0 16px;
  }

}

/* 適用：disability-list */
@media (max-width:576px) {
  :where(.facility-page-disability-list) .hero-bg {
    margin-top: 0;
    min-height: 230px;
    background-size: cover;
    background-position: center center;
    border-radius: 14px;
  }

}

/* 適用：elderly-list */
@media (max-width:576px) {
  :where(.facility-page-elderly-list) .hero-bg {
    margin-top: 0;
    min-height: 230px;
    background-size: cover;
    background-position: 32% center;
    border-radius: 14px;
  }

}

/* 適用：全ページ共通 */
@media (max-width:576px) {
  :where(.facility-list-page) .hero-heading {
    left: 50%;
    bottom: 0;
    transform: translate(-50%,50%);
    width: calc(100% - 110px);
    min-width: 270px;
    height: auto;
    padding: 14px 20px 17px;
    font-size: 1.65rem;
    line-height: 1.3;
    letter-spacing: 0.06em;
    white-space: nowrap;
    border-radius: 80px 80px 0 0;
  }

  :where(.facility-list-page) .facility-hero .container.mt-5 {
    margin-top: 4.5rem !important;
  }

}

/* ===== その他・ボタン・アクセス ===== */

/* 適用：disability-list */
:where(.facility-page-disability-list) .heading-accent {
  color: #109D78;
}

:where(.facility-page-disability-list) .img-flip-y {
  transform: scaleY(-1);
  transform-origin: center;
}


/* ===== 施設名・メインビジュアル ===== */

/* 適用：全ページ共通 */
@media (min-width:577px) and (max-width:999px) {
  :where(.facility-list-page) .facility-hero {
    padding-top: 40px;
  }

  :where(.facility-list-page) .hero-bg {
    margin-top: 0;
  }

}

/* ===== その他・ボタン・アクセス ===== */
:where(.facility-list-page) :is(.disability-facility-grid,.elderly-facility-grid) {
  margin-top: 12px;
}

:where(.facility-list-page) :is(.disability-facility-card,.elderly-facility-card) {
  height: 100%;
  padding: 16px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 18px;
  box-shadow: 0 6px 16px rgba(0,0,0,.05);
  transition: transform .25s ease,box-shadow .25s ease;
}

:where(.facility-list-page) :is(.disability-facility-card,.elderly-facility-card):hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
}

:where(.facility-list-page) :is(.disability-facility-card,.elderly-facility-card) > a {
  display: grid;
  grid-template-columns: minmax(150px,42%) minmax(0,1fr);
  gap: 18px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

:where(.facility-list-page) :is(.disability-facility-card,.elderly-facility-card) img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
}

:where(.facility-list-page) :is(.disability-facility-card,.elderly-facility-card) h3 {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f4f5f0;
  font-size: clamp(1.05rem,1.55vw,1.35rem);
  line-height: 1.55;
  font-weight: 500;
}


/* 適用：disability-list */
:where(.facility-page-disability-list) :is(.disability-facility-card,.elderly-facility-card) h3 small {
  display: block;
  font-size: .75em;
  font-weight: 400;
}

:where(.facility-page-disability-list) :is(.disability-facility-card,.elderly-facility-card) .facility-name {
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
}


/* 適用：elderly-list */
:where(.facility-page-elderly-list) :is(.disability-facility-card,.elderly-facility-card) h3 small {
  font-size: .75em;
  font-weight: 400;
}


/* 適用：全ページ共通 */
:where(.facility-list-page) :is(.disability-facility-card,.elderly-facility-card) .facility-service-list {
  margin-top: 0;
}

@media (max-width:575.98px) {
  :where(.facility-list-page) :is(.disability-facility-card,.elderly-facility-card) > a {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  :where(.facility-list-page) :is(.disability-facility-card,.elderly-facility-card) h3 {
    font-size: 1.15rem;
  }

}
