/* === 基本 Reset & 排版 === */
body {
    line-height: 1.6;
    margin: 0 10px;
    padding: 0;
    background-color: rgb(234, 229, 223);
    font-family: 'Microsoft JhengHei', sans-serif;
    color: rgb(99, 97, 97);
}

/* === Header === */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgb(106, 81, 61);
    padding: 10px;
}

.header-container h1 {
    color: #fff;
    margin: 0;
    flex-grow: 1;
    font-weight: bold;
}

.header-container button img {
    height: 50px;
}

/* === Nav bar === */
.w3-bar {
    display: flex;
}

.w3-bar-item {
    font-weight: bold;
}

.w3-bar-item.w3-button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    white-space: nowrap;
    padding: clamp(.5rem, 2vw, 1rem);
    font-size: clamp(12px, 2vw, 26px);
}

.w3-bar-item .icon {
    width: clamp(16px, 4vw, 24px);
    margin-left: .5rem;
    transition: filter .3s, margin .3s;
}

.w3-bar-item.w3-button:hover {
    background-color: rgb(180, 155, 134) !important;
    color: #fff !important;
}

.w3-bar-item.w3-button.active {
    background-color: rgb(159, 128, 103) !important;
    color: #fff !important;
}

.w3-bar-item.w3-button:hover .icon,
.w3-bar-item.w3-button.active .icon {
    filter: brightness(0) invert(1);
}

.w3-bar-item.w3-button.active .icon {
    filter: brightness(0) invert(1);
}

/* === Carousel === */
.carousel-item img {
    width: 100%;
    height: auto;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-size: contain;
    transform: scale(2);
    filter: brightness(0.5) saturate(100%) invert(73%) sepia(93%) saturate(748%) hue-rotate(356deg) brightness(100%) contrast(120%);
}

/* === 通用 Section === */
.city {
    padding: 20px 0;
}

/* 共用寬度設定 */
.content.text-section,
.content.text-section2 {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    box-sizing: border-box;
    /* gap: 2rem; */
}

.section,
.section2 {
    padding: 20px;
    border-bottom: 1px solid #ddd;
}

.section h1 {
    font-weight: bold;
}

.content_image {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

.content {
    display: flex;
    align-items: center;
}

.iframe-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 比例 */
    height: 0;
    overflow: hidden;
}

iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0
}

/* ==== #總計畫 NEWS 最新消息 排版 ==== */
#總計畫 .cards {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin-top: 1rem;
}

#總計畫 .card {
    width: 18rem;
    /* 和原来一致的固定宽度 */
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform .2s;
    text-decoration: none;
}

#總計畫 .card:hover {
    transform: translateY(-5px);
}

#總計畫 .card__preview {
    height: 12rem;
    /* 固定图片容器高度 */
    overflow: hidden;
}

#總計畫 .card__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 保证铺满且不变形 */
    transition: transform .4s ease-out;
}

#總計畫 .card:hover .card__preview img {
    transform: scale(1.35);
    /* 原来的放大效果 */
}

#總計畫 .card__content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

#總計畫 .card__title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: .5rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

#總計畫 .card__description {
    flex: 1;
    font-size: .9rem;
    line-height: 1.4;
    color: rgba(0, 0, 0, 0.7);
    margin-bottom: .5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#總計畫 .card__bottom {
    display: flex;
    justify-content: flex-end;
    font-size: .8rem;
    color: rgba(0, 0, 0, 0.6);
}

