/* 関西エリアページ固有スタイル。
   メインカラムの白背景やセクション区切り(下線)は top-renewal.css / guide-common.css の
   標準デザインをそのまま使い、ここでは関西ページ内の部品だけを定義する。
   （area-chiba.css / area-aichi.css と同じ方針）
   学校カードは inc/tool/school-card.php 共通パーツを使用し、基準スタイルは
   guide-common.css 側の .area-school-card を利用する（/area/hyogo/ と同じ方針）。 */
.kansai-pref-block,
.kansai-nearby-card {
  background: #fff;
  border: 1px solid var(--guide-border);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(45, 52, 54, .05);
}

.area-kansai-featured .area-school-card {
  background: var(--guide-gold-pale);
  border-color: rgba(217, 169, 0, .35);
}

.kansai-pref-block__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.kansai-pref-block h3 {
  margin: 14px 0 8px;
  color: var(--guide-ink);
  font-size: 1.15rem;
  line-height: 1.45;
}

.kansai-pref-block p,
.kansai-nearby-card span {
  margin: 0;
  color: var(--guide-muted);
  line-height: 1.85;
}

.kansai-pref-list {
  display: grid;
  gap: 20px;
}

.kansai-pref-block {
  padding: 24px;
}

.kansai-pref-block__link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--btn-plain-bg, #fff);
  border: 1px solid var(--btn-plain-border, #d8dcdd);
  color: var(--btn-plain-text, #2d3436);
  font-weight: 700;
  text-decoration: none;
}

.kansai-pref-block__link::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.kansai-school-grid {
  display: grid;
  /* 一覧レイアウトのカード（.sl-card）はカード内が2カラムなので1列に並べる */
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 18px;
}

/* 主要都市からのアクセス比較（SPは横スクロール＋教習所名を固定） */
.kansai-access-table {
  width: 100%;
  min-width: 640px;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

.kansai-access-table th,
.kansai-access-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--guide-border);
  line-height: 1.65;
  vertical-align: top;
  text-align: left;
}

.kansai-access-table thead th {
  background: var(--guide-soft);
  color: var(--guide-ink);
  font-size: 0.85rem;
  white-space: nowrap;
}

.kansai-access-table thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--guide-soft);
}

.kansai-access-table tbody th {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 210px;
  background: #fff;
  border-right: 1px solid var(--guide-border);
  color: var(--guide-ink);
}

.kansai-access-table tbody th a,
.kansai-access-table tbody td a {
  color: var(--guide-ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.kansai-access-table__pref {
  display: block;
  margin-top: 4px;
  color: var(--guide-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

/* 大阪・神戸からの所要時間は、確認できている校だけ教習所名の下に小さく添える */
.kansai-access-table__note {
  display: block;
  margin-top: 4px;
  color: var(--guide-muted);
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.6;
}

.kansai-access-table tbody td {
  color: var(--guide-ink);
  font-size: 0.92rem;
  white-space: nowrap;
}

.kansai-access-table tbody tr:last-child th,
.kansai-access-table tbody tr:last-child td {
  border-bottom: 0;
}

.kansai-school-count,
.kansai-pref-block__count {
  display: inline-block;
  margin-left: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--guide-gold-pale);
  color: var(--guide-gold-dark);
  font-size: 0.8rem;
  font-weight: 700;
  vertical-align: middle;
}

.kansai-check-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.kansai-check-list li {
  position: relative;
  padding: 14px 16px 14px 44px;
  border-radius: 12px;
  background: var(--guide-gold-pale);
  color: var(--guide-ink);
  line-height: 1.7;
}

.kansai-check-list li::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 24px;
  width: 10px;
  height: 6px;
  border-left: 3px solid var(--guide-gold-dark);
  border-bottom: 3px solid var(--guide-gold-dark);
  transform: rotate(-45deg);
}

.kansai-nearby-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.kansai-nearby-card {
  display: block;
  padding: 22px;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}

.kansai-nearby-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(45, 52, 54, .1);
}

.kansai-nearby-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--guide-ink);
  font-size: 1.05rem;
}

@media (max-width: 767px) {
  .kansai-pref-block {
    /* SPは県ブロックの枠を外し、教習所カードを本文幅いっぱいに出す（枠の中に枠を作らない） */
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .kansai-pref-block__head {
    display: grid;
    gap: 12px;
  }

  .kansai-pref-block__link {
    width: 100%;
  }

  .kansai-school-grid,
.kansai-nearby-grid {
    grid-template-columns: 1fr;
  }
}

/* ページヘッダーの掲載県・掲載校数。都道府県ページ（area-hokkaido.css の .hokkaido-page-meta）と同じピル型。 */
.kansai-page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
}

.kansai-page-meta > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--guide-soft);
  border: 1px solid var(--guide-border);
}

.kansai-page-meta dt {
  margin: 0;
  color: var(--guide-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.kansai-page-meta dd {
  margin: 0;
  color: var(--guide-ink);
  font-weight: 700;
}

/* メインビジュアル（/img/area/kansai_mv.jpg 夜景）。
   関西だけ白幕をやめて黒のグラデーションを掛け、文字は白で載せる。
   仕組み（img の敷き方・::after の重ね方）は guide-common.css の .guide-page-header--mv 側。 */
.area-kansai-layout .guide-page-header--mv {
  border-bottom-color: #1b1f26;
}

.area-kansai-layout .guide-page-header__mv::after {
  background: linear-gradient(180deg, rgba(10, 14, 22, .82) 0%, rgba(10, 14, 22, .72) 40%, rgba(10, 14, 22, .5) 62%, rgba(10, 14, 22, .22) 82%, rgba(10, 14, 22, .08) 100%);
}

.area-kansai-layout .guide-page-header__eyebrow {
  color: #f2d27a;
}

.area-kansai-layout .guide-page-header h1 {
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}

.area-kansai-layout .guide-page-header h1 + p {
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 1px 8px rgba(0, 0, 0, .35);
}

.area-kansai-layout .guide-page-header .page-updated {
  color: rgba(255, 255, 255, .75);
}

/* 掲載県・掲載校数のピルは黒グラデの上でも白のまま（透過させない） */
.area-kansai-layout .kansai-page-meta > div {
  background: #fff;
  border-color: #fff;
}

@media (max-width: 768px) {
  .area-kansai-layout .guide-page-header__mv::after {
    background: linear-gradient(180deg, rgba(10, 14, 22, .84) 0%, rgba(10, 14, 22, .76) 48%, rgba(10, 14, 22, .55) 66%, rgba(10, 14, 22, .25) 84%, rgba(10, 14, 22, .08) 100%);
  }
}
