:root {
    --primary-font-zh: 'Noto Sans TC', sans-serif;
    --primary-font-en: 'Inter', sans-serif;
    --navbar-bg-color: rgba(255, 255, 255, 0.85);
    --op-white: #fff;
    --op-black: #000;
    --op-red: #FF0000;
    --op-red-dark: #d9534f;
    --op-gray1: #555;
    --op-gray2: #ccc;
    --op-gray3: #777;
    --op-gray4: #f3f3f3;
    --body-gray: #333;
    --title-blue: #0039a5;
    --border-blue: #007bff;
    --hover-blue: #0015d6;
    --main-blue: #293962;
    --sub-blue: #007bff;
    --sub-blue2: #1e40af;
    --sub-blue3: #2563eb;
    --sub-blue4: #eff6ff;
    --border-gray: #e5e7eb;
    --blue-cell-border: rgba(255, 255, 255, 0.2);
    /* 預設字體大小變數 */
    --h1-size: 2rem;
    --h2-size: 1.75rem;
    --h3-size: 1.5rem;
    --h4-size: 1.25rem;
    --h5-size: 1.125rem;
    --h6-size: 1rem;
    --a-size: 1rem;
    --p-size: 1rem;
    --button-size: 1rem;
}

/* 小型字體大小 */
body.font-small {
    --h1-size: 1.75rem;
    --h2-size: 1.5rem;
    --h3-size: 1.25rem;
    --h4-size: 1.2rem;
    --h5-size: 1rem;
    --h6-size: 0.8rem;
    --a-size: 0.8rem;
    --p-size: 0.8rem;
    --button-size: 0.8rem;
}

/* 中等字體大小 */
body.font-medium {
    --h1-size: 2rem;
    --h2-size: 1.75rem;
    --h3-size: 1.5rem;
    --h4-size: 1.25rem;
    --h5-size: 1.125rem;
    --h6-size: 1rem;
    --a-size: 1rem;
    --p-size: 1rem;
    --button-size: 1rem;
}

/* 大型字體大小 */
body.font-large {
    --h1-size: 3rem;
    --h2-size: 2.4rem;
    --h3-size: 2.1rem;
    --h4-size: 1.8rem;
    --h5-size: 1.5rem;
    --h6-size: 1.2rem;
    --a-size: 1.2rem;
    --p-size: 1.2rem;
    --button-size: 1.2rem;
}

li,
td,
tr {
    font-size: var(--p-size);
}

body {
    margin: 0;
    font-family: var(--primary-font-zh);
    background-color: #f0f0f0;
    background-image: url('../img/bg.jpg');
    background-size: cover;
    background-position: center;
    width: 100vw;
    overflow-x: hidden;
    overflow-y: scroll;
    word-break: normal;
    overflow-wrap: break-word;
}

a {
    word-break: break-all;
    overflow-wrap: break-word;
    white-space: normal;
}

html,
body {
    overflow-x: hidden !important;
}



/* 基本樣式與字體設定 */
h1,
h2,
h3,
h4,
h5,
h6,
.en-text {
    font-family: var(--primary-font-en);
    font-weight: normal;
}

h1 {
    font-size: 2.5rem;
    margin: 0;
}

h2 {
    font-size: 2rem;
    margin: 0;
}

h3 {
    font-size: 1.75rem;
    margin: 0;
}

h4 {
    font-size: 1.5rem;
    margin: 0;
}

h5 {
    font-size: 1.25rem;
    margin: 0;
}

h6 {
    font-size: 1rem;
    margin: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

h1 {
    font-size: var(--h1-size);
}

h2 {
    font-size: var(--h2-size);
}

h3 {
    font-size: var(--h3-size);
}

h4 {
    font-size: var(--h4-size);
}

h5 {
    font-size: var(--h5-size);
}

h6 {
    font-size: var(--h6-size);
}

a {
    font-size: var(--a-size);
}

p {
    font-size: var(--p-size);
}

button {
    font-size: var(--button-size);
}

/* 動畫 */

.header-container {
    transition: all 1s ease-out;
    opacity: 0;
    transform: translateY(-60px);
}

.header-container.show-header {
    opacity: 1;
    transform: translateY(0);
}

.info-card-container {
    transition: opacity 2s ease-out, transform 2s ease-out;
}

.info-card-container.hide-on-scroll {
    opacity: 0;
    transform: translateX(60px);
}

.info-card-container.reveal {
    opacity: 1;
    transform: translateX(0);
}

.icon-item {
    transition:
        opacity 0.5s ease-out,
        transform 0.15s ease-out,
        background-color 0.1s ease-out,
        color 0.1s ease-out,
        border-color 0.1s ease-out;
    opacity: 0;
    transform: translateY(30px);
}

.icon-item {
    opacity: 0;
    transform: translateY(30px);

}

.icon-item.show {
    opacity: 1;
    transform: translateY(0);
}

/* 動畫結束 */

/* 彈跳視窗 */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 100vw;
    height: 100vh;
    background-color: #000;
}

