:root {
    --primary-color: #D24119;
    --primary-rgb: 211, 67, 38;
    --gray-text: #595959;
    --dark-text: #212529;
    --line-color: #f0f0f0;
    --hover-bg: #fff5f5;
    --selected-bg: #ffe0db;
    --selected-border: #D34326;
    --main-alpha: #FFEEE9;
}

body.page {
    background-color: #FFF;
    overflow-x: visible;
    background-image: unset;
}


/* --- 焦點顏色 (Accessibility) --- */
*:focus-visible {
    outline: 3px solid var(--primary-color) !important;
    outline-offset: 2px;
    z-index: 10;
}

/* 表單元件焦點 */
.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.input-group-text:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-rgb), 0.25);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* --- 自定義工具類 --- */
.text-primary-custom {
    color: var(--primary-color) !important;
}

.btn-primary-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary-custom:hover {
    background-color: #b0361e;
    color: white;
}

.btn-primary-custom:focus {
    background-color: #b0361e;
    border-color: #b0361e;
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-rgb), 0.5);
}

.counter-box .btn:focus-visible {
    background-color: var(--primary-color);
    color: #FFF;
}

/* --- breadcrumb ---*/
.breadcrumb-box {
    background-color: #F3F3F3;
    margin-bottom: 2rem;
}

.breadcrumb {
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.breadcrumb .breadcrumb-item i {
    color: var(--primary-color);
}

.breadcrumb-item+.breadcrumb-item::before {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    content: "\f105";
    font-size: 0.5rem;
    float: none;
}


/* --- Stepper --- */
.stepper-container {
    position: relative;
    margin-bottom: 3rem;
    margin-left: auto;
    margin-right: auto;
}

.stepper-list {
    display: flex;
    justify-content: space-between;
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 2;
}

.step-item::before {
    content: "";
    position: absolute;
    top: 25px;
    left: 0;
    width: 100%;
    height: 2px;
    z-index: -1;
    background-color: #CCCCCC;
}

.step-item:nth-child(1)::before {
    left: 50%;
    width: 50%;
}

.step-item:nth-last-child(1)::before {
    right: 50%;
    width: 50%;
}

.step-item.active::before {
    background-color: var(--primary-color);
}

.step-item {
    background: #fff;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    border: 2px solid #e9ecef;
    color: #6c757d;
    font-size: 1.5rem;
    background-color: white;
}

.step-item.active .step-circle {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.step-item.active .step-label {
    color: #212529;
    font-weight: bold;
}

.step-label {
    font-size: 0.9rem;
    color: var(--gray-text);
}

.step-item.active.pass .step-label {
    color: #364250;
}

/* --- 標題裝飾 --- */
.page-title {
    font-weight: bold;
    position: relative;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-align: center;
}


/* =========================================
   FullCalendar 樣式
   ========================================= */
.fc-header-toolbar {
    display: none !important;
}

.fc-theme-standard .fc-scrollgrid {
    border: none !important;
}

.fc-theme-standard td,
.fc-theme-standard th {
    border: none !important;
}

.fc-scrollgrid-section-body td {
    border-bottom: 1px solid var(--line-color) !important;
}

.fc-scrollgrid-section-header td,
.fc-scrollgrid-section-header th {
    border-bottom: 1px solid var(--line-color) !important;
    padding-bottom: 15px;
    padding-top: 10px;
}

.fc-col-header-cell-cushion {
    color: #333;
    font-weight: bold;
    text-decoration: none;
    font-size: 1.1rem;
}

/* 日期格子 */
.fc-daygrid-day-frame {
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: default;
    transition: all 0.2s ease;
    margin: 2px;
    border-radius: 8px;
}

.fc-daygrid-day-number {
    font-size: 1.25rem;
    color: var(--gray-text);
    font-weight: bold;
    text-decoration: none;
    margin-bottom: 2px;
}

/* 事件文字 */
.fc-event {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    text-align: center;
    margin-top: 0;
    pointer-events: none;
}

.fc-event-title {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: bold;
}

/* 狀態樣式 */
.is-bookable .fc-daygrid-day-number {
    color: var(--dark-text) !important;
}

.is-bookable:hover {
    background-color: var(--hover-bg);
    cursor: pointer;
}

.fc-daygrid-day.is-bookable.selected-date {
    background-color: var(--selected-bg) !important;
    border: 1px solid var(--selected-border);
}

.fc-daygrid-day.selected-date .fc-daygrid-day-number {
    color: var(--primary-color) !important;
}

.custom-month-header {
    background-color: #EAEAEA;
    border-radius: 50px;
    padding: 8px 0;
    font-weight: bold;
    font-size: 1.25rem;
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
}

/* Input */
#selected-date-input {
    background-color: #fff;
}

.form-select,
.form-control {
    border-radius: 1.5rem;
    padding: 0.5rem 1rem;
}

.form-select {
    background-position: right 1rem center;
}

/* Counter */
.counter-box .btn {
    border-color: #dee2e6;
    color: #333;
}

.counter-box .btn:hover,
.counter-box .btn:active {
    background-color: var(--primary-color) !important;
    color: #FFF;
}

.counter-box input {
    border-color: #dee2e6;
    background-color: #fff !important;
    font-weight: bold;
}

.action-buttons .btn {
    padding: 10px 40px;
    border-radius: 30px;
    display: block;
    width: 100%;
}

.btn-outline-custom {
    border: 1px solid #777;
    color: #333;
}

.btn-outline-custom:hover {
    background-color: #f8f9fa;
    color: #000;
}

.btn-outline-custom:focus {
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-rgb), 0.25);
}


