/* ======================
   Reset or Normalize CSS
====================== */
/* 必要に応じてreset.cssやnormalize.cssを適用 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


/* アニメーション用のキーフレーム定義 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* スクロールアニメーション用の基本クラス */
.scroll-fade {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.scroll-fade.active {
  opacity: 1;
  transform: translateY(0);
}

/* ======================
   Base Typography
====================== */
/* フォントの定義 */
@font-face {
  font-family: 'MOBO';
  src: url('../fonts/MOBO-SemiBold.otf') format('woff2'),
       url('../fonts/MOBO-Regular.otf') format('woff');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'MOBO';
  src: url('../fonts/MOBO-Bold.otf') format('woff2'),
       url('../fonts/MOBO-Bold.off') format('woff');
  font-weight: bold;
  font-style: normal;
}

/* 基本フォント設定 */
body {
  font-family: 'MOBO', sans-serif;
}

/* ヘッダーナビゲーション */
.global-nav {
  font-family: 'MOBO', sans-serif;
  font-weight: normal;
}

/* ヒーローセクション */
.hero-caption h1 {
  font-family: 'MOBO', sans-serif;
  font-weight: bold;
  font-size: 3.5rem;
}

.hero-caption p {
  font-family: 'MOBO', sans-serif;
  font-weight: normal;
  font-size: 1.5rem;
}

/* ドロップダウンメニュー */
.dropdown-menu {
  font-family: 'MOBO', sans-serif;
  font-weight: normal;
}

/* 各セクションの見出し */
h2 {
  font-family: 'MOBO', sans-serif;
  font-weight: bold;
  font-size: 2.5rem;
}

h3 {
  font-family: 'MOBO', sans-serif;
  font-weight: bold;
  font-size: 1.8rem;
}

/* 本文テキスト */
p {
  font-family: 'MOBO', sans-serif;
  font-weight: normal;
  line-height: 1.8;
  margin-bottom: 1.5em;
  white-space: normal; /* 改行を自動調整 */
  word-wrap: break-word; /* 長い単語の折り返し */
}

/* ======================
   Colors (Variables)
====================== */
:root {
  --primary-white: #FEFEFE;    /* 基本の白色 */
  --light-gray: #F5F5F5;       /* 明るめのグレー */
  --accent-color: #F45327;     /* アクセントカラー */
  --accent-color-hover: #FF724D; /* アクセントカラーのホバー状態 */
  --text-color: #333333;       /* 文字色 */
}

/* ======================
   Header
====================== */
/* ヘッダー基本スタイル */
.site-header {
  position: fixed;
  width: 100%;
  background-color: var(--primary-white);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 999;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem; /* 高さを増加 */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ナビゲーションメニュー */
.global-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.global-nav a {
  text-decoration: none;
  color: var(--text-color);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

.global-nav a:hover {
  color: var(--accent-color);
}

/* ドロップダウンメニュー */
.has-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;           /* 左端を親要素の中心に */
  transform: translateX(-50%) translateY(-10px); /* X軸方向に中央寄せ、Y軸方向に少し上に */
  background: var(--primary-white);
  min-width: 200px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  z-index: 1000;       /* 重なり順を確実に最前面に */
}

/* ホバー時の表示 */
.has-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0); /* X軸方向の中央寄せを維持 */
}

.dropdown-menu li {
  padding: 0;
}

.dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  white-space: nowrap;
}

/* ロゴ */
.logo {
  padding: 0.5rem 0;
}

.logo a {
  display: block;
  text-decoration: none;
}

.logo-image {
  height: 40px; /* ロゴの高さを適切なサイズに調整 */
  width: auto;
  vertical-align: middle;
}

/* ハンバーガーメニューボタン */
.hamburger-menu {
  display: none;
  background: none;
  border: none;
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  padding: 0;
}

.hamburger-menu span {
  display: block;
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: var(--text-color);
  transition: all 0.4s ease;
}

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-menu span:nth-child(3) { bottom: 0; }

/* ハンバーガーメニューアクティブ時 */
.hamburger-menu.active span:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .hamburger-menu {
    display: block;
    z-index: 1001;
  }

  .global-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background-color: var(--primary-white);
    padding: 80px 20px 20px;
    transition: right 0.4s ease;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
  }

  .global-nav.active {
    right: 0;
  }

  .global-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .global-nav li {
    width: 100%;
  }

  .global-nav a {
    display: block;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
  }

  /* ドロップダウンメニューのモバイル対応 */
  .dropdown-menu {
    position: static;
    transform: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    display: none;
    padding-left: 1rem;
  }

  .has-dropdown.active .dropdown-menu {
    display: block;
  }
}


/* ======================
   Hero Section
====================== */
.hero {
  height: 100vh;
  width: 100%;
  position: relative;
  margin-top: 0;
}


.hero video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-caption {
  z-index: 2;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 90%;
  max-width: 1000px;
}

.hero-caption h1 {
  font-size: clamp(1.5rem, 5vw, 3.5rem); /* レスポンシブなフォントサイズ */
  line-height: 1.4;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #ffffff; /* 白色に変更 */
  letter-spacing: 0.1em; /* 文字間隔を少し広げる */
  animation: fadeInUp 1.2s ease-out forwards;
}

.hero-caption p {
  font-size: 1.5rem; /* サブテキストも大きく */
  color: #ffffff;
  line-height: 1.6;
  margin-top: 1rem;
  animation: fadeInUp 1.2s ease-out 0.3s forwards;
  opacity: 0;
}


.message {
  max-width: 1200px;
  margin: 4rem auto; /* 上下マージンも追加 */
  padding: 4rem 1rem;
  text-align: center;
}

.message h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

.message p {
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto;
}



