/* =========================================================
   Staff（一覧 / 詳細）共通
   ========================================================= */

/* =========================================================
   Archive（一覧）
   ========================================================= */
.post-type-archive-staff #primary .site-main {
  max-width: var(--sg-max, 1280px);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--sg-pad, 20px);
  padding-right: var(--sg-pad, 20px);
  box-sizing: border-box;
}

.post-type-archive-staff .sgc-pagehead {
  text-align: center;
}

.post-type-archive-staff .sgp-staff-archive {
  width: 100%;
}

.post-type-archive-staff .sgp-staff-group {
  margin: 0 0 60px;
}

.post-type-archive-staff .sgp-staff-store {
  margin: 0 0 18px;
  font-size: 20px;
  font-weight: 500;
}

.post-type-archive-staff .sgp-staff-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}

@media (max-width: 900px) {
  .post-type-archive-staff .sgp-staff-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .post-type-archive-staff .sgp-staff-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

.post-type-archive-staff .sgp-staff-card {
  display: block;
  text-align: left;
}

.post-type-archive-staff .sgp-staff-photo {
  position: relative;
  overflow: hidden;
  background: #eee;
}

.post-type-archive-staff .sgp-staff-photo img {
  width: 100%;
  height: auto;
  display: block;
}

.post-type-archive-staff .sgp-staff-roleen {
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
  color: #fff;
  font-family:
    "Cormorant", "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(20px, 4vw, 50px);
  font-weight: 400;
  line-height: 1.05;
  pointer-events: none;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
  padding: 5px 5px;
}

.post-type-archive-staff .sgp-staff-namebox {
  position: absolute;
  left: 0;
  bottom: 10px;
  margin: 0;
  padding: 5px 10px;
  background: #fff;
  color: #000;
  border: 1px solid #fff;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  line-height: 1;
}

.post-type-archive-staff .sgp-staff-titlejp {
  display: block;
  font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.1;
}

.post-type-archive-staff .sgp-staff-namejp {
  display: block;
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.03em;
  line-height: 1.1;
}

/* =========================================================
   Single（詳細）
   ========================================================= */
.single-staff #primary .site-main {
  max-width: var(--sg-max, 1280px);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--sg-pad, 70px);
  padding-right: var(--sg-pad, 70px);
  box-sizing: border-box;
}

/* Hero */
.sgp-staff-single .sgp-staff-hero {
  margin: 0 auto 100px;
}

.sgp-staff-single .sgp-staff-hero-inner {
  display: grid;
  position: relative;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
  align-items: stretch;
}

/* 左：画面端まで（左側だけ塗る） */
.sgp-staff-single .sgp-staff-hero-inner::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  clip-path: inset(0 30% 0 0);
  background: #eaedf0;
  top: 150px;
  bottom: calc(50px * -1);
}

/* 背景より上に出す */
.sgp-staff-single .sgp-staff-hero-left,
.sgp-staff-single .sgp-staff-hero-right {
  position: relative;
  z-index: 1;
}

/* キャッチ（画像にかぶせ） */
.sgp-staff-single .sgp-staff-catch {
  position: absolute;
  z-index: 3;
  top: 20px;
  left: 0;
  max-width: none;
  width: min(720px, 70vw);
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-weight: 500;
  font-size: clamp(16px, 2.8vw, 28px);
  line-height: 1.5;
  letter-spacing: -0.02em;
  text-shadow:
    0 0 12px rgba(255, 255, 255, 1),
    0 0 24px rgba(255, 255, 255, 1),
    0 2px 6px rgba(255, 255, 255, 1);
  margin: 0;
  padding: 10px 0;
}

/* 左：名前ブロック */
.sgp-staff-single .sgp-staff-hero-left {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding-top: 0;
}

.sgp-staff-single .sgp-staff-hero-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 14px;
  row-gap: 4px;
  margin-top: auto;
}

.sgp-staff-single .sgp-staff-hero-rolejp {
  width: 100%;
  margin: 0 0 6px;
  font-size: 17px;
  font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  font-weight: 500;
}

