/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 700px; /* 增加高度以展示大圖 */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-dark);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* 恢復地球大圖，並疊加深色遮罩以利文字閱讀 */
    background:
        linear-gradient(rgba(10, 22, 40, 0.2), rgba(10, 22, 40, 0.1)),
        url('../../images/banner.png') center center / cover no-repeat;
    /* 視差滾動效果將由 JS 控制 transform */
    will-change: transform;
}

#heroCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    opacity: 0.8; /* 提升粒子可見度 */
    pointer-events: none; /* 讓滑鼠事件穿透到背景 */
}

.hero-overlay {
    /* 移除原本的 overlay，改用 background linear-gradient 整合 */
    display: none;
}

.hero-content {
    position: relative;
    width: 100%;
    /* 移除 max-width 限制，改用 padding 控制兩側 */
    padding: 0 5%;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* 左對齊更有氣勢 */
    justify-content: center;
    height: 100%;
    color: #fff;
    text-align: left;
}

.hero-text {
    max-width: 800px; /* 文字區域寬度 */
    animation: slideInLeft 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-label {
    display: inline-block;
    font-size: 0.9rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    padding: 8px 20px;
    background: rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(8px);
    border-radius: 2px; /* 科技感方角 */
    margin-bottom: 32px;
    font-weight: 600;
    border-left: 3px solid var(--primary); /* 科技感邊框 */
    color: var(--primary-light);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.hero h1 {
    font-size: 4.5rem; /* 更大的標題 */
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 32px;
    letter-spacing: -1px;
    color: #ffffff;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.hero h1 span:first-child {
    background: none;
    -webkit-text-fill-color: #fff;
    color: #fff;
}

.hero h1 span:last-child {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
}

.hero-subtitle {
    font-size: 1.5rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 48px;
    font-weight: 300;
    max-width: 700px;
    margin-left: 0;
    margin-right: auto;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-cta {
    display: flex;
    gap: 24px;
    justify-content: flex-start;
}

.cta-button {
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 2px; /* 方角 */
    transition: all 0.3s ease;
    display: inline-block;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.cta-primary {
    background: var(--primary);
    color: white;
    border: 1px solid var(--primary);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.4);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.cta-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s;
    z-index: -1;
}

.cta-primary:hover::before {
    left: 100%;
}

.cta-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 50px rgba(59, 130, 246, 0.6);
}

/* Section Styles */
.section-title {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 16px;
    color: var(--text-title);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-muted);
    /* margin-bottom: 64px; */
    font-weight: 400;
}

/* Solution Section */
.solution-section {
    padding: 100px 0 0;
    background: #f4f7fb;
    position: relative;
    overflow: hidden;
}

.solution-header {
    /* padding: 0 5% 80px; */
    text-align: center;
    position: relative;
    z-index: 2;
    max-width: 1000px;
    margin: 0 auto;
}

/* 統一容器，讓內容置中 */
.solution-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.solution-panels {
    max-width: 1400px;
    margin: 0 auto;
    padding: 56px 5% 80px;
}

/* ── Tab Nav — Webflow underline style ── */
.solution-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 0;
}

.solution-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    background: none;
    color: var(--text-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition:
        color 0.2s ease,
        border-color 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
}

.solution-tab i {
    font-size: 0.9rem;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.solution-tab:hover {
    color: var(--primary);
}

.solution-tab:hover i {
    opacity: 0.8;
}

.solution-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.solution-tab.active i {
    opacity: 1;
}

/* ── Panels ── */

.solution-panel {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    animation: panelFadeIn 0.4s ease;
}

.solution-panel.active {
    display: grid;
}

@keyframes panelFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 圖片欄 — 固定高度，插圖置中 */
.solution-image-col {
    height: 380px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #e8f0fe 0%, #dbeafe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 60px rgba(59, 130, 246, 0.1);
    flex-shrink: 0;
}

.solution-image-col img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.solution-image-col:hover img {
    transform: scale(1.04);
}

/* 內容欄 */
.solution-content-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 8px;
}

/* Panel 專用文字（不污染其他區塊） */
.panel-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 20px;
}

.panel-label::before {
    content: '';
    width: 20px;
    height: 2px;
    background: var(--primary);
    flex-shrink: 0;
}

