﻿/* =====================================================
   事業ナビ - Design System
   Inspired by rakumachi.jp - Professional & Trustworthy
===================================================== */

/* ----- CSS Variables ----- */
:root {
  --primary: #185492;
  --primary-dark: #0f3a6b;
  --primary-light: #1e6db5;
  --accent: #e85d25;
  --accent-hover: #c94d1e;
  --text: #333333;
  --text-muted: #666666;
  --bg: #f5f7fa;
  --bg-white: #ffffff;
  --border: #e0e4e8;
  --green: #06c755;
  --font: 'Noto Sans JP', sans-serif;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --radius: 4px;
  --t: 0.2s ease;
}

/* ----- Base ----- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--t);
}

a:hover {
  color: var(--primary-light);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 1rem;
}

/* ----- Layout ----- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 64px 0;
}

.section-bg {
  background: var(--bg-white);
}

.section-dark {
  background: var(--primary);
}

/* ----- Section Title ----- */
.section-title {
  font-size: 1.55rem;
  color: var(--primary);
  border-left: 4px solid var(--primary);
  padding-left: 16px;
  margin-bottom: 36px;
}

.section-title small {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 4px;
  letter-spacing: 0.05em;
}

/* ----- Buttons ----- */
.btn {
  display: inline-block;
  padding: 10px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  font-family: var(--font);
  transition: all var(--t);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-navy {
  background: var(--primary);
  color: #fff;
}

.btn-navy:hover {
  background: var(--primary-dark);
  color: #fff;
}

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-lg {
  padding: 14px 40px;
  font-size: 1rem;
}

.btn-block {
  display: block;
  text-align: center;
  width: 100%;
}

.btn:disabled {
  background: #bbb;
  cursor: not-allowed;
}

/* ----- Header ----- */
#site-header {
  background: var(--bg-white);
  border-bottom: 3px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.site-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo-text {
  display: inline-flex;
  align-items: center;
  font-family: var(--font);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.01em;
}

.logo-part1 {
  background: var(--primary);
  color: #fff;
  font-size: 1.05rem;
  padding: 5px 10px 5px 9px;
  border-radius: 4px 0 0 4px;
}

.logo-part2 {
  color: var(--primary);
  font-size: 1.55rem;
  padding: 0 8px 0 7px;
  border: 2.5px solid var(--primary);
  border-left: none;
  border-radius: 0 4px 4px 0;
  position: relative;
}

.logo-part2::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 7px;
  right: 7px;
  height: 2.5px;
  background: var(--accent);
  border-radius: 2px;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-nav a {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--primary);
}

.nav-btn-contact a {
  background: var(--accent);
  color: #fff !important;
  padding: 8px 18px;
  border-radius: var(--radius);
}

.nav-btn-contact a:hover {
  background: var(--accent-hover);
}

.nav-btn-line a {
  background: var(--green);
  color: #fff !important;
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  line-height: 1;
}

.nav-btn-line a:hover {
  background: #04a844;
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--primary);
  transition: all var(--t);
}

/* ----- Hero ----- */
.hero {
  position: relative;
  background: var(--primary-dark);
  overflow: hidden;
}

.hero-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  opacity: 0.35;
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 0 20px;
}

.hero-content h1 {
  font-size: 2.1rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}

.hero-content p {
  font-size: 1rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
  margin-bottom: 28px;
  max-width: 600px;
}

/* ヒーロー2択CTA */
.hero-btns {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-hero-consult {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
  font-weight: 700;
}

.btn-hero-consult:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
  color: #fff;
}

/* ----- Trust Bar ----- */
.trust-bar {
  background: var(--primary);
  padding: 20px 0;
  color: #fff;
}

.trust-bar-inner {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
}

.trust-item {
  text-align: center;
}

.trust-num {
  font-size: 2rem;
  font-weight: 700;
  color: #ffd700;
  line-height: 1;
}

.trust-num span {
  font-size: 1rem;
}

.trust-label {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 4px;
}

/* ----- Case Cards ----- */
.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.case-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--t), transform var(--t);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.case-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.case-card-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.case-card-body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.case-tag {
  display: inline-block;
  background: #e8f1fb;
  color: var(--primary);
  font-size: 0.72rem;
  padding: 2px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
  font-weight: 700;
}

.case-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.5;
  flex: 1;
}

