/*
 * Theme Name: REHUB Child - Ashigara Biyori
 * Template: rehub_tcd099
 * Description: 足柄びより カスタム子テーマ — Next.jsデザインシステム移植版
 * Version: 1.0.0
 * Author: Ashigara Biyori Design Team
 */

/* ==========================================================================
   1. CSS Custom Properties (REHUB上書き + 独自変数)
   ========================================================================== */
:root {
  /* --- REHUB変数の上書き --- */
  --tcd-accent-color: #2D9B83;
  --tcd-bg-color: 247, 250, 250;          /* #F7FAFA をRGB分解 */
  --tcd-link-color: #1A6B5A;

  /* --- 足柄びより デザインシステム変数 --- */
  --as-primary: #1A6B5A;
  --as-accent: #2D9B83;
  --as-cta: #E67635;
  --as-sub: #5BA8A0;
  --as-bg-warm: #F7FAFA;
  --as-bg-base: #f5f5f5;
  --as-text-main: #374151;
  --as-text-light: #6B7280;
  --as-text-muted: #9CA3AF;
  --as-border: #E5E7EB;
  --as-border-light: #F3F4F6;

  /* プロバイダー別カラー（アフィリエイト用） */
  --as-booking: #003580;
  --as-booking-hover: #00264D;
  --as-rakuten: #BF0000;
  --as-rakuten-hover: #990000;
  --as-jalan: #FF6600;
  --as-jalan-hover: #E55B00;
  --as-asoview: #00B900;
  --as-asoview-hover: #00A000;
  --as-activity: #00897B;
  --as-activity-hover: #00796B;

  /* レイアウト */
  --as-max-width: 1160px;
  --as-article-width: 850px;

  /* フォントサイズ基本値 */
  --as-body-size: 1.125rem;    /* 18px = lg */
  --as-body-size-md: 1.25rem;  /* 20px = xl */
  --as-body-lh: 2.0;
}

/* ==========================================================================
   2. Google Fonts (フォールバック用 — functions.phpで読み込み済み)
   ========================================================================== */

/* ==========================================================================
   3. Base Styles (リセット・基本)
   ========================================================================== */
body {
  color: var(--as-text-main);
  background-color: var(--as-bg-base);
  font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: rgba(45, 155, 131, 0.2);
  color: var(--as-primary);
}

*:focus-visible {
  outline: 2px solid var(--as-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ==========================================================================
   4. Typography — 見出し
   ========================================================================== */
h1, h2, h3, h4 {
  font-family: "Noto Serif JP", "Hiragino Mincho ProN", serif;
  color: var(--as-primary);
}

/* h1: 記事タイトル */
h1 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

/* h2: 大セクション (border-top付き) */
.article-body h2,
.entry-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  color: #111827;
  margin-top: 4rem;
  margin-bottom: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--as-border);
}

/* h3: サブセクション */
.article-body h3,
.entry-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
  color: #1F2937;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  h1 { font-size: 2.25rem; }
  .article-body h2,
  .entry-content h2 { font-size: 1.875rem; }
  .article-body h3,
  .entry-content h3 { font-size: 1.5rem; }
}

/* ==========================================================================
   5. 記事本文 (.article-body / .entry-content)
   ========================================================================== */
.article-body,
.entry-content {
  max-width: var(--as-article-width);
  margin-left: auto;
  margin-right: auto;
  padding: 2rem 1rem;
}

@media (min-width: 768px) {
  .article-body,
  .entry-content {
    padding: 3rem 2rem;
  }
}

/* 本文段落 */
.article-body p,
.entry-content p {
  font-size: var(--as-body-size);
  line-height: var(--as-body-lh);
  margin-bottom: 1.75rem;
  color: var(--as-text-main);
}

@media (min-width: 768px) {
  .article-body p,
  .entry-content p {
    font-size: var(--as-body-size-md);
  }
}

/* リスト */
.article-body ul,
.entry-content ul,
.article-body ol,
.entry-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1.75rem;
}

.article-body li,
.entry-content li {
  font-size: var(--as-body-size);
  line-height: 1.625;
  color: var(--as-text-main);
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .article-body li,
  .entry-content li {
    font-size: var(--as-body-size-md);
  }
}

/* カスタムブレット (ul) */
.article-body ul,
.entry-content ul {
  list-style: none;
  margin-left: 0.25rem;
}