/* NEWS彈跳視窗 */
.modal-background {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.modal-content {
    background: #fefefe;
    padding: 10px;
    border: 1px solid #888;
    max-width: 800px;
    max-height: 600px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    overflow: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.close-btn {
    position: absolute;
    top: 0;
    right: 5px;
    font-size: 36px;
    color: #aaa;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover {
    color: #000;
}

.close-btn:hover,
.close-btn:focus {
    color: rgb(0, 0, 0);
    text-decoration: none;
    cursor: pointer;
}

.news__preview {
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.news__preview img {
    width: 80%;
    padding: 5px;
}

.news__title {
    font-size: 20px;
    text-align: justify;
}

.news__description {
    text-align: justify;
}

/* === 文本區塊 === */
.text {
    background: #fff;
    padding: 20px;
    margin: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    max-width: 800px;
    /* min-height: 250px; */
    text-align: justify;
}

.text img {
    display: block;
    margin: 20px auto;
    max-width: 100%;
    border-radius: 10px;
}

.images {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    /* 增加間距 */
    margin: 20px;
}

.images img {
    max-width: 200px;
    border-radius: 10px;
    margin: 20px;
    /* 增加每張圖片的間距 */
}

.image,
.sub1_image,
.sub2_image,
.sub4_image {
    background-color: white;
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px;
}

.image img {
    max-width: 100%;
    margin: 20px;
    border-radius: 10px;
}

.sub1_image img {
    max-width: 100%;
    margin: 60px;
    border-radius: 10px;
}

.sub2_image img {
    max-width: 100%;
    margin: 33px;
    border-radius: 10px;
}

.sub4_image img {
    max-width: 100%;
    margin: 10px;
    border-radius: 10px;
}

.image img.sub3_image1 {
    max-width: 40%;
    /* 最大寬度為容器的40% */
    margin: 20px;
    /* 外邊距為20px */
    border-radius: 10px;
    /* 圓角半徑為10px */
}

/* === Gallery 介紹區 === */
.main-container {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 20px;
    margin: 5px auto;
    justify-content: center;
    margin-bottom: 10px;
}

.small-images_all {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
}

/* 大圖區塊 */
.gallery_larage1 {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    width: 38rem;
    height: 38rem;
}

.gallery_larage1 img {
    position: absolute;
    object-fit: contain;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 1;
    transition: opacity .3s ease-out;
}

.gallery_larage1 .card-content_large {
    color: rgb(99, 97, 97);
}

.gallery_larage1 h2 {
    position: absolute;
    bottom: 0;
    left: -10px;
    margin: 0;
    padding: 10px 10px 10px 20px;
    font-family: 'Roboto Condensed', sans-serif;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 35px;
    background-color: rgba(255, 255, 255, 0.8);
    width: calc(100% + 20px);
    box-shadow: 0 -10px 20px rgba(0, 0, 0, 0.1);
    transition: inset .35s ease-out, background-color 0s;
}

.gallery_larage1 p {
    position: absolute;
    bottom: 30px;
    left: 10px;
    font-weight: bold;
    font-size: 24px;
    max-width: 95%;
    opacity: 0;
    transition: opacity .3s ease-out;
}

.gallery_larage1:hover h2 {
    inset: auto auto 510px -10px;
    background-color: transparent;
}

.gallery_larage1:hover p {
    opacity: 1;
    transition: opacity .3s .1s ease-in;
}

.gallery_larage1:hover img {
    opacity: 0.2;
    transition: opacity .3s ease-in;
}

/* 小圖區塊 1 */
.gallery_small1 {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    width: 18.4rem;
    height: 18.4rem;
    grid-column: 1;
    grid-row: 1;
}

.gallery_small1 img {
    position: absolute;
    object-fit: contain;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 1;
    transition: opacity .2s ease-out;
}

.gallery_small1 .card-content_small1 {
    color: rgb(99, 97, 97);
}

.gallery_small1 h2 {
    position: absolute;
    bottom: 30px;
    left: 10px;
    margin: 0;
    font-family: 'Roboto Condensed', sans-serif;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 24px;
    transition: inset .3s .2s ease-out;
}

.gallery_small1 p {
    position: absolute;
    bottom: 0;
    left: 10px;
    font-weight: bold;
    font-size: 19px;
    max-width: 95%;
    opacity: 0;
    transition: opacity .3s ease-out;
}

.gallery_small1:hover h2 {
    inset: auto auto 222px 5px;
}

.gallery_small1:hover p {
    opacity: 1;
    transition: opacity .5s .1s ease-in;
}

.gallery_small1:hover img {
    opacity: 0.1;
    transition: opacity .3s ease-in;
}

/* 小圖區塊 2 */
.gallery_small2 {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    width: 18.4rem;
    height: 18.4rem;
    grid-column: 2;
    grid-row: 1;
}

.gallery_small2 img {
    position: absolute;
    object-fit: contain;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 1;
    transition: opacity .2s ease-out;
}

.gallery_small2 .card-content_small2 {
    color: rgb(99, 97, 97);
}

.gallery_small2 h2 {
    position: absolute;
    bottom: 30px;
    left: 10px;
    margin: 0;
    font-family: 'Roboto Condensed', sans-serif;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 24px;
    transition: inset .3s .2s ease-out;
}

.gallery_small2 p {
    position: absolute;
    bottom: 80px;
    left: 10px;
    font-weight: bold;
    font-size: 19px;
    max-width: 95%;
    opacity: 0;
    transition: opacity .3s ease-out;
}

.gallery_small2:hover h2 {
    inset: auto auto 222px 5px;
}

.gallery_small2:hover p {
    opacity: 1;
    transition: opacity .5s .1s ease-in;
}

.gallery_small2:hover img {
    opacity: 0.1;
    transition: opacity .3s ease-in;
}

/* 小圖區塊 3 */
.gallery_small3 {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    width: 18.4rem;
    height: 18.4rem;
    grid-column: 1 / span 2;
    grid-row: 2;
}

.gallery_small3 img {
    position: absolute;
    object-fit: contain;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 1;
    transition: opacity .2s ease-out;
}

.gallery_small3 .card-content_small3 {
    color: rgb(99, 97, 97);
}

.gallery_small3 h2 {
    position: absolute;
    bottom: 30px;
    left: 10px;
    margin: 0;
    font-family: 'Roboto Condensed', sans-serif;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 24px;
    transition: inset .3s .2s ease-out;
}

.gallery_small3 p {
    position: absolute;
    bottom: 40px;
    left: 10px;
    font-weight: bold;
    font-size: 19px;
    max-width: 95%;
    opacity: 0;
    transition: opacity .3s ease-out;
}

.gallery_small3:hover h2 {
    inset: auto auto 222px 5px;
}

.gallery_small3:hover p {
    opacity: 1;
    transition: opacity .5s .1s ease-in;
}

.gallery_small3:hover img {
    opacity: 0.1;
    transition: opacity .3s ease-in;
}

/* 小圖區塊 4 */
.gallery_small4 {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    width: 18.4rem;
    height: 18.4rem;
    grid-column: 2;
    grid-row: 2;
}

.gallery_small4 img {
    position: absolute;
    object-fit: contain;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 1;
    transition: opacity .2s ease-out;
}

.gallery_small4 .card-content_small4 {
    color: rgb(99, 97, 97);
}

.gallery_small4 h2 {
    position: absolute;
    bottom: 30px;
    left: 10px;
    margin: 0;
    font-family: 'Roboto Condensed', sans-serif;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 24px;
    transition: inset .3s .2s ease-out;
}

.gallery_small4 p {
    position: absolute;
    bottom: 5px;
    left: 10px;
    font-weight: bold;
    font-size: 18px;
    max-width: 95%;
    opacity: 0;
    transition: opacity .3s ease-out;
}

.gallery_small4:hover h2 {
    inset: auto auto 222px 5px;
}

.gallery_small4:hover p {
    opacity: 1;
    transition: opacity .5s .1s ease-in;
}

.gallery_small4:hover img {
    opacity: 0.1;
    transition: opacity .3s ease-in;
}

/* === Modal 彈窗 === */
.modal-background {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

/* 側邊社群欄 */
.social-media-sidebar {
    position: fixed;
    right: 1rem;
    top: 70%;
    transform: translateY(-30%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1000;
}

.social-icon img {
    width: 2.25rem;
    height: 2.25rem;
}

.back-to-top {
    background: none;
    border: none;
    padding: 0;
}

/* === Footer === */
footer {
    background-color: rgb(210, 199, 184);
    padding: 2rem 1rem;
    text-align: center;
}

.footer-text p {
    color: rgb(106, 81, 62);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ==== 子計畫一 ==== */
#子計畫一 .section {
    padding: 20px;
    border-bottom: 1px solid #ddd;
}

#子計畫一 .iframe-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    overflow: hidden;
}

#子計畫一 .iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

#子計畫一 .content_image {
    display: block;
    margin: 20px auto;
    max-width: 100%;
    height: auto;
}

#子計畫一 .text {
    background: #fff;
    padding: 20px;
    margin: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    max-width: 800px;
    min-height: 250px;
    text-align: justify;
}

#子計畫一 .images {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 20px;
}

#子計畫一 .images img {
    max-width: 200px;
    border-radius: 10px;
    margin: 20px;
}