.case-data {
  width: 100%;
  font-size: 0.82rem;
  margin-bottom: 12px;
}

.case-data tr td {
  padding: 3px 0;
  vertical-align: top;
}

.case-data tr td:first-child {
  color: var(--text-muted);
  width: 48%;
}

.case-data tr td:last-child {
  font-weight: 700;
  color: var(--primary);
}

.btn-case-detail {
  display: block;
  text-align: center;
  background: var(--primary);
  color: #fff;
  padding: 8px;
  border-radius: var(--radius);
  font-size: 0.83rem;
  font-weight: 700;
}

.btn-case-detail:hover {
  background: var(--primary-dark);
  color: #fff;
}

/* ----- Column Cards ----- */
.col-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.col-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--t);
}

.col-card:hover {
  box-shadow: var(--shadow-md);
}

a.col-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

a.col-card:hover .col-title {
  color: var(--primary);
}

.col-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.col-card-body {
  padding: 16px;
}

.col-card-body a {
  color: var(--text);
}

.col-card-body a:hover {
  color: var(--primary);
}

.col-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.6;
  margin: 0;
}

.col-title {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.6;
}

/* ----- Company Table ----- */
.company-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.company-table th,
.company-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.company-table th {
  background: #eef3fa;
  color: var(--primary);
  font-weight: 700;
  white-space: nowrap;
  width: 28%;
}

.company-table tr:last-child th,
.company-table tr:last-child td {
  border-bottom: none;
}

/* ----- Contact Form ----- */
.contact-wrap {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  max-width: 720px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.req {
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  padding: 1px 7px;
  border-radius: 2px;
  margin-left: 6px;
  vertical-align: middle;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: var(--font);
  transition: border-color var(--t), box-shadow var(--t);
  background: #fff;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(24, 84, 146, 0.1);
}

textarea.form-input {
  resize: vertical;
}

.form-msg {
  display: none;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
}

/* ----- Footer ----- */
#site-footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 48px 0 24px;
}

.footer-logo img {
  height: 40px;
  filter: brightness(10);
}

.footer-desc {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 12px 0 24px;
}

.footer-nav {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-copy {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
}

/* ----- Article TOC ----- */
/* WordPressインライン目次を非表示（slide-tocが代替） */
.toc-002 {
  display: none !important;
}

.article-body h3:has(+ .toc-002) {
  display: none !important;
}

/* slide-toc: インラインBOXとして表示 */
.slide-toc {
  background: #f0f4f9;
  border: 2px solid var(--primary);
  border-radius: 8px;
  padding: 18px 22px 16px;
  margin: 8px 0 24px;
}

.slide-toc::before {
  content: '目次';
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--primary);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid rgba(24, 84, 146, 0.25);
}

.toc-root {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-root li {
  margin: 5px 0;
}

.toc-link {
  color: var(--primary);
  font-size: 0.87rem;
  text-decoration: none;
  padding-left: 16px;
  position: relative;
  display: inline-block;
}

.toc-link::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
  top: 2px;
}

.toc-link:hover {
  text-decoration: underline;
}

/* 固定縦バー・モバイルモーダルは非表示 */
.toc-toggle-bar,
.toc-modal,
.toc-toggle-btn {
  display: none !important;
}

/* ----- Article Balloon (Weluka w_b_*) - LINE style ----- */

/* Utility classes */
.w_b_mp0 {
  margin: 0 !important;
  padding: 0 !important;
}

.w_b_flex {
  display: flex;
}

.w_b_w100 {
  width: 100%;
}

.w_b_h100 {
  height: 100%;
}

.w_b_col {
  flex-direction: column;
}

.w_b_relative {
  position: relative;
}

.w_b_oh {
  overflow: hidden;
}

.w_b_radius {
  border-radius: 50%;
}

.w_b_db {
  display: block;
}

.w_b_lh {
  line-height: 1.4;
}

.w_b_ta_C,
.w_b_name_C {
  text-align: center;
}

.w_b_ta_L {
  text-align: left;
}

.w_b_jc_fe {
  justify-content: flex-end;
}

.w_b_mla {
  margin-left: auto;
}

.w_b_f_n {
  flex: none;
}

.w_b_direction_L,
.w_b_direction_R {
  display: block;
}

.w_b_space {
  display: none;
}

/* SVGプレースホルダー非表示 */
.w_b_img {
  display: block;
}