/* --- text-style --- */
.s-title {
    color: #272727;
    font-size: 1.3rem;
    font-weight: bold;
}

.code-re {
    display: block;
    color: var(--primary-color);
    font-weight: bold;
    white-space: nowrap;
}

/* --- contract ---*/
.contract-box {
    padding-top: 8px;
    padding-right: 16px;
}

/* --- alert ---*/
.alert-main {
    background-color: var(--main-alpha);
    color: #000;
    border: 0;
}

.alert-list-title {
    font-weight: bold;
}

@media(min-width:768px) {
    .alert-list-title {
        border-right: 1px solid #FF5629;
    }
}

/* --- table --- */
.table thead tr th {
    background-color: #E3E3E3;
}

.table-striped>tbody>tr:nth-of-type(odd)>* {
    --bs-table-bg-type: transparent;
}

.table-striped>tbody>tr:nth-of-type(even)>* {
    --bs-table-bg-type: #F9FAFC;
}

@media(max-width: 768px) {
    .table-rwd tr {
        display: block;
    }

    .table-rwd tr:nth-child(2n) td {
        background-color: #fff9f7;
    }

    .table-rwd th {
        display: none;
    }

    .table-rwd td {
        padding: 3px 8px;
        line-height: 2em;
        display: block;
        text-align: left;
    }

    .table-rwd td::before {
        content: attr(data-th)"：";
        width: 100%;
    }
}


/* --- tabs --- */
.nav-pills .nav-link {
    border: 1px solid #D4D4D4;
    border-radius: 30px;
    color: #4A4A4A;
}

.nav-pills.style02 {
    gap: 8px;
    justify-content: center;
    margin-top: 24px;
}

.nav-pills.style02 .nav-link {
    border: 0;
    color: #4A4A4A;
}

.nav-pills.style02 .nav-link.active {
    background-color: #4A4A4A;
    color: #FFF;
    padding: 0.25rem 0.725rem;
}

/* --- listbox --- */
.ac-box {
    border-bottom: 1px solid #DEDEDE;
    padding-bottom: 16px;
    margin-bottom: 16px;
}

.ac-box .img-box {
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
}

.ac-box .txt .title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-align: center;
}

@media(min-width:996px) {
    .ac-box .img-box {
        width: 500px;
        margin-top: 0;
    }

    .ac-box {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .ac-box .txt .title {
        text-align: left;
    }
}


/* --- 國際路線專區 --- */

.map {
    text-align: center;
    position: relative;
    margin-bottom: 90px;
}

    .map .CN img,
    .map .MP img,
    .map .JF img,
    .map .SL img,
    .map .AH02 img,
    .map .SA img,
    .map .KA img,
    .map .AH img,
    .map .DL img,
    .map .KT img,
    .map .TR img {
        position: absolute;
        width: 40px;
        cursor: pointer;
    }

    .map .CN #cn-start {
        left: 42%;
        top: 0;
    }

    .map .CN .photo-place #place01 {
        left: 35%;
        top: 9%;
    }

    .map .CN .photo-place #place02 {
        top: 11%;
        left: 43%;
    }

    .map .MP #MP-start {
        left: 51%;
        top: 33%;
    }

    .map .JF #JF-start {
        right: 28%;
        top: 8%;
    }

    .map .SL #SL-start {
        left: 33%;
        top: 23%;
    }

    .map .AH02 #AH02-start {
        left: 13%;
        bottom: 23%;
    }

    .map .SA #SA-start {
        right: 38%;
        bottom: 47%;
    }

    .map .AH #AH-start {
        left: 15%;
        top: 10%;
    }

    .map .KA #KA-start {
        left: 32%;
        bottom: 34%;
    }

    .map .DL #DL-start {
        left: 35%;
        top: 44%;
    }

    .map .KT #KT-start {
        left: 47%;
        bottom: 47%;
    }

    .map .TR #TR-start {
        left: 65%;
        top: 3%;
    }