/* ======================
   Services Section
====================== */
.services {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8rem 1rem;
  background-color: #fff;
}
.services h2 {
  text-align: center;
  margin-bottom: 2rem;
}
.service-cards {
  display: flex;
  flex-wrap: wrap;
  margin-top: 4rem; /* カードとタイトルの間隔を広げる */
  gap: 3rem; /* カード間の間隔を広げる */
  justify-content: center;
}
.service-card {
  background-color: #f9f9f9;
  border: 1px solid #eee;
  flex: 1 1 300px;
  max-width: 350px;
  text-align: center;
  padding: 1rem;
  border-radius: 8px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
.service-card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  transition: transform 0.4s ease;
}

.service-card:hover img {
  transform: scale(1.05);
}

.service-card h3 {
  margin: 1rem 0 0.5rem;
}
.service-card p {
  margin-bottom: 1rem;
}
.btn {
  display: inline-block;
  text-decoration: none;
  background-color: var(--accent-color);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}
.btn:hover {
  background-color: var(--accent-color-hover);
}

/* ======================
   Company Section
====================== */
.company-info {
  padding: 4rem 1rem;
  background-color: #f8f8f8;
}

.company-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 4rem;
}

.company-text {
  flex: 1;
}

.company-image {
  flex: 1;
}

.company-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
  .company-container {
    flex-direction: column;
    gap: 2rem;
  }
  
  .company-text {
    text-align: center;
  }
}

/* ======================
   Contact Section
====================== */
.contact-cta {
  text-align: center;
  background-color: #fff;
  padding: 13rem 1rem;
}
.contact-cta .contact-btn {
  margin-top: 1rem;
}

.contact-cta {
  position: relative;
  overflow: hidden;
}

/* 背景テキストのアニメーション用の要素 */
.contact-cta::before {
  content: 'CONTACT';
  position: absolute;
  font-size: 180px;
  font-weight: bold;
  color: rgba(0, 0, 0, 0.03);
  white-space: nowrap;
  animation: slideText 15s linear infinite;
  top: 50%;
  transform: translateY(-50%);
  z-index: 0;
}

/* 修正したスライドアニメーション */
@keyframes slideText {
  0% {
    transform: translate(100%, -50%); /* 右端（画面外）からスタート */
  }
  100% {
    transform: translate(-100%, -50%); /* 左端（画面外）まで移動 */
  }
}

/* コンタクトセクションの内容を前面に */
.contact-cta h2,
.contact-cta p,
.contact-cta .btn {
  position: relative;
  z-index: 1;
}

/* ======================
   Footer
====================== */
.site-footer {
  background-color: #222;
  color: #ccc;
  padding: 2rem 0 1rem;
}

.footer-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 4rem;
  margin-bottom: 1rem;
}

/* 左側エリア：会社情報 */
.company-info2 {
  flex: 1;
}

.company-info2 h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: #ccc;
}

.company-info2 .address {
  margin-bottom: 1rem;
  line-height: 1.4;
  color: #ccc;
}

.map-container {
  width: 350px;
  height: 200px;
  margin-top: 0.5rem;
}

.map-container iframe {
  border-radius: 4px;
}

/* 右側エリア：ナビゲーション */
.footer-nav {
  flex: 1;
  align-self: center; /* 上揃えに変更 */
}

.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav li {
  margin-bottom: 0.7rem;
}

.footer-nav a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: #fff;
}

/* コピーライト */
.copyright {
  text-align: center;
  padding-top: 1rem; /* パディングを縮小 */
  margin-top: 1rem; /* マージンを縮小 */
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright small {
  font-size: 0.75rem;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    gap: 2rem;
  }

  .company-info,
  .footer-nav {
    width: 100%;
  }

  .map-container {
    width: 100%;
    height: 300px;
  }

  .footer-nav {
    margin-top: 2rem;
  }
}

/* テキストの改行制御用スタイル */
@media screen and (max-width: 768px) {
  .hero-caption h1,
  .hero-caption p,
  .message p,
  .company-text p {
    /* 改行を制御 */
    white-space: pre-line;
    word-break: keep-all;
    overflow-wrap: break-word;
    
    /* コンテナ幅に合わせて調整 */
    width: 100%;
    max-width: 100%;
    
    /* 余白調整 */
    padding: 0 15px;
    
    /* テキストの配置 */
    text-align: left;
  }
  
  /* ヒーローセクションのテキスト配置は中央のまま */
  .hero-caption h1,
  .hero-caption p {
    text-align: center;
  }

  /* 文字サイズの調整 */
  .hero-caption h1 {
    font-size: clamp(1.2rem, 4vw, 2rem);
    line-height: 1.4;
  }

  .hero-caption p {
    font-size: clamp(0.9rem, 3vw, 1.2rem);
    line-height: 1.6;
  }
}


/* ======================
   Responsive (例)
====================== */
@media screen and (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
  }
  .service-cards {
    flex-direction: column;
    align-items: center;
  }
  .hero {
    height: 100vh; /* 40vhから100vhに変更 */
    width: 100%;
  }
  
  .hero video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  /* テキストの視認性を確保 */
  .hero-overlay {
    background: rgba(0, 0, 0, 0.4); /* オーバーレイを少し濃くする */
  }
  .hero-caption h1 {
    font-size: 1.5rem;
  }
  .hero-caption p {
    font-size: 1rem;
  }
}


@media (max-width: 768px) {
  .site-header {
    background-color: rgba(254, 254, 254, 0.75); /* 元の白色を透過 */
    backdrop-filter: blur(1px); /* 背景のブラー効果（オプション） */
  }

  /* ドロップダウンメニューの背景も同様に透過 */
  .global-nav {
    background-color: rgba(254, 254, 254, 0.75);
    backdrop-filter: blur(5px);
  }
}