/* ===============================================================
   基本設定 & 変数
=============================================================== */
:root {
  --primary-color: #3b82f6; /* よりモダンな青 */
  --primary-color-dark: #1d4ed8;
  --secondary-color: #e0f2fe; /* カテゴリ背景色などを定義 */
  --dark-bg: #0a192f; /* ダークモードの背景色 */
  --dark-bg-light: #172a45;
  --text-color-dark: #ccd6f6;
  --text-color-light: #8892b0;
  --text-color: #333333;
  --white: #ffffff;
  --light-gray: #f8f9fa;
  --font-family: 'Helvetica', 'Arial', 'Hiragino Sans', 'Meiryo', sans-serif;
  --transition-speed: 0.5s;
}

body {
  font-family: var(--font-family);
  background-color: var(--white);
  margin: 0;
  color: var(--text-color);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

.container {
  max-width: 1100px; /* 最大幅を調整 */
  margin: 0 auto;
  padding: 0 clamp(16px, 2.5vw, 30px); /* 左右の余白を画面幅に応じて調整 */
}

/* ===============================================================
   ヘッダー
=============================================================== */
.site-header {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  padding-top: 10px;
  padding-bottom: 10px;
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
}
.logo img { height: 50px; }
.logo span {
  font-size: 24px; font-weight: 700; color: var(--primary-color);
}

.main-nav {
  display: flex;
  gap: 25px;
  align-items: center;
}

.main-nav a {
  font-weight: 600; font-size: 17px;
  position: relative;
  padding: 8px 0;
  color: var(--text-color); text-decoration: none;
  transition: color 0.3s ease;
}
.main-nav a::after {
  content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px;
  background-color: var(--primary-color); transition: width var(--transition-speed) ease;
}
.main-nav a:hover::after { width: 100%; }
.main-nav a:hover { color: var(--primary-color); }

.btn-header {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--white) !important;
  padding: 10px 25px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: bold;
  white-space: nowrap;
  transition: background-color 0.3s, transform 0.3s;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.btn-header:hover {
  background-color: var(--primary-color-dark);
  color: var(--white) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* ===============================================================
   ヒーローセクション
=============================================================== */
.hero-section {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background-color: var(--dark-bg);
  padding-top: 70px;
  padding-bottom: 30px;
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
}

.hero-content {
  flex: 1.1;
  text-align: left;
  color: var(--white);
  padding-right: 50px;
  animation: fade-in-up 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-content h1 {
  font-size: clamp(36px, 5vw, 56px); /* 流体タイポグラフィ */
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 20px 0;
}

.hero-content p {
  font-size: clamp(16px, 2.5vw, 20px); /* 流体タイポグラフィ */
  max-width: 650px;
  margin: 0 0 35px 0;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-image {
  flex: 0.9;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: slide-in-right 1.2s ease-out forwards;
  opacity: 0;
}

.hero-image img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.btn.btn-primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.3s;
}

.btn.btn-primary:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-2px);
}

@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

.site-section { padding: 100px 0; position: relative; }
.site-section-dark {
  background-color: var(--dark-bg);
  color: var(--text-color-dark);
  padding: 100px 0; position: relative;
}

.section-header {
  text-align: center; margin-bottom: 60px;
}
.section-header h2 {
  font-size: clamp(30px, 4vw, 36px); /* 流体タイポグラフィ */
  font-weight: 700; margin: 0 0 15px 0;
}
.section-header.dark h2 { color: var(--white); }
.section-header h2::after {
  content: ''; display: block; width: 70px; height: 4px;
  background-color: var(--primary-color); margin: 10px auto 0; border-radius: 2px;
}

/* ===============================================================
   インタラクティブ・サービスセクション
=============================================================== */
.interactive-service-section {
  display: flex;
  gap: 50px;
  align-items: flex-start;
}
.service-list {
  flex: 1;
  list-style: none;
  padding: 0;
  margin: 0;
  position: sticky;
  top: 120px;
}
.service-list-item {
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 15px;
  cursor: pointer;
  transition: background-color 0.4s, color 0.4s;
  border: 1px solid transparent;
}
.service-list-item.active {
  background-color: var(--dark-bg-light);
  color: var(--white);
  border-color: var(--primary-color);
}
.service-list-item h3 { margin: 0 0 5px 0; font-size: 20px; }
.service-list-item p { margin: 0; font-size: 14px; color: var(--text-color-light); }
.service-list-item.active p { color: var(--text-color-dark); }

.service-display {
  flex: 1.5;
}
.service-display-item {
  display: none;
  animation: fade-in 0.6s;
}
.service-display-item.active { display: block; }
.service-display-item img {
  width: 100%;
  border-radius: 16px;
  margin-bottom: 20px;
}
.service-display-item h3 { font-size: 28px; color: var(--white); margin: 0 0 10px 0; }
.service-display-item p { font-size: 16px; line-height: 1.8; margin: 0; }

.btn-link {
  display: inline-block;
  margin: 10px 10px 10px 0;
  background-color: var(--primary-color);
  color: var(--white) !important;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s, transform 0.3s;
}

.btn-link:hover {
  background-color: var(--primary-color-dark);
  transform: translateY(-2px);
}

/* ===============================================================
   ビデオセクション
=============================================================== */
.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.video-card {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0,0,0,0.07);
  text-decoration: none;
  transition: transform 0.5s, box-shadow 0.5s;
}
.video-card:hover { transform: translateY(-8px); box-shadow: 0 12px 30px rgba(0,0,0,0.1); }
.video-thumbnail { overflow: hidden; position: relative; }
.video-thumbnail img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block;
  transition: transform var(--transition-speed);
}
.video-card:hover .video-thumbnail img { transform: scale(1.05); }
.video-card p { padding: 20px; font-weight: 700; margin: 0; color: var(--text-color); font-size: 17px; }

