/* =====================================================================
   スティープルジャックヤマノ  サイト共通スタイル
   旧 WordPress（Edin テーマ＋Elementor）の見た目を再現しつつ、
   スマホでのはみ出し・文字の小ささ・表の読みにくさを修正
   ===================================================================== */

:root {
  --red: #d65050;
  --info: #5bc0de;
  --text: #333;
  --muted: #666;
  --line: #e5e5e5;
  --dark: #333;
  --light-bg: #f5f5f5;
  --radius: 20px;
  --container: 1100px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  font-size: 15px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #1a7fbf; }
h1, h2, h3, h4 { line-height: 1.5; margin: 0 0 .6em; }
p { margin: 0 0 1em; }
ul { margin: 0; }
.center { text-align: center; }
.rounded { border-radius: var(--radius); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 820px; }
.container--message { max-width: 700px; }

/* ---------- ヘッダー ---------- */
.hero { display: block; background: #222; }
.hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.site-bar { border-bottom: 1px solid var(--line); background: #fff; position: relative; }
.site-bar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 120px; padding-top: 16px; padding-bottom: 16px; }
.site-title { margin: 0; font-size: 26px; font-weight: 700; line-height: 1.4; }
.site-title a { color: var(--text); text-decoration: none; }
.site-title span { display: inline-block; } /* 社名が単語の途中で折り返さないように */

.menu-toggle {
  display: inline-flex; align-items: center; gap: 10px;
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-size: 13px; color: var(--text); white-space: nowrap;
}
.menu-toggle__icon {
  width: 42px; height: 42px; border: 1px solid #ccc; border-radius: 50%;
  background:
    linear-gradient(var(--text), var(--text)) center calc(50% - 5px) / 14px 2px no-repeat,
    linear-gradient(var(--text), var(--text)) center / 14px 2px no-repeat,
    linear-gradient(var(--text), var(--text)) center calc(50% + 5px) / 14px 2px no-repeat;
  transition: border-color .2s;
}
.menu-toggle:hover .menu-toggle__icon, .menu-toggle[aria-expanded="true"] .menu-toggle__icon { border-color: var(--text); }

.site-nav { background: #fafafa; border-top: 1px solid var(--line); }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 8px; padding-top: 10px; padding-bottom: 10px; }
.site-nav a { display: block; padding: 10px 16px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 14px; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--red); }

.page-title { text-align: center; font-size: 28px; margin: 0; padding: 48px 20px; border-bottom: 1px solid var(--line); }

/* ---------- 見出し・区切り線・ボタン ---------- */
.sec-title { text-align: center; font-size: 22px; margin: 0; padding: 10px; }
.divider { display: block; width: min(50%, 420px); height: 1px; margin: 0 auto 28px; background: var(--red); }
.divider--short { width: 50px; height: 2px; }
.bar-title { font-size: 20px; margin: 40px 0 0; padding: 10px 16px; background: #d6d6d6; }
.bar-title + .table-panel { border-top: 2px solid var(--red); }

.btn {
  display: inline-block; text-decoration: none; text-align: center; line-height: 1.4;
  border-radius: 3px; padding: 10px 22px; font-size: 14px; transition: transform .2s, background-color .2s, color .2s;
}
.btn:hover { transform: translateY(-3px); }
.btn--info { background: var(--info); color: #fff; }
.btn--outline { border: 1px solid var(--red); color: var(--red); background: transparent; font-size: 14px; }
.btn--outline:hover { background: var(--red); color: #fff; }
.btn--apply { background: #23a455; color: #fff; font-size: 16px; padding: 14px 40px; margin-top: 24px; }
.btn--submit { background: var(--red); color: #fff; border: 0; font: inherit; font-weight: 700; padding: 14px 60px; cursor: pointer; }

/* 半透明の白い箱（背景画像の上に文字を載せる所） */
.glass { background: rgba(255, 255, 255, .82); padding: 24px 28px; border-radius: 4px; }
.glass > :last-child { margin-bottom: 0; }

/* 背景画像つきセクション（--bg で画像を指定） */
.greeting, .philosophy, .divisions, .licenses, .works, .contact {
  background: #eee var(--bg) center / cover no-repeat;
}

.section { padding: 48px 0 0; }

/* ---------- ページ上部の画像リンク（会社案内・業務案内・実績紹介） ---------- */
.nav-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; padding-top: 40px; padding-bottom: 40px; }
.nav-card { display: flex; flex-direction: column; align-items: center; gap: 14px; text-decoration: none; }
.nav-card img { width: 100%; aspect-ratio: 330 / 213; object-fit: cover; border-radius: var(--radius); transition: opacity .2s; }
.nav-card:hover img { opacity: .85; }
.nav-card.is-current .btn { background: #8a8a8a; }
.nav-cards--works { padding-top: 0; }

/* ---------- トップ ---------- */
.greeting { padding: 40px 0; }
.greeting__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; }
.greeting h3 { font-size: 20px; }
.greeting .accent { color: #2d9a4b; }
.videos { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-top: 20px; }
.video { aspect-ratio: 16 / 9; background: #000; }
.video iframe { width: 100%; height: 100%; border: 0; display: block; }

.business { background: var(--light-bg); padding: 90px 0; }
.business__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.business .sec-title { text-align: left; padding-left: 0; }
.business .divider { margin-left: 0; }
.icon-box { display: flex; gap: 22px; margin-bottom: 36px; }
.icon-box:last-child { margin-bottom: 0; }
.icon-box__icon {
  flex: none; width: 56px; height: 56px; border: 2px solid var(--red); border-radius: 50%;
  color: var(--red); display: grid; place-items: center;
}
.icon-box__icon svg { width: 24px; height: 24px; }
.icon-box h3 { font-size: 18px; margin-bottom: .3em; }
.icon-box p { color: var(--muted); font-size: 14px; margin: 0; }

.more { background: #404040; color: #fff; padding: 50px 0; }
.more .sec-title { color: var(--red); }
.more .divider { margin-bottom: 40px; }
.more__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.more__box { background: rgba(0, 0, 0, .3); padding: 30px; text-align: center; }
.more__box h3 { color: #aaa; font-size: 18px; margin-bottom: 20px; }

.gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; padding-top: 40px; padding-bottom: 50px; }
.gallery a { display: block; overflow: hidden; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .3s; }
.gallery a:hover img { transform: scale(1.05); }

/* ---------- 会社案内 ---------- */
.philosophy { padding: 40px 0 50px; }
.philosophy .glass + .sec-title { margin-top: 30px; }
.philosophy h3 { font-size: 20px; }
.profile { display: grid; grid-template-columns: 5fr 6fr; gap: 30px; align-items: start; padding-bottom: 50px; }
.info-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.info-table th, .info-table td { text-align: left; vertical-align: top; padding: 12px 10px; border-bottom: 1px solid #ddd; }
.info-table th { width: 9em; font-weight: 700; white-space: nowrap; }
.info-table small { color: var(--muted); }

/* ---------- 業務案内 ---------- */
.divisions { padding: 30px 0 40px; }
.divisions__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.division { background: rgba(255, 255, 255, .82); border-radius: var(--radius); padding-bottom: 20px; }
.division img { width: 100%; aspect-ratio: 330 / 213; object-fit: cover; }
.division h3 { text-align: center; font-size: 18px; margin: 16px 0 10px; }
.division ul { list-style: none; padding: 0 24px; font-size: 14px; }
.division li { padding: 4px 0; border-bottom: 1px dotted #ccc; }
.partners { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; padding-bottom: 50px; }
.partner { border: 1px solid #ddd; }
.partner h3 { background: #ddd; text-align: center; font-size: 17px; margin: 0; padding: 10px; }
.partner h4 { font-size: 15px; margin: 14px 24px 0; }
.partner ul { padding: 10px 24px 0 44px; font-size: 14px; }
.partner > :last-child { padding-bottom: 20px; }
.partner__lead { text-align: center; font-size: 18px; font-weight: 700; padding: 40px 20px; margin: 0; }
.licenses { padding: 50px 0 60px; }
.licenses__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; font-size: 14px; }
.licenses__grid ul { padding-left: 1.4em; }

/* ---------- 実績紹介 ---------- */
.works { padding: 10px 0 50px; }
.table-panel { background: rgba(255, 255, 255, .92); padding: 10px 16px 16px; }
.works-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.works-table th, .works-table td { padding: 10px 8px; border-bottom: 1px solid #ddd; text-align: left; vertical-align: top; }
.works-table th { font-size: 13px; white-space: nowrap; border-bottom: 2px solid #bbb; }
.works-table td:last-child { white-space: nowrap; }
.works-table__kind { text-align: center !important; white-space: nowrap; }
.works-table .resolved { display: none; }
.works-note { margin: 12px 0 0; font-weight: 700; }

.photo-posts { padding-top: 40px; }
.photo-post { padding-bottom: 40px; margin-bottom: 40px; border-bottom: 1px solid var(--line); }
.photo-post h2 { font-size: 24px; margin-bottom: 0; }
.photo-post__date { font-size: 12px; color: var(--muted); }
.photo-post img { width: 100%; }

/* ---------- 採用情報 ---------- */
.recruit-message { background: rgba(0, 0, 0, .06); padding: 30px; font-size: 16px; margin-top: 10px; }
.recruit-message > :last-child { margin-bottom: 0; }
.recruit-table-wrap { max-width: 840px; margin: 0 auto; padding: 20px; background: #eee var(--bg) center / cover no-repeat; }
.info-table--recruit { background: rgba(255, 255, 255, .92); }
.info-table--recruit th, .info-table--recruit td { padding: 14px 16px; }
.info-table--recruit th { width: 10em; background: rgba(0, 0, 0, .04); }

/* ---------- お問合せ ---------- */
.contact { padding: 40px 0 50px; }
.contact-tel { text-align: center; margin-bottom: 24px; }
.contact-tel p { margin: 0; }
.contact-tel__num { font-size: 28px; font-weight: 700; }
.contact-tel__num a { color: var(--text); text-decoration: none; }
.contact-form label { display: block; font-weight: 700; margin-bottom: 18px; }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form input[type="tel"], .contact-form textarea {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
  border: 1px solid #ccc; border-radius: 3px; background: #fff; font: inherit; font-weight: 400;
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--info); border-color: var(--info); }
.contact-form fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.contact-form legend { font-weight: 700; padding: 0; margin-bottom: 6px; }
.contact-form .radio { display: inline-block; font-weight: 400; margin: 0 24px 0 0; }
.req { display: inline-block; background: var(--red); color: #fff; font-size: 11px; padding: 0 6px; border-radius: 2px; margin-left: 6px; vertical-align: 2px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-message { padding: 16px 20px; margin-bottom: 20px; border-left: 4px solid; }
.form-message--ok { border-color: #23a455; background: #eef8f1; }
.form-message--ng { border-color: var(--red); background: #fbeeee; }
.form-message ul { padding-left: 1.2em; }

/* ---------- フッター ---------- */
.site-footer { background: var(--dark); color: #ddd; font-size: 13px; }
.site-footer__inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; padding-top: 50px; padding-bottom: 50px; }
.site-footer h2 { color: #fff; font-size: 14px; margin-bottom: 14px; }
.site-footer p { margin: 0 0 8px; }
.site-footer a { color: #fff; }
.site-footer__map iframe { width: 100%; max-width: 300px; height: 240px; display: block; }
.site-footer__menu ul { list-style: none; padding: 0; }
.site-footer__menu li { border-bottom: 1px solid #4a4a4a; }
.site-footer__menu a { display: block; padding: 7px 0; font-weight: 700; text-decoration: none; }
.site-footer__menu a:hover { color: var(--red); }
.copyright { background: #fff; color: var(--muted); margin: 0; padding: 16px 20px; text-align: center; }

/* ---------- 写真の拡大表示 ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .88); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: calc(100vw - 120px); max-height: calc(100vh - 80px); width: auto; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 48px; line-height: 1; cursor: pointer; padding: 10px 16px; }
.lightbox__close { top: 10px; right: 10px; }
.lightbox__prev { left: 6px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 6px; top: 50%; transform: translateY(-50%); }

/* =====================================================================
   タブレット・スマホ
   ===================================================================== */
@media (max-width: 900px) {
  .greeting__grid, .business__grid, .profile, .partners { grid-template-columns: 1fr; }
  .divisions__grid { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(4, 1fr); }
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
  .site-footer__map { grid-column: 1 / -1; }
  .site-footer__map iframe { max-width: none; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .container { padding: 0 16px; }
  .site-bar__inner { min-height: 0; }
  .site-title { font-size: 18px; }
  .site-nav ul { flex-direction: column; padding-top: 0; padding-bottom: 0; }
  .site-nav li + li { border-top: 1px solid var(--line); }
  .page-title { font-size: 22px; padding: 28px 16px; }
  .sec-title { font-size: 20px; }
  .glass { padding: 18px; }

  .nav-cards { gap: 10px; padding-top: 24px; padding-bottom: 24px; }
  .nav-card { gap: 8px; }
  .nav-card img { border-radius: 10px; }
  .nav-card .btn { font-size: 12px; padding: 6px 8px; width: 100%; }
  .nav-cards--works { grid-template-columns: 1fr 1fr; }

  .videos, .more__grid, .divisions__grid, .licenses__grid { grid-template-columns: 1fr; }
  .business { padding: 50px 0; }
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 6px; }

  /* 表 → カード表示（見出しを各行の左に出す） */
  .info-table th, .info-table td { display: block; width: auto; border: 0; padding: 0; }
  .info-table th { padding-top: 12px; white-space: normal; background: none !important; color: var(--red); font-size: 13px; }
  .info-table td { padding-bottom: 12px; border-bottom: 1px solid #ddd; }
  .info-table--recruit { padding: 0 14px; }
  .recruit-table-wrap { padding: 10px; }

  .table-panel { padding: 4px 12px 12px; }
  .works-table thead { display: none; }
  .works-table, .works-table tbody, .works-table tr, .works-table td { display: block; }
  .works-table tr { padding: 10px 0; border-bottom: 1px solid #ccc; }
  .works-table td { border: 0; padding: 1px 0; white-space: normal !important; text-align: left !important; font-size: 13px; }
  .works-table td::before { content: attr(data-label) "："; color: var(--muted); }
  .works-table .works-table__name { font-size: 15px; font-weight: 700; }
  .works-table .works-table__name::before { content: none; }
  .works-table .ditto { display: none; }
  .works-table .resolved { display: inline; }

  .site-footer__inner { grid-template-columns: 1fr; gap: 28px; }
  .lightbox img { max-width: 100vw; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
