/* ==========================================================================
   ワーレックス株式会社 会社概要ページ固有スタイル
   LOWER_SPEC_company.md 準拠。style.css → lower.css → company.css の順に読み込む。
   このファイルは company/index.html でのみ読み込まれるため、
   他ページに影響しない前提で新規セレクタのみを定義する。
   ========================================================================== */

/* ==========================================================================
   代表挨拶（写真左・本文右の2カラム。写真352×324.7→397×367相当のワイヤー比率）
   ========================================================================== */
.president {
  margin-top: 48px;
  display: grid;
  grid-template-columns: minmax(0, 397px) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.president__photo {
  width: 100%;
  max-width: 397px;
  aspect-ratio: 352 / 324.7;
}
.president__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.president__text {
  min-width: 0;
  max-width: 660px;
}
.president__catch {
  font-size: var(--fs-24);
  font-weight: var(--fw-bold);
}
.president__lead {
  margin-top: 8px;
  font-size: var(--fs-20);
}
.president__body {
  margin-top: 16px;
  font-size: var(--fs-16);
  line-height: var(--lh-body-18);
}
.president__sign {
  margin-top: 24px;
  text-align: right;
  font-weight: var(--fw-bold);
  font-size: var(--fs-16);
  line-height: 1.6;
}
.president__sign-name {
  display: inline-block;
  margin-top: 4px;
  font-size: var(--fs-18);
}

/* ==========================================================================
   企業理念（背景グラデーション。ミッション／経営理念／価値観と行動規範の3ブロック）
   ========================================================================== */
.company-philosophy {
  background: var(--grad-diagonal);
}
.philosophy__block {
  max-width: 960px;
  margin: 48px auto 0;
}
.philosophy__block + .philosophy__block {
  margin-top: 40px;
}
.company-band {
  background-color: var(--color-bg-grad-end);
  font-weight: var(--fw-bold);
  text-align: center;
  padding: 8px;
  font-size: var(--fs-18);
}
.philosophy__content {
  margin-top: 16px;
  font-size: var(--fs-16);
  line-height: var(--lh-body-18);
}
.philosophy__catch {
  font-size: var(--fs-18);
  font-weight: var(--fw-bold);
}
.philosophy__quote {
  margin-top: 12px;
}
.philosophy__list {
  list-style: none;
}
.philosophy__list li + li {
  margin-top: 8px;
}
.philosophy__value-group + .philosophy__value-group {
  margin-top: 20px;
}
.philosophy__value-group h4 {
  font-size: var(--fs-16);
  font-weight: var(--fw-bold);
}
.philosophy__values-list {
  margin-top: 8px;
  list-style: none;
}
.philosophy__values-list li + li {
  margin-top: 4px;
}

/* ==========================================================================
   コーポレートロゴについて（見出し＋TOPロゴ画像＋説明文）
   ========================================================================== */
.corporate-logo__body {
  margin-top: 48px;
  display: flex;
  justify-content: center;
}
.corporate-logo__image {
  width: 360px;
  height: auto;
}

/* --- ロゴ説明文（初回チェック No.1）--- */
.logo-desc {
  max-width: 560px;
  margin: 24px auto 0;
  padding: 20px 28px;
  border: 1px solid var(--color-border-card);
  font-size: var(--fs-16);
  line-height: var(--lh-body-18);
}
.logo-desc__list {
  list-style: none;
}
.logo-desc__list li + li {
  margin-top: 4px;
}
.logo-desc__star,
.logo-desc__arrow {
  color: var(--color-primary);
}
.logo-desc__arrow {
  margin: 0 0.4em;
}
.logo-desc__note {
  margin-top: 12px;
}

/* ==========================================================================
   会社概要／沿革タブ（サイトマップ備考「会社概要と沿革のみタブで切り替え」）
   contact.css の .contact-tabs と同じ考え方。
   ========================================================================== */
.company-tabs {
  margin-top: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.company-tabs__btn {
  border-radius: 0;
}
.company-tabs__btn.is-active {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}
.company-panel[hidden] {
  display: none;
}
.company-panel .spec-table {
  margin-top: 40px;
}
.company-panel .lower-subheading {
  margin-top: 60px;
}
.company-panel .spec-table--grid {
  margin-top: 32px;
}

/* --- 沿革テーブル（初回チェック No.2。現行サイトと同じ3ブロック構成。
     rowspan/colspanを維持するため .spec-table 系ではなく専用クラスを使用し、
     SPは overflow-x:auto の横スクロールで表示する。lower.css は変更しない） --- */
.company-panel .history-table-wrap {
  margin-top: 32px;
}
.history-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.history-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  border-top: 1px solid var(--color-border-card);
}
.history-table th,
.history-table td {
  border: 1px solid var(--color-border-card);
  padding: 12px 16px;
  font-size: var(--fs-16);
  line-height: var(--lh-body-18);
  vertical-align: top;
  text-align: left;
}
.history-table thead th {
  background-color: var(--color-bg-grad-end);
  font-weight: var(--fw-bold);
  text-align: center;
  white-space: nowrap;
}
.history-table tbody td:first-child {
  width: 110px;
  background-color: var(--color-bg-grad-end);
  font-weight: var(--fw-bold);
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}
.history-table td p + p {
  margin-top: 12px;
}
.history-table__year {
  font-weight: var(--fw-bold);
}

/* ==========================================================================
   Responsive: タブレット帯（769〜1100px）※推定
   ========================================================================== */
@media (min-width: 769px) and (max-width: 1100px) {
  .president {
    grid-template-columns: 1fr;
  }
  .president__photo {
    max-width: 397px;
    margin: 0 auto;
  }
  .president__text {
    max-width: none;
    margin-top: 24px;
  }
}

/* ==========================================================================
   Responsive: SP（768px以下）
   ========================================================================== */
@media (max-width: 768px) {
  .president {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 24px;
  }
  .president__photo {
    max-width: none;
  }
  .president__text {
    max-width: none;
  }
  .president__catch {
    font-size: var(--fs-20);
  }
  .president__body {
    font-size: var(--fs-16);
    line-height: var(--lh-sp-body);
  }

  .philosophy__block {
    margin-top: 32px;
    padding: 0 16px;
  }
  .philosophy__block + .philosophy__block {
    margin-top: 32px;
  }

  .corporate-logo__body {
    margin-top: 32px;
  }
  .corporate-logo__image {
    width: 260px;
  }

  .logo-desc {
    padding: 16px;
  }

  .company-tabs {
    margin-top: 32px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 0 16px;
  }
  .company-tabs__btn {
    width: 100%;
    min-width: 0;
  }
  .company-panel .spec-table {
    margin-top: 32px;
  }
  .company-panel .lower-subheading {
    margin-top: 40px;
  }
  .company-panel .spec-table--grid {
    margin-top: 24px;
  }

  .company-panel .history-table-wrap {
    margin-top: 24px;
  }
  .history-table th,
  .history-table td {
    padding: 8px 12px;
  }
  .history-table tbody td:first-child {
    width: 90px;
  }
}