/* ===============================================================
   フッター
=============================================================== */
.site-footer {
  background-color: var(--dark-bg);
  color: var(--text-color-light);
  padding: 60px 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}
.footer-column h4 { color: var(--white); margin-bottom: 15px; font-size: 18px; }
.footer-column ul { list-style: none; padding: 0; margin: 0; }
.footer-column li { margin-bottom: 10px; }
.footer-column a { color: var(--text-color-light); text-decoration: none; transition: color 0.3s; }
.footer-column a:hover { color: var(--primary-color); }
.footer-bottom {
  text-align: center; border-top: 1px solid var(--dark-bg-light); padding-top: 30px; font-size: 14px;
}

/* ===============================================================
   アニメーション
=============================================================== */
@keyframes fade-in-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.animate-on-scroll { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.animate-on-scroll.is-visible { opacity: 1; transform: translateY(0); }

/* ===============================================================
   レスポンシブ対応
=============================================================== */
/* ハンバーガーメニュー (タブレット & スマートフォン) */
@media (max-width: 1024px) {
  .main-nav {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 80%;
    max-width: 320px;
    padding-top: 5rem;
    transition: transform 0.3s ease-in-out;
    transform: translateX(100%);
    gap: 30px;
    z-index: 1005;
  }
  .main-nav.is-open {
    transform: translateX(0);
  }
  .main-nav a {
    font-size: 18px;
    font-weight: bold;
  }
  .btn-header {
    padding: 12px 25px;
  }
  .mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1010;
  }
  .mobile-menu-toggle span {
    width: 30px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
    position: relative;
    transform-origin: 1px;
  }
  .is-open + .mobile-menu-toggle span:nth-child(1) {
    transform: rotate(45deg);
  }
  .is-open + .mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
  }
  .is-open + .mobile-menu-toggle span:nth-child(3) {
    transform: rotate(-45deg);
  }
}

/* タブレット */
@media (min-width: 769px) and (max-width: 1024px) {
  .desktop-nav {
    display: none;
  }
  .site-section, .site-section-dark {
    padding: 80px 0;
  }
  .interactive-service-section, .hero-container {
    flex-direction: column;
    text-align: center;
  }
  .hero-content {
    padding-right: 0;
  }
  .service-list {
    position: static;
    width: 100%;
  }
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* スマートフォン */
@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  .site-section, .site-section-dark {
    padding: 60px 0;
  }
  .site-header .container, .interactive-service-section, .hero-container {
    flex-direction: column;
  }
  .hero-container { text-align: center; }
  .hero-content { padding-right: 0; padding-bottom: 30px; }
  .hero-image { width: 80%; }
  
  .service-list {
    position: static;
    width: 100%;
  }
  .video-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .hero-content p {
    word-break: keep-all;
  }
  .service-list-item h3 {
    white-space: nowrap;
  }
}