/**
 * レスポンシブ対応スタイル
 *
 * @package hyottoko
 * @version 1.0.0
 */

/* ハンバーガーメニュー（デスクトップでは非表示） */
.hamburger-menu {
  display: none;
}

.mobile-menu,
.mobile-menu-overlay {
  display: none;
}

/* 768px以下（タブレット・スマートフォン） */
@media screen and (max-width: 768px) {
  /* 両側の背景を非表示 */
  .left-background,
  .right-background {
    display: none;
  }

  /* 中央コンテンツを全幅に */
  .site-container {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  /* ハンバーガーメニューボタン */
  .hamburger-menu {
    display: block;
    position: fixed;
    top: .5rem;
    right: 1rem;
    z-index: 1000;
    width: 40px;
    height: 40px;
    background-color: #E50012;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
  }

  .hamburger-menu span {
    display: block;
    width: 24px;
    height: 3px;
    background-color: #fff;
    transition: all 0.3s;
    position: relative;
  }

  .hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 8px;
  }

  .hamburger-menu.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg);
    top: -8px;
  }

  /* モバイルメニュー */
  .mobile-menu {
    display: block;
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: #fff;
    z-index: 999;
    transition: right 0.3s;
    overflow-y: auto;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
  }

  .mobile-menu.active {
    right: 0;
  }

  .mobile-menu-overlay {
    display: block;
  }

  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
  }

  .mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .mobile-menu-header {
    padding: 1rem;
    background-color: #E50012;
    color: #fff;
    font-weight: bold;
    text-align: center;
  }

  .mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .mobile-menu-list li {
    border-bottom: 1px solid #e0e0e0;
  }

  .mobile-menu-list a {
    display: block;
    padding: 1rem;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s;
  }

  .mobile-menu-list a:hover,
  .mobile-menu-list a:focus {
    background-color: #f5f5f5;
  }

  .mobile-menu-list a.active {
    background-color: #FFE5E5;
    color: #E50012;
    font-weight: bold;
  }

  /* モバイルSNSアイコン */
  .mobile-sns {
    padding: 1rem;
    border-top: 1px solid #e0e0e0;
  }

  .mobile-sns-list {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 0;
    margin: 0;
  }

  .mobile-sns-list li {
    border-bottom: none;
  }

  .mobile-sns-icon {
    width: 32px;
    height: 32px;
  }

  /* フッターバナー広告カルーセル（モバイル対応） */
  .footer-banner-carousel {
    padding: 0 0.5rem;
  }

  .footer-banner-carousel--single .banner-carousel-track {
    transform: none !important;
  }

  .banner-carousel-wrapper {
    max-width: 100%;
  }

  /* 画像幅200pxに合わせる（JSの translate 計算と一致させる） */
  .banner-carousel-slide {
    width: 200px;
    box-sizing: border-box;
    margin: 0 5px;
  }

  .banner-image {
    width: 200px;
    height: 96px;
  }

  .banner-caption {
    font-size: 0.75rem;
    padding: 0.25rem 0;
  }

  .banner-carousel-dots {
    gap: 0.25rem;
    margin-top: 0.5rem;
  }

  .banner-dot {
    width: 10px;
    height: 10px;
  }
}
