

/* 四大主軸區塊樣式 */
.icons-section {
    background: url('../images/benq/index_5.png') center center no-repeat;
    background-size: cover;
    min-height: 150vh;
    position: relative;
    padding-top:60px ;
    margin-top: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.icons-header {
    margin-bottom: 60px;
}

.icons-title {
    font-size: 32px;
    font-weight: 300;
    color: #A78BFA;
    margin-bottom: 8px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.icons-subtitle {
    font-size: 16px;
    color: #A78BFA;
    font-weight: 400;
    letter-spacing: 2px;
}

.icons-table {
    border-collapse: collapse;
    border-spacing: 0;
    margin: 0 auto;
    table-layout: auto;
    border: 0;
    display: block;
    font-size: 0; /* 消除 inline-block 間隙 */
}

.icons-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    border: 0;
    margin: 0;
    padding: 0;
    gap: 0;
    line-height: 0;
    font-size: 0; /* 消除文字造成的間隙 */
}

.icon-cell {
    padding: 0;
    margin: 0;
    border: 0;
    position: relative;
    vertical-align: bottom;
    flex: 1;
    max-width: 50%;
    line-height: 0;
    font-size: 0; /* 消除文字造成的間隙 */
    align-self: flex-end; /* 強制底部對齊 */
}

/* 桌面版特定樣式 */
@media (min-width: 769px) {
    .icons-row {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: flex-end;
        max-width: 1100px;
        margin: 0 auto;
        gap: 0;
        line-height: 0;
        font-size: 0; /* 消除間隙 */
    }
    
    .icon-cell {
        flex: 0 0 50%;
        max-width: 50%;
        margin: 0;
        padding: 0;
        line-height: 0;
        font-size: 0; /* 消除間隙 */
        border: 0; /* 確保沒有邊框 */
        align-self: flex-end; /* 強制底部對齊 */
        vertical-align: bottom;
    }
    
    .icon-item {
        line-height: 0;
        font-size: 0; /* 消除間隙 */
        margin: 0;
        padding: 0;
        border: 0; /* 確保沒有邊框 */
    }
    
    .icon-item a {
        display: block;
        line-height: 0;
        font-size: 0; /* 消除間隙 */
        margin: 0;
        padding: 0;
        border: 0; /* 確保沒有邊框 */
    }
    
    .icon-item img {
        width: 550px;
        height: auto;
        max-width: none;
        max-height: none;
        display: block;
        margin: 0;
        padding: 0;
        border: 0; /* 確保沒有邊框 */
    }
}

/* 動畫定義 */
@keyframes slideInFromLeft {
    from {
        transform: translateX(-100vw);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100vw);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromTop {
    from {
        transform: translateY(-50vh);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInFromBottom {
    from {
        transform: translateY(100vh);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.icon-item {
    position: relative;
    overflow: hidden;
    display: block;
    opacity: 0;
    animation-duration: 1.5s;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation-fill-mode: forwards;
    animation-play-state: paused;
    line-height: 0;
    font-size: 0; /* 消除文字間隙 */
    margin: 0;
    padding: 0;
    border: 0;
}

/* 當元素進入視窗時啟動動畫 */
.icon-item.animate {
    animation-play-state: running;
}

/* 確保連結也沒有間隙 */
.icon-item a {
    display: block;
    line-height: 0;
    font-size: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

/* 四張圖片的不同動畫方向 */
.icon-cell:nth-child(1) .icon-item {
    animation-name: slideInFromLeft;
    animation-delay: 0.2s;
}

.icon-cell:nth-child(2) .icon-item {
    animation-name: slideInFromRight;
    animation-delay: 0.4s;
}

.icon-cell:nth-child(3) .icon-item {
    animation-name: slideInFromBottom;
    animation-delay: 0.6s;
}

.icon-cell:nth-child(4) .icon-item {
    animation-name: slideInFromTop;
    animation-delay: 0.8s;
}

.icon-item img {
    width: 550px;
    height: auto;
    max-width: none;
    max-height: none;
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    line-height: 0;
    font-size: 0; /* 消除任何文字間隙 */
}

.icon-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.icon-label {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.3s ease;
}

.label-text {
    font-size: 12px;
    color: #333;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 2px;
}

.label-arrow {
    font-size: 14px;
    color: #333;
    font-weight: bold;
}

.icon-item:hover .icon-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.icon-item:hover .icon-label {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 響應式設計 */
@media (max-width: 768px) {
    .icons-section {
        min-height: 100vh; /* 滿版高度 */
        padding: 200px 0 0 0; /* 移除上下 padding */
        display: flex;
        align-items: stretch; /* 讓內容撐滿整個高度 */
        /* border:1px solid blue; */
    }
    
    .icons-container {
        padding: 0; /* 移除所有 padding */
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center; /* 垂直置中 */
        height: 100vh; /* 滿版高度 */
    }
    
    .icons-title {
        font-size: 24px;
        letter-spacing: 2px;
    }
    
    .icons-subtitle {
        font-size: 14px;
    }
    
    /* 重新定義表格結構 - 改為垂直排列 */
    .icons-table {
        display: block;
        width: 100%;
        height: 100%; /* 占滿容器高度 */
        margin: 0;
    }
    
    .icons-row {
        display: flex !important; /* 強制使用flex */
        flex-direction: column !important; /* 強制垂直排列 */
        width: 100%;
        height: 100%; /* 占滿容器高度 */
        justify-content: space-between; /* 平均分配空間 */
        flex-wrap: nowrap !important; /* 強制禁止換行 */
    }
    
    .icon-cell {
        display: block !important; /* 強制block顯示 */
        width: 100% !important;
        flex: 1; /* 每個圖片平均分配高度 */
        margin: 0 !important; /* 移除邊距 */
        max-width: 100% !important; /* 移除桌面版限制 */
        min-width: 100% !important; /* 強制每個cell占滿寬度 */
        flex-basis: 25% !important; /* 每個圖片占25%高度 */
        text-align: center;
        position: relative;
        float: none !important; /* 禁止浮動 */
    }
    
    /* 調整圖片大小 - 滿版 */
    .icon-item {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        /* 手機版專用動畫設定 */
        animation-duration: 1s; /* 縮短動畫時間 */
        animation-timing-function: ease-out; /* 更自然的緩動效果 */
    }
    
    .icon-item img {
        width: 100%; /* 滿版寬度 */
        height: 100%; /* 滿版高度 */
        object-fit: cover; /* 保持比例並填滿 */
        max-width: none;
        max-height: none;
    }
    
    .icon-label {
        width: 60px;
        height: 60px;
    }
    
    .label-text {
        font-size: 10px;
    }
    
    .label-arrow {
        font-size: 12px;
    }
    
    .icons-header {
        display: none; /* 隱藏標題區域以節省空間 */
    }
    
    /* 手機版動畫重新設定 - 從上方依序滑入 */
    .icon-cell:nth-child(1) .icon-item,
    .icon-cell:nth-child(2) .icon-item,
    .icon-cell:nth-child(3) .icon-item,
    .icon-cell:nth-child(4) .icon-item {
        animation-name: slideInFromTop;
    }
    
    /* 調整動畫延遲時間 - 創造上到下的順序感 */
    .icon-cell:nth-child(1) .icon-item {
        animation-delay: 0.1s;
    }
    
    .icon-cell:nth-child(2) .icon-item {
        animation-delay: 0.3s;
    }
    
    .icon-cell:nth-child(3) .icon-item {
        animation-delay: 0.5s;
    }
    
    .icon-cell:nth-child(4) .icon-item {
        animation-delay: 0.7s;
    }
}

@media (max-width: 480px) {
    .icons-section {
        min-height: 100vh; /* 滿版高度 */
        padding: 200; /* 移除上下 padding */
        display: flex;
        align-items: stretch;
    }
    
    .icons-container {
        padding: 0; /* 移除所有 padding */
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: 100vh; /* 滿版高度 */
    }
    
    .icons-title {
        font-size: 20px;
    }
    
    .icons-subtitle {
        font-size: 12px;
    }
    
    /* 小螢幕的垂直排列設定 */
    .icons-table {
        display: block;
        width: 100%;
        height: 100%; /* 占滿容器高度 */
        margin: 0;
    }
    
    .icons-row {
        display: flex !important; /* 強制使用flex */
        flex-direction: column !important; /* 強制垂直排列 */
        width: 100%;
        height: 100%; /* 占滿容器高度 */
        justify-content: space-between;
        flex-wrap: nowrap !important; /* 強制禁止換行 */
    }
    
    .icon-cell {
        display: block !important; /* 強制block顯示 */
        width: 100% !important;
        flex: 1; /* 每個圖片平均分配高度 */
        margin: 0 !important; /* 移除邊距 */
        max-width: 100% !important;
        min-width: 100% !important; /* 強制每個cell占滿寬度 */
        flex-basis: 25% !important; /* 每個圖片占25%高度 */
        text-align: center;
        position: relative;
        float: none !important; /* 禁止浮動 */
    }
    
    /* 調整圖片大小 - 滿版 */
    .icon-item {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        /* 小螢幕專用動畫設定 */
        animation-duration: 0.8s; /* 更短的動畫時間 */
        animation-timing-function: ease-out;
    }
    
    .icon-item img {
        width: 100%; /* 滿版寬度 */
        height: 100%; /* 滿版高度 */
        object-fit: cover; /* 保持比例並填滿 */
        max-width: none;
        max-height: none;
    }
    
    .icon-label {
        width: 50px;
        height: 50px;
    }
    
    .label-text {
        font-size: 9px;
    }
    
    .label-arrow {
        font-size: 10px;
    }
    
    .icons-header {
        display: none; /* 隱藏標題區域 */
    }
    
    /* 小螢幕動畫設定 - 從上方依序滑入 */
    .icon-cell:nth-child(1) .icon-item,
    .icon-cell:nth-child(2) .icon-item,
    .icon-cell:nth-child(3) .icon-item,
    .icon-cell:nth-child(4) .icon-item {
        animation-name: slideInFromTop;
    }
    
    /* 更快的動畫延遲時間 */
    .icon-cell:nth-child(1) .icon-item {
        animation-delay: 0.1s;
    }
    
    .icon-cell:nth-child(2) .icon-item {
        animation-delay: 0.25s;
    }
    
    .icon-cell:nth-child(3) .icon-item {
        animation-delay: 0.4s;
    }
    
    .icon-cell:nth-child(4) .icon-item {
        animation-delay: 0.55s;
    }
}
