﻿body, html {
    margin: 0;
    padding: 0;
    max-width: 100vw;
    height: 100%;
}

header,
main,
footer {
    width: 100%;
    box-sizing: border-box;
}

.header {
    min-height: 120px;
}

.test {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: red;
    font-weight: bold;
}

.main {
    min-height: calc(100% - 120px - 95px);
    display: flex;
    justify-content: center;
    /*align-items: center;*/
    background-image: url('../../img/topbg.png'), url('../../img/bg_bann.png');
    background-repeat: no-repeat, no-repeat;
    background-position: left top, right bottom;
    background-size: 10%, contain;
}

.loginform {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: aliceblue;
    width: 350px;
    max-height:fit-content;
}

    .loginform .logo {
        color: black;
        text-decoration: none;
        line-height: 1;
    }

.loginform a {
    text-decoration: none;
}

    .loginform a:hover {
        text-decoration: none;
    }



.footer {
    background-color: #002838;
    color: #ffffff;
    font-weight: bold;
    min-height: 95px;
}

.logo {
    max-height: 50px;
}


.logo1 {
    color: black;
    font-weight: bold;
    font-size: 28px;
    text-decoration: none;
    text-decoration-color: #ffffff;
    padding-left:3px;
}

.main-area {
    background-image: url("/img/topbg.png"), url("/img/bg_bann.png");
    background-repeat: no-repeat, no-repeat;
    background-position: left top, right bottom;
    background-size: 10%, contain;
}

.navlink {
    background-color: #29574a;
    margin: 0;
    height: 54px;
}

    .navlink ul {
        margin: 0;
        padding: 0;
        list-style: none;
        display: flex;
    }

    .navlink li {
        margin: 0;
        padding: 0;
    }

    .navlink a {
        display: block;
        padding: 15px 20px;
        text-decoration: none;
        color: #fff;
        font-weight: bold;
    }

        .navlink a:hover {
            background-color: #fff;
            color: #000;
        }

.navbar-toggler {
    background-color: #29574a;
    color: #fff;
    border: none;
    padding: 10px;
    font-size: 18px;
    display: none; /* 預設隱藏 */
}

    .navbar-toggler:focus {
        outline: none;
    }

@media (max-width: 500px) {
    .main {
        min-height: 600px;
    }

    .loginform {
        min-height: 300px; /* 最小高度，可依需求調整 */
        max-height: fit-content;
        /*max-height: 80vh;*/ /* 最大高度為螢幕80% */
        /*overflow-y: auto;*/ /* 垂直出現scrollbar */
        width: 95vw; /* 手機寬度自適應 */
        margin: 60px auto; /* 上下留白並置中 */
    }

    .navbar-toggler {
        display: block; /* 小於400px顯示 */
        width: 60px;
        position: absolute;
        z-index: 100;
    }

    .navlink ul {
        flex-direction: column;
        display: none;
    }

        .navlink ul.show {
            position: absolute;
            background-color: rgb(41 87 74);
            display: flex;
            z-index: 100;
            margin-top: 40px;
        }
}

@media screen and (max-height: 500px) and (orientation: landscape) {
    .main {
        min-height: fit-content;
    }
}