/* ===========================
   ヒーロー部分（画像＋タイトル）
=========================== */
.about-hero {
  position: relative;
  height: 320px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  /* パララックス背景位置の個別設定 */
  --hero-bg-position: center bottom;
}

/* 会社概要ページのヒーローセクション専用の背景調整 */
.about-hero.parallax-hero .parallax-bg {
  height: 100vh !important; /* パララックス用の拡大を抑制 */
}

.about-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.about-hero-background img {
    width: 100%;
    object-fit: cover;
    object-position: center 90%;
}

.about-hero-content {
    position: relative;
    z-index: 2;
    color: white;
    padding: 2rem;
}

.content-label {
  font-family: var(--font-family-special-2);
  font-size: var(--font-size-label);
  line-height: var(--lh-label);
  color: white;
  letter-spacing: var(--letter-spacing-label);
  text-transform: uppercase;
}

.content-title {
  font-family: var(--font-family-default);
  font-size: var(--font-size-title);
  line-height: var(--lh-main-title);
  font-weight: bold;
  color: white;
  margin: 0;
  letter-spacing: var(--letter-spacing-sec-title);
}

/* ===========================
   本文部分（白背景＋中央寄せ）
=========================== */
.about-first-body {
  background-color: white;
  padding: 7rem 0;
  display: flex;
  justify-content: center;
}

.about-first-description {
  max-width: 680px;
  text-align: center;
  opacity: 0;
  transform: translateY(30px);
}

.about-first-description p {
  font-family: var(--font-family-default);
  font-size: var(--font-size-sec-label);
  letter-spacing: var(--letter-spacing-sec-title);
  font-weight: 500;
  margin: 0 0 1.5rem 0;
  line-height: 1.8;
  color: var(--color-title);
}

.about-first-description p:last-child {
  margin-bottom: 0;
}

/* ハイライトボックス */
.highlight-box {
  position: relative;
  color: var(--color-title);
  display: inline-block;
  overflow: hidden;
  font-weight: 600;
  margin-right: 0.5rem;
}

.highlight-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background-color: var(--color-title);
  transition: left 1s ease;
  transition-delay: 1s;
  z-index: -1;
}

.highlight-box span {
  position: relative;
  z-index: 2;
  color: var(--color-title);
  transition: color 0.3s ease 1s;
}

.highlight-box.start span {
  color: white;
}

.highlight-box.start::before {
  left: 0;
}

/* 下線アニメーション */
.underline-animation {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  display: inline; /* 複数行でも折り返す */
  white-space: normal;
  transition: background-size 1s ease;
  transition-delay: var(--underline-delay, 0ms);
}

.underline-animation.start {
  background-size: 100% 2px; /* 最終的に下線が表示される */
}

.underline-animation.start::after {
  width: 100%;
}

/* ===============================
   代表ご挨拶セクション
=============================== */
.greeting-section {
  position: relative;
  padding: 0 0 10rem 0;
  min-height: 100vh;
  overflow: hidden;
  background-color: white;
}

.section-header {
  text-align: center;
  width: 100%;
  margin-bottom: 4rem;
}

.greeting-background {
  position: absolute;
  top: 140px;
  right: -10%;
  width: 85%;
  height: calc(100% - 240px);
  min-height: 600px;
  background-image: url('../images/shutterstock_23129012132.jpg'); /* 背景画像 */
  background-size: cover;
  background-position: center;
  background-color: rgba(255,255,255,0.6);
  background-blend-mode: lighten;
  z-index: 1;
  border-radius: 20px 0 0 20px;
  opacity: 0;
}

.greeting-background.start {
  animation: slideInRight 1.5s ease-out 0.8s forwards;
}

.greeting-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  padding-left: 550px;    /* 人物画像幅 + 余白分 */
  box-sizing: border-box;
}

.greeting-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.person-image-left {
  position: absolute; /* セクション内で固定 */
  top: 200px;         /* 調整可能 */
  left: 0;            /* 左端にぴったり */
  width: auto;       /* 希望の画像幅 */
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 2;
}

.person-image-left img {
  width: 100%;
  height: auto;
  border-radius: 20px 0 0 20px;
  opacity: 0;
}

.person-info {
  position: absolute;
  top: 80%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: #fff;
  text-align: center;
}

.person-image-left img.start { 
  animation: slideInLeft 1s ease-out 0.2s forwards; 
}

.person-title {
  font-size:var(--font-size-text-s);
  font-weight: bold;
  opacity: 0;
  background: var(--color-text);
  letter-spacing: var(--letter-spacing-sec-label);
  padding: 0.2em 0.4em;
  white-space: nowrap;           /* 折り返し防止 */
}

.person-title.start { animation: slideInLeft 1s ease-out 0.4s forwards; }

