/* =========================================
   辰彥室內裝修 - Main Stylesheet
   ========================================= */

/* =========================================
   1. CSS 變數定義
   ========================================= */
:root {
    /* 色彩系統 */
    --primary: #1B3A57;
    --accent: #E8EBEF;
    --text-dark: #222222;
    --line-green: #06C755;
    --text-light: #666666;
    --footer-bg: #f9f9f9;
    --text-gray: #666666;
    --white: #FFFFFF;
    --background: #FAFAFA;
    
    /* 圓角系統 */
    --radius-xl: 40px; 
    --radius-lg: 24px;
    --radius-btn: 100px;
    
    /* 字體系統 */
    --font-title: 'Playfair Display', serif;
    --font-body: 'Noto Sans TC', sans-serif;
}

/* =========================================
   2. 基礎重置與全域樣式
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 18px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--background);
    line-height: 1.8;
    overflow-x: hidden;
    width: 100%;
}

/* =========================================
   3. 字體階層
   ========================================= */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary);
    margin: 0 0 20px 0;
    line-height: 1.4;
    font-weight: 700;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.3rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    color: var(--text-gray);
    margin-bottom: 20px;
    font-size: 1.05rem;
    line-height: 1.8;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 英文裝飾字體 */
.en-font {
    font-family: var(--font-title);
}

/* =========================================
   4. 容器系統
   ========================================= */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: 100px 0;
}

/* =========================================
   5. Header 導航列 (V3 最終版)
   ========================================= */

/* --- Header 本體 (初始透明狀態) --- */
.site-header {
    position: absolute; /* 懸浮在 Banner 上 */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    /* 漸層背景讓文字更清晰，且無底線 */
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
    border-bottom: none; 
    transition: all 0.4s ease;
}

/* 內容排版容器 */
.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px; /* 固定高度防止塌陷 */
}

/* --- Logo 設定 --- */
.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white); /* 初始為白色 */
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    text-decoration: none;
    transition: color 0.3s;
}

/* --- 導航選單 --- */
.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    font-weight: 500;
    font-size: 1rem;
    color: rgba(255,255,255,0.95); /* 初始為淺白色 */
    text-decoration: none;
    position: relative;
    padding: 5px 0;
    transition: 0.3s;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3); /* 增加陰影，怕 Banner 太亮 */
}

.nav-links a:hover {
    color: var(--white);
    opacity: 1;
    text-shadow: 0 0 10px rgba(255,255,255,0.8);
}

/* --- 右側動作區 (LINE + 漢堡) --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* LINE 按鈕樣式 */
.btn-line-header {
    background-color: var(--line-green); /* 定義在 :root 的綠色 */
    color: white !important;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(6, 199, 85, 0.3);
    text-decoration: none;
    transition: transform 0.3s, background-color 0.3s;
    border: none;
}

.btn-line-header:hover {
    transform: translateY(-2px);
    background-color: #05b54b; /* hover 變深一點 */
}

/* 手機漢堡選單按鈕 */
.mobile-menu-toggle {
    display: none; /* 電腦版隱藏 */
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--white); /* 初始白色 */
    cursor: pointer;
    padding: 5px;
}

/* =========================================
   捲動後的狀態 (.scrolled)
   當 JS 偵測到往下捲動時加入此 class
   ========================================= */
.site-header.scrolled {
    position: fixed; /* 變為固定 */
    background: rgba(255, 255, 255, 0.98); /* 變為白底 */
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    padding: 10px 0; /* 高度縮小 */
}

/* 捲動後：Logo 變深藍色 */
.site-header.scrolled .site-logo {
    color: var(--primary);
}

/* 捲動後：選單文字變深藍色 */
.site-header.scrolled .nav-links a {
    color: var(--primary);
    text-shadow: none;
}

/* 捲動後：漢堡按鈕變深藍色 */
.site-header.scrolled .mobile-menu-toggle {
    color: var(--primary);
}

/* =========================================
   RWD 手機版調整
   ========================================= */
