/* 基本樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
a {
    text-decoration: none;
    color: #ff6f22;
}
ul {
    list-style: none;
}
img {
    max-width: 100%;
}
.btn {
    display: inline-block;
    background-color: #ff6f22;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s;
}
.btn:hover {
    background-color: #004d99;
}
.section-title {
    text-align: center;
    margin-bottom: 40px;
    color: #333;
    font-size: 2rem;
}
.logo {
    display: flex;
    align-items: center;
}
.logo img {
    height: 50px; /* 調整 Logo 大小 */
    margin-right: 10px;
}
.full-width-img {
    width: 100%;
    height: auto;
}
/* 頂部導航欄樣式 */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}
.logo h1 {
    font-size: 1.5rem;
    color: #ff6f22;
}
nav ul {
    display: flex;
}
nav ul li {
    margin-left: 20px;
}
nav ul li a {
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}
nav ul li a:hover {
    color: #ff6f22;
}
/* 首頁橫幅部分 */
.hero {
    height: 60vh;
    background: linear-gradient(rgba(0,0,0,0.1), rgba(0,0,0,0.6)), url('/images/bannerpng.png') no-repeat center center/cover;
    display: flex;
    align-items: center;
    text-align: center;
    color: #fff;
    padding-top: 100px;
}
.hero-content {
    max-width: 800px;
    margin: 0 auto;
}
.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 20px;
	text-align: center; /* 標題居中 */
}
.hero-content p:first-of-type {
    font-size: 1.2rem;
    margin-bottom: 30px;
	text-align: center; /* 第一個段落（副標題）居中 */
}
.hero-content p:not(:first-of-type) {
    font-size: 1.1rem;
    margin-bottom: 30px;
    text-align: left; /* 其他段落（主要內容）靠左對齊 */
    line-height: 1.8; /* 增加行高，提高可讀性 */
}
/* 服務部分 */
.services {
    padding: 80px 0;
    background-color: #f9f9f9;
}
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    grid-auto-rows: minmax(400px, auto); /* 增加 grid 的最小高度 */
}
.service-card {
    background-color: #fff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
	display: flex;
    flex-direction: column;
}
.service-card:hover {
    transform: translateY(-10px);
}
/* 創建固定高度的圖片容器 */
.service-card .img-container {
    height: 300px; /* 調整為適合你圖片的高度 */
    overflow: hidden;
    display: flex;
    align-items: flex-start; /* 圖片向上對齊 */
}
.service-card img {
    width: 100%;
    height: auto;
    object-fit: contain;
}
/* 統一標題高度和對齊方式 */
.service-card h3 {
    padding: 20px 20px 10px;
    color: #ff6f22;
    min-height: 60px; /* 確保所有標題有一致的高度空間 */
    display: flex;
    align-items: center; /* 垂直居中 */
    justify-content: center; /* 水平居中 */
    text-align: center; /* 文字居中 */
}
.service-card p {
    padding: 0 20px 20px;
}
/* 項目案例部分 */
.projects {
    padding: 80px 0;
    background-color: #f0f5fb;
}
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.project-card {
    background-color: #fff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%; /* 確保所有卡片高度一致 */	
}
.project-card:hover {
    transform: translateY(-10px);
}
/* 創建固定高度的圖片容器，確保圖片向上對齊 */
.project-card .img-container {
    height: 200px; /* 根據實際圖片調整合適的高度 */
    display: flex;
    align-items: stretch; /* 圖片置中 */
}
.project-card img {
    width: 100%;
    height: auto;
    object-fit: contain;
}
/* 讓所有標題有統一高度與對齊方式 */
.project-card h3 {
    padding: 20px 20px 10px;
    color: #ff6f22;
    min-height: 70px; /* 根據你的標題長度調整，確保能容納兩行文字 */
    display: flex;
    align-items: center; /* 垂直居中 */
    justify-content: center; /* 水平居中 */
    text-align: center; /* 文字居中 */
    margin: 0; /* 移除可能的預設邊距 */	
}
.project-card p {
    padding: 0 20px 20px;
}
/* 關於我們部分 */
.about {
    padding: 80px 0;
}
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}
.about-text p {
    margin-bottom: 20px;
}
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}
.feature {
    padding: 30px;
    border-radius: 5px;
    background-color: #f9f9f9;
    transition: transform 0.3s;
}
.feature:hover {
    transform: translateY(-10px);
}
.feature i {
    font-size: 2.5rem;
    color: #ff6f22;
    margin-bottom: 20px;
}
.feature h3 {
    margin-bottom: 10px;
    color: #333;
}
/* 聯繫方式部分 - 修改以實現並排顯示 */
.contact {
    padding: 80px 0;
    background-color: #f9f9f9;
}
.contact-content {
    display: flex; /* 改為 flex 佈局 */
    justify-content: space-between; /* 兩邊對齊 */
    gap: 40px; /* 保持間距 */
}
.contact-info {
    flex: 1; /* 佔用等比例空間 */
    max-width: 45%; /* 控制最大寬度 */
}
.contact-form {
    flex: 1; /* 佔用等比例空間 */
    max-width: 45%; /* 控制最大寬度 */
}
.contact-item {
    display: flex;
    margin-bottom: 30px;
}
.contact-item i {
    font-size: 1.5rem;
    color: #ff6f22;
    margin-right: 20px;
    margin-top: 5px;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}
/* 頁腳 */
footer {
    background-color: #333;
    color: #fff;
    padding: 60px 0 20px;
}
.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}
.footer-info h3,
.footer-links h3 {
    margin-bottom: 20px;
    color: #fff;
}
.footer-links ul li {
    margin-bottom: 10px;
}
.footer-links ul li a {
    color: #ddd;
}
.footer-links ul li a:hover {
    color: #fff;
}
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
h1,h2 {
    font-weight: normal;
}
/* 響應式設計 */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 1.2rem;
    }
    
    nav ul {
        display: none; /* 用於移動菜單切換 - 需要JavaScript來實現 */
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .about-content,
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    /* 調整聯繫方式響應式佈局 */
    .contact-content {
        flex-direction: column; /* 小屏幕上垂直排列 */
    }
    
    .contact-info,
    .contact-form {
        max-width: 100%; /* 小屏幕上佔滿寬度 */
    }
}
