/* styles.css */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #121212; /* 深色背景 */
    color: #e0e0e0; /* 淺灰色文字 */
    line-height: 1.6;
}

header {
    background: #1f1f1f; /* 深灰色背景 */
    color: #fff; /* 白色文字 */
    padding: 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2); /* 添加陰影 */
}

header .logo {
    font-size: 1.5rem;
    margin-left: 1rem;
    font-weight: bold;
}

nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin-right: 1rem;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: background-color 0.3s ease;
}

nav ul li a:hover {
    background-color: #333; /* 鼠標懸停時背景變深 */
    border-radius: 5px;
}

.container {
    display: flex;
    flex-wrap: wrap;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

main {
    flex: 3;
}

article {
    padding: 1.5rem;
    background-color: #1e1e1e; /* 深灰色背景 */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2); /* 添加陰影 */
    margin-bottom: 1.5rem;
}

aside {
    flex: 1;
    margin-left: 1rem;
}

.widget {
    background-color: #1e1e1e; /* 深灰色背景 */
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2); /* 添加陰影 */
}

form {
    margin-top: 1rem;
    background-color: #333;
    padding: 20px;
    border-radius: 5px;
}

form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #e0e0e0; /* 淺灰色文字 */
}

form input, form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    border: 1px solid #555;
    background-color: #555;
    color: white;
    font-size: 1rem;
}

form input:focus, form textarea:focus {
    border: 1px solid #ff9800;
    outline: none;
}

form button {
    background-color: #ff9800;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

form button:hover {
    background-color: #e68900;
}

footer {
    background: #1f1f1f; /* 深灰色背景 */
    color: #e0e0e0; /* 淺灰色文字 */
    text-align: center;
    padding: 1rem 0;
    margin-top: 1.5rem;
}

.team-member, .tech-item {
    margin-bottom: 20px;
    padding: 10px;
    background-color: #2c2c2c; /* 深灰色背景 */
    border-radius: 8px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2); /* 添加陰影 */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* 添加過渡效果 */
}

.team-member:hover, .tech-item:hover {
    transform: scale(1.02); /* 當鼠標懸停時放大 */
    box-shadow: 0 8px 16px rgba(0,0,0,0.3); /* 當鼠標懸停時陰影加深 */
}

.team-member img, .tech-item img {
    border-radius: 8px;
    margin-right: 15px;
    width: 100px;
    height: 100px;
    object-fit: cover;
    border: 2px solid #4CAF50; /* 綠色邊框 */
}

.tech-info {
    display: flex;
    flex-direction: column;
}

.tech-item h4 {
    margin: 0;
    font-size: 1.5rem;
    color: #4CAF50; /* 綠色文字 */
}

.tech-item p {
    margin: 5px 0 0 0;
    color: #b0b0b0; /* 中灰色文字 */
}

.details {
    overflow: hidden; /* 隱藏超出部分 */
    height: 0; /* 初始高度為0 */
    opacity: 0; /* 初始透明度為0 */
    transition: height 0.5s ease, opacity 0.5s ease, padding 0.5s ease; /* 添加高度、透明度和內邊距的過渡效果 */
    margin-top: 10px;
    background-color: #2c2c2c; /* 深灰色背景 */
    padding: 0 15px; /* 初始padding設為0以隱藏 */
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2); /* 添加陰影 */
}

.details p {
    margin: 0;
    color: #e0e0e0; /* 淺灰色文字 */
}

.details.show {
    height: auto; /* 設置顯示時的高度為自動 */
    opacity: 1; /* 設置透明度為1 */
    padding: 15px; /* 恢復padding */
}

.details-btn {
    margin-top: 10px;
    padding: 10px 15px;
    background-color: #4CAF50; /* 綠色背景 */
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease; /* 添加過渡效果 */
}

.details-btn:hover {
    background-color: #45A049; /* 鼠標懸停時背景變深 */
}

/* 修改文章分類顏色 */
.widget ul li a {
    color: #4CAF50; /* 綠色文字 */
    text-decoration: none;
    padding: 0.5rem 0;
    display: block;
}

.widget ul li a:hover {
    color: #388E3C; /* 當鼠標懸停時變為深綠色 */
}

/* 美化標題 */
#technologies h3, #impact h3, #history h3, #contact h3, #team h3 {
    font-size: 2.5rem; /* 增加字體大小 */
    font-weight: bold; /* 加粗字體 */
    color: #e0e0e0; /* 淺灰色文字 */
    text-align: center; /* 置中對齊 */
    margin-bottom: 1rem; /* 增加底部邊距 */
    text-transform: uppercase; /* 轉為大寫字母 */
    letter-spacing: 2px; /* 增加字母間距 */
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2); /* 添加文字陰影 */
    border-bottom: 2px solid #4CAF50; /* 底部加綠色邊框 */
    padding-bottom: 10px; /* 增加底部填充 */
}

/* 響應式設計 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    aside {
        margin-left: 0;
    }

    .team-member, .tech-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .team-member img, .tech-item img {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .team-info, .tech-info {
        align-items: center;
        text-align: center;
    }

    #technologies h3, #impact h3, #history h3, #contact h3, #team h3 {
        font-size: 2rem; /* 調整小螢幕上的字體大小 */
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    /* 針對平板電腦大小進行調整 */
    .team-member, .tech-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .team-member img, .tech-item img {
        margin-right: 0;
        margin-bottom: 10px;
    }
    .team-info, .tech-info {
        align-items: center;
        text-align: center;
    }

    #technologies h3, #impact h3, #history h3, #contact h3, #team h3 {
        font-size: 2.2rem; /* 調整平板上的字體大小 */
    }
}

@media (min-width: 1025px) {
    /* 針對桌面大小進行調整 */
    .team-member, .tech-item {
        flex-direction: row;
        align-items: center;
        text-align: left;
    }
    .team-info, .tech-info {
        align-items: flex-start;
        text-align: left;
    }

    #technologies h3, #impact h3, #history h3, #contact h3, #team h3 {
        font-size: 2.5rem; /* 恢復桌面上的字體大小 */
    }
}
