/* ===============================
   teacher.css（講師紹介ページ用）
   PC：2列×2段
   SP：1列
   =============================== */

body {
    font-family: 'Rounded M PLUS 1c', 'Noto Sans JP', sans-serif;
    background: #fff;
    margin: 0;
    padding: 0;
    text-align: center;
}

.teacher-wrapper {
    width: 60%;
    margin: 0 auto;
}

.back-to-feature {
    display: block;
    width: 200px;
    border-radius: 10px;
    font-size: 1.4rem;
    padding: 10px 20px;
    margin: 40px 0 60px;
    margin-left: auto;
    background: linear-gradient(90deg, #7d9aae 0%, #c1e6eb 40%,  #c1e6eb 50%,  #c1e6eb 60%, #5f7585 100%);
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.2s;
}

.back-to-feature:hover {
    transform: scale(1.05);
}

/* ====== グリッドレイアウト ====== */
/* PC：2列 */
.feature-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 80px 40px;
    justify-items: center;
    width: 100%;
    margin: 0 auto;
}

/* ====== カード ====== */
.featurecard {
    width: 320px;
    height: 360px;
    perspective: 1000px;
}

.featurecard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    transform-origin: center 180px;
}

/* ホバーで回転（PCのみ） */
@media (hover: hover) {
    .featurecard:hover .featurecard-inner {
        transform: rotateY(180deg) rotateZ(90deg);
    }
}

/* ====== 表面・裏面 ====== */
.featurecard-front,
.featurecard-back {
    position: absolute;
    width: 320px;
    height: 400px;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    border-radius: 10px;
    background: rgba(255, 251, 242, 1);
    box-sizing: border-box;
}

/* ====== 表面 ====== */
.featurecard-front {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.featurecard-front img {
    width: 250px;
}

.featurecard-front .teacher {
    margin-top: 20px;
    font-size: 20px;
    color: rgba(255, 251, 242, 1);
    -webkit-text-stroke: 2px rgba(91, 91, 91, 1);
}

.featurecard-front .teacher-name {
    font-size: 48px;
    color: rgba(255, 251, 242, 1);
    -webkit-text-stroke: 2px rgba(91, 91, 91, 1);
}

/* 表のアクセントバー */
.featurecard-front::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 16px;
    border-radius: 24px 24px 0 0;
    background: linear-gradient(
        90deg,
        rgba(248, 176, 90, 1) 0%,
        rgba(255, 232, 109, 1) 50%,
        rgba(255, 141, 0, 1) 100%
    );
}

/* ====== 裏面 ====== */
.featurecard-back {
    transform: rotateY(180deg) rotateZ(90deg);
    padding: 20px;
}

.featurecard-back .teacher-message {
    margin-top: 40px;
    line-height: 1.6;
    font-size: 14px;
    text-align: left;
}

.featurecard-back::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 16px;
    border-radius: 24px 24px 0 0;
    background: linear-gradient(
        90deg,
        rgba(248, 176, 90, 1) 0%,
        rgba(255, 232, 109, 1) 50%,
        rgba(255, 141, 0, 1) 100%
    );
}

/* ====== SP：1列に変更 ====== */
@media (max-width: 768px) {
    .feature-cards {
        grid-template-columns: repeat(1, 1fr);
    }

    .featurecard {
        transform: scale(0.95);
    }
}
