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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Meiryo', sans-serif;
  color: #333;
  background: #f7f7f5;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

/* =============================================
   共通レイアウト
   ============================================= */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 20px;
}

/* =============================================
   ヘッダー
   ============================================= */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.site-logo {
  font-size: 14px;
  font-weight: 700;
  color: #1e7a3c;
  white-space: nowrap;
}

.global-nav ul {
  display: flex;
  gap: 20px;
}

.global-nav a {
  font-size: 12px;
  color: #555;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.global-nav a:hover,
.global-nav a.current {
  color: #1e7a3c;
  border-bottom-color: #1e7a3c;
}

/* =============================================
   ヒーローバナー
   ============================================= */
.page-hero {
  background:
    linear-gradient(rgba(20, 80, 40, 0.68), rgba(20, 80, 40, 0.68)),
    url('../images/hero.jpg') center / cover no-repeat;
  padding: 52px 20px;
  text-align: center;
  color: #fff;
}

/* 画像がない場合のフォールバック */
.page-hero:not([style]) {
  background-color: #1e7a3c;
}

.page-hero h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.page-hero-sub {
  font-size: 12px;
  letter-spacing: 0.25em;
  opacity: 0.8;
  margin-top: 6px;
}

/* =============================================
   絞り込み検索
   ============================================= */
.search-section {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  margin-bottom: 24px;
  overflow: hidden;
}

.search-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: none;
  border: none;
  border-bottom: 1px solid #e0e0e0;
  font-size: 15px;
  font-weight: 700;
  color: #333;
  cursor: pointer;
  font-family: inherit;
}

.search-toggle span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-search,
.icon-toggle {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #1e7a3c;
  transition: transform 0.25s;
}

.search-toggle[aria-expanded="false"] .icon-toggle {
  transform: rotate(45deg); /* − → + */
}

.search-body {
  padding: 18px 20px 20px;
  transition: none;
}

.search-body.is-hidden {
  display: none;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.search-row:before,
.search-row:after{
  content: none;
}

.search-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.search-group:before,
.search-group:after{
  content: none;
}

.search-group--full {
  grid-column: 1 / -1;
}

.search-label {
  font-size: 13px;
  font-weight: 700;
  color: #444;
}

/* テキスト入力 */
.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #999;
  pointer-events: none;
}

.input-wrap input[type="text"] {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  color: #333;
  background: #fafafa;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
}

.input-wrap input[type="text"]:focus {
  outline: none;
  border-color: #1e7a3c;
  background: #fff;
}

/* チェックボックス */
.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.checkbox-list:before,
.checkbox-list:after{
  content: none;
}

.checkbox-list--wrap {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.cb-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #444;
  cursor: pointer;
  user-select: none;
}

.cb-item input[type="checkbox"] {
  accent-color: #1e7a3c;
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

/* 検索ボタン */
.search-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.search-actions:before,
.search-actions:after{
  content: none;
}

.btn-clear {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  color: #666;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  transition: background 0.2s, border-color 0.2s;
}

.btn-clear:hover {
  background: #f5f5f5;
  border-color: #aaa;
}

.btn-search {
  flex: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border: none;
  border-radius: 6px;
  background: #1e7a3c;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.btn-search svg {
  width: 16px;
  height: 16px;
}

.btn-search:hover {
  background: #186633;
}

/* =============================================
   カテゴリタブ
   ============================================= */
.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.filter-tabs:before,
.filter-tabs:after{
  content: none;
}

.tabs {
  padding: 8px 20px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  color: #555;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.tabs:hover {
  border-color: #1e7a3c;
  color: #1e7a3c;
}

.tabs.active {
  background: #1e7a3c;
  color: #fff;
  border-color: #1e7a3c;
}

/* =============================================
   件数表示
   ============================================= */
.results-count {
  font-size: 13px;
  color: #777;
  margin-bottom: 16px;
}

/* =============================================
   施設カードグリッド
   ============================================= */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.cards-grid:before,
.cards-grid:after{
  content: none;
}

/* =============================================
   施設カード
   ============================================= */
.facility-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.facility-card:hover {
  border-color: #1e7a3c;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(30, 122, 60, 0.12);
}

/* カード画像 */
.card-img {
  position: relative;
  height: 160px;
  overflow: hidden;
  background: #e8f4ec;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.facility-card:hover .card-img img {
  transform: scale(1.04);
}

.card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-img-placeholder svg {
  width: 48px;
  height: 48px;
  color: #1e7a3c;
  opacity: 0.35;
}

/* サービスバッジ */
.service-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.03em;
}