/* 吹き出し行全体 */
.w_b_box {
  width: 100%;
  margin: 12px 0;
  display: block;
}

.w_b_wrap_talk {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 88%;
}

/* ==============================
   対話記事 (w_b_R が存在する記事)
   かおりん (w_b_L) → 左  LINE受信側
   市川    (w_b_R) → 右  LINE送信側
   ============================== */

/* かおりんの行 (w_b_L) を左寄せ
   HTML順: [.w_b_ava_box][.w_b_bal_box] → row でアバター左、吹き出し右 */
.article-body:has(.w_b_R) .w_b_box:has(.w_b_L) {
  display: flex !important;
  justify-content: flex-start !important;
}

.article-body:has(.w_b_R) .w_b_wrap_talk.w_b_L {
  flex-direction: row !important;
  /* HTML順維持: アバター左、吹き出し右 */
}

/* 市川の行 (w_b_R) を右寄せ
   HTML順: [.w_b_bal_box][.w_b_ava_box] → row で吹き出し左、アバター右 */
.article-body:has(.w_b_R) .w_b_box:has(.w_b_R) {
  display: flex !important;
  justify-content: flex-end !important;
}

.article-body:has(.w_b_R) .w_b_wrap_talk.w_b_R {
  flex-direction: row !important;
  /* HTML順維持: 吹き出し左、アバター右 */
}

/* ==============================
   モノローグ記事 (w_b_L のみ)
   市川 → 左のまま（変更なし）
   ============================== */
.w_b_wrap_talk.w_b_L {
  flex-direction: row;
}

.w_b_wrap_talk.w_b_R {
  flex-direction: row;
}

/* ==============================
   アバター画像 - 欠け修正
   ============================== */
.w_b_ava_box {
  flex: none;
  width: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.w_b_icon_wrap,
.w_b_ava_wrap {
  display: block;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border-radius: 50%;
  margin: 0 auto;
}

.w_b_ava_effect {
  display: block !important;
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
  min-height: 52px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

.w_b_ava_img {
  display: block !important;
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
  min-height: 52px !important;
  max-width: 52px !important;
  max-height: 52px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  margin: 0 !important;
  padding: 0 !important;
}

.w_b_name {
  font-size: 0.7rem;
  font-weight: 600;
  color: #888;
  margin-top: 4px;
  text-align: center;
  white-space: nowrap;
  line-height: 1.3;
}

/* 吹き出し本体 */
.w_b_bal_box {
  flex: 1;
  min-width: 0;
}

.w_b_bal_outer {
  display: flex;
}

.w_b_bal_wrap_L,
.w_b_bal_wrap_R {
  width: 100%;
}

.w_b_bal {
  border-radius: 4px;
  padding: 10px 14px;
  position: relative;
  font-size: 0.88rem;
  line-height: 1.75;
  word-break: break-word;
}

/* 市川 (w_b_R → 右表示): LINEグリーン吹き出し＋右向き矢印 */
.article-body:has(.w_b_R) .w_b_talk_R {
  background: var(--green);
  border-radius: 12px 0 12px 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  color: #fff;
  border: none;
}

.article-body:has(.w_b_R) .w_b_talk_R::before {
  content: '';
  position: absolute;
  right: -6px;
  top: 12px;
  left: auto;
  border: 6px solid transparent;
  border-left-color: var(--green);
  border-right: none;
}

.article-body:has(.w_b_R) .w_b_talk_R::after {
  display: none;
}

.article-body:has(.w_b_R) .w_b_talk_R .w_b_quote,
.article-body:has(.w_b_R) .w_b_talk_R a {
  color: #fff;
}

/* 市川 (モノローグ・デフォルト): 白吹き出し＋左向き矢印 */
.w_b_talk_R {
  background: #fff;
  border: 1px solid #e0e4e8;
  border-radius: 0 12px 12px 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  color: #333;
}

.w_b_talk_R::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 12px;
  border: 6px solid transparent;
  border-right-color: #e0e4e8;
  border-left: none;
}

.w_b_talk_R::after {
  content: '';
  position: absolute;
  left: -5px;
  top: 13px;
  border: 5px solid transparent;
  border-right-color: #fff;
  border-left: none;
}

/* かおりん (w_b_L in 対話 → 左表示): 白吹き出し＋左向き矢印 */
.article-body:has(.w_b_R) .w_b_talk_L {
  background: #fff;
  border: 1px solid #e0e4e8;
  border-radius: 0 12px 12px 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  color: #333;
}

.article-body:has(.w_b_R) .w_b_talk_L::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 12px;
  right: auto;
  border: 6px solid transparent;
  border-right-color: #e0e4e8;
  border-left: none;
}

