/* ══════════════════════════════════════════
   在宅ケアナビ — グローバルデザインシステム v2
   全ページ共通: カラー・タイポグラフィ・ナビ・フッター
══════════════════════════════════════════ */

/* ── カラーパレット ── */
:root {
  --primary:       #1A6B5A;
  --primary-dark:  #144F42;
  --primary-mid:   #2D8A75;
  --primary-light: #E8F4F1;
  --accent:        #C0533A;
  --text:          #2D2D2D;
  --text-muted:    #6B7280;
  --bg:            #F2F5F4;
  --white:         #FFFFFF;
  --border:        #DDE5E2;
  --footer-bg:     #1B2B28;
  /* Task 1: コンテンツ幅統一 */
  --content-width: 960px;
}

/* ── 基本設定 ── */
html {
  scroll-behavior: smooth;
}

*:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 17px;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* ── タイポグラフィ ── */
h1 { font-size: 1.85rem; line-height: 1.4; color: var(--primary-dark); margin-bottom: 16px; font-weight: 700; }
h2 { font-size: 1.4rem; line-height: 1.45; color: var(--primary-dark); margin-bottom: 14px; font-weight: 700; }
h3 { font-size: 1.18rem; line-height: 1.5; color: var(--primary-dark); margin-bottom: 10px; font-weight: 700; }

p, li, td, th, dd, dt, label, summary, blockquote, figcaption {
  line-height: 1.8;
  color: var(--text);
}

p, li { max-width: 680px; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.text-muted { color: var(--text-muted); }

/* ── スマホタイポ ── */
@media (max-width: 480px) {
  body { font-size: 16px; }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.1rem; }
}

/* ── タップターゲット ── */
.g-nav a, .g-drawer-nav a, .g-subnav a,
.g-hamburger, .g-drawer-close {
  min-height: 44px;
}
button, input, select, textarea {
  min-height: 44px;
  font-family: inherit;
}

/* Leaflet */
.leaflet-container img {
  max-width: none !important;
  max-height: none !important;
}

/* ══════════════════════════════════════════
   グローバルヘッダー
══════════════════════════════════════════ */
.g-header {
  background: var(--white);
  border-bottom: 2px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}
.g-header-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ── ロゴ ── */
.g-logo {
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}
.g-logo-main {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-dark);
}
.g-logo-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  font-weight: 500;
}

/* ── デスクトップナビ ── */
.g-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}
.g-nav a {
  font-size: 0.92rem;
  color: var(--text);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-weight: 500;
}
.g-nav a:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}
.g-nav a.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}

/* ── ドロップダウン ── */
.g-nav-group {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.g-nav-group > a {
  font-size: 0.92rem;
  color: var(--text);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-weight: 500;
}
.g-nav-group > a:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}
.g-nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  min-width: 220px;
  padding: 6px 0;
  z-index: 100;
}
.g-nav-group:hover .g-nav-dropdown,
.g-nav-group:focus-within .g-nav-dropdown {
  display: block;
  animation: fadeInDown 0.15s ease;
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.g-nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 0.92rem;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  min-height: 40px;
  font-weight: 400;
}
.g-nav-dropdown a:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* ── ハンバーガー ── */
.g-hamburger {
  display: none;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}
.g-hamburger:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ══════════════════════════════════════════
   モバイルドロワー
══════════════════════════════════════════ */
.g-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
}
.g-drawer.open { display: block; }
.g-drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}
.g-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  max-width: 85vw;
  height: 100%;
  background: var(--white);
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.g-drawer.open .g-drawer-panel {
  transform: translateX(0);
}
.g-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 2px solid var(--primary);
}
.g-drawer-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-dark);
}
.g-drawer-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}
.g-drawer-close:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}
.g-drawer-nav {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  overflow-y: auto;
  flex: 1;
}
.g-drawer-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid #f3f4f6;
  min-height: 48px;
  transition: background 0.15s;
  font-weight: 400;
}
.g-drawer-nav a:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}
.g-drawer-nav a.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  border-left: 3px solid var(--primary);
}
.g-drawer-nav .g-drawer-section {
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  padding: 18px 20px 6px;
  text-transform: uppercase;
  border-bottom: none;
}
.g-drawer-nav .g-drawer-sub {
  padding-left: 40px;
  position: relative;
}
.g-drawer-nav .g-drawer-sub::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}
.g-drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
}
.g-drawer-footer a {
  color: var(--primary);
  text-decoration: none;
}

/* ── モバイルブレークポイント ── */
@media (max-width: 768px) {
  .g-nav { display: none; }
  .g-hamburger { display: flex; }
  .g-logo-sub { display: none; }
}

