@charset "UTF-8";
/*-------------------------------------------
校長挨拶
-------------------------------------------*/
.school {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.school .text {
    flex: 1 1 60%;  /* 最低60%の幅を確保 */
    min-width: 280px; /* PC時の最小幅 */
}

.school img {
    width: 100%;
    max-width: 280px;    /* PC時の上限 */
    height: auto;        /* 高さは自動 */
    aspect-ratio: 1/1;   /* 縦横比を固定（正方形の場合） */
    object-fit: cover;   /* 中央で切り抜き */
}
/*-------------------------------------------
教育方針
-------------------------------------------*/
#policy .item {
    margin: 55px 0 80px;
}
#policy .item:last-of-type {
    margin: 0;
}
#policy .item ol {
    display: grid;
    gap: 8px;
    margin-top: 30px;
}
#policy h3 span {
    font-weight: 700;
}
/*-------------------------------------------
沿革
-------------------------------------------*/
#history table {
  width: 100%;
  border-collapse: collapse; /* 行ごとに線が重ならない */
  line-height: 1.8;
}
#history th,
#history td {
    padding: 10px 0;
    vertical-align: top;
    text-align: left;
}
/* 年列 */
#history .year {
    width: 9%;
    font-weight: 400;
}
/* 月列 */
#history .month {
    width: 7%;
    padding-left: 15px;
}
/* 行ごとに線を引く */
#history tr {
    border-bottom: 1px solid #707070;
}
#history tr:first-of-type {
    border-top: 1px solid #707070;
}
/*-------------------------------------------
在籍生徒数
-------------------------------------------*/
#students .container {
    display: flex;
    justify-content: space-between;
	flex-wrap: wrap;
}
#students .container img {
	width: 100%;
	max-width: 525px;
}
#students table {
	width: 100%;
	max-width: 440px;
    border-collapse: collapse;
    text-align: center;
}
#students h3 {
    font-size: 1.7rem;
    font-weight: 400;
    margin-bottom: 10px;
}
#students th,
#students td {
    padding: 10px 15px;
    font-weight: 400;
}
#students tbody tr,
#students tfoot tr {
    border-bottom: 1px solid #707070;
}
#students th,
#students tbody tr {
    border-top: 1px solid #707070;
}
/*-------------------------------------------
施設・設備
-------------------------------------------*/
#facilities .container ul {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 70px;
}
/*-------------------------------------------
制服
-------------------------------------------*/
#uniform {
    margin-bottom: 157px;
}
#uniform p {
    margin-bottom: 60px;
    text-align: center;
}
/*-------------------------------------------
スマートフォン
-------------------------------------------*/
@media screen and (max-width: 767px) {
/*--------------
校長挨拶
---------------*/  
    .school {
        flex-direction: column;
        align-items: center;
    }
    .school img {
        flex: 0 1 50%; /* SPでは画面幅の50%まで拡大 */
        order: -1;
        margin-bottom: 20px;
    }
/*--------------
教育方針
---------------*/   
    #policy .item {
        flex-direction: column;
        align-items: center; 
    }
    #policy .item img {
        order: -1; 
        margin-bottom: 12px;
    }   
/*--------------
沿革
---------------*/      
    /* table自体を非表示にせず、行ごとにブロック化 */
    #history table,
    #history thead,
    #history tbody,
    #history th,
    #history td,
    #history tr {
        display: block;
        width: 100%;
    }
    /* 年列は先頭に表示 */
    #history .year {
        width: 100%;
        font-weight: bold;
        margin-top: 15px;
        border-bottom: 1px solid #707070;
        padding-bottom: 5px;
    }
    /* 月列は年の下に */
    #history .month {
        width: 100%;
        font-weight: 500;
        margin-top: 5px;
        padding-left: 0;
    }
    /* 内容列もブロックにして読みやすく */
    #history td:not(.month) {
        width: 100%;
        margin-top: 2px;
        padding-left: 0;
    }
    /* 行の線は不要なのでまとめて調整 */
    #history tr {
        border-bottom: 1px solid #ccc;
        padding-bottom: 10px;
        margin-bottom: 10px;
    }

    /* 行間の余白調整 */
    #history tbody tr + tr {
        margin-top: 15px;
    }
/*--------------
在籍生徒数
---------------*/      
    #students .container {
        flex-direction: column;
        gap: 24px;
    }
    #students table {
        width: 100%;
    }
/*--------------
施設・設備
---------------*/     
    #facilities .container ul {
        grid-template-columns: 1fr;
        gap: 25px;
    }
/*--------------
制服
---------------*/    
    #uniform {
        margin-bottom: 60px;
    }
    #uniform p {
        margin-bottom: 15px;
    }  
}
