/* 全局樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* 導航欄 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow);
    z-index: 1000;
    padding: 15px 0;
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    transition: opacity 0.3s, transform 0.3s, max-height 0.3s;
    overflow: hidden;
}

.nav-brand.hidden {
    opacity: 0;
    transform: translateY(-100%);
    max-height: 0;
    margin: 0;
    padding: 0;
}

.logo {
    height: 40px;
    width: auto;
}

.logo-v {
    display: none;
}

.logo-h {
    display: block;
}

.company-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

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

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

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

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

.nav-menu a.active {
    color: var(--secondary-color);
}

/* Hero 區塊 */
.hero {
    margin-top: 80px;
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    text-align: center;
}

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

.hero-subtitle {
    font-size: 24px;
    margin-bottom: 15px;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-description {
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.85;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* 區塊標題 */
.section-title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
}

/* 關於我們 */
.about {
    padding: 80px 0;
    background: var(--bg-white);
}

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

.about-content p {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 20px;
}

/* 服務內容 */
.services {
    padding: 80px 0;
    background: var(--bg-light);
}

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

.service-card {
    background: var(--bg-white);
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

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

.service-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.service-description {
    color: var(--text-light);
    line-height: 1.7;
}

/* 核心優勢 */
.advantages {
    padding: 80px 0;
    background: var(--bg-white);
}

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

.advantage-item {
    text-align: center;
}

.advantage-item h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.advantage-item p {
    color: var(--text-light);
    line-height: 1.7;
}

/* 聯繫我們 */
.contact {
    padding: 80px 0;
    background: var(--bg-light);
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: var(--bg-white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.contact-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.contact-details h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.contact-details p {
    color: var(--text-light);
    font-size: 16px;
}

.contact-details a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-details a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* 頁腳 */
.footer {
    background: var(--primary-color);
    color: white;
    padding: 40px 0;
    text-align: center;
}

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

.footer .icp {
    font-size: 14px;
    opacity: 0.8;
}

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

/* 響應式設計 */
@media (max-width: 768px) {
    .navbar {
        padding: 10px 0;
        transition: padding 0.3s;
    }

    .navbar.scrolled {
        padding: 8px 0;
    }

    .navbar .container {
        flex-wrap: wrap;
        transition: flex-wrap 0.3s;
    }

    .nav-brand {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
        max-height: 70px;
    }

    .nav-brand.hidden {
        margin-bottom: 0;
    }

    .logo-h {
        display: none;
    }

    .logo-v {
        display: block;
        height: 50px;
    }

    .nav-menu {
        width: 100%;
        justify-content: center;
        gap: 10px;
        flex-wrap: wrap;
        transition: margin-top 0.3s;
    }

    .navbar.scrolled .nav-menu {
        margin-top: 0;
    }

    .nav-menu a {
        font-size: 13px;
        padding: 5px 10px;
    }

    .hero {
        margin-top: 100px;
        padding: 60px 0;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 20px;
    }

    .hero-description {
        font-size: 16px;
        padding: 0 20px;
    }

    .section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .about,
    .services,
    .advantages,
    .contact {
        padding: 50px 0;
    }

    .about-content p {
        font-size: 16px;
        padding: 0 10px;
    }

    .services-grid,
    .advantages-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-card {
        padding: 30px 20px;
    }

    .contact-info {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .contact-item {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 8px 0;
    }

    .nav-brand {
        margin-bottom: 8px;
    }

    .logo-v {
        height: 40px;
    }

    .nav-menu {
        gap: 8px;
    }

    .nav-menu a {
        font-size: 12px;
        padding: 4px 8px;
    }

    .hero {
        margin-top: 90px;
        padding: 40px 0;
    }

    .hero-title {
        font-size: 24px;
        padding: 0 15px;
    }

    .hero-subtitle {
        font-size: 18px;
        padding: 0 15px;
    }

    .hero-description {
        font-size: 14px;
        padding: 0 15px;
    }

    .section-title {
        font-size: 24px;
        margin-bottom: 25px;
    }

    .about,
    .services,
    .advantages,
    .contact {
        padding: 40px 0;
    }

    .about-content p {
        font-size: 14px;
    }

    .service-card {
        padding: 25px 15px;
    }

    .service-icon {
        font-size: 40px;
    }

    .service-title {
        font-size: 20px;
    }

    .advantage-item h3 {
        font-size: 20px;
    }

    .contact-item {
        padding: 15px;
        flex-direction: column;
        text-align: center;
    }

    .contact-icon {
        font-size: 28px;
    }
}

