﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.5; /* 行高 */
    font-weight: bold; /* 設定字體粗細 */
    color: #3E3E40;
}

/* Styling the scrollbars */
::-webkit-scrollbar {
    width: 16px; /* Width of the vertical scrollbar */
    height: 16px; /* Height of the horizontal scrollbar */
}

::-webkit-scrollbar-track {
    background-color: #F2F2EB; /* Color of the track (background) */
}

::-webkit-scrollbar-thumb {
    background-color: #3E3E40; /* Color of the thumb (scrollable part) */
    border-radius: 8px; /* Rounded corners for the thumb */
}

    ::-webkit-scrollbar-thumb:hover {
        background-color: #BF9999; /* Color when hovering over the thumb */
    }

a {
    text-decoration: none; /* 去除默認的下劃線 */
    color: #3E3E40; /* 默認顏色 */
    position: relative;
}

    a:hover {
        transition: color 0.8s ease;
        color: #BF9999;
        animation: text-shadow-drop-center 0.6 forwards; /* 動畫名稱、時長、動作結束後保持最終狀態 */
    }

@keyframes text-shadow-drop-center {
    0% {
        text-shadow: 0 0 0 rgba(0, 0, 0, 0);
    }

    100% {
        text-shadow: 0 0 18px rgba(0, 0, 0, 0.35);
    }
}

/* 主內容區域 */
main {
    margin-top: 70px; /* 留出空間給固定的導航欄 */
}

/* 內容區域 */
.content-section {
    padding: 20px;
}

/* 影片播放 */
/*.hero {
    position: relative;
    padding: 80px 20px;
    color: #F2F2EB;
    text-align: center;
    overflow: hidden;*/ /* Ensure no content overflows outside the hero section */
/*}

#hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;*/ /* Ensures the video covers the entire area */
    /*z-index: -1;*/ /* Keeps the video in the background */
/*}*/


/* 圖片播放 */
.hero {
    background: url('images/solution/solution01.jpg') no-repeat center center/cover;
    padding: 80px 20px;
    color: #F2F2EB;
    text-align: center;
}

.hero-content h1 {
    font-size: 3em;
    text-shadow: 0 0 0.2em #3E3E40, 0 0 0.2em #3E3E40;
    margin-bottom: 20px;
    animation: fadeIn 4s forwards; /* 動畫名稱、時長、動作結束後保持最終狀態 */
}

/* 定義 fadeIn 動畫 */
@keyframes fadeIn {
    0% {
        opacity: 0; /* 初始狀態，完全透明 */
    }

    100% {
        opacity: 1; /* 最終狀態，完全不透明 */
    }
}

.hero-content p {
    font-size: 1.2em;
    margin-bottom: 30px;
}

/* 服務區塊 */
.services {
    text-align: center;
    padding: 20px;
}

    .services h2 {
        font-size: 36px;
        margin-bottom: 40px;
        background: linear-gradient(45deg,#0378A6, #0D0D0D); /* 設置漸層顏色 */
        background-clip: text; /* 讓漸層顏色顯示在文字內部 */
        -webkit-background-clip: text; /* 兼容舊版瀏覽器 */
        color: transparent; /* 設置文字顏色為透明，讓背景漸層顯示出來 */
    }

.services-text {
    max-width: 1200px;
    margin: 50px auto;
    text-align: left;
    line-height: 2; /* 行高 */
    padding: 30px;
    background-color: #F1F1F1;
    filter: opacity(90%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    font-weight: normal;
    position: relative;
    overflow: hidden;
    z-index: 1; /* 確保內容層在網格上方 */
}

/* 公用球樣式 */
.floating-ball {
  position: absolute;
  border-radius: 50%;
  opacity: 0.3;
  pointer-events: none;
  animation: moveRandom 12s infinite ease-in-out alternate;
  z-index: 0;
}

/* 三顆不同顏色的球 */
.red-ball {
  background: radial-gradient(circle, rgba(255, 0, 0, 0.4), transparent);
  width: 65px;
  height: 65px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.blue-ball {
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(0, 100, 255, 0.4), transparent);
  top: 50%;
  left: 80%;
  animation-delay: 4s;
}

.black-ball {
  width: 45px;
  height: 45px;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.4), transparent);
  top: 70%;
  left: 30%;
  animation-delay: 2s;
}

