@charset "UTF-8";

/* 背景色 */
body {
    background-color: var(--base);
}

/* ----------------------------
    黄色、緑色、茶色の丸の装飾の設定
-------------------------------*/
/* 基準 */
main {
    position: relative;
    overflow: hidden;
}
/* 各セクションを基準にする設定 */
.question,
.section-like,
.section-growth {
    position: relative;
}

/* 茶色の丸 */
.question .brown-circle {
    position: absolute;
    top: 70px;
    left: -50px;
    z-index: -1;
}

@media screen and (min-width:768px) {
    .question .brown-circle {
        left: -150px;
    }
}

/* 緑色の丸 */
.section-like .green-circle {
    position: absolute;
    top: -50px;
    right: -50px;
    z-index: -1;
}
@media screen and (min-width:768px){
    .section-like .green-circle{
        right: -83px;
    }
}
@media screen and (min-width:1025px){
    .section-like .green-circle{
        right: -100px;
    }
}

/* 黄色の丸 */
.section-growth .yellow-circle {
    position: absolute;
    top: -50px;
    left: -50px;
    z-index: -1;
}

@media screen and (min-width:768px) {
    .section-growth .yellow-circle {
        left: -170px;
    }
}
@media screen and (min-width:1025px){
    .section-growth .yellow-circle{
        left: -200px;
    }
}

/* ----------------------------
    キービジュアルの設定
-------------------------------*/
/* 「フリースクール無限大とは」の基準 */
.freeschool-kv {
    width: 100%;
    height: 70vh;
    position: relative;
}

/* キービジュアルの写真*/
.freeschool-kv img {
    width: 100%;
    height: 70vh;
    object-fit: cover;
    object-position: top center;
    margin-top: -40px;
}

/* 「フリースクール無限大とは」の大きさと移動 */
.freeschool-kv h1 {
    font-size: 28px;
    font-weight: bold;
    display: inline-block;
    width: fit-content;
    height: auto;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.5);
    /* 背景を半透明に変更 */
    border-radius: 20px;
    padding: 20px;
    backdrop-filter: blur(10px);
    position: absolute;
    bottom: 20%;
    left: 35%;
    transform: translate(-50%, -50%);
}

@media screen and (min-width:768px) {
    .freeschool-kv h1 {
        font-size: 40px;
    }
}

@media screen and (min-width:1025px) {

    .freeschool-kv,
    .freeschool-kv img {
        height: 80vh;
    }

    .freeschool-kv h1 {
        left: 30%;
    }
}


/*----------------------------------------------
「フリースクール無限大とは」と下のセクションの区切り画像 
------------------------------------------------*/
.freeschool-kv::after {
    content: "";
    background: url(../img/decoration/section-yellowgreen.png);
    background-repeat: no-repeat;
    background-size: cover;
    position: absolute;
    left: 0;
    bottom: 5%;
    width: 100%;
    aspect-ratio: 288 / 37;
}

@media(min-width: 1025px) {
    .freeschool-kv::after {
        bottom: -5%;
    }
}

@media(min-width: 1440px) {
    .freeschool-kv::after {
        bottom: -10%;
    }
}

/* ----------------------------------------
    「学力や偏差値で人の価値を測れるのか？」の設定
------------------------------------------*/
/* 背景色 */
.question>.main_inner {
    background-color: #fff;
    border-radius: 20px;
    padding: 20px;
}

/* -----テキストでスマホ版は改行しない部分のため、brを非表示----- */
/* タイトル */
.question h2 br {
    display: none;
}
/* テキスト */
.question p br:nth-child(3) {
    display: none;
}

@media screen and (min-width:768px) {

    /* タブレット版・PC版テキストを中央揃え */
    .question>.main_inner {
        text-align: center;
    }

    /* テキストで中央揃えになるから、改行した方が綺麗になるので改行を表示 */
    .question h2 br {
        display: inline;
    }

    .question p br:nth-child(3) {
        display: inline;
    }
}

@media screen and (min-width:1025px) {

    /* 「ー学力や偏差値・・・測れるか？ー」のbrをPC版から改行なしにする */
    .question h2 br {
        display: none;
    }

}

