/* =============================================================
   tao.css — 桃園專案專用樣式
   品牌色、首頁區塊、專案特殊元件
   換專案時替換此檔（hsq.css / yun.css）
   ============================================================= */

/* ===== 品牌色變數 ===== */
:root {
    --ty-pink: #e85298;
    --ty-blue: #80c8ef;
    --ty-yellow: #ffd900;
    --ty-green: #64b72f;
    --ty-dark: #333333;
    --ty-bg: #f8fbfd;
}

/* ===== 全域品牌 ===== */
body {
    background-color: var(--ty-bg) !important;
    color: var(--ty-dark);
}

/* ===== Site Header 品牌色 ===== */
.site-header {
    background-color: #ffffff;
}
.brand { color: var(--ty-dark); }
.nav-main a { color: var(--ty-dark); }
.nav-main a.nav-active { color: var(--ty-pink); }
.nav-main a:hover { color: var(--ty-pink); }

/* ===== rt 左面板品牌色 ===== */
.rt-panel { background-color: rgba(248, 251, 253, 0.9); }

/* ===== Footer 品牌 ===== */
footer { background: transparent !important; }
.footer-logo { max-width: 240px !important; height: auto; }

/* ===== Modal 品牌色 ===== */
.tao-modal-content { box-shadow: 0 20px 48px rgba(97, 77, 57, 0.18); }
.tao-modal-header,
.tao-modal-footer {
    background: linear-gradient(135deg, rgba(232, 82, 152, 0.94), rgba(233, 143, 73, 0.88));
    border: none;
}
.tao-modal-title { color: #ffffff; font-weight: 700; }
.tao-modal-body {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(252, 248, 241, 0.99));
    color: var(--ty-dark);
}
.tao-modal-btn {
    min-width: 6.5rem; border: none; border-radius: 999px;
    padding: 0.55rem 1.5rem;
    background: linear-gradient(90deg, var(--ty-pink), #f06bab);
    color: #ffffff; font-weight: 700;
}
.tao-modal-btn:hover {
    color: #ffffff;
    background: linear-gradient(90deg, #d94589, var(--ty-pink));
}

/* =============================================================
   首頁專用
   ============================================================= */

/* ===== Hero 區 ===== */
.home-hero {
    background: linear-gradient(135deg, var(--ty-blue) 0%, #eef7fc 100%);
    padding: 80px 0;
    text-align: center;
    border-bottom: 5px solid var(--ty-pink);
}
.home-hero-title {
    margin: 0 0 10px;
    color: #004a7c;
    font-size: 42px;
    font-weight: 700;
}
.home-hero-text {
    margin: 0 0 40px;
    color: #004a7c;
    font-size: 18px;
    line-height: 1.7;
}

/* ===== 搜尋框 ===== */
.home-search {
    display: flex;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 50px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
.home-search input {
    flex: 1; padding: 20px 30px; border: none; font-size: 18px; outline: none;
}
.home-search button {
    border: none; padding: 0 40px;
    background-color: var(--ty-pink); color: #ffffff;
    font-size: 18px; font-weight: 700; cursor: pointer;
    transition: background 0.3s ease;
}
.home-search button:hover { background-color: #d13d7d; }

/* ===== 功能卡片區 ===== */
.home-features { padding: 60px 0; }
.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    align-items: stretch;
}
.feature-card {
    position: relative; isolation: isolate; overflow: hidden;
    display: flex; flex-direction: column; align-items: center;
    height: 100%; min-height: 320px; padding: 40px 20px;
    border-top: 6px solid #ccc; border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
    color: var(--ty-dark); text-align: center;
    transition: transform 0.3s ease;
}
.feature-card > * { position: relative; z-index: 2; }
.feature-card:hover { color: #ffffff; transform: translateY(-10px); }
.feature-card h2 { margin: 0 0 10px; font-size: 22px; font-weight: 700; }
.feature-card p { margin: 0; color: #666; font-size: 15px; line-height: 1.5; }
.feature-card-image {
    display: block; width: 80px; height: 80px;
    margin: 0 auto 20px; object-fit: contain;
}

/* 卡片品牌色邊框 */
.card-pink { border-top-color: var(--ty-pink); }
.card-blue { border-top-color: var(--ty-blue); }
.card-yellow { border-top-color: var(--ty-yellow); }
.card-green { border-top-color: var(--ty-green); }

/* 卡片 hover 背景圖 */
.feature-card-news::before,
.feature-card-bus::before,
.feature-card-myroute::before,
.feature-card-nearstop::before {
    content: ""; position: absolute; inset: 0;
    opacity: 0; transition: opacity 0.28s ease; z-index: 0;
}
.feature-card-news::after,
.feature-card-bus::after,
.feature-card-myroute::after,
.feature-card-nearstop::after {
    content: ""; position: absolute; inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0; transition: opacity 0.28s ease; z-index: 1;
}
.feature-card-news::before { background: url("../images/homepage/icon-news.jpg") center / cover no-repeat; }
.feature-card-bus::before { background: url("../images/homepage/icon-bus.jpg") center / cover no-repeat; }
.feature-card-myroute::before { background: url("../images/homepage/icon-myroute.png") center / cover no-repeat; }
.feature-card-nearstop::before { background: url("../images/homepage/icon-nearstop.png") center / cover no-repeat; }

.feature-card-news:hover::before, .feature-card-bus:hover::before,
.feature-card-myroute:hover::before, .feature-card-nearstop:hover::before { opacity: 0.8; }
.feature-card-news:hover::after, .feature-card-bus:hover::after,
.feature-card-myroute:hover::after, .feature-card-nearstop:hover::after { opacity: 1; }

/* ===== 首頁新聞區 ===== */
.home-news { padding: 0 0 60px; }
.news-stage { padding-top: 6px; }
.news-stage-head {
    position: relative; margin-bottom: 30px; padding-bottom: 18px;
    border-bottom: 1px solid rgba(51, 51, 51, 0.12);
}
.news-stage-title-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.news-stage-title { margin: 0; color: var(--ty-dark); font-size: 32px; font-weight: 700; line-height: 1.1; }
.news-stage-line { display: block; width: 92px; height: 5px; border-radius: 999px; background: var(--ty-yellow); }
.news-stage-more { position: absolute; right: 0; top: 8px; color: #1f66ff; font-size: 16px; font-weight: 700; }
.news-stage-more:hover { color: var(--ty-pink); }

/* 新聞卡片 */
.news-card {
    align-items: flex-start; text-align: left;
    min-height: 250px; padding: 28px 20px 22px;
}
.news-chip {
    display: inline-flex; align-items: center;
    margin-bottom: 16px; padding: 7px 14px; border-radius: 999px;
    background: rgba(31, 102, 255, 0.08); color: #2d65ce;
    font-size: 14px; font-weight: 700; line-height: 1;
}
.news-card-title {
    display: -webkit-box; margin: 0 0 12px;
    color: var(--ty-dark); font-size: 20px; font-weight: 700; line-height: 1.45;
    -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.news-card-desc {
    display: -webkit-box; margin: 0;
    color: #666; font-size: 15px; line-height: 1.7;
    -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.news-card-date { margin-top: auto; padding-top: 18px; color: #666; font-size: 15px; font-weight: 500; }

/* 新聞 Carousel */
.news-carousel { position: relative; padding: 0 28px 34px; }
.news-carousel-control {
    top: 50%; bottom: auto; width: auto; opacity: 1; transform: translateY(-50%);
}
.news-carousel-control-prev { left: -6px; }
.news-carousel-control-next { right: -6px; }
.news-carousel-control-icon {
    display: inline-grid; place-items: center;
    width: 56px; height: 56px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
    color: #8a8a8a; font-size: 20px;
}
.news-carousel-indicators { position: static; gap: 10px; margin: 18px 0 0; }
.news-carousel-indicators [data-bs-target] {
    width: 10px; height: 10px; margin: 0; border: none; border-radius: 50%;
    background-color: rgba(51, 51, 51, 0.18); opacity: 1;
}
.news-carousel-indicators .active { background-color: #2d65ce; }

/* ===== 首頁 RWD ===== */
@media (max-width: 1199.98px) {
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767.98px) {
    /* Hero：手機版只保留搜尋框（標語 + 說明段落都隱藏） */
    .home-hero { padding: 18px 0; border-bottom-width: 3px; }
    .home-hero-title,
    .home-hero-text { display: none; }
    .home-search { flex-direction: row; border-radius: 999px; }
    .home-search input { flex: 1; width: auto; padding: 10px 16px; font-size: 15px; }
    .home-search button { width: auto; padding: 10px 18px; font-size: 15px; white-space: nowrap; }

    /* Feature cards：手機版純 icon（移除卡片視覺：背景/邊框/陰影） */
    .home-features { padding: 20px 0 8px; }
    .home-features .feature-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .home-features .feature-card {
        min-height: 0;
        padding: 10px 0;
        border: none;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }
    .home-features .feature-card p { display: none; }
    .home-features .feature-card-image {
        width: 96px; height: 96px;
        margin: 0 auto 8px;
    }
    .home-features .feature-card h2 {
        margin: 0;
        font-size: 15px;
        font-weight: 700;
        color: var(--ty-dark);
        line-height: 1.2;
    }
    /* 手機 hover 效果抑制位移與背景圖（避免 touch 觸發閃爍） */
    .home-features .feature-card:hover { transform: none; color: var(--ty-dark); background: transparent; }
    .home-features .feature-card::before,
    .home-features .feature-card::after { display: none; }

    /* 新聞區：手機改條列式 */
    .home-news .feature-grid { grid-template-columns: 1fr; gap: 0; }
    .news-card {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        min-height: 0;
        padding: 12px 4px;
        border: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        text-align: left;
    }
    .news-card:hover { transform: none; color: var(--ty-dark); background: rgba(0, 0, 0, 0.02); }
    .news-chip,
    .news-card-desc { display: none; }
    .news-card-title {
        flex: 1;
        margin: 0;
        font-size: 15px;
        font-weight: 500;
        line-height: 1.45;
        -webkit-line-clamp: 1;
    }
    .news-card-date {
        flex: none;
        margin: 0;
        padding: 0;
        font-size: 13px;
        color: #999;
        font-weight: 400;
    }
    .news-stage-head { margin-bottom: 14px; padding-bottom: 10px; }
    .news-stage-title { font-size: 24px; }
    .news-stage-more { position: static; display: inline-block; margin-top: 8px; }
    .news-carousel { padding: 0 0 14px; }
    .news-carousel-control { display: none; }
    .news-carousel-indicators { margin-top: 12px; }
}