.person-name {
  font-size:var(--font-size-text-m);
  letter-spacing: var(--letter-spacing-sec-label);
  font-weight: bold;
  opacity: 0;
  z-index: 1;
}

.person-name.start { animation: fadeInUp 1s ease-out 0.6s forwards; }

.greeting-right {
  max-width: 1000px;
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
}

.greeting-name {
  font-family: var(--font-family-default);
  font-size: var(--font-size-text-m);
  font-weight: bold;
  letter-spacing: var(--letter-spacing-text-m);
  margin-bottom: 1.5rem;
  white-space: normal;
  color: var(--color-title);
  opacity: 0;
}

.greeting-name.start { animation: slideInLeft 1s ease-out 1s forwards; }

.greeting-description {
  position: relative;
  font-family: var(--font-family-default);
  font-size: var(--font-size-sec-label);
  letter-spacing: var(--letter-spacing-label);
  font-weight: 500;
  margin: 0;
  color: var(--color-text);
  opacity: 0;
}

.greeting-description.start { animation: fadeInUp 1s ease-out 1.2s forwards; }

.signature {
  position: absolute;
  bottom: -20px;
  right: 0;
  opacity: 0;
}

.signature.start { animation: fadeInUp 1s ease-out 1.4s forwards; }

/* 仕切り線 */
.cp_hr01 {
	border-width: 1px 0 0 0;
	border-style: solid;
	border-color: var(--color-text);
  width: 0;
  margin: 2rem 0 1rem 0;
  opacity: 1;
  transform-origin: left; 
}

.cp_hr01.start {
  animation: underlineExpand 1s ease-out 1.6s forwards;
}

/* キャリア */
.career {
  margin: 0;
  opacity: 0;
}

.career.start { animation: fadeInUp 1s ease-out 1.8s forwards; }

/* PC版 Career 画像 */
.career-image-pc {
  width: 100%;
  height: auto;
  max-width: 600px;
  object-fit: contain;
  margin: 2rem 0;
}

/* ===============================
   会社概要セクション
=============================== */
.about-section {
  position: relative;
  width: 100vw;
  margin: 0 auto;
  padding: 5rem 0;
  font-family: var(--font-family-default);
  background-color: var(--color-title);
  font-size: var(--font-size-sec-label);
  letter-spacing: var(--letter-spacing-sec-title);
  line-height: var(--lh-label);
  color: white;
  min-height: 100vh;
  display: flex;
  align-items: start;
  overflow: hidden;
  background-image: url('../images/news-bg.png');
  background-position: bottom center;
  background-repeat: no-repeat;
  background-size: contain;
}

.about-container {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.about-vertical-text {
  position: absolute;
  font-family: var(--font-family-special-2);
  line-height: 1;
  font-weight: 400;
  left: 0;
  top: 0;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 6rem;
  color: rgba(0, 0, 0, 0.2);
  letter-spacing: 0.2em;
  z-index: 1;
  opacity: 0;
}

.about-vertical-text.start {
  animation: fadeInUp 1s ease-out 1s forwards;
}

.about-content {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: 60vh;
}

/* aboutページ専用：会社概要セクション内の.about-contentのmargin-bottomを削除 */
.about-section .about-content {
  margin-bottom: 0;
}

.about-image {
  flex: 2;
  max-width: none;
  display: flex;
  opacity: 0;
  transform: translateX(-50px);
}

.about-image.start {
  animation: slideInLeft 1s ease-out 0.2s forwards;
}

.about-image img {
  width: 100%;
  height: 100%;
  max-height: 800px;
  object-fit: cover;
  border-radius: 0 20px 20px 0;
}

.about-text {
  flex: 1.5;
  max-width: none;
  padding: 4rem 6rem 4rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-header {
  margin-bottom: 2rem;
}

.about-label {
  font-family: var(--font-family-special-2);
  font-size: var(--font-size-label);
  line-height: var(--lh-label);
  color: white;
  letter-spacing: var(--letter-spacing-label);
  text-transform: uppercase;
}

.about-title {
  font-family: var(--font-family-default);
  font-size: var(--font-size-title);
  line-height: var(--lh-main-title);
  font-weight: bold;
  color: white;
  margin: 0;
  letter-spacing: var(--letter-spacing-sec-title);
}

.about-description {
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(30px);
  font-family: var(--font-family-default);
  font-size: var(--font-size-sec-label);
  letter-spacing: var(--letter-spacing-sec-title);
  margin: 0;
  line-height: 1.8;
  color: white;
}

.about-description.start {
  animation: fadeInUp 1s ease-out 0.5s forwards;
}

.about-more {
  text-align: right;
}

.about-more .read-more-btn {
  color: white;
  text-decoration: none;
  font-size: var(--font-size-text-s);
  transition: color 0.3s ease;
}


/* table01 */
#table01 {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  width: 100%;
  margin-bottom: 2rem;
}

#table01 th,
#table01 td {
  border-bottom: 1px solid white;
  letter-spacing: var(--letter-spacing-text-m);
  text-align: left;
  padding: 1rem 0;
  vertical-align: text-top;
  font-weight: 400;
}

