@charset "UTF-8";
/* =============================================================
   会社概要ページ専用スタイル（page-company.php）
   デザイン: untracked/company.png
   ※ 色トークン（--color-*）は main.css の :root を流用。
   ※ 「下層hero（共通）」「パンくず（共通）」は他下層ページでも使い回す前提。
   ============================================================= */

/* 下層hero（.page-hero）／パンくずは共通のため main.css に定義 */
/* ---- 共通見出し（英字＋日本語 / バー付き） ---------------- */
.company-head {
  margin-bottom: 36px;
}
.company-head--center {
  text-align: center;
}
.company-head--center .section__en,
.company-head--center .section__title {
  text-align: center;
}
/* 「沿　革」など中央見出しの日本語はやや字間を広げる */
.company-head--center .section__title {
  letter-spacing: 0.25em;
}
/* 経営方針：英字なし・先頭にラインを引く日本語見出し */
.company-head__title--bar {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #0050a3;
  font-family:
    "heisei-kaku-gothic-std", "Heisei Kaku Gothic Std", var(--font-base);
  font-size: 33.69px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  letter-spacing: 4.717px;
  margin-bottom: 40px;
}
.company-head__title--bar::before {
  content: "";
  width: clamp(28px, 3vw, 48px);
  height: 2px;
  background: var(--color-heading-en);
  flex: none;
}

/* ---- 経営理念 --------------------------------------------- */
.company-philosophy {
  position: relative;
  padding: 64px 0 72px;
  background: #eaf4ff url("../images/company/bg-philosophy.png") top / cover
    no-repeat;
}
.philosophy__card {
  max-width: 1320px;
  margin-inline: auto;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(20, 70, 130, 0.12);
  padding: 48px clamp(24px, 5vw, 72px) 52px;
  text-align: center;
}
.philosophy__heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--color-heading-en);
  font-family:
    "heisei-kaku-gothic-std", "Heisei Kaku Gothic Std", var(--font-base);
  font-size: 33.69px;
  font-style: normal;
  font-weight: 500;
  line-height: 33px; /* 97.952% */
  letter-spacing: 4.717px;
  margin-bottom: 28px;
}
.philosophy__heading .deco-line {
  width: 34px;
  height: 1.5px;
  background: var(--color-heading-en);
}
.philosophy__message {
  position: relative;
  margin: 0;
  /* 左右の引用符SVG（左上/右下）と本文が重ならないよう余白を確保 */
  padding-inline: clamp(8px, 3vw, 40px);
  color: #352723;
  text-align: center;
  font-family:
    "heisei-kaku-gothic-std", "Heisei Kaku Gothic Std", var(--font-base);
  font-size: 40px;
  font-style: normal;
  font-weight: 500;
  line-height: 85px; /* 212.5% */
}
/* 引用符（SVG）：開き＝左上、閉じ＝右下 */
.philosophy__message::before,
.philosophy__message::after {
  content: "";
  position: absolute;
  width: clamp(42px, 4vw, 75px);
  aspect-ratio: 75 / 47;
  background: center / contain no-repeat;
}
.philosophy__message::before {
  top: -0.15em;
  left: 0;
  background-image: url("../images/company/double_quotation_top.svg");
}
.philosophy__message::after {
  bottom: -0.15em;
  right: 0;
  background-image: url("../images/company/double_quotation_down.svg");
}