/* ----------------------------------------
    「教育の本質は、子ども達が・・・」の設定
------------------------------------------*/
/* ------黄色の丸の装飾----- */
.philosophy {
    position: relative;
    overflow: hidden;}
    
/* -----「教育の本質は、子ども達が・・・」の改行------ */
.philosophy h2 br {
    display: none;
}

@media screen and (min-width:768px) {
    .philosophy h2 br {
        display: inline;
    }
}

/* -----「教育の本質は、子ども達が・・・」のアンダーライン----- */
/* アンダーラインの基準 */
.philosophy h2 {
    position: relative;
}

/* アンダーラインの設定 */
.philosophy h2::before {
    content: "";
    width: 100%;
    height: 7px;
    background: linear-gradient(to right,
            var(--main) 25%,
            var(--accent-yellow) 25% 50%,
            var(--gray) 50% 75%,
            var(--accent-brown) 75%);
    position: absolute;
    bottom: -10px;
    left: 0;
}

/* タブレット版・PC版テキストを中央揃え */
@media screen and (min-width:768px) {
    .philosophy {
        text-align: center;
    }
}

/* ----------------------------------------
    「好き・楽しい」「乗り越える力」の設定
------------------------------------------*/
/* -----グリッドの設定----- */
.like-challenge-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    grid-template-areas:
        "like-img"
        "like-text"
        "challenge-img"
        "challenge-text";
    width: 100%;
    row-gap: 40px;
    /*縦の余白*/
}

.like-img {
    grid-area: like-img;
    width: 90%;
    position: relative;
}

.like-text {
    grid-area: like-text;
    width: 90%;
    padding: 0 20px;
    position: relative;
}

.challenge-img {
    grid-area: challenge-img;
    width: 90%;
    position: relative;
    justify-self: flex-end;
    margin-top: 80px;
    /*好き・楽しいと乗り越える力の余白*/
}

.challenge-text {
    grid-area: challenge-text;
    width: 90%;
    justify-self: flex-end;
    padding: 0 20px;
    position: relative;
}

/* 「好き・楽しい」と「乗り越える力」のテキストの背景の設定 */
.like-text,
.challenge-text {
    background-color: var(--accent-yellow);
    padding: 20px;
    border-radius: 20px;
    /* アニメーションの初期状態（非表示で少し上に配置） */
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    visibility: hidden;
    /* アニメーション前は非表示 */
}

/* JSでクラスが付与されたらポップインアニメーションを開始 */
.like-text.is-visible,
.challenge-text.is-visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

/* 「好き・楽しい」と「乗り越える力」のテキストの吹き出しの設定 */
.like-text::before,
.challenge-text::before {
    content: "";
    width: 0;
    height: 0;
    border-style: solid;
    border-right: 15px solid transparent;
    border-left: 15px solid transparent;
    border-bottom: 30px solid var(--accent-yellow);
    border-top: 0;
    position: absolute;
    top: -30px;
    transform: translateX(-50%);
    z-index: 1;
}

.like-text::before {
    left: 10%;
}

.challenge-text::before {
    right: 10%;
}

@media screen and (min-width:768px) {

    /* グリッドの設定 */
    .like-challenge-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        grid-template-areas:
            "like-img like-text"
            "challenge-text challenge-img";
        row-gap: 80px;
        position: relative;
        /*足跡の装飾の基準*/
    }

    /* テキストの横幅を適切に */
    .like-text,
    .challenge-text {
        width: 100%;
        align-self: center;
    }

    /* 乗り越える力の写真の上のマージンを消す */
    .challenge-img {
        margin-top: 0px;
    }

    /* 「好き・楽しい」のテキストの吹き出しの設定 */
    .like-text::before {
        top: 30px;
        left: -30px;
        border-style: solid;
        border-top: 15px solid transparent;
        border-bottom: 15px solid transparent;
        border-right: 30px solid var(--accent-yellow);
        border-left: 0;
        transform: translateX(0%);
        /*スマホ版の打ち消し*/
    }

    /* 「乗り越える力」のテキストの吹き出しの設定 */
    .challenge-text::before {
        top: 40px;
        right: -30px;
        border-style: solid;
        border-top: 15px solid transparent;
        border-bottom: 15px solid transparent;
        border-left: 30px solid var(--accent-yellow);
        border-right: 0;
        transform: translateX(0%);
        /*スマホ版の打ち消し*/
    }
}

