/* ================================================
   ボランティアコンポーネント
   ================================================ */

/* 共通スタイル */
.Volunteer .Mv {
  height: unset;
  position: relative;
  overflow: hidden;
}

/* メインビジュアルのアニメーション最適化 */
.Volunteer .Mv_bg {
  position: relative;
  display: block;
  overflow: hidden;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.Volunteer .Mv_bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    45deg,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(0, 0, 0, 0) 100%
  );
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  animation: fadeIn 1.5s ease-out 0.8s forwards;
}

.Volunteer .Mv_bg img {
  width: 100%;
  height: auto;
  display: block;
  transform: scale(1.02);
  transition: transform 8s cubic-bezier(0.215, 0.61, 0.355, 1);
  will-change: transform;
  backface-visibility: hidden;
}

.Volunteer .Mv_bg:hover img {
  transform: scale(1.05);
}

.Volunteer .Mv_bg img.pc {
  opacity: 0;
  animation: fadeInScale 2s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

.Volunteer .Mv_bg img.sp {
  display: none;
  opacity: 0;
}

@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(1.02) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1.02) translateY(0);
  }
}

/* グラデーションオーバーレイの最適化 */
.Volunteer .Mv::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0) 20%,
    rgba(0, 0, 0, 0) 80%,
    rgba(0, 0, 0, 0.2) 100%
  );
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  animation: fadeIn 1.5s ease-out 0.5s forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
  .Volunteer .Mv_bg img.pc {
    display: none;
  }

  .Volunteer .Mv_bg img.sp {
    display: block;
    opacity: 0;
    animation: fadeInScale 2s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
  }

  @keyframes fadeInScale {
    0% {
      opacity: 0;
      transform: scale(1.02) translateY(10px);
    }
    100% {
      opacity: 1;
      transform: scale(1.02) translateY(0);
    }
  }
}

.Volunteer_wrapper {
  padding: 10vw 1.4285714286vw 5vw;
  max-width: 840px;
  margin: 0 auto;
}

.Volunteer_wrapper p {
  line-height: 2.4;
  color: #000;
  font-weight: 700;
  margin-bottom: 1.4285714286vw;
}

.Volunteer_wrapper table {
  width: 100%;
  margin: 2.1428571429vw 0;
  border-collapse: collapse;
}

.Volunteer_wrapper table tr {
  width: 100%;
  border-bottom: 1px solid #eee;
}

.Volunteer_wrapper table th,
.Volunteer_wrapper table td {
  padding: 0.7142857143vw;
  vertical-align: text-top;
  line-height: 1.8;
}

.Volunteer_wrapper table th {
  white-space: nowrap;
  font-weight: 700;
  color: #333;
  width: 25%;
}

.Volunteer_wrapper table td {
  color: #000;
  font-weight: 700;
}

.Volunteer_title {
  font-size: 2.1428571429vw;
  font-weight: 700;
  color: #333;
  text-align: center;
  margin-bottom: 3.5714285714vw;
}

.Volunteer_subtitle {
  font-size: 1.4285714286vw;
  font-weight: 700;
  color: #333;
  margin-bottom: 1.4285714286vw;
  padding-bottom: 0.7142857143vw;
  border-bottom: 1px solid #eee;
}

.Volunteer .LeadSection .title {
  width: 21.4285714286vw;
  margin: 0 auto;
}

.Volunteer .LeadSection .text {
  padding: 0 1.4285714286vw;
  margin: 4.2857142857vw auto;
  text-align: left;
  max-width: 840px;
  line-height: 250%;
  color: #000;
  font-weight: 700;
}

.Volunteer .LeadSection .text span {
  text-align: right;
  display: block;
  margin-top: 2.8571428571vw;
  font-weight: 700;
  color: #000;
}

.Volunteer .LeadSection .banner {
  display: grid;
  place-items: center;
  max-width: 784px;
  margin: 0 auto 7.1428571429vw;
}

