@charset "UTF-8";

.project-detail-main {
  width: min(100% - 10vw, 1180px);
  margin: 0 auto;
  padding: 16px 0 150px;
}

.project-detail-heading {
  display: flex;
  gap: 30px;
  align-items: baseline;
  margin-bottom: 42px;
}

.project-detail-heading h1 {
  margin: 0;
  font-family: "Yu Gothic", "YuGothic", Meiryo, sans-serif;
  font-size: clamp(22px, 2.1vw, 29px);
  font-weight: 600;
  line-height: 1.5;
}

.project-detail-heading p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(14px, 1.4vw, 19px);
  font-weight: 400;
}

.project-detail-map,
.project-detail-text,
.project-detail-photo {
  width: min(100%, 720px);
  margin-right: auto;
  margin-left: auto;
}

.project-detail-map {
  margin-bottom: 58px;
}

.project-detail-map img {
  width: 100%;
  border: 1px solid #b9bbba;
  border-radius: 3px;
}

.project-detail-text {
  margin-bottom: 54px;
  color: #555e64;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.9;
}

.project-detail-text p {
  margin: 0 0 18px;
}

.project-detail-text p:last-child {
  margin-bottom: 0;
}

.project-detail-photo img {
  width: 100%;
  border-radius: 3px;
}

.kusatsu-detail-index {
  width: min(100%, 1040px);
  margin: 130px auto 0;
}

.kusatsu-detail-index h2 {
  margin: 0 0 34px;
  color: #4e565c;
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.kusatsu-detail-index__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 42px 32px;
}

.kusatsu-detail-index__grid a {
  color: #4e565c;
  text-decoration: none;
}

.kusatsu-detail-index__grid img {
  width: 100%;
  aspect-ratio: 1.5 / 1;
  border-radius: 4px;
  object-fit: cover;
  transition: opacity 180ms ease, transform 180ms ease;
}

.kusatsu-detail-index__grid span {
  display: block;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
}

.kusatsu-detail-index__grid small {
  display: block;
  color: #737a7e;
  font-size: 12px;
  font-weight: 400;
}

.kusatsu-detail-index__grid a:hover img,
.kusatsu-detail-index__grid a:focus-visible img {
  opacity: 0.86;
  transform: scale(1.012);
}

.project-pagination {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  width: min(100%, 960px);
  margin: 120px auto 0;
  padding-top: 28px;
  border-top: 1px solid #c8cac8;
}

.project-pagination a {
  color: #4e565c;
  text-decoration: none;
}

.project-pagination__link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.project-pagination__link span {
  font-size: 15px;
  font-weight: 600;
}