/* ---- 経営方針 --------------------------------------------- */
/* このセクションだけ内側の横幅上限を 1500px に（共通の .container=1400px を上書き） */
.company-policy .container {
  max-width: 1450px;
}
.policy-list {
  margin: 0;
}
.policy-item {
  display: grid;
  grid-template-columns: 96px clamp(260px, 26vw, 480px) 1fr;
  grid-template-areas: "badge title text";
  column-gap: 10px;
  align-items: center;
  padding: 30px 0;
  border-bottom: 1px solid var(--color-line);
}
.policy-item:first-child {
  padding-top: 0;
}
.policy-item:last-child {
  border-bottom: 0;
}
.policy-item__badge {
  grid-area: badge;
  display: flex;
  width: 90px;
  height: 90px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  border: 1px solid var(--color-primary);
  border-radius: 50%;
  color: var(--color-primary);
  line-height: 1.1;
  align-self: center;
}
.policy-item__badge small {
  color: #0050a3;
  text-align: center;
  font-family: "Montserrat", var(--font-en);
  font-size: 13px;
  font-style: normal;
  font-weight: 500;
  line-height: 1;
}
.policy-item__badge b {
  color: #0050a3;
  text-align: center;
  font-family: "Inter", var(--font-en);
  font-size: 34px;
  font-style: italic;
  font-weight: 400;
  line-height: 1;
  padding-right: 4px;
}
.policy-item__title {
  grid-area: title;
  color: #0050a3;
  font-family:
    "heisei-kaku-gothic-std", "Heisei Kaku Gothic Std", var(--font-base);
  font-size: 26px;
  font-style: normal;
  font-weight: 500;
  line-height: 1.2;
  align-self: center;
}
.policy-item__text {
  grid-area: text;
  color: #212121;
  font-family: "Zen Kaku Gothic New", var(--font-base);
  font-size: 21px;
  font-style: normal;
  font-weight: 500;
  line-height: 35px; /* 166.667% */
}

/* ---- ごあいさつ ------------------------------------------- */
.company-greeting {
  background: #f1f7fe url("../images/company/bg-greeting.png") center bottom /
    cover no-repeat;
}
/* このセクションだけ内側の横幅上限を 1300px に（共通の .container=1400px を上書き）。
   見出し（左）＋本文（右）の横並びレイアウト */
.company-greeting .container {
  max-width: 1300px;
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: 48px;
  align-items: start;
}
.greeting__body {
  max-width: none;
}
.greeting__body p {
  color: #352723;
  font-family: "Inter", var(--font-base);
  font-size: 18px;
  font-style: normal;
  font-weight: 500;
  line-height: 34px; /* 188.889% */
  margin-bottom: 1.4em;
}
.greeting__sign {
  text-align: right;
  font-size: clamp(20px, 1.9vw, 26px);
  font-weight: 700;
  color: var(--color-heading);
  letter-spacing: 0.1em;
  margin-top: 0.6em;
}
/* 署名（SVG画像：代表取締役社長 齋藤 透） */
.greeting__sign-img {
  display: inline-block;
  width: clamp(220px, 24vw, 338px);
  height: auto;
}

/* ---- 会社概要（テーブル2枚） ------------------------------ */
.outline__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.outline__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}
.outline__table th,
.outline__table td {
  border: 0;
  border-top: 1px solid rgba(160, 189, 215, 0.8);
  border-bottom: 1px solid rgba(160, 189, 215, 0.8);
  text-align: left;
  vertical-align: middle;
  padding: 18px 20px;
  line-height: 1.7;
}
.outline__table th {
  width: 150px;
  padding: 15px;
  background: #dfecff;
  color: #000;
  font-family: "Noto Sans JP";
  font-size: 19px;
  font-style: normal;
  font-weight: 500;
  line-height: 31px; /* 163.158% */
  white-space: nowrap;
}
.outline__table td {
  background: #f4f8ff;
  color: #000;
  font-family: "Noto Sans JP";
  font-size: 18px;
  font-style: normal;
  font-weight: 350;
  line-height: 31px; /* 172.222% */
}
.outline__role {
  display: block;
}
.outline__role-title {
  display: inline-block;
  min-width: 9em;
  color: #000;
  font-family: "Noto Sans JP";
  font-size: 18px;
  font-style: normal;
  font-weight: 350;
  line-height: 31px; /* 172.222% */
}

