/* カルーセル全体のコンテナ */
.swiper {
    width: 100%;
    margin-top: 10px;    /* 上に10pxの余白 */
    padding: 20px 0 50px; /* 下にドット用の余白 */
    overflow: hidden; 
}

/* スライドの枠組み */
.school-panel__box {
    position: relative;   /* テキストを重ねる基準 */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 2 / 1;  /* アス比 2:1 固定 */
    background: #f4f4f4;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

/* 中の画像の設定 */
.school-panel__box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease; /* ホバー時のズーム用 */
}

/* --- ロールオーバー設定 --- */

/* 黒い透過背景 */
.school-panel__box::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

/* data-labelの内容を表示 */
.school-panel__box::after {
    content: attr(data-label);
    position: absolute;
    z-index: 2;
    color: #fff;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    line-height: 1.4;
    font-weight: bold;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    text-align: center;
    padding: 0 10px;
}

/* ホバー時の変化（背景・文字・画像ズーム） */
.school-panel__box:hover::before,
.school-panel__box:hover::after {
    opacity: 1;
}
.school-panel__box:hover::after {
    transform: translateY(0);
}
.school-panel__box:hover img {
    transform: scale(1.05);
}

/* --- Swiperパーツの設定 --- */

/* 矢印ボタン */
.swiper-button-next, .swiper-button-prev {
    color: #333;
    background: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    z-index: 10;
}
.swiper-button-next::after, .swiper-button-prev::after {
    font-size: 20px;
}

/* 中央以外のスライドを少し薄くする */
.swiper-slide {
    opacity: 0.5;
    transition: opacity 0.3s;
}
.swiper-slide-active {
    opacity: 1;
}