.article-body:has(.w_b_R) .w_b_talk_L::after {
  content: '';
  position: absolute;
  left: -5px;
  top: 13px;
  right: auto;
  border: 5px solid transparent;
  border-right-color: #fff;
  border-left: none;
}

.article-body:has(.w_b_R) .w_b_talk_L .w_b_quote,
.article-body:has(.w_b_R) .w_b_talk_L a {
  color: #333;
}

/* モノローグ (w_b_L のみ): ライトグレー吹き出し＋左向き矢印 */
.w_b_talk_L {
  background: #f5f7fa;
  border-radius: 0 12px 12px 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  color: #333;
}

.w_b_talk_L::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 12px;
  border: 6px solid transparent;
  border-right-color: #f5f7fa;
  border-left: none;
}

.w_b_quote {
  font-size: 0.88rem;
  line-height: 1.75;
}

/* ----- Article Chat Balloon (chat-container style) ----- */
.chat-container {
  margin: 14px 0;
}

.chat-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.chat-row.left {
  flex-direction: row;
}

.chat-row.right {
  flex-direction: row-reverse;
}

.chat-row .icon {
  flex: none;
  width: 64px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.chat-row .icon img {
  display: block !important;
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
  min-height: 52px !important;
  max-width: 52px !important;
  max-height: 52px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 2px solid #e0e4e8;
  overflow: hidden;
}

.chat-row .icon span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: center;
  line-height: 1.3;
}

.chat-row .bubble {
  flex: 1;
  min-width: 0;
  background: #f5f7fa;
  border-radius: 0 8px 8px 8px;
  padding: 11px 15px;
  font-size: 0.88rem;
  line-height: 1.75;
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.07);
}

.chat-row.left .bubble::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 14px;
  border: 6px solid transparent;
  border-right-color: #f5f7fa;
  border-left: none;
}

.chat-row.right .bubble {
  border-radius: 8px 0 8px 8px;
  background: #e8f0fd;
}

.chat-row.right .bubble::before {
  content: '';
  position: absolute;
  right: -7px;
  top: 14px;
  border: 6px solid transparent;
  border-left-color: #e8f0fd;
  border-right: none;
}

/* ----- Article Balloon (カスタム .balloon) ----- */
.balloon {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 1rem 0;
}

.balloon-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 64px;
}

.balloon-avatar img {
  width: 64px !important;
  height: 64px !important;
  min-width: 64px !important;
  min-height: 64px !important;
  max-width: 64px !important;
  max-height: 64px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: block !important;
  margin: 0 !important;
  overflow: hidden;
}

.balloon-avatar span {
  display: block;
  width: 100%;
  font-size: 0.75rem;
  margin-top: 4px;
  text-align: center;
  word-break: break-all;
}

.balloon-body {
  background: #fff;
  border: 1.5px solid #aaa;
  border-radius: 8px;
  padding: 12px 16px;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  line-height: 1.7;
}

/* 吹き出しの三角（左向き） */
.balloon-body::before {
  content: '';
  position: absolute;
  left: -11px;
  top: 18px;
  border: 6px solid transparent;
  border-right-color: #aaa;
}

.balloon-body::after {
  content: '';
  position: absolute;
  left: -8px;
  top: 19px;
  border: 5px solid transparent;
  border-right-color: #fff;
}

/* 右側吹き出し：ダーク文字 */
.balloon-right .balloon-body {
  background: #fff;
  border: 1.5px solid #aaa;
  color: #333;
  flex-shrink: 1;
  align-self: flex-start;
}

/* ----- 右側の三角（枠線部分） ----- */
.balloon-right .balloon-body::before {
  content: '';
  position: absolute;
  top: 18px;
  left: auto;
  /* 左側の指定をリセット */
  right: -7px;
  /* 右側に配置 */
  border: 6px solid transparent;
  border-left-color: #aaa;
  /* 右向きの三角を作る */
  border-right: none;
  /* 不要な線を消す */
}

