/*
Theme Name: kaigo.frommetoyou
Theme URI: https://kaigo.frommetoyou.jp/
Author: from me to you Inc.
Author URI: https://www.frommetoyou.co.jp/
Description: 徳島・四国の介護情報メディア。家族の想いに寄り添う、地域に根ざしたメディアテーマ。
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 8.0
License: Proprietary
Text Domain: kaigo-frommetoyou
*/

/* ===========================================
   CSS Variables - カスタマイザーで変更可能
   =========================================== */
:root {
  /* frommetoyou brand-hub canonical tokens (shared visual language). */
  --fmt-primary: #0066cc;
  --fmt-cyan: #00d4ff;
  --fmt-dark: #003d80;
  --fmt-light-cyan: #e0f7ff;

  /* kaigo theme compatibility variables; layout and WP templates unchanged. */
  --bg: #f7faff;
  --bg-alt: #ecf6fd;
  --paper: #ffffff;
  --ink: #172a40;
  --ink-soft: #4c627b;
  --ink-mute: #61748a;
  --line: #d6e5f3;
  --accent: #00b6e6;
  --accent-deep: #0053a6;
  --accent-light: #b9edfa;
  --warm: #0066cc;
  --warm-soft: #9edbfa;
  /* Secondary care-domain personality only; never the primary CTA color. */
  --kaigo-sage-mist: #eef5f3;
  --kaigo-sage-text: #365b55;
}

/* ===========================================
   Reset & Base
   =========================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.85;
  font-weight: 400;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
}

.serif { font-family: 'Shippori Mincho', 'Yu Mincho', serif; }

a { color: var(--accent-deep); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--warm); }

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

button { font-family: inherit; cursor: pointer; }

/* ===========================================
   Layout - Container
   =========================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ===========================================
   Header
   =========================================== */
.site-header {
  background: rgba(247, 250, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.site-logo {
  font-family: 'Shippori Mincho', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.05em;
}

.site-logo__text, .site-logo .custom-logo-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.site-logo__text:hover, .site-logo__text:focus-visible { color: var(--fmt-dark); }
.site-logo .custom-logo { max-width: 240px; height: auto; }
.site-logo .accent { color: var(--accent-deep); font-weight: 700; }

.site-logo .small {
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 400;
  letter-spacing: 0.15em;
  display: block;
  margin-top: 2px;
}

.site-nav ul {
  display: flex;
  gap: 36px;
  list-style: none;
  align-items: center;
}

.site-nav a {
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.site-nav a:hover { color: var(--accent-deep); }

.site-nav .nav-cta {
  background: var(--accent-deep);
  color: white !important;
  padding: 10px 24px;
  border-radius: 2px;
  font-size: 13px !important;
}

.site-nav .nav-cta:hover { background: var(--warm); }

.site-nav a:focus-visible, .menu-toggle:focus-visible, .btn:focus-visible,
.kaigo-journey__card:focus-visible, .article-body a:focus-visible {
  outline: 3px solid var(--fmt-primary);
  outline-offset: 4px;
}
.skip-link {
  position: absolute;
  z-index: 9999;
  top: -90px;
  left: 12px;
  background: #fff;
  padding: 12px 18px;
  color: var(--fmt-dark);
  border: 2px solid var(--fmt-primary);
}
.skip-link:focus { top: 12px; }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--ink);
  padding: 8px;
}

/* ===========================================
   Footer
   =========================================== */
.site-footer {
  background: var(--ink);
  color: var(--bg);
  padding: 64px 32px 32px;
  margin-top: 80px;
}

.footer-inner { max-width: 1200px; margin: 0 auto; }

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand {
  font-family: 'Shippori Mincho', serif;
  font-size: 20px;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.footer-desc {
  font-size: 13px;
  line-height: 1.9;
  opacity: 0.7;
  margin-bottom: 24px;
}

.footer-company {
  font-size: 12px;
  opacity: 0.5;
  line-height: 1.8;
}

.footer-col h4 {
  font-size: 12px;
  letter-spacing: 0.2em;
  margin-bottom: 20px;
  opacity: 0.7;
  text-transform: uppercase;
  font-weight: 500;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 12px; }

.footer-col a {
  color: var(--bg);
  font-size: 13px;
  opacity: 0.85;
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer-col a:hover { opacity: 1; color: var(--bg); }

.footer-bottom {
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  opacity: 0.5;
}

/* ===========================================
   Common Section Styles
   =========================================== */
.section {
  padding: 100px 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--accent-deep);
  margin-bottom: 16px;
  text-transform: uppercase;
}

.section-title {
  font-family: 'Shippori Mincho', serif;
  font-size: 38px;
  font-weight: 600;
  margin-bottom: 24px;
  letter-spacing: 0.05em;
  line-height: 1.5;
}

.section-desc {
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 640px;
  margin-bottom: 48px;
  line-height: 2;
}

/* ===========================================
   Buttons
   =========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 36px;
  font-size: 15px;
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: all 0.3s;
  border-radius: 2px;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent-deep);
  color: white;
}

.btn-primary:hover {
  background: var(--ink);
  color: white;
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.btn-secondary:hover {
  background: var(--ink);
  color: white;
}

.btn .arrow { transition: transform 0.3s; }
.btn:hover .arrow { transform: translateX(4px); }

/* ===========================================
   Article / Single Post
   =========================================== */
.article-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 32px;
}

.article-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.article-meta {
  font-size: 13px;
  color: var(--ink-mute);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.article-title {
  font-family: 'Shippori Mincho', serif;
  font-size: 34px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.03em;
}

.article-body { font-size: 16px; line-height: 2; color: var(--ink); }

.article-body h2 {
  font-family: 'Shippori Mincho', serif;
  font-size: 26px;
  margin: 48px 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent);
  font-weight: 600;
}

.article-body h3 {
  font-family: 'Shippori Mincho', serif;
  font-size: 21px;
  margin: 36px 0 16px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
  font-weight: 600;
}

.article-body p { margin-bottom: 24px; }
.article-body ul, .article-body ol { margin: 0 0 24px 24px; }
.article-body li { margin-bottom: 8px; }
.article-body a { color: var(--accent-deep); text-decoration: underline; }
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  margin: 24px 0;
  background: var(--bg-alt);
  font-style: italic;
}