.map-txt {
    background-color: #00819A;
    position: absolute;
    color: #FFF;
    border-radius: 30px;
    padding: 6px 16px;
    display: none;
    bottom: -70px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
}

    .map-txt .map-ctrl,
    .map-title .map-ctrl {
        display: flex;
        gap: 8px;
        align-items: center;
    }

    .map-txt .line,
    .map-title .line {
        font-size: 2rem;
        font-weight: bolder;
        line-height: 2rem;
    }

    .map-txt .C-title,
    .map-title .C-title {
        text-align: left;
        font-weight: bold;
        font-size: 1.2rem;
        line-height: 1.2rem;
    }

    .map-txt .E-title,
    .map-title .E-title {
        font-size: 0.825rem;
    }


    .map-txt .text-bg-secondary {
        background-color: #9E9E9F !important;
    }

/* --- 國際路線專區 map title --- */

#rolist-CN .map-title {
    color: #00819A;
}

#rolist-JF .map-title {
    color: #A38A3E;
}

#rolist-MP .map-title {
    color: #7c6641;
}

.CN .map-txt {
    bottom: -70px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
}

.ro-message {
    font-size: 1.5rem;
    text-align: center;
    color: #7d7d7d;
}

.rolist {
    display: none;
}

@media (min-width:768px) {

    .map .CN img,
    .map .MP img,
    .map .JF img,
    .map .SL img,
    .map .AH02 img,
    .map .SA img,
    .map .KA img,
    .map .AH img,
    .map .DL img,
    .map .KT img,
    .map .TR img {
        width: 80px;
    }

    .map .CN .photo-place img,
    .map .MP .photo-place img,
    .map .JF .photo-place img {
        width: 31px;
    }

    .map .CN .photo-place #place01 {
        left: 37%;
        top: 11%;
    }

    .map .CN .photo-place #place02 {
        top: 15%;
        left: 45%;
    }

    .map .JF #JF-start {
        right: 30%;
        top: 5%;
    }

    .map .AH #AH-start {
        left: 29%;
        top: 7%;
    }

    .map .KA #KA-start {
        left: 38%;
    }

    .map .DL #DL-start {
        left: 40%;
        top: 41%;
    }

    .map .KT #KT-start {
        left: 48%;
        bottom: 46%;
    }

    .map .TR #TR-start {
        left: 56%;
        top: 1%;
    }

    .map {
        margin-bottom: 0;
    }

    .map-txt {
        width: auto;
    }

    .CN .map-txt {
        left: 0;
        bottom: auto;
        transform: translateX(0);
        width: auto;
    }
}

@media (min-width:996px) {
    .CN .map-txt {
        left: -3%;
    }

    .map .CN .photo-place #place01 {
        left: 37%;
        top: 13%;
    }

    .map .CN .photo-place #place02 {
        left: 46%;
    }
}

@media (min-width:1200px) {
    .CN .map-txt {
        left: 2%;
    }
}

@media (min-width:1400px) {
    .CN .map-txt {
        left: 7%;
    }
}

/* 自定義捲軸 */
.overflow-auto::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.overflow-auto::-webkit-scrollbar-track {
    background-color: #EFEFEF;
}

.overflow-auto::-webkit-scrollbar-thumb {
    background-color: #FF5629;
    border-radius: 3px;
}

.station-list-container {
    list-style: none;
    margin-top: 16px;
    position: relative;
}

.station-list-container li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 8px;
    padding-bottom: 8px;
    position: relative;
}

.station-list-container li::before {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 3px solid #00819A;
    position: absolute;
    left: -20px;
    background-color: #FFF;
    z-index: 1;
}

