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

/* =========================================
   1. CSS 變數定義
   ========================================= */
:root {
    /* 色彩系統 */
    --primary: #1B3A57;
    --accent: #E8EBEF;
    --text-dark: #222222;
    --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 導航列
   ========================================= */
.site-header {
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    box-sizing: border-box;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    position: fixed;
}

/* Logo */
.site-logo {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
}

.site-logo:hover {
    opacity: 0.8;
}

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

.main-nav a {
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--text-dark);
    position: relative;
    padding: 5px 0;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.main-nav a:hover {
    color: var(--primary);
}

/* 手機選單按鈕 */
.mobile-menu-toggle {
    display: none;
    font-size: 1.8rem;
    color: var(--primary);
    cursor: pointer;
    background: none;
    border: none;
}

/* =========================================
   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: 0.9fr 1.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;
}

/* =========================================
   11. Footer
   ========================================= */
.site-footer {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 0.9rem;
    background-color: var(--white);
}

/* =========================================
   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;
}