/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    line-height: 1.6;
    color: #374151;
    overflow-x: hidden;
}

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

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader {
    text-align: center;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.15);
}

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

.nav-logo h2 {
    color: #1e3a8a;
    font-weight: 700;
    font-size: 1.5rem;
}

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

.nav-link {
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #1e3a8a;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #f97316;
    transition: width 0.3s ease;
}

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

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

.bar {
    width: 25px;
    height: 3px;
    background: #374151;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
/*    align-items: center;*/
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #f97316 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: #f97316;
    color: white;
    border-color: #f97316;
}

.btn-primary:hover {
    background: transparent;
    border-color: #f97316;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(249, 115, 22, 0.4);
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background: white;
    color: #1e3a8a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    cursor: pointer;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* Section Styles */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

/* Services Section */
.services {
    background: #f8fafc;
}

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

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
}

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

.service-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    position: relative;
    cursor: pointer;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.service-card:hover .service-image img {
    transform: scale(1.05);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 1rem;
}

.service-description {
    color: #6b7280;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.service-card p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.service-features {
    list-style: none;
    text-align: left;
}

.service-features li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #f97316;
    font-weight: bold;
}

/* Features Section */
.features {
    background: white;
}

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

.features-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 2rem;
}

.feature-item {
    margin-bottom: 2rem;
}

.feature-item h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #f97316;
    margin-bottom: 0.5rem;
}

.feature-item p {
    line-height: 1.7;
}

/* 功能圖標樣式 */
.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.features-image {
    position: relative;
}

.feature-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Portfolio Section */
.portfolio {
    background: #f8fafc;
}

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

.portfolio-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.portfolio-image {
    position: relative;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 15px 15px 0 0;
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

/* Video Container 響應式樣式 */
.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 比例 */
    border-radius: 10px;
    overflow: hidden;
    background: #f0f0f0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 2rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    pointer-events: none;
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
}

.portfolio-overlay h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* 影片資訊區塊 - 直接顯示在影片下方 */
.video-info {
    background: white;
    padding: 1.5rem;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: -5px;
}

.video-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.video-info p {
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

/* 案例資訊樣式 */
.case-info {
    background: white;
    padding: 1.5rem;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: -5px;
}

.case-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.case-info p {
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

/* 服務資訊樣式 - 用於首頁活動系統服務區塊 */
.service-info {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 2rem 1.5rem 1.5rem;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: -5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #f97316);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-info:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.service-info:hover::before {
    transform: scaleX(1);
}

.service-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 1.2rem 1rem 1.2rem 1rem;
}
.service-body h3 {
    margin-bottom: 0.7rem;
}
.service-body p {
    margin-bottom: 0.8rem;
}
.service-features {
    margin-top: auto;
}

.service-info h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 1rem;
    line-height: 1.3;
    position: relative;
}

.service-info h3::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #f97316);
    border-radius: 1px;
}

.service-info p {
    color: #6b7280;
    line-height: 1.7;
    margin: 0;
    font-size: 0.95rem;
    position: relative;
    padding-left: 1rem;
}

.service-info p::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #3b82f6;
    font-weight: bold;
}

