/* お知らせ一覧ページ用スタイル */

body {
  background-color: #005781;
  font-family: 'Rounded M PLUS 1c', sans-serif;
  color: #fff;
  margin: 0;
  padding: 0;
}

.custom-header {
  background-color: #005781;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.logo-text {
  color: #ffdd59;
  font-size: 24px;
  font-weight: bold;
}

.header-news-bar {
  display: flex;
  align-items: center;
  background: #0c1e5c;
  border-radius: 30px;
  padding: 6px 16px;
  gap: 12px;
  color: white;
  font-size: 14px;
}

.news-label {
  background: white;
  color: black;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: bold;
  font-size: 14px;
  white-space: nowrap;
}

.news-text {
  font-weight: bold;
  font-size: 14px;
}

.news-page-main {
  padding: 40px 20px;
  max-width: 800px;
  margin: 0 auto;
}

.news-heading {
  text-align: center;
  color: white;
  font-size: 28px;
  margin-bottom: 30px;
}

.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.news-item {
  background: white;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 12px 0;
  cursor: pointer;
  transition: background 0.2s ease;
  position: relative;
  z-index: 5;
}

.news-item:hover {
  background-color: #f4f4f4;
}

.news-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-weight: bold;
  color: black;
}

.news-date {
  color: black;
  font-size: 14px;
}

.news-title {
  color: black;
  font-size: 16px;
}

.news-body {
  margin-top: 12px;
  color: #333;
  font-size: 14px;
  line-height: 1.6;
}

.pagination {
  margin-top: 30px;
  text-align: center;
}

.nav-btn {
  background-color: white;
  color: #005781;
  border: none;
  border-radius: 20px;
  padding: 6px 16px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
  display: inline-block;
  margin: 0 10px;
}

.nav-btn:hover {
  background-color: #e0e0e0;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  color: black;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 24px;
  border: none;
  background: none;
  color: #333;
  cursor: pointer;
}


.news-wrapper {
  display: flex;
  align-items: center;       /* ← 中央揃えに変更 */
  justify-content: center;
  gap: 40px;
  flex-wrap: nowrap;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}


.news-illustration {
  width: 360px;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  animation: floatFish 6s ease-in-out infinite;
}

.news-content {
  flex: 1;
  min-width: 300px;
}

.news-image-container {
  position: relative;
  width: 100%;
  max-width: 600px; /* 最大幅を固定 */
  margin: 0 auto;
}

/* 木の画像 */
.news-illustration {
  width: 100%;
  height: auto;
  position: relative;
  z-index: 1;
}
.fruit {
  position: absolute;
  top: 48%;
  left: 43%;
  width: 10%;
  aspect-ratio: 1 / 1;
  z-index: 10;
  cursor: pointer;
  animation: gentleGlow 3.5s ease-in-out infinite;
  transition: transform 0.3s;
}

.fruit.glow {
  animation: gentleGlow 3.5s ease-in-out infinite;
}

@keyframes gentleGlow {
  0%, 100% {
    filter: drop-shadow(0 0 4px rgba(0, 255, 255, 0.3));
  }
  50% {
    filter: drop-shadow(0 0 12px rgba(0, 255, 255, 0.6));
  }
}

@keyframes gentleGlowHover {
  0%, 100% {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
  }
  50% {
    filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.8));
  }
}

@keyframes fallOff {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(300px) rotate(120deg); opacity: 0; }
}

.fall-off {
  animation: fallOff 1.2s ease-in forwards;
  pointer-events: none; /* 落ちたらもうクリックできない */
}

.fish-eater {
  position: absolute;
  left: -150px;
  height: 60px;
  z-index: 9;
  animation: swimRight 3s ease-out forwards;
}

@keyframes swimRight {
  0%   { left: -150px; opacity: 0; }
  40%  { left: 30%; opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

.bubble-effect {
  position: absolute;
  color: white;
  font-weight: bold;
  background: rgba(0, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  animation: floatUp 2s ease-out forwards;
  transform: translateX(-50%);
  z-index: 99;
}

@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, 0); }
  50% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -60px); }
}


.animated-fish {
  position: absolute;
  height: 60px;
  pointer-events: none;
  z-index: 5;
  transition: opacity 0.3s;
}

.animated-fish.left-to-right {
  left: -100px;
  animation: swim-right 3s ease-out forwards;
}

@keyframes swim-right {
  0% { left: -100px; opacity: 1; }
  80% { left: calc(50% - 30px); opacity: 1; } /* 梅のX座標あたり */
  100% { left: 100%; opacity: 0; }
}

.fish {
  position: absolute;
  width: 60px;
  height: auto;
  top: 0;
  left: 100%;
  pointer-events: none;
  z-index: 3;
  animation-name: swimLeft;
  animation-timing-function: linear;
}

@keyframes swimLeft {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  100% {
    transform: translateX(-120vw);
    opacity: 0;
  }
}

.animated-fish {
  position: absolute;
  height: 60px;
  pointer-events: none;
}

/* 左→右に泳ぐ */
.animated-fish.left-to-right {
  left: -10%;
  transform: scaleX(-1);  /* 左→右のとき反転 */
  animation-name: swim-right;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

/* 右→左に泳ぐ */
.animated-fish.right-to-left {
  left: 100%;
  animation-name: swim-left;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

@keyframes swim-left {
  0% { left: 100%; }
  100% { left: -10%; }
}

@keyframes swim-right {
  0% { left: -10%; }
  100% { left: 100%; }
}

#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 8px 14px;
  font-size: 14px;
  background-color: #005781;
  color: white;
  border: none;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  cursor: pointer;
  z-index: 999;
  display: none; /* スクロール後に表示 */
  transition: background 0.2s, transform 0.2s;
}

#back-to-top:hover {
  background-color: #ffdd59;
  color: #005781;
  transform: translateY(-2px);
}

#back-to-top i {
  margin-right: 6px;
}

@media screen and (max-width: 768px) {
  #back-to-top {
    bottom: 100px; /* スマホではさらに高めにする */
  }
}

@media screen and (max-width: 768px) {
  .news-illustration,
  .fish-eater,
  .animated-fish,
  .fruit {
    display: none !important;
  }
}