.project-pagination__link small {
  overflow: hidden;
  color: #747b7f;
  font-size: 12px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-pagination__link--next {
  text-align: right;
}

.project-pagination__index {
  padding: 9px 16px;
  border: 1px solid #bfc3bf;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}

.project-pagination a:hover,
.project-pagination a:focus-visible {
  color: #8b593f;
}

.back-to-top {
  position: fixed;
  z-index: 1000;
  right: 28px;
  bottom: 28px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(78, 86, 92, 0.42);
  border-radius: 50%;
  background: rgba(247, 247, 243, 0.94);
  color: #4e565c;
  font-size: 23px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease, background-color 180ms ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: #fff;
  outline: 2px solid #a66b4d;
  outline-offset: 3px;
}

@media (max-width: 800px) {
  .project-detail-main {
    width: calc(100% - 48px);
    padding-top: 4px;
    padding-bottom: 110px;
  }

  .project-detail-heading {
    display: block;
    margin-bottom: 32px;
  }

  .project-detail-heading p {
    margin-top: 3px;
  }

  .project-detail-map {
    margin-bottom: 42px;
  }

  .project-detail-text {
    margin-bottom: 42px;
    font-size: 14px;
    line-height: 1.85;
  }

  .kusatsu-detail-index {
    margin-top: 100px;
  }

  .kusatsu-detail-index__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 34px 24px;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 42px;
    height: 42px;
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .project-detail-main {
    width: calc(100% - 32px);
    padding-bottom: 90px;
  }

  .project-detail-heading h1 {
    font-size: 20px;
  }

  .project-detail-heading p {
    font-size: 13px;
  }

  .project-detail-map {
    margin-bottom: 34px;
  }

  .project-detail-text {
    font-size: 13px;
    line-height: 1.9;
  }

  .project-detail-text p {
    margin-bottom: 16px;
  }

  .kusatsu-detail-index__grid {
    grid-template-columns: 1fr;
  }

  .project-pagination {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 82px;
  }

  .project-pagination__index {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
  }
}

/* 草津温泉・各施設の個別ページ */
.facility-detail-main {
  width: min(100% - 10vw, 1180px);
  margin: 0 auto;
  padding: 16px 0 150px;
}

.facility-detail-heading {
  margin-bottom: 8px;
}

.facility-detail-hero {
  margin: 0 0 112px;
}

.facility-detail-hero img {
  width: 100%;
  aspect-ratio: 2.18 / 1;
  border-radius: 3px;
  object-fit: cover;
}

.facility-story {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(360px, 1.18fr);
  gap: clamp(52px, 8vw, 104px);
  align-items: start;
  width: min(100%, 960px);
  margin: 0 auto 110px;
}

.facility-story figure {
  margin: 0;
}

.facility-story img {
  width: 100%;
  aspect-ratio: 1.34 / 1;
  border-radius: 3px;
  object-fit: cover;
}

.facility-story h2,
.project-data h2 {
  margin: 0 0 18px;
  color: #4e565c;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.facility-story p {
  margin: 0;
  color: #555e64;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.8;
}

.facility-story__text p + p {
  margin-top: 14px;
}

.project-data {
  width: min(100%, 960px);
  margin: 12px auto 96px;
}

.project-data h2 {
  margin-bottom: 22px;
}

.project-data dl {
  margin: 0;
  border-top: 1px solid #aeb2b1;
}

.project-data dl > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid #aeb2b1;
}

.project-data dt,
.project-data dd {
  margin: 0;
  padding: 10px 2px;
  color: #555e64;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}

.project-data dd {
  overflow-wrap: anywhere;
}

.facility-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 64px clamp(44px, 8vw, 116px);
  width: min(100%, 960px);
  margin: 0 auto;
}

.facility-gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 5px;
  object-fit: cover;
  cursor: zoom-in;
  transition: opacity 180ms ease, transform 180ms ease;
}

.facility-gallery img:hover {
  opacity: 0.88;
  transform: scale(1.015);
}

.facility-gallery img:focus-visible {
  outline: 2px solid #a66b4d;
  outline-offset: 4px;
}

/* 住宅・個別ページ */
.housing-detail-main {
  width: min(100% - 10vw, 1180px);
  margin: 0 auto;
  padding: 16px 0 150px;
}

.housing-detail-heading {
  margin-bottom: 8px;
}

.housing-detail-hero {
  margin: 0 0 96px;
}

.housing-detail-hero img {
  display: block;
  width: 100%;
  max-height: min(70vh, 760px);
  border-radius: 3px;
  object-fit: cover;
  object-position: center;
}

.housing-project-data {
  margin-bottom: 110px;
}

.housing-description {
  width: min(100%, 760px);
  margin: 0 auto 96px;
  color: #555e64;
}

.housing-description h2 {
  margin: 0 0 20px;
  color: #4e565c;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.housing-description p {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 2;
}

.housing-description p + p {
  margin-top: 16px;
}

.housing-gallery-section {
  width: min(100%, 960px);
  margin: 0 auto;
}

.housing-gallery-section > h2 {
  margin: 0 0 22px;
  color: #4e565c;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.housing-gallery {
  width: 100%;
}

body.lightbox-open {
  overflow: hidden;
}

.image-lightbox[hidden] {
  display: none;
}

.image-lightbox {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(20, 24, 26, 0.94);
}

.image-lightbox__dialog {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 44px 90px 32px;
}

.image-lightbox__figure {
  display: grid;
  justify-items: center;
  gap: 14px;
  max-width: 100%;
  margin: 0;
}

