/* CSS Document */

@import url("image_fade.css");

/* sp View   ～768px  ----------------------------------------------------------------------------------------------*/
section .sub_title{
    font-size: 24px;
    color: var(--secondary-color);
    margin: 1em auto 0.5em;
    width: 100%;
}
section .sub_title2{
    font-size: 20px;
    color: #06F;
    margin: 1em auto 0.5em;
    width: 100%;
}
section .text{
    width: fit-content;
    display: inline-block;
    text-align: center;
    line-height: 1.2em;
    margin-bottom: 2em;
}
section .info_box .text{
    text-align: left;
}
.safety_element{
    padding-bottom: 4em;
}
.safety_element .responsive_text{
    font-size: 18px;
}

.safety_list{
    width: fit-content;
    line-height: 1.5em;

    list-style: none;
/*    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;*/
    text-align: left;
    margin: 0 auto 1em;
    padding: 0
}
.safety_list li{
    /*width: 100%;*/
    line-height: 1.5em;
    /*display: block;*/
    margin-bottom: 1em;
}
.safety_list li strong{
    display: block;
}
.safety_list li span{
    display: block;
    margin-left: 1em;
}

.photo_area{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
.photo_area img{
    width: 320px;
    height: auto;
    margin: 20px auto;
    border-radius: 10px;
}
.photo__container img{
    width: 100%;
    max-width: 800px;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    position: relative;
    background-color: #000;
    margin: 2em auto;
}
.text{
    font-size: 18px;
}
/*--- Tablet View ---------------------------------------------------------------------------------------------------------*/
@media (min-width: 768px){
/*    .photo__container img{
        width: 100%;
        max-width: 800px;
        height: auto;
        aspect-ratio: 16 / 9;
        object-fit: cover;
        overflow: hidden;
        border-radius: 10px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
        position: relative;
        background-color: #000;
        margin: 2em auto;
    }*/
    .photo_area img{
        width: 480px;
        height: auto;
        margin: 20px auto;
        border-radius: 10px;
    }
    .safety_element .responsive_text{
        font-size: 24px;
    }
    
    /* --- PC用（横並び・順序入れ替え） --- */
    .safety_element {
        display: grid !important;
        width: 90%;
        margin: 0 auto;
        /*grid-template-columns: repeat(3, 1fr);*/
        grid-template-columns: auto auto ;
        align-items: center;
    }
    /* 奇数行: 説明文(1) タイトル(2) 画像(3) */
    .safety_element:nth-of-type(odd) {
        grid-template-areas: "text image";
    }

    /* 偶数行: 画像(1) タイトル(2) 説明文(3) */
    .safety_element:nth-of-type(even) {
        grid-template-areas: "image  text";
    }
    .info_box{
        width: 60%;
        grid-area: text;
    }
    .text_group {
        grid-area: text; /* グリッドの「テキストエリア」に配置 */
        width: 60%;      /* info_boxと同じ幅を持たせる */
        margin: auto;
    }

    /* グループの中に入った時の info_box の設定変更 */
    .text_group .info_box {
        width: 100%;     /* 親(text_group)に合わせて幅いっぱいに */
        margin-top: 10px; /* ★タイトルとの間に少し隙間を空ける（お好みで） */
    }
    .text_group .comment{
        width: 100%;
        text-align: center;
        font-size: 24px;
        padding: 0 40px;
        margin-bottom: 2em;
        font-weight: bold;
        color: var(--secondary-color);
        
    }
    .info_box {
        /* ① ベース：黒い実線の枠 */
        position: relative;
        background-color: white; /* 背景は白 */
        border: 2px solid var(--secondary-color); /* 実線 */
        border-radius: 30px;     /* 角丸 */

        /* ★追加：実線の外側に2pxの白縁をつける */
        /* 0 0 0 2px white = 「ぼかしなし」「ズレなし」「広がり2px」「白」 */
        box-shadow: 0 0 0 4px white;

        /* テキストの余白 */
        padding: 20px 40px;
        margin: 20px auto;
        max-width: 600px;
        color: #333;
    }

    /* ② 点線シール（共通設定） */
    .info_box::before,
    .info_box::after {
        content: "";
        position: absolute;
        height: 10px;        /* 線を隠すのに十分な太さ */
        background: white;   /* 背景色（白）で実線を隠す */

        /* きれいなドットを描く */
        background-image: radial-gradient(circle, var(--secondary-color) 2px, transparent 2.5px);
        background-size: 10px 10px; /* ドットの間隔 */

        /* ★ここを変更：ズレ防止の魔法の設定 */
        background-repeat: round no-repeat; /* round = 端が切れないよう自動調整 */
        background-position: left center;   /* left  = 必ず左端のドットから開始 */
    }

    /* ③ 上の点線の位置と長さ */
    .info_box::before {
        top: -6px;      /* 枠線の上に被せる位置 */
        left: 40px;     /* 左からの開始位置 */
        width: 200px;   /* 点線の長さ */
        }

        /* ④ 下の点線の位置と長さ */
        .info_box::after {
        bottom: -6px;   /* 枠線の上に被せる位置 */
        right: 60px;    /* 右からの開始位置（左から指定したい場合は left: 100px; などに変更） */
        width: 150px;   /* 点線の長さ */
    }

    /* ⑤ タイトルなどの調整（必要であれば） */
    .info_box .sub_title {
/*        text-align: center;
        font-weight: bold;
        font-size: 1.2em;
        color: #00a500;
        margin-bottom: 20px;*/
        margin: 0 auto 1em;
    }
    .text {
        font-size: 1em;
        line-height: 1.8;
    }
    .photo_area{
        grid-area: image;
    }

}

