/* ========================================
6つのpointページ
   ======================================== */
.point-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.category-container {
  border: 3px solid #4CAF50;
  padding: 30px 25px;
  max-width: 850px;
  margin: 0 auto;
  margin-bottom: 20px;
}

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

.category {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.category-icon {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.category-icon img {
  max-width: 100%;
  max-height: 120px;
  width: auto;
  height: auto;
}
.wide-icon .category-icon img {
  max-width: 200px; 
  max-height: 176px;
}
.category-title {
  font-size: 1em;
  font-weight: bold;
  line-height: 1.5;
  color: #333 !important;
  display: block !important;
  width: 100%;
  margin-top: 10px;
  text-align: center;
}

.speech-bubble {
  position: relative;
  background: #FAFAFA;
  border: 1px solid #565656;
  border-radius: 15px;
  padding: 15px 20px;
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.6;
  z-index: 10;
}

.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 20px solid #FAFAFA;
  z-index: 10;
}

.speech-bubble::before {
  content: '';
  position: absolute;
  bottom: -21px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent; 
  border-top: 21px solid #565656;  
  z-index: 10;
}

.info-with-image {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.info-image-wrapper {
  width: 200px;
  flex-shrink: 0;
}

.merit-navigation {
  background: #f5faf5;
  border: 3px solid #4CAF50;
  border-radius: 10px;
  padding: 25px;
  margin: 30px 0 40px 0;
}

.merit-nav-title {
  font-size: 2.0em;
  font-weight: bold;
  text-align: left;
  margin-bottom: 80px;
  color: #2e7d32;
  position: relative;
  z-index: 10;
}

.merit-nav-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  position: relative;
  margin-bottom: 40px;
  z-index: 1;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.merit-nav-grid::before {
  content: '';
  position: absolute;
  top: -50px;
  left: -70px;
  right: -70px;
  bottom: -50px;
  background-image: url('/kentou/tokucho/images/back01.jpg'); 
  background-size: 100%;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.8;
  z-index: -1;
  border-radius: 20px;
}

.merit-nav-item {
  background: white;
  border: 3px solid #a5d6a7;
  border-radius: 8px;
  padding: 5px 8px;
  text-align: center;
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  position: relative;
  z-index: 1;
}

.merit-nav-item:hover {
  background: #e8f5e8;
  border-color: #4CAF50;
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(76, 175, 80, 0.2);
  text-decoration: none;
}

.merit-number {
  font-weight: bold;
  font-size: 1.5em;
  display: block;
  margin-bottom: 3px;
  color: #CC3300;
}

.merit-nav-item small {
  font-size: 1em; 
  font-weight: normal;
  color: #666;
  line-height: 1.4;
}

table.hojo-table {
  border-collapse: collapse;
  width: 100%;
  max-width: 1200px;
}

table.hojo-table td {
  border: 1px solid #000;
  padding: 8px;
}

table.hojo-table td[rowspan], 
table.hojo-table td[colspan] {
  text-align: center;
  vertical-align: middle;
}

.point-divider {
  border: none;
  border-top: 3px solid var(--accent-green-dark);
  margin: 3rem 0;
  width: 100%;
}

/* テーブルレスポンシブ対応用 */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ========================================
   税制優遇の試算例 - PC用デフォルト
   ======================================== */
.tax-example-wrapper {
  display: flex;
  gap: 30px;
  align-items: flex-end;
  margin-top: 20px;
}

.tax-calculation {
  flex: 8;
}

.tax-illustration {
  flex: 2;
  text-align: center;
}

/* ========================================
   レスポンシブ対応
   ======================================== */

/* タブレット (1024px以下) */
@media (max-width: 1024px) {
  .merit-nav-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .category-container {
    padding: 20px 15px;
  }
  
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 15px;
  }
}

/* タブレット縦・大きめスマホ (768px以下) */
@media (max-width: 768px) {
  /* ===================
     共通: info-with-image（図とイラストの縦並び）
     =================== */
  .info-with-image {
    flex-direction: column !important;
    gap: 20px !important;
  }
  
  .info-with-image > div {
    width: 100% !important;
    flex: none !important;
  }
  
  /* 一般的な画像サイズ（デフォルト） */
  .info-with-image img {
    max-width: 80% !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
  }
  
  /* 吹き出し+イラストのコンテナ（ポイント1など） */
  .info-with-image .info-image-wrapper {
    width: 100% !important;
    max-width: 180px !important;
    margin: 0 auto !important;
  }
  
  /* info-image-wrapper内の画像は小さめに */
  .info-with-image .info-image-wrapper img {
    max-width: 100% !important;
    width: 100% !important;
  }
  
  /* 緑枠のパディング調整 */
  .info-with-image > div[style*="border: 3px solid #4CAF50"] {
    padding: 15px !important;
  }
  
  /* ===================
     見出し調整
     =================== */
  h1 {
    font-size: 1.5rem !important;
    line-height: 1.4;
  }
  
  h2 {
    font-size: 1.3rem;
  }
  
  h6 {
    font-size: 1.1rem;
  }
  
  /* ===================
     カテゴリコンテナ（加入できる方）
     =================== */
  .category-container {
    padding: 20px 15px;
    margin-bottom: 15px;
  }
  
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 15px;
  }
  
  .category {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 150px;
  }
  
  .category-icon {
    height: 100px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .category-icon img {
    max-width: 120% !important;
    max-height: 100px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
  }
  
  .category-title {
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
    color: #333 !important;
    display: block !important;
    width: 100%;
  }
  
  /* ===================
     メリットナビゲーション
     =================== */
  .merit-nav-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .merit-nav-grid::before {
    top: -30px;
    left: -30px;
    right: -30px;
    bottom: -30px;
  }
  
  .merit-nav-item {
    padding: 8px 5px;
    min-height: 60px;
  }
  
  .merit-nav-item small {
    font-size: 0.85rem;
  }
  
  /* ===================
     吹き出し
     =================== */
  .speech-bubble {
    font-size: 12px;
    padding: 10px 15px;
  }
  
  /* ===================
     テーブル
     =================== */
  .table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 20px 0;
  }
  
  table.hojo-table {
    display: table;
    width: 100%;
    min-width: 600px;
    font-size: 11px;
    border-collapse: collapse;
  }
  
  table.hojo-table td {
    padding: 5px 3px;
    min-width: auto;
    white-space: normal;
    font-size: 11px;
  }

  /* ===================
     税制優遇の試算例
     =================== */
  .tax-example-wrapper {
    flex-direction: column !important;
    gap: 20px !important;
  }
  
  .tax-calculation {
    padding: 20px !important;
  }
  
  .tax-illustration {
    margin-top: 20px;
    max-width: 180px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  .tax-illustration img {
    max-width: 100% !important;
    width: 100% !important;
  }
}

/* 小さいスマートフォン (480px以下) */
@media (max-width: 480px) {
  .info-with-image > div[style*="border"] {
    padding: 15px !important;
  }
  
  .info-with-image img {
    max-width: 90% !important;
  }
  
  h1 {
    font-size: 1.3rem !important;
  }
  
  h2 {
    font-size: 1.1rem;
  }
  
  /* ポイントナビゲーションは2列を維持 */
  .merit-nav-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .merit-nav-grid::before {
    top: -20px;
    left: -15px;
    right: -15px;
    bottom: -20px;
  }
  
  .merit-nav-item {
    padding: 8px 5px;
    font-size: 0.85rem;
  }
  
  /* カテゴリグリッド（加入できる方）は1列 */
  .grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .category-icon {
    height: 100px;
  }
  
  .category-icon img {
    max-height: 100px !important;
  }
  
  .category-title {
    font-size: 0.9rem !important;
  }
  
  .category-container {
    padding: 15px 10px;
  }
  
  table.hojo-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    font-size: 10px;
    min-width: 100%;
  }
  
  table.hojo-table td {
    padding: 3px;
    min-width: 50px;
  }
  
  img[src*="image"] {
    max-width: 100% !important;
    height: auto !important;
  }
  
  .speech-bubble {
    font-size: 11px;
    padding: 8px 12px;
  }
  
  div[style*="font-size: 18px"] span {
    font-size: 16px !important;
  }
  
  div[style*="border: 3px solid"] {
    padding: 10px !important;
  }
  
  div[style*="background-color: #e3f2fd"] {
    padding: 15px !important;
    font-size: 14px;
  }
  
  h1[id^="point"] {
    margin-top: 30px !important;
  }
}