/* 隨機移動動畫 */
@keyframes moveRandom {
  0% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(20px, -15px);
  }
  50% {
    transform: translate(-30px, 20px);
  }
  75% {
    transform: translate(10px, -25px);
  }
  100% {
    transform: translate(-15px, 10px);
  }
}

    .services-text p {
        font-size: 16px;
        margin-bottom: 16px;
    }

    .services-text ul {
        margin: 0 0 16px 16px;
    }

    .services-text li {
        font-size: 16px;
    }

.services .service-card {
    display: inline-block;
    width: 25%;
    padding: 0 0 30px 0;
    margin: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: background-color 0.5s;
}

.services .service-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.services .service-card p {
    font-size: 16px;
}

.service-card img {
    width: 100%;
    height: auto;
    margin-bottom: 15px;
    border-radius: 3px;
}

.service-card:hover {
    background-color: #F2F2F2;
    
}

/* 分隔線 */
.line {
    position: relative;
    background: linear-gradient(to left,#F2F2F2,#1B2B40,hsl(197, 90%, 80%),#1B2B40,#F2F2F2);
    height: 1px;
    margin: 50px 0;
    overflow: visible;
}

/* 小球樣式 */
.circle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 0 6px rgba(226, 226, 226, 0.6));
}

.circle1 {
  width: 2vw;
  height: 2vw;
  top: -1.5vw;
  right: 20%;
  background: radial-gradient(circle, rgba(163, 163, 163, 0.8), rgba(0, 0, 0, 0.2));
  box-shadow: 0 0 12px rgba(204, 204, 204, 0.5);
  animation: floatA 6s ease-in-out infinite;
}

.circle2 {
  width: 5vw;
  height: 5vw;
  top: -1.5vw;
  right: 3%;
  background: radial-gradient(circle, rgba(113, 177, 236, 0.7), rgba(255, 255, 255, 0));
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
  animation: floatB 8s ease-in-out infinite;
}

/* 飄動軌跡 A（較柔和，左右晃動多） */
@keyframes floatA {
  0%   { transform: translate(0px, 0px); opacity: 1;}
  25%  { transform: translate(5px, -3px); }
  50%  { transform: translate(0px, -1px); opacity: 0.4;}
  75%  { transform: translate(-5px, 2px); }
  100% { transform: translate(0, 0); opacity: 1;}
}

/* 飄動軌跡 B（較垂直，上下浮動明顯） */
@keyframes floatB {
  0%   { transform: translate(0, 0);}
  20%  { transform: translate(2px, -6px); }
  40%  { transform: translate(-2px, -3px);}
  60%  { transform: translate(2px, 4px); }
  80%  { transform: translate(-2px, 3px); }
  100% { transform: translate(0, 0);}
}

/* 跳轉預留空間 */
#no1, #no2, #no3, #no4, #no5, #no6, #no7 {
    scroll-margin-top: 100px; /* 視窗往下偏移一點，避免被 header 擋住 */
}

