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

html { 
  -webkit-text-size-adjust: 100%; 
  text-size-adjust: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;
  font-feature-settings: "palt" 1;
  line-height: 1.7;
  color: #222;
  background: #fff;
  scroll-behavior: smooth;
}

/* 可変タイポグラフィ：14px〜17px の間で流動 */
:root{
  --brand: #0C5BD6;
  --brand-dk: #0949ad;
  --text: #222;
  --muted: #666;
  --border: #e5e7eb;
  --bg-soft: #f7f8fa;

  --space-0: .25rem;
  --space-1: .5rem;
  --space-2: .75rem;
  --space-3: 1rem;
  --space-4: 1.25rem;
  --space-5: 1.5rem;
  --radius: 12px;
  --shadow: 0 6px 18px rgba(0,0,0,.06);
}

body{
  font-size: clamp(14px, 1.8vw, 17px);
  margin: 0;
}

/* 画像は全て流動化（既存の画像ナビ含む） */
img, svg, video{
  max-width: 100%;
  height: auto;
  display: block;
}

/* 共通ラッパー：スマホは左右16px、タブレット〜は中央寄せ */
.container{
  width: min(100%, 1100px);
  padding-inline: 16px;
  margin-inline: auto;
}

/* ========== Header / Global Nav（画像ボタン想定） ========== */
.site-header{
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .topbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) 0;
}
.site-logo{ width: 200px; }

/* 画像メニューを横スクロール可能なフレックスに */
.gnav{
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: var(--space-2) 0;
  scrollbar-width: thin;
}
.gnav a{
  flex: 0 0 auto;
  text-decoration: none;
  border-radius: var(--radius);
  outline-offset: 2px;
}
.gnav img{
  height: 40px;          /* 画像ナビの高さを統一（伸縮） */
  width: auto;
}

/* スクロールヒント（任意） */
.gnav::after{
  content: "";
  flex: 0 0 var(--space-2);
}

/* ========== Hero / メインビジュアル（画像スライド想定） ========== */
.hero{
  background: #000;
  color: #fff;
}
.hero .container{
  padding-block: var(--space-4);
}
.hero .image-navigation,
.hero .image-navigation *{ /* 旧プラグイン領域の最低限調整 */
  user-select: none;
}

/* ========== Typography ========== */
h1, h2, h3{
  line-height: 1.35;
  margin: 1.2em 0 .6em;
  letter-spacing: .02em;
}
h1{ font-size: clamp(20px, 5.4vw, 30px); }
h2{ font-size: clamp(18px, 4.6vw, 26px); border-left: 4px solid var(--brand); padding-left: .6em; }
h3{ font-size: clamp(16px, 4vw, 22px); }

/* パンくず */
.breadcrumb{
  font-size: .95em;
  color: var(--muted);
  margin: var(--space-2) 0 var(--space-3);
  display: flex;
  flex-wrap: wrap;
  gap: .4em;
}
.breadcrumb a{ color: var(--muted); text-decoration: none; }
.breadcrumb a:hover{ text-decoration: underline; }

