/* メインビジュアルの画像 */
.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* メインビジュアル */
.main-visual {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.image-slider {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s ease-in-out, transform 5s ease-in-out;
    transform: scale(1);  /* 初期サイズ */
}

.image-slide.active {
    opacity: 1;
    transform: scale(1.15); /* ズームイン効果（5%ズーム） */
}


/* ボックス */
/* セクション全体 */
.section.inner {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 60px 20px;
    flex-wrap: wrap;
  }
  
  /* 共通スタイル */
  .box {
    position: relative;
    width: 280px;
    height: 440px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    transition: transform 0.3s ease;
  }
  
  .box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
  }
  
  /* ---------- ▼ 左（奇数番目） ---------- */
  .box:nth-child(odd)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1); /* グレーのベール */
    transition: width 0.4s ease;
    z-index: 1;
    pointer-events: none;
  }
  
  .box:nth-child(odd):hover::before {
    width: 100%;
  }
  
  /* テキスト（黒） */
  .box:nth-child(odd) .text {
    color: #000;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.3), transparent);
  }
  
  /* ---------- ▼ 右（偶数番目） ---------- */
  .box:nth-child(even)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: rgba(0, 64, 32, 0.3); /* 緑ベール */
    transition: width 0.4s ease;
    z-index: 1;
    pointer-events: none;
  }
  
  .box:nth-child(even):hover::before {
    width: 100%;
  }
  
  /* テキスト（白） */
  .box:nth-child(even) .text {
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
  }

  .box:nth-child(even) .text h3 {
    color: #fff;
  }
  
  
  /* 共通テキスト配置 */
  .box .text {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 20px;
    z-index: 2;
    width: 100%;
    box-sizing: border-box;
  }
  
  .box .text h3 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
  }
  
  .box .text p {
    margin: 5px 0 0;
    font-size: 14px;
  }

  



  
  @media (max-width: 768px) {
   
    .section.inner {
        flex-direction: column;
        align-items: center;
        padding: 40px 10px;
    }

    .box {
        width: 100%;
        max-width: 500px; /* スマホに合わせた適度な最大幅 */
        height: auto;
        margin-bottom: 30px;
    }

    .box img {
        width: 100%;
        height: 500px;
        object-fit: cover;
    }

}

@media (min-width: 1000px) {
    .main-visual {
        height: 700px; /* 画面が大きいときの高さ */
    }
}
