* {box-sizing:border-box;}


#container {
    max-width: 960px;
    margin: 0 auto;
    overflow-x:hidden;
    position: relative;
}

html {
    scroll-behavior: smooth;
}

main {
    padding: 15px;
}


h2 {
    font-size: 200%;
    border-left: 10px solid rgb(253, 179, 94);
    padding: 5px 15px;
    margin-bottom: 15px;
}

/*=============================================================================================
ヘッダー関係
=============================================================================================*/
header {
    margin-top: -5px;
    margin-left: 12px;
    padding-top: 10px;
    z-index: 1;
}

header #openBtn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: xx-large;
}

header #closeBtn {
    font-size: xx-large;
}

h1 img {
    width: 85%;
}

#active {
  scroll-margin-top: 130px; /* 固定ヘッダーの高さに合わせて調整 */
}




@media(max-width:959px) {
    header {
        position: fixed;
        width: 98%;
        background-color: #fff;
    }
}

@media(min-width:960px) {
    header {
        position: fixed;
        background-color: #fff;
    }
}

/*=============================================================================================
ナビゲーション関係
=============================================================================================*/

@media(max-width:959px) {
    nav {
    padding: 15px;
    background-color: #fff;
    position: absolute;
    width: 270px;
    top: 0;
    right: 0;
    transition: right 1.5s ease;
    }

    nav ul {
        border-top: 1px solid #000;
    }

    nav li {
        border-bottom: 1px solid #000;
    }

    nav ul li:last-child {border-right: none;}

    nav a {
        display: block;
        color: #000;
        text-decoration: none;
        padding: 0.5em 1em;
        margin: 0 10px;
    }

    nav a:hover {
        background-color: rgb(254, 254, 148);
    }

    nav p {
        text-align: right;
    }

    .open {
        right: -300px;
    }
}

@media(min-width:960px) {
    header h1 {
        width: 430px;
    }

    nav {
        width: calc(100% - 450px);
    }

    header #openBtn {
        display: none;
    }

    .flex960 {
        display: flex;
    }

    nav #closeBtn {
        display: none;
    }

    nav li {
        width: 25%;
    }

    nav ul li a {
        width: 8em;
        text-decoration: none;
        display: block;
        padding: 1em;
        color: #000;
        text-align: center;
        border-bottom: 3px solid #f80;
    }

    nav a:hover {background-color: rgb(255, 197, 131);}
}

/*=============================================================================================
活動関係
=============================================================================================*/
.active {
    margin-top: 5%;
    padding: 10px 0;
}


.active h3 {
    font-weight: bold;
    background-color: #f00;
    color: #fff;
    width: 13em;
    margin-left: 10px;
    margin-top: 20px;
    padding: 0.2em;
    text-align: center;
}


.active p {
    font-size: 125%;
    padding: 0 0.5em 20px;
}

@media(max-width:599px) {


    .active img {
        width: 100%;
    }

    .active li {
        border: 2px solid #000;
        width: 50%;
    }

    .active ul li:nth-child(2) {
        height: 50%;
    }
        

    .flex{
        display: flex;
        flex-wrap: wrap;
    }
}



@media(min-width:600px) {
    .active img {
        width: 100%;
    }
}

/*=============================================================================================
トピックス関係
=============================================================================================*/
#news {   
    margin-top: 90px;
}

#list {
    overflow: scroll;
    height: 280px;
}

#list a {
    display: block;
}

#list a:hover {color: #f60;}

@media(max-width:599px) {
    dl {
        padding: 10px;
    }

    dt {
        width: 100%;
        font-weight: bold;
        margin: 10px 0;
    }

    dt:first-child {
        padding-top: 10px;
        border-top: 1.5px dashed #000;
    }

    dd {
        width: 100%;
        font-size: large;
        padding-bottom: 10px;
        border-bottom: 1.5px dashed #000;
    }
}


@media(min-width:600px) {
    dl {
        padding: 10px;
    }

    dt {
        width: 12em;
        margin: 10px 0;
        padding-bottom: 1em;
        padding-left: 2em;
        border-bottom: 1px dashed #000;
        font-weight: bold;
    }

    dt:first-child {
        padding-top: 1em;
        border-top: 1px dashed #000;
    }

    dd {
        border-bottom: 1px dashed #000;
        width: calc(100% - 12em);
        margin: 10px 0;
        padding-left: 3em;
        padding-bottom: 1em;
        font-size: large;
    }

    dd:nth-child(2) {
         padding-top: 1em;
        border-top: 1px dashed #000;
    }

    .flex {
        display: flex;
        flex-wrap: wrap;
    }
}



/*=============================================================================================
関連サイト関係
=============================================================================================*/

@media(max-width:599px){
    #relation ul {
        display: flex;
        flex-wrap: wrap;
    }

    #relation li {
        width: 45%;
        margin: 20px auto;
        padding: 10px;
    }

    #relation li:first-child {
        width: 100%;
        padding-left: 20px;
    }

    #relation li:nth-child(2) {
        height: 200px;
    }

    #relation li:nth-child(4) {
        margin-top: -50px;
        height: 210px;
    }

    #relation li:nth-child(5) {
        margin-top: 20px;
    }

    #relation li:nth-child(6) {
        margin-top: -30px;
        height: 180px;
    }

    #relation li:nth-child(7) {
        margin-top: 20px;
        height: 130px;
    }

    #relation a {
        display: block;
        text-decoration: none;
        color: #000;
    }

    #relation a:hover {color: #f60;}

    #relation img {
        width: 100%;
        margin-top: 10px;
    }
}


@media(min-width:600px){
    #relation ul {
        display: flex;
        flex-wrap: wrap;
    }

    #relation li {
        width: 45%;
        margin: 10px auto;
        text-align: center;
    }

    #relation li:first-child {
        width: 40%;
    }


    #relation li:nth-child(2) {
        width: 25%;
    }

    #relation li:nth-child(3) {
        width: 25%;
    }

    #relation li:nth-child(4) {
        width: 25%;
    }

    #relation li:nth-child(5) {
        width: 25%;
    }

    #relation li:nth-child(6) {
        width: 25%;
    }

    #relation li:nth-child(7) {
        width: 25%;
    }

    #relation a {
        display: block;
        text-decoration: none;
        color: #000;
    }

    #relation a:hover {color: #f60;}
    

    #relation img {
        width: 100%;
        margin-top: 10px;
    }
}

/*=============================================================================================
フッター関係
=============================================================================================*/
footer {
    margin: 40px auto 0;
    text-align: center;
    background-color: #ff6000;
    color: #fff;
}