#子計畫一 .join-us {
    background: #fff;
    padding: 20px;
    max-width: 950px;
    margin: 0 auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ==== 子計畫二 ==== */
#子計畫二 .section {
    padding: 20px;
    border-bottom: 1px solid #ddd;
}

#子計畫二 .iframe-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    overflow: hidden;
}

#子計畫二 .iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

#子計畫二 .content_image {
    display: block;
    margin: 20px auto;
    max-width: 100%;
    height: auto;
}

#子計畫二 .text {
    background: #fff;
    padding: 20px;
    margin: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    max-width: 800px;
    min-height: 250px;
    text-align: justify;
}

#子計畫二 .images {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 20px;
}

#子計畫二 .images img {
    max-width: 200px;
    border-radius: 10px;
    margin: 20px;
}

#子計畫二 .join-us {
    background: #fff;
    padding: 20px;
    max-width: 950px;
    margin: 0 auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ==== 子計畫三 ==== */
#子計畫三 .section {
    padding: 20px;
    border-bottom: 1px solid #ddd;
}

#子計畫三 .iframe-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    overflow: hidden;
}

#子計畫三 .iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

#子計畫三 .content_image {
    display: block;
    margin: 20px auto;
    max-width: 100%;
    height: auto;
}

#子計畫三 .text {
    background: #fff;
    padding: 20px;
    margin: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    max-width: 800px;
    min-height: 325px;
    text-align: justify;
}

#子計畫三 .images {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 20px;
}

#子計畫三 .images img {
    max-width: 200px;
    border-radius: 10px;
    margin: 20px;
}

#子計畫三 .join-us {
    background: #fff;
    padding: 20px;
    max-width: 950px;
    margin: 0 auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ==== 子計畫四 ==== */
#子計畫四 .section {
    padding: 20px;
    border-bottom: 1px solid #ddd;
}

#子計畫四 .iframe-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    overflow: hidden;
}

#子計畫四 .iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

#子計畫四 .content_image {
    display: block;
    margin: 20px auto;
    max-width: 100%;
    height: auto;
}

#子計畫四 .text {
    background: #fff;
    padding: 20px;
    margin: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    max-width: 800px;
    min-height: 250px;
    text-align: justify;
}

#子計畫四 .images {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 20px;
}

#子計畫四 .images img {
    max-width: 200px;
    border-radius: 10px;
    margin: 20px;
}

#子計畫四 .join-us {
    background: #fff;
    padding: 20px;
    max-width: 950px;
    margin: 0 auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ==== 子計畫二&子計畫三&子計畫四的卡片網格 ==== */
