/* ===== Google Fonts ===== */
@import url('https://fonts.googleapis.com/css2?family=Chiron+Hei+HK:wght@400;500;600&display=swap');

/* ===== 基礎設定 ===== */
:root {
    --primary-color: #17776E;
    --secondary-color: #0F5D56;
    --text-color: #2D3748;
    --text-light: #718096;
    --bg-light: #F8F9FA;
    --border-color: #E2E8F0;
    --white: #FFFFFF;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 12px rgba(23, 119, 110, 0.15);
}

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

body {
    font-family: 'Chiron Hei HK', 'Microsoft JhengHei', 'PingFang TC', 'Noto Sans TC', sans-serif;
    color: var(--text-color);
    line-height: 1.7;
}

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

/* 桌面版預設隱藏的元素 */
.mobile-only {
    display: none;
}

/* ===== Header ===== */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo img {
    height: 60px;
    width: auto;
}

/* 桌機版顯示 desktop-logo，隱藏 mobile-logo */
.logo .mobile-logo {
    display: none;
}

.logo .desktop-logo {
    display: block;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

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

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 6rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid transparent;
}

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

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

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

.btn-secondary:hover {
    background: var(--bg-light);
}

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

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

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

/* ===== Sections ===== */
section {
    padding: 4rem 0;
}

.page-header {
    background: var(--bg-light);
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
}

/* ===== Features ===== */
.features {
    background: var(--white);
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.features ul {
    max-width: 800px;
    margin: 2rem auto;
}

.features li {
    margin: 1rem 0;
    font-size: 1.1rem;
}

/* ===== Product Grid ===== */
.product-grid, .projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card, .project-card {
    background: var(--white);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover, .project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-card h2, .product-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.product-image, .project-image {
    width: 100%;
    height: 200px;
    background: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.product-image img, .project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.link-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-top: 1rem;
}

.link-more:hover {
    text-decoration: underline;
}

/* ===== Product Detail ===== */
.product-detail {
    padding-bottom: 4rem;
}

.breadcrumb {
    padding: 1rem 0;
    color: var(--text-light);
}

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

.product-hero-image {
    width: 100%;
    aspect-ratio: 3 / 2;
    max-height: 800px;
    background: var(--bg-light);
    border-radius: 8px;
    overflow: hidden;
    margin: 2rem 0;
}

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

.product-detail-content h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.product-description {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.product-body h3 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.product-body ul {
    margin-left: 1.5rem;
}

.product-cta {
    margin-top: 3rem;
    margin-bottom: 3rem;
    display: flex;
    gap: 1rem;
}

/* ===== Project Meta ===== */
.project-meta {
    display: flex;
    gap: 1.5rem;
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.project-scope {
    color: var(--text-color);
    font-weight: 500;
}

/* ===== CTA Section ===== */
.cta {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* ===== Footer ===== */
.site-footer {
    background: #1A202C;
    color: var(--white);
    padding: 3rem 0 1rem;
}

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

.footer-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.footer-contact h4, .footer-links h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--primary-color);
}

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

/* ===== Content Formatting ===== */
.pages-list {
    margin-top: 2rem;
}

.page-item {
    background: var(--white);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.page-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.page-item h2 {
    margin-bottom: 0.5rem;
}

.page-item h2 a {
    color: var(--primary-color);
    text-decoration: none;
}

.page-item h2 a:hover {
    color: var(--secondary-color);
}

.content-wrapper h2 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-wrapper h3 {
    color: var(--secondary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

.content-wrapper ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.content-wrapper p {
    margin-bottom: 1rem;
}

.text-center {
    text-align: center;
    margin-top: 2rem;
}

/* ===== 響應式設計 ===== */
@media (max-width: 768px) {
    /* 平板和手機版才顯示的元素 */
    .mobile-only {
        display: inline;
    }

    /* 平板和手機版顯示 mobile-logo，隱藏 desktop-logo */
    .logo .desktop-logo {
        display: none;
    }
    
    .logo .mobile-logo {
        display: block;
    }
    
    .logo img {
        height: 30px;
    }
    
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .product-grid, .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .product-cta {
        flex-direction: column;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    section {
        padding: 2rem 0;
    }
    
    .hero {
        padding: 3rem 0;
    }
}