.station-list-container li:nth-child(1)::before,
.station-list-container li:nth-last-of-type(1)::before {
    background-color: #00819A;
}

.station-list-container li::after {
    content: "";
    width: 1px;
    height: 100%;
    position: absolute;
    background-color: #00819A;
    left: -14px;
}

.station-list-container li:nth-child(1)::after {
    top: 50%;
    height: 50%;
}

.station-list-container li:nth-last-of-type(1)::after {
    bottom: 50%;
    height: 50%;
}

.station-list-container li .circleimg {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
}

.station-list-container li .circleimg img {
    margin: 0 auto;
}

.station-list-container .title {
    font-size: 1rem;
}

.station-list-container .e-txt {
    font-size: 0.725rem;
}


/* --- accordion ---*/
.accordion.style01 {
    margin-bottom: 16px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    border: 1px solid #E2E2E2;
}

.accordion.style01 .accordion-button {
    background-color: #F4F4F4;
    font-size: 1.2rem;
}

.accordion.style01 .accordion-button:not(.collapsed) {
    background-color: #FFF;
    border-bottom: 0;
    box-shadow: none;
    padding-bottom: 0;
    font-weight: bold;
    color: #252525;
    font-size: 1.2rem;
}

.accordion.style01 .accordion-collapse {
    font-size: 0.95rem;
}

/* --- 靜態時刻表 --- */
.schedule_top {
    background-color: #E3E3E3;
    display: flex;
    align-items: center;
    padding: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.schedule_top p {
    margin-bottom: 0;
    margin-left: 16px;
}

.schedule-table thead tr th {
    background-color: #EDEDED;
    white-space: nowrap;
}

.schedule-table.table-hover>tbody>tr:hover>* {
    --bs-table-bg-state: #ffebe5;
}

.schedule-table.table-bordered>:not(caption)>* {
    border-top: 0;
}

.route-description {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.route-description div {
    display: flex;
    gap: 4px;
    align-items: center;
}

.colorblock-white {
    width: 20px;
    height: 20px;
    border: 1px solid #000;
    background-color: #FFF;
    margin-right: 5px;
    margin-left: 10px;
}

.colorblock-yellow {
    width: 20px;
    height: 20px;
    border: 1px solid #fff4d5;
    background-color: #fff4d5;
    margin-right: 5px;
    margin-left: 10px;
}

.colorblock-blue {
    width: 20px;
    height: 20px;
    border: 1px solid #DEF5FD;
    background-color: #DEF5FD;
    margin-right: 5px;
    margin-left: 10px;
}

/* --- 舊版  --- */
.bgcolor01 {
    background-color: #ffe8f0 !important;
}

.bgcolor02 {
    background-color: #e7f0ff !important;
}

#FixHeader .table thead,
#FixHeader .table tbody th {
    white-space: initial !important;
    word-break: keep-all;
    font-size: .9rem;
    padding: 8px 4px;
    font-weight: 400;
    background-color: #ededed;
    font-weight: bold;
}

#FixHeader tbody tr th {
    position: sticky;
    left: -1px;
}

#FixHeader .table-bordered.table_cus thead tr th:first-child {
    position: sticky;
    top: -1px;
    left: -1px;
    z-index: 3;
}

#FixHeader .table td.bgcolor01,
#FixHeader .table td.bgcolor02 {
    text-align: center;
    vertical-align: middle;
}


/* --- divtable ---*/
.div-table {
    width: 100%;
}

.div-table .divthead,
.div-table .divbody a {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    justify-content: space-between;
}

.div-table .divbody a:hover {
    font-weight: normal;
    color: #000000;
}

.div-table .divthead {
    background-color: #E3E3E3;
    padding: 16px;
}


.div-table .divbody {
    padding: 16px;
    border: 1px solid #E2E2E2;
}

.div-table .divthead .div-th,
.div-table .divbody .div-td {
    width: auto;
    text-align: center;
}

.div-table .divthead .div-th:nth-child(1),
.div-table .divbody .div-td:nth-child(1) {
    width: 5%;
}

.div-table .divthead .div-th:nth-last-child(1),
.div-table .divbody .div-td:nth-last-child(2) {
    width: 100%;
}

.div-table .divbody .div-routebox {
    width: 100%;
    padding-left: 16px;
}

.div-routebox {
    display: none;
}