/* 服務特色標籤 */
.service-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.feature-tag {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.feature-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

/* 案例元資訊 */
.case-meta {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.case-year, .case-type {
    background: #f3f4f6;
    color: #6b7280;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 案例統計 */
.case-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.case-stats .stat-item {
    text-align: center;
}

.case-stats .stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #3b82f6;
    line-height: 1;
}

.case-stats .stat-label {
    display: block;
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

/* 案例控制區塊 */
.case-controls {
    background: white;
    padding: 2rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.case-search {
    position: relative;
    margin-bottom: 1.5rem;
}

.case-search input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.case-search input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.case-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.case-categories .category-btn {
    padding: 8px 16px;
    border: 2px solid #e5e7eb;
    background: white;
    color: #6b7280;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.case-categories .category-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.case-categories .category-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.case-stats-display {
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
}

/* 調整影片容器樣式 */
.portfolio-item .video-container {
    border-radius: 15px 15px 0 0;
    overflow: hidden;
}

/* 影片控制區塊 */
.video-controls {
    margin-bottom: 3rem;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 搜尋功能 */
.video-search {
    position: relative;
    margin-bottom: 1.5rem;
}

.video-search input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.video-search input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1.2rem;
}

/* 熱門關鍵字標籤 */
.hot-keywords {
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.keyword-label {
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
    margin-right: 0.5rem;
}

.keyword-tag {
    padding: 8px 16px;
    border: 2px solid #e5e7eb;
    background: white;
    color: #6b7280;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.keyword-tag:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.keyword-tag.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

/* 分類按鈕 */
.video-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.category-btn {
    padding: 8px 16px;
    border: 2px solid #e5e7eb;
    background: white;
    color: #6b7280;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.category-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

/* 影片統計 */
.video-stats {
    text-align: right;
    color: #6b7280;
    font-size: 0.9rem;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .video-controls {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .hot-keywords {
        justify-content: center;
        gap: 0.4rem;
    }
    
    .keyword-tag {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .video-categories {
        justify-content: center;
    }
    
    .category-btn {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .video-stats {
        text-align: center;
        margin-top: 1rem;
    }

    /* 案例控制區塊響應式 */
    .case-controls {
        padding: 1.5rem 0;
    }

    .case-stats {
        gap: 2rem;
        margin-top: 1.5rem;
    }

    .case-stats .stat-number {
        font-size: 2rem;
    }

    .case-stats .stat-label {
        font-size: 0.8rem;
    }

    .case-categories {
        gap: 0.3rem;
    }

    .case-categories .category-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .video-controls {
        padding: 1rem;
    }
    
    .video-search input {
        padding: 10px 40px 10px 12px;
        font-size: 0.9rem;
    }
    
    .hot-keywords {
        gap: 0.3rem;
    }
    
    .keyword-tag {
        font-size: 0.75rem;
        padding: 5px 10px;
    }
    
    .video-categories {
        gap: 0.3rem;
    }
    
    .category-btn {
        font-size: 0.75rem;
        padding: 5px 10px;
    }
}

/* About Section */
.about {
    background: white;
}

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

.about-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.about-text ul {
    padding-left: 2rem;
    padding-right: 1rem;
    margin-bottom: 1.5rem;
}

.about-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

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

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #f97316;
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: #6b7280;
    font-weight: 500;
}

.about-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Contact Section */
.contact {
    background: #f8fafc;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1e3a8a;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-item i {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-item h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: #6b7280;
}

/* Footer */
.footer {
    background: #1e3a8a;
    color: white;
    padding: 0rem 0 0rem;
}

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #f97316;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #f97316;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1rem;
    text-align: center;
    color: #9ca3af;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #f97316;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.back-to-top:hover {
    background: #ea580c;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

/* Line@ 懸浮球，與 back-to-top 風格一致，並往上排列 */
.line-float {
    position: fixed;
    right: 30px;
    bottom: 95px; /* 比 back-to-top 再高 65px，兩者不重疊 */
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #00c300;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transition: box-shadow 0.2s, background 0.2s;
}
.line-float:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    background: #00b900;
}
.line-float img {
    width: 32px;
    height: 32px;
    display: block;
}
@media (max-width: 480px) {
    .back-to-top {
        right: 16px;
        bottom: 20px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    .line-float {
        right: 16px;
        bottom: 70px;
        width: 40px;
        height: 40px;
    }
    .line-float img {
        width: 24px;
        height: 24px;
    }
}


/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex !important;
        flex-direction: column;
        cursor: pointer;
        z-index: 1000;
        position: relative;
    }

    .service-info {
        padding: 1.8rem 1.5rem 1.5rem;
    }

    .service-info h3 {
        font-size: 1.2rem;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        margin-bottom: 2rem;
    }

    .service-image {
        height: 200px;
    }

    .features-content,
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }

    .video-container {
        height: 200px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

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

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .service-card,
    .portfolio-item {
        margin-bottom: 1.5rem;
    }

    .service-image {
        height: 180px;
    }

    .portfolio-image img {
        height: 200px;
    }

    .service-info {
        padding: 1.5rem 1rem 1rem;
    }

    .service-info h3 {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }

    .service-info h3::after {
        width: 25px;
        bottom: -0.4rem;
    }

    .service-info p {
        font-size: 0.9rem;
        padding-left: 0.8rem;
    }

    .service-features {
        margin-top: 0.8rem;
        gap: 0.4rem;
    }

    .feature-tag {
        font-size: 0.7rem;
        padding: 0.25rem 0.6rem;
    }

    .feature-icon {
        font-size: 2rem;
        margin-bottom: 0.8rem;
    }

    .about-stats {
        gap: 1rem;
    }

    .stat-item h3 {
        font-size: 2rem;
    }

    .video-container {
        height: 180px;
    }

    .video-container iframe {
        height: 180px;
    }
}

/* 大螢幕優化 */
@media (min-width: 1200px) {
    .portfolio-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2.5rem;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 480px) and (max-width: 767px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

#cases .portfolio-overlay {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    pointer-events: auto !important;
    background: #fff !important;
    color: #1e3a8a !important;
    padding: 1.5rem !important;
    border-radius: 0 0 15px 15px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    min-height: unset !important;
    margin-top: -5px !important;
    z-index: 1;
    width: 100%;
}
#cases .portfolio-overlay h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}
#cases .portfolio-overlay p {
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

/* 聯絡我們區塊優化 */
.contact {
    background: linear-gradient(135deg, #f8fafc 60%, #e0e7ff 100%);
    padding: 80px 0 60px 0;
}
.contact .container {
    max-width: 700px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(30,58,138,0.10);
    padding: 2.5rem 2rem 2rem 2rem;
}
.contact-content {
    display: flex;
    justify-content: center;
}
/* 聯絡我們進階排版優化 */
.contact-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
    margin-top: 2.5rem;
}
.contact-item {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 16px rgba(30,58,138,0.08);
    padding: 2rem 1.2rem 1.5rem 1.2rem;
    border: none;
    min-height: 220px;
    transition: box-shadow 0.2s;
    text-align: center;
}
.contact-item:hover {
    box-shadow: 0 8px 32px rgba(30,58,138,0.13);
}
.contact-item i {
    margin-bottom: 1.2rem;
    font-size: 2.2rem;
    width: 60px;
    height: 60px;
}
.contact-item h3 {
    margin-bottom: 0.5rem;
}
@media (max-width: 900px) {
    .contact-info {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .contact-item {
        min-height: 0;
        padding: 1.5rem 0.8rem 1.2rem 0.8rem;
    }
}
.contact-item a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s;
    word-break: break-all;
}
.contact-item a:hover {
    color: #f97316;
    text-decoration: underline;
}
@media (max-width: 768px) {
    .contact .container {
        padding: 1.5rem 0.5rem;
    }
    .contact-content {
        flex-direction: column;
        gap: 2rem;
    }
    .contact-info {
        gap: 1.5rem;
    }
    .contact-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
        padding: 1rem 0;
    }
    .contact-item i {
        margin-bottom: 0.2rem;
        font-size: 1.5rem;
        width: 44px;
        height: 44px;
    }
}
@media (max-width: 600px) {
  .contact-info {
    gap: 0.7rem;
    margin-top: 0.8rem;
  }
  .contact-item {
    padding: 0.7rem 0.4rem 0.7rem 0.4rem;
    min-height: 0;
    border-radius: 18px;
    background: rgba(255,255,255,0.92);
    box-shadow: 0 2px 8px rgba(30,58,138,0.06);
  }
  .contact-item i {
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
  }
  .contact-item h3 {
    font-size: 1rem;
    margin-bottom: 0.1rem;
    font-weight: 800;
    color: #1e293b;
  }
  .contact-item p {
    font-size: 0.91rem;
    line-height: 1.45;
    color: #64748b;
  }
  .contact-item a {
    font-size: 0.91rem;
    color: #2563eb;
    word-break: break-all;
  }
}

/* 聯絡我們左右分欄（桌機版） */
@media (min-width: 601px) {
  .contact-info {
    gap: 1.2rem;
    margin-top: 2.2rem;
  }
  .contact-item {
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
    min-height: 90px;
    padding: 1.2rem 1.5rem;
  }
  .contact-item i {
    margin-bottom: 0;
    margin-right: 1.1rem;
    width: 38px;
    height: 38px;
    font-size: 1.3rem;
  }
  .contact-item h3 {
    margin-bottom: 0;
    font-size: 1.08rem;
    font-weight: 700;
    color: #1e293b;
    display: inline-block;
  }
  .contact-item .contact-label {
    display: flex;
    align-items: center;
    min-width: 110px;
    max-width: 140px;
    flex-shrink: 0;
    gap: 0.5rem;
  }
  .contact-item .contact-content {
    flex: 1;
    min-width: 0;
    word-break: break-all;
    color: #2563eb;
    font-size: 1rem;
    padding-left: 0.5rem;
    display: flex;
    align-items: center;
  }
}

#cases .portfolio-item {
    display: flex;
    flex-direction: column;
    height: 100%;
}
#cases .case-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}
#cases .case-info {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 1.2rem 1rem 1.2rem 1rem;
}
#cases .case-info .case-tags {
    margin-top: auto;
}

.contact-simple {
  background: #f8fafc;
  padding: 48px 0 32px 0;
}
.contact-simple .container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 1rem;
}
.contact-simple .section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 1.5rem;
  text-align: center;
}
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.contact-list li {
  font-size: 1.08rem;
  color: #374151;
  margin-bottom: 1.2rem;
  line-height: 1.7;
}
.contact-list strong {
  color: #1e3a8a;
  font-weight: 700;
}
.contact-list a {
  color: #2563eb;
  text-decoration: none;
  word-break: break-all;
}
.contact-list a:hover {
  text-decoration: underline;
  color: #f97316;
}

#games .portfolio-overlay {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    pointer-events: auto !important;
    background: #fff !important;
    color: #1e3a8a !important;
    padding: 1.5rem !important;
    border-radius: 0 0 15px 15px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    min-height: unset !important;
    margin-top: -5px !important;
    z-index: 1;
    width: 100%;
}
#games .portfolio-overlay h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}
#games .portfolio-overlay p {
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