.article-body img { margin: 24px 0; border-radius: 4px; }

/* ===========================================
   Archive / Category Pages
   =========================================== */
.archive-header {
  text-align: center;
  padding: 80px 32px 40px;
  max-width: 800px;
  margin: 0 auto;
}

.archive-title {
  font-family: 'Shippori Mincho', serif;
  font-size: 38px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.archive-desc {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.9;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 32px;
}

.post-card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 32px 28px;
  transition: all 0.3s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.post-card-cat {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent-deep);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.post-card-title {
  font-family: 'Shippori Mincho', serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
  margin-bottom: 16px;
  color: var(--ink);
}

.post-card-excerpt {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.85;
  flex-grow: 1;
}

.post-card-date {
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 16px;
  letter-spacing: 0.1em;
}

/* ===========================================
   Pagination
   =========================================== */
.pagination {
  text-align: center;
  margin: 48px 0;
}

.pagination .page-numbers {
  display: inline-block;
  padding: 10px 16px;
  margin: 0 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
}

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

.pagination .page-numbers:hover { background: var(--bg-alt); }
.pagination .page-numbers.current:hover { background: var(--accent-deep); }

/* ===========================================
   Sidebar
   =========================================== */
.sidebar {
  padding: 32px;
}

.sidebar-widget {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 28px;
  margin-bottom: 24px;
}

.sidebar-widget h3 {
  font-family: 'Shippori Mincho', serif;
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent);
}

.sidebar-cta {
  background: var(--accent-deep);
  color: white;
  padding: 32px 28px;
  text-align: center;
}

.sidebar-cta h3 {
  font-family: 'Shippori Mincho', serif;
  font-size: 18px;
  margin-bottom: 12px;
  color: white;
  border: none;
  padding: 0;
}

.sidebar-cta p {
  font-size: 13px;
  margin-bottom: 20px;
  opacity: 0.9;
  line-height: 1.8;
}

.sidebar-cta .btn {
  background: white;
  color: var(--accent-deep);
  width: 100%;
  justify-content: center;
}

/* ===========================================
   Responsive
   =========================================== */
@media (max-width: 900px) {
  .menu-toggle { 
    display: block !important;
    z-index: 101;
  }
  .site-nav { 
    display: none !important;
  }
  .site-nav.is-open {
    display: block !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    padding: 24px 32px;
    border-bottom: 1px solid var(--line);
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-height: calc(100vh - 100px);
    overflow-y: auto;
  }
  .site-nav.is-open ul {
    flex-direction: column !important;
    gap: 20px;
    align-items: flex-start !important;
    flex-wrap: nowrap !important;
  }

  .section { padding: 60px 24px; }
  .section-title { font-size: 28px; }

  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }

  .post-grid { grid-template-columns: 1fr; padding: 0 24px; }

  .article-content { padding: 40px 24px; }
  .article-title { font-size: 24px; }
  .article-body h2 { font-size: 22px; }
  .article-body h3 { font-size: 18px; }
}

@media (max-width: 600px) {
  .header-inner { padding: 16px 20px; }
  .site-logo { font-size: 18px; }
  .site-logo .small { font-size: 10px; }
}
