﻿/* --- 全局設定 --- */
:root {
    --primary-color: #0056b3; /* 科技藍 */
    --secondary-color: #333;
    --light-gray: #f4f4f4;
    --text-color: #333;
    --header-height: 70px; /* 固定橫幅高度 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft JhengHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body {
    line-height: 1.6;
    color: var(--text-color);
    padding-top: var(--header-height); /* 避免內容被固定橫幅遮擋 */
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- 1. 固定橫幅 Header --- */
header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo img {
    height: 50px; /* 限制 Logo 高度，保持美觀 */
}

/* 導航選單 */
.navbar {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links li a {
    font-weight: bold;
    color: var(--secondary-color);
    transition: 0.3s;
}

.nav-links li a:hover {
    color: var(--primary-color);
}

/* 2. Google 翻譯按鈕優化 */
.lang-switch {
    margin-left: 20px;
    border-left: 1px solid #ddd;
    padding-left: 20px;
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('web_images/000.png'); /* 暫時用網路圖，您可以換成自己的工廠大圖 */
    background-size: cover;
    background-position: center;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.hero h1 { font-size: 3rem; margin-bottom: 20px; }
.hero p { font-size: 1.2rem; margin-bottom: 30px; }

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 10px 30px;
    border-radius: 5px;
    transition: 0.3s;
}
.btn:hover { background: #004494; }

/* --- 通用區塊 --- */
.section { padding: 60px 0; }
.bg-light { background: var(--light-gray); }
.bg-dark { background: #222; color: #fff; }
.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--primary-color);
}
.text-center { text-align: center; }

/* --- 網格佈局 --- */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.card {
    background: #fff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.card-text { padding: 20px; }
.card-text h3 { margin-bottom: 10px; color: var(--primary-color); }

/* --- 客戶展示 --- */
.client-showcase img {
    margin: 0 auto;
    max-width: 100%;
    border-radius: 5px;
}

/* --- Contact & Footer --- */
.contact-container { text-align: center; }
footer {
    background: #111;
    color: #aaa;
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
}

/* --- 手機版 RWD 設定 --- */
.hamburger { display: none; font-size: 1.5rem; cursor: pointer; }

@media (max-width: 768px) {
    .hamburger { display: block; }
    
    .navbar {
        position: absolute;
        top: var(--header-height);
        right: -100%; /* 預設隱藏在右側 */
        width: 250px;
        height: calc(100vh - var(--header-height));
        background: #fff;
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        transition: 0.3s;
        box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    }

    .navbar.active { right: 0; } /* 顯示選單 */

    .nav-links {
        flex-direction: column;
        width: 100%;
    }
    
    .lang-switch {
        margin: 20px 0 0 0;
        padding: 20px 0 0 0;
        border-left: none;
        border-top: 1px solid #ddd;
        width: 100%;
    }

    .grid-2 { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2rem; }
}