@media screen and (min-width:1025px) {

    /* テキストの横幅を適切に */
    .like-text,
    .challenge-text {
        width: 80%;
    }

    /* 「好き・楽しい」と「乗り越える力」の背景色 */
    .like-text,
    .challenge-text {
        padding: 60px 40px;
    }
}


/* --------「好き・楽しい」「乗り越える力」のスライドショー設定------- */
/* 大枠の設定 */
.like-challenge-slider {
    width: 100%;
    aspect-ratio: 4/3;
    position: relative;
    overflow: hidden;
    /* はみ出した画像を隠し、角丸を適用します */
}

/* 大枠の設定（「好き・楽しい」の大枠） */
.like-slider-wrapper {
    border-radius: 0px 20px 20px 0px;
}

/* 大枠の設定（「乗り越える力」の大枠） */
.challenge-slider-wrapper {
    border-radius: 20px 0px 0px 20px;
}

.like-challenge-slider li {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    animation: like-img-fade 12s infinite;
    /* 画像3枚 × 3秒 = 9秒 */
}

.like-challenge-slider li img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.like-challenge-slider li:nth-child(2) {
    animation-delay: 4s;
}

.like-challenge-slider li:nth-child(3) {
    animation-delay: 8s;
}

@keyframes like-img-fade {
    0% {
        opacity: 0;
    }

    6% {
        opacity: 1;
    }

    /* 0.5秒かけてフェードイン */
    33% {
        opacity: 1;
    }

    /* 表示維持 */
    39% {
        opacity: 0;
    }

    /* 0.5秒かけてフェードアウト */
    100% {
        opacity: 0;
    }
}


/* ----------------------------------------
        「生きる力を育てる学校」の設定
------------------------------------------*/
/* -----写真と文字のグリッドの設定 ------*/
.growth-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto auto;
    grid-template-areas:
        "growth-grid-text"
        "growth-grid-img1"
        "growth-grid-img2"
        "growth-grid-img3"
        "growth-grid-img4";
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px;
    row-gap: 20px;
    column-gap: 20px;
}

@media screen and (min-width:768px) {

    .growth-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto auto;
        grid-template-areas:
            "growth-grid-text growth-grid-text"
            "growth-grid-img1 growth-grid-img2"
            "growth-grid-img3 growth-grid-img4";
    }
}

@media screen and (min-width:1025px) {
    .growth-grid {
        width: 100%;
        aspect-ratio: 16/9;
        grid-template-columns: 1fr 30% 1fr;
        grid-template-rows: auto auto;
        grid-template-areas:
            "growth-grid-img1 growth-grid-text growth-grid-img2"
            "growth-grid-img3 growth-grid-text growth-grid-img4";
        max-width: 1160px;
        /*main_innerと同じ*/
        padding: 20px;
    }
}


/* ------写真の設定------- */
.growth-grid img {
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center;
    border-radius: 20px;
    /* アニメーションの初期状態 */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* 親要素(.growth-grid)にis-visibleクラスが付与されたらアニメーションを開始 */
.growth-grid.is-visible img {
    opacity: 1;
    transform: translateY(0);
}

.growth-grid-text {
    grid-area: growth-grid-text;
    justify-self: center;
}

.growth-grid-img1 {
    grid-area: growth-grid-img1;
}

.growth-grid-img2 {
    grid-area: growth-grid-img2;
}

.growth-grid-img3 {
    grid-area: growth-grid-img3;
}

.growth-grid-img4 {
    grid-area: growth-grid-img4;
}

/* 各画像に時間差でアニメーションを適用 */
.growth-grid-img2 img,
img.growth-grid-img2 {
    transition-delay: 0.4s;
}

.growth-grid-img3 img,
img.growth-grid-img3 {
    transition-delay: 0.8s;
}

.growth-grid-img4 img,
img.growth-grid-img4 {
    transition-delay: 1.2s;
}

/* ------文字の設定------- */
/* 文字を縦書きにする */
.growth-grid-text {
    writing-mode: vertical-rl;
}

/* 「生きる力を育てる学校」の大きさ */
.growth-grid-text h2 {
    font-size: 40px;
}