/*
Theme Name: KinLife Blog
Theme URI: https://kinlife.bio/blog/
Author: iLogix, LLC
Author URI: https://kinlife.bio/
Description: KinLife Non-Toxic Living Blog Theme — matches kinlife.bio main site design. Baby Blue × Deep Navy × Soft Green. Cormorant Garamond + DM Sans.
Version: 1.0.0
License: Private
Text Domain: kinlife-blog
*/

/* ============================================================
   KinLife Blog Theme — style.css
   Matches: kinlife.bio main site design system
   Fonts: Cormorant Garamond (display) + DM Sans (body)
   Colors: Baby Blue #5BB8D4 × Deep Navy #1A2E3A × Soft Green #7ECBA1
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* ── DESIGN TOKENS (matches main site) ── */
:root {
  --blue:        #5BB8D4;
  --blue-light:  #C8E8F3;
  --blue-xlight: #EAF5F9;
  --green:       #7ECBA1;
  --green-light: #E2F5EC;
  --navy:        #1A2E3A;
  --navy-mid:    #2E4A5A;
  --navy-dark:   #111D24;
  --slate:       #3D5A66;
  --muted:       #5A7A88;
  --hint:        #8AACB8;
  --border:      #D4EBF3;
  --bg:          #F0F7FA;
  --white:       #FFFFFF;
  --ff-display:  'Cormorant Garamond', Georgia, serif;
  --ff-body:     'DM Sans', system-ui, sans-serif;
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   14px;
  --radius-xl:   20px;
  --shadow-card: 0 1px 4px rgba(26,46,58,.06), 0 4px 16px rgba(26,46,58,.04);
  --nav-h:       66px;
  --container:   1120px;
}

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--ff-body);
  font-size: 15px;
  line-height: 1.7;
  color: var(--navy);
  background: var(--bg);
  padding-top: var(--nav-h);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; transition: color .15s; }
a:hover { color: var(--navy); }

/* ── CONTAINER ── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px; border-radius: 6px;
  font-family: var(--ff-body); font-size: 13px; font-weight: 500;
  border: none; cursor: pointer; transition: all .18s; text-decoration: none;
}
.btn-primary {
  background: var(--blue); color: var(--white);
}
.btn-primary:hover { background: var(--navy); color: var(--white); }
.btn-outline {
  background: transparent; color: var(--blue);
  border: 1.5px solid var(--blue);
}
.btn-outline:hover { background: var(--blue-xlight); }

/* ══════════════════════════════════════════
   NAVIGATION — matches main site exactly
   (1階層上のpathに調整)
   ══════════════════════════════════════════ */
.kl-nav {
  position: fixed;
  top: 0; left: 0; right: 0; width: 100%;
  z-index: 9999;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(26,46,58,.08);
}
.kl-nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h); gap: 12px;
  max-width: var(--container); margin: 0 auto; padding: 0 24px;
}
.kl-nav-logo-link { display: flex; align-items: center; flex-shrink: 0; }
.kl-nav-logo-img  { height: 34px; width: auto; display: block; }
.kl-nav-links {
  display: flex; align-items: center; gap: 4px;
  flex: 1; justify-content: center;
}
.kl-nav-link {
  font-size: 13px; font-weight: 400; color: var(--slate);
  padding: 6px 10px; border-radius: 6px;
  transition: color .15s, background .15s;
  background: none; border: none; cursor: pointer;
  font-family: var(--ff-body); white-space: nowrap;
  text-decoration: none; display: inline-flex; align-items: center; gap: 4px;
}
.kl-nav-link:hover,
.kl-nav-link.active { color: var(--blue); background: var(--blue-xlight); }

/* Dropdown */
.kl-dropdown { position: relative; }
.kl-dd-btn { padding-right: 8px; }
.kl-dd-menu {
  position: absolute;
  top: 100%;          /* ギャップゼロ：ナビバーに密着させる */
  left: 50%;
  transform: translateX(-50%);
  min-width: 210px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: 0 8px 32px rgba(26,46,58,.12);
  padding: 12px 8px 8px; /* 上paddingで視覚的な余白を確保 */
  opacity: 0; pointer-events: none;
  transition: opacity .15s;
  transform: translateX(-50%);  /* Y移動なし：ギャップ発生させない */
  z-index: 100;
}
.kl-dropdown.open .kl-dd-menu {
  opacity: 1; pointer-events: auto;
}
.kl-dd-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-md);
  font-size: 13px; color: var(--slate);
  transition: background .12s, color .12s;
  text-decoration: none;
}
.kl-dd-item:hover { background: var(--blue-xlight); color: var(--blue); }
.kl-dd-icon { width: 20px; height: 20px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.kl-dd-icon svg { width: 16px; height: 16px; }

/* Nav right */
.kl-nav-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.kl-nav-phone { font-size: 12px; color: var(--blue); font-weight: 500; white-space: nowrap; text-decoration: none; }
.kl-nav-cta   { padding: 9px 18px; font-size: 12px; }

/* Hamburger */
.kl-hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.kl-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--navy); border-radius: 2px;
  transition: all .2s;
}