.article-body ul > li,
.entry-content ul > li {
  position: relative;
  padding-left: 1.25rem;
}

.article-body ul > li::before,
.entry-content ul > li::before {
  content: "\2726"; /* ✦ */
  position: absolute;
  left: 0;
  top: 0.35rem;
  color: var(--as-accent);
  font-size: 0.65rem;
}

/* PracticalInfoBox / CTABlock / LocalTip 内のリストはカスタムブレット無効 */
.entry-content .practical-info-box ul,
.entry-content .cta-block ul,
.entry-content .local-tip ul {
  list-style: none !important;
  margin-left: 0 !important;
  padding-left: 0 !important;
}
.entry-content .practical-info-box ul > li,
.entry-content .cta-block ul > li,
.entry-content .local-tip ul > li {
  padding-left: 0 !important;
  position: static !important;
  font-size: 0.875rem;
  line-height: 1.8;
  padding: 0.375rem 0;
  border-bottom: 1px solid var(--as-border-light);
}
.entry-content .practical-info-box ul > li:last-child,
.entry-content .cta-block ul > li:last-child,
.entry-content .local-tip ul > li:last-child {
  border-bottom: none;
}
.entry-content .practical-info-box ul > li::before,
.entry-content .cta-block ul > li::before,
.entry-content .local-tip ul > li::before {
  content: none !important;
  display: none !important;
}

/* 順序リスト */
.article-body ol,
.entry-content ol {
  list-style: decimal;
}

.article-body ol > li::marker,
.entry-content ol > li::marker {
  color: var(--as-accent);
  font-weight: 700;
}

/* ==========================================================================
   6. リンクスタイル
   ========================================================================== */
.article-body a,
.entry-content a {
  color: var(--as-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(26, 107, 90, 0.2);
  font-weight: 500;
  transition: color 0.2s, text-decoration-color 0.2s;
}

.article-body a:hover,
.entry-content a:hover {
  color: var(--as-accent);
  text-decoration-color: rgba(45, 155, 131, 0.4);
}

/* ==========================================================================
   7. Blockquote
   ========================================================================== */
.article-body blockquote,
.entry-content blockquote {
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  background-color: rgba(91, 168, 160, 0.08);
  border-radius: 0.75rem;
  border: 1px solid rgba(91, 168, 160, 0.15);
  border-left: 4px solid var(--as-sub);
  color: #4B5563;
  font-size: 1rem;
  line-height: 1.625;
}

.article-body blockquote p,
.entry-content blockquote p {
  margin-bottom: 0;
  font-size: 1rem;
}

/* ==========================================================================
   8. テーブルスタイル
   ========================================================================== */
/* テーブルを自動で横スクロール可能にする */
.article-body .wp-block-table,
.entry-content .wp-block-table,
.article-body figure.wp-block-table,
.entry-content figure.wp-block-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.article-body table,
.entry-content table {
  width: 100%;
  min-width: 500px;
  border-collapse: collapse;
  margin: 2rem 0;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--as-border);
}
.article-body table th,
.entry-content table th,
.article-body table td,
.entry-content table td {
  white-space: nowrap;
}
/* 長いテキストのセルは折り返し許可 */
.article-body table td:first-child,
.entry-content table td:first-child {
  white-space: normal;
  min-width: 80px;
}

.article-body th,
.entry-content th {
  background-color: rgba(26, 107, 90, 0.08);
  color: var(--as-primary);
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(26, 107, 90, 0.15);
}

.article-body td,
.entry-content td {
  border-bottom: 1px solid var(--as-border-light);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
}

.article-body tr:hover td,
.entry-content tr:hover td {
  background-color: rgba(45, 155, 131, 0.05);
}

/* テーブル横スクロール（モバイル） */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 2rem 0;
  border-radius: 0.5rem;
  border: 1px solid var(--as-border);
}

.table-responsive table {
  margin: 0;
  border: none;
}

/* ==========================================================================
   9. 画像スタイル
   ========================================================================== */
.article-body img,
.entry-content img {
  border-radius: 0.5rem;
  margin: 2rem 0;
  max-width: 100%;
  height: auto;
}

.article-body figure,
.entry-content figure {
  margin: 2rem 0;
}

.article-body figcaption,
.entry-content figcaption {
  font-size: 0.75rem;
  color: var(--as-text-muted);
  text-align: center;
  margin-top: 0.5rem;
}

/* ==========================================================================
   10. strong（ラベル型 + 通常型）
   ========================================================================== */