.modal-backdrop.fade {
    opacity: 0;
    transition: opacity 0.15s linear;
}

.modal-backdrop.show {
    opacity: 0.5;
}

/* 模態視窗本身 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
    display: none;
}

.modal.show {
    display: block;
}

.modal.fade .modal-dialog {
    transition: transform 1s ease-out, opacity 1s ease-out;
    transform: translateX(100%);
    /* 初始位置在畫面右側外 */
    opacity: 0;
}

.modal.show .modal-dialog {
    transform: translateX(0);
    /* 回到正中央 */
    opacity: 1;
}

.modal.show .modal-dialog {
    transform: none;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 1.75rem auto;
    pointer-events: none;
}

.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 3.5rem);
}

/* 模態內容 */
.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-clip: padding-box;
    background-color: var(--op-white);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    outline: 0;
    max-width: 800px;
    margin: 0 auto;
    width: calc(100% - 80px);
    background-image: url(../img/modal-bg.jpg);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 40px;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.modal-heading {
    color: #850707;
    font-weight: 400;
}

.modal-body {
    display: flex;
    flex-direction: column;
    position: relative;
    flex: 1 1 auto;
    padding: 0 30px 30px 30px;
    gap: 20px;
}

.model-ltd-box {
    display: flex;
    gap: 20px;
}

.close {
    padding: 1rem 1rem;
    margin: -1rem -1rem -1rem auto;
    cursor: pointer;
    font-size: 30px;
    line-height: 1;
    color: var(--op-white);
    background-color: transparent;
    border: 0;
}

.close:hover {
    opacity: 0.75;
}

body.modal-open {
    overflow: hidden !important;
}

#welcomeModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-box {
    border-radius: 10px;
    padding: 15px 20px;
    background-color: rgba(255, 255, 255, 0.6);
    width: 100%;
    color: var(--body-gray, #333);
    font-weight: 400;
    line-height: 1.6;
    font-family: var(--primary-font-zh, 'Noto Sans TC', sans-serif);
    font-size: var(--h5-size);
    box-sizing: border-box;
}

.modal-title {
    font-weight: 400;
    display: inline-block;
    background-color: #850707;
    color: #fff;
    padding: 5px 15px;
    border-radius: 10px;
}

.modal-list-no-bullets {
    list-style-type: none;
}

.modal-list-no-bullets li {
    word-break: break-all;
}


/* 彈跳視窗結束 */

/* 頁首區塊 */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    max-width: 1440px;
    margin: 0 auto;
}

.logo {
    max-width: 300px;
    height: auto;
}

