/* 深藍色主題配色 */
:root {
    --primary-dark: #0f172a;
    --secondary-dark: #1e293b;
    --accent-dark: #334155;
    --primary-blue: #3b82f6;
    --secondary-blue: #06b6d4;
    --accent-green: #10b981;
    --text-light: #e2e8f0;
    --text-muted: #94a3b8;
    --text-dark: #64748b;
}

body {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 50%, var(--accent-dark) 100%);
    background-attachment: fixed;
    color: var(--text-light);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'SF Pro Display', system-ui, sans-serif;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* Flow Hero - 重新設計，不影響文檔流 */
.flow-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px; /* 最小高度確保在小螢幕也能顯示 */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* 確保不影響後續布局 */
    margin: 0;
    padding: 0;
}

/* 視頻背景 - 限制在flow-hero容器內 */
.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.video-background video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    filter: blur(3px) brightness(0.7) saturate(1.2);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    z-index: 2;
}

/* Flow 大字體效果 */
.flow-text-container {
    position: relative;
    z-index: 10;
    text-align: center;
    width: 100%;
    max-width: 1200px;
    padding: 0 2rem;
}

.flow-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: clamp(6rem, 15vw, 12rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 50%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    position: relative;
    line-height: 0.9;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.1);
}

.flow-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.flow-title:hover::before {
    opacity: 1;
}

/* 導航欄 */
.navbar-dark {
    background: rgba(15, 23, 42, 0.1) !important;
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
    box-shadow: none;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.2rem;
    letter-spacing: 0.05em;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: white !important;
}

/* Hero 區塊（協會介紹）- 增加不透明度 */
.hero-section {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 20px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.hero-tagline {
    color: #f59e0b;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

/* 按鈕 - 保留光波效果 */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
    background: linear-gradient(135deg, #2563eb, #0891b2);
}

.btn-primary:hover::before {
    left: 100%;
}

/* 功能卡片 */
.feature-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: visible;
    height: 100%;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue), var(--accent-green));
}

.feature-card:hover {
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
}

.feature-icon {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.5rem;
    margin: 1rem auto 1.5rem;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.feature-title {
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 1rem;
}

.feature-text {
    color: var(--text-muted);
    line-height: 1.6;
}

/* 統計數據區塊 */
.stats-section {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.1);
    padding: 2rem;
    margin: 2rem 0;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
    display: block;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* 內容區塊 - 保留邊框發光 */
.content-section {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.content-section:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.1);
}

/* 圖片 - 移除hover抖動效果 */
.section-image {
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease; /* 只保留陰影過渡 */
}

.section-image:hover {
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.3);
    /* 移除 transform: translateY(-2px); 以消除抖動效果 */
}

.hero-section .section-image {
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
    margin-bottom: 2rem;
}

/* 頁尾樣式 */
.footer {
    margin-top: clamp(3rem, 6vw, 5rem);
    position: relative;
}

.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(59, 130, 246, 0.3) 20%, rgba(59, 130, 246, 0.5) 50%, rgba(59, 130, 246, 0.3) 80%, transparent 100%);
    margin: 0 clamp(1rem, 3vw, 3rem);
}

.footer-content {
    padding: clamp(2rem, 4vw, 3rem) clamp(1rem, 2vw, 2rem) clamp(1.5rem, 3vw, 2rem);
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(5px);
}

.footer-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(2rem, 4vw, 3rem);
    margin-bottom: clamp(2rem, 4vw, 2.5rem);
}

.footer-section h4 {
    color: #3b82f6;
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    font-weight: 600;
    margin-bottom: clamp(0.75rem, 1.5vw, 1rem);
    line-height: 1.2;
}

.footer-section p {
    color: #cbd5e1;
    font-size: clamp(0.875rem, 1.3vw, 0.95rem);
    line-height: 1.4;
    margin-bottom: clamp(0.5rem, 1vw, 0.75rem);
}

.footer-section p a {
    color: #e2e8f0;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-section p a:hover {
    color: #3b82f6;
}

.footer-bottom {
    text-align: center;
    padding-top: clamp(1.5rem, 3vw, 2rem);
    border-top: 1px solid rgba(59, 130, 246, 0.15);
}

.footer-bottom p {
    color: #94a3b8;
    font-size: clamp(0.8125rem, 1.2vw, 0.875rem);
    margin-bottom: clamp(0.25rem, 0.5vw, 0.5rem);
    line-height: 1.3;
}

.footer-brand {
    color: var(--primary-blue);
    font-weight: 600;
}

/* 聯絡方式圖示樣式 */
.contact-icon {
    vertical-align: middle;
    margin-right: 10px;
    font-size: 1.2em;
}

.fa-envelope {
    color: #ffc107;
}
.fa-globe {
    color: #4299e1;
}
.fa-line {
    color: #00B900;
}

/* 響應式調整 */
@media (max-width: 768px) {
    /* 手機版視頻背景 */
    .flow-hero {
        height: 100vh;
        min-height: 500px;
    }
    
    .video-background video {
        /* 手機版視頻優化 */
        min-width: 110%;
        min-height: 110%;
        filter: blur(2px) brightness(0.8) saturate(1.1);
    }
    
    /* 手機版TRIBE字體 */
    .flow-text-container {
        padding: 0 1rem;
    }
    
    .flow-title {
        font-size: clamp(4rem, 18vw, 8rem);
        /* 增強手機版可見性 */
        -webkit-text-stroke: 2px rgba(255, 255, 255, 0.2);
        text-shadow: 
            0 0 20px rgba(255, 255, 255, 0.3),
            0 0 40px rgba(59, 130, 246, 0.2),
            2px 2px 4px rgba(0, 0, 0, 0.3);
        background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #e2e8f0 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    .flow-title2 {
        font-size: clamp(1rem, 2.5vw, 2rem); /* 隨螢幕寬度縮放字體大小，設定最小1rem，最大2rem */
        /* white-space: nowrap; 防止文字換行 */
        overflow: hidden; /* 隱藏超出容器的部分 */
        text-overflow: ellipsis; /* 當文字溢出時顯示省略符號 */
        width: 100%; /* 確保佔滿寬度 */
        display: block; /* 確保應用 width 和 overflow */
    }
    
    .feature-icon {
        width: 3rem;
        height: 3rem;
        font-size: 1.2rem;
        margin: 1rem auto 1rem;
    }
    
    .feature-card {
        margin-bottom: 2rem;
    }

    .footer-row {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-section h4 {
        font-size: 1.2rem;
    }
    
    .footer-section p {
        font-size: 1rem;
    }
}

/* 技術展示區塊 */
.tech-showcase {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(16, 185, 129, 0.1));
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 2rem;
    margin: 2rem 0;
    transition: all 0.3s ease;
}

.tech-showcase:hover {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tech-item {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(59, 130, 246, 0.1);
    transition: all 0.3s ease;
}

.tech-item:hover {
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

.tech-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}
