/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Root Variables */
:root {
    --bg-light: #f9f9f9;
    --bg-dark: #333;
    --text-dark: #333;
    --text-light: #fff;
    --primary-color: #00A9E0; /* Sky Blue */
    --secondary-color: #555;
    --shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

/* Body & Container */
body {
    font-family: Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
}

/* Header */
header {
    background-color: #ffffff;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* LOGO */
.logo img {
    width: auto;
    max-height: 100px;
    margin-right: 10px;
}

/* 公司名稱排列 (水平排列) */
.company-name {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 公司名稱標題 */
.company-name h1 {
    font-size: 32px;
    color: var(--text-dark);
    margin-bottom: 5px;
}

/* 英文名稱 */
.company-name .english-name {
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 14px;
    color: #777;
}

/* Navigation */
nav {
    background-color: var(--bg-dark);
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 10px 0;
}

nav ul li {
    margin: 0 15px;
    position: relative;
}

nav ul li a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 16px;
    padding: 10px;
    display: block;
}

nav ul li a:hover {
    background-color: #555;
}

nav ul li a .english {
    font-size: 12px;
    color: #aaa;
}

/* Dropdown Styles */
nav ul .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #333;
    width: 200px;
    border: 1px solid #444;
    z-index: 1000;
}

nav ul li.has-dropdown:hover .dropdown {
    display: block;
}

.dropdown li {
    list-style: none;
}

.dropdown li a {
    display: block;
    padding: 10px;
    color: white;
    text-decoration: none;
}

.dropdown li a:hover {
    background-color: #555;
}

/* Image Slider */
#slider {
    margin-top: 5px;
}

.slider-container {
    width: 100%;
    overflow: hidden;
}

.slider-images {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slider-img {
    width: 100%;
    height: 75%;
    flex-shrink: 0;
}

.slider-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Section Title */
.section-title {
    text-align: center;
    margin-bottom: 20px;
}

.section-title h2 {
    font-size: 28px;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 4px solid var(--text-dark);
    display: inline-block;
    padding-bottom: 10px;
}

/* About Section */
#about {
    background-color: #f1f1f1;
    padding: 60px 0;
}

.about-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.about-text {
    width: 48%;
    font-size: 18px;
    color: #555;
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 20px;
}

.about-image {
    width: 48%;
    margin-bottom: 20px;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .about-text, .about-image {
        width: 100%;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .about-text, .about-image {
        width: 100%;
    }
}

/* Work Environment Section */
#environment {
    background-color: #f9f9f9;
    padding: 40px 0;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.image-gallery img {
    width: 100%;
    height: 450px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .image-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .image-gallery {
        grid-template-columns: 1fr;
    }
}

/* Features Section */
#features {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.features-content {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-item {
    background-color: white;
    width: 23%;
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s ease-in-out;
}

.feature-item h3 {
    color: var(--text-dark);
    font-size: 18px;
}

.feature-item p {
    color: #555;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .feature-item {
        width: 48%;
    }
}

@media (max-width: 768px) {
    .feature-item {
        width: 100%;
    }
}

/* Footer */
footer {
    background-color: black;
    text-align: center;
    padding: 20px 0;
    color: white;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        text-align: center;
    }

    .about-content, .features-content {
        flex-direction: column;
        align-items: center;
    }

    .about-text, .feature-item {
        width: 100%;
    }

    .image-gallery {
        grid-template-columns: 1fr;
    }

    nav ul {
        flex-direction: column;
        text-align: center;
    }
}

/* Section Title Style */
.section-title h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--text-dark);
    padding-bottom: 10px;
    display: inline-block;
}

/* Contact Section */
#contact {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.contact-info {
    font-size: 18px;
    color: #555;
    margin-bottom: 30px;
}

.contact-info p {
    margin-bottom: 15px;
}

.contact-info strong {
    color: var(--text-dark);
}

/* Contact Section Title */
#contact .section-title h2 {
    font-size: 28px;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 40px;
    border-bottom: 4px solid var(--text-dark);
    padding-bottom: 10px;
}

/* Google Map */
.google-map {
    display: flex;
    justify-content: flex-end; /* 讓地圖靠右 */
    margin-top: 5px; /* 與前方文字間距 5px */
    margin-right: 5px; /* 增加右邊間距，避免與文字重疊 */
}

.google-map-iframe {
    width: 850px; /* PC 版寬度 */
    max-width: 95%; /* 防止溢出 */
    border: none; /* 移除地圖邊框 */
}

/* 手機版 (寬度小於 768px 時) */
@media screen and (max-width: 768px) {
    .google-map {
        justify-content: center; /* 手機版置中 */
        margin-right: 0; /* 清除手機版的右邊間距 */
    }
    .google-map-iframe {
        width: 100%; /* 手機版地圖寬度 */
        height: 300px; /* 可調整地圖的高度 */
    }
}

/* 聯絡我們 h2 標題專屬樣式 */
#contact .contact-title {
    font-size: 36px;
    font-weight: bold;
    color: #0066cc;
    text-align: left;
    text-transform: uppercase;
    margin-bottom: 15px;
}
