/*
 * Responsive Styles - New Kumehome Theme
 * レスポンシブ対応（モバイル・タブレット）
 */

/* ======= Hamburger Menu Button ======= */
.menu-toggle {
  display: none;
}

/* ======= Sidebar Overlay ======= */
.sidebar-overlay {
  display: none;
}

@media (max-width: 960px) {
  /* Hamburger Button */
  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1001;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: background-color 0.2s ease;
  }

  .menu-toggle:hover,
  .menu-toggle:focus {
    background: rgba(255, 255, 255, 1);
  }

  .menu-toggle:focus {
    outline: 2px solid #02358f;
    outline-offset: 2px;
  }

  .hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #02358f;
    border-radius: 1px;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  /* Hamburger to X animation */
  .menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Sidebar Overlay */
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .sidebar-overlay.is-visible {
    display: block;
    opacity: 1;
  }

  /* Sidebar - Off-canvas */
  .site-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    width: min(80vw, 320px);
    max-width: 320px;
    height: 100dvh;
    min-height: 100dvh;
    background: #fff;
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
  }

  .site-sidebar.is-open {
    transform: translateX(0);
  }

  .site-sidebar .logo {
    height: auto;
    max-height: 180px;
    margin: 24px auto 16px;
  }

  .site-sidebar .sidebar-navigation,
  .site-sidebar .sidebar-widgets,
  .site-sidebar .copy {
    padding: 0 20px;
  }

  .site-sidebar .link li a {
    font-size: var(--font-size-lg) !important;
    padding: 14px 8px;
  }

  .site-sidebar .copy {
    padding-bottom: 24px;
  }

  /* Body scroll lock when menu is open */
  body.menu-open {
    overflow: hidden;
  }

  /* Layout adjustments */
  .site-layout {
    flex-direction: column;
  }

  /* Section Titles */
  .section-title.is-lined::before,
  .section-title.is-lined::after {
    width: 15%;
    flex-grow: 0;
  }

  .section-title {
    margin-bottom: 16px;
  }

  /* Header */
  .site-header {
    padding: 0;
    align-items: stretch;
  }

  .site-shell {
    width: 100%;
  }

  .site-header-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .site-header-top nav {
    justify-content: center;
    width: 100%;
  }

  /* Main Content */
  .site-main {
    padding: 20px;
  }

  /* Footer */
  .site-footer {
    padding: 0;
  }

  .site-footer .site-info {
    justify-content: center;
    text-align: center;
  }
}

/* モバイル専用改行クラス */
.sp-only {
  display: none;
}

@media (max-width: 480px) {
  .sp-only {
    display: inline;
  }
}