@media (max-width: 1024px) {
    /* 隱藏電腦版選單 */
    .main-nav {
        display: none; 
    }
    
    /* 顯示漢堡選單 */
    .mobile-menu-toggle {
        display: block;
    }

    /* 手機版 Header 左右留白縮小 */
    .header-flex {
        padding: 0 10px; 
    }

    /* LINE 按鈕變形：手機版隱藏文字，變成圓形圖示 */
    .btn-line-header span {
        display: none;
    }
    .btn-line-header {
        padding: 0;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        justify-content: center;
    }
    .btn-line-header i {
        font-size: 1.2rem; /* 圖示放大一點 */
    }
}

/* =========================================
   6. 按鈕系統
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 40px;
    background-color: var(--primary);
    color: var(--white);
    border-radius: var(--radius-btn);
    font-weight: 500;
    font-size: 1.1rem;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(27, 58, 87, 0.25);
}

.btn i {
    margin-left: 10px;
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background-color: var(--primary);
    color: var(--white);
}

.btn-large {
    padding: 20px 50px;
    font-size: 1.2rem;
}

.btn-small {
    padding: 12px 30px;
    font-size: 1rem;
}

/* =========================================
   7. Hero Section
   ========================================= */
.hero {
    padding-top: 140px;
    padding-bottom: 80px;
    min-height: 85vh;
    display: flex;
    align-items: center;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 改成各佔一半 */
    gap: 60px;
    align-items: center;
}

.hero-text h1 {
    margin-bottom: 20px;
}

.hero-text p {
    margin-bottom: 40px;
    font-size: 1.1rem;
}

/* Hero 圖片 */
.hero-image-box {
    height: 650px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
    box-shadow: 0 30px 60px rgba(0,0,0,0.1);
}

