/* 基礎重置與變數 */
:root {
    --primary-color: #3B82F6;
    --primary-dark: #2563EB;
    --secondary-color: #10B981;
    --text-dark: #1F2937;
    --text-light: #6B7280;
    --bg-light: #F9FAFB;
    --bg-white: #FFFFFF;
    --border-color: #E5E7EB;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft JhengHei", "微軟正黑體", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

/* 全站平滑捲動，讓錨點連結（例如 立即諮詢 / 了解服務）以滑動方式移動 */
html {
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    color: white;
    padding: 100px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* 網格背景裝飾 */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.3;
    animation: gridMove 20s linear infinite;
    pointer-events: none;
}

@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

/* 幾何圖形裝飾 */
.hero::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 15s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(-30px, 30px) scale(1.1);
    }
}

/* 額外的幾何裝飾元素 */
.hero .container {
    position: relative;
    z-index: 1;
}

.hero .container::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.2) 0%, transparent 50%);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morph 8s ease-in-out infinite;
    pointer-events: none;
}

.hero .container::after {
    content: '';
    position: absolute;
    bottom: -150px;
    right: -150px;
    width: 400px;
    height: 400px;
    background: linear-gradient(45deg, rgba(59, 130, 246, 0.15) 0%, transparent 60%);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: morph 10s ease-in-out infinite reverse;
    pointer-events: none;
}

@keyframes morph {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 40px;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.4s both;
    position: relative;
    z-index: 10;
}

.btn {
    padding: 15px 40px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    z-index: 10;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

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

/* Section 通用樣式 */
section {
    padding: 80px 20px;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    color: var(--text-dark);
    font-weight: 700;
}

/* 問題情境 Section */
.problem-section {
    background-color: var(--bg-light);
}

.problem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.problem-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.problem-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.problem-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.problem-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.problem-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* 服務內容 Section */
.services-section {
    background: linear-gradient(180deg, #F8FAFC 0%, #F1F5F9 100%);
    position: relative;
    overflow: hidden;
}

/* 服務區塊背景裝飾 */
.services-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.5;
    pointer-events: none;
}

.services-section::after {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.services-section .container {
    position: relative;
    z-index: 1;
}

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

.service-card {
    background: #FFFFFF;
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

/* 卡片網格背景裝飾 - 類似 hero 區塊 */
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.4;
    pointer-events: none;
    animation: gridMove 25s linear infinite;
}

/* 卡片幾何圖形裝飾 - 類似 hero 區塊 */
.service-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 12s ease-in-out infinite;
    pointer-events: none;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 確保卡片內容在裝飾之上 */
.service-icon,
.service-card h3,
.service-card p {
    position: relative;
    z-index: 1;
}

.service-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.service-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* 為什麼選擇我們 Section */
.why-section {
    background-color: var(--bg-light);
}

.why-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.why-text h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.why-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.8;
}

.why-image {
    width: 100%;
}

.why-image-content {
    width: 100%;
    max-width: 520px;
    display: block;
    margin: 0 auto;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.image-placeholder {
    background: white;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 60px 30px;
    text-align: center;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.placeholder-text {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 20px;
    font-weight: 600;
}

.placeholder-prompt {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
    max-width: 500px;
    font-style: italic;
}

/* 聯絡方式 Section */
.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

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

.contact-method {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
}

.contact-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.contact-method h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.contact-method p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.contact-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.line-qr-code {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.line-qr-image {
    max-width: 250px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.email-guidelines {
    margin-top: 30px;
    text-align: left;
}

.email-guidelines h4 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 15px;
    font-weight: 600;
}

.email-guidelines ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.email-guidelines li {
    padding-left: 25px;
    position: relative;
    color: var(--text-light);
    line-height: 1.6;
}

.email-guidelines li::before {
    content: '•';
    position: absolute;
    left: 8px;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.email-guidelines li strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* 客戶見證 Section */
.testimonials-section {
    background-color: var(--bg-light);
    padding: 80px 20px;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.testimonial-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
}

.testimonial-image {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.testimonial-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.testimonial-text {
    font-size: 1.1rem;
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 20px;
    font-style: italic;
}

.testimonial-author {
    color: var(--text-light);
    font-weight: 600;
}

/* Footer */
.footer {
    background-color: var(--text-dark);
    color: white;
    padding: 40px 20px;
    text-align: center;
}

.footer p {
    margin-bottom: 10px;
}

.footer-note {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 20px;
}

/* 動畫 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 響應式設計 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .why-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .problem-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-methods {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    section {
        padding: 60px 20px;
    }
    
    .hero {
        padding: 60px 20px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 40px;
    }
}

