/* ==========================================================================
   Design Enhancements - Layout, Animation, Header, Breadcrumb, Page Hero
   ========================================================================== */

/* ==========================================================================
   Blob Decorations
   ========================================================================== */
.blob-decor {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.blob-section {
  position: relative;
  overflow: hidden;
}

/* ==========================================================================
   3. Layout & Spacing — 統一された余白とmax-width
   ========================================================================== */

/* セクション共通の余白を統一 */
.home-news-section,
.home-service-section,
.home-recruit-section,
.home-about-section {
  padding: 100px 40px;
}

/* max-widthを1200pxに統一 */
.home-service-grid,
.home-about-grid,
.home-recruit-data-grid,
.home-recruit-links,
.home-news-container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* ページコンテナの統一 */
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 40px;
}

/* サービスリストの幅統一 */
.service-list {
  max-width: 1200px;
}

/* ニュースページ */
#news-page {
  max-width: 1200px;
  padding: 80px 40px;
}

/* カード型UIの統一スタイル */
.home-about-card,
.home-data-card,
.home-recruit-card {
  border-radius: 16px;
}

/* サービスカードはpages.cssで管理 */

/* セクション間のセパレータ */
.home-service-section,
.home-about-section {
  position: relative;
}

/* レスポンシブ余白 */
@media screen and (max-width: 768px) {
  .home-news-section,
  .home-service-section,
  .home-recruit-section,
  .home-about-section {
    padding: 60px 20px;
  }

  .page-container,
  #news-page {
    padding: 40px 16px;
  }
}


/* ==========================================================================
   4. Animation — スクロール連動フェードイン（全セクション統一）
   ========================================================================== */

/* スクロールフェードイン基本 */
.scroll-fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 左からスライドイン */
.scroll-fade-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-fade-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* 右からスライドイン */
.scroll-fade-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-fade-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* スケールイン */
.scroll-scale-in {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-scale-in.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* 子要素の連鎖アニメーション */
.stagger-children.is-visible > * {
  opacity: 0;
  transform: translateY(30px);
  animation: staggerFadeIn 0.6s ease forwards;
}

.stagger-children.is-visible > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children.is-visible > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children.is-visible > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children.is-visible > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children.is-visible > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-children.is-visible > *:nth-child(6) { animation-delay: 0.6s; }

@keyframes staggerFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ホームセクションタイトルのアニメーション */
.home-section-title {
  position: relative;
}

.home-section-title::after {
  content: '';
  display: block;
  width: 0;
  height: 3px;
  background: #1a2333;
  margin: 16px auto 0;
  transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.home-section-title.-white::after {
  background: #fff;
}

.scroll-fade-in.is-visible .home-section-title::after,
.home-section-title.is-visible::after {
  width: 60px;
}


/* ==========================================================================
   5. Header — ガラス風（backdrop-filter）
   ========================================================================== */

#header {
  background-color: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: none;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* スクロール時はやや不透明に */
#header.scrolled {
  background-color: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
  border-bottom-color: transparent;
}

/* ナビリンクにホバーアニメーション */
#header .main-nav > ul > li > a {
  position: relative;
  transition: color 0.3s ease;
}

#header .main-nav > ul > li > a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #1a2333;
  transition: width 0.3s ease, left 0.3s ease;
}

#header .main-nav > ul > li > a:hover::after {
  width: 80%;
  left: 10%;
}

/* サブメニューのガラス効果 */
.sub-menu {
  background-color: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1) !important;
}


/* ==========================================================================
   6. 各ページ共通 — パンくずリスト & ページヒーロー統一
   ========================================================================== */

/* --- パンくずリスト --- */
.breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 40px;
  font-size: 0.85rem;
  color: #888;
}

.breadcrumb a {
  color: #888;
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: #1a2333;
}

.breadcrumb .separator {
  margin: 0 8px;
  color: #ccc;
}

.breadcrumb .current {
  color: #333;
  font-weight: 600;
}

/* --- ページヒーロー統一デザイン --- */
.page-hero-unified {
  position: relative;
  padding: 100px 40px 80px;
  text-align: center;
  background: linear-gradient(135deg, #f8f9fb 0%, #eef1f5 100%);
  overflow: hidden;
}

/* 装飾的な背景シェイプ */
.page-hero-unified::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(26, 35, 51, 0.04) 0%, transparent 70%);
  border-radius: 50%;
}

.page-hero-unified::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(26, 35, 51, 0.03) 0%, transparent 70%);
  border-radius: 50%;
}

.page-hero-unified h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: #1a2333;
  margin: 0 0 16px;
  letter-spacing: 2px;
  position: relative;
  z-index: 1;
}

.page-hero-unified .page-hero-subtitle {
  font-size: 1rem;
  color: #6c757d;
  font-weight: 400;
  letter-spacing: 1px;
  position: relative;
  z-index: 1;
}

/* ヒーロー下部のライン */
.page-hero-unified .hero-line {
  display: block;
  width: 60px;
  height: 3px;
  background: #1a2333;
  margin: 24px auto 0;
  position: relative;
  z-index: 1;
}

@media screen and (max-width: 768px) {
  .page-hero-unified {
    padding: 70px 20px 50px;
  }

  .page-hero-unified h1 {
    font-size: 2.2rem;
  }

  .breadcrumb {
    padding: 16px 20px;
    font-size: 0.8rem;
  }
}
