/*
Theme Name: Cocoon Child WORDS
Description: WORDS公式ブログ トップページデザイン用のCocoon子テーマ
Theme URI: https://words-boushi.com/apps/note/
Author: WORDS
Template: cocoon-master
Version: 1.1.0
*/

/* =========================================
   WORDS トップページ専用スタイル
   （.words-front 配下にのみ適用）
========================================= */
.words-front-body {
  margin: 0;
  background: #f6f2ec;
  color: #2a2522;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 15px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
.words-front a { color: inherit; text-decoration: none; transition: opacity .2s; }
.words-front a:hover { opacity: .7; }
.words-front img { max-width: 100%; height: auto; display: block; }
.words-front h1, .words-front h2, .words-front h3 {
  font-family: "Noto Serif JP", serif;
  font-weight: 500;
  margin: 0;
}
.words-front button { cursor: pointer; }

/* ---------- ヘッダー ---------- */
.words-header {
  background: #f6f2ec;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(42,37,34,.06);
}
.words-header__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.words-logo { display: flex; flex-direction: column; line-height: 1.25; }
.words-logo__sub { font-size: 11px; letter-spacing: .1em; }
.words-logo__main {
  font-family: "EB Garamond", "Noto Serif JP", serif;
  font-size: 26px;
  letter-spacing: .22em;
}
.words-logo__blog { font-family: "EB Garamond", serif; font-size: 11px; letter-spacing: .35em; }
.words-nav { margin-left: auto; }
.words-nav__list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  gap: 28px;
  font-size: 13.5px;
  letter-spacing: .06em;
}
.words-header__btns { display: flex; align-items: center; gap: 8px; }
.words-search-toggle, .words-menu-toggle {
  background: none; border: none; padding: 8px; color: #2a2522;
}
.words-menu-toggle { display: none; flex-direction: column; gap: 4.5px; }
.words-menu-toggle span { width: 20px; height: 1.5px; background: #2a2522; display: block; transition: .25s; }
.words-search-bar { border-top: 1px solid rgba(42,37,34,.08); padding: 12px 20px; }
.words-search-bar form { max-width: 560px; margin: 0 auto; display: flex; gap: 8px; }
.words-search-bar input {
  flex: 1; padding: 10px 14px; border: 1px solid #d8cfc2; background: #fff;
  font-size: 14px; outline: none;
}
.words-search-bar button {
  padding: 10px 22px; border: none; background: #2a2522; color: #fff; font-size: 13px;
}

/* ---------- ヒーロー ---------- */
.words-hero { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.words-hero__slider { position: relative; height: 380px; overflow: hidden; }
.words-hero__slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity .8s ease;
}
.words-hero__slide.is-active { opacity: 1; }
.words-hero__slide--placeholder {
  background: linear-gradient(120deg, #e9e0d2, #d9cbb6 60%, #cbb89e);
}
.words-hero__overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 48px;
  background: linear-gradient(90deg, rgba(244,238,228,.92) 0%, rgba(244,238,228,.55) 38%, rgba(244,238,228,0) 62%);
}
.words-hero__title {
  font-size: 26px;
  letter-spacing: .12em;
  line-height: 2;
}
.words-hero__text { font-size: 12.5px; letter-spacing: .08em; margin: 18px 0 0; line-height: 2.1; }
.words-hero__arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.85); color: #2a2522;
  font-size: 20px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.words-hero__arrow--prev { left: 14px; }