.div-routebox>ul {
    display: flex;
    overflow: auto;
    list-style: none;
    padding: 0 0 20px;
    margin-top: 30px;
    position: relative;
}

.div-routebox>ul li {
    display: flex;
    flex-flow: column;
    gap: 8px;
    justify-content: center;
    align-items: center;
    position: relative;
    flex: 1 1 auto;
    white-space: nowrap;
    padding: 0 8px;
}

.div-routebox>ul li::before {
    content: "";
    position: absolute;
    height: 1px;
    background-color: #E7E7E7;
    left: 0px;
    right: 0px;
    top: 50%;
}

.div-routebox>ul li .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #858585;
    position: relative;
    z-index: 2;
}

.div-routebox .div-cartime>ul {
    padding: 0;
    list-style: none;
    margin: 0;
}

.div-routebox .div-cartime>ul li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-flow: wrap;
    padding: 1rem 1.5rem;
    margin-bottom: 8px;
    border: 1px solid #E5E5E5;
}

.div-routebox .div-cartime>ul li div.flex {
    width: 100%;
}

@media (min-width:483px) {

    .div-table .divthead,
    .div-table .divbody a {
        gap: 16px;
    }

    .div-table .divthead .div-th,
    .div-table .divbody .div-td {
        width: 20%;
    }
}

@media(min-width:768px) {

    .div-table .divthead .div-th,
    .div-table .divbody .div-td {
        width: 15%;
        text-align: center;
    }

    .div-table .divthead .div-th:nth-child(1),
    .div-table .divbody .div-td:nth-child(1) {
        width: 5%;
    }

    .div-table .divthead .div-th:nth-last-child(1),
    .div-table .divbody .div-td:nth-last-child(2) {
        width: 35%;
    }

    .div-table .divthead,
    .div-table .divbody a {
        gap: 0;
    }

    .div-routebox .div-cartime>ul li {
        flex-flow: nowrap;
        justify-content: space-between;
    }
}

/* --- 公車動態 --- */
.buslist {
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

.buslist li {
    width: calc(100% / 5);
    text-align: center;

}

.buslist li a {
    color: #4A4A4A;
    display: block;
    border-radius: 30px;
    padding: 3px;
    font-size: 0.9rem;
}

.buslist li.active a:hover {
    font-weight: normal;
}

.buslist li.active a {
    background-color: #4A4A4A;
    color: #FFF;
}

.grid-column {
    grid-auto-flow: column;
}

.busscu {
    padding: 0 16px 0 0;
    margin: 0;
    list-style: none;
}

.busscu li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    padding-top: 8px;
    position: relative;
    color: #686868;
}

.busscu>li::before {
    content: "";
    width: 1px;
    height: 100%;
    position: absolute;
    right: 4px;
    top: 0;
    background-color: #D9D9D9;
}

.busscu>li:nth-child(1)::before {
    height: 50%;
    top: 50%;
}

.busscu>li:nth-last-child(1)::before {
    height: 50%;
}

.busscu li .bus-time {
    background-color: #F8F8F8;
    border: 1px solid #F8F8F8;
    color: #696969;
    padding: 6px;
    border-radius: 6px;
    width: 70px;
    text-align: center;
    font-size: 0.9rem;
}

.busscu li .train-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    padding: 0;
}

.busscu li .train-icon li {
    margin-bottom: 0;
}

.busscu li .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #D9D9D9;
    z-index: 1;
}

.busscu li .bus-stop {
    font-size: 1rem;
    width: 250px;
}

.busscu li.active {
    font-weight: bold;
    color: #1D1D1D;
}

.busscu li.active .bus-time {
    background-color: var(--primary-color);
    color: #FFF;
}

.busscu li.active .dot {
    background-color: var(--primary-color);
}

.busscu li.wait .bus-time {
    color: #3F3F3F;
    border-color: #3F3F3F;
    background-color: #FFF;
}

.busscu li.leave .bus-time {
    color: #1BA0AB;
    border-color: #1BA0AB;
    background-color: #FFF;
}

.busscu li.notdepart .bus-time {
    color: #757575;
    border-color: #D8D8D8;
    background-color: #FFF;
}

.busscu li.control .bus-time {
    color: #CF7D00;
    border-color: #CF7D00;
    background-color: #FFF;
}

.update-bus {
    color: #686868;
    text-align: center;
}

@media(min-width:768px) {
    .buslist li {
        width: calc(100% / 6);
    }
}

