/* --- 基本設定 --- */
html {
  scroll-behavior: smooth;
}
body {
  font-family: "M PLUS Rounded 1c", sans-serif;
  background-color: #ffffff;
  color: #333;
}

/* --- 背景オブジェクト --- */
.background-blur-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
}

.shape1 {
  width: 400px;
  height: 400px;
  background-color: rgba(65, 182, 230, 0.5);
  top: -100px;
  left: -150px;
  animation: float 40s infinite ease-in-out alternate;
}

.shape2 {
  width: 500px;
  height: 500px;
  background-color: rgba(160, 196, 60, 0.5);
  bottom: -150px;
  right: -200px;
  animation: float 50s infinite ease-in-out alternate-reverse;
}

.shape3 {
  width: 350px;
  height: 350px;
  background-color: rgba(230, 89, 133, 0.5);
  top: 15%;
  right: -120px;
  animation: float 36s infinite ease-in-out alternate;
}

.shape4 {
  width: 300px;
  height: 300px;
  background-color: rgba(142, 66, 147, 0.4);
  bottom: 10%;
  left: -100px;
  animation: float 44s infinite ease-in-out alternate-reverse;
}

.shape5 {
  width: 250px;
  height: 250px;
  background-color: rgba(245, 130, 32, 0.5);
  top: 50%;
  left: 20%;
  animation: float2 38s infinite ease-in-out alternate;
}

.shape6 {
  width: 200px;
  height: 200px;
  background-color: rgba(65, 182, 230, 0.4);
  top: 70%;
  right: 30%;
  animation: float 32s infinite ease-in-out alternate-reverse;
}

/* 浮遊アニメーション */
@keyframes float {
  0% {
    transform: translateY(0px) translateX(0px) rotate(0deg);
  }
  100% {
    transform: translateY(-40px) translateX(20px) rotate(20deg);
  }
}
@keyframes float2 {
  0% {
    transform: translateY(0px) translateX(0px) rotate(0deg);
  }
  100% {
    transform: translateY(30px) translateX(-30px) rotate(-15deg);
  }
}

/* --- グラデーションテキスト --- */
.gradient-text {
  background: linear-gradient(45deg, #f58220, #e65985, #8e4293, #41b6e6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
}

/* --- イベントセクション --- */
.event-layout-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

@media (min-width: 768px) {
  .event-layout-item {
    flex-direction: row;
    align-items: stretch; /* カードの高さを揃える */
  }
}

.event-image-wrapper {
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .event-image-wrapper {
    width: 45%;
    flex-shrink: 0;
  }
  .event-image-wrapper.left {
    margin-right: -4rem; /* 重なりを作るためのネガティブマージン */
  }
  .event-image-wrapper.right {
    margin-left: -4rem; /* 重なりを作るためのネガティブマージン */
    order: 2; /* 右側に配置するために順序を変更 */
  }
}

.event-image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 画像の比率を保ったままトリミング */
  border-radius: 1.5rem;
  box-shadow: 0 15px 40px -15px rgba(0, 0, 0, 0.2);
}

.event-image.object-left {
  object-position: right; /* 画像の左側を基準に表示 */
}

.event-content-wrapper {
  width: 100%;
  margin-top: -3rem; /* モバイルでの重なり */
  position: relative;
  z-index: 2;
  display: flex; /* 子要素の高さを揃えるため */
}

@media (min-width: 768px) {
  .event-content-wrapper {
    width: 65%;
    margin-top: 0;
  }
}

.event-tag {
  display: inline-block;
  background-color: #a0c43c;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: bold;
}

.event-card-dynamic {
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 2rem;
  border-radius: 1.5rem;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
  width: 100%;
}

/* --- セクション区切り --- */
.section-events-wrapper {
  background-color: #fff9f0;
  clip-path: polygon(0 0, 100% 0, 100% 95%, 0% 100%);
  padding: 6rem 0;
  margin: -1px 0;
  transform: translateZ(0);
}

@media (min-width: 768px) {
  .section-events-wrapper {
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
  }
}

.section-break {
  background-color: #f0f6ff;
  clip-path: polygon(0 5%, 100% 0, 100% 95%, 0% 100%);
  padding: 6rem 0;
  margin: -1px 0; /* to avoid thin lines between sections */
}

@media (min-width: 768px) {
  .section-break {
    clip-path: polygon(0 10%, 100% 0, 100% 90%, 0 100%);
  }
}

