/* =============================================
   ビジネスパーソン向けメンタルクリニックポータル用CSS
   DoctorsFile風 ソリッドデザイン - モバイルファースト
   ============================================= */

/* カラーパレット - よりソリッドな配色に変更 */
:root {
  /* メインカラー */
  --primary-color: #00A0E9;
  --primary-dark: #0080C9;
  --primary-light: #E6F4FB;
  
  /* セカンダリカラー */
  --secondary-color: #FF6B35;
  --secondary-light: #FFF0EA;
  
  /* テキストカラー */
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-light: #999999;
  
  /* 背景色 */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F5F5F5;
  --bg-gray: #FAFAFA;
  
  /* ボーダー */
  --border-color: #E0E0E0;
  --border-light: #F0F0F0;
  
  /* アクセントカラー（バッジ用） */
  --badge-certification: #FF6B35;
  --badge-today: #00A0E9;
  --badge-night: #6B46C1;
  --badge-weekend: #E91E63;
  --badge-online: #00BCD4;
  
  /* その他 */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition: all 0.2s ease;
  
  /* 評価の星色 */
  --star-color: #FFC107;
  --star-empty: #E0E0E0;
}

/* ベースリセット */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* コンテナ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* =============================================
   パンくずリスト
   ============================================= */
.breadcrumbs {
  background: var(--bg-primary);
  padding: 0.75rem 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  list-style: none;
  font-size: 0.8125rem;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
}

.breadcrumb-item a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
  font-weight: 500;
}

.breadcrumb-item a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.breadcrumb-item .separator {
  margin: 0 0.5rem;
  color: var(--text-light);
  font-size: 0.75rem;
}

.breadcrumb-item:last-child {
  color: var(--text-primary);
  font-weight: 600;
}

/* =============================================
   ページヘッダー
   ============================================= */
.page-header {
  background: var(--bg-primary);
  padding: 2rem 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 3px solid var(--primary-color);
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.page-title .count {
  display: inline-block;
  font-size: 1rem;
  font-weight: 500;
  color: var(--primary-color);
  background: var(--primary-light);
  padding: 0.125rem 0.75rem;
  border-radius: 20px;
  margin-left: 0.5rem;
}

.page-description {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-top: 0.5rem;
}

/* エリア説明文セクション */
.area-description-section {
  background: var(--bg-primary);
  padding: 1.25rem;
  margin-bottom: 1rem;
  border-left: 3px solid var(--primary-color);
}

.area-description-section p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.7;
  margin: 0;
}

/* =============================================
   平均診療費表示
   ============================================= */
