/* ========= 共用基礎 ========= */
html, body {
    height: 100%;
    margin: 0;
    font-family: "DFKai-SB", "標楷體", serif; /* 全站標楷體 */
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
}

/* ========= Header ========= */
header {
    background: #8B5A2B;
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* LOGO a 樣式，避免藍色底線 */
header .logo a {
    color: white;
    text-decoration: none;
    font-size: 26px;
    font-weight: bold;
}

header nav a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    font-size: 16px;
}

header nav a:hover {
    text-decoration: underline;
}

/* 響應式 Header */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: center;
    }

    header nav {
        margin-top: 10px;
    }

    header nav a {
        display: block;
        margin: 5px 0;
    }
}

/* ========= Hero ========= */
.hero {
    background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url("/image/background.jpg");
    background-size: cover;
    background-position: center;
    padding: 140px 20px;
    text-align: center;
    color: white;
}

.hero h2 {
    font-size: 36px;
    margin-bottom: 15px;
}

.hero p {
    font-size: 20px;
}

/* ========= Container ========= */
.container {
    flex: 1;
    max-width: 1100px;
    margin: 30px auto;
    padding: 30px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    line-height: 1.8;
}

/* ========= Services ========= */
.services {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.service-box {
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
    text-align: center;
}

/* ========= Gallery / 成品圖 ========= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 一列 5 張 */
    gap: 15px;
}

.gallery-grid .grid-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(0,0,0,0.2);
    transition: transform 0.3s;
}

.gallery-grid .grid-item img:hover {
    transform: scale(1.03);
}

/* 響應式 Gallery */
@media(max-width:1200px){
    .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}
@media(max-width:900px){
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}
@media(max-width:600px){
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media(max-width:400px){
    .gallery-grid { grid-template-columns: repeat(1, 1fr); }
}

/* ========= Contact ========= */
.container.contact {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start; /* 左對齊 */
    padding: 30px;
    margin: 40px auto;
    max-width: 600px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #f9f9f9;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    font-size: 18px;
    line-height: 1.6;
}

.container.contact p {
    margin: 10px 0;
}

/* ========= Footer ========= */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 15px 0;
    font-size: 14px;
}