/* Mobile menu */
.kl-mobile-menu {
  display: none; flex-direction: column; gap: 2px;
  background: var(--white); border-top: 1px solid var(--border);
  padding: 12px 20px 20px;
}
.kl-mobile-menu.open { display: flex; }
.kl-mob-link {
  padding: 10px 8px; font-size: 14px; color: var(--slate);
  border-radius: var(--radius-md); text-decoration: none;
  transition: background .12s, color .12s;
}
.kl-mob-link:hover { background: var(--blue-xlight); color: var(--blue); }
.kl-mob-label {
  font-size: 10px; font-weight: 500; letter-spacing: .1em;
  text-transform: uppercase; color: var(--hint);
  padding: 12px 8px 4px;
}
.kl-mob-cta {
  margin-top: 10px; text-align: center;
  background: var(--blue); color: var(--white);
  padding: 12px; border-radius: 8px; font-size: 14px; font-weight: 500;
  text-decoration: none;
}

/* ══════════════════════════════════════════
   BLOG LAYOUT
   ══════════════════════════════════════════ */

/* Hero bar */
.blog-hero {
  background: var(--navy);
  padding: 52px 0 40px;
  text-align: center;
}
.blog-hero-eyebrow {
  font-size: 11px; font-weight: 500; letter-spacing: .12em;
  text-transform: uppercase; color: var(--blue);
  margin-bottom: 12px;
}
.blog-hero h1 {
  font-family: var(--ff-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300; color: var(--white);
  letter-spacing: -.01em; line-height: 1.15;
  margin-bottom: 14px;
}
.blog-hero p {
  font-size: 15px; color: rgba(255,255,255,.55);
  max-width: 520px; margin: 0 auto;
}

/* Blog + Sidebar layout */
.blog-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  padding: 48px 0 80px;
  align-items: start;
}
@media (max-width: 900px) {
  .blog-wrap { grid-template-columns: 1fr; }
  .blog-sidebar { order: -1; }
}

/* Post card (archive) */
.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow .2s, transform .2s;
  margin-bottom: 28px;
}
.post-card:hover {
  box-shadow: 0 4px 24px rgba(26,46,58,.1);
  transform: translateY(-2px);
}
.post-card-thumb {
  width: 100%; aspect-ratio: 16/8; overflow: hidden;
}
.post-card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s;
}
.post-card:hover .post-card-thumb img { transform: scale(1.03); }
.post-card-body { padding: 24px 28px; }
.post-card-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.post-card-cat {
  font-size: 10px; font-weight: 500; letter-spacing: .1em;
  text-transform: uppercase; color: var(--white);
  background: var(--blue); padding: 3px 10px; border-radius: 20px;
}
.post-card-date { font-size: 12px; color: var(--muted); }
.post-card h2 {
  font-family: var(--ff-display);
  font-size: 1.5rem; font-weight: 400;
  color: var(--navy); line-height: 1.25;
  margin-bottom: 10px;
}
.post-card h2 a { color: inherit; text-decoration: none; }
.post-card h2 a:hover { color: var(--blue); }
.post-card-excerpt {
  font-size: 14px; color: var(--slate);
  line-height: 1.65; margin-bottom: 20px;
}
.post-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--border); padding-top: 16px;
}
.post-card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.post-tag {
  font-size: 11px; color: var(--slate);
  background: var(--blue-xlight); border: 1px solid var(--border);
  padding: 2px 9px; border-radius: 20px;
}
.post-read-more {
  font-size: 13px; font-weight: 500; color: var(--blue);
  display: flex; align-items: center; gap: 4px;
  white-space: nowrap; text-decoration: none;
}
.post-read-more:hover { color: var(--navy); }

