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

:root {
    --primary-color: #0f766e;
    --primary-light: #0d9488;
    --secondary-color: #2563eb;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --background: #ffffff;
    --text: #1f2937;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.8;
}

/* ==================== 容器 ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== 導航欄 ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    text-decoration: none;
    color: var(--text);
    cursor: pointer;
}

.logo-image {
    height: 45px;
    width: auto;
    object-fit: contain;
}

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

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

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text);
    margin: 5px 0;
    transition: var(--transition);
    border-radius: 2px;
}

/* ==================== Hero區域 ==================== */
.hero {
    margin-top: 70px;
    height: 100vh;
    background-size: cover;
    background-position: center top;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0.4),
        rgba(15, 23, 42, 0.9)
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 800px;
    animation: fadeInUp 1s ease-out;
}

.hero-label {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 30px;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-title {
    font-size: 68px;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero-title .highlight {
    color: #60a5fa;
}

.hero-subtitle {
    font-size: 18px;
    margin-bottom: 40px;
    opacity: 0.9;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==================== 按鈕 ==================== */
.btn {
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 16px;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.btn-link {
    background: var(--secondary-color);
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
}

.btn-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

/* ==================== 區域標題 ==================== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-label {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text);
}

.section-header p {
    font-size: 18px;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* ==================== 技術演進區域 ==================== */
.timeline-section {
    padding: 100px 0;
    background: #f9fafb;
}

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

.timeline-card {
    background: white;
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

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

.timeline-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.icon-1967 {
    background: rgba(37, 99, 235, 0.1);
    color: var(--secondary-color);
}

.icon-1995 {
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent-color);
}

.icon-2001 {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.icon-2016 {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.timeline-year {
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.timeline-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text);
}

.timeline-card p {
    color: var(--text-light);
    font-size: 14px;
}

.section-cta {
    text-align: center;
}

/* ==================== 新型建築區域 ==================== */
.new-building-section {
    padding: 100px 0;
    background: white;
}

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

.new-building-text h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 30px;
    line-height: 1.2;
}

.new-building-text h2 .highlight {
    color: var(--secondary-color);
}

.new-building-text p {
    font-size: 16px;
    margin-bottom: 20px;
    color: var(--text-light);
    line-height: 1.8;
}

.new-building-text .highlight-text {
    color: var(--secondary-color);
    font-weight: 600;
}

.section-label {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.new-building-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.new-building-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.image-label {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 15px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    backdrop-filter: blur(10px);
}

/* ==================== 三道防火牆預覽區域 ==================== */
.firewall-preview-section {
    padding: 100px 0;
    background: #f9fafb;
}

.firewall-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.firewall-card {
    background: white;
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    position: relative;
}

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

.firewall-number {
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 20px;
}

.firewall-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text);
}

.firewall-card p {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.firewall-card small {
    font-size: 13px;
    color: #9ca3af;
}

.firewall-conclusion {
    text-align: center;
    font-size: 18px;
    color: var(--text);
    padding: 30px;
    background: white;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.footer p {
    margin: 10px 0;
    opacity: 0.8;
}

/* ==================== 回到頂部按鈕 ==================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.back-to-top.show {
    display: flex;
}

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

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

    .hamburger {
        display: flex;
    }

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

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

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .section-header h2 {
        font-size: 32px;
    }

    .new-building-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .timeline-cards {
        grid-template-columns: 1fr;
    }

    .firewall-cards {
        grid-template-columns: 1fr;
    }

    .new-building-image img {
        height: 300px;
    }

    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 18px;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .navbar-container {
        height: 60px;
    }

    .logo-text {
        display: none;
    }

    .hero {
        margin-top: 60px;
        height: auto;
        min-height: 70vh;
        padding: 40px 20px;
    }

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

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

    .section-header h2 {
        font-size: 24px;
    }

    .timeline-section,
    .new-building-section,
    .firewall-preview-section {
        padding: 60px 0;
    }

    .new-building-text h2 {
        font-size: 28px;
    }
}
