/* ===============================
   トップページをプロっぽく整える（Cocoon）
   追加CSS用・整理版
================================ */

/* -------------------------------
   共通
-------------------------------- */
.site-name{
  font-size:22px;
  font-weight:700;
  letter-spacing:1px;
}

#header-container{
  position:sticky;
  top:0;
  z-index:9999;
}

/* 固定ページの日付を非表示 */
.page .post-date{
  display:none !important;
}

/* ===============================
   トップ（ホーム）
================================ */
.home{
  background-color:#f8f9fb;
}

/* トップページタイトルを非表示 */
.home .entry-title{
  display:none;
}

/* トップページではヘッダーメニューを非表示 */
.home #navi{
  display:none;
}

/* ヒーローを横いっぱいに */
.home .wp-block-cover{
  max-width:100%;
  margin-left:0;
  margin-right:0;
}

/* 画像の見せ方 */
.home .wp-block-cover .wp-block-cover__image-background,
.home .wp-block-cover img.wp-block-cover__image-background{
  object-fit:cover;
  object-position:60% center;
}

/* 文字中央 */
.home .wp-block-cover .wp-block-cover__inner-container{
  text-align:center;
}

/* ヒーロー内文字色 */
.home .wp-block-cover .wp-block-cover__inner-container h1,
.home .wp-block-cover .wp-block-cover__inner-container h2,
.home .wp-block-cover .wp-block-cover__inner-container p{
  color:#fff;
}

/* 1行目 */
.home .wp-block-cover .wp-block-cover__inner-container p:first-child{
  font-size:clamp(28px, 3.6vw, 54px);
  font-weight:700;
  line-height:1.25;
  letter-spacing:0.02em;
  margin-bottom:10px;
}

/* 2行目 */
.home .wp-block-cover .wp-block-cover__inner-container p:last-child{
  font-size:clamp(14px, 1.4vw, 20px);
  font-weight:500;
  line-height:1.6;
  letter-spacing:0.03em;
  margin-top:0;
}

/* トップの上部余白＆横幅 */
.home .content-in{
  padding-top:0;
  max-width:1100px;
}

/* ブロック間余白 */
.home .entry-content > *{
  margin-top:24px;
  margin-bottom:24px;
}

/* セクションをカード風 */
.home .entry-content .wp-block-group{
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:14px;
  padding:22px;
  box-shadow:0 6px 18px rgba(0,0,0,.05);
}

/* 見出し */
.home .entry-content h2{
  background:#f3f3f3;
  padding:18px 22px;
  border-radius:10px;
  font-weight:800;
  margin-bottom:16px;
}

/* PC */
@media (min-width:1024px){
  .home .wp-block-cover{
    min-height:520px;
  }
}

/* スマホ */
@media (max-width:768px){
  .home .wp-block-cover{
    min-height:62vh;
  }

  .home .wp-block-cover .wp-block-cover__inner-container p:first-child{
    white-space:nowrap;
    font-size:28px;
    letter-spacing:0.02em;
  }
}

/* ===============================
   トップ導線
================================ */
.z1-navgrid{
  display:grid;
  gap:16px;
  margin:18px 0 10px;
  grid-template-columns:repeat(6, 1fr);
}

.z1-btn{
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-decoration:none !important;
  border-radius:18px;
  padding:18px 10px;
  min-height:86px;
  font-weight:700;
  letter-spacing:.02em;
  transition:.15s ease;
  box-shadow:0 6px 0 rgba(0,0,0,.18);
}

.z1-btn:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 0 rgba(0,0,0,.18);
}

.z1-btn:active{
  transform:translateY(4px);
  box-shadow:0 2px 0 rgba(0,0,0,.18);
}

.z1-main{
  font-size:22px;
  line-height:1.15;
  color:#333;
  word-break:keep-all;
  overflow-wrap:normal;
  text-align:center;
}

.z1-sub{
  margin-top:8px;
  font-size:14px;
  font-weight:600;
  color:#fff;
  text-align:center;
}

