/* Desktop top nav links under slideshow */
.link-desktop {
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  transition: color .2s ease;
}

.link-desktop:hover {
  color: #65a30d;
}

/* Scroll-in animation helpers */
.scroll-animate {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}

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

@media (prefers-reduced-motion: reduce) {

  .scroll-animate,
  .scroll-animate.is-visible {
    transition: none;
    transform: none;
    opacity: 1;
  }
}

/* --- Tab buttons (新着情報 / 更新履歴) --- */
.tab-btn {
  border-bottom: 2px solid #e5e7eb;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
  border-top-left-radius: .5rem;
  border-top-right-radius: .5rem;
}

.tab-btn:not(.active) {
  background: transparent;
  color: #4b5563;
}

.tab-btn.active[data-tab="news"] {
  background: #84cc16;
  color: #fff;
  border-color: #84cc16;
}

.tab-btn.active[data-tab="history"] {
  background: #DA6CCE;
  color: #fff;
  border-color: #DA6CCE;
}

.tab-btn:not(.active):hover {
  background: #f3f4f6;
}

@media(min-width:768px) {
  .tab-btn {
    border-bottom-width: 3px;
  }
}

/* === Desktop image menu under hero === */
@media (min-width: 768px) {
  #desktop-nav-under-hero {
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid #eef2f7;
    border-bottom: 1px solid #eef2f7;
  }

  .image-menu {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    align-items: end;
    justify-items: center;
    padding: 16px 0 18px;
  }

  .image-menu a {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    position: relative;
    transform: translateY(0);
    transition: transform .25s ease, filter .25s ease;
    will-change: transform;
  }

  .image-menu a:hover {
    transform: translateY(-6px) scale(1.06);
    filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .10));
  }

  .image-menu img {
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform .25s ease;
    user-select: none;
    -webkit-user-drag: none;
  }

  .image-menu .label {
    margin-top: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    color: #1f2937;
    letter-spacing: .02em;
  }
}

/* === Pastel organic image menu tweaks === */
@media (min-width: 768px) {
  .image-menu a {
    transition: transform .22s ease, filter .22s ease;
  }

  .image-menu a:hover {
    transform: translateY(-4px) scale(1.045) rotate(-0.5deg);
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .08));
  }

  .image-menu .label {
    color: #374151;
    font-weight: 700;
  }
}

body {
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  line-height: 1.75;
  letter-spacing: 0.03em;
  -webkit-font-smoothing: antialiased;
}

.page-title {
  font-size: clamp(1.75rem, 2.8vw, 2.5rem);
  font-weight: 800;
  letter-spacing: .01em;
}

.lead {
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  line-height: 1.9;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 70%, rgba(132, 204, 22, .15) 70%);
  padding: .25rem .5rem;
  border-radius: .5rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 800;
  margin: 2rem 0 .75rem;
  position: relative;
}

h2::after {
  content: "";
  display: block;
  width: 72px;
  height: 4px;
  border-radius: 9999px;
  background: linear-gradient(90deg, #84cc16, #38bdf8);
  margin-top: .4rem;
}

h3 {
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  font-weight: 700;
  margin: 1.5rem 0 .5rem;
}

h4 {
  font-weight: 700;
  margin: 1rem 0 .25rem;
}

blockquote {
  border-left: 6px solid #d946ef;
  background: #fdf2ff;
  color: #6b21a8;
  padding: .75rem 1rem;
  border-radius: .375rem;
  margin: 1rem 0;
}

/* === Lists === */
.checklist {
  list-style: none;
  padding-left: 0;
}

.checklist li {
  position: relative;
  padding-left: 1.75rem;
  margin: .5rem 0;
}

.checklist li::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: .25rem;
  top: .15rem;
  color: #65a30d;
}

.numbered {
  counter-reset: num;
  padding-left: 0;
}

.numbered li {
  list-style: none;
  counter-increment: num;
  margin: .5rem 0;
  padding-left: 2.25rem;
  position: relative;
}

.numbered li::before {
  content: counter(num);
  position: absolute;
  left: 0;
  top: 0;
  transform: translateY(2px);
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #fb923c, #f97316);
  color: #fff;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.sep {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, #e5e7eb, #f97316, #e5e7eb);
  margin: 2rem 0;
}

/* === Cards / Callouts === */
.post {
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: .75rem;
  padding: 1rem 1.1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .04);
}

