@charset "UTF-8";
/* common.css - 全ページで共通のスタイル */

/* リセットスタイル */
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 横スクロール防止 */
html, body{
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  position: relative;
}

body{
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
  padding-top: 70px; /* ヘッダーの高さ分のパディング */
}

.container{
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
  overflow: hidden; /* コンテナがはみ出さないようにする */
}

/* 画像が画面からはみ出さないように */
img{
  max-width: 100%;
  height: auto;
}

/* ヘッダー */
header{
  background-color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%; /* 追加：幅を100%に設定して確実に固定 */
}

.header-inner{
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo{
  display: block;
  text-decoration: none;
}

.logo img{
  height: 40px;
  vertical-align: middle;
}

/* デスクトップナビゲーション */
.nav-desktop{
  display: none;
}

@media (min-width: 768px) {
  .nav-desktop{
    display: block;
  }
}

.nav-desktop ul{
  display: flex;
  list-style: none;
}

.nav-desktop li{
  margin-left: 30px;
}

.nav-desktop a{
  text-decoration: none;
  color: #333;
}

.nav-desktop a:hover{
  color: #3a86ff;
}

/* モバイルメニューボタン */
.menu-button{
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative; /* 追加：相対位置設定 */
  z-index: 1600; /* 追加：z-indexを上げる */
}

@media (min-width: 768px) {
  .menu-button{
    display: none;
  }
}

/* モバイルナビゲーション */
.mobile-nav{
  position: fixed;
  top: 0;
  right: -250px;
  width: 250px;
  height: 100%;
  background-color: white;
  z-index: 1500;
  transition: right 0.3s ease;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
  padding: 70px 0 20px;
}

.mobile-nav.open{
  right: 0;
}

.mobile-nav ul{
  list-style: none;
}

.mobile-nav li{
  margin-bottom: 5px;
}

.mobile-nav a{
  font-size: 1.1rem;
  text-decoration: none;
  color: #333;
  display: block;
  padding: 12px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.mobile-nav a:hover{
  background-color: #f8f9fa;
}

.menu-overlay{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1400;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.menu-overlay.open{
  opacity: 1;
  visibility: visible;
}

.close-button{
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 2000;
}

/* セクション共通 */
.section{
  padding: 40px 0; /* 標準の50pxから40pxに縮小 */
}

.section-title{
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 25px; /* 標準の30pxから25pxに縮小 */
}

/* プロバイダー比較セクションの上部余白調整 */
#providers{
  padding-top: 30px; /* 標準の50pxから30pxに縮小 */
}

/* タブセクション - 横スクロール */
.tab-container{
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 25px; /* 標準の30pxから25pxに縮小 */
  max-width: 100%; /* はみ出し防止 */
}

.tab-scroll{
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  padding: 10px;
  background: #f0f4f8;
  scrollbar-width: thin;
  scrollbar-color: #3a86ff #f0f4f8;
}

.tab-scroll::-webkit-scrollbar {
  height: 3px;
}

.tab-scroll::-webkit-scrollbar-thumb {
  background: #3a86ff;
  border-radius: 10px;
}

.tab-scroll::-webkit-scrollbar-track {
  background: #f0f4f8;
}

.tab-buttons{
  display: inline-flex; /* インラインでフレックス表示 */
  min-width: 100%; /* スクロール可能にする */
}

.tab-button{
  padding: 8px 16px;
  margin-right: 8px;
  border: none;
  background: #e6f0ff;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s;
  white-space: nowrap; /* 文字を折り返さない */
  flex-shrink: 0; /* 縮小しない */
}

.tab-button:last-child{
  margin-right: 0;
}

.tab-button.active{
  background-color: #3a86ff;
  color: white;
}

.tab-content{
  display: none;
  padding: 20px;
}

.tab-content.active{
  display: block;
  animation: fadeIn 0.5s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* テーブルスタイル */
.table-responsive{
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  max-width: 100%;
  /* 垂直スクロール設定を削除 */
  max-height: none;
  overflow-y: visible;
}

.table-responsive table{
  width: 100%;
  min-width: 650px; /* 横スクロールを保証するための最小幅を設定 */
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.table-responsive th,
.table-responsive td{
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
  white-space: normal !important;
  background-color: white;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  line-height: 1.4;
  vertical-align: top;
  max-width: 300px;
  font-size: 0.95rem;
  hyphens: auto;
  overflow: hidden;
}

.table-responsive th{
  background-color: #f8f9fa;
  font-weight: bold;
  border-bottom: 2px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 2;
}

.table-responsive thead tr{
  position: sticky;
  top: 0;
  z-index: 2;
}

.table-responsive tbody tr:hover{
  background-color: #f5f8ff;
}

/* 左側固定列スタイル */
.table-responsive th:first-child,
.table-responsive td:first-child{
  position: sticky;
  left: 0;
  z-index: 1;
  border-right: 2px solid #e0e0e0;
  background-color: white !important;
  min-width: 140px;
  max-width: 140px;
  width: 140px;
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
}

.table-responsive th:first-child{
  z-index: 3;
  background-color: #f8f9fa !important;
}

/* ホバー効果 */
.table-responsive tbody tr:hover td{
  background-color: #f5f8ff;
}

.table-responsive tbody tr:hover td:first-child{
  background-color: #edf3ff !important;
}

/* スクロールヒント */
.scroll-hint{
  display: none;
  text-align: center;
  color: #666;
  font-size: 0.8rem;
  padding: 5px 0;
  background-color: #f8f9fa;
  border-radius: 4px;
  margin-bottom: 5px;
}

/* 列幅の明示的な設定 */
.table-responsive th:nth-child(2),
.table-responsive td:nth-child(2){
  min-width: 120px;
  max-width: 140px;
  width: 130px;
}

.table-responsive th:nth-child(3),
.table-responsive td:nth-child(3),
.table-responsive th:nth-child(4),
.table-responsive td:nth-child(4){
  min-width: 100px;
  max-width: 120px;
  width: 110px;
}

.table-responsive th:nth-child(5),
.table-responsive td:nth-child(5){
  min-width: 100px;
  max-width: 130px;
  width: 120px;
}

.table-responsive th:nth-child(6),
.table-responsive td:nth-child(6){
  min-width: 120px;
  max-width: 180px;
  width: 140px;
}

/* 特定の表用のスタイル - eSIM比較タブ */
#compare-tab .table-responsive th:first-child,
#compare-tab .table-responsive td:first-child,
#prices-tab .table-responsive th:first-child,
#prices-tab .table-responsive td:first-child,
#coverage-tab .rating-table th:first-child,
#coverage-tab .rating-table td:first-child,
#speed-tab .table-responsive th:first-child,
#speed-tab .table-responsive td:first-child,
#support-tab .table-responsive th:first-child,
#support-tab .table-responsive td:first-child{
  position: sticky;
  left: 0;
  z-index: 1;
  border-right: 2px solid #e0e0e0;
  background-color: white !important;
}

/* eSIM比較表の調整 */
#compare-tab .table-responsive td:first-child,
#prices-tab .table-responsive td:first-child{
  width: 130px;
  min-width: 130px;
  max-width: 130px;
}

/* カバレッジ評価テーブル調整 */
#coverage-tab .rating-table td{
  text-align: center;
  white-space: nowrap !important;
  width: 100px;
  min-width: 100px;
  max-width: 100px;
}

#coverage-tab .rating-table th:first-child,
#coverage-tab .rating-table td:first-child{
  width: 130px;
  min-width: 130px;
  max-width: 130px;
  text-align: left;
  white-space: normal !important;
}