#子計畫二,
#子計畫三,
#子計畫四 {
    font-family: 'Microsoft JhengHei', sans-serif;
}

article {
    padding: 40px;
}

.article-div {
    background-color: #f8f9fa;
    border-radius: 1.0rem;
}


#子計畫二 .experience_title,
#子計畫三 .experience_title,
#子計畫四 .experience_title {
    text-align: center;
    padding: 20px;
}

#子計畫二 .main-title,
#子計畫三 .main-title,
#子計畫四 .main-title {
    font-size: 28px;
    color: #333;
    white-space: nowrap;
    display: block;
}

#子計畫二 .sub-title,
#子計畫三 .sub-title,
#子計畫四 .sub-title {
    font-size: 20px;
    color: #666;
    white-space: nowrap;
    display: block;
}

#子計畫二 section,
#子計畫三 section,
#子計畫四 section {
    padding: 20px;
    border-bottom: 1px solid #ddd;
    justify-content: center;
    width: 100%;
}

#子計畫二 section h1,
#子計畫三 section h1,
#子計畫四 section h1 {
    font-size: 2em;
    font-weight: bold;
    color: rgb(106, 81, 61);
    margin-bottom: 20px;
}

#子計畫二 section h2,
#子計畫三 section h2,
#子計畫四 section h2 {
    font-size: 1.6em;
    font-weight: bold;
    color: rgb(99, 97, 97);
    margin: 10px;
}

#子計畫二 section h3,
#子計畫三 section h3,
#子計畫四 section h3 {
    font-size: 1.3em;
    font-weight: bold;
    color: rgb(106, 81, 61);
    margin: 10px;
}

#aaconvertion .cards,
#ezreadv2 .cards {
    display: block;
}

#open-closed .cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 0 auto;
}

#aaconvertion .card,
#ezreadv2 .card,
#open-closed .card {
    background: rgb(255, 255, 255);
    border-radius: 1.0rem;
    box-shadow: rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease-in-out;
}

#aaconvertion .card:hover,
#ezreadv2 .card:hover,
#open-closed .card:hover {
    box-shadow: rgba(0, 0, 0, 0.2);
}

#aaconvertion .card__image,
#ezreadv2 .card__image,
#open-closed .card__image {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 15px;
}

#aaconvertion .card__content,
#ezreadv2 .card__content,
#open-closed .card__content {
    padding: 1rem;
    color: rgb(106, 81, 62);

    a {
        text-decoration: none;
        text-align: center;
        display: block;
        color: rgb(106, 81, 61);
    }

    a:hover {
        color: rgb(99, 97, 97);
    }
}

#videos .card__preview {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    min-height: 250px;
    position: relative;
    overflow: hidden;
}

#videos .card__preview::before {
    content: "";
    display: block;
    padding-top: 56.25%;
    /* 保持16:9的比例 */
    width: 100%;
}

#videos .card__preview iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 5px;
    overflow: hidden;
    flex-grow: 0;
}

#videos .card__content {
    width: 100%;
}

#videos .card__content a {
    text-decoration: none;
    text-align: center;
    display: block;
    color: rgb(106, 81, 61);
}

#videos .card__content a:hover {
    color: rgb(99, 97, 97);
}

#videos .card__title {
    text-align: center;
    margin: 20px;
}

/* 將 .cards 設置為 4 列平行排列並居中顯示 */
#videos .cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    /* max-width: 1200px; */
    margin: 0 auto;
}

#videos .card {
    background: rgb(255, 255, 255);
    border-radius: 1.0rem;
    box-shadow: rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease-in-out;
    width: 100%;
    /* max-width: 500px; */
    box-sizing: border-box;
    margin: 0 auto;
}

@media (max-width: 1739px) {

    #子計畫二 .main-title,
    #子計畫三 .main-title,
    #子計畫四 .main-title {
        white-space: normal;
        display: block;
    }

    #子計畫二 .sub-title,
    #子計畫三 .sub-title,
    #子計畫四 .sub-title {
        white-space: normal;
        display: block;
    }

    #open-closed .cards {
        grid-template-columns: repeat(3, 1fr);
    }

    #videos .cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {

    #子計畫二 .main-title,
    #子計畫三 .main-title,
    #子計畫四 .main-title {
        white-space: normal;
        display: block;
    }

    #子計畫二 .sub-title,
    #子計畫三 .sub-title,
    #子計畫四 .sub-title {
        white-space: normal;
        display: block;
    }

    #videos .cards {
        grid-template-columns: repeat(2, 1fr);
    }

    #videos .card__preview {
        min-width: 1024px;
        min-height: 576px;
    }
}

@media (min-width: 769px) and (max-width: 1023px) {
    #videos .cards {
        grid-template-columns: repeat(2, 1fr)
    }

    #videos .card__preview {
        min-width: 320px;
        min-height: 180px;
    }
}

@media (min-width: 639px) and (max-width: 769px) {
    #videos .cards {
        grid-template-columns: repeat(2, 1fr);
    }

    #videos .card__preview {
        min-width: 200px;
        min-height: 112.5px;
    }
}

