/* =========================================================
   JP Site Base Theme (Cleaned & Consolidated)
   - 共通変数 / タイポ / ヒーロー / カード / ニュース
   - ※ 2025-10: 重複・競合スタイル整理版
   ========================================================= */

/* ---------- :root（変数を1箇所に統合） ---------- */
:root {
  /* Typography size/scale */
  --fz-base: clamp(15.5px, 1.1vw, 17px);
  --lh-base: 1.75;
  --fz-h1: clamp(28px, 4.2vw, 40px);
  --fz-h2: clamp(22px, 3.0vw, 30px);
  --fz-h3: clamp(18px, 2.2vw, 22px);

  /* Color system */
  --c-primary: #0d6efd;        /* Bootstrap primary に合わせる */
  --c-primary-weak: #eaf2ff;
  --c-text: #1f2226;
  --c-muted: #6b7280;
  --c-heading: #121317;
  --surface: #ffffff;
  --surface-2: #f5f7fb;

  /* Shape / shadow */
  --radius: 16px;              /* 統一角丸 */
  --shadow: 0 6px 24px rgba(17, 24, 39, .08);
  --shadow-md: 0 8px 32px rgba(17,24,39,.10);
}

/* =========================================================
   Typography
   ========================================================= */
html, body {
  font-family: "Noto Sans JP", "Noto Sans KR",
               "Hiragino Kaku Gothic ProN", "Hiragino Sans",
               "Yu Gothic UI", "Yu Gothic", "Meiryo",
               system-ui, -apple-system, sans-serif;
  font-size: var(--fz-base);
  line-height: var(--lh-base);
  color: var(--c-text);
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  font-feature-settings: "palt" 1; /* 日本語プロポーショナル（対応フォントのみ） */
  letter-spacing: 0.01em;
  background-color: #fafbfc;
}

h1, .h1, h2, .h2, h3, .h3 {
  font-family: "Inter", "Noto Sans JP", "Noto Sans KR", sans-serif;
  color: var(--c-heading);
  letter-spacing: 0.005em;
  line-height: 1.25;
  font-weight: 700;
  margin-bottom: 0.6em;
}
h1, .h1 { font-size: var(--fz-h1); }
h2, .h2 { font-size: var(--fz-h2); }
h3, .h3 { font-size: var(--fz-h3); }

.section-lead, .lead { color: var(--c-muted); max-width: 72ch; }

/* =========================================================
   Links / Buttons / Navbar
   ========================================================= */