/* カバレッジタブの評価テーブル対応 */
#coverage-tab .rating-table th{
  position: sticky;
  top: 0;
  z-index: 2;
}

/* 時間帯別の平均速度変化表の調整 */
#speed-tab .mini-table th,
#speed-tab .mini-table td{
  width: 100px;
  min-width: 100px;
  max-width: 100px;
  text-align: center;
}

#speed-tab .mini-table th:first-child,
#speed-tab .mini-table td:first-child{
  width: 130px;
  min-width: 130px;
  max-width: 130px;
  text-align: left;
}

/* 時間帯別平均速度変化表の対応 */
#speed-tab .speed-details .table-responsive th{
  position: sticky;
  top: 0;
  z-index: 2;
}

/* トラブル別の対応力比較表の調整 */
#support-tab .mini-table th,
#support-tab .mini-table td{
  width: 100px;
  min-width: 100px;
  max-width: 100px;
  text-align: center;
}

#support-tab .mini-table th:first-child,
#support-tab .mini-table td:first-child{
  width: 140px;
  min-width: 140px;
  max-width: 140px;
  text-align: left;
}

/* サポート体制詳細タブの対応 */
#support-tab .support-comparison .table-responsive th{
  position: sticky;
  top: 0;
  z-index: 2;
}

/* ヘッダーと左列の角部分のスタイル */
#compare-tab .table-responsive th:first-child,
#prices-tab .table-responsive th:first-child,
#coverage-tab .rating-table th:first-child,
#speed-tab .table-responsive th:first-child,
#support-tab .table-responsive th:first-child,
.sub-section .mini-table th:first-child,
.cost-comparison .mini-table th:first-child{
  z-index: 3;
  background-color: #f8f9fa !important;
}

