/* ------------------- 工程實績-標題 ------------------- */
.chapter-title {
    position: relative;
    background-image: url("/assets/images/Projects-Title/Projects-Title.jpg");
    background-size: cover;
    background-position: 0 14%;
    background-repeat: no-repeat;
    background-color: #f5f5f5;
}

/* ------------------- 工程實績-額外內容(不好可刪 by Hank) ------------------- */
.projects-intro {
    background-color: #f5f5f5;
    text-align: center;
    margin-bottom: 2rem;
}

.projects-intro .intro-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.projects-intro h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #333;
    font-weight: 700;
}

.projects-intro .intro-divider {
    width: 28%;
    height: 5px;
    background-color: rgb(253, 101, 0);
    margin: 0 auto 1.5rem auto;
    border-radius: 2px;
}

.projects-intro p {
    max-width: 760px;
    margin: 0.5rem auto;
    font-weight: 600;
    color: #555;
    line-height: 1.7;
}


/* ------------------- 工程實績-內容背景 ------------------- */
.projects-section {
    position: relative;
    width: 100%;
    min-height: 50vh;
    padding: 2rem 0;
    background-color: #f5f5f5;
    overflow: hidden;
}

/* ------------------- 工程實績-搜尋欄 ------------------- */
.projects-from-search {
    position: relative;
    background-color: #fff;
    margin: 4.5rem 0rem;
    padding: 1rem;
    width: 100%;
    border-radius: 10px;
    box-shadow: -10px 0 15px -5px rgba(0, 0, 0, 0.5), 10px 0 15px -5px rgba(0, 0, 0, 0.5);
    overflow: visible;
    z-index: 1;
}

/* 表單欄(主) */
.filter-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* 表單列(副) */
.filter-col {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
    padding-right: 1rem;
    border-right: 1px solid #f0f0f0;
    /* 右邊分隔線 */
}

.filter-col label {
    font-size: 1.1rem;
    font-weight: 700;
    margin-left: 0.25rem;
    margin-bottom: 0.5rem;
}

.filter-col input,
.filter-col select {
    padding: 0.5rem;
    font-size: 1rem;
    border: none;
    background-color: #f9f9f9;
}

.projects-search-input:hover {
    background-color: #fefefe;
}

.filter-col input:focus,
.filter-col select:focus {
    outline: none;
    box-shadow: 0 0 2px 1px rgba(0, 0, 0, 0.884);
    background-color: #fefefe;
}

.projects-search-group {
    display: flex;
    width: 100%;
}

.projects-search-input,
.projects-region-select {
    width: 100%;
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    box-sizing: border-box;
}

/* 搜尋按鈕 */
.projects-search-button {
    margin: 1rem 0.5rem;
    width: 13%;
    padding: 1rem 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    color: rgb(0, 0, 0);
    background-color: rgb(255, 217, 0);
    transition: background-color 0.3s ease;
}

.projects-search-button:hover {
    background-color: rgb(0, 0, 0);
    color: rgb(255, 255, 255);
}

.projects-search-button i {
    margin-right: 0.5rem;
}

/* ------------------- 工程實績-搜尋結果 ------------------- */



/* ------------------- 工程實績-資訊欄 ------------------- */
/* 卡片 */
.projects-card {
    position: relative;
    width: 100%;
    height: 19rem;
    margin: 0 auto;
    color: rgb(255, 255, 255);
    border-bottom: 3px solid #d20c01;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    /* 確保滑出區域不超出 */
    z-index: 0;
}

.projects-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    transform: translateY(80%);
    transition: transform 0.3s ease-out;
    z-index: 1;
}

.projects-card img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    transition: opacity 0.3s ease-out;
    z-index: 0;
}

.projects-card h2,
.projects-card p {
    position: absolute;
    font-weight: 500;
    color: rgb(255, 255, 255);
    z-index: 4;
}

.projects-card a {
    color: rgb(255, 255, 255);
}

.projects-card h2 {
    margin: 0;
    width: 300px;
    /* 設定寬度，確保能遮住多於的字 */
    inset: auto auto 15px 15px;
    font-size: 1.3rem;
    text-overflow: ellipsis;
    /* 超出隱藏 */
    text-transform: uppercase;
    /* 文字超出用...代替 */
    white-space: nowrap;
    /* 不換行 */
    overflow: hidden;
    transition: transform 10s linear;
    transition: inset 0.3s ease-out;
}

.projects-card p {
    margin-top: 0.5rem;
    padding: 0.3rem 0.5rem;
    max-width: 80%;
    inset: auto auto 10px 20px;
    text-decoration: none;
    font-size: 1rem;
    letter-spacing: 1px;
    opacity: 0;
    border: 2px solid rgb(255, 255, 255);
    color: inherit;
    transition: opacity 0.3s ease-out;
}

.projects-card:hover::after {
    content: '';
    position: absolute;
    pointer-events: none;
    transform: translateY(0);
    z-index: 1;
}

.projects-card:hover img {
    opacity: 1;
    transition: opacity 0.3s ease-in;
}

.projects-card:hover h2 {
    inset: auto auto 100px 15px;
    transition: 0.2s ease-in;
}

.projects-card:hover p {
    opacity: 1;
    transition: opacity 0.5s 0.1s ease-in;
}


/* h2裝飾 */
.decorate {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 24px;
    margin-right: auto;
}

.decorate::before {
    content: "";
    position: absolute;
    width: 3px;
    height: 3px;
    background-color: #d64000;
    border-radius: 50%;
    top: 10px;
    left: 5px;
    box-shadow:
        0 5px #d64000,
        0 10px #d64000,
        5px 0 #d64000,
        5px 5px #d64000,
        5px 10px #d64000;
}

/* 分頁按鈕 */
.page {
    display: none;
    flex-wrap: wrap;
    gap: 1rem;
}

.page.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

#pagination {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

#pagination button {
    padding: 0.4rem 0.8rem;
    border: 1px solid #333;
    background-color: #fff;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

#pagination button:hover {
    border: 1px solid #d20c01;
    background-color: #d20c01;
    color: #fff;
}

#pagination button.active {
    background-color: #d20c01;
    color: #fff;
    border-color: #d20c01;
    cursor: default;
}

#pagination button.prev,
#pagination button.next {
    font-weight: bold;
}


/* ------------------- 響應式設計 ------------------- */
@media (min-width: 1441px) {}