a { color: var(--c-primary); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

.btn {
  border-radius: 999px;  /* pill */
  padding: .6rem 1.1rem;
  font-family: "Inter", "Noto Sans JP", "Noto Sans KR", system-ui, sans-serif;
  font-weight: 500;
}
.btn-primary {
  background-color: var(--c-primary);
  border-color: var(--c-primary);
  box-shadow: 0 4px 14px rgba(13,110,253,.25);
}
.btn-outline-primary { color: var(--c-primary); border-color: var(--c-primary); }
.btn-outline-primary:hover { background-color: var(--c-primary); border-color: var(--c-primary); }

.btn-outline-secondary { border-color: #d1d5db; color: #374151; }
.btn-outline-secondary:hover { background: #eef1f5; }

.navbar, .breadcrumb, .card-title, .nav-link {
  font-family: "Inter", "Noto Sans JP", "Noto Sans KR", system-ui, sans-serif;
  letter-spacing: 0.01em;
  font-weight: 500;
}

.brand-text { font-size: 1.3rem;   margin-top: 50px; }
.nav-item { font-size: 1.0rem;   margin-top: 10px;}

.brand-text {
  color: rgba(0, 0, 0, 0.8);
  transition: color 0.2s ease-in;
  font-weight: 700;
}

.navbar-brand:hover .brand-text {
  color: rgba(0, 0, 0, 0.6);
}

.navbar-light .navbar-nav .nav-link {
  color: #222222 !important;
  transition: color 0.2s ease;
}

.navbar-light .navbar-nav .nav-link:hover {
  color: #0d6efd !important;
}

/* ニュースタブの余白・カーソル */
#news-tabs .nav-link { cursor: pointer; }

/* =========================================================
   Cards / Sections / Lists
   ========================================================= */
.card {
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card .card-title { margin-bottom: .25rem; }

.section {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(16px, 3.2vw, 32px);
}

.list-group-item { padding: 1rem 1.1rem; transition: background-color .15s ease; }
.list-group-item:hover { background: rgba(0,0,0,.02); }

.badge.text-bg-primary { background-color: var(--c-primary) !important; }
.badge.text-bg-dark    { background-color: #111827 !important; }

/* =========================================================
   Forms
   ========================================================= */
.form-label { font-weight: 600; }
.form-control {
  border-radius: 12px;
  border-color: #d1d5db;
}
.form-control:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 .25rem rgba(13,110,253,.15);
}

/* =========================================================
   Hero (image via <picture><img class="hero-img">)
   ※ 画像は CSS 背景ではなく <img> として配置を推奨
   ========================================================= */
.hero {
  position: relative;
  border-radius: clamp(12px, 2vw, 20px);
  overflow: hidden;
  background:
    linear-gradient(180deg, #fff, #f6f8fd 75%),
    radial-gradient(1200px 420px at 8% -10%, rgba(13,110,253,.12), transparent 60%);
  box-shadow: var(--shadow-md);
}
.hero .hero-img {
  display: block;
  width: 100%;
  height: clamp(500px, 42vw, 700px);
  object-fit: cover;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(0deg, rgba(0,0,0,.1), rgba(0,0,0,0) 100%),
    linear-gradient(180deg, rgba(255,255,255,0) 90%, rgba(246,248,253,1) 100%);
  pointer-events: none;
}
.hero .hero-content {
  position: absolute; inset: 0;
  display: grid; place-content: end center;
  padding: clamp(16px, 4vw, 48px);
  color: #fff;
}
.hero .hero-content .lead { color: rgba(255,255,255,.9); }
.hero-content h1 {
  color: #1e3a8a; 
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
  font-weight: 800;
  margin-bottom: 0.2em;
}
.hero-content p {
  color: #1e3a8a; 
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.hero-img {
  filter: brightness(0.85); 
}
/* =========================================================
   Services (3本柱) / Case Studies / News items
   ========================================================= */
.service-card {
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: 0 10px 38px rgba(17,24,39,.14); }
.service-card .svc-media {
  height: clamp(160px, 20vw, 220px);
  background: var(--surface-2);
  overflow: hidden;
}
.service-card .svc-media img {
  width: 100%; height: 100%; object-fit: cover; transform: scale(1.02);
}
.service-card .card-body { padding: clamp(14px, 2.4vw, 20px); }
.service-card .card-title { color: var(--c-heading); font-weight: 700; }
.service-card .card-text  { color: var(--c-muted); }

.case-grid { display: grid; gap: 16px; }
@media (min-width: 768px) { .case-grid { grid-template-columns: repeat(3, 1fr); } }
.case-item {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  background: #000;
}
.case-item img { width:100%; height:100%; object-fit:cover; opacity:.9; transition: opacity .2s, transform .25s; }
.case-item:hover img { opacity:1; transform: scale(1.03); }
.case-item .case-caption {
  position:absolute; left:12px; bottom:12px;
  color:#fff; font-weight:600; text-shadow: 0 2px 6px rgba(0,0,0,.35);
}

/* News list with optional thumbs */
.news-item { display:flex; gap:14px; align-items:flex-start; padding:12px; border-radius:12px; }
.news-item:hover { background: rgba(0,0,0,.03); }
.news-thumb { width: 120px; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background:#f0f2f6; flex: none; }
.news-meta { color: var(--c-muted); font-size: .92em; }

/* =========================================================
   Accordeon / Footer / Images / Misc
   ========================================================= */
.accordion-button { font-weight: 600; }
.accordion-button:not(.collapsed) { background: #f3f6ff; color: #0b5ed7; }

footer, .footer { color: var(--c-muted); font-size: 0.95em; }
img { image-rendering: -webkit-optimize-contrast; }

/* ブランドロゴ（必要時に使用） */
.navbar-brand img { height: 70px; width:auto; image-rendering: -webkit-optimize-contrast;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: -10px;
  margin-bottom: -5px;
}
.navbar .container {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: -10px;
  margin-bottom: -10px;
}

.hr-soft {
  height: 1px;
  background: linear-gradient(90deg, rgba(0,0,0,.08), rgba(0,0,0,0));
  border: 0; margin: 16px 0 8px;
}

footer,
footer.bg-white,
footer.text-dark,
.footer {
  background-color: #187FC4 !important; 
  color: #ffffff !important; 
  border-top: none !important;
}


/* Utility */
.img-cover { width:100%; height:100%; object-fit:cover; }
.img-contain { width:100%; height:100%; object-fit:contain; }
.img-rounded { border-radius: var(--radius); }
.img-shadow { box-shadow: var(--shadow-md); }
.duotone { filter: saturate(.92) contrast(1.02); }
.grayscale-hover img { filter: grayscale(14%); transition: filter .2s; }
.grayscale-hover:hover img { filter: grayscale(0%); }