/* インターネット事情のモバイルネットワーク状況表 */
.sub-section .mini-table th:first-child,
.sub-section .mini-table td:first-child{
  position: sticky;
  left: 0;
  z-index: 1;
  border-right: 2px solid #e0e0e0;
  background-color: white !important;
  min-width: 100px;
  max-width: 100px;
  width: 100px;
  white-space: normal !important;
  word-break: break-word !important;
}

/* データ通信コスト表 */
.cost-comparison .mini-table th:first-child,
.cost-comparison .mini-table td:first-child{
  position: sticky;
  left: 0;
  z-index: 1;
  border-right: 2px solid #e0e0e0;
  background-color: white !important;
  min-width: 120px;
  max-width: 120px;
  width: 120px;
  white-space: normal !important;
  word-break: break-word !important;
}

/* ミニテーブルの列幅設定 */
.mini-table th:nth-child(2),
.mini-table td:nth-child(2),
.mini-table th:nth-child(3),
.mini-table td:nth-child(3),
.mini-table th:nth-child(4),
.mini-table td:nth-child(4),
.mini-table th:nth-child(5),
.mini-table td:nth-child(5){
  min-width: 100px;
  max-width: 100px;
  width: 100px;
  white-space: normal !important;
  word-break: break-word !important;
  font-size: 0.9rem;
}

/* 表内スクロール調整 - インターネット事情セクションの特別な対応 */
#internet-info .table-responsive{
  overflow-x: auto;
  overflow-y: visible;
}

/* コンテナのスクロール設定を明示的に調整 */
.sub-section .table-responsive,
.coverage-map .table-responsive,
.speed-details .table-responsive,
.support-comparison .table-responsive,
.cost-comparison .table-responsive{
  max-height: none;
  overflow-y: visible;
}

/* カードスタイル */
.card-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 100%;
}

.card{
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  max-width: 100%;
  box-sizing: border-box;
}

