/* 寺本工業 株式会社 ホームページ（旧WordPress Lightningテーマの見た目を再現） */
:root {
  --main: #337ab7;
  --text: #212529;
  --muted: #666;
  --line: #e5e5e5;
  --footer-bg: #f9f9f9;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: メイリオ, Meiryo, "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ Pro W3", "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

a { color: var(--main); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 15px; }

/* ===== ヘッダー ===== */
.site-header { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .1); position: relative; z-index: 10; }
.site-header .container { display: flex; flex-direction: column; align-items: center; padding-top: 14px; }
.site-logo img { height: 46px; width: auto; }
.gnav ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; }
.gnav a {
  display: block; padding: 14px 12px 12px; color: #333; font-size: 12px; font-weight: bold;
  border-bottom: 1px solid transparent; letter-spacing: .05em;
}
.gnav a:hover { text-decoration: none; color: var(--main); }
.gnav a.current { border-bottom-color: var(--main); }
.gnav a.current, .gnav a:hover { font-size: 12px; }

/* ===== トップの大きな画像 ===== */
.hero {
  position: relative;
  background: url("/img/top.jpg") center / cover no-repeat;
  aspect-ratio: 2560 / 1200;
  max-height: 600px;
  min-height: 280px;
  width: 100%;
}
.hero-text {
  position: absolute; right: 4%; top: 50%; transform: translateY(-50%);
  color: #fff; text-align: right; font-size: clamp(18px, 2.6vw, 34px); line-height: 1.7;
  text-shadow: 0 0 6px rgba(0, 0, 0, .25);
}

/* ===== 下層ページの青い見出し帯 ===== */
.page-header { background: var(--main); color: #fff; text-align: center; padding: 26px 15px; }
.page-header h1, .page-header .title { margin: 0; font-size: 28px; font-weight: normal; line-height: 1.4; }

.breadcrumb { border-bottom: 1px solid var(--line); font-size: 12px; }
.breadcrumb ol { list-style: none; margin: 0; padding: 6px 0; display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumb li + li::before { content: "/"; margin-right: 4px; color: #999; }
.breadcrumb a { color: var(--text); }
.breadcrumb .home::before { content: "⌂"; margin-right: 3px; }

/* ===== 本文 ===== */
.main { padding: 50px 0 70px; }
.main p { margin: 0 0 1.2em; }

.section-title {
  font-size: 18px; font-weight: normal; margin: 0 0 16px; padding-bottom: 8px;
  border-bottom: 1px solid var(--line); position: relative;
}
.section-title::after {
  content: ""; position: absolute; left: 0; bottom: -1px; width: 30%; border-bottom: 1px solid var(--main);
}
.main-title {
  font-size: 20px; font-weight: normal; margin: 50px 0 20px; padding: 10px 0;
  border-top: 2px solid var(--main); border-bottom: 1px solid var(--line);
}

/* トップの事業3つ */
.pr-area { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.pr-area img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 14px; }
.pr-area .summary { font-size: 14px; margin-bottom: 14px; }

.btn {
  display: inline-block; font-size: 14px; padding: 4px 12px; border-radius: 4px;
  border: 1px solid #ccc; color: #333; background: #fff;
}
.btn:hover { text-decoration: none; background: #f2f2f2; }
.btn-primary { background: var(--main); border-color: var(--main); color: #fff; }
.btn-primary:hover { background: #286090; }

/* お知らせ一覧 */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { border-bottom: 1px solid var(--line); }
.post-list a { display: flex; gap: 16px; align-items: center; padding: 14px 0; color: var(--text); }
.post-list a:hover { text-decoration: none; }
.post-list a:hover .post-title { color: var(--main); }
.post-list img { width: 80px; height: 80px; object-fit: cover; flex-shrink: 0; }
.post-list .post-date { font-size: 12px; color: var(--muted); }

/* 業務案内の子ページ一覧 */
.child-pages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.child-pages a {
  display: block; border: 1px solid var(--line); border-radius: 4px; padding: 20px; color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}
.child-pages a:hover { text-decoration: none; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.child-pages h3 { font-size: 16px; margin: 0 0 14px; }
.child-pages img { width: 150px; height: 150px; margin-bottom: 14px; }

/* 事業ページのアイキャッチ */
.eyecatch { margin-bottom: 30px; }
.eyecatch img { width: 100%; }

/* 会社概要・沿革の表 */
.info-table { width: 100%; border-collapse: collapse; margin-bottom: 40px; }
.info-table th, .info-table td { border-bottom: 1px solid var(--line); padding: 14px 10px; text-align: left; vertical-align: top; }
.info-table th { width: 200px; font-weight: normal; background: #f5f8fb; white-space: nowrap; }
.info-table tr:first-child th, .info-table tr:first-child td { border-top: 1px solid var(--line); }
.info-table ul { list-style: none; margin: 0; padding: 0; }

/* アクセス */
.map { position: relative; width: 100%; aspect-ratio: 4 / 3; max-height: 600px; margin-bottom: 20px; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* お知らせ記事ページ（本文＋右サイド） */
.with-side { display: grid; grid-template-columns: 1fr 260px; gap: 50px; }
.entry-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.entry-cat { background: #999; color: #fff; padding: 0 8px; border-radius: 2px; font-size: 11px; }
.entry-title { font-size: 26px; font-weight: normal; margin: 4px 0 30px; line-height: 1.4; }
.entry-body figure { margin: 30px 0; }
.post-nav { display: flex; justify-content: space-between; gap: 20px; margin-top: 50px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; }
.post-nav .label { display: block; font-size: 12px; color: var(--muted); }
.post-nav .next { text-align: right; margin-left: auto; }
.side h3 { font-size: 16px; font-weight: normal; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.side section { margin-bottom: 36px; }
.side .post-list img { width: 60px; height: 60px; }
.side .post-list a { font-size: 13px; padding: 10px 0; }

/* ===== フッター ===== */
.site-footer { background: var(--footer-bg); border-top: 3px solid var(--main); text-align: center; font-size: 12px; padding: 24px 15px; }
.site-footer p { margin: 0; }

.to-top {
  position: fixed; right: 16px; bottom: 16px; width: 40px; height: 40px; border-radius: 4px;
  background: rgba(0, 0, 0, .35); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.to-top:hover { text-decoration: none; background: rgba(0, 0, 0, .55); }

/* ===== スマホ ===== */
@media (max-width: 767px) {
  .pr-area, .child-pages { grid-template-columns: 1fr; }
  .with-side { grid-template-columns: 1fr; }
  .hero { aspect-ratio: auto; height: 300px; background-position: 30% center; }
  .page-header h1, .page-header .title { font-size: 22px; }
  .info-table th, .info-table td { display: block; width: 100%; }
  .info-table th { border-bottom: 0; padding-bottom: 6px; }
  .info-table td { padding-top: 6px; }
  .info-table tr:first-child td { border-top: 0; }
  .main { padding: 30px 0 50px; }
}
