﻿/**
 * 前台樣式表
 * /assets/css/style.css
 * 德記家居工程有限公司 - 網站樣式（更新配色）
 */

/* ========================================
   1. 變數定義（更新為新配色）
======================================== */
:root {
    --primary-color: #2c6f5b;  /* 主色 - 綠色 */
    --primary-dark: #1e4d40;   /* 深綠色 */
    --primary-light: #4a9d7f;  /* 淺綠色 */
    --secondary-color: #f39c12; /* 輔助色 - 橙色 */
    --success-color: #27ae60;
    --info-color: #3498db;
    --warning-color: #f39c12;
    --dark-color: #2c3e50;
    --light-color: #f8f9fa;
    --white-color: #ffffff;
    --gray-color: #6c757d;
    --text-color: #333333;
    --font-family: 'Microsoft YaHei', 'Noto Sans TC', 'Helvetica Neue', sans-serif;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

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

/* ========================================
   3. 容器和佈局
======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
}

.section-title p {
    color: var(--gray-color);
    font-size: 18px;
}

/* ========================================
   4. 按鈕樣式
======================================== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 5px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 111, 91, 0.3);
}

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

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

/* ========================================
   5. 頂部聯絡欄
======================================== */
.top-bar {
    background: var(--primary-dark);
    color: var(--white-color);
    padding: 10px 0;
    font-size: 14px;
}

.top-bar .contact-info {
    display: flex;
    gap: 20px;
}

.top-bar a {
    color: var(--white-color);
}

.top-bar a:hover {
    color: var(--secondary-color);
}

/* ========================================
   6. 導航欄
======================================== */
.navbar {
    background: var(--white-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand h1 {
    font-size: 24px;
    color: var(--primary-color);
    margin: 0;
}

.navbar-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.navbar-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--text-color);
    font-weight: 500;
}

.navbar-menu a:hover,
.navbar-menu a.active {
    color: var(--primary-color);
    background: rgba(44, 111, 91, 0.1);
    border-radius: 5px;
}

/* ========================================
   7. 輪播圖
======================================== */
.hero-slider {
    position: relative;
    overflow: hidden;
    height: 600px;
    background: var(--light-color);
}

.slider-container {
    position: relative;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
}

.slide.active {
    opacity: 1;
}

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

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--white-color);
    z-index: 2;
    background: rgba(44, 111, 91, 0.8);
    padding: 40px;
    border-radius: 10px;
}

.slide-content h2 {
    font-size: 42px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.slide-content p {
    font-size: 18px;
    margin-bottom: 30px;
}

/* ========================================
   8. 服務卡片
======================================== */
.services-section {
    background: var(--light-color);
}

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

.service-card {
    background: var(--white-color);
    border-radius: 10px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(44, 111, 91, 0.2);
}

.service-image {
    height: 200px;
    overflow: hidden;
    background: var(--light-color);
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.service-card:hover .service-image img {
    transform: scale(1.1);
}

.service-content {
    padding: 25px;
}

.service-content h3 {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.service-content p {
    color: var(--gray-color);
    margin-bottom: 20px;
    line-height: 1.6;
}

.service-link {
    color: var(--primary-color);
    font-weight: 500;
}

.service-link:hover {
    color: var(--primary-dark);
}

/* ========================================
   9. CTA 區域
======================================== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white-color);
    padding: 80px 0;
}

.cta-content {
    text-align: center;
}

.cta-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn {
    min-width: 150px;
}

/* ========================================
   10. 頁尾
======================================== */
.footer {
    background: var(--primary-dark);
    color: var(--white-color);
    padding: 50px 0 20px;
}

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

.footer h3 {
    color: var(--white-color);
    margin-bottom: 20px;
}

.footer a {
    color: rgba(255,255,255,0.8);
}

.footer a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
}

/* ========================================
   11. WhatsApp 浮動按鈕
======================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
    z-index: 998;
    transition: all 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background: #128c7e;
}

/* ========================================
   11.5. 
======================================== */

.service-content P {
    DISPLAY: NONE;
}

/* ========================================
   12. 響應式設計
======================================== */
@media (max-width: 992px) {
    .navbar-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white-color);
        flex-direction: column;
        padding: 60px 20px;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        transition: left 0.3s;
        z-index: 999;
    }
    
    .navbar-menu.active {
        left: 0;
    }
    
    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 24px;
        color: var(--primary-color);
        cursor: pointer;
    }
    
    .hero-slider {
        height: 400px;
    }
    
    .slide-content h2 {
        font-size: 28px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 40px 0;
    }
    
    .section-title h2 {
        font-size: 28px;
    }
    
    .cta-content h2 {
        font-size: 24px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}
</style>

/