/* =============================================
   Global Reset
   ============================================= */
body {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    background: #fff;
    font-family: Arial, Helvetica, sans-serif;
    /* sticky footer 機制：需搭配 #content-outer { flex: 1 } */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

img {
    border: none;
    padding: 0;
    margin: 0;
}

p {
    margin: 15px 0;
    color: #3a3a3a;
}

h1, h2, h3, h4, h5 {
    margin: 0;
    font-weight: normal;
}

.clr {
    clear: both;
}

/* =============================================
   Header
   ============================================= */
#header-outer {
    background: #fff;
    border-bottom: 3px solid rgb(12, 118, 161);
    position: relative;
}

#header-inner {
    padding: 0 15px;
}

/* Header spacer */
#header-spacer {
    display: none;
}

/* =============================================
   Logo
   ============================================= */
.logo {
    max-width: 260px;
    height: auto;
}

#logo {
    max-width: 320px;
    margin: 0 auto;
    padding: 10px 15px;
    display: flex;
    align-items: center;
}

/* Logo link */
#logo a {
    display: inline-block;
    line-height: 0;
    text-decoration: none;
}

/* =============================================
   Env bar (DEV / QA label)
   ============================================= */
.env-bar {
    color: #e74c3c;
    font-size: 18px;
    font-weight: bold;
    margin-right: 8px;
    white-space: nowrap;
}

/* =============================================
   Navigation
   ============================================= */
#navigation {
    height: 0;
    margin: 0;
    background: #fff;
    border: none;
    /* 需設 position:relative，作為 #mobile_menu absolute 定位的基準（對應舊版 Bootstrap .navbar） */
    position: relative;
}

/* Toolbar */
#toolbar {
    clear: both;
    margin: 0;
    width: 100%;
    position: relative;
    z-index: 5;
    background: #3a3a3a;
}

#toolbar .menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

#toolbar .menu a {
    font-size: 16px;
    display: block;
    cursor: pointer;
    padding: 15px;
    color: #fff;
    text-decoration: none;
    border-top: 1px solid rgba(107, 107, 107, .39);
}

#toolbar .menu a:hover {
    color: #fff;
    background-color: #727272;
}

/* Mobile toggle */
.navbar-toggle {
    position: relative;
    float: right;
    padding: 5px;
    margin: 0 15px 0 0;
    background-color: transparent;
    border-radius: 4px;
    cursor: pointer;
}

.navbar-toggle .icon-bar {
    display: block;
    width: 25px;
    height: 4px;
    border-radius: 1px;
}

.navbar-toggle .icon-bar + .icon-bar {
    margin-top: 4px;
}

.navbar-inverse .navbar-toggle {
    border: 1px solid rgba(195, 195, 195, 0);
    background: rgba(0, 0, 0, .24);
}

.navbar-inverse .navbar-toggle .icon-bar {
    background: #fff;
}

/* Collapse */
.collapse {
    display: none;
}

.collapse.in {
    display: block;
}

/* =============================================
   Content outer (flex: 1 for sticky footer)
   ============================================= */
/* flex:1 撐滿剩餘空間讓 footer 沉底；position:relative 作為 .bg_image 的定位基準 */
#content-outer {
    flex: 1;
    position: relative;
}

/* =============================================
   Body inner
   ============================================= */
#body-inner {
    min-height: 600px;
    padding: 0 15px;
}

/* =============================================
   Page background image
   ============================================= */
/* 以 #content-outer 為定位基準，背景圖不超出內容區、不蓋過 footer */
.bg_image {
    background-image: url('/images/home.jpg');
    background-repeat: no-repeat;
    background-position: center left;
    background-color: #fff;
    background-size: cover;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: -100;
}

/* =============================================
   Copyright / Footer
   ============================================= */
#copyright-outer {
    float: left;
    padding: 10px 0;
    width: 100%;
    background: #333;
    border-top: 1px solid #505050;
    box-sizing: border-box;
}

#copyright-inner {
    padding: 0 15px;
}

.phone {
    color: #fff;
    padding-right: 30px;
    width: auto;
    display: inline-block;
}

.mail {
    color: #fff;
    padding-right: 30px;
    width: auto;
    display: inline-block;
    cursor: pointer;
}

.copyright {
    color: #fff;
    float: left;
    width: 100%;
    text-align: center;
}

/* =============================================
   Category list table
   ============================================= */