/* ----- 右側の三角（中身：白部分） ----- */
.balloon-right .balloon-body::after {
  content: '';
  position: absolute;
  top: 19px;
  left: auto;
  /* 左側の指定をリセット */
  right: -4px;
  /* 右側に配置 */
  border: 5px solid transparent;
  border-left-color: #fff;
  /* 背景色と同じ白にする */
  border-right: none;
  /* 不要な線を消す */
}

.balloon-right {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 14px;
  margin: 1rem 0;
}

.balloon-right > .balloon-avatar {
  flex-shrink: 0;
}

/* balloon-right 内の不要な br 要素をフレックスアイテムとして非表示 */
.balloon > br,
.balloon-right > br {
  display: none;
}

/* ----- Article inline styles (WordPress classes) ----- */
.underline,
.article-body .underline {
  background: linear-gradient(transparent 70%, #fff352 70%) !important;
  background-color: transparent !important;
  padding: 0 2px !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  display: inline !important;
  font-weight: bold !important;
  box-shadow: none !important;
}

.article-body .under1 {
  background: #fff9e8;
  border: 1px solid #f0c040;
  padding: 10px 14px;
  margin: 12px 0;
  border-radius: 4px;
}

/* iframe (YouTube embed) responsive */
.article-body iframe {
  max-width: 100%;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  border-radius: 6px;
  margin: 16px 0;
  display: block;
}

/* ----- Consultation Popup ----- */
.consult-popup {
  position: fixed;
  bottom: 88px;
  right: 24px;
  width: 288px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
  z-index: 850;
  overflow: hidden;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.4s ease;
  pointer-events: none;
}

.consult-popup.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.consult-popup-head {
  background: var(--primary);
  color: #fff;
  padding: 11px 14px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.consult-popup-head span {
  font-size: 0.88rem;
  font-weight: 700;
}

.consult-popup-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  padding: 2px 4px;
  font-size: 1rem;
  line-height: 1;
  transition: color var(--t);
}

.consult-popup-close:hover {
  color: #fff;
}

.consult-popup-body {
  padding: 14px 16px 16px;
}

.consult-popup-body p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 12px;
  line-height: 1.65;
}

.consult-popup-btn {
  display: block;
  background: var(--accent);
  color: #fff !important;
  text-align: center;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none !important;
  transition: background var(--t);
}

.consult-popup-btn:hover {
  background: var(--accent-hover);
}

@media (max-width: 640px) {
  /* スマホでは幅・余白・文字を小さくして画面を占有しすぎないようにする */
  .consult-popup {
    width: min(260px, calc(100vw - 32px));
    right: 16px;
    bottom: 76px;
  }

  .consult-popup-head {
    padding: 8px 12px 7px;
  }

  .consult-popup-head span {
    font-size: 0.8rem;
  }

  .consult-popup-body {
    padding: 10px 12px 12px;
  }

  .consult-popup-body p {
    font-size: 0.74rem;
    margin-bottom: 8px;
    line-height: 1.55;
  }

  .consult-popup-btn {
    padding: 8px 10px;
    font-size: 0.8rem;
  }
}

/* PCでは大きめにして画面右寄りの上下中央に表示する */
@media (min-width: 641px) {
  .consult-popup {
    width: 400px;
    top: 50%;
    right: 24px;
    bottom: auto;
    transform: translate(0, -40%);
  }

  .consult-popup.show {
    transform: translate(0, -50%);
  }

  .consult-popup-head {
    padding: 14px 18px 13px;
  }

  .consult-popup-head span {
    font-size: 1.05rem;
  }

  .consult-popup-close {
    font-size: 1.2rem;
  }

  .consult-popup-body {
    padding: 20px 24px 24px;
  }

  .consult-popup-body p {
    font-size: 0.95rem;
    margin-bottom: 16px;
    line-height: 1.7;
  }

  .consult-popup-btn {
    padding: 14px 20px;
    font-size: 1rem;
  }

  /* 案内役の画像を左、説明文とボタンを右に並べる */
  .consult-popup-body {
    display: flex;
    align-items: flex-end;
    gap: 14px;
  }

  .consult-popup-img {
    display: block;
    flex: 0 0 110px;
    width: 110px;
    height: auto;
  }

  .consult-popup-main {
    flex: 1 1 auto;
    min-width: 0;
  }
}