.badge-care      { background: #d07830; }
.badge-short     { background: #5a9e68; }
.badge-nursing   { background: #8a60b0; }
.badge-childcare { background: #d05050; }
.badge-disability{ background: #4070b0; }

/* カード本文 */
.card-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
}

/* カテゴリ別の施設名カラー */
.card-name--care       { color: #d07830; }
.card-name--short      { color: #5a9e68; }
.card-name--nursing    { color: #8a60b0; }
.card-name--childcare  { color: #d05050; }
.card-name--disability { color: #4070b0; }

.card-addr,
.card-tel {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  font-size: 11px;
  color: #666;
  line-height: 1.55;
  margin-bottom: 4px;
}

.card-addr svg,
.card-tel svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* サービスタグ */
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 10px 0;
}

.service-tag {
  font-size: 10px;
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 700;
}

.tag-kaigo,
.tag-care {
  background: #fff3e8;
  color: #a05a18;
}

.tag-hoiku,
.tag-child,
.tag-childcare {
  background: #ffeaea;
  color: #a03030;
}

.tag-shogai,
.tag-disability {
  background: #e8effa;
  color: #2a5090;
}

/* 詳細ボタン */
.btn-detail {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  margin-top: auto;
  transition: filter 0.15s, transform 0.15s;
  color: #FFF!important;
}

.btn-detail:hover {
  filter: brightness(0.9);
  transform: scale(0.98);
}

.icon-external {
  width: 13px;
  height: 13px;
}

.btn-care       { background: #d07830; }
.btn-short      { background: #5a9e68; }
.btn-nursing    { background: #8a60b0; }
.btn-childcare  { background: #d05050; }
.btn-disability { background: #4070b0; }

/* =============================================
   検索結果ゼロ
   ============================================= */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 56px 20px;
  color: #aaa;
}

.no-results svg {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  opacity: 0.4;
}

.no-results p {
  font-size: 15px;
}

/* =============================================
   フッター
   ============================================= */
.site-footer {
  background: #1e7a3c;
  color: #fff;
  padding: 32px 20px 20px;
  margin-top: 48px;
  text-align: center;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin-bottom: 20px;
}

.footer-nav a {
  font-size: 12px;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.footer-nav a:hover {
  opacity: 1;
}

.footer-info {
  font-size: 12px;
  opacity: 0.8;
  line-height: 1.8;
  margin-bottom: 16px;
}

.footer-copy {
  font-size: 11px;
  opacity: 0.6;
}

/* =============================================
   非表示ユーティリティ（タブ切替）
   ============================================= */
.facility-card.is-hidden {
  display: none;
}

/* =============================================
   レスポンシブ
   ============================================= */
@media (max-width: 700px) {

  .c-service-block1{
    padding-left: 15px;
    padding-right: 15px;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .header-inner {
    flex-direction: column;
    height: auto;
    padding: 10px 16px;
    gap: 6px;
  }

  .global-nav ul {
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
  }

  .page-hero {
    padding: 36px 16px;
  }

  .page-hero h1 {
    font-size: 22px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .filter-tabs {
    gap: 6px;
  }

  .tabs {
    padding: 7px 14px;
    font-size: 12px;
  }
}
