/* ===== ヘッダー ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--green);
  color: var(--text-on-green);
  box-shadow: 0 4px 12px rgba(43, 64, 33, 0.1);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.header-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg);
  padding: 2px;
}

.header-title {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

/* ハンバーガー＆メニュー省略（既存の動きを維持） */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 0 auto;
  background: var(--text-on-green);
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}
.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
.nav-menu {
  display: flex;
  flex-direction: column;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: var(--green);
  visibility: hidden;
  pointer-events: none;
}
.nav-menu.is-open {
  max-height: 320px;
  visibility: visible;
  pointer-events: auto;
}
.nav-menu a {
  padding: 14px 20px;
  color: var(--text-on-green);
  border-top: 1px solid rgba(255, 248, 240, 0.2);
  font-size: 0.95rem;
  font-weight: 700;
}

/* ===== ファーストビュー（見切れロゴ＆ダイナミック版） ===== */
.hero {
  position: relative;
  background-image: url("../img/site_back.png");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  color: var(--text-on-green);
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 40px 20px 80px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  z-index: 1;
}

.hero-inner-dynamic {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - 100px);
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-left-box {
  align-self: flex-start;
  width: min(55vw, 220px);
  aspect-ratio: 1 / 1;
  margin-left: 20px;
  margin-bottom: clamp(10px, 3vh, 30px);
}

.hero-symbol-big {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
  padding: 0;
  box-shadow: none;
  opacity: 0;
  animation: zoomFadeInBig 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.hero-right-box {
  width: 100%;
  text-align: right;
  padding-bottom: 0;
  position: relative;
  z-index: 3;
}

/* タイトル文字：1文字ずつピョンピョン跳ねる設定 */
.hero-title-big {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #1f6b1c;

  text-shadow:
    0 4px 15px rgba(0, 0, 0, 0.2),
    0 0 10px rgba(255, 255, 255, 0.7);

  margin: 0 0 12px 0;
}

.line {
  display: inline;
}

.hero-title-big br {
  display: block;
}

/* JSで分解された各文字にかかる弾むアニメーション */
.bounce-char {
  opacity: 0;
  animation: jumpIn 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.hero-sub-text {
  margin-top: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1f6b1c;
  text-shadow: 0 2px 8px rgba(43, 64, 33, 0.2);
  opacity: 0;
  animation: slideInRight 1s cubic-bezier(0.16, 1, 0.3, 1) 1.2s both;
}

/* 参考サイトのような「プルン」と弾む楽しいボタン */
.hero-btn-styled,
.event-btn {
  display: inline-block;
  margin-top: 24px;
  padding: 14px 44px;
  background-color: var(--bg);
  color: var(--green);
  font-weight: 900;
  font-size: 1.05rem;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(43, 64, 33, 0.15);
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: slideInRight 1s cubic-bezier(0.16, 1, 0.3, 1) 1.4s both;
  transition:
    transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.3),
    box-shadow 0.3s ease;
}

.hero-btn-styled span,
.event-btn span {
  position: relative;
  z-index: 2;
}

/* ホバー（PC）やアクティブ（スマホ）時にぷるんと少し大きくなって弾むエフェクト */
.hero-btn-styled:hover,
.hero-btn-styled:active {
  transform: scale(1.08) translateY(-3px);
  box-shadow: 0 12px 32px rgba(43, 64, 33, 0.22);
}

/* ===== 共通セクション設定 ===== */
.section {
  padding: 80px 20px; /* なみ波が入るため上下の余白を少しゆったりに */
  position: relative;
}

.section-title {
  position: relative;
  text-align: center;
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: 40px;
  color: var(--text);
  letter-spacing: 0.05em;
}

/* タイトル下の線を手書きっぽい丸みのあるドット型に変更 */
.section-title::after {
  content: "";
  display: block;
  width: 36px;
  height: 6px;
  margin: 12px auto 0;
  background-color: var(--blue);
  border-radius: 999px;
}

.section-title--light {
  color: var(--text-on-green);
}

.section-title--light::after {
  background-color: var(--lime);
}

/* =====  スクロールでふわっと浮き出るアニメーション設定 ===== */
.js-scroll-trigger {
  transition:
    opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.js-enabled .js-scroll-trigger {
  opacity: 0;
  transform: translateY(40px);
}

.js-enabled .js-scroll-trigger.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* JSによって画面内に入ったと判定されたらクラスが付与されて浮き出る */
.js-scroll-trigger.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== お知らせ ===== */
.news {
  max-width: 760px;
  margin: 0 auto;
}

.news-list {
  list-style: none;
  padding: 0;
}

.news-item a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 12px;
  border-bottom: 2px dashed rgba(55, 141, 51, 0.15); /* 直線を可愛い点線に変更 */
  transition:
    background-color 0.3s ease,
    padding-left 0.3s ease;
  border-radius: 8px;
}

/* 触った時に少し右に進む心地よいエフェクト */
.news-item a:hover,
.news-item a:active {
  background-color: rgba(188, 219, 103, 0.15);
  padding-left: 20px;
}

.news-date {
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--green);
  background: rgba(55, 141, 51, 0.1);
  padding: 2px 10px;
  border-radius: 6px;
}

