/* 明誠グループ 共通スタイル
   サイトごとの色は site.json の accent で --accent を上書きする */
:root {
  --brand: #14666f;
  --brand-dark: #0e4c53;
  --brand-soft: #e7f1f2;
  --accent: var(--brand);
  --text: #23292b;
  --muted: #5d6668;
  --line: #d9e1e2;
  --bg: #ffffff;
  --bg-alt: #f4f7f7;
  --footer: #1f2a2c;
  --radius: 8px;
  --wrap: 1080px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "YuGothic", "Meiryo", sans-serif;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  line-height: 1.85;
  font-size: 16px;
}
img, video { max-width: 100%; height: auto; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: #fff; padding: 8px 12px; z-index: 10; }

/* ヘッダー */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.logo { text-decoration: none; color: var(--brand-dark); display: flex; flex-direction: column; line-height: 1.25; }
.logo strong { font-size: 22px; letter-spacing: 0.08em; }
.logo small { font-size: 12px; color: var(--muted); letter-spacing: 0.06em; }
.gnav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 4px; justify-content: flex-end; }
.gnav a { display: block; padding: 6px 10px; color: var(--text); text-decoration: none; font-size: 14px; border-radius: 4px; }
.gnav a:hover, .gnav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-dark); }
.menu-toggle { display: none; }

/* ページ見出し */
.page-head { background: linear-gradient(120deg, var(--brand-dark), var(--accent)); color: #fff; padding: 40px 0 34px; }
.page-head h1 { margin: 0; font-size: 28px; letter-spacing: 0.04em; line-height: 1.4; }
.page-head .crumbs { margin: 0 0 6px; font-size: 13px; opacity: 0.85; }
.page-head .crumbs a { color: #fff; }
.page-head .date { margin: 8px 0 0; font-size: 14px; opacity: 0.9; }

/* 本文 */
main { display: block; }
.content { padding-top: 40px; padding-bottom: 64px; }
.prose { max-width: none; }
.prose h2 { font-size: 22px; color: var(--brand-dark); border-bottom: 2px solid var(--accent); padding-bottom: 6px; margin: 40px 0 16px; line-height: 1.45; }
.prose h3 { font-size: 18px; color: var(--brand-dark); border-left: 4px solid var(--accent); padding-left: 10px; margin: 32px 0 12px; line-height: 1.5; }
.prose h4 { font-size: 16px; color: var(--brand-dark); margin: 24px 0 8px; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 16px; }
.prose li { margin-bottom: 4px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 20px; font-size: 15px; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--bg-alt); color: var(--brand-dark); white-space: nowrap; }
.prose td:first-child { white-space: nowrap; }
.prose dl { display: grid; grid-template-columns: 9em 1fr; gap: 8px 16px; margin: 0 0 16px; }
.prose dt { font-weight: 700; color: var(--brand-dark); }
.prose dd { margin: 0; }
.prose video { display: block; margin: 16px 0 24px; border-radius: var(--radius); background: #000; }
.prose img { border-radius: 4px; }
.box { background: var(--bg-alt); border-radius: var(--radius); padding: 20px 24px; margin: 0 0 24px; }
.box > :last-child { margin-bottom: 0; }
.note { font-size: 14px; color: var(--muted); }
.table-scroll { overflow-x: auto; }

/* トップ */
.hero { background: linear-gradient(120deg, var(--brand-dark), var(--accent)); color: #fff; padding: 72px 0 64px; }
.hero h1 { margin: 0 0 12px; font-size: 34px; letter-spacing: 0.06em; line-height: 1.4; }
.hero p { margin: 0; font-size: 17px; max-width: 760px; opacity: 0.95; }
.section { padding: 56px 0; }
.section.alt { background: var(--bg-alt); }
.section-title { font-size: 22px; color: var(--brand-dark); margin: 0 0 24px; display: flex; align-items: center; gap: 12px; }
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; }
.card h3 { margin: 0 0 8px; font-size: 17px; color: var(--brand-dark); line-height: 1.5; }
.card p { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.card .more { margin-top: auto; font-size: 14px; font-weight: 700; }
.cards + .note { margin-top: 16px; }
a.card { text-decoration: none; color: var(--text); transition: box-shadow 0.2s, transform 0.2s; }
a.card:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.1); transform: translateY(-2px); color: var(--text); }
a.card .more { color: var(--brand); }
.card.photo { padding: 0; overflow: hidden; }
.card.photo img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card.photo h3, .card.photo p, .card.photo .more { margin-left: 18px; margin-right: 18px; }
.card.photo h3 { margin-top: 16px; }
.card.photo .more { margin-bottom: 18px; }

/* トップの大きな写真＋タイトル */
.hero.photo { position: relative; overflow: hidden; padding: 0; min-height: 460px; display: flex; align-items: flex-end; }
.hero.photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero.photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14,76,83,0.82), rgba(14,76,83,0.2) 70%); }
.hero.photo .wrap { position: relative; z-index: 1; width: 100%; padding-top: 64px; padding-bottom: 56px; }
.hero.photo small { display: block; font-size: 13px; letter-spacing: 0.3em; opacity: 0.9; margin-bottom: 4px; }