.sgp-staff-single .sgp-staff-hero-namejp {
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-weight: 600;
  font-size: clamp(26px, 2.5vw, 35px);
  line-height: 1.15;
  letter-spacing: 0.05em;
  margin: 0;
}

.sgp-staff-single .sgp-staff-hero-nameen {
  font-family: "Cormorant", "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-weight: 400;
  font-size: 17px;
  letter-spacing: 0.06em;
  margin: 0;
}

/* 右：ヒーロー画像 */
.sgp-staff-single .sgp-staff-hero-right {
  position: relative;
  z-index: 2;
  margin: 0;
  overflow: hidden;
  background: #eee;
}

.sgp-staff-single .sgp-staff-hero-right img {
  width: 100%;
  height: auto;
  display: block;
}

.sgp-staff-single .sgp-staff-hero-roleen {
  position: absolute;
  left: 1px;
  bottom: 5px;
  margin: 0;
  color: #fff;
  font-family: "Cormorant", "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(22px, 7vw, 80px);
  font-weight: 400;
  line-height: 1;
  text-shadow: 0px 0px 8px rgba(0, 0, 0, 0.35);
}

/* Intro（サブ写真＋本文） */
.sgp-staff-single .sgp-staff-intro {
  margin: 0 auto 15px;
  padding-bottom: 50px;
  border-bottom: 1px solid #b1b7b9;
}

.sgp-staff-single .sgp-staff-intro-inner {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 50px;
  align-items: start;
}

.sgp-staff-single .sgp-staff-intro-photo {
  margin: 0;
  overflow: hidden;
  background: #eee;
}

.sgp-staff-single .sgp-staff-intro-photo img {
  width: 100%;
  height: auto;
  display: block;
}

.sgp-staff-single .sgp-staff-lead {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.9;
  margin: 0 0 15px;
}

.sgp-staff-single .sgp-staff-catch2 {
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-weight: 500;
  font-size: clamp(22px, 2.5vw, 26px);
  line-height: 1.6;
  letter-spacing: -0.02em;
  margin: 20px 0;
}

/* プロフィール表（得意分野/趣味/花木/場所） */
.sgp-staff-single .sgp-staff-profile {
  margin: 0 0 25px;
  padding: 0;
}

.sgp-staff-single .sgp-staff-profrow {
  display: grid;
  grid-template-columns: 110px 1fr;
  column-gap: 10px;
  align-items: start;
  padding: 5px 0;
}

.sgp-staff-single .sgp-staff-profile dt {
  border: 1px solid #b1b7b9;
  background: #fff;
  font-size: 17px;
  font-weight: 500;
  text-align: center;
  line-height: 1.5;
  font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  margin: 0;
  padding: 4px 8px;
}

.sgp-staff-single .sgp-staff-profile dd {
  font-size: 17px;
  line-height: 1.5;
  margin: 0;
  padding: 4px 0;
}

@media (max-width: 900px) {
  .sgp-staff-single .sgp-staff-hero-inner {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .sgp-staff-single .sgp-staff-catch {
    width: 100%;
    top: 0;
    left: 10px;
  }

  .sgp-staff-single .sgp-staff-hero-inner::before {
    bottom: calc(50px * -0.7);
  }

  /* 左の箱を消して、中の名前だけをgridの並び替え対象にする */
  .sgp-staff-single .sgp-staff-hero-left {
    display: contents;
  }

  /* 画像を先に表示 */
  .sgp-staff-single .sgp-staff-hero-right {
    order: 1;
    position: relative;
    z-index: 2;
  }

  /* 名前ブロックを画像の下に表示 */
  .sgp-staff-single .sgp-staff-hero-name {
    order: 2;
    position: relative;
    z-index: 3;
    margin-top: 0;
    padding: 18px 20px 0;
  }

  .sgp-staff-single .sgp-staff-intro-inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }

}

@media (max-width: 600px) {
  .sgp-staff-single .sgp-staff-profrow {
    grid-template-columns: 1fr;
    column-gap: 12px;
  }

  .sgp-staff-single .sgp-staff-profrow {
    grid-template-columns: 1fr;
    column-gap: 5px;
  }

  .sgp-staff-single .sgp-staff-profile dt {
    width: 110px;
    justify-self: start;
  }

}

