﻿/* ========================================= */
/* === 0. 置頂導覽列 (Home Header) === */

/* ========================================= */
/* === 首頁專屬底色淨化 (覆蓋全域橘色) === */
/* ========================================= */
body, .page-wrapper {
    background-color: #faf9f6 !important; /* 使用帶有一點暖白/珍珠白的顏色，和你的橫幅最搭 */
}

/* ========================================= */
.home-header {
    position: sticky; /* 讓橫幅黏在螢幕頂端 */
    top: 0;
    left: 0;
    width: 100%;
    background-color: #fcfcfc; /* 搭配極淺的灰白色底 */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); /* 底部加一點微陰影 */
    z-index: 1000;
    padding: 12px 0;
}

/* 導覽列容器彈性排版 */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
}

/* 中間頁籤清單樣式 */
.header-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px; /* 頁籤之間的間距 */
}

.header-nav a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    font-size: 1.1rem;
    transition: color 0.3s;
}

    .header-nav a:hover {
        color: #ff8c42; /* 滑過時變橘色 */
    }

/* 讓網頁捲動時更平滑 */
html {
    scroll-behavior: smooth;
}

/* 修正手機版：隱藏頁籤防止擠壓 */
@media (max-width: 992px) {
    .header-nav {
        display: none;
    }
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-logo {
    height: 64px;
    width: auto;
}

/* 圖片中的黃色申請按鈕 */
.btn-header-apply {
    background-color: #f7ca3e;
    color: #333;
    font-weight: 900;
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 1.05rem;
    transition: background-color 0.2s, transform 0.2s;
}

    .btn-header-apply:hover {
        background-color: #eab727;
        transform: scale(1.02);
    }

.btn-back-home {
    text-decoration: none;
    background: #ffffff;
    color: #666;
    border: 1px solid #ccc;
    padding: 10px 35px;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s;
}

    .btn-back-home:hover {
        background: #f8f9fa;
        color: #333;
        border-color: #ff8c42;
        transform: translateY(-2px);
    }

/* ========================================= */
/* === 1. 主視覺橫幅 (Hero Section) === */
/* ========================================= */
.hero-section {
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: #faf9f6;
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
    max-width: 3000px;
    margin: 0 auto; /* 讓圖片乖乖待在畫面正中間 */
}

/* ========================================= */
/* === 2. 我們是你的陪跑者 (三格特色區塊) === */
/* ========================================= */
.service-features {
    max-width: 1000px;
    margin: 60px auto;
    text-align: center;
    padding: 0 20px;
}

    .service-features .section-title {
        font-size: 2rem;
        font-weight: bold;
        color: #333;
        margin-bottom: 50px;
        letter-spacing: 2px;
    }

.features-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
}

.feature-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.icon-circle {
    width: 100px;
    height: 100px;
    background-color: #fff9f0;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(255, 165, 0, 0.1);
}

    .icon-circle .emoji-icon {
        font-size: 45px;
    }