.category-list table {
    width: 100%;
    text-align: center;
    margin: 0 0 15px 0;
}

.category-list table td,
.category-list table th {
    padding: 5px;
    border: 1px solid #c0c0c0;
}

.category-list a {
    color: #000;
    text-decoration: none;
}

.table-striped tr:nth-child(even) {
    background-color: #f9f9f9;
}

.table-hover tr:hover {
    background-color: #fafafa;
}

.table-noheader thead {
    display: none;
}

.list-title a {
    color: #000;
    text-decoration: none;
}

.list-title a:hover {
    text-decoration: underline;
}

/* =============================================
   RWD — min-width: 480px
   ============================================= */
@media screen and (min-width: 480px) {
    #header-outer {
        padding: 10px 0;
        height: 65px;
    }

    .logo {
        height: 50px;
        max-width: none;
    }

    #logo {
        max-width: none;
        padding: 0 0 0 15px;
        float: left;
    }

    .navbar-toggle {
        margin: 15px 15px 0 0;
    }

    #navigation {
        height: auto;
        padding: 0;
        background: none;
    }
}

/* =============================================
   RWD — min-width: 768px
   ============================================= */
@media screen and (min-width: 768px) {
    #header-outer {
        position: fixed;
        width: 100%;
        z-index: 99;
        box-shadow: 0 2px 2px -2px rgba(0, 0, 0, .52);
    }

    #header-spacer {
        display: block;
        height: 86px;
    }

    #header-inner {
        max-width: 970px;
        margin: 0 auto;
        padding: 0 10px;
    }

    #logo {
        padding: 0;
    }

    #navigation {
        float: right;
        margin: 0;
    }

    #toolbar {
        clear: none;
        margin: 0;
        width: auto;
        z-index: auto;
        background: none;
    }

    #toolbar .menu a {
        font-size: 15px;
        padding: 0;
        color: #444;
        border-top: none;
    }

    #toolbar .menu a:hover {
        background-color: transparent;
        color: #004273;
    }

    #toolbar .menu li {
        float: left;
        position: relative;
        margin: 0 0 0 25px;
        padding: 0;
        line-height: 3;
    }

    .navbar-toggle {
        display: none;
    }

    .navbar-collapse.collapse {
        display: block !important;
        height: auto !important;
        padding-bottom: 0;
        overflow: visible !important;
    }

    #body-inner {
        max-width: 970px;
        margin: 0 auto;
        padding: 0 10px;
    }

    #copyright-inner {
        max-width: 970px;
        margin: 0 auto;
        padding: 0 10px;
    }
}

/* =============================================
   RWD — min-width: 1240px
   ============================================= */
@media screen and (min-width: 1240px) {
    #header-spacer {
        /* height: 101px; */
    }

    #header-inner {
        width: 1200px;
    }

    .logo {
        height: 60px;
    }

    #toolbar .menu a {
        font-size: 18px;
    }

    #toolbar .menu li {
        margin: 0 0 0 31px;
    }

    #body-inner {
        width: 1200px;
    }

    #copyright-inner {
        width: 1200px;
    }
}

/* =============================================
   RWD — max-width: 768px
   ============================================= */
@media screen and (max-width: 768px) {
    #logo {
        margin: 0;
        max-width: 100%;
    }

    .logo {
        max-width: 300px;
    }

    #mobile_menu {
        position: absolute;
        top: -3.25rem;
        right: 0;
    }
}

/* =============================================
   RWD — max-width: 479px
   ============================================= */
@media screen and (max-width: 479px) {
    /* font-size:0 讓 em 單位的 &ensp; 佔零寬度，消除 logo 與 env-bar 間多餘空白 */
    #logo {
        font-size: 0;
        padding-right: 55px;
    }
    /* 還原 env-bar 文字並縮小字號適應手機版 */
    .env-bar {
        font-size: 14px;
        margin-right: 20px;
    }
}

/* =============================================
   RWD — max-width: 414px
   ============================================= */
@media screen and (max-width: 414px) {
    .navbar.navbar-inverse {
        min-height: 0;
        height: 0;
    }

    .logo {
        max-width: 83%;
    }
}

/* =============================================
   RWD — max-width: 280px
   ============================================= */
@media screen and (max-width: 280px) {
    .logo {
        width: 70%;
    }

    #mobile_menu {
        position: absolute;
        top: -50px;
        right: 0;
    }
}