/* header-right-menu 電腦版樣式 */
.header-right-menu {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.top-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.text-menu {
    display: flex;
    align-items: center;
    color: var(--main-blue);
    gap: 10px;
}


.top-menu a {
    font-family: var(--primary-font-zh);
    transition: color 0.3s;
}

.top-menu a:hover {
    color: #000;
}

.main-search-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.separator-blue {
    width: 1px;
    height: 18px;
    background-color: var(--main-blue);
}


/* 字體選擇器的容器樣式 */
.font-size-selector-container {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 按鈕的基本樣式 */
.size-button {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    user-select: none;
}

/* 未被選中的狀態 */
.size-button.unselected {
    background-color: #E8E8E8;
    color: #000000;
}

/* 被選中的狀態 */
.size-button.selected {
    background-color: #293962;
    color: #FFF;
}


/* 熱門搜尋區塊樣式 */
.popular-searches {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #333;
}

.popular-searches .label {
    white-space: nowrap;
}

.popular-searches .search-link {
    color: var(--sub-blue);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-bottom 0.2s ease;
    white-space: nowrap;
}

.popular-searches .search-link:hover {
    border-bottom-color: var(--sub-blue);
}

/* 搜尋框樣式 */
.search-box {
    display: flex;
    align-items: center;
    height: 40px;
    border-radius: 20px;
    background-color: var(--sub-blue);
    padding: 0 15px;
    box-sizing: border-box;
}

.search-icon {
    color: var(--op-white);
    margin-right: 10px;
}

.search-input {
    flex-grow: 1;
    background-color: transparent;
    border: none;
    outline: none;
    color: var(--op-white);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

.separator {
    width: 1px;
    height: 25px;
    background-color: var(--op-white);
    margin: 0 10px;
}

.search-button {
    background-color: transparent;
    border: none;
    color: var(--op-white);
    cursor: pointer;
    white-space: nowrap;
    font-size: var(--button-size);
}

/* 進階搜尋按鈕樣式 */
.advanced-search-button {
    height: 40px;
    padding: 0 20px;
    border: none;
    border-radius: 20px;
    background-color: var(--main-blue);
    color: var(--op-white);
    cursor: pointer;
    white-space: nowrap;
    font-size: var(--button-size);
}



/* 導覽列區塊 */
.navbar-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 10px;
    z-index: 999;
}

.navbar-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 10px;
    z-index: 999;
    max-width: 1440px;
}

.nav-list {
    display: flex;
    list-style: none;
    padding: 10px 20px;
    margin: 0;
    width: 1440px;
    max-width: 90%;
    background-color: var(--navbar-bg-color);
    border-radius: 20rem;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
    justify-content: space-around;
    flex-wrap: wrap;
    transition: all 0.3s ease-in-out;
}

/* 黏性導覽列定位 */
.navbar-container.sticky {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0;
    background-color: #FFF;
    box-shadow: none;
    /* 黏性狀態下移除陰影 */
    border-radius: 0;
    gap: 20px;

}

/* 黏性導覽列時，.sticky-logo-wrapper 顯示 */
.navbar-container.sticky .sticky-logo-wrapper {
    display: block;
}

/* 當 navbar-container 啟動 sticky 狀態時，調整 nav-list 的樣式 */
.navbar-container.sticky .nav-list {
    background-color: transparent;
    /* 黏性狀態下移除 nav-list 的背景色 */
    box-shadow: none;
    /* 黏性狀態下移除 nav-list 的陰影 */
    border-radius: 0;
}

/* 黏性 LOGO 容器樣式 */
.sticky-logo-wrapper {
    display: none;
    /* 預設隱藏 */
    border-radius: 20rem;
    margin: 0 20px;
    transition: all 0.3s ease-in-out;
}

.sticky-logo {
    max-width: 200px;
    height: auto;
}

.nav-item {
    position: relative;
    padding: 4px 10px;
}

.nav-item a {
    display: flex;
    align-items: center;
    white-space: nowrap;
    color: var(--main-blue);
    font-size: var(--h5-size);
    transition: color 0.3s;
}

.nav-item p {
    display: flex;
    align-items: center;
    white-space: nowrap;
    color: var(--main-blue);
    font-size: var(--h5-size);
    transition: color 0.3s;
    margin: 0;
    cursor: pointer;
}

.nav-item p:hover {
    color: var(--sub-blue);
}

.nav-item a:hover {
    color: var(--sub-blue);
}

.bi-chevron-down::before {
    content: "\f282";
    margin-left: 4px;
}

/* 下拉選單樣式 */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 180px;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 10px 0;
    z-index: 1000;
    transition: max-height 0.3s ease-in-out, padding 0.3s ease-in-out;
}

/* 移除桌面版的 :hover 效果，改用 .active 類別 */
.nav-item.active .dropdown-menu {
    display: block;
}

/* 讓箭頭在展開時旋轉 */
.nav-item.active .nav-arrow {
    transform: rotate(180deg);
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: #333;
    font-weight: normal;
    transition: background-color 0.3s;
}


.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: #333;
    font-weight: normal;
    transition: background-color 0.3s;
}



.dropdown-menu a {
    font-size: var(--a-size);
}



/* 漢堡選單樣式 */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: fixed;
    top: 4px;
    right: 10px;
    z-index: 1000;
}

.hamburger-menu.active {
    position: absolute;
    top: 4px;
    right: 10px;
    z-index: 1000;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger-menu.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.banner-wrapper {
    position: relative;
}

/* 便民服務固定按鈕容器 */
.service-btn-container {
    position: absolute;
    top: 0;
    right: 20px;
    z-index: 999;
    width: 120px;
    height: 50px;
}

.service-btn-container.fixed {
    position: fixed;
    top: 100px;
    right: 20px;
}

/* 主按鈕樣式 */
.sticky-service-btn {
    width: 100%;
    height: 100%;
    background-color: #293962;
    color: #FFF;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: var(--h6-size);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.sticky-service-btn:hover {
    background-color: #3f517a;
    transform: translateY(-2px);
}

.sticky-service-btn span {
    margin-left: 10px;
}

/* 箭頭樣式 */
.sticky-service-btn .nav-arrow {
    transition: transform 0.3s ease;
}

.sticky-service-btn.active .nav-arrow {
    transform: rotate(180deg);
}

/* 彈出選單樣式 */
.service-menu-popup {
    display: none;
    flex-direction: column;
    width: 120px;
    position: absolute;
    /* 相對 service-btn-container 定位 */
    top: 100%;
    left: 0;
}

.service-menu-popup.show {
    display: flex;
    gap: 5px;
    margin-top: 5px;
}

/* 彈出選單內的按鈕樣式 */
.popup-btn {
    width: 100%;
    height: 50px;
    border-radius: 6px;
    background-color: #FFF;
    color: #293962;
    border: 1px solid #d9d9d9;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.popup-btn:last-child {
    margin-bottom: 0;
    /* 移除最後一個按鈕的底部間距 */
}

.popup-btn:hover {
    background-color: #f0f4f9;
    transform: translateX(5px);
}

.popup-btn h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: normal;
}




