/* レスポンシブデザイン用のスタイル */
@media (max-width: 1200px) {
  .container {
    max-width: 1024px;
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }
}
/* レスポンシブデザイン */
@media screen and (max-width: 1024px) {
  nav ul {
    position: fixed;
    top: 0; /* ヘッダーの上から */
    left: -100%;
    width: 80%; /* 画面幅の80% */
    max-width: 300px; /* 最大幅 */
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.98); /* 背景色 */
    backdrop-filter: blur(5px);
    flex-direction: column;
    align-items: flex-start; /* 左揃え */
    justify-content: flex-start;
    padding: 100px 30px 30px; /* 上にスペース、左右パディング */
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); /* スムーズな動き */
    z-index: 1000; /* ヘッダーのすぐ下 */
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1); /* 右側に影 */
    transform: translateX(-100%);
    display: flex; /* モバイルでも表示されるように */
    visibility: hidden; /* 初期状態では非表示 */
    opacity: 0;
  }

  nav ul.active {
    left: 0;
    transform: translateX(0); /* 左から表示 */
    visibility: visible; /* アクティブ時に表示 */
    opacity: 1;
  }

  nav ul li {
    margin: 0 0 25px 0; /* 下マージンのみ */
    width: 100%; /* 幅いっぱい */
  }

  nav ul li a {
    font-size: 1.1rem; /* 文字サイズ調整 */
    padding-bottom: 10px; /* 下線とのスペース */
    display: block; /* ブロック要素にして幅を持たせる */
  }

  /* ハンバーガーメニューを表示 */
  .menu-toggle {
    display: block !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .menu-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px); /* Xの位置調整 */
  }

  .menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
    transform: scale(0); /* 縮小して消える */
  }

  .menu-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -7px); /* X,Yの位置調整 */
  }

  /* その他のスタイルはそのまま */
  .hero-content {
    flex-direction: column;
    text-align: center; /* 中央揃え */
  }

  .hero-text {
    flex: none;
    width: 100%;
    text-align: center;
    animation: slideInUp 1s ease-out forwards; /* アニメーション変更 */
  }

  .hero-image {
    flex: none;
    width: 80%; /* 少し小さく */
    margin-top: 40px; /* 上マージン追加 */
    animation: zoomIn 1.2s ease-out 0.3s forwards; /* アニメーション変更 */
  }

  .contact-container {
    flex-direction: column;
  }

  .contact-form {
    flex: 1; /* 幅リセット */
  }
}

@media screen and (max-width: 768px) {
  /* ハンバーガーメニューを表示 */
  .menu-toggle {
    display: block !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .menu-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px); /* Xの位置調整 */
  }

  .menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
    transform: scale(0); /* 縮小して消える */
  }

  .menu-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -7px); /* X,Yの位置調整 */
  }

  main {
    margin-top: 70px; /* ヘッダー高さに合わせて調整 */
  }

  .section {
    padding: 80px 0; /* パディング調整 */
  }

  .section-title h2 {
    font-size: 2rem; /* タイトルサイズ調整 */
  }

  .hero {
    padding: 80px 0; /* パディング調整 */
  }

  .hero-title {
    font-size: 2.5rem; /* タイトルサイズ調整 */
  }

  .feature-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .feature-icon {
    margin-right: 0;
    margin-bottom: 15px;
  }

  /* モバイルでのパーティクル調整 */
  .particle-canvas {
    opacity: 0.5;
  }

  /* モバイルでの浮遊アニメーション調整 */
  .floating {
    animation-duration: 2s;
  }

  /* スクロールトップボタン位置調整 */
  .scroll-top-btn {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }
}

@media screen and (max-width: 576px) {
  .header-container {
    padding: 10px 15px; /* パディング調整 */
  }

  .logo-symbol {
    width: 45px; /* サイズ調整 */
    height: 45px; /* サイズ調整 */
    margin-right: 10px; /* マージン調整 */
  }

  .logo-text {
    font-size: 1.3rem; /* サイズ調整 */
  }

  .hero {
    padding: 60px 0;
  }

  .hero-title {
    font-size: 2.2rem; /* サイズ調整 */
  }

  .hero-subtitle {
    font-size: 1.1rem; /* サイズ調整 */
  }

  .btn {
    padding: 12px 25px; /* パディング調整 */
    font-size: 1rem; /* サイズ調整 */
  }

  .section-title h2 {
    font-size: 1.8rem; /* サイズ調整 */
  }

  .section-title p {
    font-size: 1rem;
  }

  .services-grid {
    grid-template-columns: 1fr; /* 1カラムに */
    gap: 30px; /* ギャップ調整 */
  }

  .service-card {
    text-align: center;
  }

  .service-image {
    height: 200px;
  }

  .footer-container {
    grid-template-columns: 1fr; /* 1カラムに */
    text-align: center; /* 中央揃え */
  }

  .footer-logo,
  .footer-contact p {
    justify-content: center; /* 中央揃え */
  }

  .footer-contact i {
    margin-right: 8px;
    margin-top: 3px;
  }

  .footer-links ul {
    padding-left: 0;
  }
  .footer-links ul li a:hover {
    padding-left: 0; /* スマホではずらす効果をなくす */
  }

  /* 小さい画面でのアニメーション調整 */
  .scroll-animate,
  .fade-in {
    transition-duration: 0.6s;
  }
}

/* パーティクルキャンバススタイル */
.particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
