/*
Theme Name: 介護施設ナビ Child
Theme URI: https://shisetsu-navi.jp
Description: GeneratePress 子テーマ（介護施設ナビ用）
Author: 株式会社トップキャスト
Author URI: https://topcast.co.jp
Template: generatepress
Version: 1.0.0
Text Domain: shisetsu-navi-child
*/

/* ============================================================
   トップページ (front-page.php) — minimal CSS
   ============================================================ */

/* ============================================================
   グローバル: 横スクロール防止
   ============================================================ */
.sn-search-page {
  overflow-x: clip;
}

/* ============================================================
   トップページ (front-page.php) — minimal CSS
   ============================================================ */

/* GeneratePress: フロントページの記事ラッパーを透過 */
.sn-front .inside-article {
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* 全体ラッパー */
.sn-fp {
  width: 100%;
  min-width: 0;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
  overflow-x: clip;
}

/* ヒーロー */
.sn-fp-hero {
  text-align: center;
  padding: 40px 0 32px;
}
.sn-fp-hero h1 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.sn-fp-hero > p {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 24px;
  word-break: break-word;
}

/* 検索ボックス */
.sn-fp-searchbox {
  max-width: 640px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
}
.sn-fp-freeform {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  min-width: 0;
}
.sn-fp-freeform input[type="text"] {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  height: 44px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0 14px;
  font-size: 15px;
}
.sn-fp-freeform input:focus { border-color: #10b981; outline: none; }
.sn-fp-freeform button {
  height: 44px;
  padding: 0 20px;
  background: #059669;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.sn-fp-freeform button:hover { background: #047857; }

.sn-fp-divider {
  text-align: center;
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
  line-height: 0;
  padding: 0;
}
.sn-fp-divider span {
  background: #fff;
  padding: 0 12px;
}

.sn-fp-stepform {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.sn-fp-stepform select {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  height: 40px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 13px;
}
.sn-fp-stepform button {
  height: 40px;
  padding: 0 16px;
  background: #059669;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}
.sn-fp-stepform button:hover { background: #047857; }

/* 数字バー */
.sn-fp-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px 32px;
  padding: 16px 0;
  margin: 0 0 24px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
  color: #6b7280;
}
.sn-fp-stats strong {
  color: #047857;
  font-size: 20px;
  margin-right: 4px;
}

/* 共通ブロック */
.sn-fp-block {
  margin-bottom: 32px;
}
.sn-fp-block h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #059669;
}

/* 新着記事リスト */
.sn-fp-news {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sn-fp-news li {
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
  line-height: 1.6;
}
.sn-fp-news li:last-child { border-bottom: none; }
.sn-fp-news-date {
  color: #9ca3af;
  font-size: 13px;
  margin-right: 10px;
}
.sn-fp-news-cat {
  display: inline-block;
  background: #ecfdf5;
  color: #047857;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 99px;
  margin-right: 8px;
}
.sn-fp-news a {
  color: #111827;
  text-decoration: none;
}
.sn-fp-news a:hover { color: #059669; text-decoration: underline; }

/* 記事カテゴリリンク */
.sn-fp-catlinks {
  font-size: 14px;
}
.sn-fp-catlinks a {
  color: #059669;
  text-decoration: none;
  font-weight: 600;
}
.sn-fp-catlinks a:hover { text-decoration: underline; }

/* 都道府県 */
.sn-fp-region {
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 2;
}
.sn-fp-region strong {
  display: inline-block;
  width: 100px;
  color: #374151;
}
.sn-fp-region a {
  color: #4b5563;
  text-decoration: none;
  margin-right: 4px;
}
.sn-fp-region a:hover { color: #059669; }
.sn-fp-region small { color: #9ca3af; font-size: 11px; }

/* サービス種別 */
.sn-fp-services {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sn-fp-svc {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  color: #111827;
  text-decoration: none;
  background: #fff;
}
.sn-fp-svc:hover {
  border-color: #10b981;
  background: #ecfdf5;
}
.sn-fp-svc small { color: #9ca3af; margin-left: 4px; }

/* レスポンシブ */
@media (max-width: 640px) {
  .sn-fp-hero h1 { font-size: 20px; }
  .sn-fp-freeform { flex-direction: column; }
  .sn-fp-freeform button { width: 100%; }
  .sn-fp-stepform { flex-direction: column; }
  .sn-fp-stepform select { min-width: 100%; }
  .sn-fp-stepform button { width: 100%; }
  .sn-fp-stats { gap: 12px 20px; }
  .sn-fp-stats strong { font-size: 18px; }
  .sn-fp-region strong { width: auto; display: block; }
}

/* ============================================================
   一覧ページ (archive-facility.php / search.php)
   ============================================================ */

/* ── Wrap ── */
.sn-archive-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

/* ── Breadcrumb ── */
.sn-archive-breadcrumb {
  font-size: 13px;
  color: var(--sn-gray-500);
  margin-bottom: 20px;
}
.sn-archive-breadcrumb a {
  color: var(--sn-green-600);
  text-decoration: none;
}
.sn-archive-breadcrumb a:hover {
  text-decoration: underline;
}
.sn-archive-breadcrumb .sn-sep {
  margin: 0 6px;
  color: var(--sn-gray-300);
}

/* ── Header ── */
.sn-archive-header {
  margin-bottom: 24px;
}
.sn-archive-header h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--sn-gray-900);
  margin: 0 0 6px;
}
.sn-archive-desc {
  font-size: 14px;
  color: var(--sn-gray-500);
  margin: 0 0 8px;
}
.sn-archive-count {
  font-size: 13px;
  color: var(--sn-gray-400);
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
}

/* ── Subnav (city links under pref) ── */
.sn-archive-subnav {
  background: var(--sn-gray-50);
  border: 1px solid var(--sn-gray-200);
  border-radius: var(--sn-radius);
  padding: 16px;
  margin-bottom: 24px;
}
.sn-subnav-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--sn-gray-700);
  margin-bottom: 8px;
}
.sn-subnav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.sn-subnav-links a {
  font-size: 12px;
  color: var(--sn-gray-600);
  text-decoration: none;
  padding: 3px 10px;
  border-radius: 4px;
  transition: all .15s;
}
.sn-subnav-links a:hover {
  background: var(--sn-green-100);
  color: var(--sn-green-700);
}

/* ── Inline search box (search.php) ── */
.sn-search-inline {
  margin-bottom: 24px;
}
.sn-search-inline .sn-free-search {
  margin-bottom: 0;
}

/* ── Facility Card List ── */
.sn-facility-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Facility Card ── */
.sn-fcard {
  display: block;
  background: var(--sn-white);
  border: 1px solid var(--sn-gray-200);
  border-radius: var(--sn-radius-lg);
  padding: 20px;
  text-decoration: none;
  color: var(--sn-gray-900);
  transition: all .2s;
}
.sn-fcard:hover {
  border-color: var(--sn-green-500);
  box-shadow: var(--sn-shadow);
}
.sn-fcard-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.sn-fcard-badge {
  display: inline-block;
  background: var(--sn-green-50);
  color: var(--sn-green-700);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 100px;
  border: 1px solid var(--sn-green-100);
}
.sn-fcard-area {
  font-size: 12px;
  color: var(--sn-gray-500);
}
.sn-fcard-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--sn-gray-900);
  line-height: 1.4;
}
.sn-fcard:hover .sn-fcard-title {
  color: var(--sn-green-700);
}
.sn-fcard-meta {
  font-size: 13px;
  color: var(--sn-gray-600);
}
.sn-fcard-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 4px;
}
.sn-fcard-icon {
  flex-shrink: 0;
  width: 18px;
  text-align: center;
  font-size: 13px;
}
.sn-fcard-foot {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--sn-gray-400);
}

/* ── Pagination ── */
.sn-pagination {
  margin-top: 32px;
  text-align: center;
}
.sn-pagination .page-numbers {
  display: inline-block;
  min-width: 36px;
  height: 36px;
  line-height: 36px;
  text-align: center;
  border-radius: var(--sn-radius);
  font-size: 14px;
  font-weight: 600;
  color: var(--sn-gray-600);
  text-decoration: none;
  margin: 0 2px;
  transition: all .15s;
}
.sn-pagination .page-numbers:hover {
  background: var(--sn-gray-100);
  color: var(--sn-gray-900);
}
.sn-pagination .page-numbers.current {
  background: var(--sn-green-600);
  color: var(--sn-white);
}
.sn-pagination .page-numbers.dots {
  border: none;
  background: none;
  color: var(--sn-gray-400);
}
.sn-pagination .page-numbers.prev,
.sn-pagination .page-numbers.next {
  padding: 0 12px;
}

/* ── No results ── */
.sn-no-results {
  text-align: center;
  padding: 64px 20px;
  color: var(--sn-gray-500);
}
.sn-no-results p {
  font-size: 16px;
  margin-bottom: 8px;
}
.sn-no-results-hint {
  font-size: 13px;
  color: var(--sn-gray-400);
}
.sn-btn-back {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 24px;
  background: var(--sn-green-600);
  color: var(--sn-white);
  border-radius: var(--sn-radius);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background .2s;
}
.sn-btn-back:hover {
  background: var(--sn-green-700);
}

/* ── Archive responsive ── */
@media (max-width: 480px) {
  .sn-archive-header h1 { font-size: 18px; }
  .sn-fcard { padding: 16px; }
  .sn-fcard-title { font-size: 15px; }
}

/* ============================================================
   施設詳細ページ (single-facility.php)
   ============================================================ */

/* ── Wrap ── */
.sn-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

/* ── Breadcrumb ── */
.sn-breadcrumb {
  font-size: 13px;
  color: var(--sn-gray-500);
  margin-bottom: 8px;
}
.sn-breadcrumb a {
  color: var(--sn-green-600);
  text-decoration: none;
}
.sn-breadcrumb a:hover { text-decoration: underline; }
.sn-breadcrumb .sn-sep {
  margin: 0 6px;
  color: var(--sn-gray-300);
}

/* ── Back link ── */
.sn-back-link {
  display: inline-block;
  font-size: 13px;
  color: var(--sn-green-600);
  text-decoration: none;
  margin-bottom: 20px;
  transition: color .15s;
}
.sn-back-link:hover {
  color: var(--sn-green-700);
  text-decoration: underline;
}

/* ── Hero card ── */
.sn-hero {
  background: linear-gradient(135deg, #1a6b5a 0%, #2ea87e 100%);
  border-radius: 16px;
  padding: 32px;
  color: var(--sn-white);
  margin-bottom: 24px;
}
.sn-hero-type {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 13px;
  margin-bottom: 12px;
}
.sn-hero h1 {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--sn-white);
  line-height: 1.4;
}
.sn-hero-yomi {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 10px;
  letter-spacing: .02em;
}
.sn-hero-catdesc {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  margin-bottom: 16px;
  line-height: 1.5;
}
.sn-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
  opacity: 0.9;
}

/* ── Card ── */
.sn-card {
  background: var(--sn-white);
  border: 1px solid #d4e8e1;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}
.sn-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #1a6b5a;
  border-left: 4px solid #2ea87e;
  padding-left: 12px;
  margin: 0 0 16px;
}

/* ── Info table ── */
.sn-info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.sn-info-table tr {
  border-bottom: 1px solid #d4e8e1;
}
.sn-info-table tr:last-child { border-bottom: none; }
.sn-info-table th {
  width: 120px;
  padding: 12px 8px;
  color: var(--sn-gray-500);
  font-weight: 600;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}
.sn-info-table td {
  padding: 12px 8px;
  color: var(--sn-gray-900);
  word-break: break-all;
}
.sn-info-table a {
  color: var(--sn-green-600);
  text-decoration: none;
}
.sn-info-table a:hover {
  text-decoration: underline;
}

/* ── Map ── */
.sn-map-wrap {
  border-radius: 8px;
  overflow: hidden;
}
.sn-map-wrap iframe {
  display: block;
  width: 100%;
  height: 260px;
  border: none;
}
#sn-leaflet-map {
  width: 100%;
  height: 350px;
}
.sn-map-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--sn-gray-500);
  margin: 12px 0 0;
}
.sn-legend-red,
.sn-legend-blue {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 2px;
}
.sn-legend-red { background: #e53e3e; }
.sn-legend-blue { background: #3b82f6; }

/* ── Nearby facilities ── */
.sn-nearby-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sn-nearby-list li {
  border-bottom: 1px solid #d4e8e1;
}
.sn-nearby-list li:last-child {
  border-bottom: none;
}
.sn-nearby-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 4px;
  text-decoration: none;
  color: var(--sn-gray-900);
  transition: background .15s;
}
.sn-nearby-list a:hover {
  background: var(--sn-gray-50);
}
.sn-nearby-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--sn-green-700);
}
.sn-nearby-meta {
  font-size: 12px;
  color: var(--sn-gray-500);
  white-space: nowrap;
  margin-left: 12px;
}

