@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;
}

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

:root {
  /* 最小 16px (1rem) 〜 最大 24px (1.5rem) の間で、画面幅に応じて滑らかに変化 */
  --side-padding: clamp(1rem, 0.167rem + 2.78vw, 1.5rem);
  --color-main: #001e3c;
  --color-accent: #007bff;
  --color-white: #ffffff;
  --color-font-bk: #333;
  --color-border-gy: #ccc;
  --color-bg-light: #f5f5f5;
  --gradient-light: linear-gradient(135deg, #f9f9f9 0%, #e0e0e0 100%);
  --gradient-dark: linear-gradient(135deg, #004a8d 0%, #001e3c 25%, #00050a 100%);
}

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

h1 {
  font-size: clamp(1.75rem, 2.78vw + 0.92rem, 2.25rem);
  line-height: 1.3;
}

h2 {
  font-size: clamp(1.5rem, 1.39vw + 1.08rem, 1.75rem);
  line-height: 1.4;
}

h3 {
  font-size: clamp(1.25rem, 0.69vw + 1.04rem, 1.375rem);
  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: all 0.3s ease;
  -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;
}

/* 1. 基本のセクション（白背景） */
.l-section {
  padding-block: clamp(3.75rem, 8vw, 6.25rem);
}

/* 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, 5vw, 5rem);
}

/* 3. 白背景が連続する場合だけ、上を消す */
.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);
}

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

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

.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;
}

/* バーガー用、チェック隠しと下はJS用 */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

body.menu-open {
  overflow: hidden;
}

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

.header-inner {
  height: 100%;
  position: relative;
  /* ← 将来事故防止 */
}

.logo a {
  display: flex;
  /* 画像の上下の余計な隙間を消す */
  align-items: center;
}

.logo img {
  /* 480px以下で30px、1080px以上で40px、その間は可変 */
  height: clamp(30px, 1.6vw + 22px, 40px);
  width: auto;

  /* 画像がボヤけるのを防ぎ、アスペクト比を維持 */
  aspect-ratio: 240 / 40;
  object-fit: contain;
}

/* header固定分の余白 今回90px */
.l-main {
  padding-top: 90px;
}

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

.menu ul {
  display: flex;
  gap: 5px;
}

.menu a {
  display: block;
  line-height: 1.4;
  font-weight: bold;
  padding: 10px 5px;
  color: var(--color-main);
}

.current {
  position: relative;
  display: inline-block;
  /* 線の幅を文字に合わせる */
}

.current::after {
  content: "";
  position: absolute;
  bottom: 2px;
  /* 文字のすぐ下に配置 */
  left: 0;
  width: 100%;
  height: 0;
  border-bottom: 2px solid var(--color-main);
  opacity: 0.5;
}

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

.site-footer {
  background: var(--gradient-dark);
  color: var(--color-white);
  padding: 40px 0 20px;
}

.footer-inner {
  display: flex;
  justify-content: center;
  /* 全体を中央寄せ */
}

/* 内部のコンテンツを包む箱（左揃えの基準） */
.footer-container {
  text-align: center;
  display: inline-block;
  /* 中身の幅に合わせる */
}

/* ロゴ */
.footer-logo {
  text-align: center;
  /* 中身のimgを中央に寄せる */
  margin-bottom: 30px;
}

.footer-logo img {
  display: inline-block;
  /* text-alignを効かせるため */
  height: auto;
  filter: brightness(0) invert(1);
  /* ロゴが黒い場合、白抜きにする指定 */
}

/* ナビゲーション（> を付けるスタイル） */
.footer-nav {
  margin-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
  padding-bottom: 15px;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  /* スマホで折り返すように */
}

.footer-nav li {
  margin-right: 25px;
}

.footer-nav a {
  display: inline-block;
  /* paddingを効かせるため */
  padding-block: 5px;
  /* 上下に5pxずつ余白を作って、クリック範囲を広げる */
  color: var(--color-white);
  font-weight: bold;
}

.footer-nav a::before {
  content: "> ";
  margin-right: 5px;
}

/* 連絡先エリア */
.company-name {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.address,
.tel-fax,
.license {
  margin-bottom: 0.5rem;
}

.tel-fax {
  font-size: 1.25rem;
}

.tel {
  margin-right: 0.5rem;
}

.copyright {
  text-align: center;
  font-size: 0.875rem;
  margin-top: 40px;
}

/* ボタンの基本スタイル */
.to-top {
  position: fixed;
  right: 25px;
  bottom: 25px;
  width: 50px;
  height: 50px;
  background-color: #0078d4;
  /* フッターカラーにより変える */
  color: #fff;
  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;
  /* 200pxスクロールで出始め、500pxで完全に表示 */
}

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

/* 表示用のアニメーション */
@keyframes fade-in-scroll {
  to {
    opacity: 1;
    visibility: visible;
  }
}

/* --- 1. 基本のデザイン（スマホ・PC共通） --- */
.to-top {
  /* 既存の設定（position, background等）はそのまま */
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s, transform 0.3s, opacity 0.3s, visibility 0.3s;
}

/* --- 2. PC専用のホバー演出（any-hover: hoverで包む） --- */
@media (any-hover: hover) {
  .to-top:hover {
    background-color: #2c5d91;
    transform: translateY(-5px);
  }

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

/* --- 3. スマホ・PC共通のタップ反応（active） --- */
.to-top:active {
  opacity: 0.8;
  transform: scale(0.95);
  /* タップした瞬間は「凹む」動き */
  background-color: #2c5d91;
  /* 押した感が出るように色も変える */
  transition: none;
  /* 指を離したらすぐに元のサイズに戻す */
}


/* ===== 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;
  }

  /* ハンバーガー */
  .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+.menu-icon span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
  }

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

  #menu-toggle:checked+.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;
    width: 100%;
    text-align: center;
  }

  .menu a {
    padding-block: 20px;
    border-bottom: 1px solid #ccc;
  }

  /* スマホの時はアンダーラインを消す */
  .current::after {
    display: none;
  }

  .footer-nav li {
    width: 50%;
    /* スマホでは2列に並べる */
    margin-right: 0;
    margin-bottom: 10px;
  }

  .footer-logo {
    margin-bottom: 20px;
  }
}

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

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

  .overlay {
    top: 60px;
  }

  .menu {
    top: 60px;
  }

  /* --- フッター --- */
  .footer-nav li {
    width: 100%;
    /* スマホでは1列に。リンク同士の間隔を確保 */
    text-align: center;
  }

  .footer-nav a {
    display: block;
    /* PC版がinline-block、スマホではblockに変える */
    padding-block: 10px;
  }

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

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