@media (max-width: 639px) {
    article {
        padding: 20px;
    }

    #子計畫二 .main-title,
    #子計畫三 .main-title,
    #子計畫四 .main-title {
        font-size: 16px;
        white-space: normal;
        display: block;
    }

    #子計畫二 .sub-title,
    #子計畫三 .sub-title,
    #子計畫四 .sub-title {
        font-size: 14px;
        white-space: normal;
        display: block;
    }

    #子計畫二 section h1,
    #子計畫三 section h1,
    #子計畫四 section h1 {
        font-size: 1.3em;
        font-weight: bold;
        color: rgb(106, 81, 61);
        margin-bottom: 20px;
    }

    #子計畫二 section h2,
    #子計畫三 section h2,
    #子計畫四 section h2 {
        font-size: 1.1em;
        font-weight: bold;
        color: rgb(99, 97, 97);
        margin: 10px;
    }

    #open-closed .cards {
        grid-template-columns: repeat(1, 1fr);
    }

    #videos .cards {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    #videos .card {
        width: 100%;
        /* max-width: 300px; */
        margin: 10px auto;
    }

    #videos .card__preview {
        min-width: 200px;
        min-height: 112.5px;
    }
}

@media (min-width: 1200px) {
    .section2 {
        padding: 40px;
        border-bottom: 1px solid #ddd;
    }

    .text-section2 {
        display: flex;
        background-color: white;
        border-radius: 10px;
        align-items: center;
        justify-content: center;
    }
}

@media (min-width: 1024px) and (max-width: 1200px) {
    .header-container {
        h1 {
            font-size: 32px;
        }

        img {
            height: 42px;
        }
    }

    .w3-bar-item.w3-button {
        flex-direction: column;
        white-space: normal;
        padding: clamp(.25rem, 2vw, .75rem);
    }

    .w3-bar-item .icon {
        margin: .5rem 0 0;
        width: clamp(20px, 6vw, 28px);
    }

    h1 {
        font-size: 26px;
    }

    #總計畫 .card {
        h2 {
            font-size: 20px;
        }

        p {
            font-size: 16px;
        }

        .card__properties {
            font-size: 16px;
        }
    }

    .main-container {
        align-items: center;
        justify-content: center;
    }

    .gallery_larage1 {
        width: 32.5rem;
        height: 32.5rem;

        img {
            position: static;
        }

        .card-content_large {
            position: relative;
        }

        h2 {
            font-size: 30px;
        }

        p {
            font-size: 22px;
        }

        &:hover h2 {
            inset: auto auto 430px -10px;
        }

    }

    .gallery_small1,
    .gallery_small2,
    .gallery_small3,
    .gallery_small4 {
        width: 15.5rem;
        height: 15.5rem;

        h2 {
            font-size: 24px;
        }

        p {
            font-size: 14px;
        }

        &:hover h2 {
            inset: auto auto 190px 5px;
        }
    }

    .section {
        h1 {
            font-size: 28px;
        }

        h2 {
            font-size: 26px;
        }
    }

    .section2 {
        padding: 40px;
        border-bottom: 1px solid #ddd;
    }

    .text-section2 {
        display: flex;
        background-color: white;
        border-radius: 10px;
        align-items: center;
        justify-content: center;
    }

    .text {
        padding: 20px;
        max-width: 760px;
        min-height: 400px;
    }
}


@media (min-width: 900px) and (max-width: 1024px) {
    .header-container {
        h1 {
            font-size: 30px;
        }

        img {
            height: 40px;
        }
    }

    .w3-bar-item .icon {
        width: 28px;
        height: 28px;
    }

    .w3-bar-item.w3-button {
        font-size: 24px;
    }

    h1 {
        font-size: 24px;
    }

    #總計畫 .card {
        h2 {
            font-size: 18px;
        }

        p {
            font-size: 14px;
        }

        .card__properties {
            font-size: 14px;
        }
    }

    .main-container {
        width: 100%;
        align-items: center;
        justify-content: center;
    }

    .gallery_larage1 {
        width: 28rem;
        height: 28rem;

        img {
            position: static;
        }

        .card-content_large {
            position: relative;
        }

        h2 {
            font-size: 28px;
        }

        p {
            font-size: 20px;
            margin-bottom: 0;
        }

        &:hover h2 {
            inset: auto auto 380px -10px;
        }

    }

    .gallery_small1,
    .gallery_small2,
    .gallery_small3,
    .gallery_small4 {
        width: 14rem;
        height: 14rem;

        h2 {
            font-size: 22px;
        }

        p {
            font-size: 14px;
        }

        &:hover h2 {
            inset: auto auto 170px 5px;
        }
    }

    .section {
        h1 {
            font-size: 28px;
        }

        h2 {
            font-size: 26px;
        }
    }

    .section2 {
        padding: 40px;
        border-bottom: 1px solid #ddd;
    }

    .text-section2 {
        display: flex;
        background-color: white;
        border-radius: 10px;
        align-items: center;
        justify-content: center;
    }

    .text {
        padding: 20px;
        max-width: 760px;
        min-height: 400px;
    }

    #子計畫三 .text {
        min-height: 450px;
    }

    #子計畫四 .text {
        min-height: 425px;
    }
}

