﻿:root {
    --color-text: #303633;
    --color-muted: #7b827d;
    --color-background: #ffffff;
    --color-soft: #f5f6f3;
    --color-border: #e6e9e5;
    --content-width: 1200px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
    color: var(--color-text);
    background: var(--color-background);
    line-height: 1.8;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-container {
    width: min(92%, var(--content-width));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

    .site-header.header-hidden {
        transform: translateY(-100%);
    }

    .site-header:not(.header-hidden) {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    }

@media (prefers-reduced-motion: reduce) {
    .site-header {
        transition: none;
    }
}

.header-inner {
    min-height: 92px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
}

.site-logo-image {
    display: block;
    width: 76px;
    height: 76px;
    object-fit: contain;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    white-space: nowrap;
}

.site-logo-text {
    display: block;
    font-size: 25px;
    font-weight: 600;
    letter-spacing: 3px;
    line-height: 1.5;
    color: var(--color-text);
}

    .site-logo-text small {
        display: block;
        font-size: 10px;
        font-weight: 400;
        letter-spacing: 2px;
        color: var(--color-muted);
    }

.site-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

    .site-nav a {
        font-size: 14px;
        letter-spacing: 1px;
        transition: color .2s;
    }

        .site-nav a:hover {
            color: #8a9c8b;
        }

main {
    min-height: 60vh;
}

.site-footer {
    background: var(--color-soft);
    padding: 60px 0 35px;
    margin-top: 80px;
}

.footer-brand {
    font-size: 22px;
    letter-spacing: 3px;
}

.site-footer p {
    margin: 8px 0;
    color: var(--color-muted);
    font-size: 13px;
}

.copyright {
    margin-top: 32px !important;
    font-size: 11px !important;
}

@media (max-width: 900px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 0;
        gap: 16px;
    }

    .site-nav {
        width: 100%;
        gap: 12px 24px;
        flex-wrap: wrap;
    }

        .site-nav a {
            font-size: 13px;
        }
}

@media (max-width: 600px) {
    .site-logo {
        font-size: 22px;
    }

    .site-footer {
        padding: 40px 0 25px;
    }
}

/* Project Type */

.project-page-header {
    background: var(--color-soft);
    padding: 40px 0 35px;
}

.project-eyebrow {
    font-size: 12px;
    letter-spacing: 3px;
    color: var(--color-muted);
    margin: 0 0 12px;
}

.project-page-header h1 {
    font-size: 36px;
    font-weight: 500;
    letter-spacing: 5px;
    margin: 0 0 16px;
}

.project-intro {
    font-size: 15px;
    color: var(--color-muted);
    margin: 0;
}

.project-section {
    padding-top: 75px;
    padding-bottom: 40px;
}

.project-type-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 60px 36px;
}

.project-type-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-type-image {
    position: relative;
    flex-shrink: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--color-soft);
}

    .project-type-image img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .5s ease;
    }

.project-type-card:hover .project-type-image img {
    transform: scale(1.04);
}

.project-type-placeholder {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    background: #e9ede9;
    color: #89948c;
    font-size: 12px;
    letter-spacing: 3px;
}

.project-type-info {
    display: flex;
    flex: 1;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 22px 4px;
    border-bottom: 1px solid var(--color-border);
}

    .project-type-info h2 {
        margin: 0 0 8px;
        font-size: 23px;
        font-weight: 500;
        letter-spacing: 2px;
    }

    .project-type-info p {
        margin: 2px 0;
        font-size: 13px;
        color: var(--color-muted);
    }

.project-type-arrow {
    font-size: 26px;
    font-weight: 300;
    transition: transform .2s;
}

.project-type-card:hover .project-type-arrow {
    transform: translateX(6px);
}

.project-empty {
    padding: 80px 0;
    text-align: center;
    color: var(--color-muted);
}

@media (max-width: 700px) {
    .project-page-header {
        padding: 55px 0;
    }

        .project-page-header h1 {
            font-size: 29px;
        }

    .project-section {
        padding-top: 45px;
    }

    .project-type-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .project-type-info h2 {
        font-size: 21px;
    }
}

/* Project List */

.project-list-section {
    padding-top: 45px;
    padding-bottom: 50px;
}

.project-list-navigation {
    margin-bottom: 35px;
}

    .project-list-navigation a {
        font-size: 13px;
        color: var(--color-muted);
        transition: color .2s;
    }

        .project-list-navigation a:hover {
            color: var(--color-text);
        }

.project-list {
    border-top: 1px solid var(--color-border);
}

.project-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    padding: 30px 15px;
    border-bottom: 1px solid var(--color-border);
    transition: background-color .2s, padding-left .2s;
}

    .project-list-item:hover {
        background-color: var(--color-soft);
        padding-left: 25px;
    }

.project-list-name {
    font-size: 19px;
    font-weight: 500;
    letter-spacing: 1px;
}

.project-list-more {
    flex-shrink: 0;
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--color-muted);
}

    .project-list-more span {
        margin-left: 12px;
        font-size: 20px;
        vertical-align: middle;
    }