@media(min-width:996px) {
    .buslist li {
        width: calc(100% / 5);
    }
}


@media(min-width:1200px) {
    .buslist li {
        width: calc(100% / 6);
    }
}

/* --- 公車動態 - 車號標籤樣式 --- */
/* 車號標籤主體 */
.bus-info-tag {
    background-color: var(--primary-color);
    color: #FFFFFF;
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-right: -18px;
    position: relative;
}

/* 右側三角形裝飾 (對準點點) */
.bus-info-tag::after {
    content: "";
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 6px solid var(--primary-color);
}

.bus-plate {
    letter-spacing: 0.5px;
}

/* RWD 調整：在極小螢幕下避免文字重疊 */

@media(min-width:320px) {
    .busscu li .bus-stop {
        width: 150px;
    }
}

@media(min-width:390px) {
    .busscu li .bus-stop {
        width: 180px;
    }
}


@media(min-width:430px) {
    .busscu li .bus-stop {
        width: 220px;
    }
}


@media(min-width:768px) {
    .busscu li .bus-stop {
        width: auto;
    }

    .bus-info-tag {
        margin-right: -20%;
    }
}

@media(min-width:996px) {
    .busscu li .bus-stop {
        width: auto;
    }

    .bus-info-tag {
        margin-right: -40%;
    }
}


@media(min-width:1200px) {
    .busscu li .bus-stop {
        width: 280px;
    }

    .bus-info-tag {
        margin-right: 0%;
    }
}

@media(max-width:576px) {
    .busscu li {
        flex-wrap: wrap;
        padding-bottom: 12px;
    }

    .bus-info-tag {
        margin-left: 78px;
        /* 對齊站點文字起始位置 */
        margin-top: 4px;
        order: 3;
    }

    .bus-info-tag::after {
        display: none;
        /* 手機版隱藏箭頭避免視覺混亂 */
    }

}