.Volunteer .LeadSection .banner img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.Volunteer .imageSection img {
  width: 100%;
  height: auto;
  display: block;
  margin: 2.8571428571vw 0;
}

.Volunteer .ContentsTitle {
  text-align: center;
  letter-spacing: 0.25em;
  font-weight: 700;
  color: #333;
  margin-bottom: 2.8571428571vw;
}

/* 2024年の成果セクション */
.Volunteer_achievements {
  padding: 5vw 1.4285714286vw;
  max-width: 840px;
  margin: 0 auto;
}

.Volunteer_achievements .text {
  color: #000;
  text-align: left;
  font-weight: 700;
  line-height: 2;
}

/* ギャラリーセクション */
.Volunteer_gallery {
  padding: 5vw 1.4285714286vw;
  max-width: 1400px;
  margin: 0 auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2vw;
  margin: 3vw 0;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  aspect-ratio: 16/9;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  will-change: transform;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* 参加者の声セクション */
.Volunteer_testimonials {
  padding: 12vw 1.4285714286vw;
  max-width: 1400px;
  margin: 0 auto;
  background: linear-gradient(135deg, #f5f9f2 0%, #ffffff 50%, #f5f9f2 100%);
  position: relative;
  overflow: hidden;
}

.Volunteer_testimonials::before,
.Volunteer_testimonials::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(0,0,0,0.1), transparent);
}

.Volunteer_testimonials::before {
  top: 0;
}

.Volunteer_testimonials::after {
  bottom: 0;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8vw;
  margin-top: 6vw;
  position: relative;
}

.testimonial-item {
  background: rgba(255, 255, 255, 0.95);
  padding: 5vw;
  border-radius: 30px;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.05),
    0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  will-change: transform;
}

.testimonial-item:hover {
  transform: translateY(-8px) scale(1.02);
}

.testimonial-item .profile {
  display: flex;
  align-items: center;
  margin-bottom: 4vw;
  position: relative;
  z-index: 1;
}

.testimonial-item .profile img {
  width: 10vw;
  height: 10vw;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 2.5vw;
  border: 5px solid #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.testimonial-item:hover .profile img {
  transform: scale(1.05);
}

.testimonial-item .info {
  flex: 1;
}

.testimonial-item .name {
  font-size: 1.6vw;
  font-weight: 700;
  color: #333;
  margin-bottom: 0.8vw;
  position: relative;
  display: inline-block;
  letter-spacing: 0.05em;
}

.testimonial-item .name .ruby {
  display: block;
  font-size: 1vw;
  font-weight: 400;
  color: #666;
  margin-top: 0.4vw;
  letter-spacing: 0.1em;
}

.testimonial-item .testimonial {
  line-height: 2.2;
  color: #000;
  position: relative;
  z-index: 1;
  flex: 1;
  letter-spacing: 0.02em;
  font-weight: 700;
}

/* スクロールアニメーション用の基本スタイル */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity;
}

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

