/* 基本重設和全域設定 */
body {
    margin: 0;
    font-family: 'Noto Sans TC', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f7f6;
    font-size: 16px; /* 設定基礎字體大小，方便 rem 計算 */
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 0; /* 稍微調整上下 padding */
}

h1, h2, h3 {
    color: #003366;
    font-weight: 700; /* 讓標題更突出 */
}

h1 {
    font-size: 2.5rem; /* 使用 rem 單位 */
    margin-bottom: 0.5em;
}

h2 {
    font-size: 2rem; /* 使用 rem 單位 */
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 10px;
    border-bottom: 2px solid #b0c4de;
}

h3 {
    font-size: 1.5rem; /* 使用 rem 單位 */
}

p {
    font-size: 1rem; /* 使用 rem 單位 */
    margin-bottom: 1em;
    line-height: 1.7; /* 增加段落行高，提升可讀性 */
}

a {
    text-decoration: none;
    color: #0056b3;
}

img {
    max-width: 100%;
    height: auto;
    display: block; /* 避免圖片底部多餘空間 */
}

/* 色彩定義 (方便管理) */
:root {
    --primary-blue: #004a99;
    --secondary-blue: #007bff;
    --light-blue-bg: #e7f0f7;
    --dark-blue-text: #003366;
    --white-color: #fff;
    --off-white-bg: #f8f9fa;
    --dark-bg-footer: #002244;
    --text-on-dark: #e0e0e0;
    --nav-height: 70px; /* 定義導航欄高度 */
}

/* 背景顏色工具類 */
.primary-bg {
    background-color: var(--primary-blue);
    color: var(--white-color);
}
.secondary-bg {
    background-color: var(--secondary-blue);
    color: var(--white-color);
}
.white-bg {
    background-color: var(--white-color);
    color: var(--primary-blue);
    border: 1px solid var(--primary-blue);
}
.off-white-bg {
    background-color: var(--off-white-bg);
}
.dark-bg {
    background-color: var(--dark-bg-footer);
    color: var(--text-on-dark);
}

/* 導航欄 */
.navbar {
    background-color: var(--white-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0; /* 移除 navbar 的 padding，由 container 控制 */
    height: var(--nav-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex; /* 讓 container 垂直居中 */
    align-items: center; /* 讓 container 垂直居中 */
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px; /* 在 container 內部增加左右 padding */
    width: 100%; /* 讓 container 佔滿 navbar */
}

.navbar .logo {
    font-size: 1.5rem; /* 調整 logo 大小 */
    font-weight: bold;
    color: var(--primary-blue);
    white-space: nowrap; /* 防止 logo 文字換行 */
}

.nav-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center; /* 垂直居中列表項 */
}

.nav-links ul li {
    margin-left: 25px;
}

.nav-links ul li a {
    color: var(--dark-blue-text);
    font-weight: bold;
    font-size: 1rem; /* 調整導航連結字體大小 */
    transition: color 0.3s ease;
    padding: 5px 0; /* 增加點擊區域 */
}

.nav-links ul li a:hover,
.nav-links ul li a.active {
    color: var(--secondary-blue);
}

/* 漢堡選單按鈕 (預設隱藏) */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px; /* 增加點擊區域 */
}

.hamburger {
    display: block;
    position: relative;
    width: 25px;
    height: 3px;
    background-color: var(--dark-blue-text);
    border-radius: 3px;
    transition: transform 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--dark-blue-text);
    border-radius: 3px;
    transition: transform 0.3s ease-in-out, top 0.3s ease-in-out, bottom 0.3s ease-in-out;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

/* 漢堡選單打開時的樣式 (X) */
.nav-open .hamburger {
    background-color: transparent; /* 中間橫線隱藏 */
}
.nav-open .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}
.nav-open .hamburger::after {
    transform: rotate(-45deg);
    bottom: 0;
}


/* 按鈕樣式 */
.cta-button {
    padding: 10px 20px; /* 稍微調整 padding */
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    font-size: 0.9rem;
}

.cta-button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* 主要視覺區 (Hero Section) */
.hero-section {
    background-image: linear-gradient(rgba(0, 74, 153, 0.7), rgba(0, 34, 68, 0.85)), url('images/your-hero-background.jpg');
    background-size: cover;
    background-position: center;
    color: var(--white-color);
    padding: 80px 0; /* 調整上下 padding */
    text-align: center;
    min-height: calc(100vh - var(--nav-height)); /* 考慮導航欄高度 */
    display: flex;
    flex-direction: column; /* 確保內容垂直排列 */
    align-items: center;
    justify-content: center;
}
.hero-section .container {
    padding: 0 15px; /* 給 hero 內的 container 也加上 padding */
}

.hero-section h1 {
    color: var(--white-color);
    font-size: 2.8rem;
}

.hero-section p {
    font-size: 1.2rem; /* 調整 hero 區 p 字體大小 */
    margin-bottom: 30px;
    max-width: 700px; /* 稍微放寬 p 的最大寬度 */
    margin-left: auto;
    margin-right: auto;
}


/* 內容區塊 */
.content-section {
    padding: 50px 0; /* 調整上下 padding */
}
.content-section .container {
     padding: 0 15px; /* 給內容區塊的 container 也加上 padding */
}
.content-section.off-white-bg {
    background-color: var(--light-blue-bg);
}


/* 服務特色區塊 */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* RWD，稍微調整 minmax */
    gap: 25px; /* 調整間距 */
    margin-top: 30px; /* 調整上方間距 */
}

.service-item {
    background-color: var(--white-color);
    padding: 25px; /* 調整 padding */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,74,153,0.15);
}

