/* ===============================
   common.css：全ページ共通スタイル
   =============================== */

/* --- ベースリセット --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px; /* PC基準 */
}

body {
  background: linear-gradient(to right, #e6f3ff 0%, #ffffff 50%, #e6f3ff 100%);
  background-attachment: fixed;
  color: #001348;
  font-family: 'Yu Mincho', 'Hiragino Mincho ProN', serif;
}

/* --- HEROセクション（Flexboxで中央寄せ） --- */
.hero {
  height: calc(100vh - 90px);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  position: relative;
  display: flex;
  align-items: center;     /* 縦中央 */
  justify-content: center; /* 横中央 */
  color: white;
  text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.8);
}

.hero-text {
  position: static !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 2rem 3rem;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  font-weight: 600;
  text-align: center;
}

.hero-text h1,
.hero-text p {
  text-shadow:
    -1px -1px 2px rgba(0, 0, 0, 0.85),
     1px -1px 2px rgba(0, 0, 0, 0.85),
    -1px  1px 2px rgba(0, 0, 0, 0.85),
     1px  1px 2px rgba(0, 0, 0, 0.85);
  color: #ffffff;
}

/* h1 のサイズ調整 */
.hero-text h1 { font-size: 2.4rem; }
/* p のサイズ調整 */
.hero-text p { font-size: 1.2rem; }

/* 下矢印など（任意） */
.scroll-down {
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  z-index: 10;
  animation: bounce 2s infinite;
}

.scroll-down span {
  font-size: 2rem;
  margin: 0 0 -40px 0;
  padding: 0;
  line-height: 1;
  color: white;
  opacity: 0.85;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.8);
}

.scroll-down a {
  font-size: 7rem;
  margin: 0;
  padding: 0;
  color: white;
  opacity: 0.85;
  text-decoration: none;
  transition: opacity 0.3s;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
}
.scroll-down a:hover { opacity: 1; }

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); }
  40% { transform: translate(-50%, -10px); }
  60% { transform: translate(-50%, -5px); }
}

/* スクロール時にボタンをふわっと表示するためのクラス */
.scroll-fade {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.scroll-fade.visible {
  opacity: 1;
  pointer-events: auto;
}

/* スクロール先ターゲット調整 */
#some-target { scroll-margin-top: 120px; }

/* コンテナ幅 */
.container {
  width: 80%;
  max-width: 90%;
  padding: 4rem 2rem 120px; /* 下部余白込み */
  margin: 0 auto;
}

/* --- ヘッダー＆ナビゲーション --- */
.site-header {
  background-color: #001348;
  color: #fff;
  padding: 20px 40px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 1000;
  font-family: 'Yu Mincho', 'Hiragino Mincho ProN', serif;
  width: 100%;
}

.header-inner {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  height: 80px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: nowrap;
  justify-content: center;  /* ナビを中央寄せ */
}

.header-right { flex: 1 0 0%; }

.site-logo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 0 0 auto;
  text-align: left;
  margin-right: 0;
  white-space: nowrap;
}

.logo-jp {
  font-size: 1.2rem;
  font-weight: bold;
  letter-spacing: 0.5px;
  margin: 0;
  padding: 0;
  line-height: 1.2;
  white-space: nowrap;
}

.logo-en {
  font-size: 0.8rem;
  opacity: 0.75;
  margin-top: 2px;
  line-height: 1.2;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  flex-wrap: nowrap;   /* 折返し禁止 */
  white-space: nowrap; /* 折返し禁止 */
}

.nav-item { text-align: center; white-space: nowrap; }

.nav-item a {
  display: block;
  color: #fff;
  font-size: 0.8rem !important;
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

.nav-item a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: #5fa8ff;
  transition: width 0.3s ease, left 0.3s ease;
}

.nav-item a:hover { color: #5fa8ff; }
.nav-item a:hover::after { width: 100%; left: 0; }

.nav-label {
  display: block;
  font-size: 0.6rem !important;
  color: #ccc;
  text-align: center;
}

/* デフォルトではハンバーガーを非表示（PC） */
.hamburger { display: none; }

/* --- フッター --- */
.footer {
  background-color: #001348;
  color: #fff;
  padding: 60px 20px;
  font-family: 'Yu Mincho', 'Hiragino Mincho ProN', serif;
}

.footer-content { max-width: 1000px; margin: 0 auto; text-align: center; }

.footer-nav {
  margin: 30px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.footer-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #fff;
  transition: color 0.3s ease, background-color 0.3s ease;
  padding: 8px 12px;
  border-radius: 4px;
}
.footer-nav a:hover { background-color: rgba(255, 255, 255, 0.08); }

.footer-nav .nav-main {
  font-size: 16px;
  font-weight: 500;
  position: relative;
  letter-spacing: 0.5px;
}

.footer-nav .nav-main::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: #5fa8ff;
  transition: width 0.3s ease, left 0.3s ease;
}

