/* ================================
   会社概要（Profile）
================================ */
.company-content{
  padding-bottom: 80px;
}
@media (max-width: 768px){
  .company-content{
  padding-bottom: 60px;
}
}

/* 会社概要 */
.page-company .company-content {
  font-size: 1rem;
  line-height: 1.8;
}

.page-company h2 {
  font-size: 1.5rem;
  margin: 2em 0 1em;
  border-left: 4px solid var(--main);
  padding-left: 12px;
}

.page-company table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2em;
}

.page-company table th,
.page-company table td {
  border: 1px solid var(--line1);
  padding: 12px;
  text-align: left;
}

.page-company table th {
  background: var(--bg1);
  width: 25%;
}
.page-company table td ul{
  padding: 0;
  margin: 0;
}
.page-company table td ul li{
  list-style: none;
}

/* 沿革 */
.company-history {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 1rem;
}

.company-history th,
.company-history td {
  border: 1px solid var(--line1);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.company-history th {
  background: var(--bg1);
  width: 25%;
  font-weight: 600;
  white-space: nowrap;
}

.company-history td:first-of-type {
  width: 10%;
  background: var(--bg1);
  font-weight: 500;
}

.company-history td:last-of-type {
  width: 65%;
}

/* スマホ対応 */
@media (max-width: 768px) {
  .company-history {
    border: none;
  }

  .company-history tr {
    display: block;
    margin-bottom: 1.5em; /* 行間を広げて見やすく */
  }

  .company-history td,
  .company-history th {
    display: block;
    width: 100%;
    border: none;
    padding: 0;
  }

  /* 年 */
  .company-history td:first-of-type {
    background: transparent;
    font-weight: normal; /* 本文と同じトーン */
    margin-bottom: 0.4em;
  }

  /* 内容 */
  .company-history td:last-of-type {
    border-bottom: 1px solid var(--line1);
    padding-bottom: 1em;
    line-height: 1.6;
  }

  /* 最後の行は線を消す */
  .company-history tr:last-child td:last-of-type {
    border-bottom: none;
  }
}

  /* 動画 */
.company-video {
  position: relative;
  width: 100%;
  max-width: 900px;   /* PC時の最大幅 */
  margin: 40px auto;
  aspect-ratio: 16/9; /* アスペクト比を固定 */
}

.company-video video {
  width: 100%;
  height: 100%;
  border-radius: 8px; /* デザイン次第で角丸に */
  object-fit: cover;
}


/* 事業所 */
.company-offices-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 1rem;
}

.company-offices-table th,
.company-offices-table td {
  border: 1px solid var(--line1);
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
}

.company-offices-table th {
  background: var(--bg1);
  width: 20%;
  font-weight: 600;
  white-space: nowrap;
}

.company-offices-table td a {
  color: var(--main);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .company-offices-table th,
  .company-offices-table td {
    display: block;
    width: 100%;
  }
  .company-offices-table th {
    background: transparent;
    border: none;
    padding: 8px 0 4px;
  }
  .company-offices-table td {
    border: none;
    padding: 0 0 16px;
    border-bottom: 1px solid var(--line1);
  }
}

/* グループ会社 */
.company-group-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 1rem;
}

.company-group-table th,
.company-group-table td {
  border: 1px solid var(--line1);
  padding: 12px 16px;
  text-align: left;
  vertical-align: middle;
}

.company-group-table th {
  background: var(--bg1);
  width: 30%;
  font-weight: 600;
}

.company-group-table td a {
  color: var(--main);
  text-decoration: underline;
  word-break: break-all; /* URL折り返し対応 */
}

@media (max-width: 768px) {
  .company-group-table th,
  .company-group-table td {
    display: block;
    width: 100%;
  }
  .company-group-table th {
    background: transparent;
    border: none;
    padding: 8px 0 4px;
  }
  .company-group-table td {
    border: none;
    padding: 0 0 16px;
    border-bottom: 1px solid var(--line1);
  }
}

/* ================================
   代表挨拶（Message）
================================ */
.message-inner {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-bottom: 80px; /* 会長と社長の間に余白 */
}
.message-photo {
  flex: 1;
  max-width: 400px;
}
.message-photo img {
  display: block;
  border-radius: 8px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 100%;
}
.profile h3, .profile h4 {
  font-size: 0.9rem;
  margin-top: 1.2em;
  color: var(--main);
}
.profile p {
  font-size: 0.85rem;
}
.message-content {
  flex: 2;
}
.message-content .lead {
  font-size: 1.2rem;
  line-height: 1.8;
  color: #fff;
  padding: 8px 16px;
  background:linear-gradient(270deg,rgba(40, 45, 101, 1) 0%, rgba(43, 57, 147, 1) 50%, rgba(36, 30, 44, 1) 100%);
  margin-top: 0;
  margin-bottom: 1.5em;
}
.message-content .sign {
  margin-top: 2em;
  text-align: right;
  font-weight: bold;
  font-size: 1rem;
}
.message-content .sign span {
  font-size: 1.1rem;
}
@media (max-width: 768px) {
  .message-inner {
    flex-direction: column;
  }
  .message-photo {
    max-width: 100%;
  }
}

/* ================================
   ページ下部ボタンの中央配置
================================ */
.company-page-links {
  text-align: center;
  margin: 3em 0;
}
.company-page-links .btn {
  min-width: 200px;
}


@media (max-width: 768px) {
  /* 全体のテーブルをリセット */
  .page-company table,
  .page-company table tbody,
  .page-company table tr,
  .page-company table th,
  .page-company table td{
    border: none;
    display: block;
    width: 100%;
    box-sizing: border-box;
  }
  .company-history td:first-of-type,
  .company-history td:last-of-type {
    width: 100%;
    border: none;
  }
   .company-history td:first-of-type{
    padding-bottom: 0;
   }
    .company-history td:last-of-type{
      padding-top: 0;
    }

  /* 見出しセル（左側のth） */
  .company-overview-table th,
  .company-history th,
  .company-offices-table th,
  .company-group-table th {
    background: transparent;
    border: none;
    padding: 8px 0 4px;
    font-weight: bold;
    color: var(--main); /* 見出し強調 */
  }

  /* 内容セル（td） */
  .company-history td,
  .company-offices-table td,
  .company-group-table td {
    border: none;
    padding: 0 0 12px;
  }

  /* 最後の行はボーダー消す */
  .company-history tr:last-child td,
  .company-offices-table tr:last-child td,
  .company-group-table tr:last-child td {
    border-bottom: none;
  }
}