.article-body strong,
.entry-content strong {
  font-weight: 700;
  color: #111827;
}

/* ラベル型: クラスを付与して使用 */
.strong-label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 700;
  color: var(--as-primary);
  font-size: 0.9em;
  background-color: rgba(26, 107, 90, 0.05);
  border-left: 3px solid var(--as-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 0 0.25rem 0.25rem 0;
  margin-right: 0.5rem;
  white-space: nowrap;
}

/* ==========================================================================
   11. PracticalInfoBox — スポット情報ボックス
   ========================================================================== */
.practical-info-box {
  background-color: #fff;
  border-radius: 0.5rem;
  border: 1px solid var(--as-border);
  border-left: 4px solid var(--as-primary);
  margin: 2.5rem 0;
  overflow: hidden;
}

.practical-info-box__header {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--as-border);
  background-color: rgba(26, 107, 90, 0.05);
}

.practical-info-box__title {
  color: var(--as-primary);
  font-weight: 700;
  font-size: 0.875rem;
  margin: 0;
  font-family: "Noto Sans JP", sans-serif;
}

.practical-info-box__body {
  padding: 1rem 1.25rem;
}

.practical-info-box__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 768px) {
  .practical-info-box__grid {
    grid-template-columns: 1fr 1fr;
    column-gap: 1.5rem;
  }
}

.practical-info-box__row {
  display: flex;
  gap: 0.75rem;
  font-size: 0.875rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--as-border-light);
}

.practical-info-box__row:last-child {
  border-bottom: none;
}

.practical-info-box__label {
  flex-shrink: 0;
  width: 5rem;
  color: var(--as-text-muted);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-top: 0.125rem;
}

.practical-info-box__value {
  color: var(--as-text-main);
  line-height: 1.625;
  min-width: 0;
  word-break: break-word;
}

.practical-info-box__value a {
  color: var(--as-sub);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.practical-info-box__value a:hover {
  color: var(--as-accent);
}

/* PracticalInfoBox内 インラインCTA */
.practical-info-box__cta {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--as-border-light);
  background: linear-gradient(to right, rgba(0, 185, 0, 0.05), transparent);
}

.practical-info-box__cta-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  background-color: var(--as-asoview);
  color: #fff;
  padding: 0.875rem 1.5rem;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
  min-height: 44px;
}

.practical-info-box__cta-button:hover {
  background-color: var(--as-asoview-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  color: #fff;
  text-decoration: none;
}

.practical-info-box__cta-sublabel {
  text-align: center;
  font-size: 0.75rem;
  color: var(--as-text-muted);
  margin-top: 0.5rem;
}

.practical-info-box__cta-disclaimer {
  text-align: center;
  font-size: 0.625rem;
  color: #D1D5DB;
  margin-top: 0.375rem;
}

/* ==========================================================================
   12. LocalTip — 地元のヒントボックス
   ========================================================================== */
.local-tip {
  background-color: rgba(251, 191, 36, 0.08);
  border-left: 4px solid #F59E0B;
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 1rem 1.25rem;
  margin: 2rem 0;
}

.local-tip__title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #B45309;
  margin-bottom: 0.25rem;
  font-family: "Noto Sans JP", sans-serif;
}

.local-tip__body {
  font-size: 0.875rem;
  color: var(--as-text-main);
  line-height: 1.625;
}

.local-tip__body p {
  margin-bottom: 0;
  font-size: 0.875rem;
  line-height: 1.625;
}

/* ==========================================================================
   13. CTABlock — 旅の計画ブロック
   ========================================================================== */
