﻿* {
    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.5s 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;
}

/* 產品分類區塊 */
.category {
    text-align: center;
    padding: 20px;
}

.category-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;
}

    .category-text p {
        font-size: 16px;
        margin-bottom: 16px;
    }

.category-card {
    display: inline-block;
    width: 25%;
    min-height: 400px;
    padding: 30px;
    background-color: #FFFFFF;
    margin: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: background-color 0.5s;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 1s;
    transform-style: preserve-3d;
}

.front-column, .back-column {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.category-card img {
    width: 100%;
    height: auto;
    margin-bottom: 15px;
    border-radius: 10px;
}

.category-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.category-card p {
    font-size: 16px;
}

.back-column {
    transform: rotateY(180deg);
}

    .back-column ul {
        list-style: none;
    }

    .back-column li {
        line-height: 2; /* 行高 */
        font-size: 16px;
    }

.category-card:hover {
    background-color: #F2F2F2;
}

    .category-card:hover .flip-card-inner {
        transform: rotateY(180deg);
    }

/*首頁內容*/
.hero {
    background: url('images/product/product01.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; /* 最終狀態，完全不透明 */
    }
}


/* 背景 */
.bg {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    z-index: -999;
}

    .bg img {
        min-width: 1000px;
        width: 100%;
        min-height: 100%;
        animation: kenburns-top 5s ease-out both;
    }

@keyframes kenburns-top {
    0% {
        -webkit-transform: scale(1) translateY(0);
        transform: scale(1) translateY(0);
        -webkit-transform-origin: 50% 16%;
        transform-origin: 50% 16%;
    }

    100% {
        -webkit-transform: scale(1.25) translateY(-15px);
        transform: scale(1.25) translateY(-15px);
        -webkit-transform-origin: top;
        transform-origin: top;
    }
}

/* 標題 */
.title-area {
    padding: 30px;
    backdrop-filter: blur(10px);
    margin: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

    .title-area h1 {
        font-size: 3em;
        text-shadow: 0 0 0.2em #3E3E40, 0 0 0.2em #3E3E40;
        margin-bottom: 20px;
        animation: fadeIn 4s forwards; /* 動畫名稱、時長、動作結束後保持最終狀態 */
        color: #F2F2EB;
    }

    .title-area p {
        font-size: 1.2em;
        margin-bottom: 30px;
        color: #BFBDB4;
    }

/* 靠下對齊版 */
.about {
    width: 90%;
    margin: auto;
    text-align: end;
    padding: 20px;
}

/* 三欄以上版 */
.about-container3 {
    display: inline-block;
    width: 25%;
    padding: 30px;
    /*    backdrop-filter: blur(10px);*/
    background-color: #F2F2F2;
    opacity: 0.7;
    margin: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    transition: ease 0.7s;
}

    .about-container3 h3 {
        font-size: 24px;
        margin-bottom: 16px;
    }

    .about-container3 p {
        font-size: 16px;
        margin-bottom: 16px;
    }

    .about-container3 ul {
        margin: 0 0 0 16px;
    }

    .about-container3 li {
        font-size: 16px;
    }

    .about-container3 img {
        width: 100%;
        height: auto;
        margin-bottom: 15px;
        border-radius: 10px;
    }

    .about-container3:hover {
        opacity: 1;
    }

/*網頁底端*/
footer {
    background-color: #0D0D0D;
    color: #F2F2EB;
    text-align: center;
    padding: 10px;
}

/* 回到最上層 */
.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; /* 鼠標懸停時調整圖片透明度 */
    }

/* 響應式設計: 當屏幕寬度小於 1250px 時 */
@media (max-width: 1250px) {
    .category-card, .about-container3 {
        width: 45%; /* 每個 category-card 在平板或較小屏幕上占用較多空間 */
    }

    .category-card {
        min-height: 450px;
    }
}

/* 小螢幕樣式 */
@media (max-width: 850px) {
    .hero h1, .title-area h1 {
        font-size: 2rem;
    }

    .category-container .category-card {
        width: 80%;
        align-items: flex-start;
        margin-bottom: 20px;
    }

    .left-column img {
        width: 100%;
        height: auto;
        margin-bottom: 15px;
        border-radius: 10px;
    }

    .services .service-card {
        width: 90%;
        margin-bottom: 20px;
    }

    .category-card {
        min-height: 480px;
    }

    .about-container3 {
        width: 90%;
        margin-bottom: 20px;
    }
}

/* 小螢幕調整 */
@media (max-width: 600px) {
    .category-card {
        min-height: 400px;
    }
}

/* 小螢幕調整 */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 28px;
    }

    .content-section h2 {
        font-size: 1.8em;
    }

    .category-container .category-card {
        width: 90%;
        flex-direction: column; /* 改為縱向排列，圖片在上，文字在下 */
        align-items: flex-start;
        margin-bottom: 20px;
    }

    .category-card {
        min-height: 280px;
    }

    .category-text {
        padding: 20px;
    }

    .back-column li {
        line-height: 1.5; /* 行高 */
        font-size: 14px;
    }

    .category-card h3 {
        font-size: 18px;
    }
}