@media (min-width: 780px) and (max-width: 900px) {
    .header-container {
        h1 {
            font-size: 28px;
        }

        img {
            height: 38px;
        }
    }

    .w3-bar-item .icon {
        width: 24px;
        height: 24px;
    }

    .w3-bar-item.w3-button {
        font-size: 22px;
    }

    h1 {
        font-size: 24px;
    }

    #總計畫 .card {
        h2 {
            font-size: 18px;
        }

        p {
            font-size: 14px;
        }

        .card__properties {
            font-size: 14px;
        }
    }

    .main-container {
        width: auto;
        align-items: center;
        justify-content: center;
    }

    .gallery_larage1 {
        width: 25rem;
        height: 25rem;

        img {
            position: static;
        }

        .card-content_large {
            position: relative;
        }

        h2 {
            font-size: 26px;
        }

        p {
            font-size: 18px;
            margin-bottom: 0;
        }

        &:hover h2 {
            inset: auto auto 320px -10px;
        }

    }

    .gallery_small1,
    .gallery_small2,
    .gallery_small3,
    .gallery_small4 {
        width: 12rem;
        height: 12rem;

        h2 {
            font-size: 20px;
        }

        p {
            font-size: 12px;
        }

        &:hover h2 {
            inset: auto auto 150px 5px;
        }
    }

    .section {
        h1 {
            font-size: 28px;
        }

        h2 {
            font-size: 26px;
        }
    }

    .section2 {
        padding: 40px;
        border-bottom: 1px solid #ddd;
    }

    .text-section2 {
        display: flex;
        background-color: white;
        border-radius: 10px;
        align-items: center;
        justify-content: center;
    }

    .text {
        padding: 20px;
        max-width: 760px;
        min-height: 450px;
    }

    #子計畫一 .text {
        min-height: 275px;
    }

    #子計畫三 .text {
        min-height: 415px;
    }

    #子計畫四 .text {
        min-height: 380px;
    }
}

@media (min-width: 720px) and (max-width: 780px) {
    .header-container {
        h1 {
            font-size: 26px;
        }

        img {
            height: 36px;
        }
    }

    .w3-bar-item .icon {
        width: 26px;
        height: 26px;
    }

    .w3-bar-item.w3-button {
        font-size: 18px;
    }

    h1 {
        font-size: 24px;
    }

    #總計畫 .card {
        h2 {
            font-size: 18px;
        }

        p {
            font-size: 14px;
        }

        .card__properties {
            font-size: 14px;
        }
    }

    .main-container {
        flex-direction: column;
        width: auto;
        align-items: center;
    }

    .gallery_larage1 {
        width: 37.5rem;
        height: 37.5rem;

        img {
            position: static;
        }

        .card-content_large {
            position: relative;
        }

        h2 {
            font-size: 30px;
        }

        p {
            font-size: 26px;
        }

        &:hover h2 {
            inset: auto auto 500px -10px;
        }

    }

    .gallery_small1,
    .gallery_small2,
    .gallery_small3,
    .gallery_small4 {
        width: 18rem;
        height: 18rem;

        h2 {
            font-size: 26px;
        }

        p {
            font-size: 18px;
        }

        &:hover h2 {
            inset: auto auto 230px 5px;
        }
    }

    .section {
        h1 {
            font-size: 26px;
        }

        h2 {
            font-size: 22px;
        }
    }

    .section2 {
        padding: 40px;
        border-bottom: 1px solid #ddd;
    }

    .text-section2 {
        display: flex;
        background-color: white;
        border-radius: 10px;
        align-items: center;
        justify-content: center;
    }

    .text {
        padding: 20px;
        max-width: 760px;
        min-height: 450px;
    }

    #子計畫三 .text {
        min-height: 450px;
    }

    #子計畫四 .text {
        min-height: 400px;
    }
}

@media (min-width: 600px) and (max-width: 720px) {
    .header-container {
        h1 {
            font-size: 24px;
        }

        img {
            height: 32px;
        }
    }

    .w3-bar-item .icon {
        width: 26px;
        height: 26px;
        margin-left: 0;
    }

    .w3-bar-item.w3-button {
        font-size: 21.5px;
    }

    h1 {
        font-size: 24px;
    }

    #總計畫 .card {
        h2 {
            font-size: 18px;
        }

        p {
            font-size: 14px;
        }

        .card__properties {
            font-size: 14px;
        }
    }

    .main-container {
        flex-direction: column;
        width: auto;
        align-items: center;
    }

    .gallery_larage1 {
        width: 36rem;
        height: 36rem;

        img {
            position: static;
        }

        .card-content_large {
            position: relative;
        }

        h2 {
            font-size: 28px;
        }

        p {
            font-size: 24px;
        }

        &:hover h2 {
            inset: auto auto 490px -10px;
        }

    }

    .gallery_small1,
    .gallery_small2,
    .gallery_small3,
    .gallery_small4 {
        width: 17rem;
        height: 17rem;

        h2 {
            font-size: 24px;
        }

        p {
            font-size: 16px;
        }

        &:hover h2 {
            inset: auto auto 220px 5px;
        }
    }

    .section {
        h1 {
            font-size: 26px;
        }

        h2 {
            font-size: 24px;
        }
    }

    .section2 {
        padding: 40px;
        border-bottom: 1px solid #ddd;
    }

    .text-section2 {
        display: flex;
        background-color: white;
        border-radius: 10px;
        align-items: center;
        justify-content: center;
    }

    .text {
        padding: 20px;
        max-width: 700px;
        min-height: 500px;
    }

    article {
        padding: 10px;
    }
}

