body, html {
    height: 100%;
    margin: 0;
}
.navbar {
    background-color: #007bff;
    padding: 10px;
    color: white;
    text-align: center;
}
.cover {      
    width: 100%; /* 設置寬度為視窗寬度的 80% */
    height: 50vw; /* 固定高度 */
    background: url('../banner.jpg') no-repeat center center;
    background-size: cover; /* 確保背景圖片不被裁剪 */
    background-color: #ffff; /* 當圖片不覆蓋整個區域時的背景顏色 */
    background-position: center top;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
    margin-left: auto;
    margin-right: auto;
}
.cover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background: rgba(224, 215, 215, 0.4); 半透明黑色覆蓋層 */
    z-index: 1;
}
.cover-text {
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 10px;
    font-family: "Lato", sans-serif;
    font-weight: 700;
    color: #fff;
    font-style: normal;
    letter-spacing: 1px;
}

/* 平板 */
@media (min-width: 768px) and (max-width: 1024px) {
    .cover {
        background-position: center left;
        height: 40%; /* 調整高度 */
        padding: 15px; /* 減少內邊距 */
    }
    .cover-text {
        padding: 15px; /* 減少文本內邊距 */
        font-size: 16px; /* 調整字體大小 */
    }
}

 /* 手機 */
 @media (max-width: 767px) {
    .cover {
        background-position: center left;
        height: 40%; /* 縮小高度 */
        padding: 10px; /* 減少內邊距 */
    }
    .cover-text {
        padding: 10px; /* 減少文本內邊距 */
        font-size: 14px; /* 縮小字體大小 */
    }
}

.intro-content {
    display: flex;
    flex-direction: column;
    background-color: #f2f2f2; /* 背景顏色 */
    padding: 5% 5%;
    text-align: center;
    align-items: center;
}

.content-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1%;
    width: 100%;
}

.intro-content img {
    max-width: 100%;
    height: auto;
}
.intro-content h2 {
    color: #24678d; /* 標題顏色 */
    font-weight: bold;
    margin-bottom: 20px;
    font-size: 2rem;
}
.intro-content p {
    color: #333;
    line-height: 1.6;
    font-size: 1rem;
}

.carousel {
    position: relative;
    width: 100%;
    max-width: 50vw;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin: 0;
}

.carousel-inner {
    display: flex;
    width: 100%;
    background-color: #fff;
    transition: transform 0.5s ease;
}

.carousel-item {
    min-width: 100%;
    flex-shrink: 0;
    box-sizing: border-box;
}

.carousel-item img {
    width: 100%;
    display: block;
    flex-shrink: 0;
    border-radius: 10px;
    object-fit: contain;
    height: 37vw; /* 設置圖片高度 */
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    user-select: none;
}

.carousel-control-prev {
    left: 10px;
}

.carousel-control-next {
    right: 10px;
}

.text-content {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    max-width: 60vw;
    margin: 1em;
    text-align: left;
    font-size: 1rem; 
}

@media (min-width: 768px) {
    .content-row {
        flex-direction: row;
    }
    .carousel {
        order: 1;
    }
    .text-content {
        order: 2;
    }
}

@media (max-width: 767px) {
    .carousel {
        max-width: 90vw;
        /* width: 50%; */
        order: 1;
    }
    .carousel-inner img{
        height: 60vw;
    }
    .text-content {
        max-width: 90vw;
        font-size: 1rem;
        order: 2;
    }
}

@media (max-width: 767px) {
    .intro-content h2 {
        font-size: 1.5rem; /* 手機上稍微縮小字體 */
    }
    .intro-content p {
        font-size: 0.875rem; /* 手機上稍微縮小字體 */
    }
}

.header {
    text-align: center;
    padding-top: 25px;
    padding-bottom: 25px;
    background-color: #fff;
    /* background-color: rgb(244, 177, 54); */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.header .logo {
    align-items: center;
}
.header .logo img {
    height: 50px;
    margin-right: 10px;
}
.header .logo h2 {
    margin: 0;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    /* color: rgb(196, 37, 37); */
}
.header .logo h1 {
    margin: 0;
    /* font-size: 24px; */
    color: #333;
    /* color: #fff; */
}
.title{
    background-color: rgb(244, 177, 54);
    display: flex;
    justify-content: center;
}
.nav {
    align-items: center;
    text-align: center;
    gap: 20px;
}
.nav a {
    text-decoration: none;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    padding: 10px 0;
}
.nav a:hover {
    color: red;
}
h1{
    font-family: "Lato" !important;
    font-weight: 700 !important;
    font-style: normal !important;
    letter-spacing: 1px !important;
}
.list-intro{
    padding: 10px 0px 10px 0px;
}
.list-intro ::before{
    content: "";
    position: absolute;
    background-color: #fdeda0;
    width: 100%;
    height: 50%;
    z-index: -10;
    bottom: 0;
}

.welfare-content{
    flex-direction: column;
    padding: 5% 5%;
    text-align: center;
    align-items: center;
    background-color: #ffff; /* 背景顏色 */
}
.welfare-content h2{
    color: #24678d;
    font-weight: bold;
    margin-bottom: 20px;
}
.Review{
    padding:5% 10%
}
.img-grid {
    display: flex;
    flex-wrap: wrap;
}
.img-grid img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
}
.square {
    position: relative;
    width: 100%;
    padding-bottom: 70%; /* Creates a square by setting height equal to width */
}
.square img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.book-content{
    flex-direction: column;
    padding: 30px 10%;
    text-align: center;
    align-items: center;
    background-color: #fff; /* 背景顏色 */
}
.book-content .paragraph{
    text-align: left;
}
.book-content .paragraph p {
    margin-bottom: 0px;
}

.book-content h2{
    color: #24678d;
    font-weight: bold;
    margin-bottom: 20px;
}

.footer {
    background-color: rgb(94, 92, 92);
    color: #fff;
    padding: 40px 0;
    text-align: center;
}
.footer .social-links a {
    color: #fff;
    margin: 0 15px;
    font-size: 24px;
    transition: color 0.3s;
}
.footer .social-links a:hover {
    color: #d1d1d1;
}
.footer .links a {
    color: #bbb;
    margin: 0 10px;
    font-size: 16px;
    transition: color 0.3s;
}
.footer .links a:hover {
    color: #fff;
}
.footer .copyright {
    margin-top: 20px;
    font-size: 14px;
}
.image-links{
    display: flex;
    justify-content: center; /* 水平居中 */
    gap: 1vh; /* 图片之间的间距 */
    margin: 1vh 0;
}
.image-link{
    display: block;
    width: 10vmax; /* 调整图片宽度 */
    height: auto;
    text-align: center;
}
.image-link img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    transition: transform 0.3s ease;
}
.image-link img:hover {
    transform: scale(1.05); /* 鼠标悬停时放大 */
}