@charset "UTF-8";
/* ==========================================================================
   site.css — 旅行カフェ「ピーターズ」(cafepieters.com)固有のデザイン(サイト所有)
   --------------------------------------------------------------------------
   WordPress(SWELL テーマ)の見た目を markdown-cms 上で再現する。
   トークンは theme.css、コア構造は cms.css(編集しない)。ここは見た目の上書きだけ。
   読み込みは config/theme.php の stylesheets。
   ========================================================================== */

/* ── 共通の下地 ─────────────────────────────────────────── */

body { font-weight: 500; overflow-wrap: anywhere; }
body.admin::before { display: none; }

/* 最上部のキャッチフレーズ帯(SWELL のヘッダーバー) */
body::before {
  content: "大阪の野田にあったカフェの店主が運営するサイトです";
  display: block;
  background: var(--cp-main);
  color: #fff;
  font-size: 12px;
  line-height: 22px;
  padding: 0 max(16px, calc((100% - 1200px) / 2 + 16px));
}

/* ── ヘッダー / ナビ ─────────────────────────────────────── */

.site-header {
  background: #fff;
  backdrop-filter: none;
  border-bottom: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
}
/* ヘッダーの背景に空の画像(WordPress 時代のカスタム CSS: 不透明度 .4 で全面に敷く) */
.site-header::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .4;
  background: url("/assets/img/sky.webp") no-repeat center / cover;
}
.site-header > * { position: relative; z-index: 1; }
.site-header__inner { max-width: 1200px; min-height: 72px; }
.site-logo { display: inline-flex; align-items: center; }
.site-logo__img { display: block; width: auto; height: 40px; border-radius: 0; }
.site-nav__item > a {
  position: relative; color: #333; font-size: 16px; font-weight: 500; padding: .5rem 8px; border-radius: 0;
}
.site-nav__item > a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--cp-main);
  transform: scaleX(0); transition: transform .25s;
}
.site-nav__item > a:hover { background: transparent; color: #333; }
.site-nav__item > a:hover::after, .site-nav__item.is-active > a::after { transform: scaleX(1); }
.site-nav__item.is-active > a { color: #333; }
.nav-toggle { border-color: #cbd5e0; }

/* ── パンくず(灰色の帯) ───────────────────────────────── */

.breadcrumb {
  max-width: none; background: #f7f7f7;
  padding: 8px max(16px, calc((100% - 1200px) / 2 + 16px));
  font-size: 12px; line-height: 1.8;
}
.breadcrumb li:not(:last-child)::after { content: "\203A"; opacity: .6; margin-left: .45rem; }
.breadcrumb a { color: #333; }

/* ── 本文コンテナの幅 ───────────────────────────────────── */

.site-main { padding: 32px 0 64px; }
.site-main > .container { max-width: 900px; padding-inline: 16px; }
.site-main > .container:has(> .page--section),
.site-main > .container:has(> .page--home) { max-width: 1200px; }
.site-main > .container:has(> .page--home) { padding-top: 0; }

/* トップは WordPress 時代どおり、パンくずと見出し(h1)を画面に出さない(h1 は検索エンジン向けに残す) */
body:has(.page--home) .breadcrumb { display: none; }
.page--home .page__header {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.page--home .page__body > :first-child { margin-top: 24px; }

/* ── 記事ヘッダー(タイトル → 日付 → アイキャッチ の順) ──────── */

.page__header { display: flex; flex-direction: column; margin-bottom: 1.5rem; }
.page__header > * { order: 2; }
.page h1 {
  order: 0; font-size: 1.5rem; line-height: 1.4; font-weight: 700; color: #333; margin: 0 0 .6rem;
}
.page__meta { order: 1; font-size: 13px; color: #6b6b6b; margin: 0 0 1rem; }
/* 更新日は出さない(WordPress 時代は公開日のみ。ファイルの更新日時は移行日などになり実態と合わない) */
.page__meta time + time { display: none; }
.page__hero { order: 3; width: 100%; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.page--section .page__header { margin-bottom: 1rem; }
.page--section h1 { font-size: 1.5rem; padding-left: .75rem; border-left: 4px solid var(--cp-main); }

/* ── 記事本文(SWELL の post_content) ─────────────────────── */

.page__body { color: #333; font-size: 16px; line-height: 1.8; }
.page__body .lede { font-size: inherit; color: inherit; }
.page__body > p, .page__body p { margin: 0 0 2em; color: #333; }
.page__body a { color: var(--color-link); text-decoration: none; }
.page__body a:hover { text-decoration: underline; }
.page__body a.cms-link { font-weight: inherit; }

/* カテゴリー(記事上部。SWELL の p-articleMetas) */
.article-cats { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 1.5em; font-size: 11px; line-height: 1; }
.page__body a.article-cat {
  display: inline-block; padding: 4px 6px; color: #fff; background: var(--cp-main); border-radius: 1px; text-decoration: none;
}
.page__body a.article-cat:hover { opacity: .8; text-decoration: none; }
.article-cats__sep { color: #999; }

/* 見出し(SWELL の見出しデザイン: h2=ベタ + 上下の二重線 / h3=下線(30% だけメイン色) / h4=左線) */
.page__body h2 {
  position: relative; margin: 4em 0 2em; padding: .75em 1em; border: 0;
  font-size: 1.4em; font-weight: 700; line-height: 1.5; letter-spacing: 0; color: #fff; background: var(--cp-main);
}
.page__body h2::before {
  content: ""; position: absolute; top: -4px; left: 0; width: 100%; height: calc(100% + 4px); box-sizing: content-box;
  pointer-events: none; border-top: 2px solid var(--cp-main); border-bottom: 2px solid var(--cp-main);
}
.page__body > h2:first-child { margin-top: 0; }
.page__body h3 {
  position: relative; margin: 3em 0 2em; padding: 0 .5em .5em; border: 0;
  font-size: 1.3em; font-weight: 700; line-height: 1.5; color: #333;
}
.page__body h3::before {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px;
  background: repeating-linear-gradient(90deg, var(--cp-main) 0%, var(--cp-main) 29.3%, rgba(150, 150, 150, .2) 29.3%, rgba(150, 150, 150, .2) 100%);
}
.page__body h4 {
  margin: 2.5em 0 1.5em; padding: 0 0 0 16px; border: 0; border-left: 2px solid var(--cp-main);
  font-size: 1.2em; font-weight: 700; line-height: 1.5; color: #333;
}
.page__body ul, .page__body ol { margin: 0 0 2em; padding-left: 1.5em; }
.page__body li { margin: .5em 0; line-height: 1.8; }
.page__body hr { border: 0; border-top: 1px solid rgba(150, 150, 150, .3); margin: 3em 0; }

/* 引用(SWELL の blockquote: 左に二重線) */
.page__body blockquote {
  position: relative; margin: 0 0 2em; padding: 1.5em 2em 1.5em 3em; background: #f7f7f7; border: 0; border-radius: 0; color: #333;
}
.page__body blockquote::before {
  content: ""; position: absolute; top: 1.5em; left: 1.5em; width: 5px; height: calc(100% - 3em); box-sizing: content-box;
  border-left: 1px solid rgba(180, 180, 180, .75); border-right: 1px solid rgba(180, 180, 180, .75);
}
.page__body blockquote > :last-child { margin-bottom: 0; }

/* 画像 */
.page__body .cms-figure { margin: 0 0 2em; text-align: center; }
.page__body .cms-figure img, .page__body p > img { max-width: 100%; height: auto; border-radius: 0; box-shadow: none; }
.page__body .cms-figure figcaption { font-size: .8em; color: #6b6b6b; text-align: center; margin-top: .6em; }

/* 目次(SWELL の p-toc -double: 上下に二重線) */
.toc {
  max-width: 800px; margin: 2em auto 4em; padding: 1.6em 2em; background: transparent; border-radius: 0;
  border: 0; border-top: 4px double var(--cp-main); border-bottom: 4px double var(--cp-main);
}
.toc__title { text-align: center; font-size: 1.2em; font-weight: 700; line-height: 1; margin: 0 0 1em; color: #333; }
.toc ol { margin: 0; padding-left: 1.4em; }
.toc li { margin: .6em 0; }
.toc a { color: #333; font-size: 1em; }
.toc a:hover { color: var(--cp-main); text-decoration: underline; }

/* 表 */
.table-wrap { margin: 0 0 2em; }
table.data-table { margin: 0; font-size: 15px; border-collapse: collapse; width: 100%; border: 0; }
table.data-table th, table.data-table td { padding: .5em 1em; border: 1px solid rgba(150, 150, 150, .3); text-align: left; vertical-align: top; }
table.data-table thead th { background: rgba(150, 150, 150, .1); font-weight: 700; pointer-events: none; cursor: default; }
table.data-table thead th[data-sort]::after { content: none; }
table.data-table tbody tr:hover { background: transparent; }

/* コード(Code Block Pro の nord テーマ) */
.page__body code {
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, Menlo, monospace; font-size: .875em;
  padding: .1em .4em; background: rgba(150, 150, 150, .15); border-radius: 3px; color: inherit;
}
.page__body pre {
  position: relative; margin: 0 0 2em; padding: 36px 16px 16px; overflow-x: auto;
  background: #2e3440; color: #d8dee9; border-radius: 4px; line-height: 1.6;
}
.page__body pre::before {
  content: ""; position: absolute; top: 14px; left: 16px; width: 10px; height: 10px; border-radius: 50%;
  background: #ec6a5e; box-shadow: 18px 0 0 #f4bf4f, 36px 0 0 #61c554;
}
.page__body pre code { padding: 0; background: transparent; color: inherit; font-size: .875rem; white-space: pre; overflow-wrap: normal; }

/* 動画・広告の埋め込み */
.embed { margin: 0 0 2em; text-align: center; overflow: hidden; }
.embed img { display: inline-block; max-width: 100%; height: auto; border-radius: 0; box-shadow: none; }
.embed--video iframe { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; }

/* ── ブログカード(あわせて読みたい。SWELL の p-blogCard) ──── */

.blog-card { margin: 0 0 2em; }
.blog-card__link {
  display: block; position: relative; padding: 30px 16px 16px; background: #fff;
  border: 1px solid rgba(0, 0, 0, .12); border-radius: 0; color: inherit; text-decoration: none; transition: box-shadow .2s;
}
.page__body a.blog-card__link:hover { text-decoration: none; box-shadow: 0 6px 16px rgba(0, 0, 0, .1); }
.blog-card__caption {
  position: absolute; top: -1px; left: -1px; padding: 2px 12px; font-size: 11px; letter-spacing: .08em;
  color: #fff; background: var(--cp-main); border-radius: 0;
}
.blog-card__inner { display: flex; gap: 16px; align-items: center; }
.blog-card__thumb { flex: 0 0 168px; aspect-ratio: 16 / 9; overflow: hidden; background: #eee; }
.blog-card__thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.blog-card__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.blog-card__title { font-weight: 700; font-size: 15px; line-height: 1.5; color: #333; }
.blog-card__excerpt { font-size: 12px; line-height: 1.6; color: #6b6b6b; }
.blog-card__meta { font-size: 12px; font-weight: 700; color: var(--cp-main); }

/* ── 記事カード一覧(SWELL のカード型リスト) ──────────────── */

.post-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 24px; margin: 0; padding: 0; list-style: none;
}
.page__body .post-cards { margin: 1.5rem 0 0; padding: 0; }
.page__body .post-cards > li { margin: 0; }
.post-card { display: block; }
.page__body a.post-card__link, .post-card__link { display: block; color: #333; text-decoration: none; }
.post-card__thumb {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #eee; box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}
.page__body .post-card__img, .post-card__img {
  display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; box-shadow: none; transition: transform .4s;
}
.post-card__link:hover .post-card__img { transform: scale(1.05); }
.post-card__cat, .post-slider__cat {
  position: absolute; top: 0; right: 0; padding: 2px 8px 2px 6px; font-size: 11px; line-height: 1.6; color: #fff; background: var(--cp-main);
}
.post-card__cat::before, .post-slider__cat::before {
  content: ""; display: inline-block; width: .9em; height: .7em; margin-right: .35em; background: #fff; border-radius: 1px 3px 1px 1px;
}
.post-card__body { display: block; padding-top: 12px; }
.post-card__title {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 1em; font-weight: 700; line-height: 1.5; color: #333;
}
.post-card__excerpt {
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
  margin-top: 8px; font-size: 12px; line-height: 1.7; color: #555;
}
.post-card__date { display: block; margin-top: 8px; font-size: 11px; color: #666; }
.post-card__date::before {
  content: ""; display: inline-block; width: 1em; height: 1em; margin: 0 .35em -.15em 0;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
}
@media (max-width: 959px) { .post-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 599px) { .post-cards { grid-template-columns: 1fr; gap: 28px; } }

/* ── トップページ: 新着スライダー(SWELL の post slider) ─────── */

.post-slider { position: relative; margin: 0 0 40px; padding: 0 0 8px; }
.post-slider__viewport { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 8px; }
.post-slider__viewport::-webkit-scrollbar { display: none; }
.page__body .post-slider__track { display: flex; gap: 16px; list-style: none; margin: 0; padding: 0; }
.page__body .post-slider__item { flex: 0 0 calc((100% - 64px) / 5); margin: 0; scroll-snap-align: start; }
.page__body .post-slider__item a { display: block; color: #333; text-decoration: none; }
.post-slider__thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #eee; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.page__body .post-slider__thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; box-shadow: none; transition: transform .4s; }
.post-slider__item a:hover .post-slider__thumb img { transform: scale(1.05); }
.post-slider__title {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  margin-top: 8px; font-size: 13px; font-weight: 700; line-height: 1.5; color: #333;
}
.post-slider__dots { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.post-slider__dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: #ccc; cursor: pointer; }
.post-slider__dot[aria-current="true"] { background: var(--cp-main); }
@media (max-width: 959px) { .page__body .post-slider__item { flex-basis: calc((100% - 32px) / 3); } }
@media (max-width: 599px) { .page__body .post-slider__item { flex-basis: calc((100% - 16px) / 2); } }

/* ── ページトップへ戻るボタン(site.js が追加) ─────────────── */

.pagetop {
  position: fixed; right: 16px; bottom: 16px; width: 44px; height: 44px; padding: 0; z-index: 20;
  border: 1px solid rgba(0, 0, 0, .2); border-radius: 50%; background: rgba(255, 255, 255, .9); cursor: pointer;
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
.pagetop.is-visible { opacity: 1; visibility: visible; }
.pagetop::before {
  content: ""; position: absolute; top: 50%; left: 50%; width: 10px; height: 10px;
  border-top: 2px solid #333; border-left: 2px solid #333; transform: translate(-50%, -30%) rotate(45deg);
}
.pagetop:hover { background: #fff; border-color: var(--cp-main); }

/* ── フッター(白文字のメニュー + コピーライト) ────────────── */

.site-footer {
  background: #fff url("/assets/img/grass.webp") repeat-x center bottom / auto 80px;
  border-top: 0; margin-top: 0; padding: 0; color: #fff;
}
.site-footer__inner { display: none; }
.site-footer__bottom { max-width: 1200px; margin-top: 0; padding: 44px 16px 20px; border-top: 0; text-align: center; text-shadow: 0 1px 2px rgba(0, 0, 0, .45); }
.site-footer__bottom > p:not(.footer-copyright) { display: none; }
.footer-nav ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; margin: 0 0 16px; padding: 0; list-style: none; }
.footer-nav__link { color: #fff; font-size: 14px; text-decoration: none; }
.footer-nav__link:hover { text-decoration: underline; color: #fff; }
.site-footer__bottom .footer-copyright { margin: 0; color: #fff; font-size: 12px; }
.footer-copyright a { color: #fff; text-decoration: none; }

/* ── 小さい画面 ─────────────────────────────────────────── */

@media (max-width: 820px) {
  .site-header__inner { min-height: 60px; }
  .site-logo__img { height: 36px; }
  .site-nav__item > a { padding: .7rem .4rem; font-size: 1rem; }
  .page__body h2 { margin: 3em 0 1.5em; }
  .page__body h3 { margin: 2.5em 0 1.5em; }
  .blog-card__inner { flex-direction: column; align-items: stretch; }
  .blog-card__thumb { flex-basis: auto; }
  .toc { padding: 1.2em 1em; }
}