@media (min-width: 520px) and (max-width: 600px) {
    .header-container {
        h1 {
            font-size: 22px;
        }

        img {
            height: 30px;
        }
    }

    .w3-bar-item .icon {
        width: 24px;
        height: 24px;
        margin-left: 0;
    }

    .w3-bar-item.w3-button {
        font-size: 17.5px;
    }

    h1 {
        font-size: 22px;
    }

    #總計畫 .card {
        h2 {
            font-size: 16px;
        }

        p {
            font-size: 12px;
        }

        .card__properties {
            font-size: 12px;
        }
    }

    .main-container {
        flex-direction: column;
        width: auto;
        align-items: center;
    }

    .gallery_larage1 {
        width: 32.5rem;
        height: 32.5rem;

        img {
            position: static;
        }

        .card-content_large {
            position: relative;
        }

        h2 {
            font-size: 26px;
        }

        p {
            font-size: 22px;
        }

        &:hover h2 {
            inset: auto auto 430px -10px;
        }

    }

    .gallery_small1,
    .gallery_small2,
    .gallery_small3,
    .gallery_small4 {
        width: 15.5rem;
        height: 15.5rem;

        h2 {
            font-size: 23px;
        }

        p {
            font-size: 15px;
        }

        &:hover h2 {
            inset: auto auto 200px 5px;
        }
    }

    .section {
        h1 {
            font-size: 25px;
        }

        h2 {
            font-size: 23px;
        }
    }

    .text-section {
        flex-direction: column;
    }

    .text {
        padding: 20px;
        max-width: 580px;
        min-width: 480px;
    }

    .footer-text {
        font-size: 14px;
    }
}

@media (min-width: 480px) and (max-width: 520px) {
    .header-container {
        h1 {
            font-size: 20px;
        }

        img {
            height: 30px;
        }
    }

    .w3-bar-item .icon {
        width: 20px;
        height: 20px;
        margin-left: 0;
    }

    .w3-bar-item.w3-button {
        font-size: 17px;
    }

    h1 {
        font-size: 22px;
    }

    #總計畫 .card {
        h2 {
            font-size: 16px;
        }

        p {
            font-size: 12px;
        }

        .card__properties {
            font-size: 12px;
        }
    }

    .main-container {
        flex-direction: column;
        width: auto;
        align-items: center;
    }

    .gallery_larage1 {
        width: 29.5rem;
        height: 29.5rem;

        img {
            position: static;
        }

        .card-content_large {
            position: relative;
        }

        h2 {
            font-size: 24px;
        }

        p {
            font-size: 20px;
        }

        &:hover h2 {
            inset: auto auto 400px -10px;
        }

    }

    .gallery_small1,
    .gallery_small2,
    .gallery_small3,
    .gallery_small4 {
        width: 14rem;
        height: 14rem;

        h2 {
            font-size: 22px;
        }

        p {
            font-size: 14px;
        }

        &:hover h2 {
            inset: auto auto 180px 5px;
        }
    }

    .section {
        h1 {
            font-size: 24px;
        }

        h2 {
            font-size: 22px;
        }
    }

    .text-section {
        flex-direction: column;
    }

    .text {
        padding: 20px;
        max-width: 500px;
        min-width: 400px;
    }

    .footer-text {
        font-size: 12px;
    }
}

@media (min-width: 430px) and (max-width: 480px) {
    .header-container {
        h1 {
            font-size: 18px;
        }

        img {
            height: 30px;
        }
    }

    .w3-bar-item .icon {
        width: 20px;
        height: 20px;
        margin-left: 0;
    }

    .w3-bar-item.w3-button {
        font-size: 15px;
    }

    h1 {
        font-size: 22px;
    }

    #總計畫 .card {
        h2 {
            font-size: 16px;
        }

        p {
            font-size: 12px;
        }

        .card__properties {
            font-size: 12px;
        }
    }

    .main-container {
        flex-direction: column;
        width: auto;
        align-items: center;
    }

    .gallery_larage1 {
        width: 27.5rem;
        height: 27.5rem;

        img {
            position: static;
        }

        .card-content_large {
            position: relative;
        }

        h2 {
            font-size: 22px;
        }

        p {
            font-size: 18px;
        }

        &:hover h2 {
            inset: auto auto 370px -10px;
        }

    }

    .gallery_small1,
    .gallery_small2,
    .gallery_small3,
    .gallery_small4 {
        width: 13rem;
        height: 13rem;

        h2 {
            font-size: 20px;
        }

        p {
            font-size: 13px;
        }

        &:hover h2 {
            inset: auto auto 170px 5px;
        }
    }

    .section {
        h1 {
            font-size: 23px;
        }

        h2 {
            font-size: 21px;
        }
    }

    .text-section {
        flex-direction: column;
    }

    .text {
        padding: 20px;
        max-width: 450px;
        min-width: 390px;
    }

    .footer-text {
        font-size: 12px;
    }
}

