/* =========================================================
   企業詳細（sub.css の後に読む）
   ========================================================= */
/* 見出しが英字ではなく社名なので、ヒーローは他ページより低く、日本語書体で組む */
.page-hero--company{min-height:0;padding:26px 0 56px;}
.company-head{display:flex;align-items:center;gap:26px;margin-top:34px;}
.company-head__logo{flex:none;display:grid;place-items:center;width:190px;min-height:96px;padding:14px;
                    border-radius:12px;background:#fff;border:1px solid var(--line);
                    font-size:13px;font-weight:700;line-height:1.6;color:var(--blue-700);
                    text-align:center;}
.company-head__logo img{max-width:100%;max-height:64px;object-fit:contain;mix-blend-mode:multiply;}
.page-hero--company h1{font-family:var(--font-jp);font-size:clamp(23px,3.2vw,34px);font-weight:700;
                       line-height:1.45;letter-spacing:0;color:var(--ink);white-space:normal;
                       transform:none;}
.company-head__meta{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:14px;}
.company-head__meta span{padding:5px 13px;border-radius:var(--r-pill);background:#fff;
                         border:1px solid var(--line);font-size:12px;font-weight:700;color:var(--blue-600);}
.company-head__meta a{padding:5px 13px;border-radius:var(--r-pill);
                      background:var(--blue-600);font-size:12px;font-weight:700;color:#fff;}
.company-head__meta a:hover{background:var(--blue-700);}

/* カバー写真。ヒーローの締めとして、次のセクションの手前まで敷く */
.company-cover{margin-top:34px;border-radius:var(--r-card);overflow:hidden;line-height:0;}
.company-cover img{width:100%;max-height:340px;object-fit:cover;}

/* ---------- 会社案内 ---------- */
/* DB の改行をそのまま活かす。読ませる本文なので幅を絞る */
.company-profile{max-width:72ch;font-size:14px;line-height:2.05;color:var(--text);white-space:pre-wrap;}

/* ---------- 写真 ---------- */
.company-gallery{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-top:34px;}
.company-gallery a{display:block;border-radius:12px;overflow:hidden;line-height:0;
                   border:1px solid var(--line);transition:.28s;}
.company-gallery a:hover{transform:translateY(-3px);box-shadow:var(--shadow-lift);}
.company-gallery img{width:100%;height:170px;object-fit:cover;}

/* ---------- 基本情報 / 業務内容 ---------- */
.company-tables{display:grid;gap:56px;}
.company-table{width:100%;border-collapse:collapse;font-size:13.5px;line-height:1.9;}
.company-table th{width:190px;padding:15px 18px;text-align:left;vertical-align:top;
                  font-weight:700;color:var(--ink);background:var(--bg-tint);
                  border-bottom:2px solid #fff;}
.company-table td{padding:15px 18px;vertical-align:top;color:var(--text);
                  border-bottom:1px solid var(--line);}
.company-table td a{color:var(--blue-600);text-decoration:underline;text-underline-offset:3px;
                    word-break:break-all;}
/* 複数行で入っている項目（開発言語など）は改行を保つ */
.company-table .prewrap{white-space:pre-wrap;}
.company-table .empty{color:var(--muted);}

.company-back{margin-top:52px;}

/* ---------- 写真の拡大表示 ---------- */
.gallery-lightbox{position:fixed;inset:0;z-index:99999;padding:24px;
                  background:rgba(11,42,82,.82);display:none;align-items:center;justify-content:center;}
.gallery-lightbox.open{display:flex;}
.gallery-lightbox img{max-width:min(1100px,95vw);max-height:88vh;object-fit:contain;
                      background:#fff;border-radius:8px;}
.gallery-lightbox .close-btn{position:fixed;top:max(16px,env(safe-area-inset-top));
                             right:max(16px,env(safe-area-inset-right));z-index:100000;}

@media (max-width:1000px){
  .company-head{gap:20px;}
  .company-head__logo{width:150px;min-height:78px;}
  .company-gallery{grid-template-columns:repeat(3,1fr);gap:12px;}
  .company-gallery img{height:140px;}
  .company-tables{gap:40px;}
  .company-table th{width:132px;padding:12px 14px;}
  .company-table td{padding:12px 14px;}
}
@media (max-width:600px){
  .company-head{flex-direction:column;align-items:flex-start;gap:18px;}
  .company-head__logo{width:100%;}
  .company-cover img{max-height:210px;}
  .company-gallery{grid-template-columns:repeat(2,1fr);}
  .company-gallery img{height:112px;}
  /* 幅が足りないので th を上に積む */
  .company-table,.company-table tbody,.company-table tr,
  .company-table th,.company-table td{display:block;width:auto;}
  .company-table th{padding:10px 14px;border-bottom:0;border-radius:8px 8px 0 0;}
  .company-table td{padding:12px 14px 18px;}
}