.post-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: .25rem;
}

.post-meta {
  font-size: .9rem;
  color: #64748b;
  margin-bottom: .75rem;
}

.card {
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: .75rem;
  padding: 1rem;
}

.callout {
  border-left: 6px solid #38bdf8;
  background: #f0f9ff;
  padding: .75rem 1rem;
  border-radius: .5rem;
}

.callout-lime {
  border-left-color: #65a30d;
  background: #f7fee7;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  padding: .65rem 1rem;
  border-radius: .65rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.btn-lime {
  background: #84cc16;
  color: #fff;
}

.btn-lime:hover {
  background: #65a30d;
}

.btn-orange {
  background: #fb923c;
  color: #fff;
}

.btn-orange:hover {
  background: #f97316;
}

.btn-ghost {
  background: #fff;
  color: #334155;
  border-color: #e5e7eb;
}

.btn-ghost:hover {
  background: #f8fafc;
}

/* === FAQ === */
.faq {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: .5rem;
  padding: .5rem .75rem;
  margin: .75rem 0;
}

.faq>summary {
  cursor: pointer;
  font-weight: 700;
}

.faq[open] {
  border-color: #86efac;
}



/* add */
/* グレー背景＋上だけ10px余白を持つ帯コンテナ */
.footer-scroll {
  background-color: #f3f4f6;
  /* グレー (Tailwindのgray-100あたり) */
  padding-top: 10px;
  /* 上だけ余白 */
  margin: 0;
  /* 下に余計な隙間を作らないため念のため */
}

/* 中に擬似要素で流れる画像の帯を作る */
.footer-scroll::before {
  content: "";
  display: block;
  width: 100%;
  height: 59px;
  /* 画像の高さに合わせて調整 */
  background-image: url("../images/footer_top.png");
  background-repeat: repeat-x;
  background-position: 0 0;
  animation: footerLoop 150s linear infinite;
}

/* 横スクロール用アニメーション */
@keyframes footerLoop {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: -800px 0;
    /* 画像の幅に合わせて調整 */
  }
}

.header-grad {
  background: linear-gradient(to bottom,
      #F3FED9 0%,
      #E5FEAF 100%);
}

/* スマホ時だけハンバーガーボタンを右に余白追加 */
@media (max-width: 767px) {
  #mobile-menu-button {
    margin-left: 20px !important;
  }
}

/* スライドショー　上下 */
@keyframes slideVerticalPanUp {

  /* 最初はぴったり中央（余白なし） */
  0% {
    transform: scale(1.2) translateY(0);
  }

  /* 最後に少し上へ持ち上げる（下から上へ動いたように見える） */
  100% {
    transform: scale(1.2) translateY(-10%);
  }
}

/* 表示中のスライドかつ slide-pan クラス付きだけに適用 */
#slideshow .slide-pan.opacity-100 img {
  animation: slideVerticalPanUp 8s linear forwards;
  will-change: transform;
}

/* スライドショー：左右 */
@keyframes slideHorizontalPanRight {
  0% {
    transform: scale(1.2) translateX(-10%);
  }

  100% {
    transform: scale(1.2) translateX(0%);
  }
}

/* 表示中かつ slide-pan-horizontal のみ適用 */
#slideshow .slide-pan-horizontal.opacity-100 img {
  animation: slideHorizontalPanRight 8s linear forwards;
  will-change: transform;
}



/* 施設詳細　ある・なしスイッチ全体の枠 */
.switch-wrap {
  display: inline-flex;
  border: 1px solid #9ca3af;
  /* gray-400 */
  font-weight: 700;
  font-size: 0.875rem;
  /* text-sm 相当 */
}

/* ボタン部分 */
.switch-item {
  padding: 4px 14px;
  color: #4b5563;
  /* gray-600 */
  background: #e5e7eb;
  /* gray-200 */
  cursor: default;
}

/* 選択状態（active を付けるだけで適用） */
.switch-item.active {
  background: #65a30d;
  /* lime-600 */
  color: #fff;
}

/* 施設詳細を閉じるボタン（常時表示・下中央の半円） */
#detail-close-handle {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 60px;
  height: 32px;
  border-radius: 32px 32px 0 0;
  /* 上が丸い半円 */
  background: rgba(15, 23, 42, 0.4);
  /* 暗めのスレートカラー */
  color: #fff;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

