/* --- 基本設定 --- */
.hero-section {
    height: 400vh; /* スクロール距離の確保 */
    /* overflow-x: hiddenは不要になる場合があります */
}
.next-section {
    padding: 100px 5%;
    background-color: #f0f0f0;
}

/* --- ピン留めされるコンテナ --- */
.hero-pin-container {
    height: 100vh;
    width: 100%;
    position: sticky; /* スティッキーで追従 */
    top: 0;
    overflow: hidden; /* この中でアニメーションを完結させる */
}

/* --- 背景・オーバーレイ・キャッチフレーズ（変更なし） --- */
.background-image, .overlay, .catchphrase {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex; /* 中央寄せのため */
    justify-content: center;
    align-items: center;
}
.overlay {
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
}
.catchphrase {
    color: white;
    font-size: 3rem;
    z-index: 2;
}

/* --- 横スクロール部分のデザイン（★重要★） --- */
.horizontal-scroll-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 300%; /* 横幅は3画像分 */
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-around;
    
    /* ★★★最初から画面の右外に配置しておく★★★ */
    transform: translateX(100%);
}

.scalable-image {
    transform: scale(0.5); /* 初期サイズは小さいまま */
}


/* --------------------------------------------------------------- */
/* ヒーローセクション */
.hero-bg {
    color: white;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, rgba(0, 90, 156, 0.8), rgba(0, 191, 255, 0.7)), url('https://placehold.co/1920x1080/1a202c/ffffff?text=背景画像') no-repeat center center/cover;
  }
  
  .hero-content h1 {
    font-size: 2.25rem;
    font-weight: 900;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
  }
  
  .hero-content p {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 2rem;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
  }
  
  /* CTAボタン */
  .cta-button {
    display: inline-block;
    font-weight: 700;
    color: white;
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    padding: 1rem 2.5rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 191, 255, 0.4);
    background-size: 200% 200%;
  }
  
  .cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(0, 191, 255, 0.6);
    background-position: right center;
  }
  
  /* セクション共通 */
  .section-header {
    margin-bottom: 4rem;
  }
  
  .section-title {
    display: inline-block;
    font-weight: 900;
    font-size: 2.5rem;
    line-height: 1.2;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 0.5rem;
  }
  
  .section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
  }
  
  .section-subtitle {
    margin-top: 1rem;
    font-size: 1.125rem;
    color: #4b5563;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
  }
  
  /* グリッドレイアウト */
  .grid {
    display: grid;
    gap: 2rem;
  }
  
  /* カードスタイル */
  .custom-card {
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 2rem;
    text-align: center;
  }
  
  .custom-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  }
  
  .card-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
  }
  
  .card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
  }
  
  .card-text {
    color: #4b5563;
  }
  
  .case-card {
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
  }
  
  .case-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  }
  
  .case-card-image {
    background-color: #d1d5db;
    height: 15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
  }
  
  .case-card-content {
    padding: 1.5rem;
  }
  
  .case-card-tag {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--secondary-color);
  }
  
  .case-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0.5rem 0;
    color: var(--primary-color);
  }
  
  .case-card-text {
    color: #4b5563;
    font-size: 0.875rem;
    margin-bottom: 1rem;
  }
  
  /* 信頼の理由セクション */
  .flow-grid {
    align-items: center;
  }
  
  .flow-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
  }
  
  .flow-timeline {
    position: relative;
    border-left: 1px solid #e5e7eb;
  }
  
  .flow-timeline-item {
    margin-bottom: 2.5rem;
    margin-left: 1.5rem;
    position: relative;
  }
  
  .flow-timeline-item:last-child {
    margin-bottom: 0;
  }
  
  .flow-timeline-marker {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background-color: var(--secondary-color);
    border-radius: 9999px;
    left: -1rem;
    border: 8px solid white;
    color: white;
    font-weight: 700;
  }
  
  .flow-timeline-title {
    font-weight: 700;
    font-size: 1.125rem;
  }
  
  .flow-timeline-text {
    font-size: 0.875rem;
    color: #4b5563;
  }
  
  .quality-image {
    background-color: #d1d5db;
    border-radius: 0.5rem;
    height: 24rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
  }
  
  .quality-box {
    margin-top: 1.5rem;
    background-color: #eff6ff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--secondary-color);
  }
  
  .quality-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
  }
  
  .quality-text {
    color: #374151;
  }
  
  /* 設備紹介 */
  .equipment-list-container {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 2rem;
  }
  
  .equipment-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  
  .equipment-list li {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
  }
  
  .equipment-list span {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-left: 0.5rem;
  }
  
  .equipment-list .equipment-other {
    font-size: 1.125rem;
  }
  
  .equipment-images {
    margin-top: 3rem;
  }
  
  .equipment-image-container {
    background-color: #d1d5db;
    border-radius: 0.5rem;
    height: 20rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
  }
  
  .equipment-image-title {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 1rem;
    color: var(--primary-color);
  }
  
  /* 会社概要 */
  .company-info-box {
    max-width: 56rem;
    margin-left: auto;
    margin-right: auto;
    background-color: #f8fafc;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
  }
  
  .company-info-list {
    display: grid;
    gap: 1.5rem 2rem;
  }
  
  .company-info-list dt {
    font-weight: 700;
    color: #6b7280;
  }
  
  .company-info-list dd {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary-color);
  }
  
  .company-info-list .address {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-dark);
    line-height: 1.5;
  }
  
  /* お問い合わせ */
  #contact {
    background-color: var(--primary-color);
    color: white;
  }
  
  #contact h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
  }
  
  #contact .section-subtitle {
    color: #dbeafe;
    margin-bottom: 2.5rem;
  }
  
  .contact-box {
    background-color: white;
    color: #1f2937;
    border-radius: 0.5rem;
    padding: 2rem;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  }
  
  .contact-box .tel-label {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
  }
  
  .contact-box .tel-number {
    font-size: 2.25rem;
    font-weight: 900;
    color: var(--primary-color);
    transition: color 0.2s;
  }
  
  .contact-box .tel-number:hover {
    color: var(--secondary-color);
  }
  
  .contact-box .fax-label {
    margin-top: 1.5rem;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
  }
  
  .contact-box .fax-number {
    font-size: 1.875rem;
    font-weight: 700;
    color: #374151;
  }
  
  .contact-box .hours {
    font-size: 0.875rem;
    margin-top: 1rem;
    color: #6b7280;
  }
  
  /* フッター */
  footer {
    background-color: #1f2937;
    color: white;
    padding: 2rem 0;
  }
  
  footer p {
    font-size: 0.875rem;
    text-align: center;
  }
  
  /* レスポンシブデザイン */
  @media (min-width: 768px) {
    .section {
      padding-top: 7rem;
      padding-bottom: 7rem;
    }
  
    #desktop-nav {
      display: flex;
      align-items: center;
      gap: 2rem;
    }
  
    #mobile-nav-container {
      display: none;
    }
  
    .hero-content h1 {
      font-size: 3.75rem;
    }
  
    .hero-content p {
      font-size: 1.5rem;
    }
  
    .grid-md-3-cols {
      grid-template-columns: repeat(3, 1fr);
    }
  
    .grid-md-2-cols {
      grid-template-columns: repeat(2, 1fr);
    }
  
    .section-title::after {
      left: 0;
      transform: translateX(0);
    }
  
    .equipment-list {
      grid-template-columns: repeat(3, 1fr);
    }
  
    .company-info-list {
      grid-template-columns: 1fr 2fr;
    }
  
    .company-info-list dt {
      grid-column: 1 / 2;
    }
  
    .company-info-list dd {
      grid-column: 2 / 3;
    }
  
    #contact h2 {
      font-size: 2.25rem;
    }
  
    #contact .section-subtitle {
      font-size: 1.25rem;
    }
  }
  
  @media (min-width: 1024px) {
    .grid-lg-3-cols {
      grid-template-columns: repeat(3, 1fr);
    }
  }