/*
Theme Name: 市川かつひろ公式サイト
Theme URI: https://ichikawa-katsuhiro.com/
Author: アウレラ
Description: 市川かつひろ 八王子市議会議員 公式サイト専用テーマ
Version: 1.19.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: ichikawa
*/

:root {
	--accent: #FF3232;          /* テーマカラー（面・線） */
	--accent-dark: #E02C2C;     /* ボタンのホバー */
	--accent-text: #D42020;     /* 白地に置く文字色（読みやすい濃さ） */
	--on-accent: #FFFFFF;       /* テーマカラーの上に置く文字色 */
	--ink: #1F2933;
	--ink-2: #3E4852;
	--muted: #5A6470;
	--line: #ECE6E3;
	--line-2: #C9BFBA;
	--tint: #FBF5F2;
	--photo: #E8DDD8;
	--pill: #FFEDED;
	--dark: #1F2933;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
	margin: 0;
	font-family: "Noto Sans JP", "Noto Sans CJK JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
	color: var(--ink);
	background: #fff;
	line-height: 1.8;
	font-size: 16px;
	-webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-text); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid #1E5AA8; outline-offset: 2px; }

.wrap { max-width: 1180px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.wrap--narrow { max-width: 820px; }
.section { padding-top: 64px; padding-bottom: 64px; }
.section--tint { background: var(--tint); }
.section--dark { background: var(--dark); color: #fff; }
.section-title { margin: 0; font-size: 32px; font-weight: 900; line-height: 1.4; }
.section-lead { margin: 8px 0 0; font-size: 17px; color: var(--ink-2); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link:focus { position: static; width: auto; height: auto; clip: auto; display: block; padding: 8px 16px; background: #fff; }

.btn {
	display: inline-block; text-decoration: none; font-weight: 900; font-size: 19px;
	padding: 12px 28px; border-radius: 999px; border: 1px solid var(--accent);
	background: var(--accent); color: var(--on-accent); line-height: 1.6;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--on-accent); }
.btn--outline { background: #fff; color: var(--accent-text); }
.btn--outline:hover { background: var(--pill); color: var(--accent-text); }
.btn--white { background: #fff; color: var(--accent-text); border-color: #fff; }
.btn--white:hover { background: var(--pill); color: var(--accent-text); border-color: var(--pill); }
.btn--ghost { background: transparent; color: var(--on-accent); border-color: var(--on-accent); }
.btn--ghost:hover { background: rgba(255,255,255,.25); color: var(--on-accent); border-color: var(--on-accent); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ヘッダー */
.site-header { position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--line); background: #fff; box-shadow: 0 2px 10px rgba(31,41,51,.06); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 12px; padding-bottom: 12px; }
.site-brand-wrap { margin: 0; font-size: inherit; font-weight: inherit; line-height: inherit; }
.site-brand { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; line-height: 1.25; }
.site-brand__sub { font-size: 16px; font-weight: 700; color: var(--ink-2); letter-spacing: .02em; }
.site-brand__name { font-size: 40px; font-weight: 900; letter-spacing: .06em; color: var(--accent); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; font-size: 15px; font-weight: 700; }
.site-nav a { color: var(--ink); text-decoration: none; display: inline-block; padding: 10px 0; }
.site-nav a:hover, .site-nav .current-menu-item > a { color: var(--accent-text); }
.site-nav .menu-cta > a { background: var(--accent); color: var(--on-accent); padding: 8px 20px; border-radius: 999px; font-size: 19px; font-weight: 900; }
.site-nav .menu-cta > a:hover { background: var(--accent-dark); color: var(--on-accent); }

/* メインビジュアル */
.hero { background: var(--tint); }
.hero .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding-top: 64px; padding-bottom: 64px; }
.hero__text { flex: 1.4 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 20px; container-type: inline-size; }
.hero__label { margin: 0; font-size: 16px; font-weight: 700; color: var(--accent-text); }
.hero__title { margin: 0; font-size: 40px; font-size: clamp(24px, 7.4cqi, 52px); line-height: 1.35; font-weight: 900; letter-spacing: .02em; white-space: normal; word-break: keep-all; overflow-wrap: anywhere; }
.hero__t1, .hero__t2 { display: block; white-space: pre-line; }
.hero__t1 { color: #0B8FD0; }
.hero__t2 { color: var(--accent); }
.hero__lead { margin: 0; font-size: 18px; color: var(--ink-2); white-space: pre-line; }
.hero__photo { flex: 1 1 380px; min-width: 0; }
.hero__photo { display: flex; justify-content: center; }
.hero__photo img { display: block; width: auto; height: auto; max-width: 100%; max-height: 640px; border-radius: 16px; } /* 写真は切り取らず、縦横の比率のまま表示 */
.photo-placeholder { background: var(--photo); border-radius: 16px; display: flex; align-items: center; justify-content: center; color: #6B5F5A; font-weight: 700; min-height: 180px; }
.hero__photo .photo-placeholder { height: 420px; width: 100%; }

/* 予定と相談 */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; padding-top: 56px; padding-bottom: 56px; }
.card { border: 1px solid var(--line); border-radius: 16px; padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.card h2 { margin: 0; font-size: 24px; font-weight: 900; line-height: 1.4; }
.card__note { margin: 0; font-size: 14px; color: var(--muted); }
.schedule { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.schedule__row { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.schedule__row dt { flex: 0 0 140px; font-weight: 700; color: var(--accent-text); }
.schedule__row dd { margin: 0; flex: 1 1 200px; white-space: pre-line; }
.card--accent { border: 3px solid var(--accent); padding: 0; overflow: hidden; gap: 0; }
.card--accent h2 { background: var(--accent); color: var(--on-accent); padding: 16px 29px; }
.card--accent .card__body { padding: 24px 29px 29px; display: flex; flex-direction: column; gap: 14px; }
.soudan__date { margin: 0; font-size: 22px; font-weight: 900; color: var(--accent-text); }
.soudan__place, .soudan__text { margin: 0; white-space: pre-line; }
.soudan__text { font-size: 15px; }
.btn--tel { font-size: 18px; font-weight: 900; }

/* 記事一覧カード */
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 28px; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.post-card { background: #fff; border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; border: 1px solid var(--line); }
.post-card:hover { color: var(--ink); box-shadow: 0 4px 16px rgba(31,41,51,.08); }
.post-card:hover .post-card__title { color: var(--accent-text); }
.post-card__thumb img, .post-card__thumb .photo-placeholder { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; object-position: center; border-radius: 0; min-height: 0; }
.post-card__thumb--top img { object-position: center top; }
.post-card__thumb--bottom img { object-position: center bottom; }
.post-card__thumb--whole img { object-fit: contain; background: var(--photo); }
.post-card__body { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 13px; color: var(--muted); }
.tag { background: var(--pill); color: var(--accent-text); font-weight: 700; padding: 2px 10px; border-radius: 999px; font-size: 13px; text-decoration: none; }
a.tag:hover { color: var(--accent-text); text-decoration: underline; }
.post-card__title { font-size: 17px; font-weight: 700; line-height: 1.55; }

/* 取り組み */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 28px; }
.theme-card { border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 4px; }
.theme-card:hover { border-color: var(--accent); color: var(--ink); }
.theme-card__name { font-size: 19px; font-weight: 900; }
.theme-card__desc { font-size: 14px; color: var(--muted); }
.theme-card__count { font-size: 14px; font-weight: 700; color: var(--accent-text); }

/* YouTube */
.yt { background: #EEF7FC; }
.yt .wrap { display: flex; flex-direction: column; gap: 32px; }
.yt__text { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.yt__label { margin: 0; font-size: 15px; font-weight: 700; color: #086A9E; }
.yt__lead { margin: 0; color: var(--ink-2); white-space: pre-line; }
.yt__text .btn { align-self: flex-start; }
.yt__videos { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.yt__videos--1 { max-width: 820px; }
.yt__video { min-width: 0; }
.yt__video iframe { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: 14px; background: #D6E6F0; }
.yt__video--short { display: flex; justify-content: center; }
.yt__video--short iframe { width: auto; max-width: 100%; height: 480px; aspect-ratio: 9 / 16; }

/* しんぶん赤旗 */
.akahata { background: var(--tint); }
.akahata__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 40px; margin-bottom: 32px; }
.akahata__text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.akahata__label { margin: 0; font-size: 15px; font-weight: 700; color: var(--accent-text); }
.akahata__lead { margin: 0; color: var(--ink-2); white-space: pre-line; }
.akahata__actions { flex: 0 1 auto; display: flex; flex-wrap: wrap; gap: 12px; }
.akahata__media { display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch; gap: 24px; }
.akahata__banner { flex: 0 1 380px; min-width: 0; display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 4px 16px rgba(31,41,51,.10); padding: 16px; }
.akahata__banner a { display: block; width: 100%; }
.akahata__banner img { display: block; width: 100%; height: auto; border-radius: 8px; }
.akahata__post { flex: 0 1 560px; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 4px 16px rgba(31,41,51,.10); padding: 8px; display: flex; align-items: center; }
.akahata__post-frame { width: 100%; }
.akahata__post-frame .twitter-tweet { margin: 0 auto !important; }
.akahata__post-frame blockquote.twitter-tweet { padding: 16px 12px; font-size: 15px; }
.akahata__post-link { display: block; width: 100%; padding: 20px; font-weight: 700; text-decoration: none; text-align: center; }
.akahata__sub { margin: 24px 0 0; font-size: 15px; text-align: center; }
@media (max-width: 700px) {
	.akahata__actions .btn { width: 100%; text-align: center; }
	.akahata__banner, .akahata__post { flex-basis: 100%; }
	.akahata__banner a { max-width: 360px; margin: 0 auto; }
}

/* 連絡先 */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; }
.contact__info { display: flex; flex-direction: column; gap: 14px; }
.contact__info p { margin: 0; }
.sns { display: flex; flex-wrap: wrap; gap: 10px; }
.sns a { border: 1px solid var(--line-2); color: var(--ink); text-decoration: none; font-weight: 700; padding: 10px 18px; border-radius: 999px; font-size: 15px; }
.sns a:hover { border-color: var(--accent); color: var(--accent-text); }
.contact__form { background: var(--tint); border-radius: 16px; padding: 28px; }
.contact__form h3 { margin: 0 0 12px; font-size: 20px; font-weight: 900; }
.contact__form input[type="text"], .contact__form input[type="email"], .contact__form input[type="tel"], .contact__form textarea {
	width: 100%; font: inherit; padding: 12px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff;
}
.contact__form input[type="submit"] { font: inherit; font-weight: 900; font-size: 19px; background: var(--accent); color: var(--on-accent); border: 0; border-radius: 999px; padding: 14px 28px; cursor: pointer; }
.contact__form input[type="submit"]:hover { background: var(--accent-dark); }

/* リンク集・フッター */
.links-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; font-size: 14px; padding-top: 48px; padding-bottom: 48px; }
.links-grid h3 { margin: 0 0 8px; font-size: 16px; font-weight: 900; }
.links-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.site-footer { background: var(--dark); color: #C3CBD3; font-size: 13px; text-align: center; padding: 24px; }
.site-footer a { color: #fff; }

/* 記事ページ・固定ページ */
.page-head { background: var(--tint); }
.page-head .wrap { padding-top: 48px; padding-bottom: 40px; }
.page-head__label { margin: 0 0 6px; font-size: 15px; font-weight: 700; color: var(--accent-text); }
.page-head h1 { margin: 0; font-size: 34px; font-weight: 900; line-height: 1.45; }
.page-head .post-meta { margin-top: 14px; }
.page-head--photo .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 32px 48px; max-width: 1080px; }
.page-head__photo { flex: 0 1 300px; min-width: 0; }
.page-head__photo img { display: block; width: 100%; aspect-ratio: 4 / 5; height: auto; object-fit: cover; object-position: center top; border-radius: 16px; }
.page-head__text { flex: 1 1 360px; min-width: 0; }
.page-head--photo h1 { font-size: 44px; }
.page-head__lead { margin: 10px 0 0; font-size: 18px; color: var(--ink-2); }
.entry { padding-top: 48px; padding-bottom: 64px; font-size: 17px; }
.entry > * + * { margin-top: 1.2em; }
.entry p { margin: 0; }
.entry p + p { margin-top: 1em; }
.entry h2 { font-size: 26px; font-weight: 900; line-height: 1.5; margin: 2em 0 .6em; padding-bottom: 8px; border-bottom: 3px solid var(--accent); }
.entry h3 { font-size: 21px; font-weight: 900; line-height: 1.5; margin: 1.8em 0 .5em; }
.entry img { border-radius: 10px; display: block; margin-left: auto; margin-right: auto; }
.entry hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.entry iframe { max-width: 100%; border: 0; }
/* 埋め込み動画：横長は16:9、ショート（縦長）は幅を抑えて中央に */
.entry iframe[src*="youtube"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.entry .wp-block-embed { margin-left: 0; margin-right: 0; }
.entry .wp-has-aspect-ratio .wp-block-embed__wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; aspect-ratio: auto; }
.entry .wp-embed-aspect-9-16, .entry .wp-embed-aspect-1-2 { max-width: 360px; margin-left: auto; margin-right: auto; }
.entry .wp-block-embed figcaption { font-size: 14px; color: var(--muted); text-align: center; margin-top: 8px; }
.entry blockquote { margin: 1.5em 0; padding: 12px 20px; border-left: 4px solid var(--line-2); background: var(--tint); }
.entry ul, .entry ol { padding-left: 1.4em; }
.entry li + li { margin-top: .4em; }
.entry dl.profile-list { display: grid; grid-template-columns: 120px 1fr; gap: 10px 16px; }
.entry dl.profile-list dt { font-weight: 700; color: var(--accent-text); }
.entry dl.profile-list dd { margin: 0; }
.entry .profile-table { margin: 0; }
.entry .profile-table table { border-collapse: collapse; width: 100%; font-size: 16px; }
.entry .profile-table td { border: 0; border-bottom: 1px solid var(--line); padding: 10px 12px 10px 0; vertical-align: top; }
.entry .profile-table td:first-child { font-weight: 700; color: var(--accent-text); white-space: nowrap; width: 8em; }
.entry .policy-grid { gap: 16px; }
.entry .policy p { margin: 0; }
.entry .policy p.policy__tag { font-size: 13px; font-weight: 700; color: var(--accent-text); }
.entry .policy p.policy__head { font-size: 18px; font-weight: 900; line-height: 1.5; }
.entry .policy p.policy__body { font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.policy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.policy { border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; }
.policy__tag { display: block; font-size: 13px; font-weight: 700; color: var(--accent-text); }
.policy__head { display: block; font-size: 18px; font-weight: 900; line-height: 1.5; }
.policy__body { display: block; font-size: 14px; color: var(--ink-2); margin-top: 4px; }

.post-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 24px; margin-top: 48px; font-size: 15px; }
.pagination { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pagination .page-numbers { display: inline-block; min-width: 44px; padding: 10px 14px; text-align: center; border: 1px solid var(--line-2); border-radius: 8px; text-decoration: none; color: var(--ink); background: #fff; }
.pagination .page-numbers.current { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 900; font-size: 19px; padding-top: 7px; padding-bottom: 7px; }
.cat-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }

@media (max-width: 700px) {
	.btn { font-size: 19px; }
	.card--accent h2 { padding: 14px 21px; }
	.card--accent .card__body { padding: 20px 21px 24px; }
	.section { padding-top: 48px; padding-bottom: 48px; }
	.section-title { font-size: 26px; }
	.hero .wrap { padding-top: 40px; padding-bottom: 40px; gap: 28px; }
	.hero__photo img { max-height: 75vh; }
	.hero__photo .photo-placeholder { height: 260px; }
	html { scroll-padding-top: 130px; }
	.site-header .wrap { padding-top: 8px; padding-bottom: 4px; gap: 2px; }
	.site-brand__sub { font-size: 13px; }
	.site-brand__name { font-size: 30px; }
	.site-nav { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
	.site-nav::-webkit-scrollbar { display: none; }
	.site-nav ul { flex-wrap: nowrap; gap: 0 16px; font-size: 14px; white-space: nowrap; }
	.site-nav a { padding: 8px 0; }
	.site-nav .menu-cta { position: sticky; right: 0; background: #fff; padding-left: 10px; box-shadow: -12px 0 12px -6px #fff; }
	.site-nav .menu-cta > a { font-size: 15px; padding: 6px 16px; }
	.card { padding: 24px; }
	.page-head h1, .page-head--photo h1 { font-size: 26px; }
	.page-head__photo { flex-basis: 220px; margin: 0 auto; }
	.entry { font-size: 16px; }
	.entry dl.profile-list { grid-template-columns: 1fr; gap: 2px; }
	.entry dl.profile-list dd { margin-bottom: 10px; }
	.schedule__row dt { flex-basis: 100%; }
	.entry .profile-table td { display: block; width: auto; padding: 0; border: 0; }
	.entry .profile-table td:first-child { padding-top: 10px; }
	.entry .profile-table td:last-child { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
}
