/* =============================================
   病院ポータルサイト用CSS
   女性向けクリーンデザイン - モバイルファースト
   ============================================= */

/* カラーパレット */
:root {
  /* メインカラー - 優しいピンク系 */
  --primary-color: #E91E63;
  --primary-light: #F8BBD0;
  --primary-dark: #C2185B;
  
  /* セカンダリカラー - 落ち着いたティール */
  --secondary-color: #00BCD4;
  --secondary-light: #B2EBF2;
  --secondary-dark: #0097A7;
  
  /* ニュートラルカラー */
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-light: #999999;
  --background: #FAFAFA;
  --white: #FFFFFF;
  --border-color: #E0E0E0;
  
  /* 機能色 */
  --success: #4CAF50;
  --warning: #FF9800;
  --error: #F44336;
  --info: #2196F3;
  
  /* シャドウ */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 20px rgba(0,0,0,0.15);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Yu Gothic", YuGothic, "ヒラギノ角ゴ ProN W3", "Hiragino Kaku Gothic ProN", Arial, "メイリオ", Meiryo, sans-serif;
  color: var(--text-primary);
  background-color: var(--background);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

/* =============================================
   パンくずリスト
   ============================================= */
.breadcrumbs {
  background: var(--white);
  padding: 12px 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

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

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

.breadcrumb-item a {
  color: var(--primary-color);
  text-decoration: none;
  transition: opacity 0.3s;
}

.breadcrumb-item a:hover {
  opacity: 0.7;
}

.breadcrumb-item .separator {
  margin: 0 8px;
  color: var(--text-light);
}

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

/* =============================================
   ページヘッダー
   ============================================= */
.page-header {
  background: var(--white);
  padding: 24px 16px;
  margin-bottom: 24px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.page-title .count {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-secondary);
  background: var(--primary-light);
  padding: 4px 12px;
  border-radius: 20px;
}

.term-description {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.8;
  margin-top: 12px;
}

/* =============================================
   エリア・駅リスト
   ============================================= */
.child-areas,
.child-stations {
  background: var(--white);
  padding: 24px 16px;
  margin-bottom: 24px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.child-areas h2,
.child-stations h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 4px solid var(--primary-color);
}

.area-list,
.station-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.area-item a,
.station-item a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--background);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s;
}

.area-item a:hover,
.station-item a:hover {
  background: var(--primary-light);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.area-name,
.station-name {
  font-weight: 500;
  font-size: 14px;
}

.area-count,
.station-count {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--white);
  padding: 2px 8px;
  border-radius: 12px;
}

/* =============================================
   病院リスト
   ============================================= */
.hospital-list {
  margin-bottom: 40px;
}

.hospital-list h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding: 16px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.result-count {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding: 0 16px;
}

.hospital-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 32px;
}

.hospital-item {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.3s;
}

.hospital-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.hospital-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border-color);
}

.hospital-name {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

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

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

.hospital-info {
  padding: 20px;
}

.info-row {
  display: flex;
  margin-bottom: 12px;
  align-items: flex-start;
}

.info-row:last-child {
  margin-bottom: 0;
}

.info-row dt {
  display: flex;
  align-items: center;
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 14px;
  min-width: 80px;
  margin-right: 12px;
}

.info-row dt i {
  margin-right: 6px;
  color: var(--primary-color);
  font-size: 16px;
}

.info-row dd {
  flex: 1;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
}

.info-row dd a {
  color: var(--primary-color);
  text-decoration: none;
}

.info-row dd a:hover {
  text-decoration: underline;
}

.hospital-footer {
  padding: 16px 20px;
  background: var(--background);
  text-align: center;
}

.btn-detail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--primary-color);
  color: var(--white);
  text-decoration: none;
  border-radius: 24px;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s;
}

.btn-detail:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

.btn-detail i {
  font-size: 16px;
}

/* =============================================
   ページネーション
   ============================================= */
.pagination-wrapper {
  margin: 32px 0;
}

.pagination-wrapper .nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination-wrapper .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s;
}

.pagination-wrapper .page-numbers:hover {
  background: var(--primary-light);
  border-color: var(--primary-color);
  color: var(--primary-dark);
}

.pagination-wrapper .page-numbers.current {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white);
}

.pagination-wrapper .prev,
.pagination-wrapper .next {
  padding: 0 16px;
}

/* =============================================
   結果なし
   ============================================= */
.no-results {
  background: var(--white);
  padding: 48px 24px;
  text-align: center;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.no-results p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 16px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--secondary-color);
  color: var(--white);
  text-decoration: none;
  border-radius: 24px;
  font-weight: 500;
  transition: all 0.3s;
}

.btn-back:hover {
  background: var(--secondary-dark);
  transform: scale(1.05);
}

/* =============================================
   関連エリア
   ============================================= */
.related-areas {
  background: var(--white);
  padding: 24px 16px;
  margin-bottom: 24px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.related-areas h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 4px solid var(--secondary-color);
}

.related-area-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.related-area-list li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--background);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.3s;
}

.related-area-list li a:hover {
  background: var(--secondary-light);
  border-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* =============================================
   レスポンシブ - タブレット以上
   ============================================= */
@media (min-width: 768px) {
  .container {
    padding: 0 24px;
  }
  
  .page-header {
    padding: 32px 24px;
  }
  
  .page-title {
    font-size: 32px;
  }
  
  .page-title .count {
    font-size: 18px;
  }
  
  .child-areas,
  .child-stations {
    padding: 32px 24px;
  }
  
  .area-list,
  .station-list {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
  }
  
  .hospital-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  
  .hospital-name {
    font-size: 20px;
  }
  
  .info-row dt {
    min-width: 100px;
  }
  
  .related-area-list {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

/* =============================================
   レスポンシブ - デスクトップ
   ============================================= */
@media (min-width: 1024px) {
  .hospital-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .area-list,
  .station-list {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

/* =============================================
   アイコンフォント（Font Awesome互換）
   ============================================= */
.icon-location::before {
  content: "📍";
  margin-right: 4px;
}

.icon-phone::before {
  content: "📞";
  margin-right: 4px;
}

.icon-train::before {
  content: "🚃";
  margin-right: 4px;
}

.icon-medical::before {
  content: "🏥";
  margin-right: 4px;
}

.icon-calendar::before {
  content: "📅";
  margin-right: 4px;
}

.icon-arrow-right::before {
  content: "→";
}

.icon-chevron-left::before {
  content: "‹";
}

.icon-chevron-right::before {
  content: "›";
}

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

.hospital-item,
.area-item,
.station-item {
  animation: fadeIn 0.4s ease-out;
}

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

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

/* =============================================
   ユーティリティクラス
   ============================================= */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.px-1 { padding-left: 8px; padding-right: 8px; }
.px-2 { padding-left: 16px; padding-right: 16px; }
.px-3 { padding-left: 24px; padding-right: 24px; }

.py-1 { padding-top: 8px; padding-bottom: 8px; }
.py-2 { padding-top: 16px; padding-bottom: 16px; }
.py-3 { padding-top: 24px; padding-bottom: 24px; }