/*
 * Responsive CSS
 * Martin Club Theme
 * ブレークポイント：991px / 767px / 575px
 */

/* =============================
   ハンバーガーボタン
============================= */

#hamburger-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 200;
}

#hamburger-btn span {
  display: block;
  width: 2.8rem;
  height: 0.25rem;
  background-color: #245C4F;
  border-radius: 0.2rem;
  transition: all 0.3s ease;
  transform-origin: center;
}

#hamburger-btn.is-active span:nth-child(1) {
  transform: translateY(0.85rem) rotate(45deg);
}

#hamburger-btn.is-active span:nth-child(2) {
  opacity: 0;
}

#hamburger-btn.is-active span:nth-child(3) {
  transform: translateY(-0.85rem) rotate(-45deg);
}

/* =============================
   オーバーレイメニュー
============================= */

#nav-overlay {
  position: fixed;
  top: 0;
  right: 0;
  width: 32rem;
  height: 100%;
  background-color: #245C4F;
  z-index: 300;
  transform: translateX(100%);
  transition: transform 0.35s ease;
  overflow-y: auto;
}

#nav-overlay.is-open {
  transform: translateX(0);
}

#nav-overlay-inner {
  padding: 8rem 3.2rem 4rem;
}

#nav-close-btn {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 3.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.4rem;
  opacity: 0.8;
  transition: opacity 0.2s;
}

#nav-close-btn:hover {
  opacity: 1;
}

#nav-overlay-nav ul {
  padding: 0;
  margin: 0;
}

#nav-overlay-nav ul li {
  border-bottom: 0.1rem solid rgba(255, 255, 255, 0.2);
}

#nav-overlay-nav ul li a {
  display: block;
  color: #ffffff;
  font-size: 1.8rem;
  font-weight: 600;
  text-decoration: none;
  padding: 1.6rem 0;
  transition: opacity 0.2s;
}

#nav-overlay-nav ul li a:hover {
  opacity: 0.7;
}

#nav-overlay-nav ul li::before {
  display: none !important;
}