/* 中間廣告特效 */
.solution-container-center {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  background: linear-gradient(135deg, #0D0D0D, #1B2B40);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  margin-bottom: 50px;
  padding: 0 5%;
  flex-wrap: wrap;
}

/* 發光球體 */
.glow-ball {
  position: absolute;
  border-radius: 50%;
  opacity: 0.3;
  animation: float 6s ease-in-out infinite alternate;
  pointer-events: none;
}

.glow-ball.red {
  width: 12rem;
  height: 12rem;
  top: 20%;
  left: 10%;
  background: radial-gradient(circle, rgba(255, 0, 102, 0.733), transparent);
}

.glow-ball.blue {
  width: 8rem;
  height: 8rem;
  bottom: 10%;
  right: 15%;
  background: radial-gradient(circle, rgba(92, 177, 201, 0.712), transparent);
}

.glow-ball.blue2 {
  width: 4rem;
  height: 4rem;
  bottom: 5%;
  left: 45%;
  background: radial-gradient(circle, rgba(92, 177, 201, 0.712), transparent);
}

@keyframes float {
  0%   { transform: translateY(0px); }
  100% { transform: translateY(-40px); }
}

/* 中央文字進場動畫 */
.hero-text {
  width: 30%;
  position: relative;
  z-index: 2;
  text-align: right;
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s ease-out;
}

.hero-text.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* 商品圖片從左側滑入 */
.product-image {
  width: 40%;
  opacity: 0;
  transform: translateX(-50px);
  transition: all 1s ease-out;
  z-index: 2;
  object-fit: cover; /* ✅ 裁切而非壓縮變形 */
  height: auto; /* 確保寬度控制比例 */
  margin-top: 20px;
}

.product-image.in-view {
  opacity: 1;
  transform: translateX(0);
}

/* 背景流動光感 */
.bg-overlay {
  position: absolute;
  width: 200%;
  height: 100%;
  top: 0;
  left: -50%;
  background: repeating-linear-gradient(
    120deg,
    rgba(0, 255, 255, 0.03) 0px,
    rgba(0, 255, 255, 0.03) 1px,
    transparent 1px,
    transparent 20px
  );
  animation: slideLight 20s linear infinite;
  z-index: 0;
}

@keyframes slideLight {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(50%);
  }
}


/* 解決方案左父框 */
.solution-container-left {
    position: relative;
    overflow: visible; /* 允許超出 */
    display: flex;
    padding: 100px 0px 100px 0px;
}

/* 解決方案靠左區塊 */
.solution-text {
    grid-area: solution-text;
    width: 70%;
    line-height: 2;  /* 行高 */
    background-color: #BFBDB4;
    filter: opacity(90%);
    border-radius: 5px; /* 圓角邊框 */
    padding: 80px;
}
    .solution-text p {
        display:inline-block;
    }

    .solution-text p {
        text-indent: 32px; /* 退二個字 */
        font-size: 16px;
        margin: 16px 0 16px 0;
    }

    .solution-text ul {
        margin: 16px 0 16px 16px;
    }

    .solution-text li {
        font-size: 16px;
    }

.solution-title {
    grid-area: solution-title;
    position: relative;
    font-size: 2.5rem;
    line-height: 1.5; /* 行高 */
    color: #0D0D0D;
    margin-top: -120px;
    margin-right: 100px;
    margin-left: 100px;
}

.solution-text div {
    margin-right: 10%;
    margin-left: 10%;
}

.solution-movie {
    grid-area: solution-movie;
    position: relative;
    max-width: 500px; /* 設置影片最大寬度 */
    margin-top: -5%;
    margin-left: -5%;
}

    .solution-movie img {
        width: 100%;
        max-width: 500px;
        height: auto;
        max-height: 500px;
        margin: auto;
        border-radius: 3px; /* 圓角邊框 */
    }

/* 影片元素 */
.video-player {
    display: block; /* 取消影片的默認內間距 */
    width: 100%; /* 設置影片寬度自適應容器 */
    height: auto; /* 確保影片比例不會失真 */
    max-height: 500px;
    border-radius: 3px; /* 圓角邊框 */
}

/* 解決方案右父框 */
.solution-container-right {
    position: relative;
    overflow: visible; /* 允許超出 */
    display: flex;
    padding: 100px 0px 100px 0px;
}