@media (max-width: 700px) {
    .project-list-section {
        padding-top: 30px;
    }

    .project-list-item {
        padding: 23px 10px;
    }

    .project-list-name {
        font-size: 16px;
    }

    .project-list-more {
        font-size: 0;
    }

        .project-list-more span {
            font-size: 22px;
            margin-left: 0;
        }
}

/* Project Detail */

.project-detail-section {
    padding-top: 45px;
    padding-bottom: 50px;
}

.project-detail-navigation {
    margin-bottom: 45px;
}

    .project-detail-navigation a,
    .project-detail-bottom a {
        font-size: 13px;
        color: var(--color-muted);
        transition: color .2s;
    }

        .project-detail-navigation a:hover,
        .project-detail-bottom a:hover {
            color: var(--color-text);
        }

.project-detail-content {
    max-width: 900px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 2;
    color: var(--color-text);
    overflow-wrap: anywhere;
}

    .project-detail-content h1,
    .project-detail-content h2,
    .project-detail-content h3 {
        font-weight: 500;
        line-height: 1.5;
        margin: 30px 0 15px;
    }

    .project-detail-content p {
        margin: 0 0 20px;
    }

    .project-detail-content img {
        display: block;
        max-width: 100%;
        height: auto;
        margin: 25px auto;
    }

    .project-detail-content table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        border-collapse: collapse;
    }

    .project-detail-content td,
    .project-detail-content th {
        border: 1px solid var(--color-border);
        padding: 10px 15px;
    }

    .project-detail-content a {
        color: #527c69;
        text-decoration: underline;
    }

.project-detail-bottom {
    max-width: 900px;
    margin: 65px auto 0;
    padding-top: 25px;
    border-top: 1px solid var(--color-border);
}

@media (max-width: 700px) {
    .project-detail-section {
        padding-top: 30px;
    }

    .project-detail-navigation {
        margin-bottom: 30px;
    }

    .project-detail-content {
        font-size: 15px;
        line-height: 1.9;
    }

    .project-detail-bottom {
        margin-top: 45px;
    }
}

/* Service Items */

.item-section {
    padding-top: 70px;
    padding-bottom: 40px;
}

.item-card {
    display: grid;
    grid-template-columns: 36% 1fr;
    gap: 55px;
    padding: 50px 10px;
    border-bottom: 1px solid var(--color-border);
}

    .item-card:first-child {
        border-top: 1px solid var(--color-border);
    }

.item-heading {
    display: flex;
    align-items: flex-start;
    gap: 22px;
}

.item-title h2 {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 500;
    letter-spacing: 2px;
}

.item-title p {
    margin: 2px 0;
    font-size: 13px;
    color: var(--color-muted);
}

.item-description {
    font-size: 15px;
    line-height: 2;
    overflow-wrap: anywhere;
}

    .item-description p {
        margin: 0 0 18px;
    }

    .item-description h1,
    .item-description h2,
    .item-description h3 {
        font-weight: 500;
        line-height: 1.5;
    }

    .item-description img {
        max-width: 100%;
        height: auto;
    }

    .item-description table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        border-collapse: collapse;
    }

    .item-description td,
    .item-description th {
        border: 1px solid var(--color-border);
        padding: 8px 12px;
    }

@media (max-width: 700px) {
    .item-section {
        padding-top: 35px;
    }

    .item-card {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 35px 5px;
    }

    .item-title h2 {
        font-size: 21px;
    }

    .item-description {
        font-size: 15px;
    }
}


/* 最新消息列表 */

.news-page {
    padding-top: 70px;
    padding-bottom: 50px;
}

.news-list {
    border-top: 1px solid var(--color-border);
}

.news-list-item {
    display: flex;
    align-items: center;
    gap: 35px;
    padding: 26px 15px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
    transition: background-color 0.2s ease;
}

    .news-list-item:hover {
        background-color: var(--color-soft);
    }

.news-list-date {
    flex: 0 0 125px;
    color: var(--color-muted);
    font-size: 14px;
    letter-spacing: 1px;
}

.news-list-subject {
    flex: 1;
    font-size: 16px;
    line-height: 1.8;
}

.news-list-arrow {
    flex: 0 0 auto;
    color: var(--color-muted);
    font-size: 20px;
}

.news-empty {
    padding: 60px 15px;
    text-align: center;
    color: var(--color-muted);
}

@media (max-width: 600px) {
    .news-page {
        padding-top: 45px;
    }

    .news-list-item {
        gap: 8px;
        padding: 20px 10px;
        flex-wrap: wrap;
    }

    .news-list-date {
        flex: 0 0 100%;
        font-size: 13px;
    }

    .news-list-subject {
        flex: 1;
        font-size: 15px;
    }
}

/* 最新消息分頁 */

.news-pager {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 45px;
}

.news-page-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: #fff;
    color: var(--color-text);
    font-size: 14px;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

a.news-page-link:hover {
    background: var(--color-soft);
    border-color: #aab5ad;
}