@media (min-width: 400px) and (max-width: 430px) {
    .header-container {
        h1 {
            font-size: 16px;
        }

        img {
            height: 30px;
        }
    }

    .w3-bar-item .icon {
        width: 20px;
        height: 20px;
        margin-left: 0;
    }

    .w3-bar-item.w3-button {
        font-size: 12px;
    }

    h1 {
        font-size: 22px;
    }

    #總計畫 .card {
        h2 {
            font-size: 16px;
        }

        p {
            font-size: 12px;
        }

        .card__properties {
            font-size: 12px;
        }
    }

    .main-container {
        flex-direction: column;
        width: auto;
        align-items: max-content;
    }

    .gallery_larage1 {
        width: 25.5rem;
        height: 25.5rem;

        img {
            position: static;
        }

        .card-content_large {
            position: relative;
        }

        h2 {
            font-size: 20px;
        }

        p {
            font-size: 16px;
        }

        &:hover h2 {
            inset: auto auto 340px -10px;
        }

    }

    .gallery_small1,
    .gallery_small2,
    .gallery_small3,
    .gallery_small4 {
        width: 12rem;
        height: 12rem;

        h2 {
            font-size: 18px;
        }

        p {
            font-size: 12px;
        }

        &:hover h2 {
            inset: auto auto 150px 5px;
        }
    }

    .section {
        h1 {
            font-size: 22px;
        }

        h2 {
            font-size: 20px;
        }
    }

    .text-section {
        flex-direction: column;
    }

    .text {
        padding: 20px;
        max-width: 400px;
        min-width: 370px;
    }

    .sub3_image1 {
        max-width: 90% !important;
    }

    .footer-text {
        font-size: 12px;
    }
}

@media (min-width: 360px) and (max-width: 400px) {
    .header-container {
        h1 {
            font-size: 14px;
        }

        button img {
            height: 36px;
        }

        img {
            height: 30px;
        }
    }

    .w3-bar-item .icon {
        width: 16px;
        height: 16px;
        margin-left: 0;
    }

    .w3-bar-item.w3-button {
        font-size: 9px;
    }

    h1 {
        font-size: 22px;
    }

    #總計畫 .card {
        h2 {
            font-size: 16px;
        }

        p {
            font-size: 12px;
        }

        .card__properties {
            font-size: 12px;
        }
    }

    .main-container {
        flex-direction: column;
        width: auto;
        align-items: max-content;
    }

    .gallery_larage1 {
        width: 23.5rem;
        height: 23.5rem;

        img {
            position: static;
        }

        .card-content_large {
            position: relative;
        }

        h2 {
            font-size: 20px;
        }

        p {
            font-size: 16px;
        }

        &:hover h2 {
            inset: auto auto 300px -10px;
        }

    }

    .gallery_small1,
    .gallery_small2,
    .gallery_small3,
    .gallery_small4 {
        width: 11rem;
        height: 11rem;

        h2 {
            font-size: 18px;
        }

        p {
            font-size: 10px;
        }

        &:hover h2 {
            inset: auto auto 140px 5px;
        }
    }

    .section {
        h1 {
            font-size: 20px;
        }

        h2 {
            font-size: 18px;
        }
    }

    .text-section {
        flex-direction: column;
    }

    .text {
        padding: 20px;
        max-width: 380px;
        min-width: 300px;
    }

    .sub3_image1 {
        max-width: 100% !important;
    }

    .footer-text {
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .header-container {
        h1 {
            font-size: 14px;
        }

        img {
            height: 26px;
        }
    }

    h1 {
        font-size: 20px;
    }

    #總計畫 .card {
        h2 {
            font-size: 16px;
        }

        p {
            font-size: 12px;
        }

        .card__properties {
            font-size: 12px;
        }
    }

    .main-container {
        flex-direction: column;
        width: auto;
        align-items: max-content;
    }

    .gallery_larage1 {
        width: 20rem;
        height: 20rem;

        img {
            position: static;
        }

        .card-content_large {
            position: relative;
        }

        h2 {
            font-size: 18px;
        }

        p {
            font-size: 14px;
        }

        &:hover h2 {
            inset: auto auto 300px -10px;
        }

    }

    .gallery_small1,
    .gallery_small2,
    .gallery_small3,
    .gallery_small4 {
        width: 9.5rem;
        height: 9.5rem;

        h2 {
            font-size: 16px;
        }

        p {
            font-size: 8px;
        }

        &:hover h2 {
            inset: auto auto 140px 5px;
        }
    }

    .section {
        h1 {
            font-size: 20px;
        }

        h2 {
            font-size: 18px;
        }
    }

    .text-section {
        flex-direction: column;
    }

    /* .text {
        padding: 20px;
        max-width: 380px;
        min-width: 300px;
    } */

    .sub3_image1 {
        max-width: 100% !important;
    }

    .footer-text {
        font-size: 12px;
    }
}