/* スマホでは案内役の画像を表示しない */
@media (max-width: 640px) {
  .consult-popup-img {
    display: none;
  }
}

/* ----- Page Top Button ----- */
.pagetop {
  position: fixed;
  bottom: 32px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t);
  z-index: 900;
}

.pagetop.show {
  opacity: 1;
  pointer-events: auto;
}

.pagetop:hover {
  background: var(--primary-dark);
  color: #fff;
}

/* ----- Article Page ----- */
/* breadcrumb直後のsectionは上余白を小さく */
.breadcrumb-area+.section {
  padding-top: 32px;
}

/* h2.contents-titleは本文見出しとして表示する */
/* アイキャッチ画像 (JSで挿入) */
.article-eyecatch {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 24px;
  display: block;
  max-height: 420px;
  object-fit: cover;
}

/* ----- Responsive ----- */
@media (max-width: 900px) {
  .case-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .col-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .site-nav ul {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    padding: 16px 20px 20px;
    box-shadow: var(--shadow-md);
  }

  .site-nav ul li {
    width: 100%;
  }

  .site-nav ul li a {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
  }

  .site-nav ul.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-content h1 {
    font-size: 1.4rem;
  }

  .hero-img {
    height: 280px;
  }

  .trust-bar-inner {
    gap: 20px;
  }

  .trust-num {
    font-size: 1.5rem;
  }

  .case-grid {
    grid-template-columns: 1fr;
  }

  .col-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 40px 0;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .contact-wrap {
    padding: 24px 16px;
  }

  .company-table th {
    width: 35%;
  }
}

/* archives Q&A */
.qa-8 dt {
  color: #0dacfe;
}

/* ===== SMP専用：案件一覧・コラムセクションのレイアウト変更 ===== */
@media (max-width: 640px) {
  /* ---- 共通：横スクロールカルーセルのベーススタイル ---- */
  #caselist .case-grid,
  #column .col-grid {
    display: flex !important;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    /* コンテナpaddingを打ち消して画面端まで広げる */
    margin-left: -20px;
    margin-right: -20px;
    padding: 4px 20px 14px;
  }

  /* スクロールバーを非表示 */
  #caselist .case-grid::-webkit-scrollbar,
  #column .col-grid::-webkit-scrollbar {
    display: none;
  }

  /* ---- 案件一覧：2枚表示＋3枚目わずかにのぞく ---- */
  /* カード幅 = (100vw - 左padding20px - gap12px - 右のぞき分28px) / 2 */
  #caselist .case-card {
    flex: 0 0 calc((100vw - 60px) / 2);
    scroll-snap-align: start;
  }

  /* 狭いカードに合わせてフォント・余白を調整 */
  #caselist .case-card .case-card-body {
    padding: 10px;
  }

  #caselist .case-card .case-card-thumb {
    height: 110px;
  }

  #caselist .case-card .case-title {
    font-size: 0.75rem;
    margin-bottom: 8px;
  }

  #caselist .case-card .case-data {
    font-size: 0.68rem;
  }

  #caselist .case-card .case-data tr td {
    padding: 2px 0;
  }

  #caselist .case-card .btn-case-detail {
    font-size: 0.72rem;
    padding: 6px 4px;
  }

  /* ---- 人気コラム：カード型カルーセル（1枚＋2枚目が半分見える） ---- */
  /* カード幅 = (100vw - 左padding20px - gap12px) × 2/3
     → 375px端末で約229px、スクロール位置で2枚目の半分が見える */
  #column .col-grid {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
  }

  #column a.col-card {
    flex: 0 0 61vw;
    flex-direction: column;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border-bottom: none;
    min-height: auto;
    scroll-snap-align: start;
    overflow: hidden;
  }

  #column .col-card-thumb {
    width: 100%;
    min-width: unset;
    height: auto;
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
    object-fit: cover;
  }

  #column .col-card-body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 0;
  }

  #column .col-cat-badges {
    margin-bottom: 5px;
  }

  #column .col-badge {
    font-size: 0.65rem;
    padding: 1px 6px;
  }

  #column .col-title {
    font-size: 0.8rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
  }
}

/* ===== スマホ：横並びボタン間の縦余白 ===== */
@media (max-width: 575px) {
  .btn.me-2 {
    margin-bottom: 10px;
  }
}