.hero-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-badge {
    position: absolute;
    bottom: 30px;
    left: 30px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.hero-badge small {
    display: block;
    font-size: 0.85rem;
    color: #888;
    letter-spacing: 1px;
}

.hero-badge span {
    display: block;
    font-size: 1.2rem;
    color: var(--primary);
    font-weight: 700;
}

/* 數據展示 */
.stat-box {
    margin-top: 40px;
    display: flex;
    gap: 40px;
}

.stat-item h3 {
    margin-bottom: 0;
    font-family: var(--font-title);
    font-size: 2.2rem;
}

.stat-item span {
    color: #999;
    font-size: 0.95rem;
}

/* =========================================
   8. Services Section
   ========================================= */
.services-section {
    background-color: var(--white);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    margin-top: -60px;
    padding-top: 100px;
    padding-bottom: 100px;
    position: relative;
    z-index: 2;
}

.services-header {
    margin-bottom: 60px;
    max-width: 700px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* 服務卡片 */
.service-item {
    position: relative;
    padding: 40px 30px;
    background: #F9F9F9;
    border-radius: var(--radius-xl);
    transition: 0.4s;
    overflow: hidden;
}

.service-item:hover {
    background: var(--primary);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(27, 58, 87, 0.2);
}

.big-number {
    font-size: 6rem;
    position: absolute;
    top: -10px;
    right: 10px;
    opacity: 0.06;
    transition: 0.4s;
    font-family: var(--font-title);
    line-height: 1;
}

.service-item:hover .big-number {
    opacity: 0.15;
    color: var(--white);
}

.service-content {
    position: relative;
    z-index: 2;
}

.service-icon {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 20px;
    transition: 0.4s;
}

.service-item:hover .service-icon {
    color: var(--white);
}

.service-item h3 {
    margin-bottom: 5px;
    transition: 0.4s;
}

.en-sub {
    display: block;
    font-size: 0.9rem;
    color: #999;
    margin: 5px 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.4s;
}

.service-item p {
    margin-top: 15px;
    opacity: 0.8;
    transition: 0.4s;
}

.service-item:hover h3,
.service-item:hover .en-sub,
.service-item:hover p {
    color: var(--white);
}

/* =========================================
   9. Projects Section
   ========================================= */
.projects-section {
    background-color: var(--white);
    padding-bottom: 120px;
}

.projects-header-flex {
    margin-bottom: 50px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 20px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

/* 專案卡片 */
.project-card {
    height: 400px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.project-card.featured-main {
    grid-column: span 2;
    height: 550px;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-info {
    position: absolute;
    bottom: 25px;
    left: 25px;
    background: var(--white);
    padding: 20px 30px;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 85%;
    transition: 0.3s;
}

.project-card:hover .project-info {
    bottom: 35px;
}

.project-info h3 {
    margin-bottom: 5px;
    font-size: 1.3rem;
}

.project-info span {
    font-size: 0.9rem;
    color: #888;
}

/* =========================================
   10. Contact Section
   ========================================= */
.contact-section {
    background-color: var(--primary);
    color: var(--white);
    border-radius: var(--radius-xl);
    margin: 40px;
    padding: 80px 40px;
    text-align: center;
}

.contact-content h2 {
    color: var(--white);
    margin-bottom: 20px;
}

.contact-content p {
    color: rgba(255,255,255,0.8);
    max-width: 600px;
    margin: 0 auto 40px;
}

.contact-btn {
    background: var(--white);
    color: var(--primary);
    padding: 18px 50px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 1.1rem;
    display: inline-block;
    transition: 0.3s;
}

.contact-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(255,255,255,0.3);
}

.contact-info-row {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.contact-info-row span {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* =========================================
   12. RWD 響應式設計
   ========================================= */
@media (max-width: 1024px) {
    /* Header */
    .site-header {
        padding: 15px 20px;
    }
    
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Hero */
    .hero {
        padding-top: 100px;
    }
    
    .hero-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-image-box {
        height: 450px;
        order: -1;
    }
    
    h1 {
        font-size: 2.8rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    /* Projects */
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-card.featured-main {
        grid-column: span 1;
        height: 400px;
    }
    
    .projects-header-flex {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* Contact */
    .contact-section {
        margin: 20px;
        padding: 60px 20px;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 16px;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .section-padding {
        padding: 60px 0;
    }
    
    .stat-box {
        gap: 30px;
    }
}

/* =========================================
   13. 工具類別
   ========================================= */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mt-40 {
    margin-top: 40px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-40 {
    margin-bottom: 40px;
}

/* =========================================
   關於我們頁面專屬樣式 (Refactored)
   ========================================= */

/* 通用輔助類 */
.section-subtitle {
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 20px;
    font-weight: 600;
}

.white-text { color: var(--white) !important; }
.primary-text { color: var(--primary); }

.section-spacing {
    padding: 80px 0;
}

/* 1. Page Hero - 頂部 Banner */
.page-hero-wrapper {
    position: relative;
    min-height: 60vh; /* 電腦版高度 */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* 這裡解決 Banner 被擋住的問題：增加 margin-top 避開 header */
    margin: 120px 20px 0 20px; 
    border-radius: var(--radius-xl);
}

.page-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6); /* 稍微調暗讓文字更清楚 */
    z-index: 1;
}

.page-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 0 20px;
}

.hero-title {
    color: var(--white);
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 0;
}

/* 2. Grid System - 解決手機擠壓的核心 */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 電腦版維持兩欄 */
    gap: 80px;
    align-items: center;
}

.vertical-img {
    height: 500px;
    width: 100%;
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.vertical-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 3. Client Centric */
.client-centric-section {
    background: var(--background);
    padding: 100px 0;
    margin: 40px 0;
}

.centered-header {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.highlight-heading {
    font-size: 2.2rem;
    line-height: 1.5;
}

/* 4. CTA Section */
.cta-section-wrapper {
    padding: 0 20px 60px 20px; /* 左右留邊，下方留白 */
}

.cta-card {
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius-xl);
    padding: 80px 20px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.cta-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15;
    z-index: 1;
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 15px 20px;
    margin-bottom: 20px;
    border: none;
    border-radius: 10px; /* 微圓角 */
    font-size: 1rem;
    font-family: var(--font-body);
}

.btn-white {
    background: var(--white);
    color: var(--primary);
    border: none;
}

/* =========================================
   手機版響應式修正 (Mobile Responsive)
   ========================================= */
@media (max-width: 768px) {
    
    /* 修正 Banner 高度與標題 */
    .page-hero-wrapper {
        min-height: 50vh;
        margin: 100px 10px 0 10px; /* 手機版邊距縮小為 10px */
        border-radius: 20px;
    }

    .hero-title {
        font-size: 2rem;
    }

    /* 修正 Grid：強制變為單欄 */
    .about-grid {
        grid-template-columns: 1fr; /* 關鍵修正：單欄顯示 */
        gap: 40px;
    }

    /* 反向排列控制 (讓手機版圖片永遠在文字上方，或依你喜好調整) */
    /* 如果希望「我們的故事」區塊，圖片也在上面，可以使用這個 */
    /* .reverse-mobile { display: flex; flex-direction: column-reverse; } */

    .vertical-img {
        height: 350px; /* 手機版圖片高度縮小 */
    }
    
    .highlight-heading {
        font-size: 1.5rem;
    }
    
    .cta-section-wrapper {
        padding: 0 10px 40px 10px;
    }
    
    .cta-card {
        padding: 60px 20px;
        border-radius: 20px;
    }

    /* 極窄邊距設定 */
    .container {
        padding: 0 20px; /* 手機版左右內縮改為 20px (極窄) */
    }
}

/* =========================================
   服務項目頁面專屬樣式
   ========================================= */

/* 服務內容的小清單 */
.service-list-box {
    margin-top: 30px;
    background: #fdfdfd;
    padding: 25px;
    border-radius: 20px;
    border: 1px solid #eee;
}

.service-list-box h4 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.service-list-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-list-box ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: var(--text-gray);
    font-size: 0.95rem;
}

.service-list-box ul li::before {
    content: '•';
    color: var(--primary);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* 淺灰背景區塊 (用於區隔不同的服務項目) */
.bg-light-gray {
    background-color: #F8F9FA;
    border-radius: var(--radius-xl);
    margin: 20px; /* 讓背景有點距離 */
}

/* 電腦版左右互換 (圖在右，文在左) */
@media (min-width: 769px) {
    .swap-desktop {
        direction: rtl; /* 暫時改變排列方向 */
    }
    .swap-desktop > * {
        direction: ltr; /* 內容轉回來 */
    }
}

@media (max-width: 600px) {
    .service-scope-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
}

/* 服務流程 Process Section Grid */
.process-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 電腦版 5 欄 */
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.process-item {
    text-align: center;
    position: relative;
}

/* 圓圈數字 */
.process-number {
    width: 80px;
    height: 80px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    font-size: 1.8rem;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(27, 58, 87, 0.2);
    transition: transform 0.3s;
}

.process-item:hover .process-number {
    transform: scale(1.1);
    background: #2a5a8a; /* 稍微變亮 */
}

.process-item h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.process-item p {
    font-size: 0.9rem;
    color: #888;
}

/* RWD: 手機版流程圖變垂直 */
@media (max-width: 768px) {
    .bg-light-gray {
        margin: 0; /* 手機版背景滿版比較好看 */
        border-radius: 0;
    }
    
    /* 強制取消左右互換，手機一律圖在上文在下 */
    .swap-desktop {
        direction: ltr;
    }

    /* 流程圖變為 2 欄 (平板) 或 1 欄 (手機) */
    .process-grid {
        grid-template-columns: 1fr; /* 手機版單欄 */
        gap: 40px;
    }
    
    .process-item {
        display: flex;
        align-items: center;
        text-align: left;
        background: #fff;
        padding: 20px;
        border-radius: 15px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    }
    
    .process-number {
        margin: 0 20px 0 0; /* 數字在左邊 */
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
        flex-shrink: 0;
    }
}

/* =========================================
   聯絡我們頁面專屬樣式 (Clean Style)
   ========================================= */

/* 1. 極簡 Banner */
.hero-minimal {
    min-height: 40vh; /* 高度縮減，比較俐落 */
    margin-bottom: 0;
}

.hero-minimal .hero-title {
    margin-bottom: 10px;
}

/* 2. 左右分割佈局 */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* 右邊表單稍微寬一點 */
    gap: 80px;
    align-items: start; /* 靠上對齊 */
}

/* 左側資訊欄 */
.info-item-group {
    margin-top: 50px;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
}

.icon-box {
    width: 50px;
    height: 50px;
    background: #F0F4F8; /* 極淺的藍灰色背景 */
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 20px;
    flex-shrink: 0;
}

.info-text label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #999;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.info-text span, 
.info-text a {
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 500;
}

/* 右側表單區 (乾淨卡片) */
.form-card {
    background: var(--white);
    padding: 50px;
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0,0,0,0.05); /* 非常淡的質感陰影 */
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
}

/* 新的輸入框樣式：灰底無邊框，看起來更現代 */
.form-input-clean {
    width: 100%;
    padding: 15px 20px;
    background: #F8F9FA;
    border: 1px solid transparent; /* 預設無邊框 */
    border-radius: 10px;
    font-size: 1rem;
    transition: 0.3s;
    font-family: var(--font-body);
}

.form-input-clean:focus {
    background: var(--white);
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(27, 58, 87, 0.1);
}

.btn.full-width {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
}

/* 3. 地圖區塊 */
.map-section {
    padding-bottom: 80px;
}

.map-wrapper {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.map-wrapper iframe {
    display: block; /* 消除 iframe 下方白邊 */
}

/* RWD 手機版調整 */
@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr; /* 變單欄 */
        gap: 50px;
    }

    .form-card {
        padding: 30px 20px; /* 手機版內距縮小 */
    }
    
    .hero-minimal {
        min-height: 35vh;
    }
}

/* =========================================
   案例作品頁面 (Portfolio Archive)
   ========================================= */

/* 1. Grid 排版 */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 電腦版 3 欄 */
    gap: 40px;
    margin-bottom: 60px;
}

/* 2. 卡片設計 */
.portfolio-card {
    display: block;
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    text-decoration: none; /* 移除超連結底線 */
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(27, 58, 87, 0.15);
}

/* 圖片區域 */
.portfolio-thumb {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.portfolio-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.portfolio-card:hover .portfolio-thumb img {
    transform: scale(1.1);
}

/* 懸浮遮罩 */
.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(27, 58, 87, 0.7); /* Primary color with opacity */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.view-project {
    color: var(--white);
    border: 1px solid var(--white);
    padding: 10px 25px;
    border-radius: 50px;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* 文字區域 */
.portfolio-info {
    padding: 30px 35px;
}

.portfolio-cat {
    font-size: 0.8rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    display: block;
    margin-bottom: 10px;
}

.portfolio-title {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.4;
}

.portfolio-excerpt {
    font-size: 0.95rem;
    color: #888;
    line-height: 1.6;
}

/* 3. 分頁導航 */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pagination-wrapper .page-numbers {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    color: var(--text-dark);
    font-weight: 600;
    transition: 0.3s;
}

.pagination-wrapper .page-numbers.current,
.pagination-wrapper .page-numbers:hover {
    background: var(--primary);
    color: var(--white);
}

/* RWD 響應式 */
@media (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr); /* 平板 2 欄 */
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr; /* 手機 1 欄 */
        gap: 40px;
    }

    .portfolio-thumb {
        height: 220px;
    }
}

/* =========================================
   單一案例內頁 (Single Portfolio)
   ========================================= */

/* 1. 沉浸式 Hero */
.single-hero-wrapper {
    position: relative;
    height: 70vh; /* 佔據螢幕 70% 高度 */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 20px; /* 留一點邊距才有圓角感 */
    border-radius: var(--radius-xl);
    margin-top: 100px; /* 避開 Header */
}

.single-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.5); /* 變暗讓文字清楚 */
    z-index: 1;
}

.single-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
}