/* ── Geolocation distance ── */
#sn-geo-dist {
  display: none;
  margin-top: 12px;
  font-size: 13px;
  opacity: 0.85;
}

/* ── AI report ── */
.sn-ai-card {
  background: #f0f8f5;
  border: 1px solid #d4e8e1;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}
.sn-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1a6b5a;
  color: white;
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 12px;
  margin-bottom: 12px;
}
.sn-ai-card p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--sn-gray-900);
  margin: 0 0 12px;
}

/* ── Area link ── */
.sn-area-link {
  margin-bottom: 20px;
}
.sn-area-link a {
  display: block;
  text-align: center;
  padding: 14px 20px;
  background: var(--sn-gray-50);
  border: 1px solid var(--sn-gray-200);
  border-radius: var(--sn-radius);
  color: var(--sn-green-700);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s;
}
.sn-area-link a:hover {
  background: var(--sn-green-50);
  border-color: var(--sn-green-500);
}

/* ── CTA ── */
.sn-cta {
  background: linear-gradient(135deg, #fff8f0, #fff3e0);
  border: 1px solid #ffe0b2;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  margin-bottom: 20px;
}
.sn-cta h3 {
  font-size: 16px;
  margin: 0 0 8px;
  color: #e65100;
}
.sn-cta p {
  font-size: 13px;
  color: var(--sn-gray-500);
  margin: 0 0 16px;
}
.sn-cta a {
  display: inline-block;
  background: #ff6f00;
  color: white;
  border-radius: 8px;
  padding: 10px 24px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: opacity .2s;
}
.sn-cta a:hover { opacity: .85; }

/* ── Notice ── */
.sn-notice {
  font-size: 12px;
  color: var(--sn-gray-500);
  background: var(--sn-gray-50);
  border-radius: 8px;
  padding: 16px;
  line-height: 1.7;
}
.sn-notice a {
  color: var(--sn-green-600);
  text-decoration: none;
}
.sn-notice a:hover { text-decoration: underline; }

/* ── Service type detail ── */
.sn-stype-detail .sn-stype-desc {
  font-size: 14px;
  line-height: 1.85;
  color: var(--sn-gray-700);
  margin: 0 0 20px;
}
.sn-stype-meta {
  background: var(--sn-gray-50);
  border-radius: var(--sn-radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sn-stype-row {
  display: flex;
  gap: 12px;
  font-size: 13px;
  line-height: 1.6;
}
.sn-stype-label {
  flex-shrink: 0;
  width: 110px;
  font-weight: 700;
  color: #1a6b5a;
}
.sn-stype-row > span:last-child {
  color: var(--sn-gray-700);
}

/* ── Care manager card ── */
.sn-cm-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: #f0f4ff;
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}
.sn-cm-icon {
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
}
.sn-cm-body {
  flex: 1;
}
.sn-cm-title {
  font-size: 15px;
  font-weight: 700;
  color: #3730a3;
  margin-bottom: 6px;
}
.sn-cm-body p {
  font-size: 13px;
  color: var(--sn-gray-600);
  margin: 0 0 12px;
  line-height: 1.6;
}
.sn-cm-tel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #4338ca;
  color: white;
  border-radius: var(--sn-radius);
  padding: 10px 20px;
  font-size: 18px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  transition: opacity .2s;
}
.sn-cm-tel:hover { opacity: .85; }
.sn-cm-tel-icon { font-size: 16px; }

/* ── Single responsive ── */
@media (max-width: 480px) {
  .sn-hero { padding: 24px 20px; }
  .sn-hero h1 { font-size: 20px; }
  .sn-hero-meta { gap: 10px; font-size: 13px; }
  .sn-info-table th { width: 100px; }
  .sn-map-wrap iframe { height: 200px; }
  #sn-leaflet-map { height: 250px; }
  .sn-nearby-list a { flex-direction: column; align-items: flex-start; gap: 4px; }
  .sn-nearby-meta { margin-left: 0; }
  .sn-stype-row { flex-direction: column; gap: 2px; }
  .sn-stype-label { width: auto; }
  .sn-cm-card { flex-direction: column; gap: 12px; }
  .sn-cm-tel { font-size: 16px; width: 100%; justify-content: center; }
}

/* ── 運営者情報ページ ── */
.about-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
}
.about-table th,
.about-table td {
  border: 1px solid #ddd;
  padding: 12px 16px;
  text-align: left;
}
.about-table th {
  background: #f8f9fa;
  width: 160px;
  font-weight: 600;
}
