/* ============================================================
   Tablet (max-width: 1024px)
   2列レイアウト
============================================================ */
@media screen and (max-width: 1024px) {

  .image-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

}

/* ============================================================
   Mobile (max-width: 768px)
   1列レイアウト
============================================================ */
@media screen and (max-width: 768px) {

  /* image-grid */
  .image-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  .image-item,
  .image-item-has-submenu {
    width: 100%;
  }

  /* 画像は 80% */
  .image-item > a > img,
  .image-item-has-submenu .image-menu-card img {
    width: 80% !important;
    aspect-ratio: 16 / 9 !important;
    height: auto !important;

  }

  .image-item > a > p,
  .image-item-has-submenu .image-menu-title {
    width: 100%;
  }

  /* サブメニュー */
  .image-item-has-submenu .grid-submenu {
    left: 50%;
    width: 90%;
    max-width: 90vw;
  }

  /* topナビゲーション非表示 */
  .top-nav {
    display: none !important;
  }

  /* ハンバーガーメニュー */
  .menu-nav {
    width: 85%;
    left: -100%;
  }

  /* ロゴ */
  .logo-block {
    margin-bottom: 20px;
  }

  /* ニュース */
  .news_content {
    flex-direction: column;
  }

  .top_news {
    flex: 1 1 auto;
    height: auto;
  }

  .news_old {
    flex: 1 1 auto;
    position: static;
  }

  /* patjp */
  .hero {
    grid-template-columns: 1fr;
  }

  .cta-card {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }

  .cta-card img {
    max-width: 100%;
    width: 100%;
  }

  .cta-text {
    font-size: 1.1rem;
  }

  .download-btn {
    width: 100%;
    min-width: 0;
  }

  /* analysis */
  .lead-image {
    width: 100%;
    max-width: 100%;
  }

  /* advice */
  .main-wrap {
    padding: 30px 16px 60px;
  }

  .page-header {
    margin-bottom: 32px;
  }

  .page-header h1 {
    padding-left: 16px;
    font-size: 27px;
  }

  .page-header h1::before {
    width: 4px;
    height: 34px;
  }

  .page-header h2,
  .page-header .subtitle {
    font-size: 16px;
  }

  .section {
    margin-top: 45px;
  }

  .section > h2 {
    margin-bottom: 22px;
    padding-left: 15px;
    font-size: 21px;
  }

  .section > h2::before {
    width: 4px;
    height: 25px;
  }

  .intro-card,
  .advice .lead-card {
    padding: 22px;
  }

  .intro-content,
  .advice .lead-card {
    display: block;
  }

  .intro-image,
  .advice .lead-image {
    margin-bottom: 22px;
  }

  .support-grid,
  .advice .support-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .support-card,
  .advice .support-card {
    min-height: auto;
  }

  .support-body,
  .advice .support-body {
    padding: 20px;
  }

  .consulting-card,
  .advice .consulting-card {
    display: block;
    padding: 25px;
  }

  .consulting-icon,
  .advice .consulting-mark {
    margin-bottom: 20px;
  }

  .contact-box {
    padding: 25px 20px;
  }

}

/* ============================================================
   Small Mobile (max-width: 480px)
============================================================ */
@media screen and (max-width: 480px) {

  .image-grid {
    gap: 16px;   }

  .container,
  .main-wrap {
    padding-left: 14px;
    padding-right: 14px;
  }

  .page-header h1,
  .advice .page-header h1 {
    font-size: 24px;
  }

  .page-header h1::before {
    top: 5px;
    height: 31px;
  }

  .page-header .subtitle,
  .advice .page-header .subtitle {
    font-size: 15px;
  }

  .intro-card,
  .advice .lead-card {
    padding: 18px;
  }

  .support-body,
  .advice .support-body {
    padding: 18px;
  }

  .support-body h3,
  .advice .support-body h3 {
    font-size: 17px;
  }

  .support-body p,
  .advice .support-body p {
    font-size: 14px;
  }

  .consulting-card,
  .advice .consulting-card {
    padding: 20px;
  }

}

/* ============================================================
   スマホ（hover なし環境）では拡大を無効化
============================================================ */
@media (hover: none) and (pointer: coarse) {

  .image-item:hover,
  .image-item-has-submenu:hover {
    transform: none !important;
  }

  .image-item:hover > a > img,
  .image-item-has-submenu:hover .image-menu-card img {
    transform: none !important;
  }

}