.nav-overlay-sns img {
  border-radius: 50%;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.nav-overlay-sns a:hover img {
  opacity: 1;
}

/* =============================
   オーバーレイ背景
============================= */

#nav-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 250;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

#nav-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* =============================
   xl以下（〜1200px）
   縦積みレイアウト＋フォント調整
============================= */

@media (max-width: 1200px) {

  /* メンバーズバナーエリア */

  .members-banner__overlay {
    padding: 0 3rem;
  }

  .members-banner__half {
    grid-template-columns: 1fr;
  }

  .members-banner__text {
    max-width: 60%;
  }

  .members-banner__title {
    font-size: 3.2rem;
  }

  /* フリーバナーエリア */
  .top-freearea-overlay {
    padding: 0 3rem;
  }

  .top-freearea-text {
    max-width: 60%;
  }

  .top-freearea-title {
    font-size: 3.2rem;
  }
}

/* =============================
   lg以下（〜991px）
   縦積みレイアウト＋フォント調整
============================= */

@media (max-width: 991px) {

  /* メンバーズバナーエリア */

  .members-banner__half {
    grid-template-columns: 1fr;
  }

  .members-banner__text {
    max-width: 65%;
  }

  .members-banner__text_half {
    max-width: 100%;
  }
  .members-banner__title {
    font-size: 2.4rem;
  }

  /* フリーバナーエリア */
  .top-freearea-text {
    max-width: 65%;
  }

  .top-freearea-title {
    font-size: 2.4rem;
  }

  /* スライダー */
  .main-swiper {
  padding: 0 1.6rem !important;
  }

  .swiper-pagination {
    bottom: 1rem !important;
  }

  .swiper-button-prev {
    left: 1.6rem !important;
  }

  .swiper-button-next {
    right: 1.6rem !important;
  }

  /* NEWSセクション */
  #section-main {
    padding: 4rem 0;
  }

  #section-main .col-lg-8 {
    padding-right: 0;
  }

  .section-title {
    font-size: 3.6rem;
  }

  .news-content a {
    font-size: 2.1rem;
    line-height: 1.4!important;
  }

  .news-excerpt {
    font-size: 1.6rem;
  }

  /* NEWSサムネイル */
  .news-item {
    flex-direction: column;
  }

  .news-thumbnail {
    margin-top: 1.2rem;
    align-self: stretch;
  }

  .news-thumbnail img {
    width: 60%;
    height: auto;
    margin: 0 auto;
    display: block;
  }

  /* 3カラムバナー */
  #section-column-banner {
    padding: 6rem 0;
  }

  /* ギターカルーセル */
  #section-guitar {
    padding-top: 1rem !important;
    padding-bottom: 4rem !important;
  }

  .guitar-title-heading {
    font-size: 3.2rem;
  }

  #section-guitar .d-flex.mb-3 {
    margin-bottom: 0 !important;
  }

  .guitar-swiper {
    padding-bottom: 0 !important;
  }

  .guitar-card img {
    height: 32rem;
  }

  .guitar-title {
    font-size: 1.6rem;
  }

  /* SP用サイドバー */
  #main-sidebar-sp {
    padding-top: 0 !important;
    padding-bottom: 2rem !important;
  }

  #main-sidebar-sp .contact-banner {
    border-radius: 0;
  }

  /* PRバナー：LG〜MDは3列 */
  .pr-banner-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }

  /* 3カラムバナー余白 */
  #section-column-banner .row {
    --bs-gutter-x: 0.8rem;
    --bs-gutter-y: 0.8rem;
  }
  
  /* 店舗バナー */
  #store-banner .d-flex {
    flex-direction: column;
    text-align: center;
    gap: 1.6rem !important;
  }

  .store-banner-en {
    font-size: 3.2rem;
  }

  .store-banner-ja {
    font-size: 2.6rem;
  }

  #store-banner-logo img {
    height: 7rem;
  }

  /* フッター */
  #site-footer {
    padding: 2.4rem 0;
  }

  #site-footer .container > .d-flex {
    flex-direction: column;
    align-items: center !important;
    gap: 1.2rem;
    text-align: center;
  }

  #site-footer .d-flex.align-items-center.gap-4 {
    flex-direction: column;
    align-items: center !important;
    gap: 0.8rem;
  }

  #footer-nav {
    margin-left: 0;
  }

  #footer-nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
  }

  .footer-sns {
    justify-content: center;
  }

  .footer-copy {
    text-align: center;
  }

  /* 固定ページ SP用サイドバー */
  .page-sidebar-sp {
    padding-top: 0 !important;
    padding-bottom: 2rem !important;
  }
  
  .page-sidebar-sp .contact-banner {
    border-radius: 0;
  }
  /* 固定ページ ヒーローバナー SP全幅 */
  .main-content .hero-banner {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
    padding-right: 2rem;
    justify-content: flex-end;
  }
  
  /* 固定ページ main-content SP余白リセット */
  .main-content.col-lg-8 {
    padding-right: var(--bs-gutter-x, 1.5rem);
    padding-left: var(--bs-gutter-x, 1.5rem);
  }
  
  /* 固定ページ コンテンツ幅をコンテナに揃える */
  .page-container {
    padding: 3rem 0;
  }

  /* News Letter Single Page */
  .single-nl__main {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* =============================
   md以下（〜767px）
   フォントサイズ中間調整
============================= */

@media (max-width: 769px) {

  /* メンバーズバナーエリア */
  .members-banner__half {
    grid-template-columns: 1fr;
  }

  .members-banner__overlay {
    position: static;
    background-color: #000;
    padding: 2rem;
  }

  .members-banner__text {
    max-width: 100%;
  }

  /* フリーバナーエリア */
  .top-freearea-overlay {
    position: static;
    background-color: #000;
    padding: 2rem;
  }

  .top-freearea-text {
    max-width: 100%;
  }

  .section-title {
    font-size: 3.2rem;
  }

  .news-content a {
    font-size: 2.1rem;
  }

  .news-excerpt {
    font-size: 1.6rem;
  }

  /* NEWSサムネイル */
  .news-thumbnail img {
    width: 80%;
    height: auto;
    margin: 0 auto;
    display: block;
  }

  /* 3カラムバナー：全幅パネル表示 */
  #section-column-banner .row {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: calc(50% - 50vw);
    width: 100vw;
    --bs-gutter-x: 0rem;
    --bs-gutter-y: 0;
  }
  
  #section-column-banner .column-banner-item img {
    border-radius: 0;
  }

  #section-column-banner .column-banner-item img {
    border-radius: 0;
  }

  .contact-banner-title,.membership-banner-title {
    font-size: 2.8rem;
  }

  .contact-banner-label,.membership-banner-label {
    font-size: 1.6rem;
  }

  .btn-contact,.btn-membership {
    font-size: 1.8rem;
  }
  
  /* フリーバナーエリア：全幅パネル表示 */
  .top-freearea {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: calc(50% - 50vw);
    width: 100vw;
  }

  .top-freearea img {
    width: 100%;
    display: block;
  }

  /* top-freearea SP：縦積み */
  .top-freearea-overlay {
    position: static;
    background: #000000;
    padding: 1.6rem;
  }
  
  .top-freearea-title {
    font-size: 3.2rem;
    line-height: 1;
    margin-bottom: 0.5rem;
  }
  
  .top-freearea-desc {
    font-size: 1.4rem;
  }

  /* ギターカルーセル：タイトル縦積み */
  #section-guitar .d-flex.align-items-baseline {
    flex-direction: column;
    gap: 0.5rem !important;
  }

 /* PRバナー：MD以下は2列に戻す */
  .pr-swiper-wrapper {
    padding: 0 1rem;
  }
  
  .pr-swiper .swiper-button-prev,.pr-swiper .swiper-button-next {
    color: #fff;
  }
  
  .pr-banner-grid {
    grid-template-columns: 1fr 1fr;
  }

  .store-banner-en {
    font-size: 2.8rem;
  }

  .store-banner-ja {
    font-size: 2.2rem;
  }

  #store-banner-logo img {
    height: 6rem;
  }

  .guitar-card img {
    height: 28rem;
  }

  .guitar-title {
    font-size: 1.5rem;
  }

 /* 固定ページ：シリアルナンバー　テーブル SP */
  .serial-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Custom Shop 一覧 SP */
  .cs-hero__title {
    text-align: center;
  }

  .cs-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cs-dealer-btn {
    padding: 1.6rem 2rem;
    font-size: 2.1rem;
  }
  
  .cs-dealer-note {
    text-align: left;
  }

  /* Custom Shop 詳細 SP */
  .single-cs__main {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .single-cs__gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  /* News Letter Page */
  .nl-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =============================
   sm以下（〜575px）
   フォントサイズ最小調整
============================= */

@media (max-width: 575px) {

  #site-logo img {
    height: 5rem;
  }

  .section-title {
    font-size: 2.8rem;
  }

  .news-content a {
    font-size: 1.8rem;
  }

  .news-excerpt {
    font-size: 1.6rem;
  }

  /* NEWSサムネイル */
  .news-thumbnail img {
    width: 80%;
    height: auto;
    margin: 0 auto;
    display: block;
  }

  .contact-banner-title,.membership-banner-title {
    font-size: 2.4rem;
  }

  .contact-banner-label,.membership-banner-label {
    font-size: 1.5rem;
  }

  .btn-contact,.btn-membership {
    font-size: 1.6rem;
  }

  /* PRバナー：SM以下は2列に戻す */
  .pr-banner-grid {
    grid-template-columns: 1fr 1fr;
  }

  .store-banner-en {
    font-size: 2.2rem;
  }

  .store-banner-ja {
    font-size: 1.8rem;
  }

  #store-banner-logo img {
    height: 5rem;
  }

  .guitar-card img {
    height: 24rem;
  }

  .guitar-title {
    font-size: 1.4rem;
  }

  /* Custom Shop 一覧 SM以下 */
  .cs-grid {
    grid-template-columns: 1fr;
  }

  /* 入会申し込みフォーム */
  .cf7-form-row {
    grid-template-columns: 1fr;
  }

}