/* ===================================
   プレミアム企業サイト v2 - メインスタイル
   メガメニュー + マルチページ対応
   =================================== */

/* カスタムプロパティ */
:root {
  /* カラーパレット */
  --color-primary: #6366f1;
  --color-primary-light: #818cf8;
  --color-primary-dark: #4f46e5;
  --color-secondary: #8b5cf6;
  --color-accent: #06b6d4;
  --color-accent-pink: #ec4899;
  
  /* 背景色 - ライトテーマ */
  --color-bg-light: #ffffff;
  --color-bg-lighter: #f8f9fa;
  --color-bg-card: #ffffff;
  --color-bg-glass: rgba(255, 255, 255, 0.9);
  --color-bg-section: #f1f5f9;
  
  /* テキスト色 - ライトテーマ */
  --color-text-primary: #1e293b;
  --color-text-secondary: #475569;
  --color-text-muted: #94a3b8;
  
  /* グラデーション */
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --gradient-accent: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --gradient-hero: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 50%, #ddd6fe 100%);
  --gradient-overlay: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.8) 100%);
  
  /* スペーシング */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;
  
  /* タイポグラフィ */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-japanese: 'Noto Sans JP', sans-serif;
  
  /* ボーダー半径 */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  
  /* シャドウ */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.2);
  
  /* トランジション */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* ヘッダー高さ */
  --header-height: 80px;
}

/* リセットとベーススタイル */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-japanese), var(--font-body), sans-serif;
  background: var(--color-bg-lighter);
  color: var(--color-text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: var(--header-height);
}

/* タイポグラフィ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}

p {
  margin-bottom: var(--spacing-sm);
  color: var(--color-text-secondary);
}

a {
  color: var(--color-primary-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent);
}

/* コンテナ */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--spacing-xl) 0;
  position: relative;
}

/* ===================================
   ヘッダー & メガメニュー
   =================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all var(--transition-base);
  height: var(--header-height);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-md);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-heading);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  cursor: pointer;
}

/* メインナビゲーション */
.nav-main {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--color-text-secondary);
  font-weight: 500;
  padding: 1.5rem 1.25rem;
  transition: all var(--transition-fast);
  cursor: pointer;
  border-bottom: 3px solid transparent;
}

.nav-link:hover {
  color: var(--color-text-primary);
  border-bottom-color: var(--color-primary);
}

.nav-link.active {
  color: var(--color-text-primary);
  border-bottom-color: var(--color-primary);
}

.nav-arrow {
  font-size: 0.75rem;
  transition: transform var(--transition-fast);
}

.nav-item:hover .nav-arrow {
  transform: rotate(180deg);
}

/* メガメニュー */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(30px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  min-width: 600px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-10px);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-lg);
  z-index: 100;
}

.nav-item:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
}

.mega-menu-column {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mega-menu-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.mega-menu-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  color: var(--color-text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.mega-menu-link:hover {
  background: var(--color-bg-section);
  color: var(--color-text-primary);
  transform: translateX(5px);
}

.mega-menu-icon {
  font-size: 1.25rem;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.mega-menu-text {
  display: flex;
  flex-direction: column;
}

.mega-menu-text strong {
  font-weight: 600;
  color: var(--color-text-primary);
}

.mega-menu-text small {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* メガメニュー背景オーバーレイ */
.mega-menu-overlay {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  z-index: 99;
  pointer-events: none;
}

.nav-item:hover ~ .mega-menu-overlay,
.mega-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* モバイルメニュー */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* パンくずリスト */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: var(--spacing-sm) 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb-item a {
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.breadcrumb-item a:hover {
  color: var(--color-primary-light);
}

.breadcrumb-separator {
  color: var(--color-text-muted);
}

.breadcrumb-item.active {
  color: var(--color-text-primary);
}

/* ページヒーロー（サブページ用） */
.page-hero {
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--gradient-hero);
  text-align: center;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
}

.page-hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: var(--spacing-md);
}

.page-hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: var(--spacing-sm);
}

.page-hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--color-text-secondary);
}

/* コンテンツセクション */
.content-section {
  padding: var(--spacing-lg) 0;
}

.content-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

/* ボタン */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(99, 102, 241, 0.6);
}

.btn-outline {
  background: transparent;
  color: var(--color-text-primary);
  border: 2px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.btn-outline:hover {
  background: var(--color-bg-glass);
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

/* カード */
.card {
  background: var(--color-bg-card);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(99, 102, 241, 0.3);
}

.card:hover::before {
  transform: scaleX(1);
}

/* グリッド */
.grid {
  display: grid;
  gap: var(--spacing-md);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* セクションヘッダー */
.section-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.section-title {
  margin-bottom: var(--spacing-sm);
  position: relative;
  display: inline-block;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* フッター */
.footer {
  background: var(--color-bg-light);
  padding: var(--spacing-lg) 0 var(--spacing-md);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin-top: var(--spacing-xl);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer-section h3 {
  font-size: 1.2rem;
  margin-bottom: var(--spacing-sm);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-primary-light);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--color-text-muted);
}

/* アニメーション */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ページトランジション */
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-primary);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.page-transition.active {
  opacity: 1;
  visibility: visible;
}

/* レスポンシブ */
@media (max-width: 1024px) {
  .mega-menu {
    min-width: 500px;
  }
  
  .mega-menu-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 70px;
  }
  
  :root {
    --header-height: 70px;
  }
  
  .nav-main {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: var(--spacing-md);
    gap: 0;
    transform: translateX(-100%);
    transition: transform var(--transition-base);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }
  
  
  .mega-menu {
    position: static;
    transform: none;
    min-width: auto;
    opacity: 0;
    max-height: 0;
    padding: 0;
    overflow: hidden;
    transition: all var(--transition-base);
  }
  
  .nav-item.active .mega-menu {
    opacity: 1;
    max-height: 1000px;
    padding: var(--spacing-sm);
    margin-top: var(--spacing-xs);
  }
  
  .mega-menu-grid {
    grid-template-columns: 1fr;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  :root {
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
  }
}