.project-cat-tag {
    background: var(--primary);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
    display: inline-block;
}

.project-title {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 30px;
    line-height: 1.2;
}

/* 資訊小卡 */
.project-meta-grid {
    display: inline-flex;
    gap: 40px;
    border-top: 1px solid rgba(255,255,255,0.3);
    padding-top: 20px;
}

.meta-item {
    text-align: left;
}

.meta-label {
    display: block;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.meta-value {
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 500;
}

/* 2. 文章內容排版優化 (重要！) */
.entry-content {
    max-width: 800px; /* 限制寬度，閱讀體驗較佳 */
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-dark);
}

.entry-content p {
    margin-bottom: 30px;
}

.entry-content h2, 
.entry-content h3 {
    color: var(--primary);
    margin-top: 50px;
    margin-bottom: 20px;
}

.entry-content img {
    border-radius: 20px; /* 內文圖片也要圓角 */
    margin: 40px 0;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.entry-content blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 20px;
    margin: 40px 0;
    font-style: italic;
    color: #666;
}

/* 3. 前後導航 */
.bg-light {
    background: #FAFAFA;
}

.nav-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.nav-prev, .nav-next {
    flex: 1;
    max-width: 40%;
}

.nav-next {
    text-align: right;
}

.nav-center {
    flex-shrink: 0;
    padding: 0 40px;
}

