 :root {
            --primary-color: #0056b3;
            --secondary-color: #f8f9fa;
            --text-color: #333;
            --accent-color: #dc3545;
            --border-color: #dee2e6;
            --fb-color: #1877f2;
            --line-color: #06c755;
            --yt-color: #ff0000;
        }
        
        html {
            scroll-behavior: smooth;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            line-height: 1.6;
            color: var(--text-color);
            margin: 0;
            padding: 0;
            padding-top: 60px; /* 電腦版固定預留高度 */
            background-color: #ffdfb6;
        }
        
        /* 固定頂部導覽列 */
        .navbar {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            background-color: #ffffff;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
            z-index: 1000;
        }
        .nav-container {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 20px;
            position: relative;
        }
        .nav-logo {
            font-weight: bold;
            font-size: 1.2rem;
            color: var(--primary-color);
            text-decoration: none;
        }

        /* 漢堡選單按鈕（預設電腦版隱藏） */
        .nav-toggle {
            display: none;
            background: none;
            border: none;
            font-size: 1.5rem;
            color: var(--primary-color);
            cursor: pointer;
            padding: 5px;
        }

        /* 電腦版選單樣式 */
        .nav-menu {
            display: flex;
            list-style: none;
            margin: 0;
            padding: 0;
            align-items: center;
        }
        .nav-item {
            margin-left: 12px;
            position: relative;
        }
        .nav-link {
            text-decoration: none;
            color: #555;
            font-weight: 500;
            font-size: 0.95rem;
            padding: 8px 0;
            display: inline-block;
            transition: color 0.3s;
        }
        .nav-link:hover {
            color: var(--primary-color);
        }

        /* 電腦版下拉選單 (Dropdown) */
        .dropdown-menu {
            display: none;
            position: absolute;
            top: 100%;
            left: 0;
            background-color: #ffffff;
            min-width: 180px;
            box-shadow: 0 8px 16px rgba(0,0,0,0.15);
            list-style: none;
            padding: 8px 0;
            margin: 0;
            border-radius: 6px;
            border: 1px solid var(--border-color);
            z-index: 1100;
        }
        .dropdown-menu li {
            width: 100%;
        }
        .dropdown-menu a {
            color: #333;
            padding: 10px 16px;
            text-decoration: none;
            display: block;
            font-size: 0.9rem;
            font-weight: 500;
            white-space: nowrap;
            transition: background-color 0.2s, color 0.2s;
        }
        .dropdown-menu a:hover {
            background-color: #f1f3f5;
            color: var(--primary-color);
        }
        .dropdown:hover .dropdown-menu {
            display: block;
        }
        
        /* 社群 Icon 樣式 */
        .nav-social {
            font-size: 1.1rem;
            transition: transform 0.2s, color 0.2s;
        }
        .nav-social.fb:hover { color: var(--fb-color); transform: scale(1.1); }
        .nav-social.line:hover { color: var(--line-color); transform: scale(1.1); }
        .nav-social.yt:hover { color: var(--yt-color); transform: scale(1.1); }

        /* CTA 免費試聽按鈕 */
        .nav-cta {
            background-color: var(--accent-color);
            color: white !important;
            padding: 6px 10px !important;
            border-radius: 20px;
        }
        .nav-cta:hover {
            background-color: #bd2130;
        }

        /* ==========================================================================
           【解決跑版】手機與平板版 RWD 樣式（< 992px）
           ========================================================================== */
        @media (max-width: 992px) {
            body {
                padding-top: 55px; /* 修正手機版固定標頭的高度 */
            }

            /* 顯示漢堡選單按鈕 */
            .nav-toggle {
                display: block;
            }

            /* 手機版將選單轉為垂直下拉直排 */
            .nav-menu {
                display: none; /* 預留隱藏，點擊漢堡按鈕才展開 */
                flex-direction: column;
                width: 100%;
                position: absolute;
                top: 100%;
                left: 0;
                background-color: #ffffff;
                box-shadow: 0 4px 10px rgba(0,0,0,0.1);
                padding: 15px 0;
                border-top: 1px solid var(--border-color);
            }

            /* 當 JS 觸發 active 類別時展開選單 */
            .nav-menu.active {
                display: flex;
            }

            .nav-item {
                margin: 0;
                width: 100%;
                text-align: center;
            }

            .nav-link {
                padding: 10px 20px;
                width: 100%;
                box-sizing: border-box;
            }

            /* 手機版下拉選單處理 */
            .dropdown-menu {
                position: static;
                box-shadow: none;
                border: none;
                background-color: #f8f9fa;
                border-radius: 0;
            }

            .dropdown-menu a {
                padding: 8px 20px;
                text-align: center;
                color: #555;
            }

            .dropdown:hover .dropdown-menu {
                display: block; /* 手機版點擊或滑動皆可順暢展開 */
            }

            /* 手機版社群 Icon 橫向排列 */
            .nav-item.social-group {
                display: flex;
                justify-content: center;
                gap: 20px;
                margin: 10px 0;
            }

            .nav-cta {
                display: inline-block;
                width: 80%;
                margin: 5px auto;
            }
        }

        /* 頁面通用內容樣式 */
        .hero-banner { width: 100%; display: block; margin: 0; padding: 0; }
        .hero-banner img { width: 100%; height: auto; display: block; }
        .visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
        .container { max-width: 1200px; margin: 0 auto; padding: 20px; }
        .ai-summary-box { background-color: #e9f7fe; border-left: 5px solid var(--primary-color); padding: 20px; margin: 30px 0; border-radius: 4px; }
        .ai-summary-box h2 { margin-top: 0; color: var(--primary-color); font-size: 1.5rem; }
        .ai-summary-box ul { margin-bottom: 0; padding-left: 20px; }
        section, article { scroll-margin-top: 80px; }
        .section-title { text-align: center; margin: 40px 0 20px 0; color: var(--primary-color); }
        .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-bottom: 30px; }
        .card { background: var(--secondary-color); border: 1px solid var(--border-color); border-radius: 8px; padding: 20px; }
        .card h3 { margin-top: 0; color: var(--primary-color); }
        .table-responsive { overflow-x: auto; margin-bottom: 30px; }
        table { width: 100%; border-collapse: collapse; margin: 10px 0; }
        th, td { border: 1px solid var(--border-color); padding: 12px; text-align: left; }
        td ul { margin:0px 5px 0px -1.5em; }
        th { background-color: #f1f3f5; font-weight: bold; }
        tr:nth-child(even) { background-color: #fafbfc; }
        .testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 25px; margin-bottom: 40px; }
        .testimonial-card { background: #fff; border: 1px solid var(--border-color); border-radius: 8px; padding: 25px; box-shadow: 0 4px 10px rgba(0,0,0,0.03); }
        .testimonial-stars { color: #ffc107; font-size: 1.2rem; margin-bottom: 10px; }
        .testimonial-meta { font-size: 0.9rem; color: #666; margin-bottom: 15px; border-bottom: 1px dashed var(--border-color); padding-bottom: 10px; }
        .testimonial-meta strong { color: var(--primary-color); font-size: 1rem; }
        .testimonial-content { font-size: 0.95rem; color: #444; text-align: justify; }
        details { background: var(--secondary-color); border: 1px solid var(--border-color); border-radius: 4px; padding: 15px; margin-bottom: 10px; }
        summary { font-weight: bold; cursor: pointer; font-size: 1.1rem; }
        details[open] summary { margin-bottom: 10px; color: var(--primary-color); }
        .cta-container { text-align: center; margin: 20px 0; }
        .btn { display: inline-block; background-color: var(--accent-color); color: white; padding:5px 15px;margin: 2px; text-decoration: none; font-size: 1rem; font-weight: bold; border-radius: 50px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); transition: background-color 0.3s; }
        .btn:hover { background-color: #bd2130; }
        .footer-social-box { margin: 20px 0; }
        .footer-social-btn { display: inline-flex; align-items: center; justify-content: center; width: 45px; height: 45px; border-radius: 50%; background-color: #495057; color: white; text-decoration: none; margin: 0 8px; font-size: 1.2rem; }
        .footer-social-btn.fb:hover { background-color: var(--fb-color); }
        .footer-social-btn.line:hover { background-color: var(--line-color); }
        .footer-social-btn.yt:hover { background-color: var(--yt-color); }
        footer { background-color: #343a40; color: white; text-align: center; padding: 40px 20px; margin-top: 50px; font-size: 0.9rem; }
   
   /* Form */

/* 1. 表單外層容器 */
#consult-form, 
section:has(h3:contains("想了解首宇課程")) {
    max-width: 650px;
    margin: 40px auto;
    padding: 35px 25px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid #eef2f5;
    box-sizing: border-box;
}

/* 標題與說明文字 */
#consult-form h3, 
section h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 8px;
    text-align: center;
    font-weight: 600;
}

#consult-form p, 
section p {
    font-size: 0.95rem;
    color: #7f8c8d;
    margin-bottom: 25px;
}

/* 2. 表單標籤與輸入欄位組合 */
.form-group {
    margin-bottom:20px;
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 0.95rem;
    color: #34495e;
    margin-bottom: 8px;
    font-weight: 500;
    text-align: left;
}

/* 3. 欄位輸入框通用樣式 (文字框、Email、電話、下拉選單、文字域) */
.form-control,
#consult-form input[type="text"],
#consult-form input[type="tel"],
#consult-form input[type="email"],
#consult-form select,
#consult-form textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    color: #2c3e50;
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    outline: none;
}

/* 欄位 Focus 聚焦狀態效果 */
.form-control:focus,
#consult-form input:focus,
#consult-form select:focus,
#consult-form textarea:focus {
    border-color: #3498db;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.15);
}

/* 下拉選單微調 */
#consult-form select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237f8c8d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 40px;
}

/* 4. 核取方塊與單選鈕 (Checkbox / Radio) */
.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    cursor: pointer;
}

#consult-form input[type="checkbox"],
#consult-form input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3498db; /* 現代瀏覽器主體顏色定義 */
}

/* 5. 提交按鈕優化 */
.btn-submit,
#consult-form button,
#consult-form input[type="submit"] {
    width: 100%;
    padding: 14px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    margin-top: 0px;
}

/* 按鈕 Hover 與點擊效果 */
.btn-submit:hover,
#consult-form button:hover,
#consult-form input[type="submit"]:hover {
    background: linear-gradient(135deg, #2980b9, #2471a3);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4);
    transform: translateY(-1px);
}

.btn-submit:active,
#consult-form button:active,
#consult-form input[type="submit"]:active {
    transform: translateY(1px);
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
}
/* Form end */

/* 6. RWD 響應式微調 (手機板尺寸) */
@media (max-width: 576px) {
    #consult-form, 
    section:has(h3:contains("想了解首宇課程")) {
        margin: 20px 15px;
        padding: 25px 15px;
    }
    
    #consult-form h3, section h3 {
        font-size: 1.3rem;
    }
}
   