/* 輪播區塊 */
.main-banner-wrapper {
    position: relative;
    max-width: 1100px;
    margin: 40px auto 0;
    display: flex;
    justify-content: center;
}

.banner-carousel-container {
    position: relative;
    width: 1300px;
    height: 400px;
    overflow: hidden;
    border-radius: 20px;
}

.carousel-wrapper {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    flex: 0 0 100%;
    position: relative;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 文字疊層樣式 */
.text-overlay {
    position: absolute;
    bottom: 40px;
    left: 40px;
    color: var(--op-white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.text-overlay h1 {
    font-size: var(--h1-size);
    line-height: 1.2;
}

/* 左右導航按鈕樣式 */
.carousel-control-prev,
.carousel-control-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.carousel-control-prev {
    left: 30px;
    /* 按鈕距離父容器左側30px */
}

.carousel-control-next {
    right: 30px;
    /* 按鈕距離父容器右側30px */
}

.carousel-control-prev i,
.carousel-control-next i {
    font-size: 2rem;
    color: #333;
}



/* 底部資訊卡片樣式 */
.info-card-container {
    position: absolute;
    right: 0%;
    bottom: -35px;
    width: 700px;
    height: 70px;
    z-index: 5;
    background-color: transparent;
}

.info-card {
    position: absolute;
    right: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 20px;
    background-color: rgb(224 238 255 / 80%);
    border-radius: 6px;
    color: var(--main-blue);
    font-size: var(--h6-size);
    white-space: nowrap;
    transition: transform 0.5s ease-in-out;
}


/* 新增的圓形圖示區塊樣式 */
.icon-grid-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 80px auto;
    max-width: 1440px;
    padding-left: 20px;
    padding-right: 20px;
}

/* 圓形圖示項目樣式 */
.icon-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    padding: 10px;
    color: #293962;
}

.icon-item:hover {
    transform: scale(1.2);
}

/* 圓形內的 SVG 區塊 */
.icon-svg {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
}

.icon-pic img {
    width: 100px;
    height: 100px;
    margin-bottom: 10px;
}

/* 圓形內的文字樣式 */
.icon-text {
    font-size: 1rem;
    font-weight: bold;
    line-height: 1.2;
    margin: 0;
    word-break: break-all;
    /* 確保文字在必要時換行 */
}

/* 確保 SVG 繼承文字顏色 */
.icon-item .icon-svg svg {
    fill: currentColor;
}

/* Hover 懸停狀態：藍底白字白SVG */
.icon-pic :hover {
    animation: bounce 1s ease-in-out 1 forwards;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

.bounce-button:hover {
    animation: bounce 1s ease-in-out;
}

/* 新增的「供氣安全宣導」區塊樣式 */
.safety-ad-wrapper {
    display: flex;
    margin: 40px auto;
    justify-content: space-evenly;
    max-width: 1440px;
}

.safety-ad-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 700px;
    width: 500px;
    height: 60px;
    background-color: #FFF;
    border-radius: 40px;
    padding-left: 30px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
/*    opacity: 0.5;
*/}


/* 文字樣式 */
.safety-text {
    font-size: 1.25rem;
    font-weight: bold;
    color: #333;
    margin: 0 20px;
}

/* 按鈕樣式 */
.view-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    /* 讓按鈕高度填滿父容器 */
    padding: 0 30px;
    /* 左右內距 */
    background-color: #293962;
    color: #FFF;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    /* 移除下底線 */
    border-radius: 0 40px 0;
    transition: background-color 0.3s ease;
}

/* 按鈕懸停效果 */
.view-more-btn:hover {
    background-color: #1a2745;
    /* 懸停時顏色變深 */
}

.view-more-btn i {
    margin-left: 8px;
    /* 箭頭和文字的間距 */
    font-size: 1.25rem;
}


/* 消息區塊整體容器 */
.news-section-wrapper {
    display: flex;
    justify-content: center;
    gap: 80px;
    max-width: 1440px;
    margin: 80px auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* 兩個分欄的通用樣式 */
.news-column {
    flex: 1;
    /* 讓兩個區塊平均分配剩餘空間 */
    max-width: 600px;
    /* 限制每個分欄的最大寬度 */
}

/* 標題樣式 */
.column-title {
    font-size: var(--h2-size);
    color: #333;
    margin-bottom: 20px;
}

/* 新聞項目列表 */
.news-list {
    display: flex;
    flex-direction: column;
}

/* 單一新聞項目的樣式 */
.news-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    text-decoration: none;
    /* 移除下底線 */
    color: #333;
    border-bottom: 1px dotted #ccc;
    /* 點狀底線 */
    transition: color 0.3s ease;
}