.nav-label {
    display: block;
    font-size: 0.8rem;
    color: #999;
    letter-spacing: 1px;
    margin-bottom: 5px;
    font-weight: 700;
}

.nav-link h4 {
    font-size: 1.2rem;
    margin: 0;
    color: var(--text-dark);
    transition: 0.3s;
}

.nav-link:hover h4 {
    color: var(--primary);
}

.back-grid-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    border: 1px solid #ddd;
    border-radius: 50px;
    color: #666;
    font-size: 0.9rem;
    transition: 0.3s;
}

.back-grid-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* RWD 修正 */
@media (max-width: 768px) {
    .single-hero-wrapper {
        height: 50vh;
        margin: 100px 10px 0 10px;
    }

    .project-title {
        font-size: 2rem;
    }
    
    .project-meta-grid {
        gap: 20px;
    }
    
    .nav-grid {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    
    .nav-next {
        text-align: center;
    }
}

/* =========================================
   部落格頁面 (Blog & Single Post)
   ========================================= */

/* 1. 部落格列表 Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

/* 2. 部落格卡片 */
.blog-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: 0.3s;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.blog-thumb {
    height: 240px;
    position: relative;
    overflow: hidden;
}

.blog-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.blog-card:hover .blog-thumb img {
    transform: scale(1.05);
}

/* 日期小方塊 */
.blog-date {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--white);
    padding: 10px 15px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.blog-date .day {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.blog-date .month {
    display: block;
    font-size: 0.7rem;
    color: #999;
    text-transform: uppercase;
}

/* 卡片文字區 */
.blog-info {
    padding: 30px 35px;

}

.blog-cat {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: block;
}

.blog-title {
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 15px;
}

.blog-title a {
    color: var(--text-dark);
}

.blog-title a:hover {
    color: var(--primary);
}

.blog-excerpt {
    font-size: 0.95rem;
    color: #888;
    margin-bottom: 20px;
    line-height: 1.6;
}

.read-more-link {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* =========================================
   文章內頁 (Single Post) 樣式
   ========================================= */

.article-header-section {
    padding-top: 150px;
    padding-bottom: 50px;
}

.article-meta-top {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #888;
}

.meta-cat {
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.article-main-title {
    font-size: 2.8rem;
    line-height: 1.3;
    max-width: 900px;
    margin: 0 auto;
    color: var(--text-dark);
}

/* 精選圖片 */
.featured-img-wrapper {
    border-radius: var(--radius-xl);
    overflow: hidden;
    height: 500px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.featured-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 內文限制寬度，提升閱讀感 */
.article-body {
    max-width: 760px; /* 閱讀最佳寬度 */
    margin: 0 auto;
}

.article-footer {
    max-width: 760px;
    margin: 40px auto 0;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.tags-list a {
    display: inline-block;
    background: #f1f1f1;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.85rem;
    color: #666;
    margin-right: 10px;
    margin-bottom: 10px;
}

.tags-list a:hover {
    background: var(--primary);
    color: var(--white);
}

/* RWD 響應式 */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .article-main-title {
        font-size: 2rem;
    }
    
    .featured-img-wrapper {
        height: 300px;
    }
    
    .article-header-section {
        padding-top: 120px;
    }
}

/* =========================================
   手機版選單樣式 (簡約下框線版) - 修正電腦版顯示問題
   ========================================= */

/* 修改點 1：將範圍從 1024px 改為 991px，避免誤傷小筆電 */
@media (max-width: 991px) {
    .nav-links {
        display: flex !important;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: #F8F9FB; /* 淺灰背景 */
        z-index: 999;
        justify-content: center; /* 內容上下置中 */
        align-items: center;
        gap: 0; 
        padding: 0;
        margin: 0;
        
        /* 確保不產生捲軸 */
        overflow-y: auto; 
    }
    
    .nav-links a {
        /* 字體設定 */
        font-size: 1.4rem;
        font-weight: 400; /* 簡約細字 */
        color: var(--primary) !important;
        letter-spacing: 0.5px;
        
        /* 版面設定 */
        display: block;
        width: 100%;
        text-align: center;
        padding: 28px 0; /* 高度舒適 */
        
        /* 下框線 */
        border-bottom: 1px solid rgba(27, 58, 87, 0.1);
        
        transition: all 0.3s ease;
        background: transparent;
    }
    
    /* 移除最後一個的框線 */
    .nav-links a:last-child {
        border-bottom: none;
    }
    
    /* Hover 效果 */
    .nav-links a:hover,
    .nav-links a:active {
        background: rgba(27, 58, 87, 0.04);
        color: var(--primary) !important;
    }
}

/* 修改點 2：加入這段「電腦版重置」，強制電腦版恢復原狀 (保險起見) */
@media (min-width: 992px) {
    .nav-links {
        position: static !important;
        flex-direction: row !important;
        height: auto !important;
        background: transparent !important;
        padding: 0 !important;
        justify-content: flex-end !important; /* 或 flex-start，看你原本設計 */
    }
    
    .nav-links a {
        border-bottom: none !important;
        padding: 5px 0 !important;
        width: auto !important;
        font-size: 1rem !important; /* 恢復電腦版字體大小 */
    }
}

/* =========================================
   Footer 樣式 (V3 淺色清爽版)
   ========================================= */
.site-footer {
    background-color: var(--footer-bg);
    color: var(--text-dark);
    padding: 80px 0 30px 0;
    margin-top: 0; /* 如果上面是白色區塊，不需要額外 margin */
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1.2fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-title {
    font-size: 1.2rem;
    margin-bottom: 25px;
    color: var(--primary); /* 深藍色標題 */
    font-weight: 700;
    letter-spacing: 1px;
}

/* 大 Logo Icon */
.footer-big-logo {
    font-size: 5rem;
    color: var(--primary); /* 深藍色 Icon */
    opacity: 0.15;
    line-height: 1;
    margin-bottom: 20px;
    display: block;
}

.brand-desc {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 0.95rem;
}

/* 聯絡資訊列表 */
.contact-info-list {
    list-style: none; padding: 0;
}

.contact-info-list li {
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-info-list i {
    color: var(--primary); /* 深藍色 Icon */
    width: 20px;
    text-align: center;
}

.contact-info-list a { color: var(--text-light); }
.contact-info-list a:hover { color: var(--primary); }

/* 搜尋框 */
.search-box-wrapper {
    display: flex;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 5px;
    overflow: hidden;
}

.search-input {
    border: none;
    padding: 10px 15px;
    width: 100%;
    outline: none;
    font-size: 0.95rem;
}

.search-btn {
    background: var(--primary); /* 深藍色按鈕 */
    border: none;
    color: white;
    padding: 0 15px;
    cursor: pointer;
}

/* 底部版權 & 社群 */
.footer-divider {
    height: 1px;
    background: #e5e5e5;
    margin-bottom: 30px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #999;
    font-size: 0.85rem;
}

.footer-social-icons a {
    display: inline-flex;
    width: 35px;
    height: 35px;
    background: #fff;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    color: var(--text-dark);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: 0.3s;
}

.footer-social-icons a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* =========================================
   RWD 手機版修正
   ========================================= */
@media (max-width: 900px) {
    /* Header 手機版 */
    .nav-links { display: none; } /* 暫時隱藏，需 JS 控制顯示 */
    .mobile-menu-toggle { display: block; }
    
    .header-flex { padding: 0 10px; }
    
    .btn-line-header span { display: none; }
    .btn-line-header {
        padding: 8px;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        justify-content: center;
    }

    /* Footer 手機版 */
    .footer-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 40px; /* 區塊之間的間距 */
        text-align: left !important; /* 手機版建議改回靠左或置中，較符合閱讀習慣 */
    }
    
    .footer-col {
        width: 100% !important;
    }

    .footer-big-logo { margin: 0 auto 20px auto; }
    
    .contact-col-right {
        grid-column: span 1 !important; /* 取消跨欄 */
        align-items: flex-start !important; /* 改回靠左對齊 */
        text-align: left !important;
    }

    .contact-info-list {
        align-items: flex-start !important; /* 清單項目靠左 */
    }

    .contact-info-list li {
        justify-content: flex-start !important; /* 內容靠左 */
        flex-direction: row !important; /* 圖示回到左側 */
    }

    .contact-info-list li i {
        margin-left: 0 !important;
        margin-right: 12px !important; /* 圖示與文字的間距改到右邊 */
    }
}

/* =========================================
   服務流程手機版修正 (加強權重版 V2)
   請貼在檔案最下方，這會強制覆蓋所有舊設定
   ========================================= */

@media (max-width: 768px) {
    
    /* 1. 強制讓外層變成垂直排列 */
    body .process-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
        padding: 0 10px !important;
        grid-template-columns: unset !important; /* 清除舊的 Grid 設定 */
    }

    /* 2. 針對每一個卡片使用 Grid 排版 */
    body .process-item {
        display: grid !important;
        /* 左邊 60px 給數字，右邊自動填滿文字 */
        grid-template-columns: 60px 1fr !important; 
        grid-template-rows: auto auto !important; 
        column-gap: 15px !important;
        row-gap: 5px !important;
        
        align-items: center !important;
        text-align: left !important;
        background: #ffffff;
        padding: 20px !important;
        border-radius: 15px !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
        margin: 0 !important; /* 避免額外邊距 */
    }

    /* 3. 數字圓圈 (強制定位在左側，跨越兩行) */
    body .process-item .process-number {
        grid-column: 1 !important;
        grid-row: 1 / 3 !important; /* 跨越兩行 */
        
        width: 50px !important;
        height: 50px !important;
        margin: 0 auto !important;
        font-size: 1.4rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        
        /* 確保不會受到原本 flex 影響 */
        flex: none !important; 
    }

    /* 4. 標題 (強制定位在右上) */
    body .process-item h4 {
        grid-column: 2 !important;
        grid-row: 1 !important;
        
        margin: 0 !important;
        font-size: 1.1rem !important;
        font-weight: 700 !important;
        color: var(--primary);
        align-self: end !important; /* 靠下對齊 */
        line-height: 1.2 !important;
    }

    /* 5. 描述 (強制定位在右下) */
    body .process-item p {
        grid-column: 2 !important;
        grid-row: 2 !important;
        
        margin: 0 !important;
        font-size: 0.9rem !important;
        color: #888;
        align-self: start !important; /* 靠上對齊 */
        line-height: 1.4 !important;
    }
}


/* =========================================
   工程項目兩欄清單
   ========================================= */
.two-col-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
}

@media (max-width: 768px) {
    .two-col-list {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 1024px) {
    /* 1. 當 .main-nav 被 JS 加上 active 時，把它顯示出來 */
    .main-nav.active {
        display: block !important;
    }

    /* 2. 當選單打開時，把漢堡按鈕變成深色 (因為你的選單背景是淺灰色的) */
    .mobile-menu-toggle.active {
        color: var(--primary) !important;
        position: relative; /* 確保它不會跑版 */
        z-index: 1001; /* 確保按鈕浮在選單上面 */
    }
}