:root {
    --primary: #2980b9;
    --dark: #2c3e50;
    --light: #f4f7f6;
}

html {
    scroll-behavior: smooth;
    /* 絲滑捲動關鍵 */
}

section div h1 {
    color: #ffffff;
}

#hero-p {
    color: #ffffff;
}

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    color: var(--dark);
    line-height: 1.6;
}

/************************************************
 navbar
************************************************/

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    /* 將 100vw 改為 100%，它會排除捲軸寬度，讓計算更精準 */
    width: 100%;
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);

    /* 確保沒有 padding 擠壓內部空間 */
    padding: 0;
    box-sizing: border-box;
}

.logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    height: 60px;
    width: auto;
    /* 強制消除所有潛在的邊距 */
    margin: 0 !important;
}

/* 清除清單預設的小圓點 */
.nav-links {
    list-style: none;
    /* 關鍵：移除點點 */
    margin: 0;
    padding: 0;
    display: flex;
    /* 讓選單項目水平排一排 */
    gap: 20px;
    /* 設定文字之間的間距 */
    position: absolute;
    /* 絕對定位在右邊 */
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    /* 垂直置中 */
}

/* 讓連結文字變好看一點 */
.nav-links li a {
    text-decoration: none;
    /* 移除底線 */
    color: var(--dark);
    /* 使用你定義的深色變數 */
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links li a:hover {
    color: var(--primary);
    /* 滑鼠移過變藍色 */
}

/************************************************
 banner
************************************************/

.section {
    min-height: 70vh;
    padding: 100px 10%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#hero {
    /* 這裡疊加一層 50% 透明度的黑色漸層 */
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
        url("https://images.pexels.com/photos/34577/pexels-photo.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    /* 確保圖片置中 */
    text-align: center;
    color: white;
    /* 這裡設定的話，裡面的文字預設就會是白色 */

}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    transition: 0.3s;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(41, 128, 185, 0.4);
}

/************************************************
 price
************************************************/

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.card {
    padding: 40px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
}

/* 調整標題區塊 */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-subtitle {
    max-width: 700px;
    margin: 10px auto;
    color: var(--dark);
    opacity: 0.8;
}

/* 強化定價卡片樣式 */
/* 定價卡片：預設只有影子，邊框隱藏 */
.pricing-card {
    display: flex;
    flex-direction: column;
    padding: 30px !important;
    text-align: left !important;
    background: #fff;
    border-radius: 15px;

    /* 1. 設定透明邊框 (佔位用，這樣滑鼠移入時才不會因為邊框出現而造成卡片跳動) */
    border: 2px solid transparent;

    /* 2. 預設的優雅陰影 */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);

    transition: all 0.3s ease;
    cursor: pointer;
}

/* 懸停效果：出現藍色外框、加深陰影、向上漂浮 */
.pricing-card:hover {
    transform: translateY(-10px);

    /* 3. 觸發藍色外框 */
    border-color: var(--primary);

    /* 4. 加深陰影，並讓陰影帶一點點藍色的調性 */
    box-shadow: 0 15px 35px rgba(41, 128, 185, 0.15) !important;
}

/* 內部的按鈕也微調一下，讓它在卡片被選中時更有吸引力 */
.pricing-card .btn {
    margin-top: auto;
    /* 讓按鈕永遠在卡片底部對齊 */
    width: 100%;
    text-align: center;
}

/* 突顯中間方案 (Featured) */
.pricing-card.featured {
    border: 2px solid var(--primary);
    transform: scale(1.05);
}

