/**
 * HIDESIGN | PROJECT LOG 詳細 /project/{slug}/
 * WORKS詳細の余白・画像グリッド・PREV/NEXTを基準にPROJECT専用で実装。
 */
.project-single, .project-single *, .project-single *::before, .project-single *::after { box-sizing: border-box; }

/* 投稿テンプレートに残る既定のタイトル／記事情報／ブログ用ナビを消す */
body.single-g2sg_update .wp-block-post-title,
body.single-g2sg_update .wp-block-post-featured-image,
body.single-g2sg_update .wp-block-post-author,
body.single-g2sg_update .wp-block-post-author-name,
body.single-g2sg_update .wp-block-post-terms,
body.single-g2sg_update .wp-block-post-date,
body.single-g2sg_update .wp-block-post-navigation-link,
body.single-g2sg_update .wp-block-post-excerpt,
body.single-g2sg_update .wp-block-post-comments-link,
body.single-g2sg_update .wp-block-post-comments-form,
body.single-g2sg_update .wp-block-read-more,
body.single-g2sg_update .wp-block-query-pagination,
body.single-g2sg_update .wp-site-blocks main:not(.project-single) .wp-block-query:not(:has(.project-single)) {
  display: none !important;
}
body.single-g2sg_update .wp-site-blocks .wp-block-group:has(.project-single),
body.single-g2sg_update .wp-site-blocks .wp-block-post-content:has(.project-single),
body.single-g2sg_update .wp-site-blocks main:has(.project-single):not(.project-single) {
  margin-block-start: 0 !important;
  padding-block-start: 0 !important;
}
body.single-g2sg_update .wp-site-blocks > main:has(.project-single),
body.single-g2sg_update .wp-site-blocks .wp-block-post-content:has(.project-single),
body.single-g2sg_update .wp-site-blocks main .wp-block-group:has(.project-single) {
  background: #f3f3f3 !important;
}
body.single-g2sg_update .wp-site-blocks main:not(.project-single):has(.project-single) > :not(.project-single):not(:has(.project-single)),
body.single-g2sg_update .wp-site-blocks main:not(.project-single):has(.project-single) .wp-block-group:has(.project-single) > :not(.project-single):not(:has(.project-single)) {
  display: none !important;
}
body.single-g2sg_update .wp-site-blocks main:not(.project-single):has(.project-single),
body.single-g2sg_update .wp-site-blocks main:not(.project-single):has(.project-single) .wp-block-post-content:has(.project-single) {
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
  padding-block-start: 0 !important;
  padding-block-end: 0 !important;
  min-height: 0 !important;
}
body.single-g2sg_update { overflow-x: clip; }
body.single-g2sg_update .wp-site-blocks > footer,
body.single-g2sg_update footer.wp-block-template-part { width: 100vw !important; max-width: none !important; }

.project-single {
  width: 100vw;
  max-width: none !important;
  margin: 0 0 0 calc(50% - 50vw) !important;
  padding: 0;
  background: #f3f3f3;
  color: #202020;
  font-family: inherit;
}
.project-single__inner {
  width: 87.5%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 45px 0 75px;
}
.project-single__header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px 32px;
  margin: 0 0 16px;
}
.project-single__heading {
  flex: 0 0 auto;
  margin: 0 !important;
  font-size: 32px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: .015em;
}
.project-single__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 24px;
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: .025em;
}
.project-single__hero { width: 100%; aspect-ratio: 3 / 1; overflow: hidden; background: #999; }
.project-single__hero-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
}
.project-single__main-title {
  width: min(100%, 850px);
  margin: 26px auto 0 !important;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.65;
  letter-spacing: .035em;
  text-align: center;
  overflow-wrap: anywhere;
}
.project-single__content { width: 100%; padding: 0; }
.project-single__block { margin: 28px auto 0 !important; padding: 0; }
.project-single__text {
  width: min(100%, 850px);
  font-size: 12px;
  line-height: 2;
  letter-spacing: .04em;
  text-align: center;
  overflow-wrap: anywhere;
}
.project-single__text-heading {
  margin: 0 0 16px !important;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.75;
}
.project-single__text-body p { margin: 0 0 1.25em !important; font-size: inherit; line-height: inherit; }
.project-single__text-body p:last-child { margin-bottom: 0 !important; }
.project-single__text-body :is(h2,h3,h4) { margin: .5em 0 1em !important; font-size: 1.25em; }
.project-single__text-body a { text-decoration: underline; text-underline-offset: 3px; }

