/* ========================================
   仕事を知る(TOPページ)
======================================== */
.job-section {
  position: relative;
  padding: 60px 140px;
  overflow: visible;
}

/* 本体カード */
.job-card {
  background: var(--color-base);
  border: 2px solid var(--text-black);
  border-radius: 50px;
  padding: 40px;
  position: relative;
  z-index: 1;
}

/* ---- 職種グループ共通 ---- */
.job-group {
  padding-bottom: 50px;
  border-bottom: 1px dashed var(--color-dark-blue);
}
.job-group:last-child {
  padding-bottom: 0;
  border-bottom: none;
  padding-top: 50px;
}

.job-group__header {
  display: flex;
  align-items: flex-start;
  gap: 60px;
  margin-bottom: 24px;
}

.job-group__label {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-dark-blue);
  color: var(--text-white);
  font-size: clamp(24px, 2.8vw, 42px); /* 42px固定 → 画面幅に応じて可変 */
  font-weight: var(--font-weight-bold);
  padding: clamp(12px, 1.5vw, 20px) clamp(16px, 2vw, 30px);
  width: clamp(180px, 22vw, 320px); /* 320px固定 → 画面幅に応じて可変 */
}

.job-group__meta {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding-top: 4px;
}

.job-group__meta-tag {
  display: inline-block;
  background: var(--color-dark-blue);
  color: var(--text-white);
  font-size: 14px;
  font-weight: var(--font-weight-bold);
  padding: 4px 16px;
  margin-bottom: 8px;
}

.job-group__meta-list {
  list-style: none;
  margin: 0;
  padding: 0 0 8px;
}

.job-group--sys .job-group__meta-list {
  border-top: 1px dashed var(--color-system03);
}
.job-group--design .job-group__meta-list {
  border-top: 1px dashed var(--color-design03);
}

.job-group__meta-list li {
  position: relative;
  padding-left: 1.1em;
  font-size: 16px;
  color: var(--text-black);
  line-height: 1.8;
}
.job-group__meta-list li::before {
  content: "・";
  position: absolute;
  left: 0;
}

/* ---- Q&A 吹き出し ---- */
/* 2つの吹き出しを同じ位置に重ね、高さは長い方に揃える */
.job-group__qa-wrap {
  display: grid;
  margin: 0 0 40px; /* 下に尾の分の余白 */
}

.job-group__qa {
  grid-area: 1 / 1;
  position: relative;
  background: var(--text-white);
  border-radius: 20px;
  padding: 24px 28px;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}
.job-group__qa.is-active {
  opacity: 1;
  visibility: visible;
}

/* 尾:下向き */
.job-group__qa::after {
  content: "";
  position: absolute;
  bottom: -14px;
  left: var(--tail-x, 50%);
  transform: translateX(-50%);
  border-width: 14px 12px 0 12px;
  border-style: solid;
  border-color: var(--text-white) transparent transparent transparent;
  transition: left 0.25s ease;
}
/* 1人目(左)と2人目(真ん中)の写真の中心に向ける */
.job-group__qa[data-qa-index="0"] {
  --tail-x: calc(100% / 6 - 8px);
}
.job-group__qa[data-qa-index="1"] {
  --tail-x: 50%;
}

/* ホバーできることが伝わるように */
.job-member[data-qa-index] {
  cursor: pointer;
}
.job-member[data-qa-index] .job-member__photo img {
  transition: transform 0.2s ease;
}
.job-member[data-qa-index]:hover .job-member__photo img,
.job-member[data-qa-index].is-active .job-member__photo img {
  transform: translateY(-4px);
}
.job-group__question {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: var(--font-weight-bold);
  color: var(--text-black);
  line-height: 1.7;
}
.job-group__question-mark {
  background: linear-gradient(transparent 60%, var(--color-system2) 60%);
  background-repeat: repeat-x;
}
.job-group--design .job-group__question-mark {
  background: linear-gradient(transparent 60%, var(--color-design2) 60%);
  background-repeat: repeat-x;
}

.job-group__answer {
  margin: 0;
  font-size: 16px;
  line-height: 1.9;
  color: var(--text-black);
}

.job-group__qa-btn {
  display: flex;
  width: fit-content;
  margin: 16px 0 0 auto; /* 右寄せ */
}

