/*
Theme Name: SofaClean Repair
Theme URI: https://example.com/
Author: Custom
Description: 店舗・オフィス向けソファ修理・張り替えサービスの集客サイト用オリジナルテーマ。白×グリーンの清潔感あるデザイン。
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: sofaclean
*/

/* ==========================================================
   Design tokens
   ========================================================== */
:root {
  --c-base: #ffffff;
  --c-tint: #eef6f1;        /* セクション背景の淡い青 */
  --c-primary: #1e6f5c;     /* メインブルー */
  --c-deep: #123c32;        /* 濃紺（見出し・フッター） */
  --c-aqua: #5eb99b;        /* 水色アクセント */
  --c-text: #263230;
  --c-muted: #64756d;
  --c-line: #d8e7df;
  --c-cta: #d18a3f;         /* 予約・問い合わせの補色 */
  --radius: 10px;
  --shadow: 0 6px 24px rgba(18, 60, 50, 0.10);
  --w-content: 1080px;
  --font-body: "Noto Sans JP", -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-head: "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
}

/* ==========================================================
   Reset / base
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--c-text);
  background: var(--c-base);
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { opacity: .85; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.4; color: var(--c-deep); margin: 0 0 .6em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--c-aqua); outline-offset: 2px; }

.inner { max-width: var(--w-content); margin: 0 auto; padding: 0 20px; }
.section { padding: 88px 0; }
.section--tint { background: var(--c-tint); }

/* 見出し：左にアクセントの斜めラインを添える */
.sec-head { margin-bottom: 48px; }
.sec-head__en {
  display: inline-block;
  font-size: 13px;
  letter-spacing: .18em;
  color: var(--c-aqua);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.sec-head__ja {
  font-size: 32px;
  position: relative;
  padding-left: 26px;
}
.sec-head__ja::before {
  content: "";
  position: absolute;
  left: 0; top: 10%;
  width: 10px; height: 80%;
  background: linear-gradient(160deg, var(--c-aqua), var(--c-primary));
  transform: skewX(-14deg);
  border-radius: 3px;
}

/* ==========================================================
   Header
   ========================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-line);
}
.site-header__inner {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.site-logo { font-family: var(--font-head); font-weight: 700; font-size: 22px; color: var(--c-deep); }
.site-logo small { display: block; font-size: 11px; font-weight: 400; color: var(--c-muted); letter-spacing: .05em; }

.custom-logo-link { display: flex; align-items: center; }
.custom-logo { max-height: 52px; width: auto; }

.global-nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.global-nav a { color: var(--c-text); font-weight: 500; font-size: 15px; }
.global-nav a:hover { color: var(--c-primary); opacity: 1; }

/* --- 階層メニュー（プルダウン） --- */
.global-nav li { position: relative; }
.global-nav .sub-menu { list-style: none; margin: 0; padding: 0; }
.sub-toggle { display: none; }

@media (min-width: 769px) {
  .global-nav li.menu-item-has-children > a::after {
    content: "▾";
    font-size: 10px;
    margin-left: 6px;
    color: var(--c-aqua);
  }
  .global-nav .sub-menu {
    position: absolute; top: 100%; left: -14px;
    min-width: 220px;
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: 10px;
    box-shadow: 0 14px 28px rgba(18,60,50,.16);
    padding: 8px 0;
    opacity: 0; visibility: hidden;
    transform: translateY(10px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
    z-index: 30;
  }
  .global-nav li:hover > .sub-menu,
  .global-nav li:focus-within > .sub-menu {
    opacity: 1; visibility: visible; transform: none;
  }
  .global-nav .sub-menu li { width: 100%; }
  .global-nav .sub-menu a { display: block; padding: 10px 20px; font-size: 14px; }
}

.header-cta {
  display: inline-block;
  background: var(--c-cta);
  color: #fff !important;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(209,138,63,.4);
}

/* Hamburger */
.nav-toggle { display: none; }

/* ==========================================================
   Hero
   ========================================================== */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex; align-items: center;
  background:
    linear-gradient(100deg, rgba(18,60,50,.82) 0%, rgba(30,111,92,.55) 45%, rgba(94,185,155,.15) 100%),
    var(--hero-image, linear-gradient(120deg, #e3f0ea, #f6faf7)) center / cover no-repeat;
  overflow: hidden;
}
/* 磨き上げた革の艶を表す光沢スイープ（シグネチャー要素） */
.hero::after {
  content: "";
  position: absolute; top: -20%; bottom: -20%;
  width: 140px;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent);
  transform: skewX(-18deg);
  animation: gleam 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes gleam {
  0%   { left: -20%; }
  55%  { left: 115%; }
  100% { left: 115%; }
}
.hero__inner { position: relative; z-index: 2; max-width: var(--w-content); margin: 0 auto; padding: 60px 20px; color: #fff; }
.hero__copy {
  font-family: var(--font-head);
  font-size: clamp(30px, 4.6vw, 52px);
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  margin-bottom: 18px;
  text-shadow: 0 2px 14px rgba(18,60,50,.4);
}
.hero__sub { font-size: clamp(15px, 1.6vw, 19px); max-width: 620px; margin-bottom: 34px; }
.hero__btns { display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 15px 38px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); opacity: 1; }
.btn--cta { background: var(--c-cta); color: #fff; box-shadow: 0 4px 16px rgba(209,138,63,.45); }
.btn--ghost { background: rgba(255,255,255,.14); color: #fff; border: 2px solid rgba(255,255,255,.75); }
.btn--primary { background: var(--c-primary); color: #fff; box-shadow: 0 4px 16px rgba(30,111,92,.35); }

/* ==========================================================
   選ばれる理由
   ========================================================== */
.reasons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.reason-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px 28px;
  border-top: 4px solid var(--c-aqua);
}
.reason-card h3 { font-size: 19px; }
.reason-card__icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--c-aqua), var(--c-primary));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  margin-bottom: 18px;
}

/* ==========================================================
   サービス / 実績カード
   ========================================================== */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.post-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s ease;
  display: flex; flex-direction: column;
}
.post-card:hover { transform: translateY(-6px); opacity: 1; }
.post-card__thumb { aspect-ratio: 16 / 10; background: var(--c-tint); }
.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { padding: 22px 24px 26px; }
.post-card__title { font-size: 18px; margin-bottom: 8px; }
.post-card__excerpt { font-size: 14px; color: var(--c-muted); margin: 0; }
.post-card__more { margin-top: auto; padding: 0 24px 22px; font-weight: 700; font-size: 14px; color: var(--c-primary); }

/* ==========================================================
   ご依頼の流れ
   ========================================================== */
.flow { counter-reset: flow; display: grid; gap: 18px; }
.flow-step {
  counter-increment: flow;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 24px 26px 24px 92px;
  position: relative;
}
.flow-step::before {
  content: "0" counter(flow);
  position: absolute; left: 24px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-head);
  font-size: 30px; font-weight: 700;
  color: var(--c-aqua);
}
.flow-step h3 { font-size: 18px; margin-bottom: 4px; }
.flow-step p { margin: 0; font-size: 14px; color: var(--c-muted); }