.footer-nav a:hover .nav-main { color: #5fa8ff; }
.footer-nav a:hover .nav-main::after { width: 100%; left: 0; }

/* 英語部分(nav-label)も hover 時に色変更 */
.footer-nav a:hover .nav-label { color: #5fa8ff; }

.footer-nav .nav-label {
  font-size: 13px;
  color: #ccc;
  margin-top: 4px;
  opacity: 0.8;
}

.footer-copy { margin-top: 20px; font-size: 12px; opacity: 0.5; }

/* --- セクション共通 --- */
.section { margin-bottom: 5rem; }

.section h2 {
  font-size: 1.8rem;
  color: #2D8CFF;
  text-align: center;
  margin-bottom: 2rem;
  border-bottom: 2px solid #2D8CFF;
  padding-bottom: 0.5rem;
  position: relative;
}
.section h2::after { content: ''; display: none; }

.card-button { margin-top: 1rem; text-align: center; }

.card-box {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  padding: 2rem 1.5rem;
  max-width: 700px;
  width: 90%;
  margin: 0 auto 2rem auto;
}

/* --- フローティングナビ --- */
.floating-nav {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
}
.floating-nav a img {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.floating-nav a img:hover { transform: scale(1.1); opacity: 0.9; }

/* --- AOSアニメーション補助 --- */
[data-aos] {
  opacity: 0;
  transform: translateY(30px);
  transition-property: opacity, transform;
  transition-duration: 1.5s;
  transition-timing-function: ease-out;
}
[data-aos].aos-animate {
  opacity: 1;
  transform: translateY(0);
}

/* ===============================
   ▼ レスポンシブ調整を追加 ▼
   =============================== */

/* タブレット＆スマホ共通 */
@media (max-width: 768px) {
  body { font-size: 14px; overflow-x: hidden; }

  .container { width: 95%; padding: 2rem 1rem; }

  /* HERO */
  .hero {
    height: auto;
    min-height: 60vh;
    padding: 2rem 1rem;
    text-align: center;
  }
  .hero-text h1 { font-size: 1.6rem; }
  .hero-text p { font-size: 1rem; }

  /* ナビゲーション（モバイルは隠して、openで表示） */
  .site-nav {
    display: none;
    flex-direction: column;
    background: #001348;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    padding: 1rem 0;
  }
  .site-nav.open { display: flex; }

  /* ハンバーガー表示（モバイルのみ） */
  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
  }
  .hamburger span {
    width: 25px;
    height: 3px;
    background: #fff;
  }

  /* フッター */
  .footer {
    padding: 2rem 1rem;
    font-size: 0.85rem;
    text-align: center;
  }
}

/* スマホ小画面 */
@media (max-width: 480px) {
  .hero-text h1 { font-size: 1.3rem; }
  .hero-text p { font-size: 0.9rem; }
  .site-nav a { font-size: 0.85rem; }
}

/* ===== スマホのみフローティングナビを非表示 (～767px) ===== */
@media (max-width: 767px) {
  .floating-nav { display: none !important; }
}

/* スマホのみ HERO の位置をヘッダー直下に変更 */
@media (max-width: 767px) {
  .hero {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* 上詰め */
    align-items: center;
    padding-top: 0;
    margin-top: 0;
  }
  .hero .hero-text {
    margin-top: 0;               /* ヘッダーすぐ下 */
    text-align: center;
  }
  .hero .hero-text h1 {
    font-size: 1.4rem;
    line-height: 1.4;
  }
}
/* ===== 事業内容カードを常に中央揃え ===== */
.business-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;   /* 横方向を中央に */
  align-items: flex-start;   /* 上揃えで整列 */
  gap: 24px;                 /* カード同士の余白 */
  margin: 0 auto;
  max-width: 1200px;         /* 必要に応じて制御 */
}

/* 各カードの基本幅 */
.business-cards .card {
  flex: 0 1 300px;           /* 最小幅300pxで縮小可 */
  max-width: 320px;
  text-align: center;        /* 中央寄せ */
}

/* スマホでも中央揃えで縦並び */
@media (max-width: 767px) {
  .business-cards {
    flex-direction: column;
    align-items: center;
  }
  .business-cards .card {
    width: 90%;              /* スマホは画面幅に合わせる */
    max-width: 400px;
  }
}
@media (max-width:768px){
  .site-nav{display:none !important;}
  .site-nav.open{display:flex !important; z-index:10000;}
}