.cta-block {
  position: relative;
  margin: 4rem 0;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(230, 118, 53, 0.2);
  background: linear-gradient(to bottom right, rgba(230, 118, 53, 0.05), #fff, rgba(45, 155, 131, 0.05));
}

.cta-block__bar {
  height: 6px;
  background: linear-gradient(to right, var(--as-cta), rgba(230, 118, 53, 0.8), var(--as-accent));
}

.cta-block__header {
  padding: 1.25rem 1.5rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cta-block__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: rgba(230, 118, 53, 0.15);
  font-size: 1.25rem;
}

.cta-block__title {
  color: var(--as-cta);
  font-weight: 700;
  font-size: 1.125rem;
  margin: 0;
  font-family: "Noto Sans JP", sans-serif;
}

.cta-block__subtitle {
  font-size: 0.75rem;
  color: rgba(55, 65, 81, 0.4);
  margin: 0.125rem 0 0;
}

.cta-block__body {
  padding: 0.5rem 1.5rem 1.5rem;
}

/* CTA セクションラベル */
.cta-block__section-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(55, 65, 81, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

/* 宿泊予約ボタン群 */
.cta-block__booking-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.cta-block__booking-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--as-cta);
  color: #fff;
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
  min-height: 44px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.cta-block__booking-btn:hover {
  background-color: rgba(230, 118, 53, 0.85);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  color: #fff;
  text-decoration: none;
}

/* 体験予約カード */
.cta-block__experiences {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .cta-block__experiences {
    grid-template-columns: 1fr 1fr;
  }
}

.cta-block__experience-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(0, 185, 0, 0.2);
  background-color: rgba(0, 185, 0, 0.05);
  text-decoration: none;
  transition: all 0.2s;
  min-height: 44px;
}

.cta-block__experience-card:hover {
  background-color: rgba(0, 185, 0, 0.1);
  border-color: rgba(0, 185, 0, 0.4);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  text-decoration: none;
}

.cta-block__experience-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background-color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.cta-block__experience-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: #1F2937;
  line-height: 1.3;
}

.cta-block__experience-card:hover .cta-block__experience-label {
  color: var(--as-asoview);
}

.cta-block__experience-price {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--as-asoview);
  margin-top: 0.25rem;
}

.cta-block__experience-provider {
  font-size: 0.625rem;
  color: var(--as-text-muted);
}

/* 関連記事リンク */
.cta-block__articles {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cta-block__article-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--as-border-light);
  background-color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: all 0.2s;
}

.cta-block__article-link:hover {
  background-color: #fff;
  border-color: rgba(26, 107, 90, 0.2);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  text-decoration: none;
}

.cta-block__article-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  background-color: rgba(26, 107, 90, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cta-block__article-icon svg {
  width: 1rem;
  height: 1rem;
  color: rgba(26, 107, 90, 0.5);
}

.cta-block__article-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--as-text-main);
  line-height: 1.3;
  flex: 1;
}

.cta-block__article-link:hover .cta-block__article-title {
  color: var(--as-primary);
}

.cta-block__article-arrow {
  width: 0.875rem;
  height: 0.875rem;
  color: #D1D5DB;
  flex-shrink: 0;
}

.cta-block__article-link:hover .cta-block__article-arrow {
  color: var(--as-primary);
  transform: translateX(2px);
}

/* CTABlock 簡易版（wp:html内の .cta-block で子要素がシンプルな場合） */
.cta-block:not(:has(.cta-block__bar)) {
  position: relative;
  margin: 2rem 0;
  padding: 1.5rem;
  border-radius: 0.75rem;
  border-left: 4px solid var(--as-cta);
  background: linear-gradient(135deg, rgba(230,118,53,0.06), #fff 60%);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.cta-block:not(:has(.cta-block__bar)) > p:first-child {
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--as-cta);
  margin-bottom: 0.75rem;
}
.cta-block:not(:has(.cta-block__bar)) a {
  color: var(--as-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cta-block:not(:has(.cta-block__bar)) a:hover {
  color: var(--as-accent);
}

/* PracticalInfoBox 簡易版（wp:html内で子要素がシンプルな場合） */
.practical-info-box:not(:has(.practical-info-box__header)) {
  background-color: #fff;
  border-radius: 0.5rem;
  border: 1px solid var(--as-border);
  border-left: 4px solid var(--as-primary);
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
}
.practical-info-box:not(:has(.practical-info-box__header)) > p:first-child {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--as-primary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--as-border);
}
.practical-info-box:not(:has(.practical-info-box__header)) li {
  font-size: 0.875rem;
  line-height: 1.8;
  color: var(--as-text-main);
}

/* PR表記 */
.cta-block__disclaimer {
  text-align: right;
  font-size: 0.625rem;
  color: #D1D5DB;
  margin-top: 0.5rem;
}

/* ==========================================================================
   14. AffiliateLink — プロバイダー別ボタン
   ========================================================================== */
.affiliate-link {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
}

.affiliate-link__button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  padding: 0.75rem 1.25rem 0.75rem 1rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  transition: all 0.2s;
  min-height: 44px;
}

.affiliate-link__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  color: #fff;
  text-decoration: none;
}

