:root {
    --primary-color: #002D56;
    --accent-color: #D4AF37;
    --text-color: #333;
    --bg-light: #f8f9fa;
}

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

body {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: #fff;
}

/* Header */
header {
    position: fixed;
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid #eee;
}

.logo {
    display: flex;
    align-items: center;
    margin: -20px 0; /* counter header padding so logo keeps full size */
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--primary-color);
}

.logo img {
    height: 100px;
    width: 100px;
    object-fit: contain;
    display: block;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-toggle span {
    display: block;
    height: 2px;
    width: 24px;
    background: var(--text-color);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.is-open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

nav {
    display: flex;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    margin-left: 30px;
    font-size: 14px;
    font-weight: 400;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--accent-color);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(0,45,86,0.7), rgba(0,45,86,0.7)), url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?auto=format&fit=crop&q=80&w=2000') no-repeat center center/cover;
    color: white;
    text-align: center;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 4px;
    animation: fadeInUp 1.2s ease forwards;
}

.hero-content p {
    font-size: 18px;
    letter-spacing: 2px;
    font-weight: 300;
    animation: fadeInUp 1.5s ease forwards;
}

/* News Section */
.news-section {
    padding: 60px 50px;
    background: var(--bg-light);
    display: flex;
    align-items: baseline;
}

.news-label {
    font-weight: 700;
    margin-right: 50px;
    font-size: 12px;
    letter-spacing: 2px;
    border-bottom: 2px solid var(--primary-color);
}

.news-item {
    font-size: 14px;
    color: #666;
}

/* Service Section */
.services {
    padding: 100px 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 80px;
}

.section-title h2 {
    font-size: 32px;
    letter-spacing: 4px;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.section-title h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: var(--accent-color);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.service-card {
    padding: 40px;
    border: 1px solid #eee;
    transition: all 0.4s;
    cursor: pointer;
}

.service-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 20px;
    color: var(--primary-color);
}

.service-card p {
    font-size: 14px;
    color: #777;
    text-align: justify;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: white;
    padding: 80px 50px;
    text-align: center;
}

.footer-logo {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
}

.copyright {
    margin-top: 40px;
    font-size: 12px;
    opacity: 0.6;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    header {
        padding: 20px;
    }

    .menu-toggle {
        display: flex;
    }

    #primary-nav {
        position: absolute;
        top: 100%;
        right: 20px;
        background: #fff;
        border: 1px solid #eee;
        box-shadow: 0 10px 30px rgba(0,0,0,0.08);
        border-radius: 10px;
        padding: 20px;
        display: flex;
        flex-direction: column;
        gap: 15px;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    #primary-nav.is-open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    nav a {
        margin-left: 0;
    }

    .service-grid { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: 28px; }
}

/* 更新後的樣式 */
.services {
    padding: 100px 5% 120px;
    background-color: #f9fbff;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.sub-title {
    color: #0077B6;
    font-weight: 700;
    font-size: 16px;
    display: block;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.section-header h2 {
    font-size: 32px;
    color: #333;
    font-weight: 700;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2x2 佈局 */
    gap: 30px;
}

.service-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

.card-image {
    height: 240px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 30px;
}

.card-content h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.arrow {
    color: #0077B6;
    font-size: 24px;
    transition: margin-left 0.3s ease;
}

.service-card:hover .arrow {
    margin-left: 10px;
}

.card-content p {
    font-size: 15px;
    color: #666;
    line-height: 1.8;
    text-align: justify;
}

/* 手機版適應 */
@media (max-width: 900px) {
    .service-grid {
        grid-template-columns: 1fr;
    }
}
