/* =============================================================================
   テンプレート「みどり」 v0.1
   白いヘッダーに細い文字のメニュー、緑のパンくずの帯、枠線の左メニュー、淡い緑の丸い小見出し、
   青い日付のお知らせ、濃い灰色のフッター。若松法人会の旧デザインの雰囲気。スマホ対応。スクリプトは使わない。
   ============================================================================= */
:root {
  --c-primary: #027c25;
  --c-primary-ink: #ffffff;
  --c-link: #1b7f34;
  --c-pill: #e8f7ec;
  --c-date: #0a60ae;
  --c-footer-bg: #2b2b2b;
  --c-text: #2b2b2b;
  --c-line: #e6e6e6;
  --c-soft: #f8f9fa;
  --wrap: 1110px;
  --side: 205px;
  --radius: 4px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--c-text); font-family: var(--font-body); font-size: 15px; line-height: 1.75; }
.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: #fff; padding: .5em 1em; }
[id] { scroll-margin-top: 120px; }

/* ---- ヘッダー（白・ロゴは左、細い文字のメニューは右） ---- */
.site-header { background: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 rgba(0,0,0,.04); }
.header-in { display: flex; align-items: center; gap: 2rem; min-height: 108px; }
.brand { font-size: 1.5rem; font-weight: 500; color: var(--c-text); text-decoration: none; letter-spacing: .04em; white-space: nowrap; }
.brand img { display: block; width: auto; max-width: min(60vw, 240px); object-fit: contain; }
.main-nav { margin-left: auto; }
.main-nav > ul { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 1.6rem; list-style: none; margin: 0; padding: 0; }
.main-nav > ul > li > a { display: block; white-space: nowrap; padding: .5em 0 .35em; color: #444; text-decoration: none; font-size: .9rem; letter-spacing: .03em;
  border-bottom: 2px solid transparent; }