/* ---- 沿革（タイムライン） --------------------------------- */
.history {
  position: relative;
  margin: 8px 0 0;
  padding: 0;
}
/* 左の縦ライン */
.history::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 25px;
  /* 終端を最後のマーカー内に収め、最終項目より下へはみ出さない */
  bottom: 26px;
  width: 3px;
  background: #0684f5;
}
.history__row {
  position: relative;
  display: grid;
  grid-template-columns: 110px 60px 1fr;
  align-items: center;
  column-gap: 22px;
  padding: 8px 0 42px 44px;
}
/* 最後の行は上下パディングを無くし、縦線(.history::before)が最終項目より下へ伸びないようにする */
.history__row:last-child {
  padding-top: 0;
  padding-bottom: 0;
  background: #fff;
}
/* 年マーカー（●） */
.history__row::before {
  content: "";
  position: absolute;
  left: 0px;
  top: 12px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  outline: 5px solid #fff;
  background: #1f7ad1;
}
/* 同一年の追加項目（○・年表記なし）：
   本線から右へ横線で分岐し、インデントした白丸で表す */
.history__row--sub::before {
  left: 138px;
  top: 19px;
  width: 18.946px;
  height: 18.946px;
  background: #fff;
  border: 2px solid #1f7ad1;
}
/* 本線→白丸をつなぐ横の接続線 */
.history__row--sub::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 27px;
  width: 126px;
  height: 3px;
  background: #0684f5;
  /* 真下に太さ5pxの白い線を重ねる（spread 1px で 3px→5px、offset 4px で密着） */
  box-shadow: 0 4px 0 1px #fff;
}
.history__year {
  color: #424242;
  font-family: "Inter", var(--font-en);
  font-size: 32px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  white-space: nowrap;
}
.history__year small {
  color: #424242;
  font-family: "Noto Sans JP";
  font-size: 23px;
  font-style: normal;
  font-weight: 400;
  line-height: 34px; /* 147.826% */
  margin-left: 2px;
}
.history__month {
  display: flex;
  width: 80px;
  padding: 3px 12px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  border-radius: 2px;
  background: #bad3e8;
  color: #193e89;
  font-family: "Inter", var(--font-en);
  font-size: 23px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  margin-top: 2px;
}
.history__desc {
  color: #000;
  font-family: "Noto Sans JP";
  font-size: 19px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  padding-top: 2px;
  /* 月ラベルとの間隔を 42px に（column-gap 22px ＋ 20px） */
  margin-left: 20px;
}
/* 沿革内のリンク（PDF等） */
.history__link {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.history__link:hover {
  opacity: 0.8;
}

/* ---- 沿革の開閉（JS有効時のみ動作。無効時は全件表示） -------- */
.history-wrap {
  position: relative;
}
/* JS が is-ready を付与したら畳む（既定の閉じた状態）。
   2005まで明瞭・2006あたりからフェードして切れるよう高さを調整 */
.company-history.is-ready .history-wrap {
  max-height: 500px;
  overflow: hidden;
  transition: max-height 0.5s ease;
}
/* 下部の白フェード（閉じている時のみ表示） */
.company-history.is-ready .history-wrap::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 200px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 88%);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s ease;
}
.company-history.is-ready .history-wrap.is-open::after {
  opacity: 0;
}

.history-toggle-wrap {
  display: none; /* JS有効時のみ表示 */
  text-align: center;
  margin-top: 30px;
}
.company-history.is-ready .history-toggle-wrap {
  display: block;
}
.history-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 36px;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(86deg, #0684f5 5.84%, #0159a9 87.32%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: filter 0.2s;
}
.history-toggle:hover {
  filter: brightness(1.06);
}
/* ＋／− アイコン（open で縦棒を消して − にする） */
.history-toggle__icon {
  position: relative;
  width: 16px;
  height: 16px;
  flex: none;
}
.history-toggle__icon::before,
.history-toggle__icon::after {
  content: "";
  position: absolute;
  background: #fff;
  border-radius: 1px;
}
.history-toggle__icon::before {
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
}
.history-toggle__icon::after {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  transition: opacity 0.25s ease;
}
.history-toggle.is-open .history-toggle__icon::after {
  opacity: 0;
}