.news-page-link.active {
    background: #46594e;
    border-color: #46594e;
    color: #fff;
    font-weight: 600;
}


/* 聯絡我們 */

.contact-page {
    max-width: 1000px;
    padding-top: 70px;
    padding-bottom: 50px;
}

.contact-form {
    max-width: 850px;
    margin: 0 auto;
    padding: 45px 0;
}

.contact-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.contact-field {
    margin-bottom: 25px;
}

    .contact-field label {
        display: block;
        margin-bottom: 8px;
        font-size: 15px;
        font-weight: 500;
        color: var(--color-text);
    }

        .contact-field label span,
        .contact-note span {
            color: #c77b70;
        }

    .contact-field input,
    .contact-field textarea {
        display: block;
        width: 100%;
        padding: 12px 15px;
        border: 1px solid var(--color-border);
        border-radius: 3px;
        background: #fff;
        color: var(--color-text);
        font-family: inherit;
        font-size: 15px;
        line-height: 1.8;
        transition: border-color 0.2s ease;
    }

        .contact-field input:focus,
        .contact-field textarea:focus {
            outline: none;
            border-color: #9daaa0;
        }

    .contact-field textarea {
        resize: vertical;
        min-height: 170px;
    }

.contact-note {
    margin-top: 5px;
    color: var(--color-muted);
    font-size: 13px;
}

    .contact-note p {
        margin: 3px 0;
    }

.contact-message {
    display: block;
    margin-top: 25px;
    padding: 15px 20px;
    font-size: 14px;
    line-height: 1.8;
}

    .contact-message.success {
        background: #f0f6ef;
        color: #476a4c;
    }

    .contact-message.error {
        background: #fff2f0;
        color: #a84d43;
    }

.contact-actions {
    margin-top: 35px;
    text-align: center;
}

.contact-submit {
    min-width: 200px;
    padding: 14px 35px;
    border: none;
    border-radius: 3px;
    background: #46594e;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

    .contact-submit:hover {
        background: #34443a;
    }

    .contact-submit:disabled {
        background: #aab5ad;
        cursor: default;
    }

@media (max-width: 600px) {
    .contact-page {
        padding-top: 45px;
    }

    .contact-form {
        padding: 25px 0;
    }

    .contact-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .contact-field {
        margin-bottom: 20px;
    }

    .contact-submit {
        width: 100%;
    }
}


/* Step 15-B：手機／平板全螢幕導覽（不影響桌面版） */
.mobile-menu-toggle { display: none; }

@media (max-width: 980px) {
    .site-header { z-index: 2000; }
    .header-inner {
        min-height: 76px;
        padding: 8px 0;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }
    .site-logo { position: relative; z-index: 2002; gap: 10px; }
    .site-logo-image { width: 58px; height: 58px; }
    .site-logo-text { font-size: 20px; letter-spacing: 2px; }
    .site-logo-text small { font-size: 9px; letter-spacing: 1px; }
    .mobile-menu-toggle {
        position: relative;
        z-index: 2002;
        display: flex;
        justify-content: center;
        align-items: center;
        flex: 0 0 48px;
        width: 48px;
        height: 48px;
        border: 1px solid var(--color-border);
        border-radius: 4px;
        background: #fff;
        cursor: pointer;
    }
    .mobile-menu-icon { display: flex; flex-direction: column; gap: 5px; }
    .mobile-menu-icon span {
        display: block;
        width: 22px;
        height: 2px;
        background: var(--color-text);
        transition: transform .2s ease, opacity .2s ease;
    }
    .mobile-menu-open .mobile-menu-icon span:first-child { transform: translateY(7px) rotate(45deg); }
    .mobile-menu-open .mobile-menu-icon span:nth-child(2) { opacity: 0; }
    .mobile-menu-open .mobile-menu-icon span:last-child { transform: translateY(-7px) rotate(-45deg); }
    .site-nav {
        position: fixed;
        z-index: 2001;
        inset: 0;
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap; /* 避免橫向短視窗將選單折成多欄 */
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        padding: 95px max(7vw, 24px) 35px;
        padding-bottom: max(35px, env(safe-area-inset-bottom));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        background: #f7f8f5;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-10px);
        transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
    }
    .mobile-menu-open .site-nav {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }
    .site-nav a {
        display: block;
        width: 100%;
        padding: 12px 8px;
        border-bottom: 1px solid var(--color-border);
        font-size: clamp(17px, 2.5vw, 22px);
        letter-spacing: 3px;
        text-align: center;
    }
    .mobile-menu-open { overflow: hidden; }
    .mobile-menu-open .site-header { transform: none !important; }
    .mobile-menu-toggle:focus-visible, .site-nav a:focus-visible {
        outline: 2px solid #587765;
        outline-offset: 3px;
    }
}
@media (max-width: 400px) {
    .site-logo-image { width: 50px; height: 50px; }
    .site-logo-text { font-size: 18px; }
    .site-logo-text small { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    .site-nav, .mobile-menu-icon span { transition: none; }
}
