/* =============================================
   responsive.css - フェーズ2 スマートフォン対応
   うめい内科医院
   ============================================= */

/* min-width制限を解除（全画面） */
body {
  min-width: 0 !important;
}

/* 画像レスポンシブ化（全画面） */
img {
  max-width: 100%;
  height: auto !important;
}

/* ハンバーガーボタン（デフォルト非表示） */
#menu-toggle {
  display: none;
  background: #198219;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 4px;
  color: #fff;
  font-size: 0.95em;
  font-weight: bold;
  cursor: pointer;
  padding: 6px 12px;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

/* モバイルナビ（デフォルト非表示） */
#mobile-nav {
  display: none;
  background: #198219;
  width: 100%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 200;
}
#mobile-nav.is-open {
  display: block;
}
#mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
#mobile-nav ul li a {
  display: block;
  padding: 14px 20px;
  color: #fff !important;
  text-decoration: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 1em;
  line-height: 1.4;
}
#mobile-nav ul li a:hover,
#mobile-nav ul li a:active {
  background: rgba(255, 255, 255, 0.15);
}
#mobile-nav ul li:last-child a {
  background: #c62828;
  font-weight: bold;
}

.consultation-hours-mobile {
  display: none;
}

/* =============================================
   タブレット・PC（900px以下）コンテナ幅対応
   ============================================= */
@media (max-width: 900px) {
  #hpb-header,
  #hpb-inner,
  #hpb-footer {
    width: 100% !important;
    box-sizing: border-box;
  }
}

/* =============================================
   スマートフォン（768px以下）
   ============================================= */