/* ==========================================================
   お知らせ
   ========================================================== */
.news-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--c-line); }
.news-list li { border-bottom: 1px solid var(--c-line); }
.news-list a {
  display: flex; gap: 24px; align-items: baseline;
  padding: 18px 6px; color: var(--c-text);
}
.news-list time { flex-shrink: 0; font-size: 13px; color: var(--c-muted); font-family: var(--font-head); }

/* ==========================================================
   CTA帯
   ========================================================== */
.cta-band {
  background: linear-gradient(110deg, var(--c-deep), var(--c-primary) 70%, var(--c-aqua));
  color: #fff;
  text-align: center;
  padding: 72px 20px;
}
.cta-band h2 { color: #fff; font-size: 28px; }
.cta-band__tel { font-family: var(--font-head); font-size: 38px; font-weight: 700; color: #fff; display: inline-block; margin: 8px 0 4px; }
.cta-band__hours { font-size: 13px; opacity: .85; margin-bottom: 26px; }

/* ==========================================================
   Footer
   ========================================================== */
.site-footer { background: var(--c-deep); color: #cfe0f0; padding: 56px 0 96px; font-size: 14px; }
.site-footer a { color: #cfe0f0; }
.site-footer__inner { max-width: var(--w-content); margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.site-footer .site-logo { color: #fff; }
.site-footer nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.copyright { text-align: center; margin-top: 40px; font-size: 12px; color: #8fb0cd; }

/* ==========================================================
   スマホ固定CTAバー
   ========================================================== */
.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 110;
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--c-line);
  box-shadow: 0 -4px 16px rgba(18,60,50,.18);
}
.mobile-cta a {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 8px;
  font-weight: 700; font-size: 15px; color: #fff;
}
.mobile-cta__tel { background: var(--c-primary); }
.mobile-cta__contact { background: var(--c-cta); }

/* ==========================================================
   パートナー募集
   ========================================================== */
.partner-band {
  background: var(--c-deep);
  border-radius: 22px;
  margin: 0 20px;
  overflow: hidden;
}
.partner-band__inner {
  max-width: var(--w-content);
  margin: 0 auto;
  padding: 72px 40px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  color: #cfe0f0;
}
.partner-band__label {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--c-aqua);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.partner-band h2 { color: #fff; font-size: 28px; margin-bottom: 14px; }
.partner-band p { font-size: 15px; margin: 0; }
.partner-band__action { text-align: center; }
.partner-band__action .btn { min-width: 240px; }
.partner-band__note { display: block; margin-top: 12px; font-size: 12px; color: #8fb0cd; }

@media (max-width: 900px) {
  .partner-band__inner { grid-template-columns: 1fr; text-align: center; padding: 56px 28px; }
}
@media (max-width: 560px) {
  .partner-band { border-radius: 14px; margin: 0 12px; }
}

/* ==========================================================
   記事・下層ページ
   ========================================================== */
.page-title-band {
  background: linear-gradient(110deg, var(--c-tint), #fff);
  border-bottom: 1px solid var(--c-line);
  padding: 56px 0;
}
.page-title-band h1 { margin: 0; font-size: 30px; padding-left: 26px; position: relative; }
.page-title-band h1::before {
  content: "";
  position: absolute; left: 0; top: 12%;
  width: 10px; height: 76%;
  background: linear-gradient(160deg, var(--c-aqua), var(--c-primary));
  transform: skewX(-14deg);
  border-radius: 3px;
}
.entry-content { max-width: 820px; margin: 0 auto; }
.entry-content h2 { font-size: 26px; border-bottom: 2px solid var(--c-primary); padding-bottom: 8px; margin-top: 2em; }
.entry-content h3 { font-size: 20px; margin-top: 1.6em; }
.entry-content img { border-radius: var(--radius); }
.entry-meta { color: var(--c-muted); font-size: 13px; margin-bottom: 28px; }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 48px; }
.pagination .page-numbers {
  min-width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--c-line); border-radius: 8px;
  color: var(--c-text); padding: 0 10px;
}
.pagination .current { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

/* ==========================================================
   ブログ用（パンくず・バッジ・前後ナビ・関連記事）
   ========================================================== */
.breadcrumb { margin-bottom: 32px; font-size: 13px; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumb li { display: flex; align-items: center; color: var(--c-muted); }
.breadcrumb li + li::before { content: "›"; margin: 0 8px; color: var(--c-line); }
.breadcrumb a { color: var(--c-primary); }
.breadcrumb span { color: var(--c-muted); }

.post-card__thumb { position: relative; }
.post-card__badge {
  position: absolute; left: 12px; top: 12px;
  background: var(--c-primary);
  color: #fff;
  font-size: 12px; font-weight: 700;
  border-radius: 999px;
  padding: 3px 14px;
}
.post-card__date { font-size: 12px; color: var(--c-muted); font-family: var(--font-head); }

.post-nav {
  max-width: 820px;
  margin: 48px auto 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--c-line);
  padding-top: 24px;
  font-size: 14px;
}
.post-nav__next { text-align: right; margin-left: auto; }

.related { max-width: var(--w-content); margin: 64px auto 0; }
.related__title {
  font-size: 24px;
  text-align: center;
  margin-bottom: 32px;
  position: relative;
  padding: 0;
}
.related__title::after {
  content: "";
  display: block;
  width: 46px; height: 5px;
  margin: 10px auto 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--c-aqua), var(--c-primary));
}

/* ==========================================================
   2カラムレイアウト（サイドバー）
   ========================================================== */
.layout--2col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  align-items: start;
}
.layout--2col.layout--left { grid-template-columns: 300px minmax(0, 1fr); }
.layout--2col.layout--left .layout__main { order: 2; }
.layout--2col.layout--left .sidebar { order: 1; }
.layout--2col .card-grid { grid-template-columns: repeat(2, 1fr); }
.layout--2col .entry-content,
.layout--2col .post-nav,
.layout--2col .related { max-width: none; }

.sidebar { display: grid; gap: 24px; position: sticky; top: 96px; }
.widget {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 22px;
  font-size: 14px;
}
.widget__title {
  font-size: 16px;
  position: relative;
  padding-left: 16px;
  margin-bottom: 14px;
}
.widget__title::before {
  content: "";
  position: absolute; left: 0; top: 12%;
  width: 8px; height: 76%;
  background: linear-gradient(160deg, var(--c-aqua), var(--c-primary));
  transform: skewX(-14deg);
  border-radius: 3px;
}
.widget ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.widget li a { color: var(--c-text); }
.widget li a:hover { color: var(--c-primary); }
.widget select { width: 100%; padding: 8px; border: 1px solid var(--c-line); border-radius: 6px; }

/* ==========================================================
   LPテンプレート
   ========================================================== */
.lp-header {
  padding: 18px 20px;
  text-align: center;
  border-bottom: 1px solid var(--c-line);
  background: #fff;
}
.lp-header .custom-logo-link { display: inline-flex; justify-content: center; }
.lp-header .site-logo { font-size: 22px; }
.entry-content--wide { max-width: 1080px; }
.lp-footer { text-align: center; padding: 28px 20px 40px; color: var(--c-muted); font-size: 12px; margin: 0; }

/* スクロール時のふわっと表示 */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 900px) {
  .reasons, .card-grid { grid-template-columns: 1fr 1fr; }
  .layout--2col, .layout--2col.layout--left { grid-template-columns: 1fr; }
  .layout--2col.layout--left .layout__main { order: 1; }
  .layout--2col.layout--left .sidebar { order: 2; }
  .sidebar { position: static; }
}
@media (max-width: 768px) {
  .section { padding: 60px 0; }
  .sec-head__ja { font-size: 25px; }

  .global-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(255,255,255,.98);
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
    box-shadow: 0 14px 24px rgba(18,60,50,.14);
    border-bottom: 1px solid var(--c-line);
  }
  .global-nav.is-open { max-height: calc(100vh - 72px); overflow-y: auto; }
  .global-nav ul { flex-direction: column; gap: 0; padding: 6px 24px 20px; }
  .global-nav li { border-bottom: 1px solid var(--c-line); }
  .global-nav a { display: block; padding: 16px 4px; font-size: 16px; }
  .header-cta { display: none; }

  .global-nav .sub-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .global-nav li.is-sub-open > .sub-menu { max-height: 600px; }
  .global-nav .sub-menu li { border-bottom: none; border-top: 1px dashed var(--c-line); }
  .global-nav .sub-menu a { padding-left: 22px; font-size: 15px; color: var(--c-muted); }
  .global-nav li.menu-item-has-children > a { padding-right: 56px; }
  .sub-toggle {
    display: block;
    position: absolute; right: 0; top: 7px;
    width: 42px; height: 42px;
    background: var(--c-tint, #eef6f1);
    border: none; border-radius: 8px;
    color: var(--c-primary);
    font-size: 16px;
    cursor: pointer;
    transition: transform .25s ease;
  }
  .sub-toggle[aria-expanded="true"] { transform: rotate(180deg); }

  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px;
    background: none; border: none; cursor: pointer; padding: 8px;
  }
  .nav-toggle span { display: block; height: 2px; background: var(--c-deep); border-radius: 2px; transition: transform .25s ease, opacity .25s ease; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .mobile-cta { display: grid; }
  body { padding-bottom: 54px; }
}
@media (max-width: 560px) {
  .reasons, .card-grid { grid-template-columns: 1fr; }
  .hero { min-height: 66vh; }
  .flow-step { padding-left: 78px; }
}
