/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Microsoft JhengHei', '微軟正黑體', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

header.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 40px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}

.logo a {
    font-size: 24px;
    font-weight: bold;
    color: #2c5aa0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo a:hover {
    color: #1e3d6f;
}

.nav-menu a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.nav-menu a:hover {
    background-color: #f0f0f0;
}

/* Main Content Styles */
main {
    margin-top: 70px;
}

/* Section Backgrounds */
section {
    padding: 80px 0;
    background-color: #ffffff;
}

section:nth-child(even) {
    background-color: #f8f9fa;
}

/* Hero Section */
.hero {
    background-image: linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.3)), url('images/desk-3139127_1920.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #000000;
    padding: 120px 0;
    text-align: center;
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 56px;
    font-weight: bold;
    margin: 0;
    color: #000000;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.9), -1px -1px 3px rgba(255, 255, 255, 0.9);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

/* Section Headings */
h1, h2, h3 {
    margin-bottom: 30px;
    color: #2c3e50;
}

h1 {
    font-size: 42px;
    font-weight: 300;
}

h2 {
    font-size: 32px;
    font-weight: 400;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -15px;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background-color: #3498db;
}

h3 {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 20px;
}

/* Text Styles */
p {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.7;
    color: #555;
}

a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* About and Cooperation Sections */
.about, .cooperation, .contact {
    text-align: left;
}

.section-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.cooperation .section-content {
    grid-template-columns: 1fr 1fr;
}

.cooperation .section-text {
    order: 2;
}

.cooperation .section-image {
    order: 1;
}

.section-text h2 {
    text-align: left;
    margin-bottom: 30px;
}

.section-text h2::after {
    left: 0;
    transform: none;
}

.section-text p {
    max-width: none;
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #666;
}

.service-list {
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
    list-style-type: disc;
    padding-left: 20px;
}

.service-list li {
    margin-bottom: 12px;
    font-size: 16px;
    line-height: 1.6;
    color: #555;
}

.service-note {
    margin-top: 20px;
    font-weight: 500;
    color: #333;
}

.section-image {
    text-align: center;
}

.section-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Contact Section */
.contact {
    background-color: #f8f9fa;
}

.contact .section-text h2 {
    text-align: left;
}

.contact .section-text p {
    font-size: 18px;
    color: #666;
}

/* Social Section */
.social {
    background-color: #f8f9fa;
    text-align: center;
}

.social h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
}

.facebook-embed {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    width: 100%;
}

/* 電腦版：佔用內容區域的50% */
@media (min-width: 768px) {
    .facebook-embed {
        width: 50%;
        margin: 20px auto;
    }
    
    .fb-page {
        width: 100% !important;
        max-width: 600px;
    }
}

/* 手機版：滿寬度 */
@media (max-width: 767px) {
    .facebook-embed {
        width: 100%;
        margin: 20px 0;
    }
    
    .fb-page {
        width: 100% !important;
        max-width: none;
    }
}

.social h2 a {
    display: inline-block;
    background-color: #3b5998;
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
}

.social h2 a:hover {
    background-color: #2d4373;
    transform: translateY(-2px);
    text-decoration: none;
}

/* Privacy Policy Styles */
.privacy-policy {
    background-color: #fff;
    padding: 120px 0 60px;
}

.privacy-policy h1 {
    text-align: center;
    margin-bottom: 40px;
}

.privacy-policy ul {
    margin: 20px 0;
    padding-left: 30px;
}

.privacy-policy li {
    margin-bottom: 10px;
    line-height: 1.7;
}

/* Footer Styles */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 40px 0;
    text-align: center;
}

footer p {
    margin-bottom: 15px;
    color: #bdc3c7;
}

footer a {
    color: #3498db;
}

footer a:hover {
    color: #2980b9;
}

.footer-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
}

.footer-nav a {
    color: #bdc3c7;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.footer-nav a:hover {
    background-color: #34495e;
    color: white;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 15px 20px;
    }
    
    .logo-img {
        height: 32px;
        max-width: 120px;
    }
    
    .hero {
        min-height: 400px;
        padding: 80px 0;
        background-attachment: scroll;
    }
    
    .hero-content h1 {
        font-size: 42px;
    }
    
    .section-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .cooperation .section-text,
    .cooperation .section-image {
        order: unset;
    }
    
    .section-text {
        text-align: center;
    }
    
    .section-text h2 {
        text-align: center;
    }
    
    .section-text h2::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .section-img {
        height: 200px;
    }
    
    h1 {
        font-size: 32px;
    }
    
    h2 {
        font-size: 28px;
    }
    
    .about p, .cooperation p, .contact p {
        font-size: 16px;
    }
    
    section {
        padding: 60px 0;
    }
    
    .privacy-policy {
        padding: 100px 0 40px;
    }
    
    .footer-nav ul {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    h1 {
        font-size: 28px;
    }
    
    h2 {
        font-size: 24px;
    }
    
    p {
        font-size: 16px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 12px;
    }
    
    #contact-form button {
        padding: 12px 30px;
        font-size: 16px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus styles for accessibility */
button:focus,
input:focus,
textarea:focus,
a:focus {
    outline: 2px solid #2c5aa0;
    outline-offset: 2px;
}

/* Loading animation for form submission */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading button::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
