/*
Theme Name: Fushiodai Retro
Theme URI: https://fushiodai.brdg-h.com/
Author: Fushiodai Perfect Guide
Description: 大阪府池田市伏尾台のまちガイドのためのオリジナルテーマ。昭和のニュータウンのあたたかさをイメージした、ホーロー看板・バス切符モチーフのレトロデザイン。
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fushiodai-retro
Tags: blog, news, custom-logo, custom-menu, featured-images, translation-ready
*/

/* ============================================================
   1. トークン（昭和レトロ配色）
   ============================================================ */
:root {
  --paper: #FBF2DD;        /* クリームの紙 */
  --paper-deep: #F3E6C8;   /* 少し濃い紙 */
  --ink: #3F332A;          /* 焦茶のインク */
  --ink-soft: #6E5F51;
  --shu: #DF5626;          /* 朱色（ホーロー看板） */
  --shu-deep: #C1431A;
  --mustard: #D9A62E;      /* 芥子色 */
  --tokiwa: #4E7A4D;       /* 常盤緑 */
  --teal: #2F7E76;         /* レトロ青緑 */
  --bridge: #C6402F;       /* 赤い橋 */
  --line: #E2D2B2;         /* 罫線 */
  --white: #FFFDF6;
  --shadow: 4px 4px 0 rgba(63, 51, 42, 0.18);
  --radius: 14px;
  --font-display: "Kiwi Maru", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  --font-body: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
}

/* ============================================================
   2. ベース
   ============================================================ */
* { 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;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(63, 51, 42, 0.05) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--teal); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--shu-deep); }

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--mustard);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

/* ============================================================
   3. ヘッダー：ホーロー看板の題字
   ============================================================ */
.site-header {
  background: var(--paper);
  border-bottom: 3px solid var(--ink);
  position: relative;
}

/* 上部の三色ストライプ（昭和の包装紙風） */
.site-header::before {
  content: "";
  display: block;
  height: 8px;
  background: linear-gradient(
    90deg,
    var(--shu) 0 25%,
    var(--mustard) 25% 50%,
    var(--tokiwa) 50% 75%,
    var(--teal) 75% 100%
  );
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  flex-wrap: wrap;
}

.site-branding { display: flex; align-items: center; gap: 14px; }

.custom-logo { max-height: 64px; width: auto; border-radius: 8px; }

/* ホーロー看板：朱地に白文字・白の内枠 */
.horo-sign {
  display: inline-block;
  background: var(--shu);
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(20px, 3.5vw, 30px);
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 10px 22px;
  border-radius: 8px;
  box-shadow: inset 0 0 0 3px var(--shu), inset 0 0 0 5px var(--white), var(--shadow);
  text-decoration: none;
  transition: transform 0.15s ease;
}
.horo-sign:hover { color: var(--white); transform: rotate(-1deg); }

