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

:root {
    --primary-color: #0066cc;
    --secondary-color: #003d7a;
    --accent-color: #00a8e8;
    --text-dark: #1a1a1a;
    --text-light: #ffffff;
    --background-light: #f8f9fa;
    --background-dark: rgba(0, 0, 0, 0.7);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    font-weight: 300;
    letter-spacing: -0.02em;
}

h2, h3 {
    font-family: 'Noto Serif TC', 'Noto Sans TC', serif;
    font-weight: 400;
    letter-spacing: 0.02em;
}

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

/* 背景視頻 */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
    background: url('media/homepage.jpg') center center / cover no-repeat;
}

.video-background video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.7) 0%, rgba(0, 102, 204, 0.65) 50%, rgba(0, 168, 232, 0.6) 100%);
    z-index: 2;
}

/* 導航欄 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-logo h1 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #6366f1 0%, #0066cc 50%, #00a8e8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

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

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

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

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

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

/* 語言切換按鈕 */
.lang-toggle {
    background: var(--primary-color);
    color: var(--text-light);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin-left: 1.5rem;
}

.lang-toggle:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 102, 204, 0.3);
}

/* 主橫幅 */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    position: relative;
    background: transparent;
}

.hero-content h2 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--text-light);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* 動畫效果 */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

.delay-1 {
    animation-delay: 0.3s;
}

.delay-2 {
    animation-delay: 0.6s;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* 章節通用樣式 */
section {
    padding: 6rem 0;
    position: relative;
    background: var(--text-light);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
}

/* 關於我們 */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.about-card {
    background: var(--text-light);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: var(--transition);
}

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.about-card .icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 20px;
    transition: var(--transition);
}

.about-card .icon svg {
    width: 40px;
    height: 40px;
    color: var(--text-light);
    stroke-width: 1.5;
}

.about-card:hover .icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.3);
}

.about-card h3 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.about-card p {
    color: #666;
}

/* 研發項目 */
.research-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.research-text h3 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.research-text p {
    margin-bottom: 1.5rem;
    color: #555;
    line-height: 1.8;
}

.research-points {
    list-style: none;
    padding-left: 0;
}

.research-points li {
    padding: 0.8rem 0;
    padding-left: 2rem;
    position: relative;
    color: #555;
}

.research-points li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.research-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* 研發管線 */
.pipeline {
    background: var(--secondary-color);
    color: var(--text-light);
}

.pipeline .section-header h2,
.pipeline .subtitle {
    color: var(--text-light);
}

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

.stage {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

.stage:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-color);
}

.stage.active {
    background: var(--accent-color);
    border-color: var(--text-light);
}

.stage-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.stage-icon svg {
    width: 36px;
    height: 36px;
    color: var(--text-light);
    stroke-width: 1.5;
}

.stage:hover .stage-icon {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.15);
    box-shadow: 0 8px 25px rgba(0, 168, 232, 0.3);
}

.stage.active .stage-icon {
    background: var(--text-light);
}

.stage.active .stage-icon svg {
    color: var(--accent-color);
    stroke-width: 2;
}

.stage h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.stage p {
    color: rgba(255, 255, 255, 0.9);
}

/* 技術平台 */
.technology {
    background: var(--background-light);
}

.tech-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.tech-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.tech-text h3 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.tech-text p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.tech-points {
    list-style: none;
    padding: 0;
}

.tech-points li {
    padding: 0.8rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--text-dark);
}

.tech-points li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.2rem;
}

/* 辦公地點 */
.location {
    background: var(--text-light);
    padding: 6rem 0;
}

.location-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.location-text h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.location-text p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.location-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--text-light);
    border-radius: 15px;
    transition: var(--transition);
    border: 1px solid rgba(0, 102, 204, 0.1);
    position: relative;
    overflow: hidden;
}

.feature-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
    transform: scaleY(0);
    transition: var(--transition);
}

.feature-item:hover::before {
    transform: scaleY(1);
}

.feature-item:hover {
    transform: translateX(10px);
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.15);
    border-color: var(--accent-color);
}

.feature-item svg {
    width: 48px;
    height: 48px;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 12px;
    color: var(--text-light);
    flex-shrink: 0;
    transition: var(--transition);
    stroke-width: 1.5;
}

.feature-item:hover svg {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.3);
}

.feature-item span {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 1.05rem;
}

.location-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.location-main {
    grid-column: 1 / -1;
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.location-secondary {
    grid-column: 1 / -1;
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

/* 聯絡我們 */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.contact-info {
    padding: 2rem;
    border-radius: 4px;
    border-left: 2px solid var(--primary-color);
}

.contact-info h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.contact-info p {
    color: #555;
    margin-bottom: 0.5rem;
}

.contact-info strong {
    color: var(--primary-color);
}

/* 頁腳 */
.footer {
    background: var(--text-dark);
    color: var(--text-light);
    padding: 2rem 0;
    text-align: center;
}

.footer-content p {
    margin: 0.5rem 0;
}

.footer-note {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .navbar .container {
        gap: 1rem;
    }

    .lang-toggle {
        margin-left: auto;
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .research-content,
    .tech-content,
    .location-content {
        grid-template-columns: 1fr;
    }

    .research-image {
        order: -1;
    }

    .tech-content {
        grid-template-columns: 1fr;
    }

    .tech-image {
        order: -1;
    }

    .location-content {
        grid-template-columns: 1fr;
    }

    .location-images {
        order: -1;
    }

    .pipeline-stages {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
}