/* 日期樣式 */
.news-date {
    font-size: 0.9rem;
    color: #4b5563;
    ;
    margin-right: 15px;
}

/* 新聞標題樣式 */
.news-title {
    flex: 1;
    font-size: 1.1rem;
    font-weight: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 右箭頭圖示樣式 */
.news-item i {
    font-size: 1.25rem;
    color: #4b5563;
    transition: transform 0.3s ease;
}

.news-item p {
    color: #4b5563;
    transition: transform 0.3s ease;
}

.news-item:hover {
    color: var(--sub-blue2);
}

.news-item:hover i,
.news-item:hover p {
    color: var(--sub-blue2);
    transform: translateX(5px);
}

.more-link-wrapper {
    display: flex;
    justify-content: flex-end;
}

.more-link {
    display: block;
    width: 20%;
    text-align: center;
    text-decoration: none;
    color: var(--sub-blue2);
    /* padding: 10px 0; */
    margin-top: 20px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.more-link:hover {
    /* background-color: #1a2745; */
    color: var(--sub-blue);
}

.more-link h6 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
}

/* 影音區塊整體容器 */
.video-section-wrapper {
    max-width: 1440px;
    margin: 80px auto;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

/* 區塊標題 */
.section-title {
    font-size: var(--h1-size);
    color: #333;
    text-align: center;
    margin-bottom: 40px;
}

/* 影片與資訊卡片容器 */
.video-content {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 40px;
    /* 影片與資訊卡之間的間距 */
}

/* 影片容器 */
.video-container {
    position: relative;
    width: 80%;
    padding-top: 33.75%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-container-full {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin: 20px 0;
    height: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.video-container-full iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 影片資訊卡片 */
.video-info-card {
    display: flex;
    flex-direction: column;
    gap: 100px;
    position: relative;
    width: 40%;
    background-color: #555;
    color: #FFF;
    padding: 30px;
    border-radius: 10px;
    border-left: 5px solid #FF0000;
}

/* 影片標題 */
.video-title {
    font-size: 1.25rem;
    font-weight: bold;
    line-height: 1.5;
    margin: 0;
    /* 移除預設的 margin */
}

/* 影片元資訊的容器 */
.video-meta {
    /* 這裡可以維持現有樣式，或者也使用 gap */
    display: flex;
    flex-direction: column;
    gap: 5px;
    /* 在 video-channel 和 video-date 之間增加間距 */
}

/* 影片元資訊標籤樣式 */
.video-channel,
.video-date {
    font-size: 0.9rem;
    color: #ccc;
    margin: 0;
    font-weight: normal;
    line-height: 1.2;
}

/* 公告區塊整體樣式 */
.announcement-wrapper {
    max-width: 1440px;
    margin: 80px auto;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

/* 區塊標題 */
.announcement-title {
    font-size: var(--h1-size);
    color: #333;
    text-align: center;
    margin-bottom: 40px;
}

/* 卡片容器 */
.announcement-cards-container {
    display: flex;
    justify-content: center;
    justify-content: space-between;
    gap: 20px;
}

/* 單一卡片的樣式 */
.announcement-card {
    flex: 1;
    /* 讓卡片平均分配空間 */
    max-width: 400px;
    background-color: #FFF;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    /* 確保圖片圓角生效 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

/* 卡片懸停效果 */
.announcement-card:hover {
    transform: translateY(-5px);
    /* 向上微移 */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    /* 陰影加深 */
}

/* 圖片容器 */
.card-image {
    width: 100%;
    height: auto;
    /* 讓圖片高度自動調整 */
}

.card-image img {
    width: 100%;
    height: 400px;
    object-fit: fill;
}

/* 文字內容區塊 */
.card-content {
    padding: 20px;
}

/* 文字標題樣式 */
.card-heading {
    font-size: 1.25rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

/* 文字內容樣式 */
.card-text {
    font-size: 1rem;
    color: #4b5563;
    ;
    margin: 0;
}

/* 天然氣計費公告區塊 */
.gas-bill-wrapper {
    padding: 0 20px;
}

.gas-bill-container {
    max-width: 1440px;
    height: 400px;
    margin: 80px auto;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background-image: url('../img/gas_bill.jpg');
    background-size: cover;
    background-position: center;
}

/* 半透明黑色遮罩 */
.gas-bill-wrapper .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    /* 40% 透明度的黑色 */
}

/* 文字內容容器 */
.gas-bill-content {
    position: relative;
    /* 確保內容在遮罩之上 */
    z-index: 1;
    /* 將內容放在遮罩前面 */
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* 垂直置中 */
    align-items: center;
    /* 水平置中 */
    text-align: center;
    color: #FFF;
    padding: 20px;
    box-sizing: border-box;
    gap: 15px;
    /* 增加文字行距 */
}

/* 文字樣式 */
.gas-bill-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.gas-bill-rate,
.gas-bill-date {
    font-size: 1.5rem;
    font-weight: normal;
    margin: 0;
}

.gas-bill-note {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-top: 20px;
}

/* 藍色連結樣式 */
.link-info {
    color: var(--border-blue);
    text-decoration: underline;
    transition: color 0.3s;
}

.link-info:hover {
    color: #0099ff;
}


/* 友善連結 */
.friendly-links {
    max-width: 1440px;
    margin: 40px auto;
    padding: 20px;
}

.friendly-links h1 {
    font-size: var(--h1-size);
    margin-bottom: 25px;
    text-align: center;
    color: #333;
}

/* 滾動容器與按鈕 */
.scroll-wrapper {
    display: flex;
    /* 使用 flexbox 排列 */
    align-items: center;
    /* 垂直置中 */
    gap: 20px;
    /* 按鈕與區塊的間距 */
}

/* 連結容器樣式：核心滑動功能 */
.links-container {
    flex-grow: 1;
    /* 讓容器佔據剩餘空間 */
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 15px;
    -webkit-overflow-scrolling: touch;
}

/* 隱藏滑動條（可選） */
.links-container::-webkit-scrollbar {
    display: none;
}

/* 單個連結項目樣式 */
.link-item {
    flex: 0 0 auto;
    width: 180px;
    height: 80px;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.link-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.link-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 滑動按鈕樣式 */
.scroll-button {
    background: #FFF;
    border: 1px solid #ccc;
    color: #333;
    width: 40px;
    height: 40px;
    padding: 10px 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 1.5rem;
    color: #333;
    transition: background-color 0.3s, border-color 0.3s;
}

.scroll-button:hover {
    opacity: 1;
}





/* FAT FOOTER 區塊 */
.footer-fat {
    background-color: #d8dbe5;
    padding-top: 0;
    color: #293962;
    position: relative;
    font-family: 'Noto Sans TC', sans-serif;
}

.footer-fat-toggle-btn {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 40px;
    background-color: #293962;
    color: #fff;
    border: none;
    border-top-left-radius: 50px;
    border-top-right-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
    transition: transform 0.3s ease;
}

.footer-fat-toggle-btn:hover {
    transform: translateX(-50%) translateY(-2px);
}

.footer-fat-toggle-btn .nav-arrow {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.footer-fat-toggle-btn.expanded i {
    transform: rotate(180deg);
}

.footer-fat-toggle-btn span {
    margin-left: 5px;
}

.footer-contents-box {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
    max-width: 1440px;
    margin: 0 auto;
}

.footer-contents-box.show {
    max-height: 1000px;
    transition: max-height 0.5s ease-in;
}

.footer-grid-container {
    padding-top: 60px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 60px 20px 20px;
}

.footer-column {
    flex: 1 1 100px;
}

.footer-title {
    background-color: #293962;
    color: #fff;
    font-weight: bold;
    margin-bottom: 15px;
    padding: 5px 10px;
    display: inline-block;
    width: 120px;
    text-align: center;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 8px;
}

.footer-column a {
    text-decoration: none;
    color: #293962;
    font-size: var(--a-size);
    transition: color 0.2s ease;
}

.footer-column a:hover {
    color: #555;
}

.footer-fat-info-bar {
    background-color: var(--main-blue);
    color: #fff;
    padding: 40px 0;
    font-size: 0.8rem;
    line-height: 1.5;
}

.footer-fat-inner-wrapper {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
}

.footer-fat-contact-info {
    display: flex;
    gap: 20px;
    flex-direction: column;
}

.footer-fat-copyright-info {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 20px;
}

.footer-fat-links-container a {
    text-decoration: none;
    color: #fff;
    font-size: var(--h5-size);
}

.footer-fat-links-container span {
    margin: 0 5px;
    color: #ccc;
}

.footer {
    background-color: #003366;
    color: #fff;
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 0.9rem;
    line-height: 1.5;
}

.footer-inner-wrapper {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-top-link {
    background-color: var(--main-blue);
    padding: 8px 0;
    text-align: right;
}

.top-link-text {
    color: #fff;
    text-decoration: none;
    font-size: 0.8rem;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.top-link-text:hover {
    background-color: #004488;
}

.footer-emergency {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.emergency-icon {
    cursor: pointer;
    width: 180px;
}

.footer-col .footer-serveice {
    display: flex;
    flex-direction: row;
}

.footer-sns {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.footer-sns-icons {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.sns-icon {
    cursor: pointer;
    width: 100px;
}

/* --- Footer 地址區域樣式 (修正手機版) --- */

.footer-address {
    display: flex;
    flex-direction: column; /* 垂直排列：第一行為地址+icon，第二行為營業大廳 */
    align-items: flex-start;
    width: 100%; /* 確保容器寬度正確 */
}

/* 第一行：地址 + Icon */
.address-row {
    display: flex;
    align-items: center; /* 讓文字與 Icon 垂直置中對齊 */
    flex-wrap: wrap; /* 允許在極小螢幕自動換行，避免破版 */
    width: 100%;
}

    /* 確保地址文字不會撐壞版面 */
    .address-row h5 {
        margin: 0; /* 移除 h5 預設外距 */
        white-space: normal; /* 允許文字換行 */
    }

/* Google Map Icon 設定 */
.map-icon {
    width: 30px; /* 依據原檔 source: 166 的設定 */
    margin-left: 8px; /* Icon 與文字的間距 */
    flex-shrink: 0; /* 關鍵：防止 Icon 被手機版文字擠壓變形 */
    display: block; /* 修正圖片屬性 */
}

/* 第二行：營業大廳資訊 */
.lobby-info {
    margin-left: 5.5em; /* 電腦版：縮排對齊 */
    margin-top: 5px; /* 與上方的間距 */
    margin-bottom: 0; /* 移除多餘外距 */
}

/* --- 手機版 RWD 調整 --- */
@media (max-width: 768px) {
    .address-row {
        /* 手機版讓地址與 Icon 保持在一行，或依內容長度自然流動 */
        flex-wrap: nowrap;
    }

        .address-row h5 {
            /* 確保文字太長時會自動換行，而不會把 icon 推出去 */
            flex: 1;
        }

    .lobby-info {
        /* 手機版：取消縮排，避免文字超出螢幕右側 */
        margin-left: 0;
        /* 增加一點縮排區隔，或是直接靠左 */
        padding-left: 0;
    }
}
.map-icon {
    cursor: pointer;
    width: 30px;
}

/* 電話 */
.phone-link {
    color: #FCD07E;
    text-decoration: none;
}

/* 響應式設計 */
@media (max-width: 1400px) {
    .footer-fat-inner-wrapper {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .footer-fat-copyright-info {
        align-items: flex-start;
        margin-top: 20px;
        text-align: left;
    }
}

@media (max-width: 1200px) {

    .service-btn-container {
        display: none;
    }

    .header-container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 2;
        background: #fff;
        padding: 10px 20px;
    }

    .header-right-menu {
        display: none;
    }

    .navbar-container.sticky {
        width: 100%;
        border-radius: 0;
        justify-content: space-between;
    }

    .navbar-container.sticky .nav-list {
        margin: 0 20px;
    }

    .hamburger-menu {
        display: block;
    }

    .navbar-container {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--op-white);
        z-index: 1000;
        margin: 0;
        padding: 20px;
        justify-content: center;
        align-items: center;
        overflow-y: auto;
        box-shadow: none;
    }

    .navbar-container.active {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 20px;
        box-sizing: border-box;
    }

    .navbar-container.active>* {
        flex-shrink: 0;
    }

    .navbar-container.active .header-right-menu {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        margin-top: 60px;
        margin-bottom: 20px;
    }

    .navbar-container.active .top-menu {
        display: flex;
        flex-direction: row;
        align-items: baseline;
        flex-wrap: wrap;
        width: 100%;
        margin-bottom: 20px;
        gap: 10px;
    }

    .navbar-container.active .text-menu {
        flex-direction: row;
        align-items: center;
        width: auto;
        gap: 10px;
    }

    .navbar-container.active .font-size-selector-container {
        flex-shrink: 0;
    }

    .navbar-container.active .separator-blue {
        display: none;
    }


    /* 調整字體大小選擇器的樣式 */
    .navbar-container.active .font-size-selector-container {
        margin-top: 10px;
    }

    /* 調整 main-search-container 的樣式 */
    .navbar-container.active .main-search-container {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    /* 調整 popular-searches 的樣式 */
    .navbar-container.active .popular-searches {
        display: flex;
    }

    /* 調整 search-box 的樣式 */
    .navbar-container.active .search-box {
        width: 100%;
    }

    /* 調整進階搜尋按鈕的樣式 */
    .navbar-container.active .advanced-search-button {
        width: 100%;
        margin-top: 10px;
    }

    .navbar-container.active .sticky-logo-wrapper {
        display: none !important;
    }

    .navbar-container.sticky {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: 100%;
        background-color: transparent;
        box-shadow: none;
        border-radius: 0;
        gap: 0;
    }

    .nav-list {
        flex-direction: column;
        background-color: transparent;
        box-shadow: none;
        max-width: none;
        width: 100%;
        padding: 0;
        border-radius: 0;
    }

    .nav-item {
        width: 100%;
        text-align: center;
        padding: 10px 0;
        border-bottom: 1px solid #eee;
    }

    .nav-item a {
        font-size: 20px;
        justify-content: center;
    }

    .nav-item p {
        font-size: 20px;
        justify-content: center;
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .dropdown-menu {
        transform: none;
    }

    .nav-item.active .dropdown-menu {
        position: static;
        top: auto;
        left: auto;
        background-color: transparent;
        box-shadow: none;
        border-radius: 0;
    }

    .dropdown-menu a {
        padding: 5px 0;
    }

    /* footer */
    .footer-grid-container {
        justify-content: flex-start;
        gap: 20px;
    }

    .footer-column {
        flex: 1 1 calc(50% - 20px);
    }

    .footer-fat-copyright-info {
        align-items: flex-start;
        margin-top: 20px;
        text-align: left;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .info-column {
        flex: 1 1 100%;
    }

    .safety-ad-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
align-items: center;
}

}


@media (max-width: 960px) {

    /* 最新消息 */
    .news-section-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }
}

/* 媒體查詢：手機板樣式 */
@media (max-width: 768px) {
    .logo {
        max-width: 200px;
    }

    .model-ltd-box {
    display: flex;
    flex-direction: column;
    }

    /* banner */
    .main-banner-wrapper {
        margin: 0;
    }

    .banner-carousel-container {
        height: 400px;
        margin-top: 20px;
        border-radius: 0;
    }

    .carousel-control-prev,
    .carousel-control-next {
        display: none;
    }

    .carousel-control-prev i,
    .carousel-control-next i {
        font-size: 1.5rem;
    }

    .text-overlay {
        left: 20px;
        bottom: 20px;
    }

    .text-overlay h1 {
        font-size: 1.5rem;
    }

    .info-card-container {
        width: 90%;
        bottom: 0;
    }

    .info-card {
        padding: 0 15px;
        font-size: 0.8rem;
        right: 0;
        width: 100%;
        display: none;
    }
    .safety-ad-container {
        width: auto;
    }
    /* 供氣安全宣導 */
    .safety-ad-container {
        height: 50px;
    }

    .safety-text {
        font-size: 1rem;
        margin: 0 10px;
    }

    .view-more-btn {
        font-size: 1rem;
    }

    /* 新聞專區 */
    .news-column {
        flex: none;
        width: 100%;
        max-width: 600px;
        padding: 0 20px;
    }

    /* 影音專區 */
    .video-content {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .video-container {
        width: 100%;
        height: 200px;
    }

    .video-info-card {
        display: none;
    }

    .footer-fat-toggle-btn {
        display: none;
    }

    .footer-grid-container {
        display: none;
    }

    /* 卡片專區 */
    .announcement-cards-container {
        flex-direction: column;
        align-items: center;
    }

    .announcement-card {
        width: 100%;
        /* 讓卡片佔據完整寬度 */
        max-width: 400px;
        /* 繼續限制最大寬度 */
    }


    /* 天然氣公告 */
    .video-content {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .video-container {
        width: 100%;
        height: 200px;
    }

    .video-info-card {
        display: none;
    }

    .footer-fat-toggle-btn {
        display: none;
    }

    .footer-grid-container {
        display: none;
    }

    .gas-bill-title {
        font-size: 1.8rem;
    }

    .gas-bill-rate,
    .gas-bill-date {
        font-size: 1.2rem;
    }

    .gas-bill-note {
        font-size: 1rem;
    }

    /* 友善連結 */
    .friendly-links {
        padding: 10px;
    }

    .scroll-wrapper {
        flex-wrap: wrap;
        /* 小螢幕時換行，按鈕會在上方或下方 */
        gap: 0;
    }

    .scroll-button {
        display: none;
    }

    /* 彈跳視窗 */
    .modal-list-no-bullets {
        padding-left: 0;
    }

    /* footer */
    .footer-sns {
        display: flex;
        flex-direction: column;
    }
}


@media (max-width: 480px) {

    /* 圓形圖示區塊 */
    .icon-grid-wrapper {
        gap: 20px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .icon-item {
        width: 120px;
        height: 120px;
    }

    .gas-bill-content {
        gap: 10px;
    }

    .footer-column {
        flex: 1 1 100%;
    }

    .search-input {
        width: 10px;
    }

}

/* --- 活動彈窗專用樣式 --- */

/* 覆蓋原本 modal-content 的背景圖與邊框，讓 DM 乾淨呈現 */
.modal-content.modal-activity {
    background-image: none !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* 移除活動彈窗 Header 的邊框與內距 */
.modal-header.no-border {
    border: none;
    padding: 10px 0;
    justify-content: flex-end;
    /* 讓關閉按鈕靠右 */
}

/* 讓活動彈窗的關閉按鈕變成白色（因為通常 DM 背景較深） */
.close.white-close {
    color: #fff;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
    opacity: 1;
}

/* 活動圖片容器 */
.modal-body.activity-center {
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;

}

/* 活動圖片本體樣式 */
.activity-img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    /* 圓角與 DM 風格一致 */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    /* 增加立體感 */
}

/* 手機版調整：確保圖片不會太大 */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 1rem;
        max-width: 90vw;
    }
}
#activityModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}


