/* 文園町会 新デザイン用CSS
   ※ 新しいページ（index / bondance / hikawasairei）は、このCSSだけを使います。
      古い style.css / table.css は、古い年つきページを消したあとは不要です。 */

:root {
  --green: #00552e;       /* 深緑：町会のイメージカラー */
  --green-deep: #003a20;
  --yamabuki: #f2b705;  /* 山吹：進む会の黄色いタスキ */
  --paper: #f1f6f2;
  --ink: #1b2620;
  --muted: #52625a;
  --line: #d0ddd4;
}

* { box-sizing: border-box; }

html {
  scroll-padding-top: 76px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font: 400 17px/1.9 "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  color: var(--ink);
  background: #fff;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--green); }

a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

.wrap { max-width: 1040px; margin: 0 auto; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1040px;
  margin: 0 auto;
  padding: 8px 16px;
}

.brand img { height: 36px; width: auto; }

.nav-toggle {
  display: none;
  min-height: 44px;
  padding: 6px 16px;
  font: inherit;
  font-size: 15px;
  color: var(--green);
  background: none;
  border: 2px solid var(--green);
  border-radius: 4px;
  cursor: pointer;
}

.js .nav-toggle { display: block; }

.site-nav ul { margin: 0; padding: 0; list-style: none; }

.site-nav a {
  display: block;
  padding: 14px 16px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.js .site-nav {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.js .site-nav.open { display: block; }

@media (min-width: 860px) {
  .js .nav-toggle { display: none; }
  .js .site-nav,
  .site-nav {
    display: block;
    position: static;
    border: 0;
  }
  .site-nav ul { display: flex; gap: 2px; }
  .site-nav a { padding: 8px 12px; font-size: 15px; border: 0; border-radius: 4px; }
  .site-nav a:hover { background: var(--paper); }
}

/* ---------- トップ画像 ---------- */
.hero {
  position: relative;
  background: var(--green-deep);
  color: #fff;
}

.hero img {
  width: 100%;
  height: clamp(220px, 40vw, 400px);
  object-fit: cover;
  opacity: .8;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 58, 32, 0) 45%, rgba(0, 58, 32, .88));
}

.hero-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.hero-text .wrap { padding: 0 16px 24px; }

.hero h1 {
  margin: 0;
  font-family: "Yuji Syuku", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "MS PMincho", serif;
  font-size: clamp(34px, 7vw, 56px);
  font-weight: 400;
  letter-spacing: .1em;
  line-height: 1.3;
}

/* トップページの「文園町会」だけ、特設ページの見出しより大きくする */
.hero h1.site-title { font-size: clamp(46px, 12vw, 88px); letter-spacing: .12em; }

.hero p { margin: 4px 0 0; font-size: 16px; }

/* ---------- 次の行事 ---------- */
.next-event { background: var(--green); color: #fff; }

.next-event .wrap { padding: 28px 16px 32px; }

.next-row { display: grid; gap: 14px; justify-items: start; }

.next-label {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--yamabuki);
}

.next-date { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; line-height: 1.2; }
.next-date .md { font-size: clamp(42px, 11vw, 68px); font-weight: 800; }
.next-date .wd { font-size: clamp(20px, 5vw, 28px); font-weight: 700; }
.next-date .until { font-size: clamp(18px, 4.5vw, 24px); font-weight: 700; }
.next-date .yr { font-size: 16px; }

.next-title { margin: 0; font-size: clamp(22px, 4.5vw, 30px); font-weight: 700; line-height: 1.4; }
.next-meta { margin: 0; font-size: 16px; color: #d9eadf; }
.next-notes {
  max-width: 44em;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .3);
}

.next-notes .gap { height: 1.6em; margin: 0; }
.next-notes p { margin: 0 0 .25em; font-size: 16px; line-height: 1.8; color: #e9f3ec; }

.next-empty { margin: 0; font-size: 20px; font-weight: 700; }

.next-event a:focus-visible { outline-color: var(--yamabuki); }

.btn {
  display: inline-block;
  min-height: 48px;
  padding: 11px 26px;
  font: inherit;
  font-weight: 700;
  line-height: 1.6;
  color: var(--green-deep);
  text-decoration: none;
  background: var(--yamabuki);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.btn:hover { filter: brightness(.95); }

@media (min-width: 860px) {
  .next-row {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 40px;
  }
  .next-body { display: grid; gap: 4px; }
}

/* ---------- セクション共通 ---------- */
.section { padding: 56px 16px; }
.section.tint { background: var(--paper); }

.section h2 {
  margin: 0 0 24px;
  padding-left: 14px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--green-deep);
  border-left: 8px solid var(--yamabuki);
}

.section h3 { margin: 32px 0 8px; font-size: 19px; color: var(--green-deep); }

.prose { max-width: none; } /* 文章は、画面の幅いっぱいまで使う（途中で折り返さない） */
.prose p { margin: 0 0 1em; }

/* 「wrap prose」の項目も、他の項目と同じ幅（1040px）の中央の列に置く */
.wrap.prose { max-width: 1040px; }

/* ---------- お知らせ・行事予定の一覧 ---------- */
.list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }

.list li {
  display: grid;
  gap: 2px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.list .when { font-size: 15px; font-weight: 700; color: var(--green); }
.list .what { margin: 0; }
.list .meta { display: block; font-size: 15px; color: var(--muted); }
.list .ev-title { font-weight: 700; }
.list .memo { color: var(--ink); }
.list .gap { height: 1.5em; }

@media (min-width: 700px) {
  .list li { grid-template-columns: 13em 1fr; gap: 20px; }
}

.more { margin-top: 20px; }

.more summary {
  display: inline-block;
  min-height: 44px;
  padding: 8px 4px;
  font-weight: 700;
  color: var(--green);
  cursor: pointer;
}

.more .list { margin-top: 8px; }
.empty { margin: 0; padding: 16px 0; color: var(--muted); }

/* ---------- 町会について ---------- */
.about-grid { display: grid; gap: 8px 48px; }

.plain-list { margin: 0; padding-left: 1.3em; }
.plain-list li { margin-bottom: 4px; }

@media (min-width: 860px) {
  .about-grid { grid-template-columns: 1.3fr 1fr; align-items: start; }
  .about-grid h3:first-child { margin-top: 0; }
}

/* ---------- 活動のようす ---------- */
.photo-grid {
  display: grid;
  gap: 28px 20px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.photo-grid figure { margin: 0; }
.photo-grid img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.photo-grid strong { display: block; margin-top: 10px; color: var(--green-deep); }
.photo-grid figcaption { font-size: 16px; line-height: 1.8; }

/* ---------- 特設ページ ---------- */
.festival-list {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.festival img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--line); }
.festival h3 { margin: 14px 0 6px; font-size: 21px; }
.festival h3 a { color: var(--green-deep); }
.festival p { margin: 0 0 12px; }

/* ---------- 問い合わせ ---------- */
.contact-mail { margin: 8px 0 0; font-size: clamp(20px, 5vw, 28px); font-weight: 700; word-break: break-all; }
.contact-mail a { color: var(--green-deep); }

/* ---------- フッター ---------- */
.site-footer {
  padding: 36px 16px;
  font-size: 15px;
  color: #fff;
  background: var(--green-deep);
}

.site-footer a { color: #fff; }
.site-footer a:focus-visible { outline-color: var(--yamabuki); }
.site-footer p { margin: 0 0 8px; }
.site-footer .sns a { margin-right: 20px; }

/* ---------- 特設ページ共通（盆踊り・例大祭など） ---------- */
.hero .sub { margin: 6px 0 0; font-size: clamp(16px, 3.6vw, 22px); }

.info { margin: 0; border-top: 1px solid var(--line); }
.info > div { display: grid; gap: 2px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.info dt { font-weight: 700; color: var(--green); }
.info dd { margin: 0; }

@media (min-width: 700px) {
  .info > div { grid-template-columns: 8em 1fr; gap: 20px; }
}

.callout {
  margin: 24px 0 0;
  padding: 16px 20px;
  background: var(--paper);
  border-left: 6px solid var(--yamabuki);
}

.section.tint .callout { background: #fff; }
.callout p { margin: 0 0 .6em; }
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--green-deep); }

.note { margin: 16px 0 0; font-size: 15px; color: var(--muted); }

.poster-row {
  display: grid;
  gap: 24px;
  margin-top: 32px;
  grid-template-columns: 1fr;
}

/* パソコンなど広い画面では、2列に分けて表示する（画像1枚なら、横幅の半分の大きさ） */
@media (min-width: 700px) {
  .poster-row { grid-template-columns: repeat(2, 1fr); }
}

.poster-row img { width: 100%; height: auto; }

.price-list { max-width: 26em; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }

.price-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.price-list .yen { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

.gallery {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  grid-template-columns: repeat(2, 1fr);
}

.gallery li { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--line); }
.gallery .full { grid-column: 1 / -1; }
.gallery .full img { aspect-ratio: 16 / 7; }

@media (min-width: 700px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
}

.map { position: relative; aspect-ratio: 4 / 3; background: var(--line); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.access-grid { display: grid; gap: 28px; }

@media (min-width: 860px) {
  .access-grid { grid-template-columns: 1fr 1.4fr; align-items: start; }
}

/* ---------- 例大祭ページ用 ---------- */
.lead { margin: 0 0 .6em; font-size: clamp(18px, 4.2vw, 22px); font-weight: 700; line-height: 1.8; color: var(--green-deep); }

.callout.alert { border-left-color: #b3261e; }
.callout.alert strong, .alert-text { color: #b3261e; font-weight: 700; }
.callout ul { margin: .4em 0 0; padding-left: 1.3em; }
.callout li { margin-bottom: .3em; }

.sign { margin-top: 1.5em; }
.btn-row { margin: 24px 0; }

.figure-grid {
  display: grid;
  gap: 24px 20px;
  margin-top: 24px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.figure-grid figure { margin: 0; }
.figure-grid img { width: 100%; height: auto; border: 1px solid var(--line); }
.figure-grid figcaption { margin-top: 6px; font-size: 15px; }

.day-title { margin: 32px 0 8px; font-size: 20px; color: var(--green-deep); }
.day-title:first-of-type { margin-top: 0; }

/* 貸し半纏の受付期間の切り替え：<body class="apply-closed"> のとき申込関連を隠す */
.apply-closed .apply-only { display: none; }
body:not(.apply-closed) .closed-only { display: none; }
