/* ==========================================
   company.css 安全版
   目的：
   - 明確な重複だけを整理
   - 後勝ちで確定している定義のみ統合
   - 画面崩れの可能性がある箇所は触らない

   一旦保留にした危険箇所：
   1) body.company-about のネスト記法ブロック全体
      - 素のCSSとしては不安定になりやすい
      - 既存環境で動いている前提なら、今は維持

   2) .about-info 系
      - 「about-info > div を行単位で組む案」と
        「about-info 自体を grid 化する案」が混在
      - HTML構造依存が強く、整理時に崩れやすい

   3) .ph-pills / .pill 系
      - 円形案・角丸重なり案・変数依存案が混在
      - どれを正式採用にするか未確定のため保留

   4) .creed / .creed li 系
      - カード型とカプセル型が混在
      - 現在見えているデザイン確認後に一本化推奨

   5) body.company-about .section-title / .ph-head など
      - 後段の定義が最終値だが、今回は安全優先で
        既存の上書き関係は大きく崩さず維持
   ========================================== */


/* ==========================================
   共通：他ページの会社カードをTOP準拠にリファイン
   対象スコープ：.page-company / body.company-about / #about
   ========================================== */

/* カード本体 */
:where(.page-company, body.company-about, #about) .company-card{
  display: flex;
  flex-direction: column;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(2,6,23,.06);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

:where(.page-company, body.company-about, #about) .company-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(2,6,23,.12);
  border-color: #dbe1ea;
}

/* サムネイル */
:where(.page-company, body.company-about, #about) .company-thumb{
  height: auto;
  aspect-ratio: 16 / 9;
  background: #f6f8fb;
  overflow: hidden;
}

:where(.page-company, body.company-about, #about) .company-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: none;
  transition: transform .25s ease;
}

:where(.page-company, body.company-about, #about) .company-card:hover .company-thumb img{
  transform: scale(1.03);
}

/* 本文 */
:where(.page-company, body.company-about, #about) .company-body{
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 18px 18px;
}

:where(.page-company, body.company-about, #about) .company-label{
  display: inline-block;
  font-size: 12px;
  letter-spacing: .08em;
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 3px 10px;
  line-height: 1;
  width: max-content;
}

:where(.page-company, body.company-about, #about) .company-card .company-title{
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
  margin: 2px 0 0;
}

:where(.page-company, body.company-about, #about) .company-desc{
  color: #475569;
  font-size: 14.5px;
  line-height: 1.75;
  margin-top: auto;
}

/* グリッド間隔 */
:where(.page-company, body.company-about, #about) .company-grid{
  gap: 18px;
}



/* =========================================================
   company.html 専用（body.company-about）
   既存維持のためネスト記法ブロックはそのまま残す
   ========================================================= */
body.company-about{

  /* 見出し帯 */
  .section-head{
    display:flex;
    align-items:center;
    gap:8px;
    background:#f3f6f9;
    border:1px solid #e5e7eb;
    border-radius:12px;
    padding:8px 12px;
    box-shadow:0 1px 2px rgba(2,6,23,.04);
    margin:10px 0;
  }

  .section-tag{
    background:#eef7fb;
    border:1px solid #d7dee6;
    border-radius:999px;
    padding:8px 5px;
    font-size:12px;
    font-weight:500;
    letter-spacing:.12em;
    color:#475569;
    line-height:1;
  }

  .section-title{
    margin:0;
    font-size:18px;
    font-weight:600;
    line-height:1.3;
    color:#0f172a;
  }

  /* 会社概要テーブル（旧案） */
  .about-info{
    width:100%;
    box-sizing:border-box;
    margin-bottom:40px;
  }

  .about-info > div{
    display:grid;
    grid-template-columns: 200px minmax(0,1fr);
  }

  .about-info dt{
    padding:6px 10px;
    background:#f7f9fc;
    border:1px solid #e5e7eb;
    border-right:none;
    font-weight:700;
    white-space:nowrap;
  }

  .about-info dd{
    padding:6px 24px;
    border:1px solid #e5e7eb;
    border-left:none;
    min-width:0;
    overflow-wrap:anywhere;
    line-height:1.6;
  }

  .about-info > div:first-child dt{ border-top-left-radius:8px; }
  .about-info > div:first-child dd{ border-top-right-radius:8px; }
  .about-info > div:last-child  dt{ border-bottom-left-radius:8px; }
  .about-info > div:last-child  dd{ border-bottom-right-radius:8px; }

  /* コンテンツカード */
  .company-grid{
    display:grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap:16px;
  }

  @media (max-width:1024px){
    .company-grid{ grid-template-columns: repeat(2,1fr); }
  }

  @media (max-width:560px){
    .company-grid{ grid-template-columns: 1fr; }
  }

  .company-card{
    display:flex;
    flex-direction:column;
    border:1px solid #e5e7eb;
    border-radius:14px;
    box-shadow:0 6px 20px rgba(2,6,23,.06);
    background:#fff;
    text-decoration:none;
    color:inherit;
    overflow:hidden;
    transition:transform .2s, box-shadow .2s;
  }

  .company-card:hover{
    transform:translateY(-2px);
    box-shadow:0 14px 32px rgba(2,6,23,.12);
  }

  .company-thumb{
    aspect-ratio:16/9;
    background:#f6f8fb;
  }

  .company-thumb img{
    width:100%;
    height:100%;
    object-fit:cover;
  }

  .company-body{
    padding:12px 14px 14px;
    display:flex;
    flex-direction:column;
    gap:6px;
  }

  .company-label{
    display:inline-block;
    font-size:12px;
    letter-spacing:.08em;
    background:#eff6ff;
    border:1px solid #cfe0ff;
    border-radius:999px;
    padding:3px 8px;
    color:#1e3a8a;
  }

  .company-title{
    font-size:17px;
    font-weight:600;
  }

  .company-desc{
    font-size:14.5px;
    color:#475569;
    line-height:1.7;
  }

  /* 経営理念 */
  .ph-two-col{
    display:grid;
    grid-template-columns: minmax(0,1.2fr) minmax(0,1fr);
    gap:24px;
  }

  @media (max-width:900px){
    .ph-two-col{
      grid-template-columns:1fr;
      gap:16px;
    }
  }

  .ph-head{
    margin:0 0 8px;
    font-weight:700;
  }

  .ph-pills{
    display:flex;
    gap:14px;
    justify-content:center;
    margin:8px 0 12px;
  }

  .pill{
    display:grid;
    place-items:center;
    width:120px;
    aspect-ratio:1/1;
    border-radius:50%;
    border:4px solid currentColor;
    font-weight:800;
    background:#fff;
  }

  .ph-message{
    border:1px solid #e5e7eb;
    border-radius:10px;
    padding:16px;
    background:#fff;
    line-height:1.8;
  }

  .creed{
    list-style:none;
    padding:0;
  }

  .creed li{
    display:flex;
    gap:.6em;
    align-items:center;
    padding:10px 12px;
    margin:8px 0;
    border:1px solid #e5e7eb;
    border-radius:10px;
    font-weight:700;
    background:#fff;
  }

  /* グループ会社 */
  .group-list{
    display:grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap:16px;
  }

  @media (max-width:960px){
    .group-list{ grid-template-columns: 1fr; }
  }

  .group-item{
    display:flex;
    flex-direction:column;
    align-items:center;
    text-decoration:none;
    color:inherit;
    border:1px solid #e5e7eb;
    border-radius:14px;
    padding:16px;
    box-shadow:0 6px 20px rgba(2,6,23,.06);
    background:#fff;
    transition:transform .2s, box-shadow .2s;
  }

  .group-item:hover{
    transform:translateY(-2px);
    box-shadow:0 14px 32px rgba(2,6,23,.12);
  }

  .group-img{
    width:150px;
    height:auto;
    object-fit:contain;
  }

  .group-name{
    font-size:18px;
    font-weight:700;
  }

  .group-text{
    font-size:15px;
    color:#374151;
    line-height:1.7;
    text-align:center;
  }
}

/* --- 会社タイトル帯 日本語サイズ調整 --- */
body.company-about .section-title {
  font-size: 24px;
  letter-spacing: 0.03em;
}

/* 1) タイトル帯：日本語を主役に少し大きく */
body.company-about .section-title{
  font-size:25px;
  font-weight:500;
  letter-spacing:.02em;
  color:#0f172a;
}

/* 2) 経営理念・社是 */
body.company-about .ph-two-col{
  display:grid;
  grid-template-columns:1.3fr 1fr;
  gap:32px;
  margin:28px 0 40px;
}

@media (max-width:900px){
  body.company-about .ph-two-col{
    grid-template-columns:1fr;
    gap:20px;
  }
}

body.company-about .ph-head{
  font-size:18px;
  font-weight:700;
  color:#0f172a;
  margin:0 0 12px;
}

body.company-about .philosophy-block,
body.company-about .creed-block{
  background:#f9fafb;
  border:1px solid #e2e8f0;
  border-radius:12px;
  padding:24px;
  box-shadow:0 3px 10px rgba(0,0,0,.04);
}

body.company-about .ph-pills{
}

body.company-about .pill{
  width:var(--pill-size);
  height:var(--pill-size);
  border-radius:var(--pill-radius);
  display:grid;
  place-items:center;
  border:3px solid currentColor;
  background:#fff;
  font-weight:700;
  font-size:18px;
  line-height:1;
}

body.company-about .pill.pill-contribution{ color:#2563eb; border-color:#60a5fa; }
body.company-about .pill.pill-growth      { color:#ca8a04; border-color:#facc15; }
body.company-about .pill.pill-harmony     { color:#16a34a; border-color:#4ade80; }

body.company-about .ph-message{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding:16px 18px;
  line-height:1.9;
  color:#334155;
  font-size:17px;
  font-weight:500;
}

body.company-about .creed{
  list-style:none;
  padding:0;
  margin:0;
}

body.company-about .creed li{
  display:flex;
  align-items:center;
  gap:.6em;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:10px;
  padding:12px 14px;
  margin:10px 0;
  font-weight:700;
  color:#1e293b;
  box-shadow:0 1px 2px rgba(0,0,0,.05);
}

body.company-about .creed li > b{
  min-width:2.4em;
  display:inline-block;
  color:#475569;
  font-weight:700;
}

body.company-about .pill{
  position: relative;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 5px solid transparent;
  background-clip: padding-box;
  opacity: 0.9;
}

body.company-about .ph-pills{
  display:flex;
  align-items:center;
  gap:0;
  margin:12px 0 20px;
}

body.company-about .ph-pill{
  flex:0 0 auto;
  width:120px;
  height:120px;
  border-radius:20px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-weight:700;
  font-size:18px;
  position:relative;
  z-index:1;
}

body.company-about .ph-pill + .ph-pill{
  margin-left:-20px;
}

body.company-about .ph-pill--contribution{
  background:rgba(37,99,235,.88);
  z-index:1;
}

body.company-about .ph-pill--growth{
  background:rgba(234,179,8,.88);
  z-index:2;
}

body.company-about .ph-pill--harmony{
  background:rgba(16,185,129,.88);
  z-index:3;
}

/* ========== 社是 / CREED：横長カプセル & 淡色トーン ========== */
body.company-about .creed{
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 8px 0 0;
}

body.company-about .creed li{
  display: flex;
  align-items: center;
  gap: .75em;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: #f6f8fb;
  color: #0f172a;
  font-weight: 700;
  line-height: 1.6;
  box-shadow:
    0 1px 0 rgba(255,255,255,.6) inset,
    0 6px 18px rgba(2,6,23,.06);
}

body.company-about .creed li::before{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 10px;
  box-shadow: 0 0 0 3px rgba(255,255,255,.9) inset;
}

body.company-about .creed li:nth-child(1){
  background: rgba(59,130,246,.10);
  border-color: rgba(59,130,246,.28);
}

body.company-about .creed li:nth-child(1)::before{
  background:#3b82f6;
}

body.company-about .creed li:nth-child(2){
  background: rgba(245,158,11,.10);
  border-color: rgba(245,158,11,.30);
}

body.company-about .creed li:nth-child(2)::before{
  background:#f59e0b;
}

body.company-about .creed li:nth-child(3){
  background: rgba(16,185,129,.12);
  border-color: rgba(16,185,129,.28);
}

body.company-about .creed li:nth-child(3)::before{
  background:#10b981;
}

@media (hover:hover){
  body.company-about .creed li:hover{
  }
}

body.company-about .creed li{
  margin:10px 10%;
  padding-left: 28px;
}



/* ===============================
   COMPANY PAGE
   company.html 専用
   =============================== */

/* ---- ページ全体 ---- */
.page-company .section {
  margin-bottom: 26px;
}

.page-company .panel {
  padding: 22px 26px 26px;
}

/* ---- ヒーロー ---- */
.page-company .hero-company {
  position: relative;
  min-height: clamp(240px, 34vh, 420px);
  border-radius: 18px;
  overflow: hidden;
}

.page-company .hero-company img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-company .hero-company .hero-title {
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.2;
}

/* ---- 会社概要テーブル ---- */
.page-company .company-table {
  display: table;
  width: 100%;
  border-collapse: collapse;
}

.page-company .company-table tr {
  display: table-row;
}

.page-company .company-table th,
.page-company .company-table td {
  display: table-cell;
}

.page-company .company-table th {
  width: 160px;
  text-align: left;
  font-weight: 600;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}

.page-company .company-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  line-height: 1.6;
}

/* ---- ISO認証など ---- */
.page-company .cert-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 18px;
}

.page-company .cert-item {
  text-align: center;
}

.page-company .cert-item img {
  max-width: 100%;
  height: auto;
}

/* ---- SDGs ---- */
.page-company .sdgs {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 12px;
}

.page-company .sdgs img {
  width: 100%;
}

/* ---- アクセス ---- */
.page-company .access {
  margin-top: 10px;
}

.page-company iframe {
  width: 100%;
  height: 380px;
  border: 0;
  border-radius: 12px;
}

/* ---- レスポンシブ ---- */
@media (max-width: 768px) {

  .page-company .panel {
    padding: 18px 16px 20px;
  }

  .page-company .company-table th {
    width: 120px;
    padding: 10px 12px;
    font-size: 13px;
  }

  .page-company .company-table td {
    padding: 10px 12px;
    font-size: 13px;
  }

  .page-company .cert-grid {
    grid-template-columns: repeat(2,1fr);
    gap: 14px;
  }

  .page-company .sdgs {
    grid-template-columns: repeat(3,1fr);
  }

  .page-company iframe {
    height: 300px;
  }
}



/* =============================
   pamphlet
   ============================= */
.company-pamphlet{
  margin: 24px 0 40px;
}

.pamphlet-banner{
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 760px;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid #d9e0e8;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,.06);
}

.pamphlet-banner__thumb{
  flex: 0 0 120px;
  display: block;
}

.pamphlet-banner__thumb img{
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.10);
}

.pamphlet-banner__body{
  flex: 1;
}

.pamphlet-banner__lead{
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  color: #1f2b3a;
}

.pamphlet-banner__text{
  margin: 0 0 14px;
  line-height: 1.8;
  color: #555;
  font-size: 14px;
}

.btn-pamphlet{
  display: inline-block;
  padding: 10px 18px;
  background: #1f6fb2;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
}

.btn-pamphlet:hover{
  background: #15548a;
}

@media (max-width: 768px){
  .pamphlet-banner{
    display: block;
    padding: 18px;
  }

  .pamphlet-banner__thumb{
    width: 110px;
    margin: 0 auto 14px;
  }

  .pamphlet-banner__body{
    text-align: center;
  }

  .pamphlet-banner__lead{
    font-size: 18px;
  }
}



/* =============================
   ISO補助
   ============================= */
.iso-block{
  text-align:center;
}

.iso-no{
  font-size:14px;
  font-weight:600;
  margin-top:2px;
  color:#444;
}



/* =========================
   company.html 会社概要 修正版
   ※ about-info は危険箇所のため現状維持
   ========================= */
body.company-about .about-info{
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  width: 100%;
  margin: 0 0 40px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

body.company-about .about-info dt,
body.company-about .about-info dd{
  margin: 0;
  padding: 7px 16px;
  border-bottom: 1px solid #e5e7eb;
}

body.company-about .about-info dt{
  font-weight: 700;
  background: #f7f9fc;
  border-right: 1px solid #e5e7eb;
  white-space: nowrap;
}

body.company-about .about-info dd{
  line-height: 1.7;
  overflow-wrap: anywhere;
  min-width: 0;
}

body.company-about .about-info dt:last-of-type,
body.company-about .about-info dd:last-of-type{
  border-bottom: none;
}

@media (max-width: 768px){
  body.company-about .about-info{
    grid-template-columns: 1fr;
  }

  body.company-about .about-info dt,
  body.company-about .about-info dd{
    padding: 10px 12px;
    font-size: 13px;
  }
}
