/* ===========================
   responsive.css - SPスタイル
   max-width: 768px
=========================== */

body::before {
  content: "responsive loaded";
  display: none;
}

@media screen and (max-width: 768px) {
  /* 共通調整 */
  body {
    font-size: 90%;
    line-height: 1.6;
    overflow-x: hidden;
  }

  .section {
    padding: clamp(40px, 6vw, 60px) 20px;
  }

  br.sp-only {
    display: inline !important;
  }

  .section-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .section-header .title-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
  }

  .section-header .square {
    width: clamp(20px, 5vw, 28px);
    height: clamp(20px, 5vw, 28px);
    margin-right: 8px;
  }

  .section-header h2 {
    font-size: clamp(20px, 5vw, 28px);
    margin: 0;
    text-align: left;
  }

  .section-header p {
    width: 100%;
    margin: 8px 0 0;
    text-align: left;
    padding-left: 0; /* 左の余白リセット */
    margin-left: 0; /* 左マージンリセット */
  }
  h1,
  h2 {
    font-size: clamp(22px, 5vw, 28px);
    text-align: center;
  }

  p {
    font-size: clamp(14px, 4vw, 16px);
    line-height: 1.7;
    text-align: center;
  }

  /* ✅ ヒーローセクション：ロゴ中央・画像縮小 */
  /* Hero 全体の配置調整 */
  .hero {
    position: relative;
    text-align: center;
  }

  /* ロゴを上に固定、中央 */
  .hero-logo {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    z-index: 3;
  }

  .hero-logo img {
    width: 100%;
    height: auto;
    opacity: 0.8;
  }

  /* オーバーレイ表示ON（PCではdisplay:noneにしてるなら） */
  .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(255, 253, 239, 0.63); /* クリーム色半透明 */
    z-index: 1;
    display: block;
  }

  /* 握手画像 */
  .hero-img {
    position: relative;
    z-index: 0;
  }

  .hero-img img {
    width: 100%;
    height: auto;
    max-width: 600px;
  }

  /* ✅ サイドバー：非表示 */
  .sidebar {
    display: none;
  }

  /* ✅ ナビメニュー */
  .sp-icon-nav {
    display: block;
    position: absolute;
    bottom: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(99, 196, 138, 0.5);
    padding: 16px 10px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    height: auto; /* 中身に合わせる */
    max-height: 106px; /* 上限を明示的に */
    overflow: hidden; /* はみ出し防止 */
    transition: all 0.3s ease;
  }

  .sp-icon-nav ul {
    list-style: none;
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    padding: 0;
    margin: 0;
  }

  .sp-icon-nav li {
    flex: 1;
  }

  .sp-icon-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
  }

  .sp-icon-nav img {
    width: 50px;
    height: 50px;
    margin-bottom: 8px;
  }

  .sp-icon-nav span {
    font-size: 13px;
  }

  #spNav.fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
  }

  /* ✅ メニュー：footerに入ってるナビ用調整 */
  .footer-nav ul {
    flex-direction: column;
    gap: 20px;
    padding: 20px 0;
  }

  .footer-nav li {
    margin: 0;
  }

  /* ✅Vision */

  #vision {
    text-align: center;
    padding: 40px 20px; /* ✅ 少しコンパクトに */
  }

  #vision h1 {
    font-size: 22px; /* ✅ モバイル向けに少し小さめ */
    line-height: 1.6;
    text-align: center; /* ✅ 明示的に左寄せ */
  }

  #vision p {
    text-align: center;
    font-size: 14px;
    line-height: 1.8;
    white-space: normal; /* ✅ 自動で折り返し（<br>を無視できる） */
  }

  #vision br {
    display: none; /* ✅ 強制改行を消す */
  }

  /* ✅ 実績紹介セクション */

  .works-inner {
    flex-direction: column;
    text-align: center;
  }

  .works-content {
    order: 2; /* 文章を下に */
  }

  .works-img {
    order: 1; /* 画像を上に */
  }

  .btn-works {
    margin: 20px auto 0; /* 中央寄せ */
  }

  /* ✅サービスsection */

  #services .section-header {
    padding-left: 0;
    margin-left: 0;
  }

  /* サービス一覧全体の中央寄せ・transform除去 */
  .service-list {
    transform: none;
    margin-top: 32px;
    gap: 40px;
  }

  /* service-box全体のパディングとサイズ調整 */
  .service-box {
    padding: 35px 12px;
    min-height: auto;
    width: 90%;
    max-width: 500px;
    margin: 0 auto;
    transform: none !important;
    border-radius: 16px;
    position: relative;
  }

  /* 左右移動指定を無効化 */
  .service-box.left,
  .service-box.right {
    transform: none !important;
  }

  /* 番号サークル（サイズ縮小＋位置調整） */
  .num-circle {
    position: static;
    width: 36px;
    height: 36px;
    font-size: 14px;
    margin: 18px;
    padding: auto;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    vertical-align: middle;
    order: 0;
    opacity: 0.8;
  }

  /* h3を番号の横に並べる */
  .service-box h3 {
    display: block;
    text-align: center;
    margin: 0 auto 10px;
    font-size: 18px;
    color: #fff;
    order: 0;
  }

  /* 見出しエリアを1行に見せる */
  .service-box h3::before {
    content: "";
    display: block;
    height: 0;
    clear: both;
  }

  /* アイコンを中央にして余白も調整 */
  .service-box .icon {
    position: static;
    text-align: center;
    margin: 10px 0;
    opacity: 0.7;
    order: 2;
  }

  .service-box .icon img {
    width: 80px;
    height: auto;
  }

  /* 段落の文字サイズ調整 */
  .service-box p {
    font-size: 14px;
    line-height: 1.7;
    color: #fff;
    order: 3;
    margin-left: 10px !important;
    padding-left: 0 !important;
  }

  .service-box .num-circle {
    position: absolute;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    font-size: 14px;
    background: #fff;
    color: #126e1c;
    border: 1.5px solid #126e1c;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  /* 🔸番号とh3の上下を揃える */
  .num-circle,
  .service-box h3 {
    line-height: 0;
  }

  /* ✅ スタッフセクション */
  /* スタッフ紹介全体を縦積み中央寄せ */
  #staff {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }

  #staff .section-header {
    padding-left: 20px;
    margin-left: 0;
    margin-bottom: 0;
  }

  #staff .section-header h2 {
    text-align: left;
  }
  /* 各ブロック縦積み＆中央 */
  .staff-member {
    display: flex;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    margin: 0 auto !important;
    gap: 24px;
  }

  .profile-card br,
  .comment-card br,
  .hobby-card br {
    display: none !important;
  }

  /* テキストは自然折り返し */
  .profile-card p,
  .comment-card p,
  .hobby-card p {
    white-space: normal !important;
  }

  /* 写真エリア中央 */
  .photo-area {
    margin: 0 auto !important;
    text-align: center !important;
  }

  .staff-photo {
    width: 95% !important; /* 写真を大きく */
    max-width: 500px;
    margin: 0 auto;
    display: block;
    position: relative;
    z-index: 2;
  }

  .photo-area::after {
    display: none !important;
  }

  .bg-deco-bridge,
  .bg-deco.small {
    display: none !important;
  }
  /* プロフィールカード中央 */
  .profile-card {
    margin-top: -60px; /* 写真とカードをかぶせる */
    z-index: 1; /* 写真の下に来るように */
    position: relative;
    margin: -20px auto !important;
    text-align: center !important;
    padding: 24px 20px !important;
    width: 90% !important;
  }

  /* コメントカード中央 */
  .comment-card {
    outline: none !important; /* 内側の線（アウトライン）を消す */
    border-radius: 20px !important; /* 角丸を控えめに（80px → 20px） */
    padding: 20px 18px !important; /* 内側余白も少し小さめに */
    margin: 50px 16px !important;
    text-align: left !important;
    transform: none !important; /* ← PC用の translateX を無効化 */
    width: 100% !important;
  }

  /* 趣味部分も縦積み */
  .hobby-wrap {
    flex-direction: column !important;
    align-items: center !important;
    gap: 20px !important;
    margin: 20px auto !important;
  }

  .hobby-photo {
    width: 80% !important;
    margin: 0 auto !important;
  }

  .hobby-card {
    margin: 0 auto !important;
    text-align: left !important;
    width: 90% !important;
  }

  .hobby-card .card-illust img {
    width: 100px !important; /* ← サイズを小さくする */
    height: auto;
    opacity: 0.8; /* ← 少し薄めにすると主張しすぎない */
  }

  .hobby-card .card-illust {
    width: auto; /* 幅を画像サイズに合わせる */
    right: 10px; /* 配置も微調整 */
    bottom: 10px;
  }

  .profile-card p,
  .comment-card p,
  .hobby-card p {
    text-align: left !important; /* ← 強制的に左寄せ */
    margin: 0; /* 不要な中央寄せ余白を削除 */
  }

  #staff {
    margin-bottom: 60px; /* スタッフ紹介の下に余白 */
  }

  #access {
    margin-top: 40px; /* 事務所概要の上にも余白（任意） */
  }

  /* ✅ アクセスセクション */
  .access-inner {
    flex-direction: column;
    gap: 30px;
    text-align: center;
    align-items: center;
  }
  .access-left,
  .access-right {
    width: 100%;
  }
  .map-img,
  .office-photo {
    width: 90%;
    margin: 0 auto;
  }
  .contact-top {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .access-header .inner {
    display: flex;
    flex-direction: column; /* ✅ 横並び→縦積み */
    align-items: flex-start; /* ✅ 左寄せ */
    gap: 12px; /* ✅ h2とpの間隔 */
    padding-left: 20px; /* ✅ 左余白ちょっと縮小 */
  }

  .access-title {
    margin-bottom: 8px; /* ✅ h2の下に余白 */
  }

  .access-description {
    text-align: left; /* ✅ 左寄せに固定 */
    margin: 0;
    width: 100%; /* ✅ 画面幅いっぱいに */
  }

  #access .access-title .square {
    width: 18px; /* ← 小さめ */
    height: 18px;
    margin-right: 8px; /* ← h2との間隔も詰める */
  }

  /* TELとFAXを横並び */
  #access .contact-top {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: center;
  }

  #access .tel-fax-wrap {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
  }
  #access .tel-fax-wrap .tel,
  #access .tel-fax-wrap .fax {
    display: block;
    margin: 0;
  }

  /* 電話受付＋定休日をTEL/FAXの下に横並び */
  #access .contact-info {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 0px;
  }

  /* SPでお問い合わせボタンは消す */
  #access .fax .btn {
    display: none;
  }

  /* 写真・住所などは下に */
  #access .office-photo {
    width: 90%;
    margin: 20px auto 0;
    display: block;
  }
  /* ✅ フッター */
  #access .footer-nav,
  #access .contact-top .fax .btn {
    display: none !important;
  }

  .site-footer {
    padding-bottom: 120px; /* 下方向に余白を追加 */
  }

  br.sp-only {
    display: inline !important;
  }
}
