/* 全局樣式 */
body {
    margin: 0;
    background: linear-gradient(135deg,#d7e75c, #00cec9, #12f38e);
    animation: gradientBG 15s ease infinite;
    background-size: 400% 400%;
    font-family: 'Roboto', sans-serif;
    color: #fff;
    box-sizing: border-box;
    scroll-behavior: smooth; /* 平滑滾動 */
    overflow-x: hidden;
}
#container{
    width: 100vw;

}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}


/* 主內容區 */
#main {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    border: 0 40px;
    margin-top: -10px;
    margin-bottom: -45px;
}
#about{
    animation: fadeIn 1s ease-out;
}
#services{
    margin-top: 50px;
    animation: fadeIn 1s ease-out;
    padding: 20px 250px;
}

.intro_text{
    font-size: 3rem;
    font-weight: 600;
    margin: 0;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
    animation-delay: 0.5s;
    animation: fadeIn 1s ease-out;
}

/* 動畫效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 導航欄樣式 */
.navbar {
    display: flex;
    justify-content:space-around;  
    align-items: center;
    background-color: #222;
    padding: 35px 30px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.logo {
    position: absolute;
    left: 70px;
}



.navbar .logo {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    text-transform: uppercase;
    margin-right: 30px;
}

.navbar .nav-links {
    position: absolute;
    right: 6vw;
    top: -10;
    line-height: 80px;
}

.nav-links a {
    text-decoration: none;
    color: #dfe6e9;
    font-size: 18px;
    padding: 12px 18px;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.2s;
}

.nav-links a:hover {
    background-color: #00cec9;
    transform: scale(1.05);
}

/* 區塊樣式 */
section {
    background-color: #2d3436;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

section h2 {
    color: #00cec9;
}

section p {
    color: #dfe6e9;
}
.search_bar {
    display: flex;
    align-items: center; /* 垂直置中 */
    justify-content: center; /* 水平置中 */
    gap: 8px;
    background: linear-gradient(135deg, #f0f0f0, #dcdcdc);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    min-width: 550px;
    max-width: 1000px;
    margin: 0 auto; /* 讓 search_bar 水平置中 */
    margin-bottom: 50px;
    margin-top: 50px;
}

.search_bar input {
    flex: 1;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-size: 16px;
    outline: none;
    width: 100%;
}
.search_bar input:focus {
    box-shadow: 0 0 5px rgba(0, 122, 255, 0.5);
}

.search_bar button {
    border: none;
    background: #00859c;
    color: white;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap; /* 防止按鈕內文字換行 */
}

.search_bar button:hover {
    background: #005b6b;
}



.Search {
    margin-bottom: 50px;

}




.boxes{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    grid-auto-rows: 400px;
    gap: 30px;
    padding: 10px;
    padding: 20px 80px;
    justify-content: center;
    margin: auto 0;
}

.box{

    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items:center;

    background: #2d3436;
    border-radius: 5px;
    box-shadow: 5px 15px 20px hsla(0, 0%, 10%, 0.7);
    transition: 0.3s ease;
    animation: fadeIn 1s ease-out;
    

}

.box p{
    margin: 0px 20px;
    margin-top: 15px;
}

.box:hover{
    transform: scale(1.05,1.05);
    cursor: pointer;
}
.box h2{
    font-size: 4rem;
    font-weight: bold;
    margin-top: -5px;
    font-size: 3rem;
}
.box img {
    width: 220px;
    margin-top: -40px;
}
.box p{
    color: hsl(0, 0%, 75%);

}
#not_found {


    font-size: 3rem;
    color: #3d4446;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(60, 60, 60, 0.6);
    animation-delay: 0.5s;
    animation: fadeIn 0.8s ease-out;

}
#not_found_highlight{
    font-size: 3rem;
    color: #f4f4f4;
    font-size: 3rem;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(60, 60, 60, 0.6);
    animation-delay: 0.5s;
    animation: fadeIn 0.8s ease-out;
    margin-left: 15px;
}
#not_found_box{
    display: flex;
    justify-content: center;
    position: absolute;
    left: 0;
    top: 900px;
    width: 100%;
    padding-bottom: 100px;
}