/* ---- メンバー3人 ---- */
.job-group__members {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.job-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.job-member__photo {
  width: 100%;
  max-width: 220px;
  margin-bottom: 12px;
}
.job-member__photo img {
  display: block;
  width: 100%;
  height: auto; /* 背景の形も含めて画像側で用意されている前提 */
}

.job-member__role {
  margin: 0 0 4px;
  font-size: 15px;
  color: #777;
}

.job-member__name {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: var(--font-weight-bold);
  color: var(--text-black);
}

.job-member__btn {
  display: inline-flex;
}

/* ---- レスポンシブ ---- */
@media (max-width: 1000px) {
  .job-section {
    padding: 32px 30px;
  }

  .job-group__header {
    flex-direction: column;
    gap: 16px;
  }
  .job-group__label {
    min-width: 0;
    width: 250px;
    font-size: 30px;
    padding: 15px 20px;
  }
  .job-group__qa {
    margin-left: 0;
  }
}

@media (max-width: 600px) {
  .job-section {
    padding: 0;
  }
  .job-group__label {
    width: 180px;
    font-size: 24px;
    padding: 10px 15px;
  }
  .job-group__meta {
    gap: 16px;
  }
  .job-group__members {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .job-card {
    padding: 24px;
    border-radius: 20px;
  }
  .job-group__question {
    font-size: 20px;
  }
  .job-group__answer {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
  }
  .job-group__qa[data-qa-index="1"] {
    display: none;
  }
  .job-group__qa[data-qa-index="0"] {
    opacity: 1;
    visibility: visible;
    --tail-x: 50%; /* 尾を中央に */
  }

  /* ホバー用の動きをなくす */
  .job-member[data-qa-index] {
    cursor: default;
  }
  .job-member[data-qa-index]:hover .job-member__photo img,
  .job-member[data-qa-index].is-active .job-member__photo img {
    transform: none;
  }
}
@media (max-width: 400px) {
  .job-group__meta {
    grid-template-columns: 1fr; /* 2列 → 1列(縦積み)に切り替え */
  }
  .job-group:last-child {
    padding-top: 20px;
  }
}

/* ========================================
   環境を知る 導線(TOPページ)
======================================== */
.tobira-section {
  position: relative;
  padding: 60px 140px;
  overflow: visible;
}

/* 本体カード */
.tobira-card {
  position: relative;
  z-index: 1;
  /* padding: 30px 140px; */
}

.tobira-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 24px;
}

.tobira-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--color-base);
  border: 2px solid var(--text-black);
  border-radius: 24px;
  padding: 32px 24px;
  text-align: center;
}

.tobira-item > .stat-toggle {
  margin-top: auto; /* 残りの余白を上に吸収し、ボタンを一番下に固定 */
}

.tobira-item__title {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: var(--font-weight-bold);
  color: var(--text-black);
}

.tobira-item__text {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-black);
}

/* 企業情報カード */
.company-card {
  background: var(--color-base);
  border: 2px solid var(--text-black);
  border-radius: 24px;
  padding: 32px 40px;
}

.company-table {
  margin: 0 0 24px;
}
.company-table__row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.company-table__row:last-child {
  border-bottom: none;
}
.company-table__row dt {
  font-weight: var(--font-weight-bold);
  color: var(--text-black);
}
.company-table__row dd {
  margin: 0;
  color: var(--text-black);
  line-height: 1.8;
}
.company-table__note {
  font-size: 12px;
  color: #777;
}
.company-table__map,
.company-table__link {
  color: var(--color-system);
  text-decoration: underline;
}