.service-icon {
    width: 50px; /* 調整圖標大小 */
    height: 50px;
    margin-bottom: 15px; /* 調整下方間距 */
}

.service-item h3 {
    font-size: 1.3rem; /* 調整標題大小 */
    margin-bottom: 8px;
    color: var(--primary-blue);
}

/* 行動呼籲區 */
.cta-section {
    padding: 50px 0; /* 調整上下 padding */
}
.cta-section .container {
     padding: 0 15px; /* 給 CTA 區塊的 container 也加上 padding */
}
.cta-section h2 {
    color: var(--white-color);
    border-bottom: none;
}
.cta-section p {
    color: var(--white-color);
    font-size: 1.1rem; /* 調整字體大小 */
    margin-bottom: 25px; /* 調整下方間距 */
}
.text-center {
    text-align: center;
}


/* 頁脚 */
.footer {
    padding: 25px 0; /* 調整上下 padding */
    text-align: center;
}
.footer p {
    margin: 0;
    font-size: 0.9rem;
}
.footer .container {
     padding: 0 15px; /* 給頁腳的 container 也加上 padding */
}

/* 響應式設計 (RWD) */
@media (max-width: 768px) {
    body {
        font-size: 15px; /* 在小螢幕稍微縮小基礎字體 */
    }
    .container {
        /* padding: 0 15px; 移到各 section 的 container 內部 */
    }

    /* 導航欄 RWD */
    .nav-toggle {
        display: block; /* 顯示漢堡按鈕 */
        z-index: 1001; /* 確保在最上層 */
    }

    .nav-links {
        position: fixed; /* 或 absolute，看效果 */
        top: var(--nav-height); /* 從導航欄下方開始 */
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.98); /* 半透明背景 */
        backdrop-filter: blur(5px); /* 毛玻璃效果 (部分瀏覽器支持) */
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        transform: translateY(-150%); /* 預設隱藏在上方 */
        transition: transform 0.4s ease-in-out;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        z-index: 999; /* 低於漢堡按鈕，高於頁面內容 */
    }

    .nav-open .nav-links {
        transform: translateY(0); /* 顯示導航 */
    }

    .nav-links ul {
        flex-direction: column;
        width: 100%;
    }

    .nav-links ul li {
        margin: 0; /* 移除左右 margin */
        width: 100%;
        text-align: center;
    }

    .nav-links ul li a {
        display: block; /* 讓連結填滿整個 li */
        padding: 15px 0; /* 增加點擊區域 */
        font-size: 1.2rem;
        border-bottom: 1px solid #eee; /* 分隔線 */
    }
    .nav-links ul li:last-child a {
        border-bottom: none;
    }
    .nav-links ul li .cta-button { /* 調整導航中的按鈕樣式 */
        display: inline-block; /* 或 block，看設計 */
        margin-top: 15px;
        padding: 12px 25px;
        width: auto; /* 不要填滿寬度 */
    }
    .navbar .logo {
        font-size: 1.3rem; /* 小螢幕 logo 小一點 */
    }


    /* Hero Section RWD */
    .hero-section {
        padding: 60px 0;
        min-height: calc(90vh - var(--nav-height)); /* 調整最小高度 */
    }
    .hero-section h1 {
        font-size: 2.2rem; /* 調整字體大小 */
    }
    .hero-section p {
        font-size: 1.1rem;
    }
    .hero-section .cta-button {
        font-size: 1rem;
        padding: 12px 22px;
    }


    /* 標題 RWD */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.7rem; margin-bottom: 30px;}
    h3 { font-size: 1.3rem; }


    /* 內容區塊 RWD */
    .content-section {
        padding: 40px 0;
    }
    .services-grid {
        grid-template-columns: 1fr; /* 在小螢幕變成單欄 */
        gap: 20px;
    }
    .service-item {
        padding: 20px;
    }

    /* 關於我們頁面圖片 */
    #about img {
        max-width: 90%; /* 讓圖片不要太貼邊 */
        margin-left: auto;
        margin-right: auto;
    }

    /* CTA Section RWD */
    .cta-section h2 {
        font-size: 1.8rem;
    }
    .cta-section p {
        font-size: 1rem;
    }
}

/* 針對更小的螢幕，可以再增加一個斷點 */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    .hero-section h1 {
        font-size: 1.8rem;
    }
    .hero-section p {
        font-size: 1rem;
    }
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }

    .navbar .logo {
        font-size: 1.1rem; /* 極小螢幕 logo 更小 */
    }
    .nav-links ul li a {
        font-size: 1.1rem;
    }
    .cta-button, .navbar .cta-button { /* 統一按鈕大小 */
        font-size: 0.9rem;
        padding: 10px 18px;
    }
}

.plan-card .plan-features li {
    font-size: 1rem; /* 或你設定的其他字體大小 */
    color: #444;
    margin-bottom: 12px;
    display: flex;         /* 確保這一行存在 */
    align-items: center;   /* 確保這一行存在 (或者 flex-start, baseline) */
    /* 其他可能存在的樣式，例如 text-align: left; 如果之前有 text-align: center; 在 li 上 */
}

.plan-card .plan-features .check-icon {
    width: 18px;           /* 你設定的寬度 */
    height: 18px;          /* 你設定的高度 */
    margin-right: 10px;
    display: inline-block; /* 新增或修改這一行！ */ /* 或者 display: inline; 也可以試試 */
    vertical-align: middle; /* 可以嘗試添加這個，輔助垂直對齊 */
    flex-shrink: 0;        /* 保留這個，防止圖示被壓縮 */
    /* filter: ... ; (如果你的 PNG 顏色正確，可以考慮移除 filter) */
}