@media (max-width: 768px) {

  html,
  body {
    min-width: 0 !important;
    overflow-x: hidden;
  }

  body {
    font-size: 87%;
  }

  /* コンテナ */
  #hpb-container {
    max-width: 100% !important;
    overflow-x: hidden;
    background-image: none !important;
  }

  #hpb-header,
  #hpb-inner,
  #hpb-wrapper,
  #hpb-main,
  #hpb-aside,
  #hpb-footer {
    max-width: 100% !important;
  }

  /* ===== ヘッダー ===== */
  #hpb-header {
    width: 100% !important;
    height: auto !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px !important;
    box-sizing: border-box;
    background: #fff;
    border-bottom: 2px solid #b2e2af;
  }

  #hpb-headerMain {
    display: none !important;
  }

  #hpb-headerLogo {
    width: auto !important;
    float: none !important;
  }

  #hpb-headerLogo a {
    width: 150px !important;
    height: 36px !important;
    margin: 0 !important;
    background-size: contain !important;
    background-position: left center !important;
  }

  #hpb-headerExtra1 {
    width: auto !important;
    float: none !important;
    margin-top: 0 !important;
    min-width: 0 !important;
    text-align: right;
    border-top: none !important;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  #hpb-headerExtra1 p.tel {
    font-size: 1em !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    line-height: 1.2;
  }

  /* 「電話でのご予約・お問い合わせは」を非表示 */
  #hpb-headerExtra1 p.tel span {
    display: none !important;
  }

  #hpb-headerExtra1 p.address {
    display: none !important;
  }

  /* ハンバーガーボタン表示 */
  #menu-toggle {
    display: block;
    flex-shrink: 0;
    max-width: 120px;
    padding: 6px 10px;
    font-size: 0.9em;
  }

  /* ===== CTAバー ===== */
  #cta-bar {
    width: 100% !important;
    flex-direction: row !important;
    gap: 5px 8px !important;
    padding: 10px 12px !important;
    font-size: 0.82em !important;
  }

  .cta-divider {
    display: none !important;
  }

  #cta-fever,
  #cta-vaccine {
    width: auto;
    justify-content: center !important;
    gap: 5px !important;
  }

  .cta-btn-red,
  .cta-btn-green {
    font-size: 0.9em;
    padding: 3px 8px;
  }

  /* ===== インナーレイアウト ===== */
  #hpb-inner {
    width: 100% !important;
    padding-top: 8px !important;
    position: static !important;
    box-sizing: border-box;
  }

  /* PCナビ（タブ型横並び）非表示 */
  #hpb-nav {
    display: none !important;
  }

  /* メインコンテンツ */
  #hpb-wrapper {
    width: 100% !important;
    float: none !important;
    box-sizing: border-box;
    padding: 0 12px;
  }

  #hpb-main {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    float: none !important;
    padding-top: 0 !important;
    box-sizing: border-box;
  }

  .hpb-layoutset-01 #hpb-main,
  .hpb-layoutset-01 #hpb-aside {
    padding-top: 0 !important;
  }

  /* ページタイトル */
  #hpb-title {
    width: 100% !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
  }

  /* ヒーロー画像（トップページ） */
  .hpb-top-image {
    min-height: 0 !important;
    height: auto !important;
    width: 100% !important;
    margin-bottom: 12px;
    display: block !important;
    background-image: none !important;
  }

  .hpb-top-image h2 {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    background-image: none !important;
  }

  /* サイドバー */
  #hpb-aside {
    width: 100% !important;
    float: none !important;
    box-sizing: border-box;
    padding: 12px 12px 16px !important;
    clear: both;
  }

  #banner ul {
    display: flex !important;
    gap: 10px;
    margin-bottom: 10px !important;
  }

  #banner li {
    width: auto !important;
    flex: 1;
    margin: 0 !important;
  }

  #banner li a:link,
  #banner li a:visited {
    width: 100% !important;
    text-align: center !important;
    box-sizing: border-box;
    height: 44px !important;
    line-height: 44px !important;
    text-indent: 0 !important;
    background-size: cover !important;
  }

  /* ===== フッター ===== */
  #hpb-footer {
    width: 100% !important;
    box-sizing: border-box;
    margin: 0 !important;
  }

  /* ===== テーブル（診療時間など） ===== */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    font-size: 0.9em;
  }

  table th,
  table td {
    padding: 6px 10px !important;
    white-space: nowrap;
  }

  #info table {
    display: none;
  }

  .consultation-hours-mobile {
    display: block;
    margin: 10px 0 12px;
    border-top: 1px solid #d8e8d4;
    border-bottom: 1px solid #d8e8d4;
    background: #fbfdfb;
  }

  .consultation-hours-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #e6efe4;
  }

  .consultation-hours-row:last-child {
    border-bottom: none;
  }

  .consultation-hours-time {
    flex: 0 0 118px;
    color: #333333;
    font-weight: bold;
    line-height: 1.6;
  }

  .consultation-hours-days {
    flex: 1;
    color: #333333;
    line-height: 1.6;
  }

  /* ===== トップページ ===== */
  #toppage-text .large {
    background-image: none !important;
    font-size: 1.1em !important;
  }

  /* ===== アラートボックス ===== */
  .alert-fever,
  .alert-ai {
    margin: 8px 0 !important;
  }

  /* ===== アクセスページ ===== */
  .map-wrap iframe {
    height: 240px;
  }

  .map-navi-btn {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    display: block !important;
    margin-top: 8px;
  }

  /* ===== パラグラフ余白調整 ===== */
  p {
    padding-right: 0.3em !important;
    padding-left: 0.3em !important;
  }

  #hpb-main ul li {
    padding-left: 16px;
  }

  /* ===== float画像をモバイルで中央 ===== */
  #hpb-main img.right {
    float: none !important;
    display: block;
    margin: 10px auto !important;
  }

  #hpb-main img.left {
    float: none !important;
    display: block;
    margin: 10px auto !important;
  }

}

@media (max-width: 340px) {
  #hpb-headerExtra1 p.tel {
    display: none !important;
  }

  #menu-toggle {
    padding: 6px 8px;
    font-size: 0.85em;
  }
}