/* スマホで指が当てやすいよう少し大きめに */
@media (max-width: 767px) {
  #detail-close-handle {
    width: 72px;
    height: 38px;
    font-size: 26px;
  }
}



/* 曲線レイヤー */
.curve-overlay {
  pointer-events: none;
}

/* 曲線全体の配置 */
.curve-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* SVG の共通設定 */
.curve {
  position: absolute;
  top: 50%;
  left: -10%;
  width: 120%;
  transform: translateY(-50%);
}

/* 曲線の揺れ */
.curve1 {
  animation: float1 12s ease-in-out infinite alternate;
}

.curve2 {
  animation: float2 14s ease-in-out infinite alternate;
}

.curve3 {
  animation: float3 10s ease-in-out infinite alternate;
}

/* ★ 短い線（光の粒）を2倍の長さにして、時間差で動かす */
.dash {
  stroke-dasharray: 80 300;
  animation: dashMove 3s linear infinite;
}

/* 時間差をつける */
.curve1 .dash {
  animation-delay: 0s;
}

.curve2 .dash {
  animation-delay: 1.0s;
}

.curve3 .dash {
  animation-delay: 2.0s;
}

/* 曲線の揺れ */
@keyframes float1 {
  0% {
    transform: translateY(-50%) translateX(0);
  }

  100% {
    transform: translateY(-48%) translateX(-4%);
  }
}

@keyframes float2 {
  0% {
    transform: translateY(-50%) translateX(0);
  }

  100% {
    transform: translateY(-52%) translateX(-6%);
  }
}

@keyframes float3 {
  0% {
    transform: translateY(-50%) translateX(0);
  }

  100% {
    transform: translateY(-49%) translateX(-3%);
  }
}

/* 短い線が流れる */
@keyframes dashMove {
  0% {
    stroke-dashoffset: 0;
  }

  100% {
    stroke-dashoffset: -380;
  }
}

/* === Cards: sequential pop === */
.card-pop {
  animation: popIn 2.3s ease both;
}

@keyframes popIn {
  0% {
    transform: scale(0.96);
  }

  100% {
    transform: scale(1);
  }
}

/* 黄色い太枠をx秒だけ */
.card-flash {
  outline: 3px solid #A1DFA8;
  outline-offset: -5px;
  animation: borderFlash 0.5s ease forwards;
}

@keyframes borderFlash {
  0% {
    outline-color: #A1DFA8;
  }

  100% {
    outline-color: transparent;
  }
}

/* ページタイトル1文字ずつ表示　*/
#type-title span {
  opacity: 0;
  display: inline-block;
  transition: opacity 0.3s ease;
}

#type-title span.show {
  opacity: 1;
}

/* TOP タブを切り替えたときに、横からスライド */
.tab-panel {
  animation: fadeInSlide 1.4s ease forwards;
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateX(15px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 評価アンケート */
#site-vote .vote-btn {
  border-radius: 9999px;
  padding: 4px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#site-vote .vote-btn img {
  width: 44px;
  height: 44px;
}

@media (min-width: 640px) {
  #site-vote .vote-btn img {
    width: 52px;
    height: 52px;
  }
}

#site-vote .vote-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

#site-vote .vote-btn:active {
  transform: scale(0.95);
}

/* === 施設名の左（PC）／2段（スマホ）に「避難所種別」バッジを表示 === */
.shelter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.6rem;
  border-radius: 0.5rem;
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  line-height: 1;
  letter-spacing: .02em;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .10);
  white-space: nowrap;
}

/* 防災マップ施設詳細 種別ごとの色（指定された値で準備） */
.shelter-badge--designated {
  background: #8C008C;
}

/* 指定避難所 */
.shelter-badge--district {
  background: #B20000;
}

/* 地区避難所 */
.shelter-badge--welfare {
  background: #8C6900;
}

/* 福祉避難所 */
.shelter-badge--partner {
  background: #008C46;
}

/* 協力施設 */
/* 施設名リンク（ボタンより控えめで、リンクだと分かる） */
.facility-name-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 2px solid rgba(2, 132, 199, .25);
}

.facility-name-link:hover {
  border-bottom-color: rgba(2, 132, 199, .65);
}

/* スマホ：左配置ではなく2段（バッジ→施設名） */
@media (max-width: 639px) {
  .facility-title {
    flex-direction: column;
    align-items: flex-start;
    gap: .35rem;
  }
}