:root {
  --primary: #5b62a6;
  /* メインカラー */
  --secondary: #ec6941;
  /* アクセントカラー */
  --surface: #ffffff;
  --background: #f5f5f5;
  --on-primary: #ffffff;
  --on-secondary: #ffffff;
  --on-surface: #333333;
  --elevation-1: 0px 2px 4px rgba(0, 0, 0, 0.1);
  --elevation-2: 0px 4px 8px rgba(0, 0, 0, 0.15);
  --radius: 8px;

  /* 分野別カラー */
  --mechanical: #4a77a8;
  --electronics: #3fa7d6;
  --software: #4da94d;
  --color-text-on-field: #ffffff;
}

/* h1 */
.companyBox01 h1 .h2wrap {
  padding: 66px 0;
  width: 90%;
  margin: 0 auto;
}

h1 {
  max-width: 100%;
}

#container h1 .h2Eng {
  font-size: 150%;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--on-primary);
  max-height: 43px;
}

#container h1 .h2Jan {
  padding-top: 10px;
  font-weight: normal;
  font-size: 21px;
}

#container h1 .h2Eng,
#container h1 .h2Jan {
  display: block;
  color: var(--on-primary);
  text-align: center;
}

.companyLayout .companyBox01 h1 {
  background-image: url(../common/img/h1_company.jpg);
}

/* === 共通セクション（モバイルファースト） === */
main section {
  margin: 1.5rem auto;
  padding: 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--elevation-1);
  max-width: 100%;
  /* モバイルでは幅いっぱい */
}

/* セクション見出し */
.companyBox01 h2 {
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  border-left: 6px solid var(--primary);
  padding-left: 0.75rem;
}

/* === 会社概要テーブル（レスポンシブ対応） === */
.company-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
  font-size: 1rem;
  border: none;
}

.company-table th,
.company-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #ddd;
  text-align: left;
  border: none;
}

.company-table th {
  background: rgba(91, 98, 166, 0.1);
  color: var(--primary);
  font-weight: 600;
  width: 25%;
}

.company-table tbody tr:nth-child(odd) {
  background: rgba(91, 98, 166, 0.05);
}

/* モバイル向けスタイル */
@media (max-width: 768px) {
  .company-table th {
    display: none;
    /* スマホでは見出しを非表示 */
  }

  .company-table td {
    display: block;
    padding: 0.75rem 1rem;
    border: none;
    background: var(--surface);
  }

  .company-table td::before {
    content: attr(data-label);
    font-weight: bold;
    color: var(--primary);
    display: block;
    margin-bottom: 0.5rem;
  }

  .company-table tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    box-shadow: var(--elevation-1);
    overflow: hidden;
  }
}

/* === 認定証エリア === */
.certificates {
  display: flex;
  flex-direction: column;
  /* モバイルでは縦並び */
  align-items: center;
  gap: 1.5rem;
  /* 隙間を少し小さく */
  margin-top: 1.5rem;
}

.aichi-meister-logo {
  max-width: 500px;
  width: 100%;
  margin: 0;
  text-align: center;
}

.aichi-meister-logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: var(--elevation-1);
  display: block;
  margin: 0 auto 0.5rem;
}

.aichi-meister-logo figcaption {
  font-size: 0.9rem;
  color: var(--on-surface);
  line-height: 1.4;
}

/* 沿革（タイムライン） */
.timeline {
  position: relative;
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
}

.border-line {
  position: absolute;
  left: 12px;
  /* モバイルでの線の位置 */
  top: 0;
  width: 3px;
  height: 100%;
  /* 高さも100%に */
  background: rgba(91, 98, 166, 0.5);
}

.timeline li {
  position: relative;
  padding: 1rem 0 2rem 40px;
}

.timeline li::after {
  content: '';
  position: absolute;
  top: 0;
  left: 8.5px;
  /* 丸の位置を調整 */
  width: 10px;
  height: 10px;
  background: var(--on-surface);
  border-radius: 50%;
}

.timeline-year {
  position: absolute;
  left: 40px;
  /* 年号をリストアイテムのパディングに合わせて配置 */
  top: -10px;
  font-weight: bold;
  color: var(--primary);
  background: rgba(91, 98, 166, 0.1);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius);
  box-shadow: var(--elevation-1);
  transform: translateX(0);
  /* 重なりを防ぐため変換をリセット */
}

.timeline-content {
  background: var(--background);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--elevation-1);
  color: var(--on-surface);
  line-height: 1.6;
}

/* === アクセス（拠点＋地図） === */
.access-locations {
  display: flex;
  flex-direction: column;
  /* モバイルでは縦並び */
  gap: 1.5rem;
}

.access-card {
  background: var(--surface);
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--elevation-1);
}

.access-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.access-card address {
  font-style: normal;
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* 地図のレスポンシブ対応 */
.map-embed {
  position: relative;
  width: 100%;
  padding-top: 75%;
  /* 4:3のアスペクト比 (3 / 4 * 100) */
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--elevation-1);
}

.map-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* === 取引実績リスト === */
.client-list {
  columns: 1;
  /* モバイルでは1列に */
  column-gap: 2rem;
  list-style: disc inside;
  padding-left: 1rem;
}

.client-list li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: var(--on-surface);
}

.note {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.5rem;
  text-align: right;
}

/* 採用情報バナー */
div#banner {
  text-align: center;
}

div#banner img {
  max-width: 600px;
  height: auto;
}

/* === PC向けメディアクエリ（min-width） === */
@media (min-width: 769px) {
  main section {
    margin: 3rem auto;
    padding: 2rem;
    max-width: 1000px;
  }

  .certificates {
    flex-direction: row;
    gap: 2rem;
  }

  .access-locations {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.5rem;
  }

  .access-card {
    flex: 1 1 45%;
  }

  .timeline li {
    padding-left: 95px;
  }

  .timeline-year {
    transform: translateX(15px);
    left: 0;
  }

  .client-list {
    columns: 2;
  }
}