/* ============================
   共通リセット / 変数
   ============================ */
:root{
  --table-border: #e3e8f0;
  --timeline-line: #dddddd;
  --timeline-dot: #0092cc;
}



/* ============================
   company table / layout
   モバイルは縦並び、広い画面で横並び
   ============================ */
.company-layout, .recruit-content{
  display: block;
  gap: 1rem;
}
.company-overview, .company-table, .recruit-content > div{
  width: 100%;
}
.company-table table{
  width: 100%;
  border-collapse: collapse;
}
.company-table th, .company-table td{
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #ddd;
}
.company-table th{
  width: 30%;
  background: #f5f5f5;
  color: var(--color-accent);
  font-weight: 600;
}

/* 横並びに切替（タブレット以上） */
@media (min-width: 768px){
  .company-layout, .recruit-content{
    display: flex;
    gap: 2rem;
    align-items: flex-start;
  }
  .company-overview, .company-table, .recruit-content > div{
    flex: 1;
  }
}

/* ============================
   Page Visual (ヒーロー)
   モバイルでの余白を小さく、広い画面で余裕を持たせる
   ============================ */
.page-visual{
  background: linear-gradient(135deg, #005bbb, #003f7d);
  color: #fff;
  padding: 48px 0 64px;
  text-align: center;
}
.page-visual__en{
  font-size: 14px;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.page-visual__title{
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}

/* 広い画面で拡張 */
@media (min-width: 768px){
  .page-visual{
    padding: 100px 0 120px;
  }
  .page-visual__en{ font-size: 16px; letter-spacing: 0.1em; }
  .page-visual__title{ font-size: 36px; font-weight: 300; }
}

/* ============================
   Message signature
   ============================ */
.message__signature{
  text-align: right;
  font-weight: 600;
}
.message{
  letter-spacing: 0.05em;
  font-weight: 450;
}
/* ============================
   Company profile table
   ============================ */
.company-profile__table{
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.company-profile__table th, .company-profile__table td{
  padding: 15px 20px;
  border-bottom: 1px solid var(--table-border);
}
.company-profile__table th{
  width: 25%;
  background: #f0f6ff;
  color: #003f7d;
  font-weight: 600;
}

/* ============================
   History timeline (モバイルファースト)
   - モバイル: 左寄せの縦線 + 縦積み
   - タブレット以上: 横並び（date / timeline / content）
   ============================ */

/* 基本（モバイル） */
.history{
  --date-w: 100px;       /* モバイル時の日付幅（表示上の目安） */
  --timeline-w: 40px;
  position: relative;
  margin: 0;
  padding: 0;
}
.history::before{
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(16px + (var(--timeline-w) / 2)); /* 左寄せの線 */
  width: 2px;
  background: var(--timeline-line);
  transform: translateX(-50%);
  z-index: 0;
}
.history__list{
  margin: 1.5rem 0;
  padding-left: 0;
  list-style: none;
}
.history__item{
  position: relative;
  display: block;
  padding-left: calc(var(--timeline-w) + 24px); /* ドット分の余白 */
  margin-bottom: 1.5rem;
  z-index: 1;
}
.history__date{
  margin-bottom: 0.25rem;
  font-weight: 700;
  color: #111;
  text-align: left;
}
.history__timeline{
  position: absolute;
  left: 16px;
  top: 0;
  width: var(--timeline-w);
  min-width: var(--timeline-w);
}
.history__dot{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 8px;
  width: 12px;
  height: 12px;
  background: var(--timeline-dot);
  border-radius: 50%;
  z-index: 2;
}
.history__content{
  margin-top: 0.25rem;
}
.history__text{
  margin: 0;
  line-height: 1.6;
}

/* タブレット以上：横並びに切替（date / timeline / content） */
@media (min-width: 600px){
  .history{
    --date-w: 160px;
    --timeline-w: 40px;
  }
  .history__list{ margin: 2em 0; }
  .history__item{
    display: flex;
    align-items: flex-start;
    padding-left: 0;
  }
  .history__date{
    width: var(--date-w);
    text-align: right;
    padding-right: 1em;
    margin-bottom: 0;
  }
  .history__timeline{
    position: relative;
    left: 0;
    top: 0;
    width: var(--timeline-w);
    display: flex;
    justify-content: center;
    align-items: flex-start;
  }
  .history__content{
    width: calc(100% - (var(--date-w) + var(--timeline-w)));
    padding-left: 1rem;
    margin-top: 0;
  }
  .history::before{
    left: calc(var(--date-w) + (var(--timeline-w) / 2)); /* 日付幅 + タイムライン中央 */
  }
  .history__dot{
    top: 6px;
  }
}

/* 大画面で日付列を広げたい場合 */
@media (min-width: 1024px){
  .history{ --date-w: 200px; }
}

/* ============================
   Message block 
   モバイル: 縦積み、デスクトップ: 画像左・本文右
   ============================ */

/* 基本（モバイルファースト） */
.message-block {
  display: flex;
  flex-direction: column;
  gap: var(--message-gap, 16px);
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
}

/* 画像ラッパー（レイアウト安定化） */
.message-block__image {
  margin: 0;
  width: 100%;
  overflow: hidden;
  background: #f6f8fb;
  border-radius: 8px;
  aspect-ratio: 16 / 9; /* モバイルでの安定表示 */
}

/* 画像そのもの */
.message-block__image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
}

/* コンテンツラッパー */
.message-block__content {
  padding: 0;
  box-sizing: border-box;
}

/* 署名（既存 .message__signature を尊重） */
.message__signature {
  margin-top: 16px;
  text-align: right;
  font-weight: 600;
}

/* タブレット〜小型デスクトップの微調整 */
@media (min-width: 640px) and (max-width: 880px) {
  .message-block {
    gap: 20px;
  }
  .message-block__image {
    aspect-ratio: 3 / 2;
    min-height: 200px;
  }
}

/* デスクトップ（881px 以上）：2カラムレイアウト */
@media (min-width: 881px) {
  .message-block {
    display: grid;
    grid-template-columns: var(--message-image-width, 360px) 1fr;
    gap: 32px;
    align-items: start;
  }

  /* 左カラム画像を縦長に（人物向け） */
  .message-block__image {
    aspect-ratio: 4 / 5;
    min-height: 240px;
  }

  /* テキストを縦中央に寄せる（必要なら上寄せに変更可） */
  .message-block__content {
    display: flex;
    align-items: center;
  }

  .message {
    padding: 0;
  }
}

/* アクセシビリティ補助（フォーカス時の視認性） */
.message-block__image img:focus {
  outline: 3px solid rgba(0, 92, 150, 0.12);
  outline-offset: 2px;
}