/* =============================================================
   レスポンシブ
   ============================================================= */
/* 〜1230px：経営方針を縦並びに（POLICY番号＋タイトルは常に横並びを維持）。
   バッジ＋タイトルを上段、説明文を下段全幅に */
@media (max-width: 1230px) {
  .policy-item {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "badge title"
      "text  text";
    column-gap: 18px;
    row-gap: 12px;
    align-items: center;
  }
}

@media (max-width: 900px) {
  /* ごあいさつ：横並び→縦積み */
  .company-greeting .container {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .outline__grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  /* 2枚のテーブルが縦に隣接して継ぎ目が二重線になるため、
     2枚目以降の先頭行の上ボーダーを消して1本にする */
  .outline__table + .outline__table tr:first-child th,
  .outline__table + .outline__table tr:first-child td {
    border-top: 0;
  }
  .policy-item__badge {
    width: 60px;
    height: 60px;
  }
  .policy-item__badge b {
    font-size: 20px;
  }
  .greeting__sign {
    text-align: left;
  }
  /* 大見出しをタブレット向けに縮小 */
  .company-head__title--bar {
    font-size: 26px;
    letter-spacing: 3px;
  }
  .philosophy__heading {
    font-size: 26px;
    letter-spacing: 3px;
  }
  .philosophy__message {
    font-size: 30px;
    line-height: 1.9;
  }
  .philosophy__message::before {
    top: -0.6em;
  }
  .philosophy__message::after {
    bottom: -0.6em;
  }
}

@media (max-width: 600px) {
  .philosophy__card {
    padding: 36px 22px 40px;
  }
  .company-head__title--bar {
    font-size: 27px;
    letter-spacing: 2px;
    margin-bottom: 28px;
  }
  .philosophy__heading {
    font-size: 27px;
    letter-spacing: 2px;
    gap: 10px;
  }
  .philosophy__message {
    font-size: 19px;
    line-height: 1.9;
  }
  .philosophy__message::before {
    top: -1.15em;
  }
  .philosophy__message::after {
    bottom: -1.15em;
  }
  .policy-item__title {
    font-size: 22px;
    line-height: 1.4;
  }
  .policy-item__badge small {
    font-size: 10px;
  }
  .policy-item__text {
    font-size: 17px;
    line-height: 29px;
  }
  /* 署名：スマホは少し大きめ＋右揃え（@900の左寄せを上書き） */
  .greeting__sign {
    text-align: right;
  }
  .greeting__sign-img {
    width: clamp(260px, 78vw, 320px);
  }
  /* 沿革：年・月・本文を縦積み */
  .history__row {
    grid-template-columns: 84px 1fr;
    grid-template-areas:
      "year month"
      "desc desc";
    column-gap: 7px;
    row-gap: 3px;
    padding: 8px 0 22px 31px;
  }
  .history__year {
    grid-area: year;
    font-size: 26px;
    align-self: center;
  }
  .history__year small {
    font-size: 18px;
  }
  .history__month {
    grid-area: month;
    justify-self: start;
    min-width: 8px;
    padding: 0px 10px;
    font-size: 17px;
    width: auto;
    margin-top: 0;
  }
  .history__desc {
    grid-area: desc;
    font-size: 16px;
    margin-left: 0;
  }
  /* 狭幅では分岐のインデントを詰める */
  /* 最終行のマーカー位置（スマホのみ） */
  .history__row:last-child::before {
    bottom: 50%;
    top: 3px;
  }
  .history__row--sub::before {
    left: 95px;
    top: 12px;
  }
  .history__row--sub::after {
    width: 84px;
    top: 20px;
  }
  .outline__table th {
    width: 90px;
    padding: 14px;
  }
  .outline__table td {
    padding: 14px;
  }
  /* 役員名（9em固定）は極狭幅で溢れるため最小幅を解除 */
  .outline__role-title {
    min-width: 0;
    margin-right: 0.5em;
  }
}