/* 写真の回り込み（Leadership など） */
.figure-left { float: left; width: 220px; margin: 4px 28px 16px 0; border-radius: var(--radius); }
.clear { clear: both; }
.signature { text-align: right; margin-top: 24px; }

/* 経営理念など、中央そろえの文章 */
.prose .statement { margin: 0 0 40px; font-size: 17px; line-height: 2.1; }
.prose h2.center { text-align: center; border-bottom: 0; margin: 40px 0 14px; padding-bottom: 0; }
.prose h2.center::after { content: ""; display: block; width: 48px; height: 3px; background: var(--accent); margin: 10px auto 0; }

/* ページ見出しに写真を敷く */
.page-head.has-image { position: relative; overflow: hidden; padding: 72px 0 64px; }
.page-head.has-image > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-head.has-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14,76,83,0.85), rgba(14,76,83,0.35)); }
.page-head.has-image .wrap { position: relative; z-index: 1; }

/* 地図 */
.map { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); margin: 0 0 8px; display: block; }

/* リンク集 */
.link-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 24px; }
.link-list li { margin: 0; padding-left: 1em; position: relative; }
.link-list li::before { content: "›"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
/* 長い項目が多いリンク集・バナーは2列にそろえる */
.link-list.cols-2, .image-links.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.link-list.cols-2 { font-size: 15px; gap: 6px 32px; }
/* 2列だと長い項目が折り返す幅では1列にする */
@media (max-width: 1180px) { .link-list.cols-2 { grid-template-columns: 1fr; } }

/* 画像だけのリンク（採用情報など） */
.image-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin: 0 0 24px; }
.image-links a { display: block; }
.image-links img { display: block; width: 100%; border-radius: var(--radius); transition: opacity 0.2s; }
.image-links a:hover img { opacity: 0.85; }
/* 大きな画像を本文幅いっぱいにしない */
.prose img.img-mid { display: block; width: 100%; max-width: 560px; }
.prose img.img-small { display: block; width: 100%; max-width: 400px; }
/* グループ各社のロゴ */
.logo-links { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 36px; }
.logo-links img { display: block; height: 20px; width: auto; }
.logo-links img.tall { height: 36px; }
.logo-links a:hover img { opacity: 0.75; }
/* 4列のカード・バナー */
.cards.cols-4, .image-links.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* トップの1段目（主力業務のカードと紹介動画を左右に並べる） */
.feature-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; margin: 0 0 16px; }
.feature-row .card.photo img { aspect-ratio: auto; }
/* 動画はカードと同じ高さにそろえ、余った上下は白で埋める（切り取らない） */
.pr-video { display: block; width: 100%; height: 100%; object-fit: contain; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.banner { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.banner img { width: 260px; }
.banner > div { flex: 1; min-width: 240px; }
.banner .section-title { margin-bottom: 8px; }
.banner p { margin: 0 0 14px; }
.btn { display: inline-block; background: var(--brand); color: #fff; text-decoration: none; font-weight: 700; border-radius: 6px; padding: 10px 20px; }
.btn:hover { background: var(--brand-dark); color: #fff; }

/* お知らせ */
.news-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.news-list li { display: flex; gap: 20px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.news-list time { flex: none; width: 7.5em; color: var(--muted); font-size: 14px; padding-top: 1px; }
.news-list a { text-decoration: none; }
.news-list a:hover { text-decoration: underline; }
.year { font-size: 18px; color: var(--brand-dark); margin: 32px 0 8px; }
/* お知らせを写真付きのカードで並べる（site.json の news_style: cards） */
.news-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 0 0 24px; }
.news-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text); transition: box-shadow 0.2s, transform 0.2s; }
.news-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.1); transform: translateY(-2px); color: var(--text); }
.prose .news-card img, .news-card img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 0; }
.news-card time { margin: 12px 16px 2px; font-size: 13px; color: var(--muted); }
.news-card-title { margin: 0 16px 16px; font-weight: 700; line-height: 1.5; color: var(--brand-dark); }