.news-text {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 700;
}

/* ===== 町民会議とは？ ===== */
.about {
  background-color: var(--green);
  /* 上下の波形SVGのために背景色領域を補正 */
  padding: 80px 20px;
}

.about-inner {
  max-width: 720px;
  margin: 0 auto;
}

.about-text {
  color: var(--text-on-green);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 20px;
  letter-spacing: 0.03em;
}

/* ===== お問い合わせ ===== */
.contact {
  background-color: var(--green);
  padding: 80px 20px;
}

.contact-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.contact-lead {
  color: var(--text-on-green);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 28px;
}

.contact-address {
  display: inline-block;
  font-style: normal;
  text-align: left; /* 中身を左揃えにして読みやすく */
  color: var(--text);
  font-size: 0.95rem; /* スマホで住所がはみ出にくくするために少しだけ小さく */
  font-weight: 700;
  line-height: 1.8;
  background-color: var(--bg);
  padding: 32px 24px; /* スマホの画面幅に合わせて余白を微調整 */
  border-radius: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  max-width: 100%; /* 横幅が画面からはみ出るのを防ぐ */
}

/* ラベルと情報を横並びにする設定 */
.address-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 18px; /* 間隔を少し広げて読みやすく */
}

.address-item:last-child {
  margin-bottom: 0; /* 最後の行の下余白はなし */
}

/* 「名称」「住所」などのシンプルなラベル */
.address-label {
  flex-shrink: 0;
  width: auto; /* 固定幅を無くして、文字の幅にぴったり合わせる */
  color: var(--green);
  font-size: 0.95rem; /* 右側の文字とサイズを揃える */
  margin-right: 8px; /* 「：」の直後のすき間を程よい広さに調整 */
}

/* 右側のテキスト情報 */
.address-value {
  flex: 1;
  word-break: break-all;
}

/* （遠賀町役場内）の補足文字を少し優しく */
.sub-value {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* ===== フッター ===== */
.site-footer {
  text-align: center;
  padding: 32px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  background-color: var(--bg);
}

/* ===== アニメーションキーフレーム ===== */
@keyframes zoomFadeInBig {
  0% {
    opacity: 0;
    transform: scale(0.75) rotate(-6deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes slideInRight {
  0% {
    opacity: 0;
    transform: translate(40px, 15px);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0);
  }
}

/* 1文字ずつ小気味よく上から跳ねて落ちてくる動き */
@keyframes jumpIn {
  0% {
    opacity: 0;
    transform: translateY(-40px) scaleY(0.7);
  }
  60% {
    opacity: 1;
    transform: translateY(10px) scaleY(1.1);
  }
  80% {
    transform: translateY(-5px) scaleY(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}