/* プロバイダー別カラー */
.affiliate-link__button--booking { background-color: var(--as-booking); }
.affiliate-link__button--booking:hover { background-color: var(--as-booking-hover); }
.affiliate-link__button--rakuten { background-color: var(--as-rakuten); }
.affiliate-link__button--rakuten:hover { background-color: var(--as-rakuten-hover); }
.affiliate-link__button--jalan { background-color: var(--as-jalan); }
.affiliate-link__button--jalan:hover { background-color: var(--as-jalan-hover); }
.affiliate-link__button--asoview { background-color: var(--as-asoview); }
.affiliate-link__button--asoview:hover { background-color: var(--as-asoview-hover); }
.affiliate-link__button--activity { background-color: var(--as-activity); }
.affiliate-link__button--activity:hover { background-color: var(--as-activity-hover); }
.affiliate-link__button--other { background-color: var(--as-cta); }
.affiliate-link__button--other:hover { background-color: rgba(230, 118, 53, 0.85); }

.affiliate-link__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  font-size: 1.125rem;
}

.affiliate-link__label {
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
}

.affiliate-link__sublabel {
  font-size: 0.625rem;
  opacity: 0.7;
  line-height: 1.2;
  margin-top: 0.125rem;
}

.affiliate-link__disclaimer {
  font-size: 0.625rem;
  color: #D1D5DB;
}

/* ==========================================================================
   15. モバイル固定フッターバー
   ========================================================================== */
.mobile-footer-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #fff;
  border-top: 1px solid var(--as-border);
  z-index: 50;
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 3.5rem;
}

.mobile-footer-bar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
  color: var(--as-text-muted);
  text-decoration: none;
  transition: color 0.2s;
  padding: 0.25rem 0.75rem;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
}

.mobile-footer-bar__item:hover,
.mobile-footer-bar__item--active {
  color: var(--as-primary);
  text-decoration: none;
}

.mobile-footer-bar__item svg {
  width: 1.25rem;
  height: 1.25rem;
}

.mobile-footer-bar__item span {
  font-size: 0.625rem;
}

/* フッターバーの高さ分のpadding-bottom */
body {
  padding-bottom: 3.5rem;
}

@media (min-width: 768px) {
  .mobile-footer-bar {
    display: none;
  }
  body {
    padding-bottom: 0;
  }
}

/* ==========================================================================
   16. フォントサイズコントロール
   ========================================================================== */
.font-size-control {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid var(--as-border);
  border-radius: 0.5rem;
  overflow: hidden;
}

.font-size-control__btn {
  padding: 0.375rem 0.625rem;
  font-size: 0.75rem;
  color: var(--as-text-light);
  background: none;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.font-size-control__btn:hover {
  background-color: var(--as-bg-warm);
}

.font-size-control__btn--active {
  background-color: var(--as-primary);
  color: #fff;
}

/* フォントサイズ: 大 */
.entry-content[data-font-size="large"] p,
.entry-content[data-font-size="large"] li,
.entry-content[data-font-size="large"] blockquote,
.entry-content[data-font-size="large"] td {
  font-size: 1.375rem !important;
  line-height: 2.2 !important;
}

.entry-content[data-font-size="large"] h2 {
  font-size: 2rem !important;
}

.entry-content[data-font-size="large"] h3 {
  font-size: 1.5rem !important;
}

/* フォントサイズ: 特大 */
.entry-content[data-font-size="xlarge"] p,
.entry-content[data-font-size="xlarge"] li,
.entry-content[data-font-size="xlarge"] blockquote,
.entry-content[data-font-size="xlarge"] td {
  font-size: 1.5rem !important;
  line-height: 2.4 !important;
}

.entry-content[data-font-size="xlarge"] h2 {
  font-size: 2.25rem !important;
}

.entry-content[data-font-size="xlarge"] h3 {
  font-size: 1.75rem !important;
}

/* ==========================================================================
   17. レスポンシブ補助
   ========================================================================== */

/* タップターゲット最小サイズ保証 */
.cta-block__booking-btn,
.cta-block__experience-card,
.cta-block__article-link,
.practical-info-box__cta-button,
.affiliate-link__button,
.mobile-footer-bar__item,
.font-size-control__btn {
  min-height: 44px;
}

/* 小画面でのCTAブロック余白調整 */
@media (max-width: 640px) {
  .cta-block {
    margin: 2.5rem -0.5rem;
    border-radius: 0.75rem;
  }
  .cta-block__header {
    padding: 1rem 1rem 0.5rem;
  }
  .cta-block__body {
    padding: 0.5rem 1rem 1rem;
  }
}

/* ==========================================================================
   18. REHUBテーマ固有の上書き
   ========================================================================== */

/* REHUB見出しスタイルのリセット（子テーマのスタイル優先） */
.single .entry-content h2,
.single .entry-content h3 {
  background: none;
  padding-left: 0;
}

/* REHUBのデフォルトリンク色を上書き */
.single .entry-content a {
  color: var(--as-primary);
}

/* 投稿ページ: 2カラム（メイン + 右サイドバー） */
.single .l-content {
  max-width: var(--as-max-width);
  margin: 0 auto;
}

/* 固定ページ: 1カラム（サイドバーなし） */
.page .l-content {
  max-width: var(--as-article-width);
  margin: 0 auto;
}

/* サイドバーのスタイリング */
.l-sidebar {
  font-size: 0.875rem;
  color: var(--as-text-main);
}

.l-sidebar .widget {
  background-color: #fff;
  border-radius: 0.5rem;
  border: 1px solid var(--as-border);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.l-sidebar .widget-title,
.l-sidebar .widgettitle {
  font-family: "Noto Serif JP", serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--as-primary);
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 2px solid var(--as-accent);
}

.l-sidebar .widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.l-sidebar .widget li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--as-border-light);
}