/* 遅延用のクラス */
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
  .Volunteer_wrapper {
    padding: 15vw 5.3333333333vw 10vw;
    max-width: 100%;
    overflow-x: hidden;
  }

  .Volunteer_wrapper p {
    line-height: 2;
    font-size: 3.7333333333vw;
    margin-bottom: 4vw;
  }

  .Volunteer_wrapper table {
    width: 100%;
    margin: 4vw 0;
    table-layout: fixed;
    word-wrap: break-word;
  }

  .Volunteer_wrapper table tr {
    display: block;
    padding: 3vw 0;
  }

  .Volunteer_wrapper table th,
  .Volunteer_wrapper table td {
    width: 100%;
    display: block;
    padding: 0;
    font-size: 3.7333333333vw;
    box-sizing: border-box;
    word-break: break-word;
  }

  .Volunteer_wrapper table th {
    margin-bottom: 2vw;
    padding-bottom: 1vw;
  }

  .Volunteer_wrapper table td {
    margin-top: 2vw;
    margin-bottom: 4vw;
  }

  .Volunteer_wrapper table td ul {
    padding-left: 4vw;
    margin: 2vw 0;
  }

  .Volunteer_wrapper table td ul li {
    margin-bottom: 2vw;
    line-height: 1.6;
  }

  .Volunteer_wrapper table td a {
    word-break: break-all;
  }

  .Volunteer_wrapper table tr:last-child {
    border-bottom: none;
  }

  .Volunteer_wrapper table tr.adjust th,
  .Volunteer_wrapper table tr.adjust td {
    padding: 3vw 0;
    width: 100%;
    display: block;
  }

  .Volunteer_wrapper table tr.adjust th {
    border-bottom: none;
    margin-bottom: 0;
    font-size: 4vw;
    line-height: 1.4;
  }

  .Volunteer_wrapper table tr.adjust td {
    margin-top: 0;
    padding-top: 2vw;
  }

  .Volunteer_wrapper table tr.adjust td br {
    display: block;
    content: "";
    margin: 1vw 0;
  }

  .Volunteer_wrapper table tr.adjust td a {
    display: inline-block;
    margin: 2vw 0;
    word-break: break-all;
  }

  .Volunteer_wrapper table tr.adjust td ul {
    margin: 2vw 0;
  }

  .Volunteer_wrapper table tr.adjust td ul li {
    margin-bottom: 1.5vw;
  }

  .Volunteer_title {
    font-size: 5.3333333333vw;
    margin-bottom: 8vw;
    letter-spacing: 0.1em;
  }

  .Volunteer_subtitle {
    font-size: 4.2666666667vw;
    margin-bottom: 4vw;
    padding-bottom: 2.6666666667vw;
  }

  .Volunteer .LeadSection .title {
    width: 70vw;
    margin: 0 auto;
  }

  .Volunteer .LeadSection .text {
    padding: 0;
    margin: 12vw auto;
    line-height: 2;
    font-size: 3.7333333333vw;
  }

  .Volunteer .LeadSection .text span {
    margin-top: 6vw;
  }

  .Volunteer .LeadSection .banner {
    max-width: unset;
    margin: 0 auto 15vw;
    width: 90%;
  }

  .Volunteer .imageSection img {
    margin: 8vw 0;
    border-radius: 10px;
  }

  .Volunteer .ContentsTitle {
    font-size: 4.8vw;
    margin-bottom: 6.6666666667vw;
    letter-spacing: 0.1em;
  }

  .Volunteer_achievements {
    padding: 10vw 5.3333333333vw;
  }

  .Volunteer_achievements .text {
    font-size: 3.7333333333vw;
  }

  .Volunteer_gallery {
    padding: 10vw 5.3333333333vw;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 4vw;
  }

  .gallery-item {
    aspect-ratio: 16/9;
    border-radius: 10px;
  }

  .gallery-item .caption {
    padding: 2.5vw;
    font-size: 3.2vw;
  }

  .Volunteer_testimonials {
    padding: 15vw 5.3333333333vw;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 12vw;
    margin-top: 8vw;
  }

  .testimonial-item {
    padding: 8vw;
    border-radius: 20px;
    transform: none !important;
  }

  .testimonial-item:hover {
    transform: translateY(-5px) scale(1.01) !important;
  }

  .testimonial-item .profile {
    margin-bottom: 6vw;
  }

  .testimonial-item .profile img {
    width: 25vw;
    height: 25vw;
    margin-right: 6vw;
    border-width: 4px;
  }

  .testimonial-item .name {
    font-size: 5vw;
    margin-bottom: 2vw;
  }

  .testimonial-item .name .ruby {
    font-size: 3.5vw;
    margin-top: 1vw;
  }

  .testimonial-item .testimonial {
    font-size: 3.7333333333vw;
    line-height: 2;
  }
}