.company-card__btn {
  justify-content: center;
}
.company-card__btn-wrap {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

@media (max-width: 1000px) {
  .tobira-section {
    padding: 32px 30px;
  }
  .company-table__row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 600px) {
  .tobira-section {
    padding: 32px 15px;
  }
  .tobira-tag {
    font-size: 20px;
    padding: 12px 28px 12px 52px;
  }
  .tobira-tag-pin {
    width: 56px;
    height: 56px;
    left: 2px;
  }
  .tobira-item {
    padding: 14px 18px;
  }
  .company-card {
    padding: 14px 18px;
  }
  .tobira-item__title {
    font-size: 18px;
  }
  .tobira-item__text {
    font-size: 12px;
  }
  .tobira-grid {
    gap: 10px;
  }
  .tobira-grid {
    margin-bottom: 10px;
  }
}

/* ========================================
   yep見にいく? ブログスライダー(TOPページ)
======================================== */
.blog-section {
  position: relative;
  padding: 60px 0 80px;
  overflow: visible;
}

.blog-deco--tag {
  position: absolute;
  top: 0;
  left: clamp(-40px, -6vw, -50px);
  z-index: 3;
  width: clamp(305px, 40vw, 770px);
}
.blog-deco--tag img {
  display: block;
  width: 100%;
  height: auto;
}

.blog-deco--tag-spacer {
  width: 100%;
  height: clamp(60px, 10vw, 170px); /* タグ画像のだいたいの高さ */
}

.blog-marquee {
  width: 100%;
  overflow: hidden;
  position: relative;
  z-index: 1;
  margin-top: clamp(
    -60px,
    -6vw,
    -30px
  ); /* マイナス値で確実にスライダーを押し上げ、タグと重ねる */
}

.blog-marquee__track {
  display: flex;
  width: max-content;
  gap: clamp(12px, 1.5vw, 24px);
  animation: blog-marquee-scroll 30s linear infinite;
}

/* ホバー中は一時停止(見たい写真をじっくり見られるように) */
.blog-marquee:hover .blog-marquee__track {
  animation-play-state: paused;
}

.blog-marquee__item {
  flex: 0 0 auto;
  width: clamp(140px, 17vw, 320px);
  height: clamp(140px, 17vw, 320px);
  border-radius: 16px;
  overflow: hidden;
  display: block;
  border: 2px solid var(--text-black);
}
.blog-marquee__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* トラックの前半分だけ動かし、後半(複製分)に来た瞬間に0%へ戻すことで
   シームレスにループさせる。HTML側で同じ画像セットを2回並べているのが前提 */
@keyframes blog-marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* 右下:落ちているピン画像(画面幅に応じてサイズ変化) */
.blog-deco--pin {
  position: absolute;
  right: clamp(20px, 5vw, 80px);
  bottom: clamp(20px, 4vw, 60px);
  width: clamp(50px, 6vw, 90px);
  z-index: 3;
  pointer-events: none;
}
.blog-deco--pin img {
  display: block;
  width: 100%;
  height: auto;
}

.blog-section__btn-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

@media (max-width: 1000px) {
  .blog-section {
    padding: 32px 0;
  }
  .company-table__row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* ========================================
   強みを知る(TOPページ)
======================================== */
.strength-section {
  position: relative;
  padding: 0 0 60px 140px;
  overflow: visible;
}

/* .strength-card {
  background: var(--color-base);
  border: 2px solid var(--text-black);
  border-radius: 40px;
  padding: 40px;
  position: relative;
  z-index: 1;
} */

/* ---- チェック付きリスト ---- */
.strength-list {
  list-style: none;
  margin: 0 0 40px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.strength-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--color-base);
  border: 2px solid var(--text-black);
  border-radius: 9999px 24px 24px 9999px;
  padding: 12px 0 12px 16px;
  align-items: center;
}

.strength-item__check {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-dark-blue);
  color: var(--text-white);
  font-size: 30px;
  margin-left: 8px; /* チェックマークの左に少し余白を追加 */
}

.strength-item__body {
  flex: 1;
  display: grid;
  grid-template-columns: 320px 1fr;
  align-items: center;
}

.strength-item__main {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.strength-item__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.9;
  color: var(--text-black);
  background: var(--text-white);
  border-radius: 9999px 24px 24px 9999px;
  padding: 16px 24px; /* 説明文側のpaddingを少し詰める */
}
.strength-item__text a {
  text-decoration: underline;
}
.strength-item__text span {
  color: var(--text-red);
}

.strength-item__lead {
  margin: 0 0 4px;
  font-size: 13px;
  color: #777;
}
.strength-item__lead::before {
  content: "＼";
  color: var(--text-red);
}
.strength-item__lead::after {
  content: "／";
  color: var(--text-red);
}

.strength-item__title {
  margin: 0;
  font-size: 40px;
  font-weight: var(--font-weight-bold);
  color: var(--text-black);
  line-height: 1.4;
}

/* ---- 代表者(工藤さん)ボイス ---- */
.voice-member {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 0;
}

.voice-member__photo {
  flex-shrink: 0;
  width: 320px;
}
.voice-member__photo img {
  display: block;
  width: 100%;
  height: auto;
}

/* 縦書きラベル */
.voice-member__label {
  position: absolute;
  left: -8px;
  bottom: 90px;
  writing-mode: vertical-rl;
  background: var(--color-dark-blue);
  border: 2px solid var(--text-black);
  padding: 12px 6px;
  z-index: 2;
}
.voice-member__role {
  font-size: 14px;
  font-weight: var(--font-weight-bold);
  color: var(--text-white);
  letter-spacing: 0.1em;
}