.card:hover{
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 利用ポイントセクション内のカード影の修正 */
#tips .card{
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#tips .card:hover{
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 特に注意点カードの影を強調 */
#tips .card:nth-child(4){
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.card-body{
  padding: 20px;
}

.card-title{
  font-size: 1.2rem;
  margin-bottom: 15px;
}

ul{
  padding-left: 20px;
}

.text-success{
  color: #2ecc71;
}

.text-danger{
  color: #e74c3c;
}

/* フッター */
footer{
  background-color: #2d3748;
  color: white;
  padding: 50px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 30px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer-title{
  font-size: 1.2rem;
  margin-bottom: 15px;
}

.footer-links{
  list-style: none;
  padding-left: 0; /* 追加：左パディングをリセット */
}

.footer-links li{
  margin-bottom: 10px;
}

.footer-links a{
  color: #cbd5e0;
  text-decoration: none;
}

.footer-links a:hover{
  color: white;
}

.footer-bottom{
  border-top: 1px solid #4a5568;
  margin-top: 30px;
  padding-top: 20px;
  text-align: center;
  color: #a0aec0;
}

/* ページトップボタン */
.page-top-btn{
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #3a86ff;
  color: white;
  border: none;
  border-radius: 50px;
  padding: 10px 15px;
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 900;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-top-btn:hover{
  background-color: #1a56db;
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-top-btn.visible{
  opacity: 1;
  visibility: visible;
}

/* スクロールバーのカスタマイズ */
.table-responsive::-webkit-scrollbar {
  height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: #3a86ff;
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: #1a56db;
}

/* Firefox用スクロールバー */
.table-responsive {
  scrollbar-width: thin;
  scrollbar-color: #3a86ff #f1f1f1;
}

/* モバイル対応 */
@media (max-width: 767px) {
  /* ヘッダー固定対応 */
  header{
    position: fixed !important; /* 追加：確実に固定するための!important */
  }
  
  /* カード/グリッド */
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  /* ページトップボタン */
  .page-top-btn{
    bottom: 20px;
    right: 20px;
    padding: 8px 12px;
    font-size: 0.8rem;
  }
  
  /* スクロールヒント要素の非表示化 */
  .scroll-hint{
    display: none !important;
  }
  
  /* スクロールヒントの統一表示 */
  .table-responsive::before{
    content: '← 表は横にスクロールできます →' !important;
    display: block;
    text-align: center;
    font-size: 0.8rem;
    color: #666;
    padding: 5px 0;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    left: 0;
    top: 0;
    z-index: 4;
    width: 100%;
  }
  
  /* スクロールヒントの下にヘッダーが来るように調整 */
  .table-responsive th{
    top: 28px;
  }
  
  /* 右端のスクロールインジケーター */
  .table-responsive::after{
    content: '' !important;
    position: absolute;
    top: auto;
    right: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(to right, rgba(255,255,255,0), rgba(248,249,250,0.7));
    pointer-events: none;
    z-index: 2;
  }
  
  /* 親コンテナで横スクロールを制御 */
  .sub-section .table-responsive,
  .coverage-map .table-responsive,
  .speed-details .table-responsive,
  .support-comparison .table-responsive,
  .cost-comparison .table-responsive{
    max-width: 100%;
    overflow-x: auto;
    max-height: none;
    overflow-y: visible;
  }
  
  /* 左列の固定幅を設定（モバイルでの視認性向上） */
  .table-responsive th:first-child,
  .table-responsive td:first-child{
    min-width: 110px;
    max-width: 110px;
    width: 110px;
    font-size: 0.85rem;
    padding: 8px 10px;
  }
  
  /* ミニテーブルの左列幅調整 */
  .mini-table th:first-child,
  .mini-table td:first-child,
  .rating-table th:first-child,
  .rating-table td:first-child{
    min-width: 100px;
    max-width: 100px;
    width: 100px;
    font-size: 0.85rem;
  }
  
  /* 左列のテキスト調整 */
  .table-responsive th:first-child{
    font-size: 0.9rem;
    line-height: 1.3;
  }
  
  /* 左列以外の列の幅を調整 */
  .table-responsive th:not(:first-child),
  .table-responsive td:not(:first-child){
    min-width: 80px;
    max-width: 100px;
    width: 90px;
    padding: 8px 10px;
    font-size: 0.85rem;
  }
  
  /* ミニテーブルのセルサイズ調整 */
  .mini-table th:not(:first-child),
  .mini-table td:not(:first-child){
    min-width: 80px;
    max-width: 80px;
    width: 80px;
    font-size: 0.8rem;
    padding: 6px 8px;
  }
  
  /* カバレッジ評価テーブルのスター表示をコンパクトに */
  #coverage-tab .rating-table td{
    font-size: 0.8rem;
    padding: 6px 8px;
    min-width: 70px;
    max-width: 70px;
    width: 70px;
  }
  
  /* モバイルでの背景色の強制適用 */
  .table-responsive tbody tr:hover td:first-child{
    background-color: #edf3ff !important;
  }
  
  .table-responsive td:first-child{
    background-color: white !important;
  }
  
  .table-responsive th:first-child{
    background-color: #f8f9fa !important;
  }
  
  /* モバイルでのセル内テキストのフォントサイズ調整 */
  .table-responsive td{
    font-size: 0.9rem;
  }
}

/* タブレット表示の最適化 */
@media (min-width: 768px) and (max-width: 991px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 高解像度ディスプレイ対応 */
@media (min-width: 1200px) {
  .container{
    max-width: 1140px;
  }
}

/* ミニテーブルのヘッダー重複問題を修正 */

/* ミニテーブル共通の修正 */
.mini-table{
  border-collapse: separate !important;
  border-spacing: 0;
}

/* ミニテーブルのヘッダー修正 */
.mini-table th{
  position: sticky;
  top: 0;
  z-index: 2;
  background-color: #f0f7ff !important; /* ミニテーブル特有の背景色を強制 */
}

/* ミニテーブルの左上セル修正 */
.mini-table th:first-child{
  position: sticky;
  left: 0;
  top: 0;
  z-index: 3;
  background-color: #f0f7ff !important; /* ミニテーブル特有の背景色を強制 */
}

/* ミニテーブルの親コンテナ調整 */
.sub-section .table-responsive,
.speed-details .table-responsive,
.support-comparison .table-responsive,
.cost-comparison .table-responsive{
  max-height: none !important;
  overflow-y: visible !important;
  overflow-x: auto;
  position: relative;
}

/* 特定のミニテーブル調整 - インターネット事情 */
#internet-info .mini-table th{
  background-color: #f0f7ff !important;
  position: sticky;
  top: 0;
  z-index: 2;
}

#internet-info .mini-table th:first-child{
  z-index: 3;
}

/* 時間帯別平均速度変化表の個別調整 */
#speed-tab .mini-table th{
  background-color: #f0f7ff !important;
  position: sticky;
  top: 0;
  z-index: 2;
}

/* トラブル別対応力比較表の個別調整 */
#support-tab .mini-table th{
  background-color: #f0f7ff !important;
  position: sticky;
  top: 0;
  z-index: 2;
}

/* モバイル表示時のミニテーブル調整 */
@media (max-width: 767px) {
  .mini-table th{
    top: 28px; /* スクロールヒントの下に配置 */
  }
  
  /* 地域別カバレッジ詳細のミニテーブル調整 */
  #coverage-tab .rating-table th{
    top: 28px;
  }
  
  /* ミニテーブルの外枠にスクロールヒントを適用 */
  .sub-section .table-responsive::before,
  .coverage-map .table-responsive::before,
  .speed-details .table-responsive::before,
  .support-comparison .table-responsive::before,
  .cost-comparison .table-responsive::before,
  #internet-info .table-responsive::before{
    content: '← 表は横にスクロールできます →' !important;
    display: block;
    text-align: center;
    font-size: 0.8rem;
    color: #666;
    padding: 5px 0;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    left: 0;
    top: 0;
    z-index: 4;
    width: 100%;
  }
}