/* 解決方案靠右區塊 */
.solution-describe {
    grid-area: solution-describe;
    margin-left: 30%;
    background-color: #F2F2F2;
    line-height: 2; /* 行高 */
    filter: opacity(90%);
    border-radius: 5px; /* 圓角邊框 */
    padding: 80px;
    width: 70%;
}
    .solution-describe p {
        text-indent: 32px; /* 退二個字 */
        font-size: 16px;
        margin: 16px 0 16px 0;
    }
    .solution-describe ul {
        margin: 16px 0 16px 16px;
    }

    .solution-describe li {
        font-size: 16px;
    }

    .solution-describe div {
        margin-right: 10%;
        margin-left: 10%;
    }

.solution-img {
    grid-area: solution-img;
    position: relative;
    margin-top: -5%;
    margin-left: -90%;
}
    .solution-img img {
        width: 100%;
        max-width: 500px;
        height: auto;
        max-height: 500px;
        border-radius: 3px; /* 圓角邊框 */
    }

.goback {
    text-align: center;
    padding-bottom: 20px;
}

/* 回到最上層 */
.scroll-to-top {
    position: fixed;
    opacity: 0.6;
    bottom: 20px;
    right: 20px;
    display: none; /* 初始隱藏 */
    z-index: 1000; /* 確保按鈕在其他元素上方 */
    transition: opacity 0.3s ease-in-out; /* 讓按鈕出現和消失更平滑 */
}

    .scroll-to-top:hover {
        opacity: 0.7; /* 鼠標懸停時調整圖片透明度 */
    }

    /* 小螢幕樣式 */
    @media (max-width: 1650px) {
        .solution-describe div {
            margin-left: 20%;
        }
    }

    /* 小螢幕樣式 */
    @media (max-width: 1400px) {
        .solution-text div, .solution-title {
            margin-left: 0;
        }
        .solution-describe div {
            margin-right: 0;
            margin-left: 30%;
        }
    }

        /* 小螢幕樣式 */
    @media (max-width: 1200px) {
        .solution-describe div {
            margin-left: 50%;
        }
    }

    /* 小螢幕樣式 */
    @media (max-width: 960px) {
        .solution-title {
            font-size: 2rem;
        }

        .solution-container-left {
            display: grid;
            grid-template-areas: "solution-title"
                "solution-movie"
                "solution-text";
            grid-template-columns: 1fr;
            grid-template-rows: auto;
        }

        .solution-container-right {
            display: grid;
            grid-template-areas: "solution-img"
                "solution-describe";
            grid-template-columns: 1fr;
            grid-template-rows: auto;
        }

        .solution-title, .solution-text div, .solution-describe div, .solution-container-left, .solution-container-right {
            margin: 0;
        }

        .solution-title, .solution-movie, .solution-text, .solution-describe, .solution-img {
            top: 0;
            left: 0;
            position: static;
            width: 90%;
            margin: auto;
            padding: 10px;
        }

        .solution-title {
            font-size: 1.5rem;
        }

        .solution-movie {
            background-color: #3E3E40;
        }

        .solution-img {
            background-color: #F2F2F2;
        }

        .solution-container-left, .solution-container-right {
            padding: 0px;
        }

        .solution-describe {
            margin-bottom: 20px;
        }

        .services .service-card {
            width: 45%;
        }
    }

    /* 小螢幕樣式 */
    @media (max-width: 768px) {
        .hero h1 {
            font-size: 2rem;
        }

        .services .service-card {
            width: 90%;
            margin-bottom: 20px;
        }
        
        /* 中間商品廣告 */
        .solution-container-center {
            flex-direction: column;
            height: auto;
            padding: 30px 20px;
        }

        .hero-text, .product-image {
            width: 100%;
            text-align: center;
            opacity: 1;
            transform: none;
        }

        .product-image {
            margin-top: 20px;
        }
    }

    /* 小螢幕調整 */
    @media (max-width: 480px) {
        .hero h1 {
            font-size: 28px;
        }

        .hero p {
            font-size: 20px;
        }

        .content-section h2 {
            font-size: 1.8em;
        }

        .solution-describe {
            margin-bottom: 50px;
        }

        .services-text {
        padding: 20px;
        }
    }