.voice-member__name {
  position: absolute;
  left: 0;
  bottom: 0;
  background: var(--text-white);
  border: 2px solid var(--text-black);
  padding: 8px 20px;
  font-size: 18px;
  font-weight: var(--font-weight-bold);
  color: var(--text-black);
  z-index: 2;
}

/* 吹き出し */
.voice-bubble {
  position: relative;
  flex: 1;
  background: var(--text-white);
  border: 2px solid var(--text-black);
  border-radius: 24px;
  padding: 32px 40px;
  margin-right: 30px; /* 写真に少し重ねる */
}

.voice-bubble__text {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-black);
}
.voice-bubble__text:last-child {
  margin-bottom: 0;
}

/* ---- レスポンシブ ---- */
@media (max-width: 1000px) {
  .strength-section {
    padding: 0 32px 30px;
  }
  .strength-item__check {
    display: none;
  }

  /* カード自体を通常の四角形に */
  .strength-item {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-radius: 24px; /* 左右非対称の丸みをやめて通常の角丸に */
    padding: 0;
    overflow: hidden; /* 中の要素をこの四角形の形でクリップ */
  }

  /* サブタイトル+タイトル部分 */
  .strength-item__body {
    grid-template-columns: 1fr; /* 2列 → 1列(縦積み) */
    gap: 0;
    padding: 24px;
  }

  .strength-item__main {
    padding: 0;
  }
  .strength-item__lead {
    text-align: center;
  }
  .strength-item__title {
    text-align: center;
  }

  /* 説明文:別の枠として独立させ、下に配置 */
  .strength-item__text {
    border-radius: 10px; /* 左だけ丸い形をやめて四角に */
    border: none;
    padding: 20px 24px;
  }
  .voice-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    background-color: var(--color-base);
    border-radius: 25px;
    padding: 20px;
    border: 1px solid var(--text-black);
  }
  /* 吹き出し:枠を無くし、テキストだけシンプルに配置 */
  .voice-bubble {
    order: 1;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0 0 24px;
    width: 100%;
  }
  /* 写真・ラベル行:横並び(ラベル+名前は縦積み、右に写真) */
  .voice-member__row {
    display: flex;
    align-items: flex-end;
    gap: 0;
    order: 2;
    position: relative; /* ← これを追加:ラベル配置の基準にする */
  }

  .voice-member__name {
    position: absolute;
    left: 0;
    bottom: 0;
  }

  /* PC用のleft:-8px; bottom:90px; を、.voice-member__row基準の値に上書き */
  .voice-member__label {
    position: absolute;
    left: 0; /* -8px → 0 */
    top: auto;
    bottom: 60px; /* 90px → 60pxに変更(写真の高さに応じて調整) */
  }

  .voice-member__photo {
    width: 300px;
  }
  .voice-member__photo img {
    display: block;
    width: 100%;
    height: auto;
  }
}