.panel-title {
    color: var(--text-title);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.panel-desc {
    color: var(--text-body);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 32px;
}

.panel-highlights {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.panel-highlights li {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-body);
    font-size: 0.95rem;
    font-weight: 500;
}

.panel-highlights li i {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-label {
    color: var(--primary-light);
    font-size: 0.85rem;
    letter-spacing: 3px;
    margin-bottom: 16px;
    text-transform: uppercase;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.feature-label::before {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary-light);
}

.feature-section-title {
    color: var(--text-title);
    font-size: 2.2rem;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.feature-section-desc {
    color: var(--text-body);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 32px;
}

.feature-highlights {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 16px;
}

.feature-highlights li {
    color: var(--text-body);
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.feature-highlights li i {
    color: var(--primary-light);
    font-size: 0.8rem;
    background: rgba(59, 130, 246, 0.12);
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Responsive */
@media (max-width: 1024px) {
    .solution-tab span {
        display: none;
    }

    .solution-tab {
        padding: 14px 18px;
    }

    .solution-tab i {
        font-size: 1.1rem;
    }

    .solution-panel {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .solution-image-col {
        border-radius: 8px;
    }

    .panel-title {
        font-size: 1.7rem;
    }
}

/* Feature/Light Section */
.section-dark {
    background: linear-gradient(135deg, #f0f4f8 0%, #e8eef4 100%);
    padding: 120px 5%;
    color: var(--text-title);
    position: relative;
}

.section-dark .section-title {
    color: var(--text-title);
}

.section-dark .section-subtitle {
    color: var(--text-body);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.feature-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 48px 32px;
    border-radius: 4px;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.feature-card:hover::before {
    transform: translateX(100%);
}

.feature-card:hover {
    background: rgba(59, 130, 246, 0.04);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.feature-card-main {
    background: rgba(59, 130, 246, 0.04);
    border-color: rgba(59, 130, 246, 0.2);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 32px;
    font-size: 2rem;
    color: var(--primary-light);
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
    transition: all 0.4s ease;
}

.feature-card:hover .feature-icon {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.4);
    transform: scale(1.1);
}

/* Digital Marketing Section */
.marketing-section {
    background: #ffffff;
    border-top: 4px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.marketing-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 100px 5%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.marketing-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease;
}

.marketing-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.marketing-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 20px;
}

.marketing-label::before {
    content: '';
    width: 20px;
    height: 2px;
    background: var(--primary);
}

.marketing-title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-title);
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.marketing-desc {
    font-size: 1.05rem;
    color: var(--text-body);
    line-height: 1.8;
    margin-bottom: 40px;
}

.marketing-cta-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    background: var(--primary);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 2px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 0 24px rgba(59, 130, 246, 0.4);
}

.marketing-cta-link i {
    transition: transform 0.3s ease;
}

.marketing-cta-link:hover {
    background: var(--primary-hover);
    box-shadow: 0 0 36px rgba(59, 130, 246, 0.6);
    transform: translateY(-2px);
}

.marketing-cta-link:hover i {
    transform: translateX(4px);
}

.marketing-right {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.marketing-service {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 32px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.marketing-service:first-child {
    padding-top: 0;
}

.marketing-service:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.marketing-service.revealed {
    opacity: 1;
    transform: translateX(0);
}

.marketing-service-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.3rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.marketing-service:hover .marketing-service-icon {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.marketing-service-body h3 {
    color: var(--text-title);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.marketing-service-body p {
    color: var(--text-body);
    font-size: 0.92rem;
    line-height: 1.7;
    margin: 0;
}

@media (max-width: 900px) {
    .marketing-inner {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .marketing-title {
        font-size: 2rem;
    }
}

/* Partners Marquee Section */
.partners {
    padding: 80px 0;
    background: var(--bg-page);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    text-align: center;
    overflow: hidden;
}

.partners .section-label {
    justify-content: center;
}

.partners .section-title {
    margin: 0 auto 0.5rem;
    text-align: center;
    max-width: 100%;
    color: var(--text-title);
}

.partners .section-desc {
    color: var(--text-body);
    font-size: 0.9rem;
    text-align: center;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-light);
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 16px;
    font-weight: 600;
}

.section-label::before,
.section-label::after {
    content: '';
    width: 30px;
    height: 1px;
    background: rgba(96, 165, 250, 0.3);
}

.partners .section-title em {
    font-style: normal;
    color: var(--primary-light);
}

.partners-marquee {
    margin: 60px auto 0;
    position: relative;
    width: 100%;
    max-width: 1400px;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
    display: flex;
    gap: 40px;
    padding: 8px 0;
    width: max-content;
    animation: marquee 40s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}

.partner-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 100px;
    color: var(--text-highlight);
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s ease;
    cursor: default;
}

.partner-chip:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.4);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.partner-chip .dot {
    width: 6px;
    height: 6px;
    background-color: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 3.5rem;
    }

    .solution-grid {
        grid-template-columns: 1fr;
    }

    .solution-card {
        height: auto;
        flex-direction: column;
    }

    .solution-image {
        width: 100%;
        height: 240px;
    }

    .solution-image::after {
        background: linear-gradient(180deg, rgba(241, 245, 249, 0) 0%, #f1f5f9 100%);
    }

    .solution-content {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-background {
        background:
            linear-gradient(rgba(10, 22, 40, 0.6), rgba(10, 22, 40, 0.4)),
            url('../../images/banner-mobile.png') center center / cover no-repeat;
    }
}

@media (max-width: 768px) {
    .partners {
        padding: 60px 20px;
    }
}

@media (max-width: 640px) {
    .hero {
        min-height: auto;
        padding: 140px 0 100px;
        height: auto;
    }

    .hero-content {
        padding: 0 20px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 12px;
    }

    .cta-button {
        width: 100%;
        text-align: center;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .partners-logos {
        gap: 40px;
    }
}
