/* 合格者の声カルーセル レスポンシブ＆改善スタイル */

/* ---------- 共通 ---------- */
.testimonial-carousel {
    position: relative;
    /* 矢印を重ねるため */
    display: flex;
    align-items: center;
    justify-content: center;
    /* 左右矢印を中央寄せ */
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    z-index: 20;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.carousel-prev:hover,
.carousel-next:hover {
    opacity: 0.8;
    transform: translateY(-50%) scale(1.05);
}

.carousel-prev {
    left: 0px;
}

.carousel-next {
    right: 0px;
}

.arrow-icon {
    width: 32px;
    height: 32px;
}

/* スライドコンテナを可変に */
.testimonial-slides-container {
    width: 100%;
    max-width: 960px;
    height: auto;
    /* 高さを内容に合わせる */
    overflow: hidden;
    position: relative;
}

/* スライドの表示 / 非表示をクラスで制御 */
.testimonial-slide {
    display: none;
    /* 初期は非表示 */
    position: relative;
    /* height 自動調整のため relative に */
    flex-direction: row;
    width: 100%;
    background-color: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.testimonial-slide.active {
    display: flex;
    /* 表示 */
}

/* 各エレメント調整 */
.testimonial-person {
    width: 240px;
    flex-shrink: 0;
    text-align: center;
}

.testimonial-content {
    flex: 1;
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ---------- タブレット (≤ 992px) ---------- */
@media screen and (max-width: 992px) {
    .carousel-prev {
        left: -32px;
    }

    .carousel-next {
        right: -32px;
    }
}

/* ---------- モバイル (≤ 768px) ---------- */
@media screen and (max-width: 768px) {
    .testimonial-carousel {
        padding: 0 16px;
        /* 端の余白 */
    }

    .carousel-prev,
    .carousel-next {
        width: 32px;
        height: 32px;
    }

    .carousel-prev {
        left: -8px;
    }

    .carousel-next {
        right: -8px;
    }

    .testimonial-slide {
        flex-direction: column;
        /* 縦並び */
    }

    .testimonial-person {
        width: 100%;
        padding: 32px 16px 8px;
    }

    .testimonial-content {
        padding: 20px;
        width: 100%;
    }

    .testimonial-text {
        line-height: 1.6;
        letter-spacing: 1px;
        padding: 15px;
        text-align: left;
    }

    .testimonial-organization {
        font-size: 14px;
        margin-bottom: 15px;
        text-align: left;
    }
}

/* ---------- 小型モバイル (≤ 480px) ---------- */
@media screen and (max-width: 480px) {
    .arrow-icon {
        width: 24px;
        height: 24px;
    }

    .carousel-prev,
    .carousel-next {
        width: 28px;
        height: 28px;
    }

    .testimonial-content {
        padding: 24px 16px;
    }
}