.z1-gray{ background:#f2f2f2; }
.z1-local{ background:#8fb785; }
.z1-local .z1-main{ color:#fff; }
.z1-disaster{ background:#f4d7a5; }
.z1-join{ background:#2e7d32; }
.z1-join .z1-main{ color:#fff; }

@media (max-width:1200px){
  .z1-navgrid{ grid-template-columns:repeat(4, 1fr); }
}

@media (max-width:900px){
  .z1-navgrid{ grid-template-columns:repeat(3, 1fr); }
}

@media (max-width:768px){
  .z1-navgrid{ grid-template-columns:repeat(2, 1fr); }
  .z1-main{ font-size:20px; }
  .z1-btn{ min-height:84px; padding:18px 10px; }
  .z1-sub{ font-size:13px; }
}

@media (max-width:420px){
  .z1-main{ font-size:18px; }
  .z1-btn{ min-height:78px; padding:16px 8px; }
}

/* ===============================
   メリットカード
================================ */
.merit-item{
  margin:18px 0;
  padding:16px 18px;
  border:1px solid #e5e5e5;
  border-radius:10px;
  background:#fff;
  transition:.2s ease;
}

.merit-item:hover{
  transform:translateY(-4px);
  box-shadow:0 10px 25px rgba(0,0,0,.08);
}

.merit-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:18px;
}

@media (max-width:768px){
  .merit-grid{ grid-template-columns:1fr; }
}

/* ===============================
   会長写真＋署名
================================ */
.wp-block-columns.chair-sign{
  display:flex;
  align-items:flex-end;
  justify-content:flex-end;
  gap:16px;
  flex-wrap:nowrap;
}

.wp-block-columns.chair-sign > .wp-block-column:first-child{
  flex:0 0 auto;
}

.wp-block-columns.chair-sign > .wp-block-column:last-child{
  flex:1 1 auto;
  min-width:0;
}

.wp-block-columns.chair-sign figure{
  margin:0 !important;
}

.wp-block-columns.chair-sign figure.wp-block-image{
  width:150px;
  max-width:150px;
}

.wp-block-columns.chair-sign figure.wp-block-image img{
  width:100%;
  height:auto;
  display:block;
}

@media (max-width:768px){
  .wp-block-columns.chair-sign{
    justify-content:center;
    align-items:center;
    gap:12px;
  }

  .wp-block-columns.chair-sign figure.wp-block-image{
    width:100px;
    max-width:100px;
  }

  .wp-block-columns.chair-sign p{
    font-size:15px;
    line-height:1.6;
  }
}

/* ===============================
   スマホヘッダー固定
================================ */
@media (max-width:480px){
  #header-container{
    position:-webkit-sticky !important;
    position:sticky !important;
    top:0 !important;
    z-index:9999 !important;
    box-shadow:0 6px 18px rgba(0,0,0,.10);
    -webkit-transform:translateZ(0);
  }

  .content-in{
    padding-top:72px !important;
  }
}

/* ===============================
   活動内容：各部カード
================================ */
.town-card{
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:14px;
  padding:16px;
  box-shadow:0 6px 18px rgba(0,0,0,.06);
  box-sizing:border-box;
  min-height:220px;
}

.town-card h3{
  margin:0 0 14px;
  padding:14px 12px;
  border-radius:10px;
  background:#f2f3f4;
  text-align:center;
  font-weight:700;
  font-size:24px;
  line-height:1.3;
  letter-spacing:.03em;
  word-break:keep-all;
  overflow-wrap:normal;
}

.town-card p{
  margin:0 0 10px;
  font-size:15.5px;
  line-height:1.85;
  color:rgba(0,0,0,.78);
  overflow-wrap:anywhere;
}

.town-card p + p{
  margin-top:10px;
}

.town-card p:last-child{
  margin-bottom:0;
}

@media (max-width:1024px){
  .town-card{
    min-height:0;
  }
}

@media (max-width:768px){
  .town-card{
    padding:14px;
    border-radius:12px;
  }

  .town-card h3{
    font-size:20px;
    padding:12px 10px;
  }

  .town-card p{
    font-size:15px;
    line-height:1.8;
  }
}

/* ===============================
   年間行事アコーディオン
================================ */
details{
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:12px;
  padding:14px 18px;
  margin:14px 0;
  box-shadow:0 6px 18px rgba(0,0,0,.05);
}

summary{
  cursor:pointer;
  font-size:22px;
  font-weight:700;
  list-style:none;
}

summary::-webkit-details-marker{
  display:none;
}

summary::before{
  content:"";
  display:inline-block;
  width:6px;
  height:22px;
  margin-right:10px;
  background:#7d8f7a;
  border-radius:3px;
}

/* 折りたたみをボタン化 */
.z1-fold details{
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:16px;
  padding:18px 18px 6px;
  box-shadow:0 6px 18px rgba(0,0,0,.05);
}

.z1-fold summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  justify-content:center;
  align-items:center;
  background:#333;
  color:#fff;
  border-radius:14px;
  padding:18px 22px;
  font-size:20px;
  font-weight:700;
  margin:18px auto 14px;
  max-width:720px;
}

.z1-fold summary::-webkit-details-marker{
  display:none;
}

.z1-fold details[open] summary{
  background:#222;
}

.z1-fold details:not([open]) > *:not(summary){
  display:none !important;
}

.z1-fold details > *:not(summary){
  max-width:900px;
  margin:0 auto 14px;
  font-size:16px;
  line-height:1.9;
  color:rgba(0,0,0,.78);
}

@media (max-width:768px){
  .z1-fold summary{
    font-size:18px;
    padding:16px 18px;
    border-radius:12px;
  }
}

/* ===============================
   行事写真ボタン
================================ */
.photo-button a{
  background:#7fa17a;
  color:#ffffff !important;
  padding:16px 32px;
  border-radius:40px;
  font-size:18px;
  font-weight:600;
  text-decoration:none;
  display:inline-block;
  transition:0.3s;
  box-shadow:0 6px 18px rgba(0,0,0,0.08);
}

.photo-button a:hover{
  background:#6d8f68;
  transform:translateY(-2px);
}

/* ===============================
   行事写真（年度カテゴリ y****）専用
================================ */
body.category[class*="category-y"] .sidebar{
  display:none;
}

body.category[class*="category-y"] .content{
  width:100%;
}

body.category[class*="category-y"] .content-in{
  max-width:900px;
  margin:0 auto;
}

body.category[class*="category-y"] .ep-archive-header{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:28px;
}

body.category[class*="category-y"] .archive-title{
  font-size:28px;
  font-weight:700;
  margin:0;
}

.ep-archive-actions{
  display:flex;
  gap:10px;
}

.ep-back-link{
  display:inline-block;
  padding:10px 18px;
  border-radius:999px;
  background:#4b7d4f;
  color:#fff;
  text-decoration:none;
  font-size:14px;
  transition:.2s;
  line-height:1;
}

.ep-back-link:hover{
  background:#3e6942;
  color:#fff;
}

.ep-empty{
  padding:40px 20px;
  background:#fff;
  border-radius:12px;
  text-align:center;
  border:1px solid #eee;
}

.ep-empty h1{
  font-size:24px;
  margin:0 0 12px;
}

.ep-empty p{
  margin:0 0 16px;
  color:#666;
}

body.category[class*="category-y"] .navigation.pagination{
  margin-top:28px;
  text-align:center;
}

@media (max-width:768px){
  body.category[class*="category-y"] .ep-archive-header{
    flex-direction:column;
    align-items:flex-start;
  }

  body.category[class*="category-y"] .archive-title{
    font-size:22px;
  }

  .ep-empty{
    padding:28px 16px;
  }
}

@media (max-width:560px){
  body.category[class*="category-y"] .archive-title{
    font-size:22px;
  }

  body.category[class*="category-y"] .ep-empty{
    padding:28px 16px;
  }
}

/* 固定ページ「行事写真」タイトルを非表示 */
.page-id-37 .entry-title{
  display:none;
}

/* 年度ページヘッダー */
.ep-year-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:30px;
}

.ep-year-title{
  font-size:36px;
  margin:0;
}

.ep-back-btn{
  background:#4b7d4f;
  color:#fff;
  padding:12px 20px;
  border-radius:999px;
  text-decoration:none;
  font-weight:700;
  transition:.2s;
}

.ep-back-btn:hover{
  background:#3e6942;
}

/* カード共通（行事写真・お知らせ一覧） */
.ep-cards{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:20px;
  margin-top:20px;
}

.ep-card{
  margin:0;
  background:#fff;
  border-radius:20px;
  overflow:hidden;
  box-shadow:0 6px 20px rgba(0,0,0,0.08);
  transition:.2s;
}

.ep-card:hover{
  transform:translateY(-4px);
}

.ep-card-link{
  display:block;
  background:#ffffff;
  border-radius:14px;
  overflow:hidden;
  text-decoration:none;
  color:#333;
  border:1px solid #eee;
  box-shadow:0 2px 8px rgba(0,0,0,0.05);
  transition:all .15s ease;
}

.ep-card-link:hover{
  transform:translateY(-3px);
  box-shadow:0 8px 20px rgba(0,0,0,0.12);
}

.ep-thumb{
  background:#f3f3f3;
}

.ep-thumb img{
  width:100%;
  height:180px;
  object-fit:cover;
  display:block;
}

.ep-thumb-img{
  width:100%;
  height:170px;
  object-fit:cover;
  display:block;
}

.ep-thumb-placeholder{
  height:180px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f2f2f2;
  font-weight:700;
  font-size:12px;
  color:#777;
}

.ep-title{
  margin:0;
  padding:14px 16px 16px;
  font-size:18px;
  font-weight:700;
  color:#333;
  line-height:1.35;
}

.ep-card h2{
  padding:18px;
  font-size:22px;
}

.ep-card-title{
  font-size:15px;
  font-weight:800;
  padding:12px;
  margin:0;
  line-height:1.5;
}

@media (max-width:1000px){
  .ep-cards{
    grid-template-columns:repeat(2,1fr);
  }
}

@media (max-width:600px){
  .ep-cards{
    grid-template-columns:1fr;
  }
}

/* ===============================
   お知らせ一覧（年度 + mode=news）
================================ */
body.category .content-in.news-mode-1col .sidebar,
body.category .content-in.news-mode-1col .sidebar-in,
body.news-mode-1col .sidebar,
body.news-mode-1col .sidebar-in{
  display:none !important;
}

body.category .content-in.news-mode-1col .content,
body.news-mode-1col .content{
  width:100% !important;
  max-width:1100px;
  margin:0 auto;
}

body.category .content-in.news-mode-1col .main,
body.category .content-in.news-mode-1col .content-in{
  display:block !important;
}

.notice-card{
  margin-bottom:30px;
  padding-bottom:20px;
  border-bottom:1px solid #eee;
}

.notice-thumb img{
  width:100%;
  max-width:400px;
  border-radius:10px;
}

.notice-title{
  font-size:20px;
  margin-top:10px;
}

.notice-title a{
  text-decoration:none;
}

/* ===============================
   防災ページ UI
================================ */
.section-title{
  font-size:28px;
  font-weight:700;
  margin:30px 0 15px;
}

.toshima-aed-acc-btn{
  font-size:26px;
  font-weight:700;
  padding:18px 22px;
  border-radius:12px;
  background:#f5f5f5;
  border:1px solid #ddd;
  transition:all 0.2s;
}

.toshima-aed-acc-btn:hover{
  background:#ececec;
}

.toshima-aed-acc-panel{
  font-size:18px;
  line-height:1.8;
}

.toshima-aed-list li{
  margin-bottom:12px;
}

.toshima-aed-map{
  border-radius:12px;
}

/* ===============================
   問い合わせカード
================================ */
.z1-contact-card{
  background:#fff3e0;
  padding:40px;
  border-radius:20px;
  text-align:center;
  border:3px solid #ff9800;
}

.z1-contact-btn{
  display:inline-block;
  background:#ff9800;
  color:#fff;
  padding:18px 42px;
  border-radius:14px;
  font-size:22px;
  font-weight:700;
  font-family:"Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  text-decoration:none;
  box-shadow:0 6px 16px rgba(0,0,0,0.2);
  transition:all .2s ease;
}

.z1-contact-btn:hover{
  background:#fb8c00;
  transform:translateY(-3px);
  box-shadow:0 10px 20px rgba(0,0,0,0.25);
}

.z1-contact-btn:active{
  transform:translateY(1px);
  box-shadow:0 3px 8px rgba(0,0,0,0.25);
}

.z1-contact-text{
  margin-top:25px;
  font-size:17px;
  color:#444;
  font-family:"Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
}

/* ===============================
   戻るボタン
================================ */
.z1-back{
  margin:30px 0;
  text-align:left;
}

.z1-back-link{
  display:inline-block;
  padding:12px 22px;
  font-size:16px;
  font-weight:700;
  color:#fff;
  background:#e53935;
  border-radius:8px;
  text-decoration:none;
  box-shadow:0 3px 8px rgba(0,0,0,0.15);
  transition:all .2s;
}

.z1-back-link:hover{
  background:#c62828;
  transform:translateY(-2px);
}

@media (max-width:768px){
  .z1-back-link{
    font-size:15px;
    padding:14px 20px;
  }
}

/* 検索に戻るボタン */
.ep-back-top,
.ep-back-link{
  display:inline-block;
  padding:14px 26px;
  border-radius:999px;
  background:#4b7d4f;
  color:#fff !important;
  text-decoration:none !important;
  font-weight:700;
  font-size:16px;
  transition:.2s;
}

.ep-back-top:hover,
.ep-back-link:hover{
  background:#3e6942;
  transform:translateY(-2px);
}

.ep-back-top:active,
.ep-back-link:active{
  transform:translateY(1px);
}

.ep-single-top-back{
  margin:10px 0 20px;
}

/* ===============================
   町会加入をヘッダーボタンに
================================ */
.navi-in > ul li:last-child a{
  background:#2e7d32;
  color:#fff !important;
  padding:8px 14px;
  border-radius:8px;
  font-weight:700;
  box-shadow:0 2px 6px rgba(0,0,0,0.15);
  transition:all .2s;
}

.navi-in > ul li:last-child a:hover{
  background:#1b5e20;
  transform:translateY(-1px);
}

/* ===============================
   タグ一覧
================================ */
.z1-notice-tag-wrap{
  margin:0 0 32px;
}

.z1-notice-tag-title{
  margin:0 0 14px;
  font-size:1.4rem;
  font-weight:700;
  line-height:1.4;
}

.z1-notice-tag-list{
  list-style:none;
  margin:0;
  padding:0;
  border-top:1px solid #e5e5e5;
}

.z1-notice-tag-item{
  border-bottom:1px solid #e5e5e5;
}

.z1-notice-tag-link{
  display:flex;
  gap:16px;
  align-items:flex-start;
  padding:14px 0;
  text-decoration:none;
}

.z1-notice-tag-date{
  flex:0 0 120px;
  color:#666;
  font-size:0.95rem;
  line-height:1.6;
}

.z1-notice-tag-text{
  flex:1;
  color:#222;
  line-height:1.7;
}

.z1-notice-tag-link:hover .z1-notice-tag-text{
  text-decoration:underline;
}

.z1-notice-tag-empty{
  margin:0;
  color:#666;
}

@media screen and (max-width:767px){
  .z1-notice-tag-link{
    flex-direction:column;
    gap:4px;
    padding:12px 0;
  }

  .z1-notice-tag-date{
    flex:none;
    font-size:0.88rem;
  }

  .z1-notice-tag-title{
    font-size:1.2rem;
  }
}

/* ===============================
   カテゴリカード（横スクロール）
================================ */
.z1-notice-card-scroll{
  overflow-x:auto;
  overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
  padding-bottom:10px;
}

.z1-notice-card-list{
  display:flex;
  flex-wrap:nowrap;
  gap:16px;
  padding:8px 0;
}

.z1-notice-card-item{
  flex:0 0 240px;
  width:240px;
  border-radius:16px;
  background:#fff;
  box-shadow:0 6px 18px rgba(0,0,0,0.08);
  overflow:hidden;
}

.z1-notice-card-thumb-wrap{
  aspect-ratio:16 / 9;
  position:relative;
}

.z1-notice-card-body{
  padding:12px 14px 16px;
}

.z1-notice-card-text{
  font-size:0.95rem;
  line-height:1.5;
}

.z1-notice-card-date{
  font-size:0.8rem;
}

@media screen and (max-width:767px){
  .z1-notice-card-item{
    flex:0 0 180px;
    width:180px;
  }

  .z1-notice-card-text{
    font-size:0.85rem;
  }
}

.z1-notice-card-important-badge{
  position:absolute;
  top:12px;
  left:12px;
  display:inline-block;
  background:#d93025;
  color:#fff;
  font-size:0.82rem;
  font-weight:700;
  line-height:1;
  padding:8px 12px;
  border-radius:999px;
  z-index:2;
  box-shadow:0 2px 8px rgba(0,0,0,0.18);
}

/* ===============================
   応急処置：フッターが本文に重ならないようにする
================================ */
#footer,
.footer,
#footer-in,
.footer-in{
  position:static !important;
  clear:both !important;
  width:100% !important;
  margin-top:40px !important;
  z-index:1 !important;
}

.entry-content::after,
.content::after,
.main::after{
  content:"";
  display:block;
  clear:both;
}