@charset "UTF-8";

*{
    margin: 1px;
    padding: 1px;
}

img{
    width: 100%;
    height: 100%;
    /* background-size: contain; */
    object-fit: contain;

    /* フレックスにしたとき、ブラウザの比率にあわせて縦横の比率をいい感じに揃えてくれる */
}

/* aボタン部分、リンク部分全体にかかる表示 */
a{
    display: block;
    text-decoration: none;
    color: black;
}

#wrap {
    width: 100%;
}
/* header */
/* ヘッダー部分にフレックスをかける
 */
header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    height: 105px;
    background-color:white;
}

header > h1 img{
width: 39%;
}

h1{
    width:300px;}

nav p{
    width: 70px;
    line-height: 70px;
    background-color: black;
    text-align: center;
    color: white;
    font-size: 2em;
}


/* メニュー部分の位置、表示について・・*/
ul{
    width: 100%;
    display: none;
    list-style: none;
    position: absolute;
    top: 105px;
    left: 0;
    /* 階層を上にする。数字が多い方が上になる */
    z-index: 999;
}

li{
    line-height: 30px;
    background-color: white;
    text-align: right;

}
/* ボタン部分の、カーソルが来た時点での動きについて */
a:hover{
    background-color: rgba(0, 0, 0, 0.507);
}

/* main */
/* ＞はメインの孫ｐにつけるセレクタ */
main > div p {
    padding: 10px 0;
    line-height: 1.7;
    text-align: left;
    font-weight: bold;
}
main h2 {
    line-height: 25px;
    background-color: red;
    text-align: center;
    position: relative;
    color: white;
    font-size: x-small;
    /* spanの、position: absolute;の基準指定 */
    /* 文字あわせ、なくてもよい */
}
/* htmlでspanと記述した部分、体験の小さいコピー　
ピクセルで指定せず、%で指定すると移動しても融通がきく */
/* main h2 span {
    font-size: 14px;
    position: absolute;
    top: 0;
    left: 70%; */
/* } */
main section div{
    display: flex;
    flex-wrap: wrap;
    /* justify-content: space-between; */
    justify-content: center;
}

/* 画像の横幅を揃える */
main section div p{
    /* width: calc(49%-4px); */
    height: 155px;
    overflow: hidden;
}

/* nが代数、ｎ＝０のとき２，１のとき１、１と２に効く */
main section div p:nth-of-type(-n+2){
    margin-bottom: 10px;
}


/* footer */

footer h2 {
background-color: black;
text-align: center;
font-size: small;
line-height: 25px;
color: white;
}

/* 子セレクタ＞　divだけに効くように */
footer > div{
    display: flex;
    justify-content: space-between;
}
footer div div{
    padding: 20px;
}

/* 子セレクタ―divの中のｐ */
footer >div >p{
    width: 50px;
    font-size:xx-small;
}

footer img{
    object-fit: contain;
    /* objectfit containは縦横の中に収まるようにする */
}

/* MediaQuery スクリーンと条件づけ、781px以上 */

@media screen and (min-width:781px) {
    /* header */
    /* リストのディスプレイをフレックスでよみがえらせる、150pxの幅で */
    ul{
        display: flex;
        position: static;
        /* positionをもとに戻す */
    }
    li{
        width: 200px;
        font-weight: bold;
        text-align: center;
        background-color: transparent;
        /* transparent は、透明の色をつけた */
    }
    nav p{
        display: none;
    }

    /* main */
    main {
        display: flex;
        flex-wrap: wrap;
    }

    /* 親のpaddingのTOPをあける */
    main > div{
        /* padding-top: 10px; */
        width: 100%; 
        height: 400px;
        background-image: url(kanjisvg/kanjiall.svg);
        background-repeat: no-repeat;
        background-size: cover;
    }
    main > div p {
        /* margin-left:20px; */
        /* width: 500px; */
        width: auto;
        background-color:rgba(255, 255, 255, 0.7);
    }
    main section {
        /* 親が１００％なので、その半分で入るように */
        width: 48%;
    }
    main section div p{
        width: 49%;
    }

    /* 全体の右側、左側を少し開ける
    main section:first-of-type {
        margin-left: 2%;
    }
    main section:last-of-type {
        margin-right: 2%;
    }
    main section:first-of-type div {
        margin-right: 1%;
    }
    main section:last-of-type div{
        margin-left: 1%;
    } */
    /* footer */
    /* footer{
        background-image: url(image/footerbg.jpg);
        background-repeat: no-repeat;
        background-position: right -10px bottom -70px;
        background-size: 50%; */
    /* }
    footer > div {
        width: 50%;
    } */

}
/* ここまでメディアクエリ */

/* scrollTOP */
#scrollTop{
    position: fixed;
    bottom: 20px;
    right: 10px;
    font-size: 2em;
}


p{
    position: relative;
}

#p1:hover:after,#p2:hover:after,#p3:hover:after,#p4:hover:after,#p5:hover:after,#p6:hover:after,#p7:hover:after,#p8:hover:after,#p9:hover:after,#p10:hover:after,#p11:hover:after,#p12:hover:after,#p13:hover:after,#p14:hover:after,#p15:hover:after,#p16:hover:after
{
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    position: absolute;
    top: 0;
    left: 0;
}
#p1:hover:after {
    background: rgba(255, 255, 255, 0.9) url(kanjisvg/kanji2-1.svg) no-repeat;
}
#p2:hover:after {
    background: rgba(255,255,255,.9) url(kanjisvg/kanji2-2.svg) no-repeat;
}
#p3:hover:after {
    background: rgba(255,255,255,.9) url(kanjisvg/kanji2-3.svg) no-repeat;
}
#p4:hover:after {
    background: rgba(255,255,255,.9) url(kanjisvg/kanji2-4.svg) no-repeat;
}
#p5:hover:after {
    background: rgba(255,255,255,.9) url(kanjisvg/kanji2-5.svg) no-repeat;
}
#p6:hover:after {
    background: rgba(255,255,255,.9) url(kanjisvg/kanji2-6.svg) no-repeat;
}
#p7:hover:after {
    background: rgba(255,255,255,.9) url(kanjisvg/kanji2-7.svg) no-repeat;
}
#p8:hover:after {
    background: rgba(255,255,255,.9) url(kanjisvg/kanji2-8.svg) no-repeat;
}
#p9:hover:after {
    background: rgba(255,255,255,.9) url(kanjisvg/kanji2-9.svg) no-repeat;
}
#p10:hover:after {
    background: rgba(255,255,255,.9) url(kanjisvg/kanji2-10.svg) no-repeat;
}
#p11:hover:after {
    background: rgba(255,255,255,.9) url(kanjisvg/kanji2-11.svg) no-repeat;
}
#p12:hover:after {
    background: rgba(255,255,255,.9) url(kanjisvg/kanji2-12.svg) no-repeat;
}
#p13:hover:after {
    background: rgba(255,255,255,.9) url(kanjisvg/kanji2-13.svg) no-repeat;
}
#p14:hover:after {
    background: rgba(255,255,255,.9) url(kanjisvg/kanji2-14.svg) no-repeat;
}
#p15:hover:after {
    background: rgba(255,255,255,.9) url(kanjisvg/kanji2-15.svg) no-repeat;
}
#p16:hover:after {
    background: rgba(255,255,255,.9) url(kanjisvg/kanji2-16.svg) no-repeat;
}


#1{
    width: 100%;
}