/* ① 高さ < 幅（横長画面）→ PCや横向きスマホなど */
@media screen and (min-aspect-ratio: 1/1) {
    .display {
        position: fixed; /* ← コレ！ */
        top: 0;
        right: 0;
        display: none;
    }
    .header {
        font-size: 20px;
        color: rgb(160, 77, 10);
        background-color: rgb(255, 255, 255);
    }

    body {
        background-color: aliceblue;
    }

    .body {
        margin: 0;
        background-color: aliceblue;
        background-image: url(material/方眼背景.jpg);
    }

    /* 横並びはこの main にだけ適用 */
    .main {
        display: flex;
    }

    .main p {
        margin: 3px;
        font-size: 20px;
    }

    .main h1 {
        margin-bottom: 3px;
        font-size: 30px;
    }

    .TOP {
        color: white;
        font-size: 60px;
        margin-left: 0; /* 左余白なし */
        margin-right: auto; /* 自動で右に余白 */
        margin-top: 0; /* 上の余白なくす */
        margin-bottom: 0; /* 下の余白なくす */
        padding-top: 0;
        padding-bottom: 0;
        background-image: url("material/校舎写真.jpg");
        background-size: cover; /* 要素いっぱいに拡大・縮小（比率維持）*/
        background-position: center; /* 中央に配置 */
        background-repeat: no-repeat; /* 繰り返さない */
    }
    .TOP p {
        padding: 0px;
        padding-left: 20px;
        margin: 0;
    }
    .TOP h1 {
        padding: 0px;
        padding-left: 20px;
        margin: 0;
    }
    .TOP h2 {
        padding: 0px;
        padding-left: 20px;
        margin: 0;
    }
    .TOP-content {
        color: white;
        text-align: center;
        margin-left: 10%;
        margin-right: 10%;
        padding: 20px;
        font-size: 40px;
        margin-top: 150px;
        margin-bottom: 50px;
    }

    /* ▼ TOP文字のスライドアニメ用 ▼ */

    /* 最初は透明＋左にずらしておく */
    #main_title p,
    #main_title h2,
    #main_title h1 {
        opacity: 0;
        transform: translateX(70px);
        transition:
            opacity 1s ease,
            transform 1s ease;
    }

    /* 表示されたときに透明度と位置を戻す */
    #main_title.show p {
        opacity: 1;
        transform: translateX(0);
    }

    #main_title.show h2 {
        opacity: 1;
        transform: translateX(0);
        transition-delay: 0.3s;
    }

    #main_title.show h1 {
        opacity: 1;
        transform: translateX(0);
        transition-delay: 0.6s;
    }

    #roll {
        justify-content: center;
    }
    .arrow {
        background-color: sandybrown;
        font-size: 80px;
        color: black;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 50px;
        height: 230px;
        padding: 0%;
        margin: 0%;
        margin-top: 20px;
    }
    #box {
        position: relative; /* 座標指定できるようにする */
        width: 90vw;
        overflow: hidden; /* これではみ出した部分を隠す！ */
    }
    #in_box {
        position: relative; /* 親要素に対して絶対位置指定できるようにする */
        display: flex;
    }
    .news_list {
        background-color: rgb(231, 231, 231);
        padding: 0;
        margin: 0;
    }
    .news_list h2 {
        text-align: center;
        font-size: 25px;
        margin: 0;
        padding: 10px;
        border-bottom: 2px solid black;
    }
    .news {
        font-size: 20px;
        margin: 10px;
        padding: 5px;
        border: 3px solid black;
        border-radius: 10px;
        flex: 0 0 auto; /* 4つで全幅になる */
        width: 25vw;
        height: 230px;
    }

    .index {
        background-color: rgb(255, 255, 255);
        width: 100%;
        margin-top: 20px;
        margin-left: 5px;
        margin-right: 5px;
        border-radius: 5px; /* 角を丸くする半径(px, %, emなど指定可) */
        border: 4px solid;
        border-color: aliceblue sandybrown rgb(119, 56, 1) aliceblue;
        border-right-width: 5px;
        border-bottom-width: 10px;
    }
    .index_title {
        color: sandybrown;
        font-size: 25px;
        text-align: center;
        background-color: beige;
        margin: 0px;
        padding: 5px;
        border-top-left-radius: 8px;
    }
    .index li {
        color: darkslategray;
        font-size: 140%;
        padding-left: 0%;
        margin-left: 5%;
    }

    .left {
        width: 25%;
    }
    .right {
        width: 75%;
    }
    .content {
        color: rgb(45, 52, 59);
        background-color: rgb(255, 255, 255);
        margin: 20px;
        margin-top: 20px;
        margin-left: 40px;
        border-radius: 10px;
        border: 4px solid;
        border-top-width: 6px;
        border-color: rgb(119, 56, 1) sandybrown rgb(119, 56, 1) sandybrown;
    }

    .content_title {
        opacity: 0; /* 最初は透明にしておく */
        transform: translateX(40px);
        transition:
            opacity 1s ease,
            transform 1s ease;
        font-size: 30px;
        text-align: center;
        background-color: beige;
        margin: 0;
        padding: 0;
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
    }

    .content_title.show {
        opacity: 1;
        transform: translateX(0);
    }

    .content p {
        padding: 10px;
    }

    .member {
        display: none;
        width: 50%;
        height: auto;
        text-align: center;
        margin: 10px;
        padding: 10px;
        border-radius: 10px;
        background-color: rgba(250, 200, 171, 0.39);
    }
    .member img {
        width: 20%;
        height: 20%;
        object-fit: cover;
    }
    .member p {
        font-size: 130%;
        margin: 1px;
        padding: 10px;
        line-height: 1.5;
        text-align: left;
    }
    .name {
        font-size: 300%;
        text-align: center;
        width: 100%;
        margin-top: 10px;
        border-bottom: 6px double black;
        margin-left: 5%;
        margin-right: 5%;
        margin-bottom: 10px;
        padding-bottom: 0px;
    }

    .footer {
        background-color: black;
        color: white;
        text-align: center;
    }

    .honbun {
        color: rgb(45, 52, 59);
        font-size: 30px;
        margin-top: 30px;
        line-height: 0.6;
    }

    a {
        color: rgb(19, 193, 199);
        text-decoration: none;
    }

    a:hover {
        color: rgb(46, 95, 114);
        text-decoration: underline;
    }
}