.project-single__single-image { width: 46%; margin-left: auto !important; margin-right: auto !important; }
.project-single__single-image--wide { width: 75%; }
.project-single__photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  background: #999;
}
.project-single__gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  width: 90%;
  align-items: start;
}
.project-single__gallery-item {
  min-width: 0;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  margin: 0 !important;
  overflow: hidden;
  background: #999;
}
.project-single__gallery-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.project-single__video { width: min(100%, 880px); aspect-ratio: 16 / 9; }
.project-single__video :is(iframe, video) { display: block; width: 100%; height: 100%; border: 0; }

.project-single__pdf { width: min(100%, 850px); }
.project-single__pdf-link {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  border: 1px solid #d2d2d2;
  padding: 16px 22px;
  color: #202020 !important;
  text-decoration: none !important;
  background: transparent;
  transition: background .2s, color .2s, border-color .2s;
}
.project-single__pdf-link:hover, .project-single__pdf-link:focus-visible {
  color: #fff !important;
  background: #202020;
  border-color: #202020;
}
.project-single__pdf-icon { border: 1px solid currentColor; padding: 3px 7px; font-size: 10px; letter-spacing: .03em; }
.project-single__pdf-name { min-width: 0; flex: 1; font-size: 13px; overflow-wrap: anywhere; }
.project-single__pdf-arrow { font-size: 18px; }

/* 下部ナビゲーション（企業情報は表示しない） */
.project-single__nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  border-top: 1px solid #d2d2d2;
  padding-top: 26px;
  margin-top: 46px;
}
.project-single__nav-side { display: flex; justify-content: flex-start; }
.project-single__nav-side--next { justify-content: flex-end; }
.project-single__nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 170px;
  max-width: 100%;
  padding: 10px 15px;
  border: 1px solid #d5d5d5;
  color: #202020 !important;
  background: transparent;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .05em;
  text-decoration: none !important;
  transition: background .2s, color .2s, border-color .2s;
}
.project-single__nav-link:hover, .project-single__nav-link:focus-visible {
  color: #fff !important;
  background: #202020;
  border-color: #202020;
}
.project-single__back {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #202020 !important;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .03em;
  text-align: center;
  text-decoration: none !important;
}
.project-single__back:hover { opacity: .55; }
.project-single__back svg { stroke: currentColor; stroke-width: 1.2; }
@media (max-width: 900px) {
  .project-single__header { gap: 10px 22px; }
  .project-single__gallery { width: 100%; gap: 18px; }
  .project-single__single-image { width: 62%; }
  .project-single__single-image--wide { width: 85%; }
}
@media (max-width: 600px) {
  .project-single__inner { width: calc(100% - 40px); padding: 36px 0 60px; }
  .project-single__header { display: block; margin-bottom: 20px; }
  .project-single__heading { font-size: 26px; margin-bottom: 12px !important; }
  .project-single__meta { gap: 6px 12px; font-size: 10px; }
  .project-single__hero { aspect-ratio: 3 / 2; }
  .project-single__main-title { margin-top: 23px !important; font-size: 17px; }
  .project-single__block { margin-top: 22px !important; }
  .project-single__text { font-size: 12px; line-height: 1.9; text-align: left; }
  .project-single__text-heading { font-size: 16px; }
  .project-single__gallery { grid-template-columns: 1fr; gap: 16px; }
  .project-single__single-image, .project-single__single-image--wide { width: 100%; }
  .project-single__pdf-link { padding: 14px; gap: 12px; }
  .project-single__nav { gap: 8px; padding-top: 20px; margin-top: 36px; }
  .project-single__nav-link { width: auto; min-width: 70px; padding: 8px 10px; font-size: 10px; gap: 6px; }
  .project-single__back { font-size: 10px; }
}