.main-nav > ul > li > a:hover { color: var(--c-primary); }
.main-nav > ul > .is-active > a { border-bottom-color: color-mix(in srgb, var(--c-primary) 40%, #fff); }
.nav-toggle, .nav-btn { display: none; }
.util-nav { order: 3; }
.util-nav ul { display: flex; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.util-nav a { display: block; padding: .4em 1em; font-size: .82rem; color: #fff; background: var(--c-primary); border-radius: 999px; text-decoration: none; white-space: nowrap; }

/* ---- パンくず（緑の帯・白い文字） ---- */
.crumbs { background: var(--c-primary); color: #fff; font-size: .78rem; padding-block: .55rem; }
.crumbs:has(> .wrap:empty) { display: none; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4em; }
.crumbs li + li::before { content: "/"; margin-right: .4em; opacity: .85; }
.crumbs a { color: #fff; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---- 本文＋左メニュー ---- */
.with-side { display: grid; grid-template-columns: minmax(0, 1fr) var(--side); gap: 2.2rem; padding-block: 2.8rem 4rem; align-items: start; }
.with-side.side-left { grid-template-columns: var(--side) minmax(0, 1fr); }
.with-side.side-left .side-nav { order: -1; }
.narrow { max-width: 900px; padding-block: 2.8rem 4rem; }
.full { padding-block: 0 3rem; }
.full > [data-block] { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.side-title { display: none; }
.side-menu ul { list-style: none; margin: 0; padding: 0; }
.side-menu > ul { border: 1px solid var(--c-line); }
.side-menu a { display: block; padding: .45em 1em; color: #444; text-decoration: none; border-top: 1px solid var(--c-line); font-size: .88rem; }
.side-menu > ul > li:first-child > a { border-top: 0; }
.side-menu a:hover { color: var(--c-primary); background: var(--c-soft); }
.side-menu ul ul a { padding-left: 2em; font-size: .84rem; }
.side-menu .is-current > a { color: var(--c-primary); font-weight: 700; }

/* ---- 本文の見出し ---- */
.t-midori [data-block="heading"] h1 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem); font-weight: 500; border: 0; padding: 0; margin: 0 0 .2em; letter-spacing: .02em; }
.t-midori .cms-content h2 { position: relative; font-size: 1.25rem; font-weight: 500; background: var(--c-pill); border: 0; border-radius: 999px;
  padding: .45em 1em .45em 2.4em; max-width: 26em; }
.t-midori .cms-content h2::before { content: ""; position: absolute; left: 1em; top: 50%; translate: 0 -50%; width: .9em; height: .9em; border-radius: 50%; background: #fff; }
.t-midori .cms-content h3 { font-size: 1.05rem; font-weight: 700; border-bottom: 1px solid var(--c-line); }
.t-midori .cms-content a { color: var(--c-link); }
/* トップページ（メインビジュアルあり）の見出しは、大きな細い文字 */
.t-midori.has-hero .cms-content > [data-block="heading"] h2, .t-midori.has-hero .cms-content > [data-block="heading"] h1 {
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem); font-weight: 500; background: none; border-radius: 0; padding: 0; max-width: none; letter-spacing: .06em; }
.t-midori.has-hero .cms-content > [data-block="heading"] h2::before { display: none; }
.t-midori.has-hero .full > [data-block="heading"] { margin-top: 3rem; }

/* ---- お知らせ（青い日付・緑の題名） ---- */
.t-midori [data-block="news"] ul { border-top: 0; }
.t-midori [data-block="news"] li { align-items: baseline; gap: .7em; padding: .55em 0; border-bottom: 1px solid var(--c-line); }
.t-midori [data-block="news"] time { min-width: 0; padding: .05em .6em; background: var(--c-date); color: #fff; border-radius: 3px; font-size: .8rem; white-space: nowrap; }
.t-midori [data-block="news"] a { color: var(--c-link); }

/* ---- カード（白い箱・題名は淡い緑の丸い帯） ---- */
.t-midori [data-block="cards"] .b-card { border-color: var(--c-line); border-radius: 0; padding: 1.2rem 1.2rem .8rem; background: #fff; }
.t-midori [data-block="cards"] .b-card h3 { position: relative; margin: 0 0 .8rem; padding: .35em .9em .35em 2.1em; background: var(--c-pill); border-radius: 999px;
  color: var(--c-text); font-weight: 500; font-size: 1.02rem; }
.t-midori [data-block="cards"] .b-card h3::before { content: ""; position: absolute; left: .8em; top: 50%; translate: 0 -50%; width: .8em; height: .8em; border-radius: 50%; background: #fff; }
.t-midori [data-block="cards"] .b-card p { margin: 0 0 .5rem; color: #555; }
.t-midori.has-hero [data-block="cards"] { background: var(--c-soft); box-shadow: 0 0 0 100vmax var(--c-soft); clip-path: inset(-2rem -100vmax); padding-block: 1rem; }

/* ---- ファイル一覧・表 ---- */
.t-midori [data-block="files"] a { color: var(--c-link); }
.t-midori [data-block="table"] th { background: var(--c-soft); }

/* ---- フッター（濃い灰色。バナー・住所。コピーライトは更に濃い帯） ---- */
.site-footer { background: var(--c-footer-bg); color: #fff; font-size: .85rem; }
.footer-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; padding-block: 2.8rem 2rem; }
.site-info p { margin: 0 0 .3em; }
.site-info a { color: #fff; }
.site-info .f-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
.site-info .f-banners { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.site-info .f-banners img { display: block; width: 100%; height: auto; }
.site-info .f-addr { text-align: right; }
.site-info .f-addr img { display: inline-block; width: min(100%, 280px); height: auto; margin-bottom: .6em; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .3em 1.5em; }
.footer-nav a { color: #8fd19e; text-decoration: none; }
.footer-nav a::before { content: "・"; }
.copy { margin: 0; padding: 2.2rem 1rem; text-align: center; font-size: .85rem; color: #fff; background: color-mix(in srgb, var(--c-footer-bg) 85%, #000); }

/* ---- メインビジュアル（トップ。写真の上に大きな白い文字） ---- */
.t-midori [data-block="hero"] .b-hero-title { font-weight: 500; letter-spacing: .05em; text-shadow: 0 2px 10px rgba(0,0,0,.55); }
.t-midori [data-block="hero"][data-text="center"] .b-hero-text { width: min(100%, 60em); }
.t-midori [data-block="hero"] .b-hero-title { word-break: normal; text-wrap: pretty; }

/* ---- スマホ ---- */
@media (max-width: 900px) {
  .with-side, .with-side.side-left { grid-template-columns: 1fr; gap: 2rem; }
  .with-side.side-left .side-nav { order: 0; }
  .site-info .f-cols { grid-template-columns: 1fr; }
  .site-info .f-addr { text-align: left; }
  .footer-nav ul { justify-content: flex-start; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .header-in { min-height: 64px; gap: 1rem; }
  .brand img { max-height: 40px; }
  .nav-btn { display: flex; flex-direction: column; justify-content: center; gap: 5px; margin-left: auto; width: 48px; height: 44px; cursor: pointer; align-items: center; }
  .nav-btn span { display: block; width: 24px; height: 2px; background: var(--c-text); transition: transform .2s, opacity .2s; }
  .nav-btn b { font-size: .6rem; font-weight: 400; line-height: 1; margin-top: 2px; }
  .nav-toggle { display: block; position: absolute; opacity: 0; width: 1px; height: 1px; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--c-line); box-shadow: 0 10px 20px rgba(0,0,0,.08); }
  .nav-toggle:checked ~ .main-nav { display: block; }
  .nav-toggle:checked + .nav-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked + .nav-btn span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked + .nav-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-toggle:focus-visible + .nav-btn { outline: 2px solid var(--c-primary); }
  .util-nav { order: 0; margin-left: auto; }
  .nav-btn { margin-left: .4rem; }
  .main-nav > ul { flex-direction: column; gap: 0; padding: .5rem 20px 1rem; }
  .main-nav > ul > li > a { padding: .85em .3em; border-bottom: 1px solid var(--c-line); }
  .main-nav > ul > .is-active > a { color: var(--c-primary); }
  .t-midori [data-block="news"] li { flex-direction: column; gap: .3em; }
  .t-midori .cms-content h2 { max-width: none; }
}

/* ドロップダウン・メガメニュー（白い面に影） */
.main-nav .sub, .main-nav .mega { background: #fff; border: 1px solid var(--c-line); box-shadow: 0 12px 28px rgba(15,23,42,.12); }
.main-nav .sub a, .main-nav .mega a { color: #444; font-size: .88rem; padding: .55em 1.1em; }
.main-nav .sub a:hover, .main-nav .mega a:hover { background: var(--c-soft); color: var(--c-primary); }
.main-nav .sub .is-current > a, .main-nav .mega .is-current > a { color: var(--c-primary); font-weight: 700; }
.t-midori { --mega-gap: 14px; }

/* ---- サイドの部品（メニューの上・下。左枠・右枠はメニューなし）
   スマホでは、上の部品 → 本文 → メニュー → 下の部品 の順に並べる ---- */
.side-area:not(:empty) + .side-menu, .side-menu + .side-area:not(:empty), .side-top:not(:empty) + .side-bottom:not(:empty) { margin-top: 14px; }
@media (max-width: 900px) {
  .with-side > .side-nav { display: contents; }
  .with-side > .side-nav > .side-top { order: -1; }
  .with-side > .side-nav > .side-menu { order: 1; }
  .with-side > .side-nav > .side-bottom { order: 2; }
}