.feature-item h3 {
    font-size: 1.25rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.feature-item p {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* ========================================= */
/* === 3. 快速導覽 (瘦長三格卡片) === */
/* ========================================= */
.tall-cards-grid {
    max-width: 1000px;
    margin: 20px auto 40px;
    display: flex;
    justify-content: space-between;
    gap: 30px;
    padding: 0 20px;
}

.tall-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 380px;
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .tall-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
        border-color: var(--primary-color, #ff8c42);
    }

    .tall-card .card-icon {
        font-size: 45px;
        margin-bottom: 25px;
    }

    .tall-card h3 {
        font-size: 1.3rem;
        font-weight: bold;
        color: #333;
        margin-bottom: 15px;
    }

    .tall-card p {
        font-size: 1rem;
        color: #777;
        margin: 0;
    }

/* ========================================= */
/* === 1.5 關於計畫介紹 === */
/* ========================================= */
.about-sbir {
    max-width: 1000px;
    margin: 60px auto 20px;
    padding: 0 20px;
    text-align: center;
}

    .about-sbir h2 {
        font-size: 2rem;
        font-weight: 900;
        color: #333;
        margin-bottom: 25px;
        letter-spacing: 1px;
    }

    .about-sbir p {
        font-size: 1.15rem;
        font-weight: 600;
        line-height: 1.8;
        color: #444;
        text-align: justify;
        margin: 0;
    }

/* ========================================= */
/* === 4. 九宮格資訊區塊 (Nine Grid Layout) === */
/* ========================================= */
.nine-grid-section {
    max-width: 1000px;
    margin: 40px auto 60px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* ⭐ 統一規格的白色卡片 (修改版) */
.grid-card {
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    /* padding: 30px 25px; (移除了！改套用在內部的文字區) */
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: #333;
    overflow: hidden; /* ⭐ 非常重要：避免圖片底色超出卡片的圓角邊框 */
}

    .grid-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.08);
        border-color: #ff8c42; /* 滑過變橘框 */
    }

/* ⭐ 新增：上方圖片專屬區塊 */
.card-image-wrapper {
    width: 100%;
    height: 130px; /* 給圖片一個固定的專屬空間 */
    background-color: #fcfcfc; /* 淡淡的底色，區隔圖文 */
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #f0f0f0; /* 底線切割感 */
}

    .card-image-wrapper img {
        width: 65px; /* 控制圖示寬度，可以視需求增減 */
        height: auto;
        display: block;
        transition: transform 0.3s; /* 加入縮放特效 */
    }

.grid-card:hover .card-image-wrapper img {
    transform: scale(1.1); /* 滑鼠游標移過去時，圖片微微放大 */
}

/* ⭐ 新增：下方文字專屬區塊 */
.card-content {
    padding: 25px 25px 30px; /* 將內邊距移到文字區塊 */
    display: flex;
    flex-direction: column;
    align-items: center; /* 讓標題置中 */
    flex-grow: 1; /* 自動拉長，確保每張卡片底部對齊 */
}

    /* 以下是卡片內部文字的排版 */
    .card-content h3 {
        font-size: 1.25rem;
        font-weight: bold;
        color: #333;
        margin: 0 0 15px 0;
        text-align: center;
    }

    .card-content p {
        font-size: 0.95rem;
        color: #666;
        line-height: 1.6;
        margin: 0;
        text-align: justify;
        width: 100%;
    }

    .card-content ul {
        font-size: 0.95rem;
        color: #666;
        line-height: 1.8;
        margin: 0;
        padding-left: 20px;
        align-self: flex-start; /* 讓清單強制靠左 */
        width: 100%;
    }

        .card-content ul li {
            margin-bottom: 8px;
        }

/* 專門給「區塊5」申請入口的小按鈕樣式 */
.fake-btn {
    margin-top: auto; /* ⭐ 自動推到區塊最底部 */
    padding: 10px 20px;
    background-color: #fbca36;
    color: #333;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.95rem;
    transition: background-color 0.2s;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.grid-card:hover .fake-btn {
    background-color: #eab727;
}

/* ========================================= */
/* === 5. 最新消息區塊 (News Section) === */
/* ========================================= */
.news-section {
    width: 100%;
    background-color: #fdf3e6;
    padding: 50px 0 70px;
    margin-top: 60px;
}

.news-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 標題：最 新 消 息 */
.news-section-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    letter-spacing: 4px;
    margin-bottom: 30px;
}

/* 裝載清單的白色大卡片 */
.news-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .news-list li {
        display: flex;
        align-items: center;
        padding: 18px 0;
        border-bottom: 1px solid #eeeeee;
        gap: 20px;
    }

        /* 最後一條線不要顯示 */
        .news-list li:last-child {
            border-bottom: none;
        }

/* 日期 */
.news-date {
    color: #666;
    font-size: 0.95rem;
    min-width: 90px;
}

/* 膠囊標籤 */
.news-tag {
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

/* 標籤顏色變化 (綠色系) */
.tag-event {
    border: 1px solid #209d7e;
    color: #209d7e;
}

.tag-notice {
    border: 1px solid #209d7e;
    color: #209d7e;
}

/* 標題連結 */
.news-title {
    flex: 1;
    color: #333;
    text-decoration: none;
    font-size: 1.05rem;
    transition: color 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .news-title:hover {
        color: #ff8c42;
    }

/* 更多詳情按鈕區塊 */
.news-more-wrapper {
    text-align: center;
    margin-top: 25px;
}

.btn-more {
    display: inline-block;
    border: 1px solid #209d7e;
    color: #209d7e;
    border-radius: 20px;
    padding: 8px 25px;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s;
}

    .btn-more:hover {
        background-color: #209d7e;
        color: #ffffff;
    }

/* ========================================= */
/* === 6. 頁尾 (Footer) === */
/* ========================================= */
.site-footer {
    background-color: #666666;
    color: #ffffff;
    padding: 50px 0 30px; /* 稍微加厚上下空間，讓變大的內容有呼吸感 */
    font-size: 1.1rem; /* ⭐ 全域基準文字放大 (原本 0.95rem) */
    position: relative;
    margin-top: 60px;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    padding: 35px 0; /* 配合放大稍微加寬上下距離 */
    margin-bottom: 20px;
    gap: 30px;
    flex-wrap: wrap;
}

/* ⭐ 聯絡資訊文字調整 */
.footer-contact p {
    margin: 0 0 15px 0; /* 拉開一點行距 */
    font-size: 1.15rem; /* ⭐ 聯絡資訊特別放大 */
    line-height: 1.6;
}

.footer-social {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

    .footer-social a {
        color: #ffffff;
        font-weight: bold;
        text-decoration: none;
    }

        .footer-social a:hover {
            color: #ffc107;
        }

.footer-logos {
    display: flex;
    flex-direction: column;
    gap: 25px; /* ⭐ 每個單位的間距拉開 */
}

/* ⭐ 「指導單位/主辦單位」文字設定 */
.logo-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem; /* ⭐ 文字放大 */
    font-weight: bold; /* ⭐ 加粗讓它更明顯 */
}

/* ⭐ 單位 Logo 圖片*/
{
    height: 50px; /* ⭐ 高度大幅拉高 (原本 40px) */
    width: auto;
    padding: 5px 10px; /* 給圖片一點留白邊界 */
    border-radius: 5px; /* 加上圓角更精緻 */
}

/* ⭐ 單位 Logo 圖片與 LINE QRCode 大小設定 */
.normal-logo {
    height: 50px;
    width: auto;
    padding: 5px 10px; /* 給圖片一點留白邊界 */
    border-radius: 5px; /* 加上圓角更精緻 */
}

/* ⭐ 版權與瀏覽人次文字 */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 1rem;
    color: #eeeeee;
}

.back-to-top {
    position: absolute;
    right: 40px;
    bottom: 40px;
    width: 50px;
    height: 50px;
    background-color: #e0e0e0;
    color: #333;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem; /* 箭頭放大 */
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s;
}

    .back-to-top:hover {
        background-color: #ffffff;
    }

/* ========================================= */
/* === 7. 全域手機版 RWD 響應式微調 === */
/* ========================================= */
@media (max-width: 800px) {
    /* 1. 頂部導覽列 */
    .brand-logo {
        height: 45px;
    }

    .brand-title {
        font-size: 1.1rem;
    }

    .btn-header-apply {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    /* 2. 陪跑者三格 */
    .features-wrapper {
        flex-direction: column;
        gap: 40px;
    }

    /* 3. ⭐ 九宮格：轉為單行直列 */
    .nine-grid-section {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 30px auto;
    }

    /* 4. 九宮格內文微調 */
    .card-content ul {
        align-self: center;
        width: fit-content;
        text-align: left;
    }

    /* 5. 頁尾調整 */
    .footer-top {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .footer-contact {
        order: 2;
    }

    .footer-logos {
        order: 1;
        align-items: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 10px;
    }

    .back-to-top {
        right: 20px;
        bottom: 20px;
    }
}

@media (max-width: 600px) {
    /* 最新消息列表 */
    .news-card {
        padding: 20px;
    }

    .news-list li {
        flex-wrap: wrap;
        gap: 10px;
        padding: 15px 0;
    }

    .news-title {
        flex-basis: 100%;
        white-space: normal;
        line-height: 1.5;
        margin-top: 5px;
    }
}