.average-cost-section {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.average-cost-title {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.average-cost-value {
  font-size: 2rem;
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.cost-range {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* =============================================
   エリア統計セクション（新規追加）
   ============================================= */
.area-statistics-section {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.statistics-title {
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-weight: 700;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary-color);
}

.statistics-grid {
  display: grid;
  gap: 1.5rem;
}

.stat-category {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  border: 1px solid var(--border-light);
}

.stat-category.full-width {
  grid-column: 1 / -1;
}

.stat-category-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-left: 0.75rem;
  border-left: 3px solid var(--primary-color);
}

.stat-items {
  display: grid;
  gap: 1rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.stat-item:hover {
  transform: translateX(2px);
  box-shadow: var(--shadow-sm);
}

.stat-item.highlight {
  background: var(--primary-light);
  border: 1px solid var(--primary-color);
}

.stat-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-content {
  flex: 1;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.stat-value {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.stat-number {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-unit {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.stat-percentage {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* 予約難易度の内訳 */
.booking-breakdown {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  display: grid;
  gap: 0.5rem;
}

.breakdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
}

.breakdown-stars {
  display: flex;
  gap: 0.0625rem;
  width: 80px;
}

.breakdown-stars .star {
  color: var(--star-empty);
  font-size: 0.875rem;
}

.breakdown-stars .star.filled {
  color: var(--star-color);
}

.breakdown-label {
  flex: 1;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.breakdown-count {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
}

/* =============================================
   エリア一覧セクション
   ============================================= */
.area-list-section {
  background: var(--bg-primary);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.section-title {
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-weight: 700;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary-color);
}

.area-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.5rem;
}

.area-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-gray);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
}

.area-item:hover {
  background: var(--primary-light);
  border-color: var(--primary-color);
  transform: translateX(2px);
}

.station-item {
  position: relative;
  padding-left: 2rem;
}

.station-item::before {
  content: "🚃";
  position: absolute;
  left: 0.75rem;
  font-size: 0.875rem;
}

.area-name {
  font-weight: 500;
}

.area-count {
  background: var(--primary-color);
  color: var(--bg-primary);
  padding: 0.125rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* =============================================
   検索セクション
   ============================================= */
.search-section {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.search-title {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-weight: 600;
}

.search-form {
  display: flex;
  gap: 0.5rem;
}

.search-input {
  flex: 1;
  padding: 0.625rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 160, 233, 0.1);
}

.search-button {
  padding: 0.625rem 1.5rem;
  background-color: var(--primary-color);
  color: var(--bg-primary);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.search-button:hover {
  background-color: var(--primary-dark);
}

/* =============================================
   クリニック一覧
   ============================================= */
.clinic-list {
  margin-bottom: 2rem;
}

.clinic-list .section-title {
  background: var(--bg-primary);
  padding: 1rem 1.5rem;
  margin-bottom: 0;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border-bottom: 3px solid var(--primary-color);
}

.result-count {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
}

/* クリニックカード - DoctorsFile風 */
.clinic-card {
  background: var(--bg-primary);
  margin-bottom: 1px;
  transition: var(--transition);
  position: relative;
}

.clinic-card:hover {
  box-shadow: var(--shadow-md);
  z-index: 1;
}

.clinic-card:hover .detail-button {
  background: var(--primary-dark);
}

/* クリニックヘッダー部分 */
.clinic-header {
  padding: 1.25rem 1.25rem 0.75rem;
}

.clinic-name {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 0.75rem 0;
  line-height: 1.3;
}

.clinic-name a {
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
}

.clinic-name a:hover {
  color: var(--primary-color);
}

/* ビジネスバッジ - よりコンパクトに */
.business-badges {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
  padding: 0 1.25rem;
}

.business-badge {
  padding: 0.25rem 0.625rem;
  border-radius: 3px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--bg-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  line-height: 1;
}

.business-badge.certification {
  background: var(--badge-certification);
}

.business-badge.online {
  background: var(--badge-online);
}

.business-badge.today {
  background: var(--badge-today);
}

.business-badge.night {
  background: var(--badge-night);
}

.business-badge.weekend {
  background: var(--badge-weekend);
}

/* クリニック説明文 */
.clinic-description {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
  padding: 0 1.25rem;
}

/* クリニック情報グリッド */
.clinic-info {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  font-size: 0.8125rem;
  padding: 0 1.25rem 1rem;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: var(--text-secondary);
}

/* アイコン部分 */
.info-item::before {
  content: '';
  flex-shrink: 0;
  font-size: 0.875rem;
  line-height: 1.4;
  display: inline-block;
  width: 1rem;
  text-align: center;
}

.info-item.address::before {
  content: "📍";
}

.info-item.phone::before {
  content: "📞";
}

.info-item.access::before {
  content: "🚃";
}

.info-item.departments::before {
  content: "🏥";
}

.info-item.hours::before {
  content: "🕐";
}

.info-item.cost::before {
  content: "💰";
}

.info-item.wait-time::before {
  content: "⏱️";
}

.info-item.booking::before {
  content: "📅";
}

/* 情報テキスト部分 */
.info-item > div,
.info-item > a {
  flex: 1;
  line-height: 1.4;
}

/* 電話番号のリンクスタイル */
.info-item.phone a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.info-item.phone a:hover {
  text-decoration: underline;
}

/* 最寄り駅 */
.info-item.access > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

.station-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.station-link:hover {
  text-decoration: underline;
}

.station-separator {
  margin: 0 0.25rem;
  color: var(--text-light);
}

/* 予約の取りやすさ部分 */
.info-item.booking > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.booking-stars {
  display: inline-flex;
  gap: 0.0625rem;
}

.star {
  color: var(--star-empty);
  font-size: 0.75rem;
}

.star.filled {
  color: var(--star-color);
}

/* PHP側の余計なスパンを非表示 */
.info-icon {
  display: none;
}

/* 診療費・待ち時間などの強調情報 */
.info-item.cost,
.info-item.wait-time {
  font-weight: 500;
  color: var(--text-primary);
}

/* =============================================
   診療時間テーブル（一覧ページ用コンパクト版）
   ============================================= */
.clinic-schedule {
  padding: 0.75rem 1.25rem;
  background: var(--bg-gray);
  border-top: 1px solid var(--border-light);
}

.schedule-wrapper.compact {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0;
  padding: 0;
}

/* コンパクト版テーブル基本スタイル */
.clinic-schedule .hour_table {
  width: 100%;
  min-width: 320px;
  border-collapse: collapse;
  font-size: 0.6875rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  margin: 0;
}

/* ヘッダー行 */
.clinic-schedule .hour_table thead tr {
  background: var(--bg-secondary);
}

.clinic-schedule .hour_table thead th,
.clinic-schedule .hour_table thead td {
  padding: 0.375rem 0.25rem;
  text-align: center;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.625rem;
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.clinic-schedule .hour_table thead th:first-child {
  background: var(--text-secondary);
  color: var(--bg-primary);
  font-size: 0.625rem;
  min-width: 40px;
}

/* 曜日のスタイル */
.clinic-schedule .hour_table thead td {
  min-width: 28px;
}

/* 土曜日 */
.clinic-schedule .hour_table thead td.hour_sat {
  color: var(--primary-color);
  background: var(--bg-secondary);
}

/* 日曜・祝日 */
.clinic-schedule .hour_table thead td.hour_sun,
.clinic-schedule .hour_table thead td.hour_hol {
  color: #E91E63;
  background: var(--bg-secondary);
}

/* 診療時間の列（左側） */
.clinic-schedule .hour_table tbody th {
  background: var(--bg-secondary);
  padding: 0.375rem 0.5rem;
  text-align: left;
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.625rem;
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

/* データセル */
.clinic-schedule .hour_table tbody td {
  padding: 0.25rem;
  text-align: center;
  background: var(--bg-primary);
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  position: relative;
  height: 24px;
}

/* 診療可能マーク（シンプルな丸） */
.clinic-schedule .hour_mark_normal {
  background: var(--bg-primary);
}

.clinic-schedule .hour_mark_normal::before {
  content: "●";
  color: var(--primary-color);
  font-size: 0.625rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* 診療不可（横線） */
.clinic-schedule .hour_mark_none {
  background: var(--bg-primary);
}

.clinic-schedule .hour_mark_none::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 1px;
  background: #CCC;
}

/* 土曜日の列 */
.clinic-schedule .hour_table tbody td.hour_sat {
  background: #F0F8FF;
}

/* 日曜・祝日の列 */
.clinic-schedule .hour_table tbody td.hour_sun,
.clinic-schedule .hour_table tbody td.hour_hol {
  background: #FFF0F5;
}

/* 休診日や備考情報 */
.clinic-schedule .closed-days-info {
  margin-top: 0.5rem;
  font-size: 0.625rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.clinic-schedule .closed-days-info strong {
  font-weight: 500;
  color: var(--text-secondary);
}

/* スクロールヒント（モバイル用） */
@media (max-width: 767px) {
  .clinic-schedule {
    position: relative;
  }
  
  .schedule-wrapper.compact::after {
    content: "→";
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--text-light);
    background: linear-gradient(to right, transparent, var(--bg-gray) 20%);
    padding-left: 1rem;
    pointer-events: none;
  }
}

/* 下部アクション - 診療時間表示時の調整 */
.clinic-card:has(.clinic-schedule) .clinic-footer {
  border-top: none;
}

/* クリニックタグとアクション部分 */
.clinic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-gray);
  border-top: 1px solid var(--border-light);
}

.tag {
  background: var(--bg-primary);
  color: var(--text-secondary);
  padding: 0.25rem 0.625rem;
  border-radius: 3px;
  font-size: 0.6875rem;
  border: 1px solid var(--border-color);
  font-weight: 500;
}

.clinic-action {
  padding: 0.75rem 1.25rem;
  background: var(--bg-gray);
  text-align: right;
  border-top: 1px solid var(--border-light);
}

/* 診療時間がある場合のタグとアクションの調整 */
.clinic-card:has(.clinic-schedule) .clinic-tags {
  border-top: none;
}

.clinic-card:has(.clinic-schedule) .clinic-action {
  border-top: none;
}

.detail-button {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1.25rem;
  background: var(--primary-color);
  color: var(--bg-primary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: var(--transition);
}

.detail-button:hover {
  background: var(--primary-dark);
}

.detail-button::after {
  content: "→";
  font-size: 0.875rem;
}

/* =============================================
   FAQ・初診の流れセクション
   ============================================= */
.common-info-section {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.common-info-section h2 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary-color);
  font-weight: 700;
}

.common-info-section h3 {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  margin-top: 1.5rem;
  font-weight: 600;
}

.common-info-section p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.common-info-section ul,
.common-info-section ol {
  margin-left: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.7;
}

.common-info-section li {
  margin-bottom: 0.5rem;
}

/* =============================================
   ページネーション
   ============================================= */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.375rem;
  margin-top: 2rem;
  padding: 1.5rem 0;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.75rem;
  background: var(--bg-primary);
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
}

.page-link:hover {
  background: var(--primary-light);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.page-link.current {
  background: var(--primary-color);
  color: var(--bg-primary);
  border-color: var(--primary-color);
}

/* =============================================
   結果なし
   ============================================= */
.no-results {
  background: var(--bg-primary);
  padding: 3rem 2rem;
  text-align: center;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.no-results p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 0.875rem;
}

/* =============================================
   関連エリア
   ============================================= */
.related-areas {
  background: var(--bg-primary);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* =============================================
   CTAボタン
   ============================================= */
.cta-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  transition: var(--transition);
}

.cta-secondary {
  background: var(--bg-primary);
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.cta-secondary:hover {
  background: var(--primary-light);
}

/* =============================================
   レスポンシブ - タブレット以上
   ============================================= */
@media (min-width: 768px) {
  .container {
    padding: 0 1.5rem;
  }
  
  .page-header {
    padding: 2.5rem 2rem;
  }
  
  .page-title {
    font-size: 1.75rem;
  }
  
  .area-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
  }
  
  /* エリア統計グリッド */
  .statistics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  
  .stat-items {
    grid-template-columns: 1fr;
  }
  
  .stat-item {
    padding: 1rem;
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
  
  /* クリニック情報を2カラムに */
  .clinic-info {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1.5rem;
  }
  
  /* 特定の項目は全幅 */
  .info-item.access,
  .info-item.cost,
  .info-item.wait-time,
  .info-item.booking {
    grid-column: 1 / -1;
  }
  
  .clinic-header {
    padding: 1.5rem 2rem 1rem;
  }
  
  .business-badges {
    padding: 0 2rem;
  }
  
  .clinic-description {
    padding: 0 2rem;
  }
  
  .clinic-info {
    padding: 0 2rem 1.25rem;
  }
  
  .clinic-schedule {
    padding: 1rem 2rem;
  }
  
  .clinic-tags {
    padding: 1rem 2rem;
  }
  
  .clinic-action {
    padding: 1rem 2rem;
  }
  
  /* レスポンシブ時の診療時間テーブル調整 */
  .clinic-schedule .hour_table {
    font-size: 0.75rem;
  }
  
  .clinic-schedule .hour_table thead th,
  .clinic-schedule .hour_table thead td {
    padding: 0.5rem 0.375rem;
    font-size: 0.6875rem;
  }
  
  .clinic-schedule .hour_table tbody th {
    padding: 0.5rem 0.75rem;
    font-size: 0.6875rem;
  }
  
  .clinic-schedule .hour_table tbody td {
    padding: 0.375rem;
    height: 28px;
  }
  
  .clinic-schedule .hour_mark_normal::before {
    font-size: 0.75rem;
  }
  
  .clinic-schedule .closed-days-info {
    font-size: 0.6875rem;
  }
}

/* =============================================
   レスポンシブ - デスクトップ
   ============================================= */
@media (min-width: 1024px) {
  .area-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
  
  /* エリア統計セクション */
  .area-statistics-section {
    padding: 2rem;
  }
  
  .statistics-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .stat-category {
    padding: 1.5rem;
  }
  
  .stat-category.full-width {
    grid-column: 1 / -1;
    
    .stat-items {
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
  }
  
  .booking-breakdown {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
  }
  
  /* デスクトップでも2カラム維持（見やすさ重視） */
  .clinic-info {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 2rem;
  }
  
  .clinic-name {
    font-size: 1.25rem;
  }
}

/* =============================================
   アニメーション
   ============================================= */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.clinic-card {
  animation: fadeIn 0.3s ease-out;
}

.stat-item {
  animation: fadeIn 0.4s ease-out;
}

.stat-item:nth-child(2) { animation-delay: 0.1s; }
.stat-item:nth-child(3) { animation-delay: 0.2s; }
.stat-item:nth-child(4) { animation-delay: 0.3s; }
.stat-item:nth-child(5) { animation-delay: 0.4s; }
.stat-item:nth-child(6) { animation-delay: 0.5s; }

/* =============================================
   アクセシビリティ
   ============================================= */
.screen-reader-text {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* フォーカススタイル */
a:focus,
button:focus,
input:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* =============================================
   印刷用スタイル
   ============================================= */
@media print {
  .search-section,
  .pagination,
  .detail-button,
  .business-badges {
    display: none;
  }
  
  * {
    box-shadow: none !important;
  }
  
  .clinic-info {
    display: block !important;
  }
  
  .info-item {
    margin-bottom: 0.5rem;
  }
  
  .area-statistics-section {
    page-break-inside: avoid;
  }
  
  .stat-category {
    page-break-inside: avoid;
  }
}

/* =============================================
   ユーティリティクラス
   ============================================= */
.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.break-word {
  word-wrap: break-word;
  word-break: break-word;
}

/* エリア上部のクリニック目立たせる */
.featured-hospitals {
    margin-top: 1.5rem;
}

.featured-clinic {
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 8px rgba(0, 160, 233, 0.1);
}

.featured-clinic:hover {
    box-shadow: 0 8px 16px rgba(0, 160, 233, 0.2);
}

/* =============================================
   おすすめクリニックセクション
   ============================================= */
.featured-hospitals {
    margin-top: 1.5rem;
}

.featured-clinic {
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 8px rgba(0, 160, 233, 0.1);
    position: relative;
}

.featured-clinic:hover {
    box-shadow: 0 8px 16px rgba(0, 160, 233, 0.2);
}

/* 公式サイトへのボタン */
.official-site-cta {
    padding: 0 1.25rem;
    margin: 1rem 0;
}

.official-site-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #FF6B35 0%, #F55A1E 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.official-site-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.official-site-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
    text-decoration: none;
}

.official-site-button:hover::before {
    left: 100%;
}

.official-site-button:hover .button-arrow {
    transform: translateX(5px);
}

.button-icon {
    font-size: 1.25rem;
}

.button-text {
    flex: 1;
}

.button-arrow {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

/* レスポンシブ対応 */
@media (min-width: 768px) {
    .official-site-cta {
        padding: 0 2rem;
    }
    
    .official-site-button {
        max-width: 400px;
        margin: 0 auto;
    }
}

/* アニメーション */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(255, 107, 53, 0.5);
    }
    100% {
        box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    }
}

.official-site-button {
    animation: pulse 2s infinite;
}

.official-site-button:hover {
    animation: none;
}

/* おすすめバッジ（オプション） */
.featured-clinic::before {
    content: "おすすめ";
    position: absolute;
    top: -2px;
    right: -2px;
    background: linear-gradient(135deg, #FF6B35 0%, #F55A1E 100%);
    color: white;
    padding: 0.25rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 0 6px 0 6px;
    z-index: 1;
}