@media screen and (max-aspect-ratio: 2/1) {
    .display {
        position: fixed; /* ← コレ！ */
        top: 0;
        right: 0;
    }
    #menu {
        width: 80%;
        height: 90%;
        top: 100px;
        left: 5%;
        display: none;
    }

    .header {
        font-size: 20px;
        color: rgb(160, 77, 10);
        background-color: rgb(255, 255, 255);
    }

    body {
        background-color: aliceblue;
    }

    .body {
        margin: 0;
        background-color: aliceblue;
        background-image: url(material/方眼背景.jpg);
    }

    /* 横並びはこの main にだけ適用 */
    .main {
        display: flex;
    }

    .main p {
        margin: 3px;
        font-size: 20px;
    }

    .main h1 {
        margin-bottom: 3px;
        font-size: 30px;
    }

    .TOP {
        color: white;
        font-size: 60px;
        margin-left: 0; /* 左余白なし */
        margin-right: auto; /* 自動で右に余白 */
        margin-top: 0; /* 上の余白なくす */
        margin-bottom: 0px; /* 下の余白なくす */
        padding-top: 0;
        padding-bottom: 0;
        background-image: url("material/校舎写真.jpg");
        background-size: cover; /* 要素いっぱいに拡大・縮小（比率維持）*/
        background-position: center; /* 中央に配置 */
        background-repeat: no-repeat; /* 繰り返さない */
    }
    .TOP p {
        padding: 0px;
        padding-left: 20px;
        margin: 0;
    }
    .TOP h1 {
        padding: 0px;
        padding-left: 20px;
        margin: 0;
    }
    .TOP h2 {
        padding: 0px;
        padding-left: 20px;
        margin: 0;
    }
    .TOP-content {
        background-color: beige;
        color: black;
        text-align: center;
        margin-left: 10%;
        margin-right: 10%;
        padding: 20px;
        font-size: 40px;
        margin-top: 150px;
        margin-bottom: 50px;
    }

    #roll {
        justify-content: center;
    }
    .arrow {
        background-color: sandybrown;
        font-size: 80px;
        color: black;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100px;
        height: 230px;
        padding: 0%;
        margin: 0%;
        margin-top: 20px;
    }
    #box {
        position: relative; /* 座標指定できるようにする */
        width: 90vw;
        overflow: hidden; /* これではみ出した部分を隠す！ */
    }
    #in_box {
        position: relative; /* 親要素に対して絶対位置指定できるようにする */
        display: flex;
    }
    .news_list {
        background-color: rgba(0, 0, 0, 0.114);
        padding: 0;
        margin: 0;
    }
    .news_list h2 {
        text-align: center;
        font-size: 25px;
        margin: 0;
        padding: 10px;
        border-bottom: 2px solid black;
    }
    .news {
        font-size: 20px;
        margin: 10px;
        padding: 5px;
        border: 3px solid black;
        border-radius: 10px;
        flex: 0 0 auto; /* 4つで全幅になる */
        width: 25vw;
        height: 230px;
    }

    .index {
        background-color: rgba(255, 255, 255, 0.808);
        width: 100%;
        margin-left: 10px;
        margin-right: 10px;
        margin-bottom: 20px;
        border-radius: 10px; /* 角を丸くする半径(px, %, emなど指定可) */
        border-color: aliceblue sandybrown rgb(119, 56, 1) aliceblue;
        border-right-width: 5px;
        border-bottom-width: 10px;
    }
    .index_title {
        font-size: 30px;
        text-align: center;
        background-color: beige;
        margin: 0;
        padding: 0;
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
    }
    .index li {
        color: darkslategray;
        font-size: 300%;
        padding-left: 0%;
        margin-left: 5%;
    }

    .left {
        display: none;
    }
    .right {
        width: 100%;
    }
    .content {
        background-color: rgba(255, 255, 255, 0.808);
        margin: 20px;
        margin-top: 0;
        margin-left: 40px;
        margin-right: 40px;
        border-radius: 10px;
        border: 4px solid;
        border-top-width: 6px;
        border-color: rgb(119, 56, 1) sandybrown rgb(119, 56, 1) sandybrown;
    }
    .content_title {
        font-size: 30px;
        text-align: center;
        background-color: beige;
        margin: 0;
        padding: 0;
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
    }

    .member {
        display: none;
        width: 50%;
        height: auto;
        text-align: center;
        margin: 10px;
        padding: 10px;
        border-radius: 10px;
        background-color: rgba(250, 200, 171, 0.39);
    }
    .member img {
        width: 20%;
        height: 20%;
        object-fit: cover;
    }
    .member p {
        font-size: 130%;
        margin: 1px;
        padding: 0%;
        line-height: 1.3;
    }
    .name {
        font-size: 300%;
        text-align: center;
        width: 100%;
        margin-top: 10px;
        border-bottom: 6px double black;
        margin-left: 5%;
        margin-right: 5%;
        margin-bottom: 10px;
        padding-bottom: 0px;
    }

    .footer {
        background-color: black;
        color: white;
        text-align: center;
    }

    .honbun {
        color: white;
        font-size: 30px;
        margin-top: 30px;
        line-height: 0.6;
    }

    a {
        color: rgb(19, 193, 199);
        text-decoration: none;
    }

    a:hover {
        color: rgb(46, 95, 114);
        text-decoration: underline;
    }
}