/* ── Single post ── */
.single-post-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  padding: 48px 0 80px;
  align-items: start;
}
@media (max-width: 900px) {
  .single-post-wrap { grid-template-columns: 1fr; }
}
.single-post-header { margin-bottom: 32px; }
.single-post-header .post-card-meta { margin-bottom: 16px; }
.single-post-header h1 {
  font-family: var(--ff-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 400; color: var(--navy);
  line-height: 1.2; margin-bottom: 16px;
}
.single-post-header p.lead {
  font-size: 16px; color: var(--slate); line-height: 1.7;
  max-width: 680px;
}
.single-post-thumb {
  width: 100%; border-radius: var(--radius-lg);
  overflow: hidden; margin-bottom: 36px;
  aspect-ratio: 16/7;
}
.single-post-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ── Post content typography ── */
.post-content {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  box-shadow: var(--shadow-card);
}
.post-content h2 {
  font-family: var(--ff-display);
  font-size: 1.55rem; font-weight: 400;
  color: var(--navy);
  margin: 32px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.post-content h2:first-child { margin-top: 0; }
.post-content p { margin-bottom: 16px; font-size: 15px; color: var(--slate); line-height: 1.75; }
.post-content ul {
  margin: 0 0 18px 20px; padding: 0;
}
.post-content ul li {
  font-size: 15px; color: var(--slate); margin-bottom: 6px; line-height: 1.65;
}
.post-content ul li::marker { color: var(--blue); }

/* Ingredient concern highlight */
.post-content span[style*="color:red"],
.post-content span[style*="color: red"] {
  color: #c0392b !important;
  background: #fdecea;
  padding: 1px 5px; border-radius: 3px;
  font-weight: 500;
}

/* Tags section at bottom of post */
.post-content-tags {
  margin-top: 28px; padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.post-content-tags span { font-size: 12px; color: var(--muted); font-weight: 500; }

/* ── Post navigation ── */
.post-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-top: 32px;
}
.post-nav-item {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 16px 20px;
  text-decoration: none; transition: border-color .15s, box-shadow .15s;
}
.post-nav-item:hover { border-color: var(--blue); box-shadow: 0 2px 12px rgba(91,184,212,.12); }
.post-nav-label { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--hint); }
.post-nav-title { font-size: 14px; color: var(--navy); font-weight: 500; margin-top: 4px; line-height: 1.4; }

/* ══════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════ */
.blog-sidebar { display: flex; flex-direction: column; gap: 24px; }
.sidebar-widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  box-shadow: var(--shadow-card);
}
.sidebar-widget-title {
  font-family: var(--ff-display);
  font-size: 1.1rem; font-weight: 400;
  color: var(--navy);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.sidebar-widget ul { list-style: none; padding: 0; margin: 0; }
.sidebar-widget ul li {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.sidebar-widget ul li:last-child { border-bottom: none; }
.sidebar-widget ul li a { color: var(--slate); text-decoration: none; transition: color .15s; }
.sidebar-widget ul li a:hover { color: var(--blue); }

/* CTA widget */
.sidebar-cta {
  background: var(--navy);
  border: none;
  text-align: center;
}
.sidebar-cta .sidebar-widget-title { color: var(--white); border-color: rgba(255,255,255,.1); }
.sidebar-cta p { font-size: 13px; color: rgba(255,255,255,.6); margin-bottom: 16px; line-height: 1.6; }
.sidebar-cta .btn { width: 100%; justify-content: center; }

/* ══════════════════════════════════════════
   PAGINATION
   ══════════════════════════════════════════ */
.blog-pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; margin-top: 16px;
}
.blog-pagination a,
.blog-pagination span {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 8px;
  font-size: 13px; font-weight: 500;
  border: 1px solid var(--border);
  background: var(--white); color: var(--slate);
  text-decoration: none; transition: all .15s;
}
.blog-pagination a:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-xlight); }
.blog-pagination .current { background: var(--blue); color: var(--white); border-color: var(--blue); }

/* ══════════════════════════════════════════
   FOOTER — matches main site
   ══════════════════════════════════════════ */
.footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,.55);
  padding: 56px 0 24px;
  font-size: 13px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-logo-img { height: 32px; margin-bottom: 16px; }
.footer-brand p { font-size: 13px; line-height: 1.7; color: rgba(255,255,255,.45); }
.footer-col h4 {
  font-size: 11px; font-weight: 500; letter-spacing: .1em;
  text-transform: uppercase; color: var(--hint);
  margin-bottom: 14px;
}
.footer-col a {
  display: block; font-size: 13px;
  color: rgba(255,255,255,.45);
  padding: 4px 0; text-decoration: none;
  transition: color .15s;
}
.footer-col a:hover { color: var(--blue); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,.07);
  padding-top: 20px; flex-wrap: wrap; gap: 10px;
}
.footer-copy { font-size: 11px; color: rgba(255,255,255,.3); }
.footer-legal { display: flex; gap: 16px; }
.footer-legal a { font-size: 11px; color: rgba(255,255,255,.3); text-decoration: none; }
.footer-legal a:hover { color: var(--blue); }

/* ── Scroll to top ── */
.kl-scroll-top {
  position: fixed; bottom: 24px; right: 24px;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--navy); color: var(--blue);
  border: 1px solid rgba(91,184,212,.3);
  cursor: pointer; display: none; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  transition: all .2s; z-index: 500;
}
.kl-scroll-top.visible { display: flex; }
.kl-scroll-top:hover { background: var(--blue); color: var(--white); }

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 900px) {
  .kl-nav-links { display: none; }
  .kl-nav-phone { display: none; }
  .kl-hamburger { display: flex; }
  .kl-nav-inner { height: 60px; }
  body { padding-top: 60px; }
  .post-content { padding: 24px 20px; }
}
@media (max-width: 540px) {
  .blog-hero { padding: 36px 0 28px; }
  .post-card-body { padding: 18px 20px; }
  .post-nav { grid-template-columns: 1fr; }
}