/*============== 路線選擇 modal ==============*/
/* 自定義 Radio 樣式 */
.btn-outline-light-gray {
    background-color: #f2f2f2;
    border: 1px solid transparent;
    color: #4a4a4a;
    border-radius: 4px;
    padding: 6px 16px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.btn-outline-light-gray:hover {
    background-color: #fbe9e7;
    /* 主要色的超淡背景 */
    color: #D43F16!important;
    /* 文字變為主要色 */
    border: 1px solid #D43F16!important;
}

/* 當 縣市 被選中時的樣式 */
.btn-check:checked+.btn-outline-light-gray {
    background-color: #D43F16 !important;
    /* 主要色 */
    color: #fff !important;
    /* 純白文字確保對比度 */
    border-color: #D43F16;
    font-weight: bold;
    /* 選中後加粗，增加視覺辨識度 */
}

/* 針對 路線 選中的顏色  */
.selection-section:nth-child(3) .btn-check:checked+.btn-outline-light-gray {
    color: #B23412 !important;
    border-color: #B23412 !important;
    background-color: #B234121A !important;
}

/* RWD 調整 */
@media (max-width: 576px) {
    .custom-radio-item {
        width: calc(50% - 8px);
        /* 手機版縣市兩列排版 */
    }

    .w-100-mobile {
        width: 100% !important;
        /* 手機版路線全寬 */
    }

    .btn-outline-light-gray {
        width: 100%;
        text-align: center;
    }
}

/* AA 無障礙：強化焦點框線 */
.btn-check:focus-visible+.btn-outline-light-gray {
    outline: 3px solid #000 !important;
    /* 黑色框線提供最強對比 */
    outline-offset: 2px;
    /* 框線外擴避免遮擋內容 */
    box-shadow: 0 0 0 4px rgba(212, 63, 22, 0.2);
    /* 淡淡的主要色光暈 */
}

/*============== 時刻表與票價 =============*/

.bgrowcolor01 {
    background-color: #C05000 !important;
}

.bgrowcolor02 {
    background-color: #FFD9B3 !important;
}

/* 讓圖示有旋轉動畫 */
.transition-icon {
    transition: transform 0.3s ease;
}

/* 當內容展開時(這部分需配合 JS 切換 class 或偵測 visibility) */
.divbody.active .transition-icon {
    transform: rotate(180deg);
}

/* 強化整列的點擊感 */
.div-table .divbody a {
    text-decoration: none;
    color: inherit;
    display: flex;
    padding: 1rem;
    transition: background-color 0.2s;
}

.div-table .divbody a:hover {
    background-color: #FFF5F2;
    /* 淺橘色背景提示 */
}

/* 班次切換連結設計 */
.result-nav a {
    font-size: 0.95rem;
    transition: color 0.2s ease;
    font-weight: 500;
}

.result-nav a:hover {
    color: var(--primary-color) !important;
}

/* 修正規格中行車時間的橫線裝飾 (如截圖所示) */
.div-td .text-orange i {
    vertical-align: middle;
}

/* 表格備註欄位對齊 */
.div-table .divthead .div-th:last-child,
.div-table .divbody .div-td:last-child {
    flex: 1;
    /* 讓備註欄位自動延伸 */
    text-align: left;
    padding-left: 20px;
}

/* 響應式調整：手機版時文字縮小以免折行太嚴重 */
@media (max-width: 768px) {
    .search-result-header .fs-5 {
        font-size: 1.1rem !important;
    }

    .result-nav {
        width: 100%;
        justify-content: flex-end;
        margin-top: 0.5rem;
    }
}

@media (max-width: 576px) {
    .div-table .divthead .div-th:last-child {
        display: none;
    }
}

@media (max-width: 390px) {
    .search-result-header .fs-5 {
        font-size: 1rem !important;
    }
}

@media (max-width: 360px) {
    .search-result-header .fs-5 {
        font-size: 0.9rem !important;
    }
}

/* =========================================
   網站導覽頁面樣式 (F0-2-1)
   ========================================= */

/* 頁面主體區塊 */
.page_body {
    margin: 30px 0px;
    border-radius: 8px;
    box-shadow: 0px 20px 30px rgba(0, 0, 0, 0.03);
    background-color: #fff;
    padding: 30px;
    width: 100%;
}

.page_body .sec_title {
    margin-top: 0;
}

.page_body .sec_title::after {
    padding-left: 6px;
}

@media (max-width: 767px) {
    .page_body {
        margin: 15px 0px;
        border-radius: 5px;
        padding: 15px;
    }
}

/* 標題樣式（含紅色裝飾線 "---"） */
.sec_title {
    margin-top: 1rem;
    margin-bottom: 1rem;
    letter-spacing: .05rem;
    color: var(--primary-color);
    position: relative;
    font-size: 2rem;
    font-weight: bold;
}

.sec_title::after {
    content: '---';
    display: inline-block;
    padding-left: 10px;
    letter-spacing: 3px;
    color: var(--primary-color);
}

/* 快捷鍵按鈕樣式 (Alt+U, Alt+M, Alt+Z) */
.guide_list {
    padding-left: 0;
    list-style: none;
}

.guide_list li {
    margin-bottom: 0.5rem;
}

.guide_list .badge.badge-light {
    font-weight: 700;
    color: #D24119;
    background-color: #FFF;
    border: 2px solid #D24119;
    border-radius: 50rem;
    padding: 0.35rem 0.8rem;
    font-size: 1rem;
    display: inline-block;
    margin-right: 0.5rem;
}

/* 導覽連結列表樣式 */
.glink_list.ch {
    width: 25%;
    max-width: 25%;
}

.glink_list a {
    display: block;
    padding: .4rem .75rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.glink_list a:hover {
    background-color: var(--hover-bg);
}

.glink_list span {
    pointer-events: none;
}

/* 主類別按鈕樣式 */
.glink_list .btn-red {
    background-color: #FFEEE9;
    border: 0;
    border-bottom: 4px solid #FF5629;
    color: #242424 !important;
    border-radius: 0;
    text-align: center !important;
    font-weight: bold;
    padding: 0.5rem 0.75rem;
}

.glink_list .btn-red:hover {
    color: #FFF !important;
    background-color: #D24119;
    border-bottom: 4px solid #D24119;
}

/* RWD 響應式調整 */
@media (max-width: 1440px) {
    .glink_list.ch {
        width: 33.3333%;
        max-width: 33.3333%;
    }
}

@media (max-width: 992px) {
    .glink_list.ch {
        width: 50%;
        max-width: 50%;
    }
    
    .sec_title {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .glink_list.ch {
        width: 100%;
        max-width: 100%;
    }
    
    .sec_title {
        font-size: 1.6rem;
    }
}

@media (max-width: 576px) {
    .sec_title {
        font-size: 1.4rem;
    }
}