@media (max-width: 600px) {
  .strength-section {
    padding: 0 32px 15px;
  }

  .strength-card {
    border-radius: 24px;
  }
  .strength-item {
    flex-direction: column;
    align-items: flex-start;
    border-radius: 24px;
    padding: 20px;
  }
  .strength-item__title {
    font-size: 20px;
  }

  .voice-member__photo {
    width: 200px;
  }

  .voice-member__label {
    writing-mode: vertical-rl;
    left: -35px;
    bottom: 0;
    height: 130px; /* 6文字が1列で収まる十分な高さを明示的に指定 */
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .voice-member__name {
    left: 0;
    bottom: 0;
  }

  .strength-list {
    gap: 10px;
  }
  .strength-item__body {
    padding: 0;
  }
  .strength-item__text {
    padding: 14px;
  }
}
/* ========================================
   ヒーロー(TOPページ メインビジュアル)
======================================== */
.hero-section {
  position: relative;
  overflow: hidden;
  padding: 70px 40px 40px;
}

.hero-visual {
  position: relative;
  width: 100%;
  background: var(--color-base); /* 前回追加した土台の色 */
  box-sizing: border-box;
  border-radius: 24px; /* 土台自体も角丸に */
}

/* 写真共通 */
.hero-visual__photo {
  display: block;
  height: auto;
}

/* 背景:奥に薄く見える写真 */
.hero-visual__photo--bg {
  position: relative; /* absoluteをやめて、paddingの効果を受けられるようにする */
  border-radius: 24px; /* 写真自体の角も丸める */
  opacity: 0.35;
  width: 100%;
}

/* 前景:手前の集合写真 */
.hero-visual__photo--main {
  position: absolute;
  top: -70px;
  left: 140px;
  width: 72%;
  z-index: 2;
}

.hero-copy {
  position: absolute;
  top: 30%;
  left: 60%;
  z-index: 3;
}

.hero-copy__line2 {
  margin: 0;
  font-size: clamp(20px, 2.6vw, 40px);
  font-weight: var(--font-weight-bold);
  color: var(--text-black);
  line-height: 1.6;
}

.hero-copy__line1 {
  position: relative;
  margin: 0 0 16px; /* 下に余白を追加 */
  font-size: clamp(20px, 2.6vw, 40px);
  font-weight: var(--font-weight-bold);
  color: var(--text-black);
  line-height: 1.6;
}

.hero-copy__deco--underline {
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: -18px;
  width: 104%; /* 行全体の幅を基準にするので、108%ほど大きくしなくてOK */
  height: auto;
}

.hero-copy__accent {
  position: relative;
  color: var(--text-red);
  display: inline-block;
}

.hero-copy__deco {
  position: absolute;
  pointer-events: none;
  display: block;
  z-index: -1;
}

.hero-copy__deco--circle {
  top: -20%;
  left: -8%;
  width: 116%;
  height: auto;
}

/* SPでのみ表示する縦書き英字テキスト(PCでは非表示) */
.hero-copy__vertical-en {
  display: none;
}

/* 波形装飾 */
.hero-wave {
  position: absolute;
  left: 50%; /* 中央基準にするため */
  right: auto;
  bottom: -23px;
  z-index: 2;
  pointer-events: none;
  width: 120%; /* 親要素の120%の幅を確保 */
  transform: translateX(-50%); /* 中央に戻す */
}
.hero-wave__img {
  display: block;
  width: 100%; /* .hero-wave自体が120%になっているので、そのままでOK */
  height: auto;
}

/* PC用の波形はSPで非表示、SP用の波形はPCで非表示 */
.hero-wave__img--sp {
  display: none;
}

@media (max-width: 1000px) {
  .hero-section {
    padding: 40px 40px 0;
  }
  .hero-visual {
    aspect-ratio: 16 / 10;
  }

  .hero-visual__photo--bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
  }

  /* 1000px〜601px用の位置(topを基準に調整) */
  .hero-visual__photo--main {
    position: absolute;
    top: -5%; /* bottom:0 ではなく top基準で位置調整 */
    left: 50%;
    width: 75%; /* 少し大きめに調整 */
    transform: translateX(-50%);
    z-index: 2;
  }

  .hero-copy {
    top: 25%;
    left: auto;
    right: 6%;
    max-width: 60%;
    text-align: left;
  }
  .hero-copy__line1,
  .hero-copy__line2 {
    font-size: clamp(14px, 2.5vw, 22px);
    line-height: 1.5;
  }
  .hero-copy__line1 {
    margin-bottom: 8px;
  }

  .hero-copy__deco--underline {
    bottom: -6px;
  }
  .hero-copy__deco--circle {
    top: -14%;
  }

  .hero-copy__vertical-en {
    display: block;
    position: absolute;
    top: 22%;
    left: 4%;
    writing-mode: vertical-rl;
    font-size: 10px;
    letter-spacing: 0.15em;
    color: var(--text-red);
    z-index: 3;
    margin: 0;
  }

  .hero-wave {
    left: 50%;
    bottom: -20px;
    width: 140%;
    transform: translateX(-50%);
  }
}

/* 600px以下:縦長に切り替わるタイミングで、位置指定もリセットし直す */
@media (max-width: 600px) {
  .hero-visual {
    aspect-ratio: 3 / 4;
  }
  .hero-section {
    padding: 32px 15px 0;
  }

  /* 600px以下専用の位置(元のtop:auto; bottom:0の形に戻す) */
  .hero-visual__photo--main {
    top: auto;
    bottom: -95px;
    transform: translateX(-50%) scale(1.6); /* scaleで拡大する方式に変更 */
    transform-origin: bottom center; /* 下端中央を基準に拡大 */
    left: 280px;
  }

  .hero-copy {
    top: 12%;
    right: 5%;
    max-width: 65%;
  }
  .hero-copy__line1,
  .hero-copy__line2 {
    font-size: clamp(12px, 3.4vw, 20px);
  }
}

@media (max-width: 400px) {
  .hero-visual__photo--main {
    left: 230px;
  }
  .strength-section {
    padding: 32px 15px;
  }
}