#videos .video-info {
    background: #fff !important;
    padding: 1.5rem !important;
    border-radius: 0 0 15px 15px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    margin-top: -5px !important;
    color: #1e3a8a !important;
    width: 100%;
}
#videos .video-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}
#videos .video-info p {
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

#videos .portfolio-item {
    display: flex;
    flex-direction: column;
    height: 100%;
}
#videos .video-container {
    flex-shrink: 0;
    aspect-ratio: 16/9;
    min-height: 180px;
    background: #000;
    border-radius: 15px 15px 0 0;
    overflow: hidden;
}
#videos .video-info {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    margin-top: auto;
}

.video-hint {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(30,58,138,0.85);
  color: #fff;
  font-size: 1.08rem;
  font-weight: 700;
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  pointer-events: none;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(30,58,138,0.10);
  white-space: nowrap;
  transition: opacity 0.2s;
  opacity: 0;
  letter-spacing: 1px;
}
.service-image:hover .video-hint,
.service-card:hover .video-hint {
  display: block;
  opacity: 1;
  pointer-events: auto;
}
.video-hint:hover {
  background: #f97316;
  color: #fff;
}

@media (max-width: 768px) {
  .video-hint {
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
}

@media (min-width: 1024px) {
  .hero-content {
/*    padding-top: 120px !important;*/
  }
  .portfolio-image,
  .img-square-wrap {
    aspect-ratio: 16 / 9;
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    overflow: hidden;
  }
  .portfolio-image img,
  .img-square-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
}

.hero-title {
  /* top:200px; 這行移除 */
}