.site-description {
  margin: 6px 0 0;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

/* ============================================================
   4. ナビゲーション：バス停の行き先板
   ============================================================ */
.main-navigation ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.main-navigation a {
  display: inline-block;
  padding: 8px 16px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14px;
  text-decoration: none;
  box-shadow: 2px 2px 0 rgba(63, 51, 42, 0.18);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.main-navigation li.current-menu-item > a,
.main-navigation a:hover {
  background: var(--mustard);
  color: var(--ink);
  transform: translate(-1px, -1px);
}

.menu-toggle { display: none; }

@media (max-width: 782px) {
  .menu-toggle {
    display: inline-block;
    background: var(--white);
    border: 2px solid var(--ink);
    border-radius: 999px;
    padding: 8px 18px;
    font-family: var(--font-display);
    font-size: 14px;
    color: var(--ink);
    box-shadow: 2px 2px 0 rgba(63, 51, 42, 0.18);
    cursor: pointer;
  }
  .main-navigation { width: 100%; }
  .main-navigation ul { display: none; flex-direction: column; padding-bottom: 14px; }
  .main-navigation.toggled ul { display: flex; }
  .main-navigation a { display: block; text-align: center; }
}

/* ============================================================
   5. ヒーロー
   ============================================================ */
.hero {
  position: relative;
  padding: 72px 0 88px;
  text-align: center;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero.has-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(251, 242, 221, 0.82);
}

.hero-inner { position: relative; }

.hero-eyebrow {
  display: inline-block;
  background: var(--tokiwa);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.25em;
  padding: 5px 18px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.hero-title {
  margin: 0 0 18px;
  font-size: clamp(30px, 5.6vw, 52px);
  letter-spacing: 0.06em;
}

.hero-title .accent {
  background: linear-gradient(transparent 62%, rgba(217, 166, 46, 0.55) 62%);
  padding: 0 2px;
}

.hero-text {
  max-width: 620px;
  margin: 0 auto 30px;
  color: var(--ink-soft);
  font-size: clamp(15px, 2vw, 17px);
}

.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 15px;
  padding: 12px 30px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
}
.btn:hover { transform: translate(-2px, -2px); }
.btn-primary { background: var(--shu); color: var(--white); }
.btn-primary:hover { color: var(--white); }
.btn-secondary { background: var(--white); color: var(--ink); }
.btn-secondary:hover { color: var(--ink); }

/* ============================================================
   6. まちなみイラスト帯（SVG）
   ============================================================ */
.townscape { line-height: 0; margin-top: -40px; position: relative; }
.townscape svg { width: 100%; height: auto; display: block; }

/* ============================================================
   7. セクション共通
   ============================================================ */
.section { padding: 64px 0; }

.section-head { text-align: center; margin-bottom: 40px; }

.section-badge {
  display: inline-block;
  background: var(--teal);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.3em;
  padding: 4px 16px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.section-title {
  margin: 0;
  font-size: clamp(24px, 3.6vw, 34px);
  letter-spacing: 0.06em;
}

/* ============================================================
   8. カテゴリー：バス切符カード
   ============================================================ */
.ticket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
}

.ticket {
  position: relative;
  display: block;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 24px 22px 20px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
  /* 切符のミシン目風の縁 */
  background-image: radial-gradient(circle at 0 50%, var(--paper) 7px, transparent 7.5px),
                    radial-gradient(circle at 100% 50%, var(--paper) 7px, transparent 7.5px);
  background-repeat: no-repeat;
}
.ticket:hover { transform: translate(-3px, -3px) rotate(-0.6deg); color: var(--ink); }

.ticket-row {
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--ink-soft);
  border-bottom: 1.5px dashed var(--line);
  padding-bottom: 8px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
}

.ticket-name {
  font-family: var(--font-display);
  font-size: 20px;
  margin: 0 0 6px;
}

.ticket-desc { font-size: 13.5px; color: var(--ink-soft); margin: 0; }

.ticket-count {
  position: absolute;
  top: -12px;
  right: 14px;
  background: var(--mustard);
  border: 2px solid var(--ink);
  color: var(--ink);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 12px;
  padding: 2px 12px;
}

/* ============================================================
   9. 記事カード
   ============================================================ */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 26px;
}

.post-card {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease;
}
.post-card:hover { transform: translate(-3px, -3px); }

.post-card-thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 2px solid var(--ink); }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; }

.post-card-thumb.is-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--white);
  letter-spacing: 0.2em;
  text-decoration: none;
}
.placeholder-0 { background: var(--shu); }
.placeholder-1 { background: var(--tokiwa); }
.placeholder-2 { background: var(--teal); }
.placeholder-3 { background: var(--mustard); }

.post-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

.post-card-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.cat-chip {
  display: inline-block;
  background: var(--paper-deep);
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 11.5px;
  padding: 1px 10px;
  color: var(--ink);
  text-decoration: none;
}
.cat-chip:hover { background: var(--mustard); color: var(--ink); }

/* 日付：スタンプ風 */
.date-stamp {
  font-size: 12px;
  color: var(--shu-deep);
  border: 1.5px solid var(--shu-deep);
  border-radius: 4px;
  padding: 0 8px;
  letter-spacing: 0.08em;
  transform: rotate(-2deg);
}

.post-card-title { margin: 0; font-size: 17.5px; }
.post-card-title a { color: var(--ink); text-decoration: none; }
.post-card-title a:hover { color: var(--shu-deep); }

.post-card-excerpt { margin: 0; font-size: 13.5px; color: var(--ink-soft); }

/* ============================================================
   10. まちの魅力 3ポイント
   ============================================================ */
.charm { background: var(--paper-deep); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }

.charm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 26px;
}

.charm-item {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

.charm-mark {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--white);
}
.charm-item:nth-child(1) .charm-mark { background: var(--shu); }
.charm-item:nth-child(2) .charm-mark { background: var(--tokiwa); }
.charm-item:nth-child(3) .charm-mark { background: var(--teal); }

.charm-title { margin: 0 0 10px; font-size: 19px; }
.charm-text { margin: 0; font-size: 14px; color: var(--ink-soft); }

/* ============================================================
   11. 記事ページ・固定ページ
   ============================================================ */
.page-header { text-align: center; padding: 52px 0 8px; }

.entry {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 52px);
  margin: 36px auto 56px;
  max-width: 820px;
}

.entry-title { font-size: clamp(24px, 4vw, 34px); margin: 0 0 14px; }

.entry-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 26px; padding-bottom: 20px; border-bottom: 2px dashed var(--line); }