/* =========================================================
   Awards（受賞歴）  ※ .sgp-staff-intro の下に表示
   左：タイトル / 右：リスト（点線区切り＋リンクボタン）
   ========================================================= */

.sgp-staff-single .sgp-staff-awards {
  margin: 0 auto 70px;
}

/* 2カラム：左に「受賞歴」固定、右にリスト */
.sgp-staff-single .sgp-staff-awards-inner {
  display: grid;
  grid-template-columns: 120px 1fr;
  column-gap: 28px;
  align-items: start;
}

/* 左タイトル */
.sgp-staff-single .sgp-staff-awards-ttl {
  font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.4;
  font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  margin: 15px 0 0;
}

/* 右リスト */
.sgp-staff-single .sgp-staff-awards-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* 1行＝1件：左に表彰名、右にリンク */
.sgp-staff-single .sgp-staff-awards-item {
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px dashed #b1b7b9;
  padding: 12px 0;
}

/* 表彰名 */
.sgp-staff-single .sgp-staff-awards-name {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  line-height: 1.7;
}

/* 「施工例を見る」ボタン風リンク */
.sgp-staff-single .sgp-staff-awards-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border: 1px solid #b1b7b9;
  background: #fff;
  color: inherit;
  text-decoration: none;
  font-size: 14px;
  line-height: 1;
  padding: 7px 15px;
}

/* ホバー */
.sgp-staff-single .sgp-staff-awards-link:hover,
.sgp-staff-single .sgp-staff-awards-link:focus {
  opacity: 0.7;
  text-decoration: none;
}

/* スマホ：リンクを下に落としても見やすく */
@media (max-width: 900px) {
  .sgp-staff-single .sgp-staff-awards-inner {
    grid-template-columns: 1fr;
    row-gap: 12px;
  }
}

