/* 全域設定 */
body, html {
    margin: 0;
    padding-top: 0;
    font-family: Arial, sans-serif;
    text-align: center;
    scroll-behavior: smooth;
}

/* 讓頁面在視窗縮放時仍置中 */
body {
    display: flex;
    justify-content: center;
}

/* 固定主內容寬度 */
.main-container {
    width: 1100px;
    margin: 0 auto; /* 讓內容置中 */
    position: relative;
}

/* 手機版主內容寬度 */
.main-container-m {
    width: 100%;
    margin: 0 auto; /* 讓內容置中 */
    position: relative;
}

/* 固定背景層 */
.background-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/bgd.png') repeat;
    z-index: -1;
}

/* 最上方企業 Logo */
.header {
    width: 100%;
    padding: 10px 0;
    background: rgba(255, 255, 255, 0.8);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
}

/* 懸浮版頭主體 */
.fixed-header {
    position: fixed;    /* 啟用固定定位 */
    top: 0;          /* 距離頂部高度，可設為 0 */
    left: 0;            /* 配合 right:0 與 margin:auto 達成置中 */
    right: 0;           
    width: 1100px;      /* 設定固定寬度 (可依需求調整，如 960px) */
    max-width: 95%;     /* RWD 響應式安全範圍，避免手機版爆版 */
    height: 85px;       /* 版頭高度 */
    margin: 0 auto;     /* 關鍵：讓固定定位的區塊水平置中 */
    background-color: #ffffff;
    z-index: 1000;      /* 確保版頭顯示在最上層 */
            
/* 內部置中對齊（可選） */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-sizing: border-box;
        }


/* 版頭大圖 */
.hero {
    margin-top: 0; /* 避免與 Logo 重疊 */
    width: 100%;
}

.hero img {
    width: 100%;
    height: auto;
}

/* 導覽按鈕 */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(51, 51, 51, 0.9);
    padding: 10px 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    z-index: 999;
}

.navbar a {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
}

.navbar a:hover {
    background: #555;
    border-radius: 5px;
}

/* 右側懸浮按鈕 */
.floating-button {
    position: fixed;
    right: calc((100vw - 1100px) / 2 - 100px); /* 自動計算，貼齊主內容區右側 */
    top: 85%;
    transform: translateY(-50%);
    padding: 0px 0px;
    white-space: nowrap;
    opacity: 0; /* 預設隱藏 */
    transition: opacity 0.3s ease-in-out; /* 淡出淡入效果 */
}

/* 讓懸浮按鈕在視窗變小時不會超出畫面 */
@media (max-width: 1180px) {
    .floating-button {
        right: 10px; /* 當視窗小於主內容寬度時，固定貼住螢幕右側 */
    }
}

/* 顯示懸浮按鈕的 class */
.floating-button.show {
    opacity: 1;
}

.floating-button a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.floating-button a {
    font-size:18px;
    color: #ffffff;
    text-decoration: none;
    font-weight: normal;
    letter-spacing: 0.1em
}

.floating-button a:hover {
    text-decoration: underline;
    font-weight: bold;
}

/* 內容區塊 */
.content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 10%;
    gap: 20px;
}

.content img {
    width: 40%;
    max-width: 400px;
    height: auto;
}

.text {
    max-width: 400px;
    text-align: left;
}

/* RWD 設計 */
@media (max-width: 768px) {
    .content {
        flex-direction: column;
        text-align: center;
    }

    .content img {
        width: 100%;
    }

    .text {
        max-width: 100%;
        text-align: center;
    }

    /* 右側懸浮按鈕適配手機 */
    .floating-button {
        bottom: 20px;
        right: 20px;
        top: auto;
        transform: none;
    }
}

.qa-table {
    width: 1007px;
    border-collapse: collapse;
    font-size: 18px;
}

.qa-table td {
    padding: 8px;
    border-bottom: 2px dotted #ddd;
}

/* 隔行換色 */
.qa-table tr:nth-child(odd) {
    background-color: #fcf7e1;
    color:#551313;
    font-weight:400;
}
.qa-table tr:nth-child(even) {
    background-color: #f7f7f7;
    color:#333333;
    text-align: justify;
}
