@charset "utf-8";

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
  padding: 0;
  list-style: none;
}

* {
  box-sizing: border-box;
}

:root {
  --side-padding: clamp(1rem, 0.167rem + 2.78vw, 1.5rem);
  --scroll-offset: 120px;
  --color-main: #001e3c;
  --color-accent: #007bff;
  --color-white: #ffffff;
  --color-font-bk: #333;
  --color-font-red: #d32f2f;
  --color-border-gy: #ccc;
  --color-bg-light: #f5f5f5;
  --color-bg-more-light: #fcfcfc;
  --color-bg: #f2ece8;
  --gradient-light: linear-gradient(135deg, #f9f9f9 0%, #e0e0e0 100%);
  --gradient-dark: linear-gradient(135deg, #004a8d 0%, #001e3c 25%, #00050a 100%);
  --gradient-current: linear-gradient(135deg, #7b94e0 0%, #2e438e 25%, #1a2a66 100%);
}

@media screen and (max-width: 768px) {
  :root {
    --scroll-offset: 80px;
  }
}

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

[id] {
  scroll-margin-top: var(--scroll-offset);
}

body {
  font-size: 1rem;
  line-height: 1.75;
  font-family: YuGothic, "Yu Gothic", "游ゴシック", "游ゴシック体", sans-serif;
  font-weight: 500;
  color: var(--color-font-bk);
  background-color: var(--color-white);
}

h1 {
  font-size: clamp(1.75rem, 1.125rem + 2.08vw, 2.125rem);
  line-height: 1.3;
}

h2 {
  font-size: clamp(1.25rem, 0.417rem + 2.78vw, 1.75rem);
  line-height: 1.4;
}

h3 {
  font-size: clamp(1.125rem, 0.917rem + 0.69vw, 1.25rem);
  line-height: 1.5;
}

h4 {
  font-size: 1.125rem;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: bottom;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease-out, opacity 0.3s ease-out, background-color 0.3s ease-out;
  -webkit-tap-highlight-color: transparent;
}

button {
  -webkit-tap-highlight-color: transparent;
}

@media(any-hover: hover) {
  body a:hover {
    color: var(--color-accent);
  }
}

address {
  font-style: normal;
}

input,
button,
textarea {
  -webkit-appearance: none;
  border-radius: 0;
}

input,
textarea {
  font-size: 16px;
}

.l-section {
  padding-block: clamp(2.5rem, -1.667rem + 13.89vw, 5rem);
}

/* 2. 背景色があるセクション（クラスを繋げて記述して優先度を上げる） */
.l-section.is-bg-color {
  /* ←ここを繋げる！htmlは必ず半角スペース開ける<section class="l-section is-bg-color"> ... </section> */
  background-color: var(--color-bg-light);
  padding-block: clamp(2.5rem, -1.667rem + 13.89vw, 5rem);
}

.l-section:not(.is-bg-color)+.l-section:not(.is-bg-color) {
  padding-top: 0;
}

.l-inner {
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: var(--side-padding);
  width: 100%;
  /* 念のため追加しておくと安定 */
}

.l-inner--960 {
  max-width: 960px;
  margin-inline: auto;
}

.l-inner--800 {
  max-width: 800px;
  margin-inline: auto;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.flex-between {
  display: flex;
  justify-content: space-between;
}

.items-center {
  align-items: center;
}

/* --- 共通：カードレイアウト用グリッド --- */
.c-grid {
  display: grid;
  /* 変数が無くても320pxで動くように直接指定を優先させます */
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 40px 24px;
  justify-content: center;
}

/* --- 共通：カード単体のスタイル --- */
.c-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-width: 400px;
  /* 巨大化防止 */
  margin-inline: auto;
  /* text-decoration: none; リンクとして使う場合のため */
  color: inherit;
  border: 1px solid var(--color-border-gy);
  /* 線を追加 */
  background: var(--color-white);
  padding: 0;
  /* 画像を端までくっつけるなら0 */
  overflow: hidden;
  transition: all 0.3s ease;
}

@media(any-hover: hover) {
  .c-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-color: var(--color-main);
  }
}

.c-card__image {
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #eee;
  /* 画像がない時の保険 */
}

.c-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.c-card__content {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  text-align: center;
  flex-grow: 1;
  /* 内容が少なくてもカードの下端を揃える高さを揃えるために必須 */
}

.c-card__title {
  font-size: clamp(1.15rem, 0.917rem + 0.69vw, 1.25rem);
  margin-bottom: 1.25rem;
  font-weight: bold;
  border-bottom: 2px solid var(--color-main);
  /* 実績ページ風の線を共通化してもOK */
  display: inline-block;
  padding-bottom: 5px;
}

.c-card__text {
  text-align: left;
  padding-inline: 6px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* header固定分に合わせる */
.l-main {
  padding-top: 110px;
}

/* header固定　高さ110px */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 110px;
  background: var(--color-white);
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.header-inner {
  max-width: 1280px;
  height: 100%;
  margin-inline: auto;
  padding-inline: var(--side-padding);
  position: relative;
  /* ← 将来事故防止 */
}

.header-top {
  padding-top: 20px;
  padding-bottom: 10px;
}

/* ロゴとキャッチコピーを並べるためのラッパー */
/* ロゴ・線付きコピー・社名を横一列に並べる */
.header__brand {
  display: flex;
  align-items: flex-end;
  gap: 0;
  /* 線と文字の距離はpaddingで制御するため0にします */
}

/* キャッチコピー：左右に線を引く */
.header__tagline {
  /* 左右にボーダーを配置 */
  border-inline: 1px solid var(--color-border-gy);
  /* 線の内側の余白 */
  padding: 0 1rem;
  /* ロゴおよび社名との外側の余白 */
  margin: 0 1rem;
}

.logo {
  flex-shrink: 0;
  /* ロゴが潰れないように固定 */
}

.logo a {
  display: flex;
  align-items: center;
}

.logo img {
  /* 480px以下で32px、1280px以上で40px、その間は可変 */
  height: clamp(2rem, 1.167rem + 2.78vw, 2.5rem);
  width: auto;
  /* 画像がボヤけるのを防ぎ、アスペクト比を維持 */
  aspect-ratio: 200 / 40;
  object-fit: contain;
}

body.menu-open {
  overflow: hidden;
}

/* PCメニュー、初期化で必要 */
.menu {
  position: static;
}

.menu ul {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1.5rem;
}

.menu li {
  position: relative;
  line-height: 30px;
}

.menu li a {
  display: block;
  font-weight: bold;
}

/* --- カレント表示（アンダーライン）のデザイン --- */
.current a {
  position: relative;
}

.current a::after {
  content: "";
  position: absolute;
  bottom: 0px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-font-bk);
}

/* ハンバーガー非表示 */
.menu-icon,
.overlay {
  display: none;
}

.site-footer {
  background: var(--gradient-dark);
  color: var(--color-white);
  padding-top: 30px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 0.6fr 1.4fr;
  /* 左・右の比率調整 */
  gap: clamp(1.25rem, -1.827rem + 6.41vw, 2.5rem);
  /* 40px～20px */
  align-items: center;
}

/* 左：ロゴ・住所 */
.footer-left {
  text-align: center;
}

.site-footer .logo {
  display: inline-block;
  text-align: left;
  margin-bottom: 1ren;
}

.site-footer .logo img {
  height: clamp(1.75rem, 1.25rem + 1.67vw, 2.25rem);
  filter: brightness(0) invert(1);
  /* ロゴが黒い場合、白抜きにする指定 */
}

.company-name {
  font-weight: bold;
}


/* フッターナビゲーションの基本設定 */
.footer-nav-grid {
  display: grid;
  /* 通常時（PC）：3列 */
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.footer-nav-grid a::before {
  content: "> ";
  color: inherit;
}

.footer-nav-grid li a {
  display: block;
  font-weight: bold;
  padding-block: 4px;
  color: var(--color-white);
}

@media (any-hover: hover) {
  .footer-nav-grid li a:hover {
    color: var(--color-accent);
  }
}

.footer-nav-grid li a:active {
  opacity: 0.7;
  transition: none;
}

.copyright {
  color: var(--color-white);
  padding-bottom: 0.5rem;
  text-align: center;
  font-size: 0.875rem;
  margin-top: 30px;
}

/* ボタンの基本スタイル */
.to-top {
  position: fixed;
  right: 25px;
  bottom: 25px;
  width: 50px;
  height: 50px;
  background-color: #0078d4;
  /* フッターカラーにより変える */
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1100;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: background-color 0.3s, transform 0.3s, opacity 0.3s, visibility 0.3s;
  /* --- 途中から表示させる（CSS Scroll-driven Animations） --- */
  opacity: 0;
  visibility: hidden;
  /* サファリが対応したら下記適用その１
  animation: fade-in-scroll linear forwards;
  animation-timeline: scroll();
  animation-range: 200px 500px; */
}

.to-top.is-show {
  opacity: 1;
  visibility: visible;
}

/* 矢印アイコン（SVG）のサイズ調整 */
.to-top svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

/* サファリが対応したら下記適用、表示用のアニメーションその２
@keyframes fade-in-scroll {
  to {
    opacity: 1;
    visibility: visible;
  }
} */

/* ホバー時の演出：少し浮き上がり、矢印がピョコっと動く */
@media (any-hover: hover) {
  .to-top:hover {
    background-color: #2c5d91;
    transform: translateY(-5px);
  }

  .to-top:hover svg {
    transform: translateY(-2px);
  }
}

.to-top:active {
  opacity: 0.8;
  transition: none;
}



/* ============================================================
   Utility Classes (u-)
   ============================================================ */

/* テキスト配置 */
.u-text-center {
  text-align: center !important;
}

.u-text-left {
  text-align: left !important;
}

.u-text-right {
  text-align: right !important;
}

/* 余白（下方向：Margin Bottom） */
.u-mb-0 {
  margin-bottom: 0 !important;
}

.u-mb-10 {
  margin-bottom: 10px !important;
}

.u-mb-20 {
  margin-bottom: 20px !important;
}

.u-mb-30 {
  margin-bottom: 30px !important;
}

.u-mb-40 {
  margin-bottom: 40px !important;
}

.u-mb-50 {
  margin-bottom: 50px !important;
}

/* 余白（上方向：Margin Top） */
.u-mt-10 {
  margin-top: 10px !important;
}

.u-mt-20 {
  margin-top: 20px !important;
}


/* ===== SP表示 =====ヘッダー70px、パディング同値で */
@media screen and (max-width: 768px) {
  .tel-link {
    color: inherit !important;
    text-decoration: none !important;
  }

  .site-header {
    height: 70px;
  }

  .l-main {
    padding-top: 70px;
  }

  .header__tagline,
  .header__company-name {
    display: none;
  }

  /* ハンバーガー */
  .menu-icon {
    display: inline-block;
    width: 40px;
    height: 40px;
    cursor: pointer;
    /* z-index: 1002; */
    z-index: 130;
    touch-action: manipulation;
    /* iOS用 */
  }

  .menu-icon span {
    display: block;
    height: 4px;
    margin: 6px 0;
    background: #333;
    border-radius: 2px;
    transition: 0.4s;
  }

  /* 三本線のアニメーション（直後の兄弟ではないので ~ を使用） */
  #menu-toggle:checked~.header-top .menu-icon span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
  }

  #menu-toggle:checked~.header-top .menu-icon span:nth-child(2) {
    opacity: 0;
  }

  #menu-toggle:checked~.header-top .menu-icon span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
  }

  /* overlay、高さtopヘッダーに合わせる */
  .overlay {
    display: block;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    /* inset: 0; */
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: 0.4s;
    /* z-index: 1000; */
    z-index: 110;
  }

  #menu-toggle:checked~.overlay {
    opacity: 1;
    pointer-events: auto;
  }

  /* スライドメニュー */
  .menu {
    position: fixed;
    top: 70px;
    /* headerの高さ分下げる */
    right: 0;
    bottom: 0;
    width: 250px;
    background: var(--color-white);
    transform: translateX(100%);
    transition: transform 0.4s ease;
    /* z-index: 1001; */
    z-index: 120;
  }

  #menu-toggle:checked~.menu {
    transform: translateX(0);
  }

  .menu ul {
    display: block;
    padding: 20px 0 40px;
  }

  /* bottom: 0;は入れておく（親の影響防止） */
  .menu li {
    margin-bottom: 0;
    flex: none;
    /* PCの flex: 1 0 0 を解除 */
    max-width: none;
    /* 180px制限を解除して横幅いっぱいに */
    min-width: 0;
    /* 念のため最小幅もリセット */
    white-space: normal;
    /* 文字が長い場合は改行を許可する（スマホでは重要） */
    overflow: visible;
    /* 省略表示を解除 */
    width: 100%;
    text-align: center;
    border: none;
  }

  .menu li:last-child {
    border-right: none;
  }

  .menu li a {
    display: block;
    width: 100%;
    padding-block: 20px;
    border-bottom: 1px solid var(--color-border-gy);
    /* text-overflow: clip;  省略記号を消す */
  }

  .current a::after {
    display: none;
    /* 要素そのものを非表示にする */
  }

  .footer-inner {
    display: flex;
    flex-direction: column;
    /* ↓ここを center にすることで、中身のブロックを中央に */
    align-items: center;
    /* gap: 40px; */
    text-align: center;
    /* ナビなどの全体の並びも中央寄りにする場合 */
  }

  .footer-nav-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px 30px;
    width: fit-content;
    /* 中身の幅に合わせる */
    margin: 0 auto;
    /* 全体を中央に寄せる */
    text-align: left;
    /* 文字自体は左揃え */
  }



}

@media screen and (max-width: 480px) {
  .site-header {
    height: 60px;
  }

  .l-main {
    padding-top: 60px;
  }

  .header-top {
    padding-block: 10px;
  }

  .overlay {
    top: 60px;
  }

  .menu {
    top: 60px;
  }

  /* --- フッター --- */
  .footer-nav-grid {
    grid-template-columns: 1fr;
  }

  .footer-nav-grid a {
    width: 100%;
    /* 念のため幅100%を明示 */
  }

  .tel,
  .fax {
    display: block;
    /* 電話とFAXを縦に並べて */
    margin-bottom: 0.5rem;
  }

  .to-top {
    right: 15px;
    bottom: 15px;
    width: 45px;
    height: 45px;
  }
}