.entry-content { font-size: 16px; }
.entry-content h2 {
  font-size: 24px;
  border-left: 8px solid var(--shu);
  border-bottom: 2px solid var(--line);
  padding: 4px 0 6px 14px;
  margin: 2.2em 0 1em;
}
.entry-content h3 {
  font-size: 20px;
  margin: 2em 0 0.8em;
}
.entry-content h3::before { content: "●"; color: var(--mustard); margin-right: 8px; font-size: 14px; vertical-align: 2px; }
.entry-content img { border-radius: 10px; border: 2px solid var(--line); }
.entry-content blockquote {
  margin: 1.5em 0;
  padding: 16px 22px;
  background: var(--paper);
  border-left: 6px solid var(--teal);
  border-radius: 6px;
}
.entry-content table { border-collapse: collapse; width: 100%; }
.entry-content th, .entry-content td { border: 1.5px solid var(--line); padding: 8px 12px; }
.entry-content th { background: var(--paper-deep); font-family: var(--font-display); }
.wp-block-image figcaption { text-align: center; font-size: 12.5px; color: var(--ink-soft); }

.entry-footer { margin-top: 34px; padding-top: 20px; border-top: 2px dashed var(--line); font-size: 13.5px; }

/* 前後の記事 */
.post-nav { display: flex; justify-content: space-between; gap: 14px; max-width: 820px; margin: 0 auto 64px; flex-wrap: wrap; }
.post-nav a {
  flex: 1;
  min-width: 220px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 14px 18px;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  box-shadow: 2px 2px 0 rgba(63,51,42,0.18);
}
.post-nav a:hover { background: var(--paper-deep); }
.post-nav .nav-label { display: block; font-size: 11px; color: var(--shu-deep); font-family: var(--font-display); letter-spacing: 0.2em; }

/* ============================================================
   12. アーカイブ・ページネーション・検索
   ============================================================ */
.archive-list { padding-bottom: 64px; }

.pagination { text-align: center; margin: 44px 0 0; }
.pagination .page-numbers {
  display: inline-block;
  min-width: 40px;
  padding: 7px 12px;
  margin: 0 3px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 8px;
  font-family: var(--font-display);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 2px 2px 0 rgba(63,51,42,0.18);
}
.pagination .page-numbers.current { background: var(--shu); color: var(--white); }
.pagination a.page-numbers:hover { background: var(--mustard); }

.search-form { display: flex; gap: 10px; max-width: 480px; }
.search-form input[type="search"] {
  flex: 1;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 10px 18px;
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--white);
}
.search-form button {
  background: var(--shu);
  color: var(--white);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 10px 22px;
  font-family: var(--font-display);
  font-size: 14px;
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(63,51,42,0.18);
}
.search-form button:hover { background: var(--shu-deep); }

/* 404 */
.error-404 { text-align: center; padding: 90px 0 110px; }
.error-404 .big { font-family: var(--font-display); font-size: 72px; color: var(--shu); margin: 0; line-height: 1; }
.error-404 .search-form { margin: 26px auto 0; justify-content: center; }

/* ============================================================
   13. コメント
   ============================================================ */
.comments-area { max-width: 820px; margin: 0 auto 64px; }
.comment-list { list-style: none; padding: 0; }
.comment-body {
  background: var(--white);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 10px 14px;
  font-family: var(--font-body);
  background: var(--white);
}
.comment-form .submit {
  background: var(--shu);
  color: var(--white);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 10px 30px;
  font-family: var(--font-display);
  cursor: pointer;
  box-shadow: var(--shadow);
}

/* ============================================================
   14. フッター
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  margin-top: 0;
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 32px;
  padding: 48px 0 20px;
}
.footer-widgets .widget-title {
  color: var(--mustard);
  font-size: 15px;
  letter-spacing: 0.2em;
  border-bottom: 2px solid rgba(251, 242, 221, 0.25);
  padding-bottom: 8px;
}
.footer-widgets a { color: var(--paper); }
.footer-widgets a:hover { color: var(--mustard); }
.footer-widgets ul { list-style: none; padding: 0; margin: 0; }
.footer-widgets li { padding: 5px 0; border-bottom: 1px dashed rgba(251, 242, 221, 0.15); font-size: 14px; }

.footer-bottom {
  border-top: 1px solid rgba(251, 242, 221, 0.2);
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12.5px;
}

.footer-menu ul { list-style: none; display: flex; gap: 18px; margin: 0; padding: 0; flex-wrap: wrap; }
.footer-menu a { color: var(--paper); text-decoration: none; font-size: 13px; }
.footer-menu a:hover { color: var(--mustard); }

.copyright { letter-spacing: 0.06em; }

/* ============================================================
   15. 細部
   ============================================================ */
::selection { background: var(--mustard); color: var(--ink); }

.alignwide { max-width: 1000px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100%; }

@media (max-width: 600px) {
  .hero { padding: 52px 0 70px; }
  .section { padding: 48px 0; }
  .entry { margin: 24px auto 40px; }
}
