/* =========================================================
   桜台自治会ページ  style.css （実テンプレCSSの実値に準拠）
   配色・タイポ・2カラム比率を Jimdo 実サイトに合わせて再構築。
   ロゴは実サイト同様、右カラム上部（メニューの上）に配置。
   ※ 見出しフォント Midashi Go/Min はモリサワTypeSquareの
     ライセンスwebフォントのため、持ち出し可能なシステム明朝/
     ゴシックに置換しています。
   ========================================================= */

:root {
  /* --- 実サイトの配色 --- */
  --green:      #367714;   /* 見出し・リンク */
  --green-dark: #264f0e;   /* 現在地・ホバー背景 */
  --green-pale: #d9ebd2;   /* メニュー項目の地色 */
  --ink:        #131313;   /* 本文 */
  --ink-soft:   #555555;   /* 補足 */
  --line:       #d4e2cb;   /* 罫線（淡緑寄り） */
  --page-bg:    #eef1ea;   /* ページ背景 */
  --panel:      #ffffff;   /* コンテンツ面 */

  /* --- フォント（持ち出し可能なシステムフォントに置換） --- */
  --mincho: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Hiragino Mincho Pro", "MS PMincho", serif;
  --gothic: "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Meiryo", sans-serif;
  --nav-font: "Roboto", "Helvetica Neue", Arial, var(--gothic);

  /* --- レイアウト（実テンプレ準拠：全体1060 / 本文74% / メニュー26%） --- */
  --max:     1060px;
  --nav-col: 260px;
}

* { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--mincho);
  line-height: 1.85;
}

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

a { color: var(--green); text-decoration: none; transition: color 150ms ease-in; }
a:hover, a:focus, a:active { color: var(--green-dark); }

/* ---------- モバイル用トップバー（PCでは非表示） ---------- */
.mobile-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: var(--panel);
  border-bottom: 3px solid var(--green);
  padding: 12px 18px;
}
.mobile-logo img { max-height: 46px; width: auto; }

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 42px; height: 38px;
  padding: 8px 7px;
  background: var(--green);
  border: none; border-radius: 3px;
  cursor: pointer;
}
.nav-toggle span {
  display: block; height: 3px; width: 100%;
  background: #fff; border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1){ transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3){ transform: translateY(-8px) rotate(-45deg); }

/* ---------- レイアウト：本文＝左 / 右カラム（ロゴ＋メニュー）＝右 ---------- */
.layout {
  max-width: var(--max);
  margin: 0 auto;
  padding: 26px 20px 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--nav-col);
  gap: 28px;
  align-items: start;
}
.content { grid-column: 1; grid-row: 1; }
.sidebar { grid-column: 2; grid-row: 1; }

/* ---------- 右カラム：ロゴ ---------- */
.sidebar .logo {
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 3px solid var(--green);
  border-radius: 3px;
  padding: 20px 14px;
  text-align: center;
  margin-bottom: 16px;
}
.sidebar .logo img { max-width: 100%; height: auto; margin: 0 auto; }

