/* body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
} */

section.resources_show {
    margin-top:6rem;
    padding: 20px;
    background-color: #fff;
}

.same_width {
    width: 60vw;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 1.875rem;
}

.same_height {
    min-height: 60vh;
}


/* 資源搜尋 */
.search_width {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.search_width select,
.search_width input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    width: 200px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: none;
}

.search_width select:focus,
.search_width input:focus {
    outline: none;
    border-color: #007BFF;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.search_width select {
    background-color: #fff;
    cursor: pointer;
}

.search_width input {
    flex-grow: 1;
}

.search_width input::placeholder {
    color: #aaa;
}





/* 資源項目外框 */
.flex-box {
    flex: 0 1 calc(33.333% - 20px); /* 每行三個項目，兩邊有間隔 */
    background-color: #fff;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .2);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, border 0.3s ease, box-shadow 0.3s ease; 
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
    margin: 1rem 0;
}

.flex-box:hover {
    transform: translateY(-10px); 
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.5); /* 亮藍色陰影 */
    
}

.re-item {
    padding: 15px 0;
    display: flex;
    flex-direction: column;
    text-align: center;
    flex-grow: 1;
}


/* 資源圖片 */
.re-img {
    width: 100%;
    height: calc(13rem);
    background-color: #eaeaea;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-radius: 10px;
    position: relative;
}

.re-img img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保持圖片比例，填滿容器 */
}



.re-img img:empty {
    background-color: #eaeaea; 
}


/* 資源時間 */
.re-time p {
    font-size: 0.9rem;
    color: #595959;
    margin: 10px 0;
}

/* 資源標題 */
.re-title h2 {
    font-size: 1.4rem;
    color: #333;
    margin: 10px 0;
    font-weight: bold;
}

/* 資源描述 */
.re-description {
    flex-grow: 1; 
}
.re-description p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: calc(1.5em * 4); 
}





/* 資源類型 */
.re-type {
    display: flex;
    align-items: center;
    font-size: 1rem;
    color: #555;
    position: relative; /* 設置相對位置 */
    transition: background-color 0.5s ease; /* 背景色過渡效果 */
}


.re-type-content {
    position: absolute; 
    top: 0;
    left: 0;
    width: 100%; 
    height: 190%; 
    background-color: rgba(224, 187, 255, 0.7); 
    transform: translateY(20px);
    transition: transform 0.5s ease, opacity 0.5s ease; 
    opacity: 0; 
    display: flex;
    flex-direction: row-reverse;
}
.flex-box:hover .re-type-content {
    display: block; 
    transform: translateY(-10px);
    opacity: 1;  
    display: flex;
    flex-direction: row-reverse;
}
.re-type-content img{
    margin-top: 13px;
}




.re-type img {
    width: 36px;
    height: 36px;
    margin-right: 20px;
}


.re-left{
    text-align:left;
}


.NoResulet{
    font-size: 24px;
    display: flex;
    align-items: center;
}

/* 統一內縮空間 */
.re-pd{
    padding: 0 15px !important;
}

.re-link,.re-download{
    cursor: pointer;
}


/* 響應式設計 */
@media (max-width: 1200px) {
    .flex-box {
        flex: 0 1 calc(50% - 20px); /* 每行兩個項目 */
    }
}

@media (max-width: 768px) {
    .flex-box {
        flex: 0 1 100%; /* 每行一個項目 */
    }
    
    .search_width {
        flex-direction: column;
        gap: 15px;
    }

    .search_width select,
    .search_width input {
        width: 100%;
    }
    .same_width{
        width: 75vw;
    }
}