/* --- フライヤーカード --- */
.flyer-card {
  display: block;
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.flyer-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.2);
}
.flyer-image-wrapper {
  overflow: hidden;
}
.flyer-image {
  width: 100%;
  height: auto;
  transition: transform 0.4s ease-out;
}
.flyer-card:hover .flyer-image {
  transform: scale(1.05);
}

/* --- 共通ボタン --- */
.cta-button {
  display: inline-block;
  background: linear-gradient(45deg, #f58220, #e65985);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: bold;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 15px -5px rgba(0, 0, 0, 0.3);
}
.cta-button:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.4);
}

/* --- アコーディオン --- */
.accordion-item {
  border-bottom: 1px solid #e5e7eb;
}
.accordion-item:last-child {
  border-bottom: none;
}
.accordion-button {
  width: 100%;
  padding: 1.25rem 1rem;
  text-align: left;
  font-size: 1.125rem;
  font-weight: bold;
  color: #1f2937;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: transparent;
  transition: background-color 0.2s ease;
}
.accordion-button:hover {
  background-color: #f9fafb;
}
.accordion-button::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: normal;
  transition: transform 0.3s ease;
  color: #41b6e6;
}
.accordion-button.open::after {
  transform: rotate(45deg);
}
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background-color: #f9fafb;
  padding: 0 1.5rem;
}
.accordion-content p {
  padding: 0.5rem 0;
  color: #4b5563;
}

/* --- Character Decorations --- */
.deco-char {
  position: absolute;
  z-index: 10;
  pointer-events: none; /* To prevent blocking clicks */
  animation: gentle-float 6s infinite ease-in-out alternate;
  display: none; /* Hide on small screens by default */
}
@keyframes gentle-float {
  from {
    transform: translateY(0px) rotate(-2deg);
  }
  to {
    transform: translateY(-15px) rotate(2deg);
  }
}
/* Individual Positions */
.char-yu {
  width: 80px;
  top: 60%;
  left: 2%;
}
.char-waru {
  width: 90px;
  top: 10%;
  right: 2%;
  animation-delay: -2s;
}
.char-raku1 {
  width: 90px;
  bottom: 15%;
  left: 1%;
  animation-delay: -1s;
}
.char-raku2 {
  width: 100px;
  top: 10%;
  right: 1%;
  animation-delay: -3s;
}
.char-mama {
  width: 80px;
  top: 20%;
  left: 2%;
  animation-delay: -4s;
}
.char-papa {
  width: 110px;
  bottom: 20%;
  right: 2%;
}
.char-raku3 {
  width: 150px;
  bottom: 0;
  left: 2%;
  animation-delay: -5s;
}
.char-header-raku2 {
  width: 80px;
  top: 5%;
  left: 5%;
  animation-delay: -1.5s;
}
.char-event-papa {
  width: 90px;
  bottom: 10%;
  right: 1%;
  animation-delay: -2.5s;
}
.char-venue-waru {
  width: 80px;
  bottom: 10%;
  right: 2%;
  animation-delay: -3.5s;
}
.char-flyer-yu {
  width: 70px;
  top: 5%;
  left: 1%;
  animation-delay: -4.5s;
}
.char-survey-raku1 {
  width: 80px;
  top: 10%;
  right: 2%;
  animation-delay: -0.5s;
}
.char-footer-mama {
  width: 80px;
  bottom: 0;
  right: 2%;
  animation-delay: -2.2s;
}

@media (min-width: 768px) {
  .deco-char {
    display: block;
  }
  .char-yu {
    width: 100px;
    left: 5%;
  }
  .char-waru {
    width: 120px;
    right: 5%;
  }
  .char-raku1 {
    width: 120px;
    left: 2%;
  }
  .char-raku2 {
    width: 130px;
    right: 2%;
  }
  .char-mama {
    width: 110px;
    left: 5%;
  }
  .char-papa {
    width: 140px;
    right: 5%;
  }
  .char-raku3 {
    width: 200px;
    left: 5%;
  }
  .char-header-raku2 {
    width: 100px;
    left: 15%;
  }
  .char-event-papa {
    width: 120px;
    right: 2%;
  }
  .char-venue-waru {
    width: 110px;
    right: 5%;
  }
  .char-flyer-yu {
    width: 90px;
    left: 2%;
  }
  .char-survey-raku1 {
    width: 100px;
    right: 5%;
  }
  .char-footer-mama {
    width: 100px;
    right: 5%;
  }
}

/* --- トップへ戻るボタン --- */
.back-to-top-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
  transform: translateY(20px);
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(5px);
  border-radius: 9999px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: #374151;
  font-weight: bold;
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
}
.back-to-top-button.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top-button img {
  width: 30px;
  height: 30px;
}
.back-to-top-button:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