/* ══════════════════════════════════════════
   グローバルフッター
══════════════════════════════════════════ */
.g-footer {
  background: var(--footer-bg);
  border-top: 3px solid var(--primary);
  color: #9ABAB6;
  padding: 40px 20px 24px;
  margin-top: auto;
  font-size: 0.92rem;
  line-height: 1.8;
}
/* Task 7: フッター5列グリッド — max-width:960px, 2fr+1fr×4, モバイル対応 */
.g-footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 32px;
}
.g-footer-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}
.g-footer-catch {
  font-size: 0.9rem;
  color: #6B8A86;
  margin-bottom: 12px;
}
.g-footer-operator a {
  color: var(--primary-mid);
  text-decoration: none;
}
.g-footer-operator a:hover { color: var(--white); }
.g-footer-heading {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.g-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.g-footer-links li { margin-bottom: 6px; }
.g-footer-links a {
  color: #9ABAB6;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.g-footer-links a:hover { color: var(--white); }
.g-footer-links a::before {
  content: "›";
  color: var(--primary-mid);
  font-weight: 700;
}
.g-footer-about-text {
  font-size: 0.9rem;
  color: #6B8A86;
  line-height: 1.8;
}
.g-footer-bottom {
  max-width: 1000px;
  margin: 24px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.85rem;
  color: #6B8A86;
}
.g-footer-bottom a {
  color: #9ABAB6;
  text-decoration: none;
}
.g-footer-bottom a:hover { color: var(--white); }

/* Task 7: フッターレスポンシブ — 768pxでbrand列フル幅+2列 */
@media (max-width: 900px) {
  .g-footer-inner { grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
}
@media (max-width: 768px) {
  .g-footer-inner { grid-template-columns: 1fr 1fr; gap: 20px; }
  .g-footer-col--brand { grid-column: 1 / -1; } /* スマホ: brand列フル幅 */
}
@media (max-width: 480px) {
  .g-footer-inner { grid-template-columns: 1fr; gap: 16px; }
}

/* ══════════════════════════════════════════
   施設サブナビ（タブ）
══════════════════════════════════════════ */
.g-subnav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
}
.g-subnav-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 0;
}
.g-subnav a {
  display: inline-flex;
  align-items: center;
  padding: 12px 18px;
  font-size: 0.92rem;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  min-height: 44px;
  font-weight: 500;
}
.g-subnav a:hover {
  color: var(--primary);
  background: var(--primary-light);
}
.g-subnav a.active {
  color: var(--primary);
  font-weight: 700;
  border-bottom-color: var(--primary);
}

/* ══════════════════════════════════════════
   共通パンくず
══════════════════════════════════════════ */
.breadcrumb {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 8px 20px;
}
.breadcrumb-inner {
  max-width: 1000px;
  margin: 0 auto;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.breadcrumb-inner a {
  color: var(--text-muted);
  text-decoration: none;
}
.breadcrumb-inner a:hover { color: var(--primary); }
.breadcrumb-inner span { margin: 0 5px; }

/* ══════════════════════════════════════════
   共通コラム記事スタイル
══════════════════════════════════════════ */
.article-hero {
  background: linear-gradient(150deg, var(--white), #F0F8F6, var(--primary-light));
  padding: 44px 20px 36px;
  text-align: center;
}
.article-hero h1 {
  font-size: clamp(1.15rem, 3.5vw, 1.65rem);
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.6;
  margin-bottom: 10px;
}
.article-lead {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 20px;
  line-height: 1.85;
}
.article-wrap {
  max-width: 740px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}
.article-wrap h2 {
  font-size: 1.05rem;
  border-left: 4px solid var(--primary);
  padding-left: 12px;
  margin: 40px 0 16px;
}
.article-wrap h3 {
  font-size: 0.95rem;
  margin: 24px 0 10px;
}

/* ── 記事内コンポーネント ── */
.toc {
  background: var(--white);
  border: 1.5px solid var(--primary-light);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 36px;
}
.toc-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
  letter-spacing: 0.08em;
}
.toc a { color: var(--primary-dark); }
.toc a:hover { color: var(--primary); text-decoration: underline; }

.point-box {
  background: var(--primary-light);
  border: 1px solid rgba(26,107,90,0.2);
  border-left: 4px solid var(--primary-mid);
  border-radius: 6px;
  padding: 1rem 1.2rem;
  margin: 1rem 0;
  font-size: 0.95rem;
  line-height: 1.7;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
.comparison-table th, .comparison-table td {
  border: 1px solid var(--border);
  padding: 0.6rem 0.8rem;
  text-align: left;
  vertical-align: top;
}
.comparison-table th {
  background: var(--primary-light);
  font-weight: 700;
  color: var(--primary-dark);
}

.summary-box {
  background: var(--primary-light);
  border-radius: 14px;
  padding: 22px 24px;
  margin: 24px 0;
}

.step-box {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 12px 0;
}
.step-num {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  border-radius: 50%;
  margin-right: 8px;
}

.faq-item {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 12px 0;
}
.faq-q { font-weight: 700; color: var(--primary-dark); margin-bottom: 8px; }
.faq-q::before { content: "Q. "; color: var(--primary); font-weight: 700; }
.faq-a::before { content: "A. "; color: var(--primary-mid); font-weight: 700; }

.section-anchor { display: block; height: 72px; margin-top: -72px; visibility: hidden; }

@media (max-width: 600px) {
  .article-hero { padding: 32px 16px 28px; }
  .article-wrap { padding: 28px 16px 40px; }
}