.image-lightbox__image {
  display: block;
  max-width: calc(100vw - 180px);
  max-height: calc(100dvh - 116px);
  border-radius: 3px;
  object-fit: contain;
}

.image-lightbox__caption {
  display: flex;
  justify-content: center;
  gap: 22px;
  min-height: 1.5em;
  color: #f3f1ec;
  font-size: 13px;
  letter-spacing: 0.03em;
}

.image-lightbox__counter {
  color: #c9c7c2;
  white-space: nowrap;
}

.image-lightbox__close,
.image-lightbox__nav {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 50%;
  background: rgba(20, 24, 26, 0.56);
  color: #fff;
  font: inherit;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.image-lightbox__close:hover,
.image-lightbox__nav:hover,
.image-lightbox__close:focus-visible,
.image-lightbox__nav:focus-visible {
  border-color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

.image-lightbox__close {
  top: 24px;
  right: 26px;
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
}

.image-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 42px;
  font-weight: 300;
  line-height: 1;
}

.image-lightbox__nav--prev {
  left: 24px;
}

.image-lightbox__nav--next {
  right: 24px;
}

@media (prefers-reduced-motion: reduce) {
  .facility-gallery img,
  .image-lightbox__close,
  .image-lightbox__nav {
    transition: none;
  }
}

@media (max-width: 800px) {
  .housing-detail-main {
    width: calc(100% - 48px);
    padding-top: 4px;
    padding-bottom: 110px;
  }

  .housing-detail-hero {
    margin-bottom: 76px;
  }

  .housing-project-data {
    margin-bottom: 80px;
  }

  .housing-description {
    margin-bottom: 76px;
  }

  .facility-detail-main {
    width: calc(100% - 48px);
    padding-top: 4px;
    padding-bottom: 110px;
  }

  .facility-detail-hero {
    margin-bottom: 76px;
  }

  .facility-story {
    grid-template-columns: minmax(220px, 0.9fr) minmax(280px, 1.1fr);
    gap: 38px;
    margin-bottom: 78px;
  }

  .project-data {
    margin-bottom: 72px;
  }

  .facility-gallery {
    gap: 34px 28px;
  }
}

@media (max-width: 600px) {
  .housing-detail-main {
    width: calc(100% - 32px);
    padding-bottom: 90px;
  }

  .housing-detail-hero {
    margin-bottom: 64px;
  }

  .housing-detail-hero img {
    max-height: none;
    aspect-ratio: 1.38 / 1;
  }

  .housing-description {
    margin-bottom: 64px;
  }

  .housing-description p {
    font-size: 13px;
    line-height: 1.9;
  }

  .facility-detail-main {
    width: calc(100% - 32px);
    padding-bottom: 90px;
  }

  .facility-detail-heading {
    margin-bottom: 14px;
  }

  .facility-detail-hero {
    margin-bottom: 68px;
  }

  .facility-detail-hero img {
    aspect-ratio: 1.55 / 1;
  }

  .facility-story {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 72px;
  }

  .facility-story h2 {
    margin-bottom: 12px;
    font-size: 16px;
  }

  .facility-story p {
    font-size: 13px;
    line-height: 1.9;
  }

  .project-data dl > div {
    grid-template-columns: 38% 62%;
  }

  .project-data dt,
  .project-data dd {
    padding: 9px 2px;
    font-size: 12px;
  }

  .facility-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 16px;
  }

  .image-lightbox__dialog {
    padding: 64px 16px 86px;
  }

  .image-lightbox__image {
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - 174px);
  }

  .image-lightbox__close {
    top: 14px;
    right: 14px;
  }

  .image-lightbox__nav {
    top: auto;
    bottom: 18px;
    width: 44px;
    height: 44px;
    transform: none;
  }

  .image-lightbox__nav--prev {
    left: 24px;
  }

  .image-lightbox__nav--next {
    right: 24px;
  }

  .image-lightbox__caption {
    gap: 14px;
    font-size: 12px;
    text-align: center;
  }
}