/* ---------- ナビゲーション（右カラム） ---------- */
.site-nav {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 3px solid var(--green);
  border-radius: 3px;
  font-family: var(--nav-font);
  font-size: .9rem;
  overflow: hidden;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav > ul > li { position: relative; border-bottom: 1px solid var(--line); }
.site-nav > ul > li:last-child { border-bottom: none; }
.site-nav a {
  display: block;
  padding: 11px 14px;
  color: var(--ink);
  background: var(--green-pale);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.5;
}
.site-nav a:hover,
.site-nav a:focus,
.site-nav a.current {
  color: #fff;
  background: var(--green-dark);
}

/* サブメニュー */
.site-nav .has-sub > .sub-toggle {
  position: absolute;
  top: 7px; right: 7px;
  width: 28px; height: 28px;
  border: none; background: transparent;
  color: var(--green-dark);
  font-size: 1.1rem; line-height: 1;
  cursor: pointer;
}
.site-nav .has-sub > ul {
  display: none;
  border-top: 1px solid var(--line);
}
.site-nav .has-sub.open > ul { display: block; }
.site-nav .has-sub > ul a {
  padding: 9px 14px 9px 26px;
  font-size: .82rem;
  background: #eef5ea;
  color: var(--ink);
}
.site-nav .has-sub > ul a:hover,
.site-nav .has-sub > ul a:focus {
  color: #fff;
  background: var(--green-dark);
}
.site-nav .has-sub.open > .sub-toggle { transform: rotate(45deg); }

/* ---------- 本文 ---------- */
.content {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 30px;
}

.content h1 {
  font-family: var(--gothic);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--green);
  text-align: center;
  line-height: 1.4;
  border-bottom: 2px solid var(--green);
  padding-bottom: 12px;
  margin: 1.2em 0 .9em;
}
.content h2 {
  font-family: var(--mincho);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--green);
  background: var(--green-pale);
  border-left: 5px solid var(--green);
  padding: 9px 14px;
  line-height: 1.6;
  margin: 2em 0 .9em;
}
.content h3 {
  font-family: var(--mincho);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--green);
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  margin: 2em 0 .6em;
}
.content p { margin: 0 0 1.1em; }

/* ヒーロー画像 */
.hero { margin: 0 0 1.6em; text-align: center; }
.hero img { margin: 0 auto; border: 1px solid var(--line); }
.hero figcaption,
.credit,
.gallery-note {
  font-size: .85rem;
  color: var(--ink-soft);
}
.hero figcaption { text-align: center; margin-top: .5em; }
.gallery-note { color: var(--green); font-weight: 700; margin: .4em 0; }
.credit { text-align: right; margin: .3em 0 1em; }

/* 会長挨拶ヘッド */
.greeting-head {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 0 1.5em;
}
.tagline-img { flex: 0 0 auto; max-height: 150px; width: auto; }
.tagline { font-size: 1.2rem; font-family: var(--mincho); margin: 0; line-height: 1.7; }
.tagline strong { color: var(--green); }

.signature { text-align: right; margin-top: 1.8em; font-family: var(--mincho); }

/* 写真ギャラリー */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin: 0 0 1em;
}
.gallery img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 2px;
}
.zoomable { cursor: zoom-in; transition: opacity .2s; }
.zoomable:hover { opacity: .85; }

/* 地図 */
.map {
  position: relative;
  width: 100%;
  padding-top: 56%;
  border: 1px solid var(--line);
}
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- フッター ---------- */
.site-footer {
  background: var(--green-pale);
  border-top: 3px solid var(--green);
  padding: 24px 20px;
  text-align: center;
  font-size: .85rem;
  color: var(--ink-soft);
}
.footer-links a { color: var(--green); margin: 0 4px; }
.footer-links a:hover { color: var(--green-dark); text-decoration: underline; }
.copyright { margin: .6em 0 0; }

/* ---------- ライトボックス ---------- */
.lightbox {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 95%; max-height: 90vh;
  width: auto; height: auto;
  box-shadow: 0 0 30px rgba(0,0,0,.5);
}
.lightbox-close {
  position: absolute; top: 16px; right: 24px;
  background: none; border: none;
  color: #fff; font-size: 2.4rem; line-height: 1;
  cursor: pointer;
}

/* ---------- レスポンシブ（960px未満で1カラム＋ハンバーガー） ---------- */
@media (max-width: 959px) {
  .mobile-bar { display: flex; }
  .layout { grid-template-columns: 1fr; gap: 18px; }
  .content { grid-column: 1; grid-row: 2; }
  .sidebar { grid-column: 1; grid-row: 1; }
  .sidebar .logo { display: none; }   /* モバイルバーにロゴがあるため重複回避 */
  .site-nav { display: none; }
  .site-nav.open { display: block; }
  .content { padding: 22px 18px 28px; }
  .greeting-head { flex-direction: column; text-align: center; }
}

/* アクセシビリティ */
:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
