/* General Styles */
body {
    font-family: 'Noto Sans TC', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.section-padding {
    padding: 60px 0;
}

.bg-light {
    background-color: #f8f8f8;
}

h1, h2, h3 {
    color: #004080; /* Darker blue for headings */
    text-align: center;
    margin-bottom: 30px;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.btn {
    display: inline-block;
    background-color: #007bff;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #0056b3;
    text-decoration: none;
}

/* Header */
header {
    background-color: #ffffff;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px; /* Adjust as needed */
    margin-right: 10px;
}

.logo h1 {
    margin: 0;
    color: #004080;
    font-size: 24px;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: #004080;
    font-weight: bold;
    padding: 5px 0;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #007bff;
    text-decoration: none;
}

/* Hero Section */
#hero {
    background: linear-gradient(rgba(0, 64, 128, 0.7), rgba(0, 64, 128, 0.7)), url('images/hero_background.jpg') no-repeat center center/cover;
    color: #fff;
    text-align: center;
    padding: 50px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
}

.hero-content {
    max-width: 800px;
}

#hero h2 {
    color: #fff;
    font-size: 2.8em;
    margin-bottom: 20px;
}

#hero p {
    font-size: 1.2em;
    margin-bottom: 30px;
}

/* About Section */
#about .about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Three columns, responsive */
    gap: 30px;
    margin-bottom: 40px; /* Space before the image */
}

#about .about-column {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-top: 5px solid #007bff;
}

#about .about-column h3 {
    text-align: left;
    color: #004080;
    margin-top: 0;
    margin-bottom: 15px;
}

#about .about-column ul {
    list-style: disc;
    margin-left: 20px;
}

#about .about-column p {
    margin-bottom: 0; /* Remove extra margin for paragraphs */
}

#about .about-image {
    text-align: center;
    margin-top: 20px;
}

#about .about-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Services Section */
#services .services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

#services .service-category {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-top: 5px solid #007bff;
}

#services .service-category h3 {
    text-align: left;
    color: #004080;
    margin-bottom: 20px;
}

#services .service-category ul {
    list-style: disc;
    margin-left: 20px;
}

#services .service-category ul li {
    margin-bottom: 8px;
}

/* Projects Section */
#projects .projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* 4 columns like gallery */
    gap: 20px; /* Space between project items */
}

#projects .project-item {
    background-color: #fff;
    padding: 20px;
    border-left: 5px solid #007bff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-radius: 4px;
    display: flex; /* Use flex to align content within item */
    flex-direction: column; /* Stack image and text */
    align-items: center; /* Center content horizontally */
    text-align: center; /* Center text within the item */
    /* 新增浮動特效 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#projects .project-item:hover {
    transform: translateY(-5px); /* 向上浮動 */
    box-shadow: 0 8px 16px rgba(0,0,0,0.2); /* 加深陰影 */
}

#projects .project-item img {
    max-width: 100%;
    height: 100px; /* Fixed height for consistent image size */
    object-fit: contain; /* Ensure image content is fully visible */
    margin-bottom: 10px; /* Space between image and text */
    border: 1px solid #eee; /* Light border for image placeholders */
    border-radius: 4px;
}

#projects .project-item strong {
    color: #004080;
}

/* Gallery Section */
#gallery h3 {
    text-align: left;
    color: #004080;
    margin-top: 40px;
    margin-bottom: 20px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

#gallery .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

#gallery figure {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-align: center;
    padding-bottom: 15px;
    /* 新增浮動特效 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#gallery figure:hover {
    transform: translateY(-5px); /* 向上浮動 */
    box-shadow: 0 8px 16px rgba(0,0,0,0.2); /* 加深陰影 */
}

#gallery figure img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid #eee;
}

#gallery figcaption {
    padding: 15px 10px 0;
    font-size: 0.9em;
    color: #555;
}

/* Contact Section */
#contact {
    background-color: #e6f2ff; /* Light blue background */
}

#contact h2 {
    margin-bottom: 40px;
}

#contact .contact-grid {
    display: flex; /* Use flexbox for columns */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    justify-content: center; /* Center columns */
    gap: 40px; /* Space between columns */
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    background-color: #fff; /* White background for the grid itself */
    align-items: flex-start; /* Align columns to the top */
}

#contact .contact-column {
    flex: 1; /* Each column takes equal space */
    min-width: 280px; /* Minimum width before wrapping */
    padding: 20px;
    text-align: left; /* Align text to left within columns */
}

#contact .contact-column h3 {
    text-align: left; /* Ensure column title is left-aligned */
    margin-top: 0;
    margin-bottom: 20px;
    color: #004080;
    font-size: 1.2em; /* Adjust to ensure similar size to other text, or remove if not needed */
}

#contact .contact-column p {
    margin-bottom: 8px; /* Slightly less margin for tighter spacing */
    font-size: 0.9em; /* Reduced by approximately 2 points from 1.1em, assuming default is 16px */
}

#contact .contact-column strong {
    color: #004080;
}

/* Footer */
footer {
    background-color: #004080;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
}

/* Responsive Design */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li {
        margin: 5px 10px;
    }

    #hero h2 {
        font-size: 2em;
    }

    #about .about-grid {
        grid-template-columns: 1fr; /* Stack columns on small screens */
    }

    #about .about-image {
        margin-top: 30px;
    }

    #services .services-grid {
        grid-template-columns: 1fr;
    }

    #projects .projects-grid {
        grid-template-columns: 1fr; /* Stack on small screens */
    }

    #contact .contact-grid {
        flex-direction: column; /* Stack columns on small screens */
        gap: 20px;
    }

    #contact .contact-column {
        min-width: unset; /* Remove min-width to allow full width */
        text-align: center; /* Center text on small screens */
    }

    #contact .contact-column h3 {
        text-align: center; /* Center column title on small screens */
    }
}

