/* レスポンシブ強化（ユーザー要望）:
   900px 以下では PC メニューを完全に隠し、ハンバーガー内にメニューを格納する。
   元テーマCSSは改変せず、本ファイルを最後に読み込んで上書きする。 */

@media (max-width: 900px) {
  #header { position: relative; }

  /* PCナビ・PC用SNS（メール削除済）を完全非表示 */
  #header .gnav-pc,
  #header .sns-button.pc {
    display: none !important;
  }

  /* ハンバーガー(モバイルナビ)を表示 */
  #header .navbar,
  #header .navbar.mobile {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    color: #544530;
  }
  #header .sns-button.mobile {
    display: block !important;
  }
  #header .hamburger {
    display: flex !important;
    flex-direction: column;
    gap: 5px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.4rem;
    color: #544530;
    z-index: 1001;
  }

  /* メニュー本体: 初期は閉じ、.open で開く */
  #header .nav-links {
    list-style: none;
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 0;
    width: min(72vw, 280px);
    margin: 0;
    padding: 0;
    text-align: center;
    background-color: #FEFFF7;
    box-shadow: 0 8px 24px rgba(84, 69, 48, 0.18);
    border-radius: 0 0 0 8px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    z-index: 1000;
    transition: max-height 0.3s cubic-bezier(0.42, 0, 0.83, 0.84),
                opacity 0.15s ease;
  }
  #header .nav-links.open {
    max-height: 600px;
    opacity: 1;
  }
  #header .nav-links li {
    list-style: none;
    border-bottom: 1px solid #efe7d6;
  }
  #header .nav-links li:last-child { border-bottom: none; }
  #header .nav-links li a {
    display: block;
    padding: 16px 12px;
    color: #544530;
    font-family: "Montserrat", sans-serif;
    letter-spacing: 0.1em;
    text-decoration: none;
    font-size: 0.95rem;
    transition: opacity 0.3s;
  }
  #header .nav-links li a:hover { opacity: 0.55; }
}

/* ごく小さい画面の微調整 */
@media (max-width: 430px) {
  #header .nav-links { width: min(80vw, 260px); top: 56px; }
  #header .nav-links li a { font-size: 0.9rem; padding: 14px 10px; }
}

/* ===== 追加調整（ユーザー要望） ===== */

/* スマホ(≤900px): ファーストビュー4セクションの文字重なりを解消（縦積み・中央寄せ） */
@media (max-width: 900px) {
  .topcontents-wrapper .first-view .section-common { padding-bottom: 60px; }
  .topcontents-wrapper .first-view .section-common .col-2 { display: block !important; }
  .topcontents-wrapper .first-view .section-common .col-2 img.photo {
    width: 72% !important;
    display: block;
    margin: 0 auto 16px;
  }
  .topcontents-wrapper .first-view .section-leftside .container,
  .topcontents-wrapper .first-view .section-rightside .container {
    width: 100% !important;
  }
  .topcontents-wrapper .first-view .section-common .col-2 .container .contents {
    position: static !important;
    bottom: auto; left: auto; right: auto;
    text-align: center;
  }
  .topcontents-wrapper .first-view .section-common .col-2 .container .txt-large.mobile {
    position: static !important;
    bottom: auto; left: auto; right: auto;
    font-size: 1.05rem !important;
    padding: 2px 0 !important;
    line-height: 1.7;
  }
  .topcontents-wrapper .first-view .section-common .col-2 .container .holizontal-line-2 {
    display: block;
    margin: 10px auto 0;
    max-width: 56%;
  }

  /* プラン: 写真を中央配置・プラン名の改行崩れ防止 */
  .plan .col-2 .item { text-align: center; }
  .plan .col-2 .item img { display: block; margin: 0 auto; }
  /* プラン名: 1行を保ちつつ画面幅に応じて流動的に縮小（写真と同様に縮む） */
  .plan .col-2 .item .plan-name .txt-medium {
    white-space: nowrap;
    font-size: clamp(0.85rem, 4.6vw, 1.7rem) !important;
  }
}

/* PC(≥901px): 左右に20pxの内側余白／プラン写真を縦中央に */
@media (min-width: 901px) {
  .topcontents-wrapper,
  .contents-wrapper {
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
  }
  .plan .col-2 { align-items: center; }
}

/* フッターSNS文言: 追加改行はスマホのみ（PCは「。」後の改行のみ＝元挙動） */
@media (min-width: 901px) {
  .sp-br { display: none; }
}