.words-hero__arrow--next { right: 14px; }
.words-hero__dots {
  position: absolute; left: 0; right: 0; bottom: -26px;
  display: flex; justify-content: center; gap: 10px;
}
.words-hero__dot {
  width: 7px; height: 7px; border-radius: 50%;
  border: none; background: #d4c9b8; padding: 0;
}
.words-hero__dot.is-active { background: #8a7456; }

/* ---------- レイアウト ---------- */
.words-container {
  max-width: 1120px;
  margin: 64px auto 0;
  padding: 0 20px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 56px;
  align-items: start;
}

/* ---------- セクション共通 ---------- */
.words-section { margin-bottom: 64px; }
.words-section:last-child { margin-bottom: 0; }
.words-section__head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 1px solid rgba(42,37,34,.15);
  padding-bottom: 12px; margin-bottom: 24px;
}
.words-section__title { font-size: 19px; letter-spacing: .14em; }
.words-section__more { font-size: 12px; letter-spacing: .08em; color: #6f6557; }

/* ---------- おすすめ記事カード ---------- */
.words-reco-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.words-card__thumb {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 4 / 3; background: #e7dfd2;
}
.words-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.words-card:hover .words-card__thumb img { transform: scale(1.04); }
.words-badge {
  position: absolute; top: 0; left: 0; z-index: 1;
  background: #a8865f; color: #fff;
  font-size: 10px; letter-spacing: .18em;
  padding: 4px 10px;
}
.words-card__title { font-size: 14.5px; line-height: 1.7; margin-top: 14px; }
.words-card__meta {
  display: flex; align-items: center; gap: 12px;
  margin-top: 10px; font-size: 12px; color: #6f6557;
}

/* チップ（カテゴリー・タグ） */
.words-chip {
  display: inline-block;
  border: 1px solid #d8cfc2;
  background: #efe9df;
  font-size: 11px;
  letter-spacing: .05em;
  padding: 3px 12px;
  border-radius: 999px;
  color: #5d5142;
}

/* ---------- 新着記事リスト ---------- */
.words-new-list { display: flex; flex-direction: column; }
.words-row {
  display: flex; align-items: center; gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(42,37,34,.1);
}
.words-row__thumb {
  flex: 0 0 150px; aspect-ratio: 4 / 3;
  overflow: hidden; background: #e7dfd2;
}
.words-row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.words-row__body { min-width: 0; flex: 1; }
.words-row__title { font-size: 15px; line-height: 1.7; }
.words-row__meta {
  display: flex; align-items: center; gap: 12px;
  margin-top: 8px; font-size: 12px; color: #6f6557;
}
.words-row__arrow { color: #a89a86; font-size: 18px; }

.words-more-wrap { text-align: center; margin-top: 36px; }
.words-more-btn {
  display: inline-block;
  border: 1px solid #b89a74;
  color: #6f5a40;
  font-size: 13.5px; letter-spacing: .1em;
  padding: 13px 56px;
  transition: background .25s, color .25s;
}
.words-more-btn:hover { background: #b89a74; color: #fff; opacity: 1; }

/* ---------- サイドバー ---------- */
.words-side__block { margin-bottom: 48px; }
.words-side__title {
  font-size: 16px; letter-spacing: .14em;
  border-bottom: 1px solid rgba(42,37,34,.15);
  padding-bottom: 10px; margin-bottom: 18px;
}
.words-cat-list { list-style: none; margin: 0; padding: 0; }
.words-cat-list li { border-bottom: 1px solid rgba(42,37,34,.06); }
.words-cat-list a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 2px; font-size: 13.5px;
}
.words-cat-list__count { font-size: 12px; color: #a3957f; }

/* 人気の記事ランキング */
.words-rank { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.words-rank__item { counter-increment: rank; }
.words-rank__item a {
  display: flex; gap: 14px; align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(42,37,34,.06);
  position: relative;
}
.words-rank__item a::before {
  content: counter(rank);
  font-family: "EB Garamond", serif;
  font-size: 18px;
  color: #8a7456;
  min-width: 14px;
}
.words-rank__thumb {
  flex: 0 0 58px; width: 58px; height: 58px;
  overflow: hidden; background: #e7dfd2;
}
.words-rank__thumb img { width: 100%; height: 100%; object-fit: cover; }
.words-rank__body { min-width: 0; }
.words-rank__title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12.5px; line-height: 1.6;
}
.words-rank__body time { font-size: 11px; color: #a3957f; }

.words-tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* ABOUT */
.words-about__link {
  display: flex; align-items: stretch;
  background: #efe9df;
}
.words-about__body { flex: 1; padding: 24px 20px; }
.words-about__label {
  font-family: "EB Garamond", serif;
  font-size: 10.5px; letter-spacing: .25em; color: #8a7456;
}
.words-about__text {
  font-family: "Noto Serif JP", serif;
  font-size: 15.5px; line-height: 1.9; letter-spacing: .08em;
  margin: 10px 0 14px;
}
.words-about__more { font-size: 11.5px; letter-spacing: .1em; color: #6f5a40; }
.words-about__img { flex: 0 0 38%; background-size: cover; background-position: center; }

/* ---------- メールマガジン / SNS ---------- */
.words-foot-band {
  background: #ece5da;
  padding: 52px 20px;
}
.words-foot-band__inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 48px;
  justify-content: space-between;
}
.words-foot-band__title {
  font-size: 15px; letter-spacing: .2em;
  display: flex; align-items: center; gap: 8px;
}
.words-foot-band p { font-size: 12.5px; color: #6f6557; margin: 10px 0 16px; }
.words-newsletter__form { display: flex; max-width: 420px; }
.words-newsletter__form input {
  flex: 1; padding: 11px 14px; border: 1px solid #cfc4b3;
  background: #fff; font-size: 13px; outline: none;
}
.words-newsletter__form button {
  border: none; background: #2a2522; color: #fff;
  font-size: 12.5px; letter-spacing: .08em; padding: 0 24px;
}
.words-sns__icons { display: flex; gap: 14px; }
.words-sns__icons a {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid #cfc4b3; background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: #2a2522;
}

/* ---------- フッター ---------- */
.words-footer {
  background: #211d1a; color: #e8e2d8;
  text-align: center;
  padding: 30px 20px 26px;
}
.words-footer__nav {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 8px 0;
  font-size: 12px; letter-spacing: .06em;
}
.words-footer__nav a { padding: 0 16px; border-right: 1px solid rgba(232,226,216,.3); }
.words-footer__nav a:last-child { border-right: none; }
.words-footer__copy { font-size: 11px; color: #a39b8e; margin: 16px 0 0; letter-spacing: .08em; }

/* =========================================
   モバイル（〜899px）
========================================= */
@media (max-width: 899px) {
  .words-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: #f6f2ec;
    border-bottom: 1px solid rgba(42,37,34,.1);
    padding: 8px 24px 20px;
  }
  .words-nav.is-open { display: block; }
  .words-nav__list { flex-direction: column; gap: 0; }
  .words-nav__list a { display: block; padding: 12px 0; border-bottom: 1px solid rgba(42,37,34,.06); }
  .words-menu-toggle { display: flex; }
  .words-menu-toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .words-menu-toggle.is-open span:nth-child(2) { opacity: 0; }
  .words-menu-toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .words-header__btns { margin-left: auto; }

  .words-hero { padding: 0; }
  .words-hero__slider { height: 240px; }
  .words-hero__overlay { padding: 0 24px; }
  .words-hero__title { font-size: 19px; }
  .words-hero__text { font-size: 11px; }
  .words-hero__arrow { display: none; }

  .words-container {
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 48px;
  }
  .words-section { margin-bottom: 48px; }
  .words-side__block { margin-bottom: 48px; }

  .words-reco-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .words-reco-grid .words-card:nth-child(3) { display: none; }

  .words-row { gap: 14px; padding: 16px 0; }
  .words-row__thumb { flex-basis: 110px; }
  .words-row__title { font-size: 13.5px; }

  /* 人気の記事：2カラム */
  .words-rank {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
  }

  /* カテゴリー：チップ表示 */
  .words-cat-list { display: flex; flex-wrap: wrap; gap: 10px; }
  .words-cat-list li { border-bottom: none; }
  .words-cat-list a {
    border: 1px solid #d8cfc2; background: #efe9df;
    border-radius: 999px;
    padding: 5px 18px; font-size: 12px;
    gap: 6px;
  }
  .words-cat-list__count { display: none; }

  .words-foot-band__inner { flex-direction: column; gap: 36px; }
  .words-sns { text-align: center; }
  .words-sns .words-foot-band__title { justify-content: center; }
  .words-sns__icons { justify-content: center; }
}

/* =========================================
   記事ページ・アーカイブ・固定ページ
========================================= */
.words-container--page { margin-top: 40px; }
.words-container--single-col { grid-template-columns: minmax(0, 760px); justify-content: center; }

/* パンくず */
.words-breadcrumb {
  font-size: 12px; color: #8d8270;
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 28px;
}
.words-breadcrumb a { color: #6f5a40; }
.words-breadcrumb__current {
  max-width: 22em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 記事ヘッダー */
.words-article__meta {
  display: flex; align-items: center; gap: 14px;
  font-size: 12.5px; color: #6f6557;
}
.words-article__updated { font-size: 11.5px; color: #a3957f; }
.words-article__title {
  font-size: 25px; line-height: 1.75; letter-spacing: .06em;
  margin: 16px 0 0;
}
.words-article__eyecatch { margin: 28px 0 36px; }
.words-article__eyecatch img { width: 100%; }

/* 本文 */
.words-entry {
  font-size: 15.5px; line-height: 2.1; letter-spacing: .03em;
}
.words-entry > * + * { margin-top: 1.4em; }
.words-entry h2 {
  font-size: 20px; line-height: 1.7; letter-spacing: .08em;
  border-bottom: 1px solid rgba(42,37,34,.18);
  border-left: 3px solid #a8865f;
  background: none;
  padding: 6px 0 12px 14px;
  margin: 2.6em 0 1.2em;
}
.words-entry h3 {
  font-size: 17px; line-height: 1.7; letter-spacing: .06em;
  border-left: 3px solid #d8cfc2;
  padding-left: 12px;
  margin: 2.2em 0 1em;
}
.words-entry h4 { font-size: 15.5px; margin: 2em 0 .8em; }
.words-entry a { color: #8a6a43; text-decoration: underline; text-underline-offset: 3px; }
.words-entry img { margin: 0 auto; }
.words-entry blockquote {
  background: #efe9df; border-left: 3px solid #cbb89e;
  padding: 18px 22px; margin: 1.6em 0; font-size: 14.5px; color: #5d5142;
}
.words-entry ul, .words-entry ol { padding-left: 1.6em; }
.words-entry li { margin: .4em 0; }
.words-entry table { border-collapse: collapse; width: 100%; font-size: 14px; }
.words-entry th, .words-entry td { border: 1px solid #d8cfc2; padding: 10px 14px; }
.words-entry th { background: #efe9df; font-weight: 500; }

/* タグ */
.words-article__tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 40px; padding-top: 24px;
  border-top: 1px solid rgba(42,37,34,.1);
}

/* 前後記事 */
.words-prevnext {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: rgba(42,37,34,.1);
  border-top: 1px solid rgba(42,37,34,.1);
  border-bottom: 1px solid rgba(42,37,34,.1);
  margin-top: 36px;
}
.words-prevnext__item { background: #f6f2ec; padding: 18px 16px; }
.words-prevnext__item--next { text-align: right; }
.words-prevnext__label { display: block; font-size: 11px; color: #a3957f; letter-spacing: .1em; }
.words-prevnext__title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 13px; line-height: 1.6; margin-top: 6px;
}

/* 関連記事 */
.words-related { margin-top: 56px; }
.words-reco-grid--related { grid-template-columns: repeat(2, 1fr); }

/* ページネーション */
.words-pagination { margin-top: 40px; }
.words-pagination .nav-links {
  display: flex; justify-content: center; gap: 8px; flex-wrap: wrap;
}
.words-pagination .page-numbers {
  display: flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 6px;
  border: 1px solid #d8cfc2; background: #fff;
  font-size: 13px; color: #5d5142;
  font-family: "EB Garamond", serif;
}
.words-pagination .page-numbers.current { background: #a8865f; border-color: #a8865f; color: #fff; }
.words-pagination .page-numbers.dots { border: none; background: none; }

.words-empty { color: #6f6557; padding: 24px 0; }
.words-404 { text-align: center; padding: 40px 0 20px; }

/* Cocoon親テーマの装飾(目次・ボックス等)を下地に馴染ませる */
.words-entry .toc {
  background: #efe9df; border: 1px solid #d8cfc2; padding: 18px 24px;
}
.words-entry .toc-title { font-family: "Noto Serif JP", serif; letter-spacing: .12em; }

@media (max-width: 899px) {
  .words-article__title { font-size: 20px; }
  .words-entry { font-size: 15px; }
  .words-entry h2 { font-size: 18px; }
  .words-entry h3 { font-size: 16px; }
  .words-reco-grid--related { grid-template-columns: 1fr 1fr; gap: 16px; }
  .words-reco-grid--related .words-card:nth-child(3) { display: block; }
  .words-prevnext { grid-template-columns: 1fr; }
  .words-prevnext__item--next { text-align: left; }
  .words-container--page { margin-top: 28px; }
}