.foot{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    height: 55px;
    width: 100%;
    text-align: center;
    background-color: #0757696c;
    color: #fff;
    margin-top: 0px;
    margin-bottom: -10px;
}

.foot-word{
    margin-top: -15px;
    margin-bottom: -5px;

}

.side-menu{
    
    z-index: 10;
    position: fixed;
    top: 0;
    left: 0;
    width: 200px;
    height: 100%;
    background-color: #2d3436;
    transition: transform 0.3s ease;
    box-shadow: 5px 0 10px rgba(0, 0, 0, 0.5);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateX(-100%);
}
.side-menu.active {
    transform: translateX(0);
}

.side-menu ul li a {
    text-decoration: none;
    color: #dfe6e9;
    font-size: 20px;
    padding: 12px 18px;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.2s;
    text-decoration: none;
    font-weight: 700;

}

.side-menu ul li {
    margin-top: 50px;
    margin-bottom: 50px;
}


.side-menu ul{
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}


.ham-menu{
    position: absolute;
    left: 35px;
    top: 20px;
    cursor: pointer;
}


.ham-menu.active div:nth-child(1) {
  transform: translate(-20px,10px) rotate(45deg);
}
.ham-menu.active div:nth-child(2) {
  opacity: 0;
}
.ham-menu.active div:nth-child(3) {
  transform: translate(-20px,-7px) rotate(-45deg);
}


.bar{
    display: none;
    height: 4.3px;
    width: 33px;
    background-color: #dadada;
    border-radius: 23px;
    position: relative;
    top: 0;
    left: 20;
    transform: translate(-50%, -50%);
    transition: .3s ease;
    margin-top: 4px;
}


@media (max-width: 1068px) {
    .search_bar {
        min-width: auto;
        max-width: 100%;
        margin-left: 20px;
        margin-right: 20px;
    }
    #about {
        min-width: auto;
        max-width: 100%;
        margin-left: 25px;
        margin-right: 25px;
    }
    #services {
        min-width: auto;
        max-width: 100%;
        margin-left: 25px;
        margin-right: 25px;
        
    }
}
@media (max-width: 800px) {

    


    #services {
        min-width: auto;
        max-width: 100%;
        margin-left: 25px;
        margin-right: 25px;
        padding: 5px 100px;
    }

    .navbar .nav-links {
        display: none;
    }
    .navbar .logo {
        position:static;
        
    }
      
    

    .navbar {

        padding: 20px;
        margin: 0;
    }

    .boxes{
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        grid-auto-rows: 300px;
        gap: 30px;
        padding: 10px;
        padding: 20px 80px;
        justify-content: center;
        margin: auto 0;
    }

    .box p{
        margin: 0px 20px;
        margin-top: 15px;
    }

    .box:hover{
        transform: none;
        cursor: pointer;
    }
    .box h2{
        font-size: 2.4rem;
        font-weight: bold;
        margin-top: -5px;
    }
    .box img {
        width: 160px;
        margin-top: -40px;
    }
    .box p{
        color: hsl(0, 0%, 75%);

    }
    .bar{
        display: block;
    }

}

@media (max-width: 400px) {
    #services {
        min-width: auto;
        max-width: 100%;
        margin-left: 35px;
        margin-right: 35px;
        padding: 5px 50px;
    }
    #main{
        margin-top: 40px;
        margin-left: 25px;
    }
    .boxes{
        margin-left: 25px;
    }
    
    .box h2{
        font-size: 2.2rem;
        font-weight: bold;
        margin-top: -5px;
    }
    .box img {
        width: 145px;
        margin-top: -40px;
    }




}