.l-sidebar .widget li:last-child {
  border-bottom: none;
}

.l-sidebar .widget a {
  color: var(--as-text-main);
  text-decoration: none;
  transition: color 0.2s;
}

.l-sidebar .widget a:hover {
  color: var(--as-primary);
}

/* サイト全体のmax-width */
.l-header__inner,
.l-footer__inner,
.l-content__inner {
  max-width: var(--as-max-width);
  margin: 0 auto;
}

/* ==========================================================================
   19. ユーティリティ
   ========================================================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* スクロールバー非表示（水平スクロール要素用） */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* ==========================================================================
   21. PR表記スタイル
   ========================================================================== */
.pr-notice {
  background: #f8f8f8;
  border: 1px solid var(--as-border);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.8rem !important;
  color: var(--as-text-muted) !important;
  line-height: 1.6 !important;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   20. トップページ — 新着記事カードグリッド (wp:latest-posts)
   ========================================================================== */
.wp-block-latest-posts.is-grid {
  max-width: var(--as-max-width);
  margin: 0 auto !important;
  padding: 0 1rem 2rem !important;
  list-style: none !important;
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 1.25rem !important;
}
@media (min-width: 600px) {
  .wp-block-latest-posts.is-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (min-width: 960px) {
  .wp-block-latest-posts.is-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
/* WP coreのcolumn幅指定を無効化 */
.wp-block-latest-posts.is-grid li {
  width: 100% !important;
  background: #fff;
  border-radius: 0.75rem;
  border: 1px solid var(--as-border-light);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
}
.wp-block-latest-posts.is-grid li:hover {
  box-shadow: 0 8px 16px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}
/* アイキャッチ画像 — alignleft/alignright を無効化し、常にカード上部に全幅表示 */
.wp-block-latest-posts__featured-image {
  overflow: hidden;
  margin: 0 !important;
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
}
.wp-block-latest-posts__featured-image.alignleft,
.wp-block-latest-posts__featured-image.alignright {
  float: none !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}
.wp-block-latest-posts__featured-image img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
  transition: transform 0.5s;
  max-height: 200px;
}
.wp-block-latest-posts.is-grid li:hover .wp-block-latest-posts__featured-image img {
  transform: scale(1.03);
}
/* 記事タイトル */
.wp-block-latest-posts__post-title {
  display: block;
  padding: 1rem 1.25rem 0;
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  font-weight: 700;
  line-height: 1.5;
  color: #111827;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wp-block-latest-posts__post-title:hover {
  color: var(--as-primary);
}
/* 投稿日 */
.wp-block-latest-posts__post-date {
  display: block;
  padding: 0.5rem 1.25rem 0;
  font-size: 0.75rem;
  color: var(--as-text-muted);
}
/* 抜粋 */
.wp-block-latest-posts__post-excerpt {
  padding: 0.5rem 1.25rem 1.25rem;
  font-size: 0.8rem;
  color: var(--as-text-light);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}