.pricing-card .tag {
    background: var(--primary);
    color: white;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.pricing-card h3 {
    margin: 15px 0 5px;
    font-size: 1.5rem;
}

.pricing-card .price {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
}

.pricing-card .price span {
    font-size: 1rem;
    margin-left: 5px;
}

.pricing-card .maintenance {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.pricing-card .target {
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--dark);
}

.pricing-card .desc {
    font-size: 0.85rem;
    margin: 10px 0;
    min-height: 60px;
}

.pricing-card .features {
    list-style: none;
    padding: 0;
    margin-top: 15px;
}

.pricing-card .features li {
    font-size: 0.9rem;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

/* 打勾小圖示 */
.pricing-card .features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    /* 這裡你可以再加上之前做的漢堡選單 */
}

/************************************************
contact
************************************************/

/* 容器佈局 */
#contact {
    background-color: #f8f9fa;
    /* 極淺灰，增加層次感 */
    border-top: 1px solid #eee;
    /* 上方加一條極細的線，增加精緻感 */
}

.contact-header {
    text-align: center;
    margin-bottom: 40px;
}

/* 聯絡容器卡片 */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    background: #ffffff;
    /* 純白卡片 */
    padding: 50px;
    border-radius: 24px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    /* 柔和懸浮陰影 */
    max-width: 1100px;
    margin: 0 auto;
}

/* 左側資訊欄 */
.contact-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 35px;
    padding-right: 20px;
    border-right: 1px solid #f0f0f0;
}

.info-item h3 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.info-item p {
    margin: 5px 0;
    color: #666;
}

/* 右側表單佈局 */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 輸入框與文字域通用樣式 */
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 18px;
    /* 增加內距提升質感 */
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    background: #fdfdfd;
    /* 極淡底色 */
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    /* 確保 padding 不撐破寬度 */
}

.contact-form textarea {
    height: 150px;
    resize: none;
    /* 禁止手動調整大小保持版面整潔 */
}

/* 聚焦動畫效果 */
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 12px rgba(41, 128, 185, 0.1);
}

/* 送出按鈕樣式 */
.submit-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #1a5a8a;
}

/* 響應式設計 (RWD) */

@media (max-width: 768px) {

    /* 1. 強制將兩欄改為單欄 */
    .contact-container {
        display: block !important;
        /* 或者使用 grid-template-columns: 1fr !important; */
        width: 100%;
        padding: 30px 20px !important;
        box-sizing: border-box;
    }

    /* 2. 讓左側資訊區變成滿版，並增加下方間距 */
    .contact-info {
        width: 100%;
        padding-right: 0;
        border-right: none;
        /* 移除電腦版的右側邊框 */
        border-bottom: 1px solid #eee;
        /* 改成底部線條 */
        margin-bottom: 30px;
        padding-bottom: 20px;
        text-align: center;
        /* 讓資訊置中比較好看 */
    }

    /* 3. 確保右側表單也是滿版 */
    .contact-form {
        width: 100%;
    }

    /* 4. 再次確認 section 的間距不會擠壓到容器 */
    .section {
        padding: 50px 15px !important;
    }
}

/************************************************
menu 漢堡選單
************************************************/

/* 漢堡按鈕基本樣式 - 電腦版先隱藏 */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1100;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--dark);
    margin: 4px 0;
    transition: 0.4s;
}

/* 手機版樣式修正 */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        /* 手機版顯示漢堡 */
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 100px;
        /* 維持在導覽列下方 */
        right: -100%;
        width: 100%;

        /* --- 修改這裡 --- */
        height: auto;
        /* 讓高度根據內容自動調整 */
        padding: 40px 0;
        /* 給選單上下留點呼吸空間 */
        /* ---------------- */

        background: rgba(255, 255, 255, 0.98);
        transition: 0.5s;
        gap: 30px;
        /* 選單項目之間的距離 */
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        /* 加深陰影讓它看起來像漂浮的面板 */
        border-bottom: 1px solid #eee;
        /* 底部加一條細線更有質感 */
    }

    /* 當選單被啟動時，移入螢幕 */
    .nav-links.active {
        right: 0;
    }

    /* 漢堡按鈕變成 X 的動畫 */
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(11px) rotate(45deg);
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-11px) rotate(-45deg);
    }
}