@charset "utf-8";
@import url("../font/font.css");

/* =============================================================
   base.css — 跨專案共用樣式
   包含：佈局、RWD、Bootstrap 覆蓋、字型大小、顏色工具、
         元件（表格/地圖/modal/footer）
   品牌色和專案特殊樣式請放 tao.css / hsq.css
   ============================================================= */

/* ===== 全域 ===== */
body {
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 400;
}

/* ===== 字型 ===== */
.lhy_font { font-family: 'Noto Sans TC', sans-serif; font-weight: 400; }
.lhy_Boldfont { font-family: 'Noto Sans TC', sans-serif; font-weight: 700; }
.lhy_Lifont { font-family: 'Noto Sans TC', sans-serif; font-weight: 100; }

/* ===== 字級 ===== */
.l10 { font-size: 2.35rem; }
.l20 { font-size: 2rem; }
.l30 { font-size: 1.8rem; }
.l35 { font-size: 1.5rem; }
.l40 { font-size: 1.25rem; }
.l40-lg { font-size: .9rem; }
.l45 { font-size: 1.2rem; }
.l50 { font-size: 1.125rem; }
.l50-md { font-size: .82rem; }
.l55 { font-size: 1rem; }
.l55-md { font-size: .84rem; font-weight: 100; }
.l55i { font-size: 1rem !important; }
.l60 { font-size: .94rem; }
.l65 { font-size: .89rem; }
.l70 { font-size: .8rem; }
.l77 { font-size: .78rem; }
.l80 { font-size: .76rem; }
.l90 { font-size: .75rem; }
.l90i { font-size: .75rem !important; }

/* ===== 顏色工具 ===== */
.cf1 { color: rgb(102, 102, 138); }
.cf2 { color: rgb(3, 31, 105); }
.cf3 { color: rgb(85, 85, 85); }
.cf4 { color: rgb(138, 49, 199); }
.cfy1 { color: rgb(255, 230, 0); }
.cfbk0 { color: rgb(255, 255, 255); }
.cfbk1 { color: rgb(47, 79, 79); }
.cfbk2 { color: rgb(192, 192, 192); }
.cfr1 { color: rgb(255, 0, 0); }
.cfo1 { color: rgb(255, 140, 0); }
.cfb1 { color: rgb(0, 139, 139); }

/* FontAwesome 雙色 */
.cfa-pmy-1 { --fa-primary-color: rgb(255, 0, 0); }
.cfa-sec-1 { --fa-secondary-color: rgb(0, 139, 139); --fa-secondary-opacity: 1; }
.cfa-pmy-2 { --fa-primary-color: rgb(255, 0, 0); }
.cfa-sec-2 { --fa-secondary-color: rgb(47, 79, 79); --fa-secondary-opacity: 1; }

/* ===== 背景色圓形標記 ===== */
.circle { width: 1.25rem; height: 1.25rem; border-radius: 999em; }
.c0 { background-color: transparent; }
.c1 { background-color: rgb(115, 212, 135); }
.c2 { background-color: rgb(151, 130, 227); }
.c3 { background-color: rgb(115, 186, 244); }
.c4 { background-color: rgb(78, 205, 64); }
.c5 { background-color: rgb(255, 128, 98); }
.c6 { background-color: rgb(253, 211, 88); }
.c7 { background-color: rgb(242, 211, 154); }
.c8 { background-color: rgb(140, 242, 244); }

/* ===== 圓角/狀態標籤 ===== */
.crBox { border-radius: 10px; }
.crBox-md { border-radius: 2px; }
.comming { background-color: rgb(255, 81, 16); border-radius: 10px; }
.comtime { background-color: rgb(244, 182, 99); border-radius: 10px; }
.bstatus { background-color: rgb(106, 210, 245); border-radius: 10px; }

/* ===== 圖片尺寸工具 ===== */
.img_auto, .img_100 { max-width: 100%; height: auto; }
.img_75 { max-width: 75%; height: auto; }
.img_65 { max-width: 65%; height: auto; }
.img_60 { max-width: 60%; height: auto; }
.img_50 { max-width: 50%; height: auto; }
.img_35 { max-width: 35%; height: auto; }
.img_30 { max-width: 30%; height: auto; }
.img_25 { max-width: 25%; height: auto; }
.img_15 { max-width: 15%; height: auto; }
.img_10 { max-width: 10%; height: auto; }
.img_05 { max-width: 5%; height: auto; }
.img_100_hi { width: auto; max-height: 100%; }

/* ===== 內頁佈局 ===== */
.mainbox { background-color: transparent; }
.midbox { background-color: transparent; }
.inbox { background-color: transparent; }
.lbox { background-color: transparent; border-radius: 10px; }
.makbox { background-color: transparent; border-radius: 10px; }

/* ===== 站牌去回程 Tab ===== */
#tabs-tab .nav-link {
    background-color: transparent !important;
    color: #666 !important;
    font-weight: 600;
    border: none;
    border-bottom: 2px solid transparent;
}
#tabs-tab .nav-link.active {
    background-color: #0d6efd !important;
    color: #fff !important;
    border-radius: 6px 6px 0 0;
    border-bottom: none;
}