/* 説明段落 */
.lead{ color: #333; font-size: clamp(15px, 2.4vw, 18px); }

/* ========== Sections / Cards ========== */
.section{
  padding-block: clamp(20px, 5vw, 48px);
  background: #fff;
}
.section.alt{ background: var(--bg-soft); }

.cards{
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
.card{
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card .body{ padding: var(--space-3); }
.card h3{ margin-top: 0; }

/* 2〜3カラム化（タブレット〜） */
@media (min-width: 640px){
  .cards{ grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px){
  .cards{ grid-template-columns: repeat(3, 1fr); }
}

/* ========== Tables（会社概要などの情報表） ========== */
.table{
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98em;
}
.table th,
.table td{
  border-bottom: 1px solid var(--border);
  padding: .7em .6em;
  vertical-align: top;
}
.table th{
  width: 30%;
  color: #111;
  text-wrap: balance;
  background: #fafafa;
}

/* ========== Forms（お問い合わせ） ========== */
.form{
  display: grid;
  gap: var(--space-3);
}
.form-row{
  display: grid;
  gap: .4rem;
}
.form-row label{
  font-weight: 600;
  font-size: .95em;
}
.form-row input[type="text"],
.form-row input[type="tel"],
.form-row input[type="email"],
.form-row textarea,
.form-row select{
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .7em .8em;
  background: #fff;
  font: inherit;
}
.form-row textarea{
  min-height: 9rem;
  resize: vertical;
}
.form-actions{
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.button{
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: .9em 1.4em;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.button:hover{ background: var(--brand-dk); }

/* 必須バッジ（任意） */
.badge-required{
  display: inline-block;
  margin-left: .4em;
  background: #ef4444;
  color: #fff;
  font-size: .78em;
  padding: .1em .5em;
  border-radius: 6px;
}

/* フォームの2列化（タブレット〜） */
@media (min-width: 768px){
  .form.two-col{
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
  }
  .form.two-col .form-row.full{ grid-column: 1 / -1; }
}

/* ========== Footer ========== */
.site-footer{
  margin-top: clamp(24px, 5vw, 56px);
  border-top: 1px solid var(--border);
  background: #fff;
}
.site-footer .container{
  padding-block: var(--space-4);
  color: var(--muted);
  font-size: .95em;
  display: grid;
  gap: var(--space-2);
}
.site-footer a{ color: var(--muted); text-decoration: none; }
.site-footer a:hover{ text-decoration: underline; }

/* ========== Utilities ========== */
.mt-0{ margin-top: 0 !important; }
.mb-0{ margin-bottom: 0 !important; }
.mx-auto{ margin-inline: auto !important; }
.text-center{ text-align: center !important; }
.fade{ opacity: .6; }

/* 画像ギャラリー（旧 imageNavigations と併用想定） */
.image-navigation{
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  isolation: isolate;
}
.image-navigation .inav-track{
  display: flex;
  gap: 0;
  transition: transform .4s ease;
  will-change: transform;
}
.image-navigation .inav-slide{
  flex: 0 0 100%;
}
.image-navigation .inav-slide img{
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* コントローラ */
.image-navigation .inav-prev,
.image-navigation .inav-next{
  position: absolute;
  inset-block: 0;
  width: 56px;
  display: grid;
  place-items: center;
  background: linear-gradient(to right, rgba(0,0,0,.35), transparent);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  user-select: none;
}
.image-navigation .inav-next{
  right: 0;
  left: auto;
  background: linear-gradient(to left, rgba(0,0,0,.35), transparent);
}
.image-navigation .inav-prev:focus-visible,
.image-navigation .inav-next:focus-visible{
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ドット */
.image-navigation .inav-dots{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 10px;
  display: flex;
  gap: 8px;
}
.image-navigation .inav-dot{
  width: 8px; height: 8px; border-radius: 999px;
  background: rgba(255,255,255,.55);
}
.image-navigation .inav-dot[aria-current="true"]{ background: #fff; }

/* 高さ比率（16:9）をCSSのみで確保したい場合のユーティリティ */
.aspect-16x9{ position: relative; }
.aspect-16x9::before{
  content:""; display:block; padding-top:56.25%;
}
.aspect-16x9 > *{
  position:absolute; inset:0;
}

/* ========== レスポンシブ強化 ========== */
/* タブレット以上でのヘッダーレイアウト最適化 */
@media (min-width: 768px){
  .site-header .topbar{ padding: var(--space-3) 0; }
  .site-logo{ width: 240px; }
  .gnav img{ height: 48px; }
}

/* デスクトップでのナビ固定幅・余白調整 */
@media (min-width: 1100px){
  .gnav{ justify-content: center; overflow-x: visible; }
}