#table01 th {
  width: 8em;
}

/* 最後の2行（許認可・労働者派遣免許）を小さく表示 */
#table01 tr:nth-last-child(2) th,
#table01 tr:nth-last-child(2) td,
#table01 tr:last-child th,
#table01 tr:last-child td {
  border-bottom: none;
  font-size: var(--font-size-text-s);
  letter-spacing: var(--letter-spacing-text-m);
  padding: 0.5rem 0; 
}

#table01 tr:last-child th,
#table01 tr:last-child td {
  padding-top: 0.25rem;
}

/* ===============================
   地図セクション
=============================== */
.company-map-section {
  margin-top: 3rem;
  padding: 0;
}

.map-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
}

.map-container iframe {
  width: 70%;
  height: 400px;
  border: 0;
  display: block;
  margin: 0 auto; /* 中央配置 */
  filter: saturate(0); /* 白黒表示 */
}



/* ===============================
   共通アニメーション
=============================== */

@keyframes underlineExpand {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes slideInLeft {
  0% { transform: translateX(-50px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
  0% { transform: translateX(50px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===============================
   レスポンシブデザイン
=============================== */

@media (max-width: 768px) {
  /* PC/モバイル表示切り替え */
  .pc-only {
    display: none !important;
  }
  
  .mobile-only {
    display: block !important;
  }
  
  /* ヒーローセクション */
  .about-hero {
    height: 200px;
  }
  
  .about-hero-content {
    padding: 1.5rem;
  }
  
  .content-title {
    font-size: var(--mobile-font-size-sec-title);
    line-height: var(--mobile-lh-sec-title);
    letter-spacing: var(--mobile-letter-spacing-title);
  }
  
  .content-label {
    font-size: var(--mobile-font-size-sec-label);
    line-height: var(--mobile-lh-sub-text);
    letter-spacing: var(--mobile-letter-spacing-label);
  }

  /* 本文セクション */
  .about-first-body {
    padding: 4rem 1rem;
  }
  
  .about-first-description p {
    font-size: var(--mobile-font-size-main-text);
    line-height: var(--mobile-lh-main-text);
    letter-spacing: var(--mobile-letter-spacing-text);
    margin: 0 0 2rem 0;
    word-break: keep-all; /* 単語の途中で改行しない（日本語対応） */
    white-space: normal; /* 通常の改行処理 */
  }
  
  .about-first-description p:last-child {
    margin-bottom: 0;
  }

  /* 代表ご挨拶セクション */
  .greeting-section {
    padding: 2rem 1rem 3rem 1rem; /* 上下のパディングを縮小 */
    min-height: auto;
    background-color: white;
    display: flex;
    flex-direction: column;
  }
  
  /* モバイル版では背景画像のz-indexを下げる */
  .greeting-background {
    z-index: 0;
    height: calc(100% - 180px);
    position: absolute;
    order: 0; /* 背景は最初 */
  }

  .section-header {
    position: relative;
    z-index: 3; /* 背景より前面に表示 */
    order: 1; /* タイトルを最初に表示 */
    text-align: center;
    margin-bottom: 2rem;
    padding: 0;
    width: 100%;
    left: 0;
    right: 0;
  }

  .section-title {
    font-size: var(--mobile-font-size-sec-title);
    line-height: var(--mobile-lh-sec-title);
    letter-spacing: var(--mobile-letter-spacing-title);
    z-index: 2;
  }

  .greeting-background {
    width: 100%;
    border-radius: 20px 0 0 20px;
  }
  
  .section-label {
    font-size: var(--mobile-font-size-sec-label);
    line-height: var(--mobile-lh-sub-text);
    letter-spacing: var(--mobile-letter-spacing-label);
    z-index: 2;
  }

  .greeting-container {
    padding-left: 0;
    position: relative;
    z-index: 2;
    order: 3;
    margin-top: 0;
    padding: 0 1rem;
  }
  
  .person-image-left {
    position: relative;
    width: 100%;
    margin: -140px 0 0 0;
    order: 2;
    z-index: 4;
  }

  .person-title {
    font-size: var(--mobile-font-size-sub-title);
  }

  .person-name {
    font-size: var(--mobile-font-size-fv-title);
  }

  .person-info {
    top: 70%;
  }

  .person-image-left img {
    width: 100%;
    height: auto;
    transform: translateY(0);
  }

  .person-image-left .person-info {
    transform: translateY(50);
  }

  /* モバイル版で肖像画の上にテキストを表示 */
  .person-image-left::before {
    content: "人を豊かにする会社、Winrichの想い";
    position: absolute;
    top: -30px; /* 位置を調整 */
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-family-default);
    font-size: var(--mobile-font-size-sub-title);
    font-weight: bold;
    letter-spacing: var(--mobile-letter-spacing-text);
    color: var(--color-title);
    text-align: center;
    white-space: nowrap; /* 1行で表示 */
    z-index: 5;
    /* シンプルなフェードインアニメーション */
    opacity: 0;
    animation: fadeInText 1s ease-out 1s forwards;
  }

  /* テキスト用のフェードインアニメーション */
  @keyframes fadeInText {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  /* モバイル版では元の greeting-name を非表示にする */
  .greeting-name {
    display: none !important;
  }
  
  .greeting-right {
    max-width: 100%;
    margin-top: 15rem; /* 肖像画の下に十分な余白を追加 */
  }
  
  .greeting-description {
    font-size: var(--mobile-font-size-sub-text);
    line-height: var(--mobile-lh-sub-text);
    letter-spacing: var(--mobile-letter-spacing-text);
    margin-bottom: 2rem;
    position: relative; /* positionを調整 */
  }

  .signature {
    bottom: -60px;
  }

  /* モバイル版 Career 画像 */
  .career-image-mobile {
    width: 100%;
    height: auto;
    max-width: 500px; /* タブレットでも適切なサイズに制限 */
    object-fit: contain;
  }

  /* 会社概要セクション */
  .about-section {
    padding: 3rem 0;
    display: flex;
    flex-direction: column;
  }
  
  /* モバイル版のタイトル（セクション最上部） */
  .about-section .about-header.mobile-only {
    margin-bottom: 2rem;
    text-align: center;
    order: 1; /* 最初に表示 */
  }
  
  .about-header {
    margin-bottom: 3rem;
    text-align: center;
    order: 0;
  }

  .about-vertical-text {
    font-size: 2rem;
  }

  .about-content {
    flex-direction: column;
    gap: 0;
    margin-bottom: 1rem;
    min-height: auto;
    order: 2; /* モバイル版タイトルの後に表示 */
  }

  .about-image {
    max-width: 100%;
    margin-bottom: 2rem; /* 画像と概要内容の間隔 */
  }

  .about-image img {
    width: 95%;
    height: 250px;
  }
  
  .about-text {
    max-width: 100%;
    padding: 0 1rem; /* 上下パディングを削除 */
  }
  
  .about-title {
    font-size: var(--mobile-font-size-sec-title);
    line-height: var(--mobile-lh-sec-title);
    letter-spacing: var(--mobile-letter-spacing-title);
    text-align: center; /* タイトルを中央寄せ */
  }
  
  .about-label {
    font-size: var(--mobile-font-size-sec-label);
    line-height: var(--mobile-lh-sub-text);
    letter-spacing: var(--mobile-letter-spacing-label);
    text-align: center; /* ラベルも中央寄せ */
  }
  
  .about-description {
    font-size: var(--mobile-font-size-main-text);
    line-height: var(--mobile-lh-main-text);
    letter-spacing: var(--mobile-letter-spacing-text);
    word-break: keep-all; /* 単語の途中で改行しない（日本語対応） */
    overflow-wrap: break-word; /* 必要に応じて改行 */
    line-break: strict; /* 句読点での改行を促進 */
    white-space: normal; /* 通常の改行処理 */
  }

  /* モバイル版テーブルのスタイル調整 */
  #table01 {
    font-size: var(--mobile-font-size-sub-text);
    line-height: var(--mobile-lh-sub-text);
    letter-spacing: var(--mobile-letter-spacing-text);
  }

  #table01 th,
  #table01 td {
    font-size: var(--mobile-font-size-sub-text);
    line-height: var(--mobile-lh-sub-text);
    letter-spacing: var(--mobile-letter-spacing-text);
    padding: 0.8rem 0; /* モバイル用のパディング */
  }

  /* 最後の2行（許認可・労働者派遣免許）を小さく表示 */
  #table01 tr:nth-last-child(2) th,
  #table01 tr:nth-last-child(2) td,
  #table01 tr:last-child th,
  #table01 tr:last-child td {
    font-size: var(--mobile-font-size-small);
    padding: 0.5rem 0;
  }

  #table01 tr:last-child th,
  #table01 tr:last-child td {
    padding-top: 0.3rem;
  }

  /* モバイル版地図 */
  .company-map-section {
    margin-top: 2rem;
  }

  .map-container iframe {
    width: 90%;
    height: 300px;
    margin: 0 auto; /* 中央配置 */
  }

} /* @media (max-width: 768px) の終了 */