/* ===== 路線清單頁 ===== */
.route-list-panel {
    max-height: 200px;
    overflow-y: auto;
}
.route-alpha-tabs {
    flex-wrap: wrap;
    gap: 3px;
}
.route-alpha-tabs .nav-link {
    font-size: 0.85rem !important;
    font-weight: 700;
    color: #555 !important;
    border-radius: 6px;
    min-width: 32px;
    text-align: center;
    padding: 2px 6px !important;
}
.route-alpha-tabs .nav-link.active {
    background-color: #0d6efd !important;
    color: #fff !important;
}
.route-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 6px;
}
.route-grid-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 4px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
}
.route-grid-item:hover {
    background-color: #e8f0fe;
    border-color: #0d6efd;
    color: #0d6efd;
}
.route-grid-item.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}
.route-grid-wide {
    grid-column: span 2;
}

/* ===== 頂部頁面 Tab（依路線搜尋/路線清單/依景點搜尋） ===== */
.nav.l40 .nav-link {
    color: #999 !important;
    font-weight: 600;
}
.nav.l40 .nav-link.active {
    color: #0d6efd !important;
}

/* ===== 公車動態頁 (rt) 左右佈局 ===== */
.rt-layout {
    display: flex;
    flex-direction: row;
    height: calc(100vh - 80px);
}
.rt-panel {
    width: 35%;
    min-width: 320px;
    overflow-y: auto;
    padding: 12px;
}
.rt-map {
    flex: 1;
    position: relative;
}
.rt-map .map-area,
.rt-map #VW iframe {
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 991px) {
    .rt-layout {
        flex-direction: column;
        height: auto;
    }
    .rt-panel {
        width: 100%;
        min-width: unset;
        max-height: none;
        overflow-y: visible;
    }
    .rt-map {
        height: 60vh;
    }
}

/* ===== 地圖 Marker ===== */
.map-area { width: 100%; height: 100%; border-radius: 4px; }
.custom-stop-icon { background: none; border: none; }
.stop-icon {
    width: 100%; height: 100%;
    background-size: contain; background-repeat: no-repeat; background-position: center;
    position: relative; font-size: 14px; font-weight: bold;
    color: white; text-align: center; line-height: 30px;
}
.stop-tooltip { font-size: 14px; font-weight: bold; text-align: center; }

/* ===== 站牌表格 ===== */
th, td { padding: 0.5rem; text-align: center; }

/* ===== Footer ===== */
.footer_bg {
    margin-top: 2rem;
    padding: 0.7rem 0 0;
    border-top: 1px solid rgba(200, 200, 200, 0.5);
    background: transparent;
}
.footer_title { color: rgb(126, 127, 128); }
.footer_munu > a:link,
.footer_munu > a:visited,
.footer_munu > a:hover { color: rgb(223, 223, 223); text-decoration: none; }

/* ===== Site Header（共用結構） ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    width: calc(100% - 100px);
    max-width: none;
    margin: 0 auto;
    padding: 6px 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.1;
}
.brand:hover { color: inherit; }
.logo-mark { width: auto; height: 23px; flex: none; }
.brand-copy { display: flex; flex-direction: column; justify-content: center; }
.brand-sub { margin-top: 2px; color: #666; font-size: 11px; font-weight: 400; letter-spacing: 0.02em; }
.nav-main {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-left: auto;
    gap: 30px;
}
.nav-main a {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.1;
    text-decoration: none;
    transition: color 0.3s ease;
}

/* Hamburger 切換鈕：桌面隱藏，行動裝置（≤991.98px）顯示 */
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}
.nav-toggle:hover,
.nav-toggle:focus { background: rgba(0, 0, 0, 0.06); outline: none; }

/* ===== Shell（內容寬度限制） ===== */
.shell {
    width: min(1400px, calc(100% - 100px));
    margin: 0 auto;
}

/* ===== Modal（共用結構） ===== */
.modal-content { overflow: hidden; border: none; border-radius: 24px; }

/* ===== RWD ===== */
@media (min-width: 768px) {
    .l40-lg { font-size: 1rem; }
    .l50-md { font-size: 1.125rem; }
    .l55-md { font-size: 1rem; font-weight: 700; }
    .crBox-md { border-radius: 10px; }
}
@media (min-width: 992px) {
    .l40-lg { font-size: 1.25rem; }
}
@media (max-width: 991.98px) {
    .shell { width: min(100%, calc(100% - 48px)); }
    .header-inner {
        width: min(100%, calc(100% - 48px));
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }
    /* brand 縮成單行：隱藏英文副標 */
    .brand-sub { display: none; }
    .brand { gap: 10px; }
    .nav-toggle { display: inline-flex; }
    .nav-main {
        order: 3;
        flex-basis: 100%;
        flex-direction: column;
        margin-left: 0;
        gap: 0;
        padding: 8px 0;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
    }
    .nav-main:not(.is-open) { display: none; }
    .nav-main a {
        display: block;
        padding: 12px 4px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }
    .nav-main a:last-child { border-bottom: none; }
}
@media (max-width: 767.98px) {
    .shell { width: min(100%, calc(100% - 32px)); }
    .header-inner {
        width: min(100%, calc(100% - 32px));
        gap: 8px;
        padding: 4px 0;
    }
    .brand { font-size: 17px; gap: 8px; }
    .logo-mark { height: 17px; }
    .nav-toggle { width: 40px; height: 40px; font-size: 22px; }
    .nav-main a { font-size: 18px; }
}
