/* レイアウトシフト防止のためのスタイル追加 */
.container11 {
  min-height: 200px; /* 最小高さを確保 */
  width: 100%;
  padding: 10px;
  margin: 20px auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.message-container {
  min-height: 60px; /* メッセージエリアの最小高さを確保 */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.message-text {
  margin: 0;
  padding: 10px 0;
}

.login-link-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 120px; /* ログインアイコンエリアの高さを確保 */
  width: 100%;
}

.login-icon {
  display: block;
  transition: transform 0.3s ease;
  width: 100px;
  height: 100px;
}

.login-icon:hover {
  transform: scale(1.05);
}

/* アニメーション要素の初期状態を定義 - 既存のスタイルを上書き */
.fade-in-left {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  /* アニメーション設定を削除してトランジションに統一 */
  animation: none;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  text-align: center;
  font-family: "Dela Gothic One", serif;
  font-style: normal;
  -webkit-text-stroke: 0.1px #ffffff;
  text-shadow: 2px 2px 4px rgba(120, 120, 120, 0.6);
  /* アニメーション設定を削除してトランジションに統一 */
  animation: none;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* car-animationクラスがある場合のみアニメーション実行 */
.fade-in-right.car-animation {
  display: inline-block;
  position: relative;
  animation: combinedAnimation 2.5s ease-out forwards;
}

/* 💨アニメーションの初期位置を固定 */
.exhaust,
.exhaust-extra {
  position: absolute;
  opacity: 0;
  will-change: transform, opacity;
}

.car-animation .exhaust1 {
  right: -30px;
  top: 10px;
}

.car-animation .exhaust2 {
  right: -50px;
  top: 5px;
}

.car-animation .exhaust3 {
  right: -70px;
  top: 15px;
}

.car-animation .exhaust-extra1 {
  right: -90px;
  top: 8px;
}

/* 画像の読み込み時レイアウトシフト防止 */
.fade-image {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease-out, transform 1s ease-out;
  width: 100%;
  max-width: 800px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.fade-image.visible {
  opacity: 1;
  transform: translateY(0);
}

/* コンテナ画像のサイズ固定 */
.container img {
  width: 100%;
  max-width: 600px;
  height: auto;
  aspect-ratio: 16/9; /* アスペクト比を固定してレイアウトシフトを防止 */
  object-fit: cover;
  display: block;
}

footer {
  padding: 20px;
  background: #f2f2f2;
  font-size: 0.8em;
}

/* footer内のflexコンテナ */
.footer-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* 子要素の基本設定 */
.footer-item {
  border: 0px solid #ccc;
  box-sizing: border-box;
  padding: 10px;
  border-radius: 5px;
  flex: 1 1 calc(100%);
  /* 初期状態は1列 */
}

/* 画面幅600px以上で2列にしたい場合は800px未満用の記述があるため、まず600px以上～800px未満で2列 */
@media (min-width: 350px) and (max-width: 799px) {
  .footer-item {
    flex: 1 1 calc(50% - 20px);
    /* gap分の余白を考慮 */
  }
}

/* 画面幅800px以上で2列から3列へ変更 */
@media (min-width: 800px) and (max-width: 1199px) {
  .footer-item {
    flex: 1 1 calc(33.333% - 20px);
  }
}

/* 画面幅1200px以上で3列維持、項目数が増えれば自動で折返し */
@media (min-width: 1200px) {
  .footer-item {
    flex: 1 1 calc(25% - 20px);
  }
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  animation: slideFadeIn 1s forwards ease-in-out;
}

/* ディレイをかけたい場合 */
.fade-delay1 {
  animation-delay: 0.3s;
}

.fade-delay2 {
  animation-delay: 0.6s;
}

@keyframes slideFadeIn {
  0% {
    opacity: 0;
    transform: translateX(-30px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  /* 右側から開始 */
  animation: slideFadeInRight 1s forwards ease-in-out;
  text-align: center;
  /* 中央揃え */
  font-family: "Dela Gothic One", serif;
  font-style: normal;
  -webkit-text-stroke: 0.1px #ffffff;
  text-shadow: 2px 2px 4px rgba(120, 120, 120, 0.6);
}

/* ディレイをかけたい場合 */
.fade-delay1 {
  animation-delay: 0.3s;
}

.fade-delay2 {
  animation-delay: 0.6s;
}

@keyframes slideFadeInRight {
  0% {
    opacity: 0;
    transform: translateX(30px);
    /* 開始位置：右側 */
  }

  100% {
    opacity: 1;
    transform: translateX(0);
    /* 終了位置：中央 */
  }
}

.date-overlay {
  position: absolute;
  top: 53%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  /* 日付の大きさを調整 */
  font-weight: bold;
  color: white;
  /* 必要に応じて色を変更 */
  pointer-events: none;
  /* オーバーレイがクリックなどを妨げないようにする */
}

.nav-link1 {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-text {
  display: flex;
  flex-direction: column;
  color: #ffffff;
}

/* メインのテキスト（フォト活）のアニメーション：右端から中央へ走り込み、急停止しても消えず残る */
.fade-in-right.car-animation {
  display: inline-block;
  position: relative;
  animation: combinedAnimation 2.5s ease-out forwards;
}

@keyframes combinedAnimation {
  0% {
    opacity: 0;
    transform: translateX(100%);
  }

  40% {
    opacity: 1;
    transform: translateX(0);
  }

  55% {
    transform: translateY(-10px) rotate(-10deg);
  }

  70% {
    transform: translateY(0) rotate(0);
  }

  100% {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }
}

/* 文字を震わせるアニメーション */
.shake {
  display: inline-block;
  /* combinedAnimationが終わった後に、2.7秒辺りから震える */
  animation: shakeAnimation 0.5s ease-out 3.3s forwards;
}

@keyframes shakeAnimation {
  0% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-3px);
  }

  40% {
    transform: translateX(3px);
  }

  60% {
    transform: translateX(-3px);
  }

  80% {
    transform: translateX(3px);
  }

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

/* 💖用の設定 */
/* 各💖は異なる大きさで、出現タイミングもずらして順次表示します */
.exhaust1 {
  position: absolute;
  left: 100%;
  top: 50%;
  font-size: 8px;
  opacity: 0;
  transform: translate(-3px, -3px);
  animation: exhaustAnimation1 1s linear forwards;
  animation-delay: 1.5s;
}

.exhaust2 {
  position: absolute;
  left: 100%;
  top: 50%;
  font-size: 14px;
  opacity: 0;
  transform: translate(-4px, -4px);
  animation: exhaustAnimation2 1s linear forwards;
  animation-delay: 2s;
}

.exhaust3 {
  position: absolute;
  left: 100%;
  top: 50%;
  font-size: 12px;
  opacity: 0;
  transform: translate(-5px, -5px);
  animation: exhaustAnimation3 1s linear forwards;
  animation-delay: 2.5s;
}

/* 💖の右上方向への移動アニメーション */
@keyframes exhaustAnimation1 {
  0% {
    opacity: 0;
    transform: translate(-3px, -3px);
  }

  10% {
    opacity: 1;
    transform: translate(-3px, -3px);
  }

  100% {
    opacity: 0;
    transform: translate(36px, -20px);
  }
}

@keyframes exhaustAnimation2 {
  0% {
    opacity: 0;
    transform: translate(-4px, -4px);
  }

  10% {
    opacity: 1;
    transform: translate(-4px, -4px);
  }

  100% {
    opacity: 0;
    transform: translate(40px, -20px);
  }
}

@keyframes exhaustAnimation3 {
  0% {
    opacity: 0;
    transform: translate(-5px, -5px);
  }

  10% {
    opacity: 1;
    transform: translate(-5px, -5px);
  }

  100% {
    opacity: 0;
    transform: translate(44px, -20px);
  }
}

/* 追加で💨の要素の設定 */
.exhaust-extra {
  position: absolute;
  left: 100%;
  top: 60%;
  font-size: 12px;
  /* 必要に応じてサイズ調整 */
  display: inline-block;
  opacity: 0;
  transform: translate(-6px, -7px);
}

/* 30°程度の角度で右上方向に動くアニメーション */
@keyframes extraEject1 {
  0% {
    opacity: 0;
    transform: translate(-6px, -6px) scale(0.8);
  }

  15% {
    opacity: 1;
    transform: translate(-6px, -6px) scale(1);
  }

  100% {
    opacity: 0;
    /* 約30°上向き：X方向70px, Y方向 -40px */
    transform: translate(70px, -40px) scale(1.2);
  }
}

.exhaust-extra1 {
  animation: extraEject1 1.2s cubic-bezier(0.2, 1, 0.2, 1) forwards;
  animation-delay: 4s;
}

.follow-us {
  width: 100%;
  /* 親コンテナを全幅に */
  display: flex;
  align-items: center;
  /* 垂直方向に中央揃え */
  justify-content: flex-end;
  /* 全要素を右寄せ */
}

.follow-us span {
  margin-right: 15px;
  /* テキストと最初の画像の間にスペース */
}

/* 初期状態：画像は透明で下にずれている */
.fade-image {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}

/* ビューポートに入ったときに適用する状態 */
.fade-image.visible {
  opacity: 1;
  transform: translateY(0);
}

/* CSS */
.wave-text {
  font-size: 2rem;
  /* フォントサイズはお好みで調整 */
  display: inline-block;
}

.wave-text span {
  display: inline-block;
  animation: wave 1.5s ease-in-out infinite;
}

/* 各文字に異なるアニメーションディレイを設定 */
.wave-text span:nth-child(1) {
  animation-delay: 0s;
}

.wave-text span:nth-child(2) {
  animation-delay: 0.1s;
}

.wave-text span:nth-child(3) {
  animation-delay: 0.2s;
}

.wave-text span:nth-child(4) {
  animation-delay: 0.3s;
}

.wave-text span:nth-child(5) {
  animation-delay: 0.4s;
}

.wave-text span:nth-child(6) {
  animation-delay: 0.5s;
}

.wave-text span:nth-child(7) {
  animation-delay: 0.6s;
}

@keyframes wave {
  0%,
  60%,
  100% {
    transform: translateY(0);
  }

  30% {
    transform: translateY(-10px);
  }
}

/* Base styles for the animation section */
.scroll-animation-section {
  position: relative;
  overflow: hidden;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

/* 動画背景関連のスタイル */
.hero-container {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #ffffff;
  /* テキストを白色に変更（動画上で見やすいように） */
  z-index: 1;
  padding: 0 10px;
  overflow: hidden;
}

.hero-video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translateX(-50%) translateY(-50%);
  object-fit: cover;
}

/* オーバーレイを追加して、動画の上にテキストを読みやすくする */
.hero-video-container::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  /* 暗い半透明オーバーレイ */
}

.hero-fallback-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  /* 動画が機能しない環境での代替 */
}

.hero-content {
  position: relative;
  z-index: 2;
  /* 動画よりも前面に */
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s ease;
  max-width: 80%;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  /* テキストに影を付けて読みやすく */
}

.hero-content.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 400;
}

/* スクロールフェードイン用 */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Feature Section */
.feature-container {
  padding: 100px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-item {
  display: flex;
  align-items: center;
  margin-bottom: 150px;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1s ease, transform 1s ease;
}

.feature-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-item.reverse {
  flex-direction: row-reverse;
}

.feature-image-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.feature-icon {
  width: 400px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  border: 4px solid #ffffff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.6s ease-out, box-shadow 0.4s ease-out;
}

.feature-icon:hover {
  transform: scale(1.15);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.feature-icon2 {
  width: 400px;
  /* 最大幅として設定 */
  max-width: 100%;
  /* 画面幅を超えないように自動調整 */
  height: auto;
  object-fit: contain;
  transition: transform 0.6s ease-out, box-shadow 0.4s ease-out;
}

.feature-icon2:hover {
  transform: scale(1.15);
}

.feature-text {
  flex: 1;
  padding: 0 20px;
}

.feature-text h2 {
  position: relative;
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #1d1d1f;
  padding-top: 15px;
  /* 番号のためのスペースを確保 */
}

.feature-text h2::before {
  content: attr(data-number);
  position: absolute;
  top: -60px;
  left: 0;
  /* 右から左に変更 */
  font-size: 9rem;
  font-weight: 700;
  color: rgba(224, 228, 240, 0.79);
  /* 薄い灰色 */
  z-index: -1;
  line-height: 1;
}

.feature-text p {
  font-size: 1.2rem;
  color: #515154;
  line-height: 1.6;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
  .feature-item,
  .feature-item.reverse {
    flex-direction: column;
    text-align: center;
    margin-bottom: 100px;
  }

  .feature-image-container {
    margin-bottom: 30px;
  }

  .feature-icon,
  .feature-icon2 {
    max-width: 80%;
  }

  .feature-text {
    padding: 0 10px;
  }

  .feature-text h2 {
    font-size: 2rem;
  }

  .feature-text h2::before {
    left: 50%;
    transform: translateX(-50%);
    top: -50px;
    font-size: 7rem;
  }
}

@media (max-width: 480px) {
  .feature-container {
    padding: 60px 15px;
  }

  .feature-item {
    margin-bottom: 80px;
  }

  .feature-icon,
  .feature-icon2 {
    max-width: 100%;
  }

  .feature-text h2 {
    font-size: 1.8rem;
  }

  .feature-text h2::before {
    font-size: 6rem;
    top: -40px;
  }

  .feature-text p {
    font-size: 1rem;
  }
}

/* Gallery Preview Section */
.gallery-preview {
  background-color: #f5f5f7;
  padding: 100px 20px;
  text-align: center;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 1s ease, transform 1s ease;
}

.gallery-preview.visible {
  opacity: 1;
  transform: scale(1);
}

.gallery-title {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 3rem;
  color: #1d1d1f;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.gallery-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.gallery-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-image {
  transform: scale(1.15);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px;
  text-align: center;
  font-weight: 500;
}

/* Call to Action Section */
.cta-section {
  padding: 120px 20px;
  text-align: center;
  background: linear-gradient(135deg, #42275a 0%, #734b6d 100%);
  color: white;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1s ease, transform 1s ease;
}

.cta-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.cta-title {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.cta-description {
  font-size: 1.3rem;
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-button {
  display: inline-block;
  background-color: rgba(255, 255, 255, 0.3);
  color: white;
  padding: 15px 30px;
  border-radius: 30px;
  font-size: 1.2rem;
  font-weight: 600;
  border: 2px solid white;
  /* 白色のボーダーを追加しました */
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.cta-button:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* Testimonial Section */
.testimonial-section {
  padding: 100px 20px;
  background-color: white;
}

.testimonial-container {
  max-width: 1000px;
  margin: 0 auto;
}

.testimonial-heading {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 3rem;
  color: #1d1d1f;
  text-align: center;
}

.testimonial-slider {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.testimonial-item {
  background-color: #f5f5f7;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.testimonial-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.testimonial-content {
  margin-bottom: 20px;
}

.testimonial-content p {
  font-size: 1.1rem;
  color: #333;
  line-height: 1.6;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
}

.testimonial-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-right: 15px;
}

.testimonial-name {
  font-weight: 600;
  color: #1d1d1f;
}

/* Animation keyframes */
@keyframes fade-in {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.random-gallery-section {
  padding: 80px 20px;
  background-color: #fdfdfd;
  position: relative;
}

.gallery-title {
  text-align: center;
  margin-bottom: 40px;
}

.gallery-title h2 {
  font-size: 2.5rem;
  font-weight: 600;
  color: #1d1d1f;
  position: relative;
  display: inline-block;
}

.gallery-scroller {
  position: relative;
  max-width: 100%;
  overflow: hidden;
  padding: 20px 0;
}

.gallery-wrapper {
  display: flex;
  transition: transform 0.5s ease;
  gap: 20px;
  padding: 0 40px;
}

.gallery-slide {
  flex: 0 0 auto;
  width: 300px;
  height: 300px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.gallery-slide:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.random-gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.gallery-slide:hover .random-gallery-image {
  transform: scale(1.1);
}

.photo-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 10px;
  font-size: 0.9rem;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-slide:hover .photo-caption {
  opacity: 1;
}

.gallery-controls {
  position: absolute;
  width: 100%;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
  z-index: 10;
}

.gallery-control {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  box-shadow: 0 5px 15px rgba(104, 104, 104, 0.15);
  font-size: 1.3rem;
  font-weight: bold;
  color: rgb(125, 125, 125);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-control:hover {
  background: white;
  box-shadow: 0 5px 15px rgba(104, 104, 104, 0.15);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .gallery-slide {
    width: 300px;
    height: 300px;
  }

  .gallery-control {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .gallery-slide {
    width: 200px;
    height: 200px;
  }

  .gallery-title h2 {
    font-size: 2rem;
  }
}

/* モバイルでのスワイプ操作のサポート */
@media (max-width: 768px) {
  .gallery-wrapper {
    touch-action: pan-x;
  }
}

/* エラーメッセージのスタイル */
.error-message {
  padding: 20px;
  text-align: center;
  color: #555;
  font-style: italic;
}

.minibbs-gallery-section {
  padding: 80px 20px;
  background-color: #f9f9f9;
  position: relative;
}

.minibbs-gallery-section .gallery-title {
  text-align: center;
  margin-bottom: 10px;
}

.minibbs-gallery-section .gallery-title h2 {
  font-size: 2.5rem;
  font-weight: 600;
  color: #1d1d1f;
  position: relative;
  display: inline-block;
}

/* タイトル下の装飾線を非表示にする */
.minibbs-gallery-section .gallery-title h2::after {
  display: none;
}

.minibbs-gallery-section .gallery-scroller {
  position: relative;
  max-width: 100%;
  overflow: hidden;
  padding: 20px 0;
}

.minibbs-gallery-section .gallery-wrapper {
  display: flex;
  transition: transform 0.5s ease;
  gap: 20px;
  padding: 0 40px;
}

.minibbs-gallery-section .gallery-slide {
  flex: 0 0 auto;
  width: 300px;
  height: 300px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.minibbs-gallery-section .gallery-slide:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.minibbs-gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.minibbs-gallery-section .gallery-slide:hover .minibbs-gallery-image {
  transform: scale(1.1);
}

.photo-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
  color: white;
  padding: 15px 10px 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
}

.photo-title {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-date {
  font-size: 0.8rem;
  opacity: 0.8;
}

.minibbs-gallery-section .gallery-slide:hover .photo-info {
  opacity: 1;
}

.minibbs-gallery-section .gallery-controls {
  position: absolute;
  width: 100%;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
  z-index: 10;
}

.minibbs-gallery-section .gallery-control {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  font-size: 0.9rem;
  font-weight: bold;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.minibbs-gallery-section .gallery-control:hover {
  background: rgba(0, 0, 0, 0.7);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transform: scale(1.1);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .minibbs-gallery-section .gallery-slide {
    width: 300px;
    height: 300px;
  }

  .minibbs-gallery-section .gallery-title h2 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .minibbs-gallery-section .gallery-slide {
    width: 200px;
    height: 200px;
  }

  .photo-title {
    font-size: 0.85rem;
  }
}

/* モバイルでのスワイプ操作のサポート */
@media (max-width: 768px) {
  .minibbs-gallery-section .gallery-wrapper {
    touch-action: pan-x;
  }
}

/* エラーメッセージのスタイル */
.minibbs-gallery-section .error-message {
  padding: 20px;
  text-align: center;
  color: #555;
  font-style: italic;
}

.no-posts-message {
  width: 100%;
  text-align: center;
  padding: 50px 20px;
  color: #666;
  font-size: 1.1rem;
  font-style: italic;
}

.minibbs-gallery-section .gallery-scroller {
  min-height: 220px;
  /* 最小の高さを設定 */
}

/* クローンスライドのスタイル */
.clone-slide {
  flex: 0 0 auto;
}

/* ギャラリーのトランジションを滑らかにする */
.gallery-wrapper {
  transition: transform 0.5s ease;
}

/* スクロールバーの問題を修正 */
.gallery-scroller {
  overflow: hidden;
}
