/* ==== Responsive (統一: #wrap-main-container-grid) ==== */

/* ====== max-width: 1024px ====== */
@media (max-width: 1024px) {
  /* メインコンテンツ幅調整（2カラム） */
  #wrap-main-container-grid {
    grid-template-columns: 2fr 1fr;
    gap: 20px;
  }

  /* カード/一覧系 */
  .cards { grid-template-columns: repeat(2, 1fr); }
  .ranking { grid-template-columns: 1fr; }

  /* 共通グリッド */
  .t-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .t-list__inner.t-grid,
  .t-grid.t-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* テーブル列幅 */
  .recruit__table th { width: 32%; }

  /* プロフィール：縦並び */
  .therapist-profile-wrap { grid-template-columns: 1fr; }
}

/* ====== max-width: 768px ====== */
@media (max-width: 768px) {
  /* ヘッダー：ロゴ左／メニューボタン右 */
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1200;
    background: #fff;
    transition: all .3s ease;
    padding: 0 6px;
  }

  /* デフォルトロゴ */
  .logo__img {
    height: 70px;
    transition: height .3s ease;
  }

  /* スクロール時に縮小 */
  body.header-shrink .logo__img {
    height: 40px;
  }

  /* スクロール時にheader自体も少し薄く */
  body.header-shrink .site-header {
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
  }
  .header-info{ display:none; }
  .site-header__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  /* 右側のエリアをまとめる */
  .site-header__right {
    display: flex;
    align-items: center;
    gap: 8px; /* TELとハンバーガーの隙間 */
    z-index: 999999;
  }

  .sp-tel {
    order: 1;  /* 左 */
  }
  .hamburger {
    order: 2;  /* 右 */
  }
  /* ハンバーガーボタン */
  .hamburger {
    position: relative;
    z-index: 100;                 /* ナビより上 */
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blue);      /* 水色ベース */
    border-radius: 8px;
    border: none;
    cursor: pointer;
    z-index: 99999;
  }
  .hamburger span{
    position: relative;           /* ← 基準を付与 */
    display: block;
    width: 22px; height: 2px;
    background: #fff;             /* 白線 */
    border-radius: 1px;
    transition: all .3s ease;
  }
  .hamburger span::before,
  .hamburger span::after{
    content: "";
    position: absolute;
    left: 0;
    width: 22px; height: 2px;
    background: #fff;
    border-radius: 1px;
    transition: all .3s ease;
  }
  .hamburger span::before{ top: -7px; }
  .hamburger span::after { top:  7px; }

  /* 開閉時（×に変形） */
  
  body.nav-open .hamburger span{ background: transparent; }
  body.nav-open .hamburger span::before{ top: 0; transform: rotate(45deg); }
  body.nav-open .hamburger span::after { top: 0; transform: rotate(-45deg); }

  .sp-tel{
  --tel-size: 42px;                 /* 丸ボタンの直径 */
  --tel-expand: 80px;              /* 展開時に増える幅（テキストぶん） */
  position: relative;
  z-index: 1001;                    /* ハンバーガーよりも前に */
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  height: var(--tel-size);
  width: var(--tel-size);           /* 初期は正円サイズだけ */
  padding: 0 10px 0 8px;            /* 右に少し余白（展開時用） */
  border: none;
  border-radius: 6px;
  background: var(--accent);        /* ピンク */
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
  overflow: hidden;                 /* テキストは初期は隠す */
  cursor: pointer;
}

/* アイコン枠を“確実に見える”サイズに固定 */
.sp-tel i{
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
}
.sp-tel i img{
  display: block;
  width: 20px;                      /* ここが小さすぎると消えやすい */
  height: auto;
}

/* テキストは初期は非表示（透明）に。スペース確保もしない */
.sp-tel a{ color:#fff; font-weight:700; text-decoration:none; }
.sp-tel a span{
  opacity: 0;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity .18s ease;
}

/* 展開時：左に伸びる（hamburgerは位置固定のまま） */
body.tel-open .sp-tel{
  width: calc(var(--tel-size) + var(--tel-expand));
}
body.tel-open .sp-tel a span{
  opacity: 1;
  pointer-events: auto;
}

/* ハンバーガーより左に置く想定なら、右側の並びのz順を明示 */
.hamburger{ z-index: 1000; }        /* sp-tel より小さく */


  /* オフキャンバスナビ */
  .g-nav{
    position: fixed;
    top: 0; right: 0;
    width: min(86vw, 320px);
    height: 100dvh;
    background: #fff;
    box-shadow: -10px 0 28px rgba(0,0,0,.12);
    border-left: 1px solid #eef2f6;
    transform: translateX(100%);
    transition: transform .28s ease;
    z-index: 1100;
    padding-top: 70px; /* ヘッダー分の余白（必要ならJSで高さ反映も可） */
  }
  .g-nav__inner{
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
  }
  .g-nav__inner li{ border-bottom: 1px solid #f0f4f8; }
  .g-nav__inner a{
    padding: 14px 18px;
    font-size: 15px;
    border-radius: 0;
  }
  body.nav-open .g-nav{ transform: translateX(0); }

  /* 背景オーバーレイ */
  .nav-overlay{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 1099;
  }
  body.nav-open .nav-overlay{ opacity: 1; pointer-events: auto; }

  /* メイン1カラム化 */
  #wrap-main-container-grid{ grid-template-columns: 1fr; }
  #wrap-main-contents { grid-column: 1; order: 1; }
  #sidebar { grid-column: 1; order: 2; }

  /* カード/一覧 1列 */
  .cards { grid-template-columns: 1fr; }
  .t-grid--4 { grid-template-columns: 1fr; }
  .t-list__inner.t-grid,
  .t-grid.t-grid--3 { grid-template-columns: 1fr; }

  /* ニュース行詰め */
  .news-link{
    grid-template-columns: auto auto 1fr;
    gap: 10px 12px;
  }
  .label-new{ order: 3; }
  .news-title{ grid-column: 1 / -1; }

  /* サイドバナー 3列 */
  .sidebar-bnr__grid{
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  /* テーブルをカード化 */
  .recruit__table{
    border: 0; box-shadow: none; background: transparent;
  }
  .recruit__table tr{
    display: block;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow);
  }
  .recruit__table th,
  .recruit__table td{
    display: block;
    width: 100%;
    border-bottom: 1px solid var(--border);
    padding: 12px 14px;
  }
  .recruit__table th{
    background: var(--light);
    color: var(--text);
    font-weight: 700;
  }
  .recruit__table tr:last-child td{ border-bottom: none; }

  .wpcf7-form{ padding: 14px; }
  .hero-slider,
  .single main,
  .page main{
    margin-top: 90px;
  }
  #news,
  #wrap-main-contets,
  .single main,
  .page main,
  sidebar{
    padding: 0 12px;
  }
  .bar-title,
  .therapist-name{
    font-size: 24px;
  }
  /* グリッド子が内容幅で親を押し広げないように */
.therapist-profile-wrap > * { min-width: 0; }

/* テーブルを入れてるブロックにも念のため */
.therapist-week { 
  min-width: 0; 
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.therapist-week .therapist-week-table {
  width: auto ;
  min-width: 500px;  /* 横スクロール発火の基準 */
  table-layout: auto;
}
}

/* ====== max-width: 425px（微調整用） ====== */
@media (max-width: 425px) {
  .logo__img{ height: 60px; }
  .hamburger{ width: 40px; height: 40px; }
  .g-nav{ width: min(90vw, 320px); }
}