@media (max-width: 600px) {
  .sgp-staff-single .sgp-staff-awards-item {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .sgp-staff-single .sgp-staff-awards-link {
    align-self: flex-end;
  }
}

/* =========================================================
   受賞歴：画像スライダー（ACF無料=Textarea運用）
   ========================================================= */
.sgp-staff-single .sgp-staff-awards-slider {
  margin: 30px 0 80px;
}

.sgp-staff-single .sgp-staff-awards-slider-inner {
  width: 100%;
}

.sgp-staff-single .sgp-staff-awards-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 0 0 10px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

/* だいたい「3枚見える」幅（必要なら調整） */
.sgp-staff-single .sgp-staff-awards-card {
  flex: 0 0 calc((100% - 28px) / 3);
  scroll-snap-align: start;
  background: #eee;
  overflow: hidden;
}

@media (max-width: 900px) {
  .sgp-staff-single .sgp-staff-awards-card {
    flex-basis: calc((100% - 14px) / 2);
  }
}

@media (max-width: 600px) {
  .sgp-staff-single .sgp-staff-awards-card {
    flex-basis: 80%;
  }
}

.sgp-staff-single .sgp-staff-awards-card img {
  width: 100%;
  height: auto;
  display: block;
}

/* =========================================================
   受賞歴ギャラリー（横スライド：自動スクロール）
   ========================================================= */

/* 外枠 */
.sgp-staff-awards-slider {
  margin: 30px 0 0;
}

/* 見える範囲（ここで隠す） */
.sgp-staff-awards-slider-inner {
  overflow: hidden;
}

/* 1枚（カード） */
.sgp-staff-awards-card {
  flex: 0 0 auto;
  width: clamp(220px, 28vw, 420px);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eee;
}

.sgp-staff-awards-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* トラック：自動で左に流す */
.sgp-staff-awards-track {
  display: flex;
  gap: 16px;
  will-change: transform;
  animation: sg_award_marquee 28s linear infinite;
}

/* hover中は止める（任意） */
.sgp-staff-awards-slider:hover .sgp-staff-awards-track {
  animation-play-state: paused;
}

/* ずっと流す */
@keyframes sg_award_marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

/* 動きが苦手な人向け（OS設定で自動停止） */
@media (prefers-reduced-motion: reduce) {
  .sgp-staff-awards-track {
    animation: none;
  }

  .sgp-staff-awards-slider-inner {
    overflow-x: auto;
  }
}

/* リンクの見た目崩れ防止 */
.sgp-staff-single .sgp-staff-awards-cardlink {
  display: block;
}

/* =========================================================
   受賞歴ギャラリー（Swiper）
   ========================================================= */

.sgp-staff-awards-slider {
  margin: 30px 0 0;
}

.sgp-staff-awards-slider-inner {
  overflow: hidden;
}

/* 1枚 */
.sgp-staff-awards-card {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eee;
}

.sgp-staff-awards-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =========================================================
   Staff Single : Prev/Next pager (under award images)
   ========================================================= */
.sgp-staff .sgp-staff-pager {
  border-top: 1px solid #e3e6e8;
  margin: 30px 0 0;
}

.sgp-staff .sgp-staff-pager-inner {
  max-width: 1140px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: center;
  margin: 0;
  padding: 0 50px;
}

.sgp-staff .sgp-staff-pageritem {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #000;
  padding: 20px 12px;
  background: #fff;
}

.sgp-staff .sgp-staff-pageritem.is-next {
  justify-content: flex-end;
  text-align: right;
}

.sgp-staff .sgp-staff-pagerarrow {
  font-size: 22px;
  line-height: 1;
}

.sgp-staff .sgp-staff-pagerthumb {
  width: 50px;
  height: 50px;
  object-fit: cover;
  flex: 0 0 auto;
}

/* 役職＋名前：横並び */
.sgp-staff .sgp-staff-pagertext {
  display: flex;
  align-items: baseline;
  gap: 20px;
  min-width: 0;
}

.sgp-staff .sgp-staff-pagerrole {
  font-size: 15px;
  white-space: nowrap;
}

.sgp-staff .sgp-staff-pagername {
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sgp-staff .sgp-staff-pagerblank {
  display: block;
  height: 1px;
  /* 片側無しでも高さ崩れ防止 */
}

@media (max-width: 600px) {
  .sgp-staff .sgp-staff-pager-inner {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .sgp-staff .sgp-staff-pageritem {
    padding: 10px 5px;
  }
}

/* =========================================================
   Staff Single : staff list under pager
   - 一覧ページと同じ「画像上の白帯」
   ========================================================= */

.sgp-staff .sgp-staff-more {
  margin: 40px 0 0;
}

.sgp-staff .sgp-staff-more-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 var(--sg-pad);
}

.sgp-staff .sgp-staff-more-ttl {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 18px;
}

.sgp-staff .sgp-staff-more-shopttl {
  font-size: 20px;
  font-weight: 600;
  margin: 26px 0 14px;
}

/* PC：最大6列（小さめ） */
.sgp-staff .sgp-staff-more-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

/* カード */
.sgp-staff .sgp-staff-more-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* 写真（白帯を乗せるので relative 必須） */
.sgp-staff .sgp-staff-more-photo {
  position: relative;
  display: block;
  overflow: hidden;
  background: #eee;
}

/* 画像は一覧と同じく幅100%（小さめは列数で調整） */
.sgp-staff .sgp-staff-more-photo img {
  width: 100%;
  height: auto;
  display: block;
}

/* 画像の上に白帯（役職＋名前） */
.sgp-staff .sgp-staff-more-cap {
  position: absolute;
  left: 0;
  bottom: 10px;
  margin: 0;
  padding: 8px 12px;
  background: #fff;
  color: #000;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1;
}

.sgp-staff .sgp-staff-more-role {
  display: block;
  font-size: 13px;
  margin: 0;
}

.sgp-staff .sgp-staff-more-name {
  display: block;
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 16px;
  line-height: 1.15;
}

/* レスポンシブ（PC=6 / Tablet=3 / SP=2→1） */
@media (max-width: 1100px) {
  .sgp-staff .sgp-staff-more-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .sgp-staff .sgp-staff-more-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (max-width: 600px) {
  .sgp-staff .sgp-staff-more-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}
