/*
Theme Name: Shihousha
Theme URI: https://shihousha.com/
Author: shihousha.com
Description: shihousha.com 用の独自テーマ（ダミー）。
Version: 0.1.0
License: GNU General Public License v2 or later
Text Domain: shihousha
*/

:root {
  --bg: #ffffff;
  --fg: #1a2230;
  --muted: #5b6675;
  --accent: #1f5fae;
  --line: #e5e9f0;
  --soft: #f6f8fb;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  color: var(--fg);
  line-height: 1.8;
  background: var(--bg);
}
a { color: var(--accent); }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 24px; }

header {
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(255,255,255,.9);
  backdrop-filter: blur(8px); z-index: 10;
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { font-weight: 700; font-size: 20px; letter-spacing: .04em; }
.logo a { text-decoration: none; color: var(--fg); }

/* ブランドロゴ */
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark svg { display: block; width: 40px; height: 40px; border-radius: 13px; box-shadow: 0 3px 10px rgba(18,63,120,.28); transition: transform .2s; }
.brand:hover .brand-mark svg { transform: translateY(-1px) rotate(-3deg); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-weight: 800; font-size: 21px; letter-spacing: .10em; color: var(--fg); }
.brand-sub { font-size: 10px; letter-spacing: .30em; color: var(--accent); font-weight: 700; margin-top: 5px; }
.nav ul { display: flex; gap: 28px; list-style: none; }
.nav a { text-decoration: none; color: var(--muted); font-size: 15px; }
.nav a:hover { color: var(--accent); }

.hero {
  padding: 72px 0 32px;
  background: linear-gradient(180deg, var(--soft), #fff);
  text-align: center;
}
.hero .tag {
  display: inline-block; font-size: 13px; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 999px; padding: 4px 14px; margin-bottom: 24px;
}
.hero h1 { font-size: 34px; line-height: 1.5; margin-bottom: 20px; }
.hero p { color: var(--muted); font-size: 17px; }
.btn {
  display: inline-block; margin-top: 32px; background: var(--accent); color: #fff;
  text-decoration: none; padding: 14px 32px; border-radius: 8px; font-weight: 600;
}

section { padding: 72px 0; }
#series { padding-top: 32px; }
section h2 { font-size: 24px; margin-bottom: 8px; }
section .lead { color: var(--muted); margin-bottom: 40px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { border: 1px solid var(--line); border-radius: 12px; padding: 28px; background: #fff; }
.card h3 { font-size: 17px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 14px; }

.info { background: var(--soft); }
.info table { width: 100%; border-collapse: collapse; }
.info th, .info td { text-align: left; padding: 16px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.info th { width: 160px; color: var(--muted); font-weight: 600; }

footer { padding: 44px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.footer-brand { font-weight: 800; font-size: 18px; letter-spacing: .10em; color: var(--fg); display: inline-flex; align-items: baseline; gap: 8px; }
.footer-brand small { font-size: 11px; letter-spacing: .18em; color: var(--muted); font-weight: 600; }
.footer-copy { font-size: 12.5px; color: var(--muted); }

.wrap-narrow { max-width: 720px; }

/* 記事一覧（カード） */
.post-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 8px; }
.post-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; transition: box-shadow .2s, transform .2s; }
.post-card:hover { box-shadow: 0 8px 24px rgba(26,34,48,.08); transform: translateY(-2px); }
.post-card a { text-decoration: none; color: inherit; display: block; }
.post-thumb { aspect-ratio: 16 / 9; overflow: hidden; background: var(--soft); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-body { padding: 20px 22px 24px; }
.post-date { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.post-body h3 { font-size: 18px; line-height: 1.5; margin: 8px 0 10px; }
.post-body p { font-size: 14px; color: var(--muted); }

.pager { margin-top: 40px; text-align: center; }
.pager a, .pager .current { display: inline-block; padding: 8px 14px; margin: 0 4px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.pager .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* 個別記事 */
.single { padding: 56px 0 72px; }
.single-head { margin-bottom: 28px; }
.single-cat { display: inline-block; font-size: 12px; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 3px 12px; text-decoration: none; margin-bottom: 16px; }
.single-head h1 { font-size: 30px; line-height: 1.5; margin-bottom: 12px; }
.single-thumb { margin: 0 0 32px; }
.single-thumb img { width: 100%; border-radius: 12px; display: block; }

.single-body { font-size: 17px; }
.single-body h2 { font-size: 22px; margin: 44px 0 16px; padding-bottom: 8px; border-bottom: 2px solid var(--line); }
.single-body h3 { font-size: 18px; margin: 32px 0 12px; }
.single-body p { margin: 0 0 20px; }
.single-body strong { background: linear-gradient(transparent 60%, #d7e6f7 60%); font-weight: 700; }
.single-body a { text-decoration: underline; }
.single-body hr { border: none; border-top: 1px solid var(--line); margin: 40px 0; }
.single-body em { color: var(--muted); font-style: normal; font-size: 14px; }

/* Gutenberg 画像・表 */
.single-body figure { margin: 32px 0; }
.wp-block-image img { max-width: 100%; height: auto; border-radius: 10px; display: block; margin: 0 auto; }
.wp-block-image figcaption, figcaption { text-align: center; font-size: 13px; color: var(--muted); margin-top: 10px; }
.wp-block-table { overflow-x: auto; }
.wp-block-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.wp-block-table th, .wp-block-table td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.wp-block-table th { background: var(--soft); }

.single-tags { margin: 36px 0 8px; display: flex; flex-wrap: wrap; gap: 10px; }
.single-tags a { font-size: 13px; color: var(--muted); text-decoration: none; }
.single-tags a:hover { color: var(--accent); }

/* 前後リンク */
.series-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 40px 0 24px; }
.series-nav a { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 6px; }
.series-nav a:hover { border-color: var(--accent); }
.series-nav span { font-size: 12px; color: var(--muted); }
.series-nav strong { font-size: 14px; line-height: 1.5; color: var(--fg); }
.series-next { text-align: right; }
.back-link { text-align: center; margin-top: 8px; }
.back-link a { text-decoration: none; color: var(--muted); }

/* お問い合わせページ */
.contact-page { min-height: 60vh; }
.contact-page h1 { font-size: 28px; line-height: 1.5; margin-bottom: 8px; }
.contact-page .back-link { margin-top: 40px; text-align: left; }

/* お問い合わせフォーム */
.contact-form { max-width: 640px; }
.contact-form .field { margin-bottom: 22px; }
.contact-form label { display: block; font-weight: 600; margin-bottom: 8px; }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; color: var(--fg); background: #fff;
}
.contact-form textarea { resize: vertical; min-height: 160px; line-height: 1.7; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.contact-form .req { font-size: 11px; color: #fff; background: var(--accent); padding: 1px 7px; border-radius: 4px; margin-left: 6px; font-weight: 600; vertical-align: 1px; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-note { color: var(--muted); font-size: 13px; }
.contact-form .btn { margin-top: 18px; border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.contact-form .btn:hover { opacity: .9; }
.contact-msg { max-width: 640px; padding: 16px 18px; border-radius: 10px; margin-bottom: 24px; line-height: 1.7; }
.contact-msg.ok { background: #e8f5ec; border: 1px solid #b7dfc1; }
.contact-msg.err { background: #fdecec; border: 1px solid #f2b8b8; }
.contact-msg ul { list-style: none; }

.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.contact-note a { color: var(--muted); }

@media (max-width: 720px) {
  .nav ul { display: none; }
  .hero h1 { font-size: 26px; }
  .cards { grid-template-columns: 1fr; }
  .post-list { grid-template-columns: 1fr; }
  .series-nav { grid-template-columns: 1fr; }
  .single-head h1 { font-size: 24px; }
}
