/*
Theme Name: abe-masakazu
Description: あべ雅一(阿部雅一)公式サイトのオリジナルテーマ。Snow Monkey を使わず、素のHTMLとCSSで作る。
Version: 1.0.0
Author: 株式会社オーガスタ
Text Domain: abe-masakazu
*/

/* ---------- 基本の値 ---------- */
@font-face { font-family: "Noto Sans JP"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("assets/fonts/NotoSansJP-Regular.woff2") format("woff2"); }
@font-face { font-family: "Noto Sans JP"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("assets/fonts/NotoSansJP-Bold.woff2") format("woff2"); }

:root {
  --accent: #00adee;
  --accent-color: #00adee;
  --sub-accent-color: #f9e500;
  --text: #333;
  --_color-text: #333;
  --_color-white: #fff;
  --_lightest-color-gray: #f7f7f7;
  --_lighter-color-gray: #eee;
  --_light-color-gray: #ccc;
  --_color-gray: #999;
  --_dark-color-gray: #666;
  --_darker-color-gray: #444;
  --_darkest-color-gray: #222;
  --_margin-2: .6rem;
  --_margin-1: 1.2rem;
  --_margin1: 1.8rem;
  --_margin2: 3.6rem;
  --max: 1280px;
  --gutter: 1.8rem;
  --wp--custom--content-width: 1280px;
  --wp--custom--content-wide-width: 1280px;
  /* 余白の目盛り(Snow Monkey の preset と同じ値) */
  --wp--preset--spacing--20: 0.6rem;
  --wp--preset--spacing--30: 1.2rem;
  --wp--preset--spacing--40: 1.8rem;
  --wp--preset--spacing--50: clamp(2.64rem, calc(2.64rem + 0.00626 * (100vw - 360px)), 3rem);
  --wp--preset--spacing--60: clamp(3.15rem, calc(3.15rem + 0.0287 * (100vw - 360px)), 4.8rem);
  --wp--preset--spacing--70: clamp(3.99rem, calc(3.99rem + 0.0663 * (100vw - 360px)), 7.8rem);
  --wp--preset--spacing--80: clamp(5.34rem, calc(5.34rem + 0.1263 * (100vw - 360px)), 12.6rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; letter-spacing: 0.05rem; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #fff; color: var(--text);
  font-family: "Noto Sans JP", sans-serif; font-size: 1rem; line-height: 1.8;
  overflow-wrap: break-word; -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; }
a { color: var(--accent); }
.screen-reader-text, .skip-link:not(:focus) {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 3000; background: #fff; padding: .5rem 1rem; }

/* ---------- ヘッダー(青い帯に白い文字) ---------- */
.hm-header { position: sticky; top: 0; z-index: 1000; background: var(--accent); color: #fff; }
.hm-header__inner {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); min-height: 84px;
  display: flex; align-items: center; gap: 1rem;
}
.hm-brand { margin: 0; flex: 1 1 auto; line-height: 1; text-align: center; font-size: 1rem; }
.hm-brand a { display: inline-block; }
.hm-brand img { display: block; width: 250px; max-width: 100%; height: auto; }
.hm-nav { display: none; }
.hm-nav ul { list-style: none; margin: 0; padding: 0; display: flex; }
.hm-nav a {
  position: relative; display: flex; align-items: center; padding: 19.2px; color: #fff; text-decoration: none;
  font-weight: 700; font-size: 14.2222px; line-height: 25.6px;
}
/* 下線がのびる動き(Snow Monkey の extend-underline と同じ) */
.hm-nav a::after {
  content: ""; position: absolute; left: 50%; right: 50%; bottom: 10px; height: 1px; background: #fff; transition: left .2s, right .2s;
}
.hm-nav a:hover::after, .hm-nav .current-menu-item > a::after { left: 19.2px; right: 19.2px; }
.hm-burger {
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0;
  color: #fff; cursor: pointer; padding: 0; width: 22px; font: inherit;
}
.hm-burger span.bar { display: block; width: 22px; height: 1px; background: #fff; }
.hm-burger__label { font-size: 8px; line-height: 8px; color: #fff; margin-top: 2px; }
@media (max-width: 1023px) { .hm-header__inner > .hm-brand { margin-left: calc(22px + 1rem); } }
@media (min-width: 1024px) {
  .hm-nav { display: block; }
  .hm-burger { display: none; }
  .hm-brand { flex: 0 1 auto; margin-right: auto; text-align: left; }
}

/* ---------- ドロワー(スマホ・タブレットのメニュー) ---------- */
.hm-drawer {
  position: fixed; inset: 0 auto 0 0; width: min(320px, 85vw); z-index: 2000; background: var(--accent); color: #fff;
  transform: translateX(-100%); transition: transform .3s; padding: 4rem 0 2rem; overflow-y: auto; font-size: 14.2222px;
}
.hm-drawer ul { list-style: none; margin: 0; padding: 0; }
.hm-drawer a { display: block; padding: .9rem 1.2rem; color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .25); }
.hm-drawer__close {
  position: absolute; top: .8rem; left: 1rem; background: none; border: 0; color: #fff; font-size: 1.6rem; cursor: pointer;
}
.hm-overlay { position: fixed; inset: 0; z-index: 1500; background: rgba(0, 0, 0, .5); opacity: 0; visibility: hidden; transition: opacity .3s; }
body.is-drawer-open .hm-drawer { transform: none; }
body.is-drawer-open .hm-overlay { opacity: 1; visibility: visible; }

/* ---------- 本文の入れ物 ---------- */
.hm-main { display: block; overflow-x: clip; }
.hm-section { position: relative; margin: 0 0 1.8rem; padding: 0; }
.hm-section:not([style*="padding"]) { padding-block: var(--wp--preset--spacing--60); }
/* 背景の写真つきの帯(Snow Monkey の「セクション(背景画像)」の代わり) */
.hm-section[style*="background-image"] { display: flex; flex-direction: column; }
.hm-section.hm-wide { min-height: 75vh; }
.hm-section.xcs-fv { margin-bottom: 0; }
.xcs-fv .xcs-fv-textWrap { display: flex; flex-direction: column; align-items: flex-start; flex: none; max-width: 100%; }
.xcs-fv .xcs-fv-textWrap > p { margin: 0; white-space: nowrap; }
.xcs-fv .xcs-fv-textWrap { width: max-content; }
/* 右寄せの帯: 中の入れ物(幅1280px)の右端に寄せる */
.hm-section.hm-justify-right > .hm-container { display: flex; flex-direction: column; align-items: flex-end; width: 100%; padding-inline: 0; }
@media (min-width: 1024px) { .xcs-fv .xcs-fv-textWrap { margin-right: 10px; } }
.hm-section.hm-items-bottom { justify-content: flex-end; }
/* 付箋の形の帯(Snow Monkey Editor の is-style-sme-post-it と同じ。文字の幅だけで、中央に置き、右下を折り返す) */
p.is-style-sme-post-it { --sme-post-it--dog-year-size: 1.8rem; position: relative; width: fit-content; max-width: 100%; margin-left: auto !important; margin-right: auto !important; margin-bottom: var(--sme-post-it--dog-year-size) !important; padding: 1.8rem 1.8rem 0 !important; }
p.is-style-sme-post-it::before { content: ""; display: block; position: absolute; right: 0; top: 100%; border-style: solid; border-color: #e6e6e6 transparent; border-width: var(--sme-post-it--dog-year-size) var(--sme-post-it--dog-year-size) 0 0; }
p.is-style-sme-post-it::after { content: ""; display: block; position: absolute; left: 0; right: var(--sme-post-it--dog-year-size); top: calc(100% - 1px); height: var(--sme-post-it--dog-year-size); background-color: inherit; }
.hm-section.hm-justify-right { align-items: flex-end; }
.hm-section.xcs-footer-message { display: flex; flex-direction: column; justify-content: flex-start !important; align-items: center !important; }
.hm-container { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.hm-container .hm-container { padding-inline: 0; max-width: none; }
@media (max-width: 768px) { .hm-container { padding-inline: .95rem; } .hm-container .hm-container { padding-inline: 0; } }
.alignfull { width: 100%; max-width: none; }
.hm-section.alignfull { overflow: visible; }
.hm-main > .hm-section:first-child { margin-top: 0; }

/* 段落などの間隔: Snow Monkey と同じく「前に何かあるときだけ上に 1.8rem」 */
.hm-main :where(p, ul, ol, figure, h1, h2, h3, h4, pre) { margin-block: 0; }
.hm-main :where(.hm-section, .hm-container, .hm-pad, .hm-narrow, .hm-grid__item) > * + * { margin-top: var(--_margin1); }
.hm-main .wp-block-group.has-background { padding: 1.8rem; }
.hm-main h1 { margin-top: 1.8rem; font-size: 1.8rem; line-height: 1.4; }
.hm-main h2 { font-size: 25.6px; line-height: 1.7; }
.hm-main h3 { font-size: 21.3333px; line-height: 1.744; }
/* 文字サイズの段ごとの行の高さ(Snow Monkey と同じ) */
.hm-main .has-sm-xl-font-size { line-height: 1.744; }
.hm-main .has-sm-2-xl-font-size { line-height: 1.7; }
.hm-main .has-sm-3-xl-font-size { line-height: 1.633; }
.hm-main .has-sm-4-xl-font-size { line-height: 1.522; }
.hm-main .has-sm-5-xl-font-size { line-height: 1.3; }
.hm-main .has-sm-6-xl-font-size { line-height: 1.1; }
.hm-narrow { margin-inline: auto; }
.hm-pad { padding-inline: var(--gutter); margin-inline: auto; }
@media (max-width: 768px) { .hm-pad { padding-inline: .95rem; } }
/* 背景色つきの段落の内側の余白(Snow Monkey と同じ 1.8rem) */
.hm-main p.has-background { padding: 1.8rem; }
/* 箇条書き(Snow Monkey と同じ字下げ・行の間隔) */
.hm-main ul.wp-block-list, .hm-main ol.wp-block-list { padding-left: 24px; }
.hm-main .wp-block-list li + li { margin-top: 9.6px; }
.hm-main ul.is-style-sme-list-check { list-style: none; }
.hm-main ul.is-style-sme-list-check > li { position: relative; }
.hm-main ul.is-style-sme-list-check > li::before {
  content: ""; position: absolute; left: -19px; top: 9.4px; width: 8px; height: 6px;
  border-left: 2px solid #75cd00; border-bottom: 2px solid #75cd00; transform: rotate(-45deg);
}
/* 小見出し(h3)の下の細い線 */
.hm-main h3.wp-block-heading:not([class*="is-style"]) { padding-bottom: 7.2px; border-bottom: 1px solid var(--_lighter-color-gray); }
.hm-main pre.wp-block-preformatted { white-space: pre-wrap; font-family: inherit; overflow: visible; }
.has-text-align-center { text-align: center; }
.aligncenter { margin-inline: auto; text-align: center; }
hr.wp-block-separator { border: 0; border-top: 1px solid var(--_light-color-gray); }
.hm-main .wp-block-image img { display: block; margin-inline: auto; }
.wp-block-video video { display: block; width: 100%; }
.hm-main iframe { max-width: 100%; }

/* 画面の幅ごとの出し分け */
@media (max-width: 639px) { .hm-hide-sm { display: none !important; } }
@media (min-width: 640px) and (max-width: 1023px) { .hm-hide-md { display: none !important; } }
@media (min-width: 1024px) { .hm-hide-lg { display: none !important; } }

/* 並び(Snow Monkey の「アイテム」の代わり) */
.hm-grid { display: grid; gap: 1.2rem; grid-template-columns: 1fr; margin-block: 0 1.8rem; }
@media (min-width: 600px) { .hm-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
  .hm-grid[data-n="3"] { grid-template-columns: repeat(3, 1fr); }
  .hm-grid[data-n="4"] { grid-template-columns: repeat(4, 1fr); }
}
.hm-grid[data-n="1"] { grid-template-columns: 1fr; }
.hm-grid__item > :last-child { margin-bottom: 0; }
/* 列数の指定がある並び(Snow Monkey の「スマホ・タブレット・PC の列数」と同じ) */
.hm-grid[data-sm] { gap: 28.8px; }
.hm-grid[data-sm="1"] { grid-template-columns: 1fr; }
.hm-grid[data-sm="2"] { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) {
  .hm-grid[data-md="1"] { grid-template-columns: 1fr; }
  .hm-grid[data-md="2"] { grid-template-columns: repeat(2, 1fr); }
  .hm-grid[data-md="3"] { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .hm-grid[data-lg="1"] { grid-template-columns: 1fr; }
  .hm-grid[data-lg="2"] { grid-template-columns: repeat(2, 1fr); }
  .hm-grid[data-lg="3"] { grid-template-columns: repeat(3, 1fr); }
  .hm-grid[data-lg="4"] { grid-template-columns: repeat(4, 1fr); }
}
.hm-section.alignfull > .hm-grid { margin-inline: 0; }
/* 縦に並べるグループの中の並びは、横幅いっぱいに(縮んで写真が消えないように) */
.is-layout-flex > .hm-grid { align-self: stretch; }
.is-layout-flex.is-vertical > .hm-grid { width: 100%; }
/* リンクつきの項目(写真・題・小見出し・説明) */
.hm-card { display: block; color: var(--text); text-decoration: none; }
.hm-card__figure { margin: 0 0 19.2px; aspect-ratio: 4 / 3; overflow: hidden; }
.hm-card__figure img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.hm-card:hover .hm-card__figure img { transform: scale(1.05); }
.hm-card__title { font-size: 21.3333px; line-height: 37.2px; font-weight: 700; }
.hm-card__lede { font-size: 14.2222px; line-height: 25.6px; }
.hm-card__content { margin: 9.6px 0 19.2px; }
/* 帯の上の白い三角(下向き) */
.hm-section.hm-divider-top::before {
  content: ""; position: absolute; top: -1px; left: 50%; transform: translateX(-50%); z-index: 2;
  border-left: 33px solid transparent; border-right: 33px solid transparent; border-top: 33px solid #fff;
}

/* パネル(写真に文字を重ねたリンク) */
.hm-panels { display: grid; gap: 1.2rem; grid-template-columns: 1fr; margin-block: 0 1.2rem; }
@media (min-width: 600px) { .hm-panels[data-n="2"], .hm-panels[data-n="3"] { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .hm-panels[data-n="3"] { grid-template-columns: repeat(3, 1fr); } }
.hm-panel { display: block; color: inherit; text-decoration: none; overflow: hidden; }

/* ステップ(年表のような番号つきの流れ) */
.hm-step { list-style: none; margin: 0 0 1.8rem; padding: 0; counter-reset: hmstep; }
.hm-step__item { position: relative; counter-increment: hmstep; padding: 0 0 1.6rem 3.4rem; }
.hm-step__item::before {
  content: counter(hmstep); position: absolute; left: 0; top: 0; width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700; text-align: center; line-height: 2.2rem; font-size: .95rem;
}
.hm-step__item::after {
  content: ""; position: absolute; left: 1.05rem; top: 2.4rem; bottom: .2rem; width: 2px; background: var(--_lighter-color-gray);
}
.hm-step__item:last-child::after { display: none; }
.hm-step__title { font-weight: 700; line-height: 2.2rem; margin: 0; }
.hm-step__body > :last-child { margin-bottom: 0; }

/* トップの大きい写真(2枚以上が重なって切り替わる) */
.hm-slider { position: relative; min-height: 70vh; overflow: hidden; }
.hm-slide { position: absolute; inset: 0; opacity: 0; animation: hmSlide 14s infinite; }
.hm-slide:nth-child(2) { animation-delay: -7s; }
.hm-slide .wp-block-cover { height: 100%; min-height: 70vh !important; }
@keyframes hmSlide { 0% { opacity: 1; } 42% { opacity: 1; } 50% { opacity: 0; } 92% { opacity: 0; } 100% { opacity: 1; } }

/* カバー(写真の枠)の写真をゆっくり拡大 */
.wp-block-cover__image-background { transform: scale(1); animation: coverZoom 20s ease-out forwards; }
@keyframes coverZoom { from { transform: scale(1); } to { transform: scale(1.08); } }

/* ===== 部分ごとの調整(元の my-snow-monkey の CSS から) ===== */
/* フッター直前の「郷土愛を大切にする市民議員」 */
.xcs-footer-message { justify-content: center !important; align-items: start !important; padding-inline: 10px !important; height: 800px !important; }
@media (max-width: 1023px) { .xcs-footer-message { height: 500px !important; } }
.xcs-footer-message-p {
  color: #004ad3 !important; font-size: clamp(2rem, 6vw, 5rem) !important;
  font-family: 'Zen Kaku Gothic New', sans-serif !important; font-weight: 900 !important;
  text-shadow: 0 0 6px rgba(255, 255, 255, .7), 2px 0 6px rgba(255, 255, 255, .7), 0 2px 6px rgba(255, 255, 255, .5) !important;
  overflow: visible !important;
}
@media (max-width: 550px) { .xcs-footer-message-p { display: none; } }
.xcs-footer-message-p--sp { display: none; }
@media (max-width: 550px) { .xcs-footer-message-p--sp { display: block; } }

.xcs-fitcontent { width: fit-content; margin-inline: auto; }

/* トップの大きい写真の上の文字 */
.xcs-fv { align-items: flex-end !important; padding-right: 20px; }
.xcs-fv-textWrap { gap: 5px !important; padding-bottom: 30px !important; }
.xcs-fv-label {
  color: #0c6ff0 !important; font-size: clamp(2.4rem, 6vw, 3.5rem) !important;
  font-family: 'Zen Kaku Gothic New', sans-serif !important; font-weight: 900 !important; letter-spacing: .05em !important;
  text-shadow: 0 0 6px rgba(255, 255, 255, .7), 2px 0 6px rgba(255, 255, 255, .7), 0 2px 6px rgba(255, 255, 255, .5) !important;
}
.xcs-fv-name {
  color: #244bb8 !important; font-size: clamp(5rem, 12vw, 7rem) !important;
  font-family: 'Zen Kaku Gothic New', sans-serif !important; font-weight: 900 !important;
  text-shadow: 0 0 6px rgba(255, 255, 255, .7), 2px 0 6px rgba(255, 255, 255, .7), 0 2px 6px rgba(255, 255, 255, .5) !important;
}

/* Facebook ページの埋め込み(PC とスマホで出し分け) */
.xcs-facebook-sp { display: none; height: 400px !important; }
@media (max-width: 550px) { .xcs-facebook-pc { display: none; } .xcs-facebook-sp { display: block; } }
.facebook-page-embed { width: 100%; max-width: 550px; margin-inline: auto; overflow: hidden; }
.facebook-page-embed iframe { display: block; margin-inline: auto; max-width: 100%; }

/* 並びの中の写真の大きさをそろえる(4:3) */
.xcs-img-fitcover figure { aspect-ratio: 4 / 3 !important; }
.xcs-img-fitcover img { display: block !important; width: 100% !important; height: 100% !important; object-fit: cover !important; }

/* 活動実績: 見出しを画面いっぱいの幅に */
.xcs-100vw { width: 100vw !important; margin-left: calc(-50vw + 50%); }
@media (max-width: 768px) { .xcs-fdrow { flex-direction: column !important; } }

/* 政策: 街の絵を薄く敷く */
.xcs-bgimage {
  position: relative !important; background-image: url("assets/images/city.webp") !important;
  background-position: center center !important; background-repeat: no-repeat !important; background-size: auto 70% !important; overflow: hidden !important;
}
.xcs-bgimage::before {
  content: "" !important; position: absolute !important; inset: 0 !important; pointer-events: none !important; z-index: 1 !important;
  background: linear-gradient(to bottom, #fff 0%, #fff 20%, rgba(255, 255, 255, .6) 35%, rgba(255, 255, 255, .6) 55%, #fff 75%, #fff 100%) !important;
}
.xcs-bgimage > * { position: relative !important; z-index: 2 !important; }

.xcs-top-img100p img { width: 100% !important; }
.sme-highlighter { background-repeat: no-repeat; }

/* フェードイン(xcs-fadein) */
.xcs-fadein {
  --xcs-distance: 24px; --xcs-move-duration: 1200ms; --xcs-fade-duration: 1800ms; --xcs-delay: 250ms;
  opacity: 0; transform: translate3d(0, var(--xcs-distance), 0);
  transition: opacity var(--xcs-fade-duration) linear var(--xcs-delay), transform var(--xcs-move-duration) cubic-bezier(0.22, 1, 0.36, 1) var(--xcs-delay);
  will-change: opacity, transform;
}
.xcs-fadein.is-inview { opacity: 1; transform: translate3d(0, 0, 0); }
.xcs-fadein.is-done { opacity: 1; transform: none; will-change: auto; }

/* ふわっと出る動き */
.hm-fade { opacity: 0; transform: translateY(10px); transition: opacity .6s cubic-bezier(0, 0, 0, 1), transform .6s cubic-bezier(0, 0, 0, 1); }
.hm-fade-right { opacity: 0; transform: translateX(30px); transition: opacity 1.4s cubic-bezier(0, 0, 0, 1) .3s, transform 1.4s cubic-bezier(0, 0, 0, 1) .3s; }
.hm-fade-left { opacity: 0; transform: translateX(-30px); transition: opacity 1.4s cubic-bezier(0, 0, 0, 1) .3s, transform 1.4s cubic-bezier(0, 0, 0, 1) .3s; }
.hm-fade.is-in, .hm-fade-right.is-in, .hm-fade-left.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .hm-fade, .hm-fade-right, .hm-fade-left, .xcs-fadein { opacity: 1; transform: none; transition: none; }
  .wp-block-cover__image-background, .hm-slide { animation: none; }
  .hm-slide:first-child { opacity: 1; }
}

/* ---------- フッター ---------- */
.hm-footer { position: relative; border-top: 1px solid var(--_lighter-color-gray); }
.hm-footer__sns { display: flex; justify-content: center; padding: 10px 1rem 0; }
.hm-footer__sns img { display: block; width: 20px; height: 20px; }
.hm-footer__nav { padding: 10px 1rem; }
.hm-footer__nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 1.2rem; }
.hm-footer__nav a { color: var(--text); text-decoration: none; font-size: 12.8px; line-height: 23.04px; display: block; }
.hm-footer__nav a:hover { text-decoration: underline; }
.hm-copy { background: var(--text); color: #fff; text-align: center; padding: 19.2px 1rem; font-size: 14.2222px; line-height: 25.6px; }

/* ページ上へ戻るボタン */
.hm-pagetop {
  position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 900; width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center;
  text-decoration: none; font-size: 1.1rem; opacity: 0; visibility: hidden; transition: opacity .3s;
}
.hm-pagetop.is-show { opacity: 1; visibility: visible; }

/* お問い合わせフォーム(WPForms)の余白だけ整える */
.hm-main .wpforms-container { margin-block: 1.2rem 2.4rem; }

/* ボタン: 角丸と左右の余白 */
.wp-block-button .wp-block-button__link { border-radius: 8px; padding-left: 2.2em; padding-right: 2.2em; }