/* お問い合わせ（フォームの代わり） */
.contact-panel { margin: 0 0 24px; }
.contact-panel h2, .contact-panel h3 { margin-top: 0; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.contact-grid > div { background: var(--bg-alt); border-radius: 6px; padding: 14px 16px; font-size: 15px; }
.contact-grid strong { display: block; color: var(--brand-dark); margin-bottom: 4px; }

/* フッター */
.site-footer { background: var(--footer); color: #cfd8d9; font-size: 14px; padding: 40px 0 24px; }
.site-footer a { color: #e6eeef; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.site-footer h2 { font-size: 14px; color: #fff; margin: 0 0 10px; letter-spacing: 0.06em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.copyright { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 28px; padding-top: 16px; font-size: 13px; color: #9fb0b2; }

/* スマホ */
@media (max-width: 860px) {
  .site-header .wrap { flex-wrap: wrap; min-height: 60px; padding-top: 8px; padding-bottom: 8px; }
  .menu-toggle { display: inline-block; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; }
  .gnav { display: none; width: 100%; }
  .gnav.open { display: block; }
  .gnav ul { flex-direction: column; gap: 0; }
  .gnav a { padding: 10px 4px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .page-head { padding: 28px 0 24px; }
  .page-head h1 { font-size: 22px; }
  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 26px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero.photo { min-height: 320px; }
  .hero.photo .wrap { padding-top: 40px; padding-bottom: 32px; }
  .figure-left { width: 120px; margin-right: 16px; }
  .page-head.has-image { padding: 48px 0 40px; }
  .prose dl { grid-template-columns: 1fr; gap: 2px; }
  .prose dd { margin-bottom: 10px; }
  .news-list li { flex-direction: column; gap: 2px; }
  .prose td:first-child { white-space: normal; }
  .link-list.cols-2, .image-links.cols-2, .feature-row { grid-template-columns: 1fr; }
  .cards.cols-4, .image-links.cols-4, .news-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-cards { gap: 12px; }
  .news-card-title { font-size: 14px; }
}
@media print {
  .site-header, .site-footer { position: static; }
  .gnav, .menu-toggle { display: none; }
}

/* 詳細ボックスの中を2列にする（About us の法人概要：左に会社の情報、右に連絡先） */
.box-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.box-cols dl { margin: 0; grid-template-columns: 7.5em 1fr; align-content: start; align-self: start; }
@media (max-width: 860px) {
  .box-cols { grid-template-columns: 1fr; gap: 10px; }
  .prose .box-cols dl { grid-template-columns: 1fr; }
}

/* 数字の帯（HLB International の規模など） */
.stats { background: var(--brand-dark); color: #fff; border-radius: var(--radius); padding: 22px 24px 14px; margin: 8px 0 28px; }
.stats ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.stats li { margin: 0; display: flex; flex-direction: column; border-left: 3px solid rgba(255,255,255,0.35); padding-left: 14px; }
.stats-label { font-size: 12px; letter-spacing: 0.12em; opacity: 0.85; }
.stats-value { font-size: 32px; font-weight: 700; line-height: 1.3; letter-spacing: 0.02em; }
.prose .stats-source { margin: 12px 0 0; font-size: 12px; opacity: 0.8; }
.stats-source a { color: #fff; }

/* サービスの区分を左右に並べる（Service ページ）。見た目は通常の表と同じで、表を2列に並べる */
.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 24px; margin: 0 0 20px; align-items: stretch; }
/* 左右の表の高さをそろえ、見出しセルの幅も全部同じにする */
.prose .svc-grid table { margin: 0; height: 100%; table-layout: fixed; }
.prose .svc-grid th { width: 10em; }
@media (max-width: 640px) {
  .svc-grid { grid-template-columns: 1fr; }
}
}
