﻿* {
    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;
}

.hero {
    background: url('images/about/about01.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;
}

.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;
    }

/* 服務區塊 */
.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;
}

.services-text p {
    font-size: 16px;
    margin-bottom: 16px;
}

.services .service-card {
    display: inline-block;
    width: 25%;
    padding: 30px;
    background-color: #FFFFFF;
    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: 10px;
}

.service-card:hover {
    background-color: #F2F2F2;
}

/* 認證證書區塊 */

.certification-section {
      display: flex;
      flex-wrap: wrap;
      gap: 1rem;
      justify-content: center;
      text-align: center;
      width: 100%;
      margin: auto;
}

    .certification-card {
      flex: 1 1 calc(25% - 1rem);
      background: white;
      border-radius: 8px;
      padding: 1rem;
      max-width: 400px;
    }

/* 背景 */
.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.1) translateY(-15px);
        transform: scale(1.1) translateY(-15px);
        -webkit-transform-origin: top;
        transform-origin: top;
    }
}

/* 中間版 */
.center-type {
    display: flex;
    position: relative;
}

.title-container {
    position: relative;
    width: 50px;
    height: 490px;
    top: 150px;
    left: 10%;
    background-color: #BF9999;
    filter: opacity(90%);
    border-radius: 8px;
    z-index: 3;
}
    .title-container h2 {
        font-size: 32px;
        color: #F2F2EB;
        margin: 24px;
        text-shadow: 0 0 0.2em #3E3E40, 0 0 0.2em #3E3E40;
        animation: puff-in-center 2s forwards; /* 動畫名稱、時長、動作結束後保持最終狀態 */
        writing-mode: vertical-rl; /* 設定文字垂直顯示，從右到左 */
    }

@keyframes puff-in-center {
    0% {
        -webkit-transform: scale(2);
        transform: scale(2);
        -webkit-filter: blur(4px);
        filter: blur(4px);
        opacity: 0;
    }

    100% {
        -webkit-transform: scale(1);
        transform: scale(1);
        -webkit-filter: blur(0px);
        filter: blur(0px);
        opacity: 1;
    }
}

/* 介紹內容中間整頁 */
.about-center {
    width: 70%;
    background-color: #FFFFFF;
    opacity: 0.8;
    /*    backdrop-filter: invert(80%);*/
    line-height: 2; /* 行高 */
    text-align: left;
    margin: auto;
    padding: 32px 32px 32px 64px;
}

.about-container {
    display: grid;
    width: 100%;
    height: 100%;
    grid-template-areas: "about-text about-img";
    grid-template-columns: 1fr 1fr;
    margin-bottom: 20px;
}

.about-container-reverse {
    display: grid;
    width: 100%;
    height: 100%;
    grid-template-areas: "about-img about-text";
    grid-template-columns: 1fr 1fr;
    margin-bottom: 20px;
}

.about-text {
    grid-area: about-text;
    padding: 8px;
}

    .about-text h2 {
        font-size: 32px;
    }

    .about-text ul {
        margin: 0 0 32px 16px;
    }

    .about-text li {
        font-size: 16px;
    }

    .about-text p {
        text-indent: 32px; /* 退二個字 */
        font-size: 16px;
        margin-bottom: 16px;
    }

.about-img {
    grid-area: about-img;
    margin: auto;
    max-width: 500px;
}

    .about-img:hover {
        animation: blink-2 0.9s ease; /* 動畫名稱、時長、動作結束後保持最終狀態 */
    }

/* 定義 blink-2 動畫 */
@keyframes blink-2 {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.2;
    }

    100% {
        opacity: 1;
    }
}

    .about-center h2 {
        font-size: 32px;
    }

    .about-center ul {
        margin: 0 0 0 16px;
    }

    .about-center li {
        font-size: 16px;
    }

    .about-center p {
        text-indent: 32px; /* 退二個字 */
        font-size: 16px;
        margin: 16px 0 16px 0;
    }

    .about-center img {
        width: 100%;
        height: auto;
        margin: auto;
        border-radius: 5px; /* 圓角邊框 */
    }

.chart {
    background-color: #F2F2F2;
    backdrop-filter: blur(5px);
    width: 70%;
    margin: auto;
    padding: 50px;
    border-radius: 5px;
}

/* 靠下對齊版 */
.about {
    width: 90%;
    margin: auto;
    text-align: end;
    padding: 20px;
}

/* 兩欄版 */
.about-container2 {
    display: inline-block;
    width: 33%;
    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-container2 h3 {
        font-size: 24px;
        margin-bottom: 16px;
    }

    .about-container2 p {
        font-size: 16px;
    }

    .about-container2 img {
        width: 100%;
        height: auto;
        margin-bottom: 15px;
        border-radius: 10px;
    }

    .about-container2:hover {
        opacity: 1;
    }

/* E-mail */
.formcontainer {
    background: white;
    max-width: 500px;
    margin: auto;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.form-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

    /* .form-group label {
        width: 100px;
        font-weight: bold;
        text-align: right;
        margin-right: 10px;
    } */

.required::after {
    content: " *";
    color: red;
}

.form-group input, .form-group textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

input[type="submit"] {
    background: #A7C4C2;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    padding: 10px;
    border-radius: 5px;
}

    input[type="submit"]:hover {
        background: #8AA6A3;
    }


/* 三欄以上版 */
.about-container3 {
    display: inline-block;
    width: 25%;
    padding: 30px;
    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;
    text-align: left;
}

    .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;
    }

/* 回到最上層 */
.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 screen and (max-width: 1300px) {
    .chart {
        width: 100%;
        padding: 10px;
    }
    .about-container2 {
        width: 100%;
        margin-bottom: 20px;
        padding: 10px;
    }

    .services .service-card, .about-container3 {
        width: 45%;
    }

    .certification-card {
        flex: 1 1 calc(50% - 1rem);
    }
}

/* 小螢幕背景調整 */
@media screen and (max-width: 1000px) {
    img.bg {
        left: 50%;
        margin-left: -500px;
    }

    .about-container, .about-container-reverse {
        grid-template-areas: "about-text" "about-img";
        grid-template-columns: auto;
    }
}

/* 小螢幕樣式 */
@media (max-width: 768px) {
    .hero h1, .title-area h1 {
        font-size: 2rem;
    }

    .services .service-card, .about-container3 {
        width: 90%;
        margin-bottom: 20px;
    }

    .about-center {
        width: 80%;
    }

    .chart {
        padding: 5px;
    }
}

/* 小螢幕調整 */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 20px;
    }

    .content-section h2 {
        font-size: 1.8em;
    }

    .about-center h2, about-text h2 {
        font-size: 28px;
    }

    .services-text {
        padding: 20px;
    }

    .form-group {
        display: auto;
    }

    .certification-card {
        flex: 1 1 calc(100% - 1rem);
    }
}
