@charset "utf-8";

/* sp View   ～768px  ----------------------------------------------------------------------------------------------*/

/*section:nth-of-type(n){
    all: initial;
}
section::before,
section::after{
    all: initial;
    content: none !important;
}*/

html,
body {
  margin: 0;
  padding: 0;
}
#class{
    position: relative;
    max-width: 960px;
    margin: 0 auto;
}
#class .sub_title{
    text-align: center;
}
/* --- スマホ用（共通設定：縦並び） --- */
.class_element {
  display: grid;
  grid-template-areas:
    "title"
    "image"
    "text";
  gap: 6px;
  margin-bottom: 50px;
}

.class_title { grid-area: title; }
.class_image { grid-area: image; }
.class_text  { grid-area: text; }

#class .class_element{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2em;
}
#class .class_element div{
    margin-bottom: 6px;
}
#class .class_element .class_title{
    position: relative;
    line-height: 1.6;
    font-size: 18px;
    padding-left: 24px;
    text-align: left;
}
#class .class_element .class_title::before{
    content: "";
    position: absolute;
    left: -0.2em;
    top: 0em;
    background: url("../img/class/icon_flower.png") no-repeat center;
    background-size: contain;
    width: 1.5em;
    height: 1.5em; 
}

#class .class_element .class_img{
    width: 320px;
}
#class .class_element .class_img img{
    max-width: 480px;
    width: 240px;
    border-radius: 10px;
}
#class .class_element .class_text{
    text-align: left;
    background-color: #FFF06E;
    align-self: center;
    width: auto;
    max-width: 640px;
    border-radius: 60px;
    padding: 1em 2em;
}

#msg3 {
    transform: rotate(10deg); 
    transition: transform 0.3s ease;
}

#msg3:hover {
    transform: rotate(0deg) scale(1.05);
}
.msg3_container{
    display: block;
    position: relative;
    right: -50px;
    width: 300px;
    height: auto;

    /* 登場アニメーションの設定 */
    animation: pop_in_animation 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transform-origin: center bottom;
    opacity: 0; /* 最初は非表示 */
}
/* 登場時のアニメーション（ポップアップ） */
@keyframes pop_in_animation {
    0% { 
        opacity: 0;
        transform: scale(0.5) rotate(0deg);
    }
    70% {
        transform: scale(1.1) rotate(15deg);
    }
    100% { 
        opacity: 1;
        transform: scale(1) rotate(0deg); /* 最終的に少し傾いた状態で止まる */
    }
}
/*--- Tablet View ---------------------------------------------------------------------------------------------------------*/
@media (min-width: 768px){
    
    main{
        padding-top: 60px;
    }
    /* --- PC用（横並び・順序入れ替え） --- */
    .class_element {
        display: grid !important;
        max-width: 960px;
        margin: 0 auto;
        
    }
    .msg3_container{
        position: absolute;
        top: 0px;
        right: -100px;
        width: 320px;
        height: auto;
    }
    #class .class_element .class_title{
        font-size: 28px;
        padding-left: 36px;
    }
    #class .class_element .class_title::before{
        font-size: 28px;
        /*padding-left: 36px;*/
        /*width: 28px;
        height: 28px; */

    }
    /* 奇数行: 説明文(1) タイトル(2) 画像(3) */
    .class_element:nth-of-type(odd) {
        grid-template-columns: 480px 1fr;
        grid-template-areas:
            "title title"
            "image text";
        gap: 6px;
    }
    #class .class_element:nth-of-type(odd) .class_title {
        justify-self: start;
    }

    /* 偶数行: 画像(1) タイトル(2) 説明文(3) */
    .class_element:nth-of-type(even) {
        grid-template-columns: 1fr 480px;
        grid-template-areas:
            "title title"
            "text image";
        gap: 6px;
    }
    #class .class_element:nth-of-type(even) .class_title {
        justify-self: end;
    }
    #class .class_element .class_img{
        width: 480px;
    }
    #class .class_element .class_img img{
       /* max-width: 480px;*/
        width: 480px;
        border-radius: 10px;
    }
    .class_title {
        grid-area: title;
        /* 中央揃えにしたい場合 */
        justify-self: center; /* Grid内の左右中央 */
        align-self: center;   /* Grid内の上下中央 */

        /* 必要に応じてフォント調整 */
        text-orientation: upright; /* 英数字も横に倒さず直立させる設定 */
    }
}

/*--- Desktop View ---------------------------------------------------------------------------------------------------------*/
@media (min-width: 1024px){
}
